{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\n⊢ ∀ (b : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n          (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) b) ≫\n        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) b =\n      (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n          (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) b) ≫\n        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) b\n[PROOFSTEP]\nintro i\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n        (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n        (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      NatTrans.app (NatTrans.app E.π k)\n          (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i).Y) ≫\n        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n    Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      NatTrans.app (NatTrans.app E.π k)\n          (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i).Y) ≫\n        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i\n[PROOFSTEP]\nerw [← (E.π.app k).naturality, ← (E.π.app k).naturality]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      (((Functor.const K).obj E.pt).obj k).map i.g₁.op ≫ NatTrans.app (NatTrans.app E.π k) (op i.Z) =\n    Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      (((Functor.const K).obj E.pt).obj k).map i.g₂.op ≫ NatTrans.app (NatTrans.app E.π k) (op i.Z)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      E.pt.map i.g₁.op ≫ NatTrans.app (NatTrans.app E.π k) (op i.Z) =\n    Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n      E.pt.map i.g₂.op ≫ NatTrans.app (NatTrans.app E.π k) (op i.Z)\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫ E.pt.map i.g₁.op) ≫\n      NatTrans.app (NatTrans.app E.π k) (op i.Z) =\n    (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫ E.pt.map i.g₂.op) ≫\n      NatTrans.app (NatTrans.app E.π k) (op i.Z)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nk : K\ni : (GrothendieckTopology.Cover.index W (F.obj k).val).R\n⊢ Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫ E.pt.map i.g₁.op =\n    Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫ E.pt.map i.g₂.op\n[PROOFSTEP]\napply S.condition\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\n⊢ ∀ ⦃X_1 Y : K⦄ (f : X_1 ⟶ Y),\n    ((Functor.const K).obj S.pt).map f ≫\n        (fun k =>\n            IsLimit.lift (Presheaf.isLimitOfIsSheaf J (F.obj k).val W (_ : Presheaf.IsSheaf J (F.obj k).val))\n              (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                (_ :\n                  ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                          (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                      (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                          (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i)))\n          Y =\n      (fun k =>\n            IsLimit.lift (Presheaf.isLimitOfIsSheaf J (F.obj k).val W (_ : Presheaf.IsSheaf J (F.obj k).val))\n              (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                (_ :\n                  ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                          (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                      (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                          (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i)))\n          X_1 ≫\n        (F ⋙ sheafToPresheaf J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f\n[PROOFSTEP]\nintro i j f\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\n⊢ ((Functor.const K).obj S.pt).map f ≫\n      (fun k =>\n          IsLimit.lift (Presheaf.isLimitOfIsSheaf J (F.obj k).val W (_ : Presheaf.IsSheaf J (F.obj k).val))\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i)))\n        j =\n    (fun k =>\n          IsLimit.lift (Presheaf.isLimitOfIsSheaf J (F.obj k).val W (_ : Presheaf.IsSheaf J (F.obj k).val))\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i)))\n        i ≫\n      (F ⋙ sheafToPresheaf J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f\n[PROOFSTEP]\ndsimp [Presheaf.isLimitOfIsSheaf]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\n⊢ 𝟙 S.pt ≫\n      Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj j).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                  (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                        NatTrans.app (NatTrans.app E.π j)\n                          (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                    (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                        NatTrans.app (NatTrans.app E.π j)\n                          (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                          (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                          (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) I) =\n    Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj i).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n              (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n              (_ :\n                ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                  (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                        NatTrans.app (NatTrans.app E.π i)\n                          (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                    (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                        NatTrans.app (NatTrans.app E.π i)\n                          (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                    (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                    (_ :\n                      ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                          (Multifork.ι S\n                                (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                    (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                    (_ :\n                      ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                          (Multifork.ι S\n                                (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n      NatTrans.app (F.map f).val (op X)\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\n⊢ Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj j).val) W\n      (fun I =>\n        Multifork.ι\n          (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n            (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n            (_ :\n              ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                      NatTrans.app (NatTrans.app E.π j)\n                        (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                    MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                  (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                      NatTrans.app (NatTrans.app E.π j)\n                        (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                    MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n          I)\n      (_ :\n        ∀ (I : GrothendieckTopology.Cover.Relation W),\n          Multifork.ι\n                (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                  (_ :\n                    ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                      (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                            NatTrans.app (NatTrans.app E.π j)\n                              (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                          MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                        (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                            NatTrans.app (NatTrans.app E.π j)\n                              (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                          MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n              MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) I =\n            Multifork.ι\n                (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                  (_ :\n                    ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                      (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                            NatTrans.app (NatTrans.app E.π j)\n                              (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                          MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                        (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                            NatTrans.app (NatTrans.app E.π j)\n                              (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                          MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n              MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) I) =\n    Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj i).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n              (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n              (_ :\n                ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                  (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                        NatTrans.app (NatTrans.app E.π i)\n                          (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                    (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                        NatTrans.app (NatTrans.app E.π i)\n                          (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                    (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                    (_ :\n                      ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                          (Multifork.ι S\n                                (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                    (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                    (_ :\n                      ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                          (Multifork.ι S\n                                (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                              NatTrans.app (NatTrans.app E.π i)\n                                (op\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n      NatTrans.app (F.map f).val (op X)\n[PROOFSTEP]\napply Presheaf.IsSheaf.hom_ext (F.obj j).2 W\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\n⊢ ∀ (I : GrothendieckTopology.Cover.Arrow W),\n    Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj j).val) W\n          (fun I =>\n            Multifork.ι\n              (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                (_ :\n                  ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                    (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                          NatTrans.app (NatTrans.app E.π j)\n                            (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                      (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                          NatTrans.app (NatTrans.app E.π j)\n                            (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n              I)\n          (_ :\n            ∀ (I : GrothendieckTopology.Cover.Relation W),\n              Multifork.ι\n                    (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                      (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                      (_ :\n                        ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                          (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                                NatTrans.app (NatTrans.app E.π j)\n                                  (op\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                              MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                            (Multifork.ι S\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                                NatTrans.app (NatTrans.app E.π j)\n                                  (op\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                              MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                  MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) I =\n                Multifork.ι\n                    (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                      (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                      (_ :\n                        ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                          (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                                NatTrans.app (NatTrans.app E.π j)\n                                  (op\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                              MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                            (Multifork.ι S\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                                NatTrans.app (NatTrans.app E.π j)\n                                  (op\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                              MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                  MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n        (F.obj j).val.map I.f.op =\n      (Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj i).val) W\n            (fun I =>\n              Multifork.ι\n                (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                  (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                  (_ :\n                    ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                      (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                            NatTrans.app (NatTrans.app E.π i)\n                              (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                          MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                        (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                            NatTrans.app (NatTrans.app E.π i)\n                              (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                          MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                I)\n            (_ :\n              ∀ (I : GrothendieckTopology.Cover.Relation W),\n                Multifork.ι\n                      (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                        (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                        (_ :\n                          ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                            (Multifork.ι S\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                  NatTrans.app (NatTrans.app E.π i)\n                                    (op\n                                      (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                          i_1).Y)) ≫\n                                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                              (Multifork.ι S\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                  NatTrans.app (NatTrans.app E.π i)\n                                    (op\n                                      (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                          i_1).Y)) ≫\n                                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                      (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                    MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) I =\n                  Multifork.ι\n                      (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                        (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                        (_ :\n                          ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                            (Multifork.ι S\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                  NatTrans.app (NatTrans.app E.π i)\n                                    (op\n                                      (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                          i_1).Y)) ≫\n                                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                              (Multifork.ι S\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                  NatTrans.app (NatTrans.app E.π i)\n                                    (op\n                                      (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                          i_1).Y)) ≫\n                                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                      (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                    MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n          NatTrans.app (F.map f).val (op X)) ≫\n        (F.obj j).val.map I.f.op\n[PROOFSTEP]\nintro ii\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\nii : GrothendieckTopology.Cover.Arrow W\n⊢ Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj j).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                  (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                        NatTrans.app (NatTrans.app E.π j)\n                          (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                    (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                        NatTrans.app (NatTrans.app E.π j)\n                          (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                          (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n                        (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n                          (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                              NatTrans.app (NatTrans.app E.π j)\n                                (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) I) ≫\n      (F.obj j).val.map ii.f.op =\n    (Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj i).val) W\n          (fun I =>\n            Multifork.ι\n              (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                (_ :\n                  ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                    (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                          NatTrans.app (NatTrans.app E.π i)\n                            (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                        MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                      (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                          NatTrans.app (NatTrans.app E.π i)\n                            (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                        MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n              I)\n          (_ :\n            ∀ (I : GrothendieckTopology.Cover.Relation W),\n              Multifork.ι\n                    (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                      (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                      (_ :\n                        ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                          (Multifork.ι S\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                NatTrans.app (NatTrans.app E.π i)\n                                  (op\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                        i_1).Y)) ≫\n                              MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                            (Multifork.ι S\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                NatTrans.app (NatTrans.app E.π i)\n                                  (op\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                        i_1).Y)) ≫\n                              MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                  MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) I =\n                Multifork.ι\n                    (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n                      (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n                      (_ :\n                        ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n                          (Multifork.ι S\n                                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                NatTrans.app (NatTrans.app E.π i)\n                                  (op\n                                    (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                        i_1).Y)) ≫\n                              MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                            (Multifork.ι S\n                                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                                NatTrans.app (NatTrans.app E.π i)\n                                  (op\n                                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val)\n                                        i_1).Y)) ≫\n                              MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n                    (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n                  MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) I) ≫\n        NatTrans.app (F.map f).val (op X)) ≫\n      (F.obj j).val.map ii.f.op\n[PROOFSTEP]\nrw [Presheaf.IsSheaf.amalgamate_map, Category.assoc, ← (F.map f).val.naturality, ← Category.assoc,\n  Presheaf.IsSheaf.amalgamate_map]\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\nii : GrothendieckTopology.Cover.Arrow W\n⊢ Multifork.ι\n      (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj j).val) S.pt\n        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π j) (op i.Y))\n        (_ :\n          ∀ (i : (GrothendieckTopology.Cover.index W (F.obj j).val).R),\n            (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                  NatTrans.app (NatTrans.app E.π j)\n                    (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) i =\n              (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i) ≫\n                  NatTrans.app (NatTrans.app E.π j)\n                    (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj j).val) i).Y)) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj j).val) i))\n      ii =\n    Multifork.ι\n        (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj i).val) S.pt\n          (fun i_1 => Multifork.ι S i_1 ≫ NatTrans.app (NatTrans.app E.π i) (op i_1.Y))\n          (_ :\n            ∀ (i_1 : (GrothendieckTopology.Cover.index W (F.obj i).val).R),\n              (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                    NatTrans.app (NatTrans.app E.π i)\n                      (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                  MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) i_1 =\n                (Multifork.ι S (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1) ≫\n                    NatTrans.app (NatTrans.app E.π i)\n                      (op (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj i).val) i_1).Y)) ≫\n                  MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj i).val) i_1))\n        ii ≫\n      NatTrans.app (F.map f).val (op ii.Y)\n[PROOFSTEP]\ndsimp [Multifork.ofι]\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\nii : GrothendieckTopology.Cover.Arrow W\n⊢ Multifork.ι\n      { pt := S.pt,\n        π :=\n          NatTrans.mk fun x =>\n            match x with\n            | WalkingMulticospan.left a => Multifork.ι S a ≫ NatTrans.app (NatTrans.app E.π j) (op a.Y)\n            | WalkingMulticospan.right b =>\n              (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) b) ≫\n                  NatTrans.app (NatTrans.app E.π j)\n                    (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) b).Y)) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) b }\n      ii =\n    Multifork.ι\n        { pt := S.pt,\n          π :=\n            NatTrans.mk fun x =>\n              match x with\n              | WalkingMulticospan.left a => Multifork.ι S a ≫ NatTrans.app (NatTrans.app E.π i) (op a.Y)\n              | WalkingMulticospan.right b =>\n                (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) b) ≫\n                    NatTrans.app (NatTrans.app E.π i)\n                      (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj i).val) b).Y)) ≫\n                  MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj i).val) b }\n        ii ≫\n      NatTrans.app (F.map f).val (op ii.Y)\n[PROOFSTEP]\nerw [Category.assoc, ← E.w f]\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\nK : Type z\ninst✝ : SmallCategory K\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni j : K\nf : i ⟶ j\nii : GrothendieckTopology.Cover.Arrow W\n⊢ Multifork.ι\n      { pt := S.pt,\n        π :=\n          NatTrans.mk fun x =>\n            match x with\n            | WalkingMulticospan.left a =>\n              Multifork.ι S a ≫ NatTrans.app (NatTrans.app E.π i ≫ (F ⋙ sheafToPresheaf J D).map f) (op a.Y)\n            | WalkingMulticospan.right b =>\n              (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) b) ≫\n                  NatTrans.app (NatTrans.app E.π i ≫ (F ⋙ sheafToPresheaf J D).map f)\n                    (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj j).val) b).Y)) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj j).val) b }\n      ii =\n    Multifork.ι S ii ≫ NatTrans.app (NatTrans.app E.π i) (op ii.Y) ≫ NatTrans.app (F.map f).val (op ii.Y)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\n⊢ ∀ (E_1 : Multifork (GrothendieckTopology.Cover.index W E.pt)) (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    (fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n          E_1 ≫\n        Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i =\n      Multifork.ι E_1 i\n[PROOFSTEP]\nintro S i\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\n⊢ (fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n        S ≫\n      Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i =\n    Multifork.ι S i\n[PROOFSTEP]\napply (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) hE).hom_ext\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\n⊢ ∀ (j : K),\n    ((fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n            S ≫\n          Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i) ≫\n        NatTrans.app (((evaluation Cᵒᵖ D).obj (op i.Y)).mapCone E).π j =\n      Multifork.ι S i ≫ NatTrans.app (((evaluation Cᵒᵖ D).obj (op i.Y)).mapCone E).π j\n[PROOFSTEP]\nintro k\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ ((fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n          S ≫\n        Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i) ≫\n      NatTrans.app (((evaluation Cᵒᵖ D).obj (op i.Y)).mapCone E).π k =\n    Multifork.ι S i ≫ NatTrans.app (((evaluation Cᵒᵖ D).obj (op i.Y)).mapCone E).π k\n[PROOFSTEP]\ndsimp [Multifork.ofι]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ (IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S) ≫\n        Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i) ≫\n      NatTrans.app (NatTrans.app E.π k) (op i.Y) =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nerw [Category.assoc, (E.π.app k).naturality]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S) ≫\n      NatTrans.app (NatTrans.app E.π k) (op X) ≫ ((F ⋙ sheafToPresheaf J D).obj k).map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S) ≫\n      NatTrans.app (NatTrans.app E.π k) (op X) ≫ (F.obj k).val.map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ (IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S) ≫\n        NatTrans.app (NatTrans.app E.π k) (op X)) ≫\n      (F.obj k).val.map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nerw [(isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE).fac (multiforkEvaluationCone F E X W S)]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ NatTrans.app (multiforkEvaluationCone F E X W S).π k ≫ (F.obj k).val.map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\ndsimp [multiforkEvaluationCone, Presheaf.isLimitOfIsSheaf]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj k).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                          (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                          (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n      (F.obj k).val.map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nerw [Presheaf.IsSheaf.amalgamate_map]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\ni : (GrothendieckTopology.Cover.index W E.pt).L\nk : K\n⊢ Multifork.ι\n      (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n        (_ :\n          ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n            (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n      i =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\n⊢ ∀ (E_1 : Multifork (GrothendieckTopology.Cover.index W E.pt))\n    (m : E_1.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt),\n    (∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n        m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι E_1 i) →\n      m =\n        (fun S =>\n            IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n          E_1\n[PROOFSTEP]\nintro S m hm\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\n⊢ m =\n    (fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n      S\n[PROOFSTEP]\napply (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE).hom_ext\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\n⊢ ∀ (j : K),\n    m ≫ NatTrans.app (((evaluation Cᵒᵖ D).obj (op X)).mapCone E).π j =\n      (fun S =>\n            IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n          S ≫\n        NatTrans.app (((evaluation Cᵒᵖ D).obj (op X)).mapCone E).π j\n[PROOFSTEP]\nintro k\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\n⊢ m ≫ NatTrans.app (((evaluation Cᵒᵖ D).obj (op X)).mapCone E).π k =\n    (fun S => IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S))\n        S ≫\n      NatTrans.app (((evaluation Cᵒᵖ D).obj (op X)).mapCone E).π k\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\n⊢ m ≫ NatTrans.app (NatTrans.app E.π k) (op X) =\n    IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE) (multiforkEvaluationCone F E X W S) ≫\n      NatTrans.app (NatTrans.app E.π k) (op X)\n[PROOFSTEP]\nerw [(isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op X)) hE).fac]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\n⊢ m ≫ NatTrans.app (NatTrans.app E.π k) (op X) = NatTrans.app (multiforkEvaluationCone F E X W S).π k\n[PROOFSTEP]\napply Presheaf.IsSheaf.hom_ext (F.obj k).2 W\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\n⊢ ∀ (I : GrothendieckTopology.Cover.Arrow W),\n    (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map I.f.op =\n      NatTrans.app (multiforkEvaluationCone F E X W S).π k ≫ (F.obj k).val.map I.f.op\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map i.f.op =\n    NatTrans.app (multiforkEvaluationCone F E X W S).π k ≫ (F.obj k).val.map i.f.op\n[PROOFSTEP]\ndsimp only [multiforkEvaluationCone, Presheaf.isLimitOfIsSheaf]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map i.f.op =\n    Presheaf.IsSheaf.amalgamate (_ : Presheaf.IsSheaf J (F.obj k).val) W\n        (fun I =>\n          Multifork.ι\n            (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n              (_ :\n                ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                  (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                        (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                      MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n            I)\n        (_ :\n          ∀ (I : GrothendieckTopology.Cover.Relation W),\n            Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                          (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) I =\n              Multifork.ι\n                  (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n                    (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                    (_ :\n                      ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n                        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n                          (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                              (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                            MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) I) ≫\n      (F.obj k).val.map i.f.op\n[PROOFSTEP]\nrw [(F.obj k).cond.amalgamate_map]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map i.f.op =\n    Multifork.ι\n      (Multifork.ofι (GrothendieckTopology.Cover.index W (F.obj k).val) S.pt\n        (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n        (_ :\n          ∀ (i : (GrothendieckTopology.Cover.index W (F.obj k).val).R),\n            (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                  (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) i =\n              (fun i => Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y))\n                  (MulticospanIndex.sndTo (GrothendieckTopology.Cover.index W (F.obj k).val) i) ≫\n                MulticospanIndex.snd (GrothendieckTopology.Cover.index W (F.obj k).val) i))\n      i\n[PROOFSTEP]\ndsimp [Multifork.ofι]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map i.f.op =\n    Multifork.ι\n      { pt := S.pt,\n        π :=\n          NatTrans.mk fun x =>\n            match x with\n            | WalkingMulticospan.left a => Multifork.ι S a ≫ NatTrans.app (NatTrans.app E.π k) (op a.Y)\n            | WalkingMulticospan.right b =>\n              (Multifork.ι S (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) b) ≫\n                  NatTrans.app (NatTrans.app E.π k)\n                    (op (MulticospanIndex.fstTo (GrothendieckTopology.Cover.index W (F.obj k).val) b).Y)) ≫\n                MulticospanIndex.fst (GrothendieckTopology.Cover.index W (F.obj k).val) b }\n      i\n[PROOFSTEP]\nchange _ = S.ι i ≫ _\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ (m ≫ NatTrans.app (NatTrans.app E.π k) (op X)) ≫ (F.obj k).val.map i.f.op =\n    Multifork.ι S i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nerw [← hm, Category.assoc, ← (E.π.app k).naturality, Category.assoc]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nW : GrothendieckTopology.Cover J X\nS : Multifork (GrothendieckTopology.Cover.index W E.pt)\nm : S.pt ⟶ (GrothendieckTopology.Cover.multifork W E.pt).pt\nhm :\n  ∀ (i : (GrothendieckTopology.Cover.index W E.pt).L),\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i = Multifork.ι S i\nk : K\ni : GrothendieckTopology.Cover.Arrow W\n⊢ m ≫ (((Functor.const K).obj E.pt).obj k).map i.f.op ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y) =\n    m ≫ Multifork.ι (GrothendieckTopology.Cover.multifork W E.pt) i ≫ NatTrans.app (NatTrans.app E.π k) (op i.Y)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\n⊢ Presheaf.IsSheaf J E.pt\n[PROOFSTEP]\nrw [Presheaf.isSheaf_iff_multifork]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\n⊢ ∀ (X : C) (S : GrothendieckTopology.Cover J X), Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S E.pt))\n[PROOFSTEP]\nintro X S\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nX : C\nS : GrothendieckTopology.Cover J X\n⊢ Nonempty (IsLimit (GrothendieckTopology.Cover.multifork S E.pt))\n[PROOFSTEP]\nexact ⟨isLimitMultiforkOfIsLimit _ _ hE _ _⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nj : K\n⊢ NatTrans.app\n      ((sheafToPresheaf J D).mapCone\n          { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n            π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).π\n      j =\n    (eqToIso\n          (_ :\n            ((sheafToPresheaf J D).mapCone\n                  { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                    π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n              ((sheafToPresheaf J D).mapCone\n                  { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                    π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)).hom ≫\n      NatTrans.app E.π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nj : K\n⊢ NatTrans.app E.π j = 𝟙 E.pt ≫ NatTrans.app E.π j\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nS : Cone F\nj : K\n⊢ (fun S => { val := IsLimit.lift hE ((sheafToPresheaf J D).mapCone S) }) S ≫\n      NatTrans.app\n        {\n              liftedCone :=\n                { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                  π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n              validLift :=\n                Cones.ext\n                  (eqToIso\n                    (_ :\n                      ((sheafToPresheaf J D).mapCone\n                            { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                              π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                        ((sheafToPresheaf J D).mapCone\n                            { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                              π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.π\n        j =\n    NatTrans.app S.π j\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nS : Cone F\nj : K\n⊢ ((fun S => { val := IsLimit.lift hE ((sheafToPresheaf J D).mapCone S) }) S ≫\n        NatTrans.app\n          {\n                liftedCone :=\n                  { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                    π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n                validLift :=\n                  Cones.ext\n                    (eqToIso\n                      (_ :\n                        ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                          ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.π\n          j).val =\n    (NatTrans.app S.π j).val\n[PROOFSTEP]\napply hE.fac ((sheafToPresheaf J D).mapCone S) j\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nS : Cone F\nm :\n  S.pt ⟶\n    {\n          liftedCone :=\n            { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n              π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n          validLift :=\n            Cones.ext\n              (eqToIso\n                (_ :\n                  ((sheafToPresheaf J D).mapCone\n                        { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                          π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                    ((sheafToPresheaf J D).mapCone\n                        { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                          π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.pt\nhm :\n  ∀ (j : K),\n    m ≫\n        NatTrans.app\n          {\n                liftedCone :=\n                  { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                    π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n                validLift :=\n                  Cones.ext\n                    (eqToIso\n                      (_ :\n                        ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                          ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.π\n          j =\n      NatTrans.app S.π j\n⊢ m = (fun S => { val := IsLimit.lift hE ((sheafToPresheaf J D).mapCone S) }) S\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\nK : Type z\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Sheaf J D\nE : Cone (F ⋙ sheafToPresheaf J D)\nhE : IsLimit E\nS : Cone F\nm :\n  S.pt ⟶\n    {\n          liftedCone :=\n            { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n              π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n          validLift :=\n            Cones.ext\n              (eqToIso\n                (_ :\n                  ((sheafToPresheaf J D).mapCone\n                        { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                          π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                    ((sheafToPresheaf J D).mapCone\n                        { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                          π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.pt\nhm :\n  ∀ (j : K),\n    m ≫\n        NatTrans.app\n          {\n                liftedCone :=\n                  { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                    π := NatTrans.mk fun t => { val := NatTrans.app E.π t } },\n                validLift :=\n                  Cones.ext\n                    (eqToIso\n                      (_ :\n                        ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt =\n                          ((sheafToPresheaf J D).mapCone\n                              { pt := { val := E.pt, cond := (_ : Presheaf.IsSheaf J E.pt) },\n                                π := NatTrans.mk fun t => { val := NatTrans.app E.π t } }).pt)) }.liftedCone.π\n          j =\n      NatTrans.app S.π j\n⊢ m.val = ((fun S => { val := IsLimit.lift hE ((sheafToPresheaf J D).mapCone S) }) S).val\n[PROOFSTEP]\nexact hE.uniq ((sheafToPresheaf J D).mapCone S) m.val fun j => congr_arg Hom.val (hm j)\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\ni j : K\nf : i ⟶ j\n⊢ F.map f ≫ (fun k => { val := NatTrans.app E.ι k ≫ GrothendieckTopology.toSheafify J E.pt }) j =\n    (fun k => { val := NatTrans.app E.ι k ≫ GrothendieckTopology.toSheafify J E.pt }) i ≫\n      ((Functor.const K).obj\n            { val := GrothendieckTopology.sheafify J E.pt,\n              cond :=\n                (_ : Presheaf.IsSheaf J (GrothendieckTopology.plusObj J (GrothendieckTopology.plusObj J E.pt))) }).map\n        f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\ni j : K\nf : i ⟶ j\n⊢ (F.map f ≫ (fun k => { val := NatTrans.app E.ι k ≫ GrothendieckTopology.toSheafify J E.pt }) j).val =\n    ((fun k => { val := NatTrans.app E.ι k ≫ GrothendieckTopology.toSheafify J E.pt }) i ≫\n        ((Functor.const K).obj\n              { val := GrothendieckTopology.sheafify J E.pt,\n                cond :=\n                  (_ : Presheaf.IsSheaf J (GrothendieckTopology.plusObj J (GrothendieckTopology.plusObj J E.pt))) }).map\n          f).val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\ni j : K\nf : i ⟶ j\n⊢ (F.map f).val ≫ NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt =\n    (NatTrans.app E.ι i ≫ GrothendieckTopology.toSheafify J E.pt) ≫ 𝟙 (GrothendieckTopology.sheafify J E.pt)\n[PROOFSTEP]\nerw [Category.comp_id, ← Category.assoc, E.w f]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\n⊢ ∀ (s : Cocone F) (j : K),\n    NatTrans.app (sheafifyCocone E).ι j ≫\n        (fun S =>\n            {\n              val :=\n                GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n                  (_ : Presheaf.IsSheaf J S.pt.val) })\n          s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nintro S j\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nj : K\n⊢ NatTrans.app (sheafifyCocone E).ι j ≫\n      (fun S =>\n          {\n            val :=\n              GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n                (_ : Presheaf.IsSheaf J S.pt.val) })\n        S =\n    NatTrans.app S.ι j\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nj : K\n⊢ (NatTrans.app (sheafifyCocone E).ι j ≫\n        (fun S =>\n            {\n              val :=\n                GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n                  (_ : Presheaf.IsSheaf J S.pt.val) })\n          S).val =\n    (NatTrans.app S.ι j).val\n[PROOFSTEP]\ndsimp [sheafifyCocone]\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nj : K\n⊢ (NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt) ≫\n      GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n        (_ : Presheaf.IsSheaf J S.pt.val) =\n    (NatTrans.app S.ι j).val\n[PROOFSTEP]\nerw [Category.assoc, J.toSheafify_sheafifyLift, hE.fac]\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nj : K\n⊢ NatTrans.app ((sheafToPresheaf J D).mapCocone S).ι j = (NatTrans.app S.ι j).val\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\n⊢ ∀ (s : Cocone F) (m : (sheafifyCocone E).pt ⟶ s.pt),\n    (∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app s.ι j) →\n      m =\n        (fun S =>\n            {\n              val :=\n                GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n                  (_ : Presheaf.IsSheaf J S.pt.val) })\n          s\n[PROOFSTEP]\nintro S m hm\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\n⊢ m =\n    (fun S =>\n        {\n          val :=\n            GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n              (_ : Presheaf.IsSheaf J S.pt.val) })\n      S\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\n⊢ m.val =\n    ((fun S =>\n          {\n            val :=\n              GrothendieckTopology.sheafifyLift J (IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S))\n                (_ : Presheaf.IsSheaf J S.pt.val) })\n        S).val\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\n⊢ GrothendieckTopology.toSheafify J E.pt ≫ m.val = IsColimit.desc hE ((sheafToPresheaf J D).mapCocone S)\n[PROOFSTEP]\napply hE.uniq ((sheafToPresheaf J D).mapCocone S)\n[GOAL]\ncase h.a.x\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\n⊢ ∀ (j : K),\n    NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt ≫ m.val =\n      NatTrans.app ((sheafToPresheaf J D).mapCocone S).ι j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h.a.x\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\nj : K\n⊢ NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt ≫ m.val =\n    NatTrans.app ((sheafToPresheaf J D).mapCocone S).ι j\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.a.x\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\nj : K\n⊢ NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt ≫ m.val = (NatTrans.app S.ι j).val\n[PROOFSTEP]\nsimp only [← Category.assoc, ← hm]\n  -- Porting note: was `simpa only [...]`\n[GOAL]\ncase h.a.x\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\nK : Type (max v u)\ninst✝⁶ : SmallCategory K\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF : K ⥤ Sheaf J D\nE : Cocone (F ⋙ sheafToPresheaf J D)\nhE : IsColimit E\nS : Cocone F\nm : (sheafifyCocone E).pt ⟶ S.pt\nhm : ∀ (j : K), NatTrans.app (sheafifyCocone E).ι j ≫ m = NatTrans.app S.ι j\nj : K\n⊢ (NatTrans.app E.ι j ≫ GrothendieckTopology.toSheafify J E.pt) ≫ m.val = (NatTrans.app (sheafifyCocone E).ι j ≫ m).val\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Limits", "llama_tokens": 42002, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6791786861878392, "lm_q2_score": 0.44167300566462553, "lm_q1q2_score": 0.2999748917119344}}
{"text": "[GOAL]\nX Y Z : TopCat\nU : (Opens ↑X)ᵒᵖ\n⊢ (map (𝟙 X)).op.obj U = U\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑Y\n⊢ (map f).obj (iSup U) = iSup ((map f).toPrefunctor.obj ∘ U)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX Y Z : TopCat\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑Y\n⊢ ↑((map f).obj (iSup U)) = ↑(iSup ((map f).toPrefunctor.obj ∘ U))\n[PROOFSTEP]\nrw [iSup_def, iSup_def, map_obj]\n[GOAL]\ncase h\nX Y Z : TopCat\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑Y\n⊢ ↑{ carrier := ↑f ⁻¹' ⋃ (i : ι), ↑(U i), is_open' := (_ : IsOpen (↑f ⁻¹' ⋃ (i : ι), ↑(U i))) } =\n    ↑{ carrier := ⋃ (i : ι), ↑(((map f).toPrefunctor.obj ∘ U) i),\n        is_open' := (_ : IsOpen (⋃ (i : ι), ↑(((map f).toPrefunctor.obj ∘ U) i))) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nX Y Z : TopCat\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑Y\n⊢ ↑f ⁻¹' ⋃ (i : ι), ↑(U i) = ⋃ (i : ι), ↑((map f).obj (U i))\n[PROOFSTEP]\nrw [Set.preimage_iUnion]\n[GOAL]\ncase h\nX Y Z : TopCat\nf : X ⟶ Y\nι : Type u_1\nU : ι → Opens ↑Y\n⊢ ⋃ (i : ι), ↑f ⁻¹' ↑(U i) = ⋃ (i : ι), ↑((map f).obj (U i))\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y Z : TopCat\n⊢ map (𝟙 X) = 𝟭 (Opens ↑X)\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y Z : TopCat\nf g : X ⟶ Y\nh : f = g\nU : Opens ↑Y\n⊢ (map f).obj U = (map g).obj U\n[PROOFSTEP]\nrw [congr_arg map h]\n[GOAL]\nX Y Z : TopCat\nf g : X ⟶ Y\nh : f = g\n⊢ map f = map g\n[PROOFSTEP]\nsubst h\n[GOAL]\nX Y Z : TopCat\nf : X ⟶ Y\n⊢ map f = map f\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y Z : TopCat\nf g : X ⟶ Y\nh : f = g\nU : Opens ↑Y\n⊢ (map f).obj U = (map g).obj U\n[PROOFSTEP]\nrw [h]\n[GOAL]\nX Y Z : TopCat\nf g : X ⟶ Y\nh : f = g\nU : Opens ↑Y\n⊢ (map g).obj U = (map f).obj U\n[PROOFSTEP]\nrw [h]\n[GOAL]\nX✝ Y✝ Z X Y : TopCat\nH : X ≅ Y\nU : Opens ↑Y\n⊢ (𝟭 (Opens ↑Y)).obj U = (map H.hom ⋙ map H.inv).obj U\n[PROOFSTEP]\nsimp [map, Set.preimage_preimage]\n[GOAL]\nX✝ Y✝ Z X Y : TopCat\nH : X ≅ Y\nU : Opens ↑X\n⊢ (map H.inv ⋙ map H.hom).obj U = (𝟭 (Opens ↑X)).obj U\n[PROOFSTEP]\nsimp [map, Set.preimage_preimage]\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nH : Mono f\nX✝ Y✝ : Opens ↑X\ni : (functor hf).obj X✝ ⟶ (functor hf).obj Y✝\nx : ↑X\nhx : x ∈ ↑X✝\n⊢ x ∈ ↑Y✝\n[PROOFSTEP]\nobtain ⟨y, hy, eq⟩ := i.le ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nH : Mono f\nX✝ Y✝ : Opens ↑X\ni : (functor hf).obj X✝ ⟶ (functor hf).obj Y✝\nx : ↑X\nhx : x ∈ ↑X✝\ny : (forget TopCat).obj X\nhy : y ∈ ↑Y✝\neq : ↑f y = ↑f x\n⊢ x ∈ ↑Y✝\n[PROOFSTEP]\nexact (TopCat.mono_iff_injective f).mp H eq ▸ hy\n[GOAL]\nX : TopCat\nU : Opens ↑X\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj ⊤ = U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : TopCat\nU : Opens ↑X\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj ⊤) = ↑U\n[PROOFSTEP]\nexact Set.image_univ.trans Subtype.range_coe\n[GOAL]\nX : TopCat\nU : Opens ↑X\n⊢ (map (inclusion U)).obj U = ⊤\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : TopCat\nU : Opens ↑X\n⊢ ↑((map (inclusion U)).obj U) = ↑⊤\n[PROOFSTEP]\nexact Subtype.coe_preimage_self _\n[GOAL]\nX : TopCat\nU : Opens ↑X\n⊢ (map (inclusion U) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj U = (𝟭 (Opens ↑X)).obj U\n[PROOFSTEP]\nsimp\n[GOAL]\nX : TopCat\n⊢ IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤)) = map (inclusionTopIso X).inv\n[PROOFSTEP]\nrefine' CategoryTheory.Functor.ext _ _\n[GOAL]\ncase refine'_1\nX : TopCat\n⊢ ∀ (X_1 : Opens ↑((toTopCat X).obj ⊤)),\n    (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj X_1 = (map (inclusionTopIso X).inv).obj X_1\n[PROOFSTEP]\nintro U\n[GOAL]\ncase refine'_1\nX : TopCat\nU : Opens ↑((toTopCat X).obj ⊤)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj U = (map (inclusionTopIso X).inv).obj U\n[PROOFSTEP]\next x\n[GOAL]\ncase refine'_1.h.h\nX : TopCat\nU : Opens ↑((toTopCat X).obj ⊤)\nx : ↑X\n⊢ x ∈ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj U) ↔ x ∈ ↑((map (inclusionTopIso X).inv).obj U)\n[PROOFSTEP]\nexact ⟨fun ⟨⟨_, _⟩, h, rfl⟩ => h, fun h => ⟨⟨x, trivial⟩, h, rfl⟩⟩\n[GOAL]\ncase refine'_2\nX : TopCat\n⊢ ∀ (X_1 Y : Opens ↑((toTopCat X).obj ⊤)) (f : X_1 ⟶ Y),\n    (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).map f =\n      eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj X_1 = (map (inclusionTopIso X).inv).obj X_1) ≫\n        (map (inclusionTopIso X).inv).map f ≫\n          eqToHom (_ : (map (inclusionTopIso X).inv).obj Y = (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj Y)\n[PROOFSTEP]\nintros U V f\n[GOAL]\ncase refine'_2\nX : TopCat\nU V : Opens ↑((toTopCat X).obj ⊤)\nf : U ⟶ V\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).map f =\n    eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj U = (map (inclusionTopIso X).inv).obj U) ≫\n      (map (inclusionTopIso X).inv).map f ≫\n        eqToHom (_ : (map (inclusionTopIso X).inv).obj V = (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion ⊤))).obj V)\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\n⊢ (IsOpenMap.functor hf).obj ((map f).obj U) = (IsOpenMap.functor hf).obj ⊤ ⊓ U\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\nx✝ : ↑Y\n⊢ x✝ ∈ ↑((IsOpenMap.functor hf).obj ((map f).obj U)) ↔ x✝ ∈ ↑((IsOpenMap.functor hf).obj ⊤ ⊓ U)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\nx✝ : ↑Y\n⊢ x✝ ∈ ↑((IsOpenMap.functor hf).obj ((map f).obj U)) → x✝ ∈ ↑((IsOpenMap.functor hf).obj ⊤ ⊓ U)\n[PROOFSTEP]\nrintro ⟨x, hx, rfl⟩\n[GOAL]\ncase h.h.mp.intro.intro\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\nx : (forget TopCat).obj X\nhx : x ∈ ↑((map f).obj U)\n⊢ ↑f x ∈ ↑((IsOpenMap.functor hf).obj ⊤ ⊓ U)\n[PROOFSTEP]\nexact ⟨⟨x, trivial, rfl⟩, hx⟩\n[GOAL]\ncase h.h.mpr\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\nx✝ : ↑Y\n⊢ x✝ ∈ ↑((IsOpenMap.functor hf).obj ⊤ ⊓ U) → x✝ ∈ ↑((IsOpenMap.functor hf).obj ((map f).obj U))\n[PROOFSTEP]\nrintro ⟨⟨x, -, rfl⟩, hx⟩\n[GOAL]\ncase h.h.mpr.intro.intro.intro\nX Y : TopCat\nf : X ⟶ Y\nhf : IsOpenMap ↑f\nU : Opens ↑Y\nx : (forget TopCat).obj X\nhx : ↑f x ∈ ↑U\n⊢ ↑f x ∈ ↑((IsOpenMap.functor hf).obj ((map f).obj U))\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nX : TopCat\nU : Opens ↑X\n⊢ Set.range ((forget TopCat).map (inclusion U)) = ↑U\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nX : TopCat\nU : Opens ↑X\nx : (forget TopCat).obj X\n⊢ x ∈ Set.range ((forget TopCat).map (inclusion U)) ↔ x ∈ ↑U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nX : TopCat\nU : Opens ↑X\nx : (forget TopCat).obj X\n⊢ x ∈ Set.range ((forget TopCat).map (inclusion U)) → x ∈ ↑U\n[PROOFSTEP]\nrintro ⟨x, rfl⟩\n[GOAL]\ncase h.mp.intro\nX : TopCat\nU : Opens ↑X\nx : (forget TopCat).obj ((toTopCat X).obj U)\n⊢ (forget TopCat).map (inclusion U) x ∈ ↑U\n[PROOFSTEP]\nexact x.2\n[GOAL]\ncase h.mpr\nX : TopCat\nU : Opens ↑X\nx : (forget TopCat).obj X\n⊢ x ∈ ↑U → x ∈ Set.range ((forget TopCat).map (inclusion U))\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nX : TopCat\nU : Opens ↑X\nx : (forget TopCat).obj X\nh : x ∈ ↑U\n⊢ x ∈ Set.range ((forget TopCat).map (inclusion U))\n[PROOFSTEP]\nexact ⟨⟨x, h⟩, rfl⟩\n[GOAL]\nX : TopCat\nU V : Opens ↑X\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj ((map (inclusion U)).obj V) = V ⊓ U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX : TopCat\nU V : Opens ↑X\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj ((map (inclusion U)).obj V)) = ↑(V ⊓ U)\n[PROOFSTEP]\nrefine' Set.image_preimage_eq_inter_range.trans _\n[GOAL]\ncase h\nX : TopCat\nU V : Opens ↑X\n⊢ (V.1 ∩ Set.range fun x => ↑(inclusion U) x) = ↑(V ⊓ U)\n[PROOFSTEP]\nerw [set_range_forget_map_inclusion U]\n[GOAL]\ncase h\nX : TopCat\nU V : Opens ↑X\n⊢ V.1 ∩ ↑U = ↑(V ⊓ U)\n[PROOFSTEP]\nrfl\n[GOAL]\nX : TopCat\nU : Opens ↑X\nV : Opens { x // x ∈ U }\n⊢ (map (inclusion U) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V) =\n    (𝟭 (Opens ↑X)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V)\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : TopCat\nU : Opens ↑X\nV : Opens { x // x ∈ U }\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj\n      ((map (inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V)) =\n    (IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V\n[PROOFSTEP]\nrw [map_functor_eq V]\n[GOAL]\nX : TopCat\nU : Opens ↑X\nV : Opens { x // x ∈ U }\n⊢ NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(inclusion U))).counit\n      ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V) =\n    eqToHom\n      (_ :\n        (map (inclusion U) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V) =\n          (𝟭 (Opens ↑X)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(inclusion U))).obj V))\n[PROOFSTEP]\napply Subsingleton.elim\n", "meta": {"mathlib_filename": "Mathlib.Topology.Category.TopCat.Opens", "llama_tokens": 4438, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6187804478040616, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.2997249254562815}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : PreservesFiniteLimits G\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\n⊢ HasKernel f\n[PROOFSTEP]\nhave := NatIso.naturality_1 i f\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : PreservesFiniteLimits G\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis : NatTrans.app i.inv X✝ ≫ (F ⋙ G).map f ≫ NatTrans.app i.hom Y✝ = (𝟭 C).map f\n⊢ HasKernel f\n[PROOFSTEP]\nsimp at this \n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : PreservesFiniteLimits G\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\n⊢ HasKernel f\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : PreservesFiniteLimits G\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\n⊢ HasKernel (NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n[PROOFSTEP]\nhaveI : HasKernel (G.map (F.map f) ≫ i.hom.app _) := Limits.hasKernel_comp_mono _ _\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : PreservesFiniteLimits G\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis✝ : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\nthis : HasKernel (G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n⊢ HasKernel (NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n[PROOFSTEP]\napply Limits.hasKernel_iso_comp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\n⊢ HasCokernel f\n[PROOFSTEP]\nhave : PreservesColimits G := adj.leftAdjointPreservesColimits\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis : PreservesColimits G\n⊢ HasCokernel f\n[PROOFSTEP]\nhave := NatIso.naturality_1 i f\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis✝ : PreservesColimits G\nthis : NatTrans.app i.inv X✝ ≫ (F ⋙ G).map f ≫ NatTrans.app i.hom Y✝ = (𝟭 C).map f\n⊢ HasCokernel f\n[PROOFSTEP]\nsimp at this \n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis✝ : PreservesColimits G\nthis : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\n⊢ HasCokernel f\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis✝ : PreservesColimits G\nthis : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\n⊢ HasCokernel (NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n[PROOFSTEP]\nhaveI : HasCokernel (G.map (F.map f) ≫ i.hom.app _) := Limits.hasCokernel_comp_iso _ _\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v, u₁} C\ninst✝³ : Preadditive C\nD : Type u₂\ninst✝² : Category.{v, u₂} D\ninst✝¹ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nX✝ Y✝ : C\nf : X✝ ⟶ Y✝\nthis✝¹ : PreservesColimits G\nthis✝ : NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝ = f\nthis : HasCokernel (G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n⊢ HasCokernel (NatTrans.app i.inv X✝ ≫ G.map (F.map f) ≫ NatTrans.app i.hom Y✝)\n[PROOFSTEP]\napply Limits.hasCokernel_epi_comp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : HasCokernels C\nX Y : C\nf : X ⟶ Y\n⊢ G.obj (cokernel (F.map f)) ≅ cokernel f\n[PROOFSTEP]\nhave : PreservesColimits G := adj.leftAdjointPreservesColimits\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : HasCokernels C\nX Y : C\nf : X ⟶ Y\nthis : PreservesColimits G\n⊢ G.obj (cokernel (F.map f)) ≅ cokernel f\n[PROOFSTEP]\nhave : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v, u₁} C\ninst✝⁴ : Preadditive C\nD : Type u₂\ninst✝³ : Category.{v, u₂} D\ninst✝² : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝ : HasCokernels C\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesColimits G\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ G.obj (cokernel (F.map f)) ≅ cokernel f\n[PROOFSTEP]\ncalc\n  G.obj (cokernel (F.map f)) ≅ cokernel (G.map (F.map f)) := (asIso (cokernelComparison _ G)).symm\n  _ ≅ cokernel (i.hom.app X ≫ f ≫ i.inv.app Y) := (cokernelIsoOfEq (NatIso.naturality_2 i f).symm)\n  _ ≅ cokernel (f ≫ i.inv.app Y) := (cokernelEpiComp (i.hom.app X) (f ≫ i.inv.app Y))\n  _ ≅ cokernel f := cokernelCompIsIso f (i.inv.app Y)\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\nD : Type u₂\ninst✝⁵ : Category.{v, u₂} D\ninst✝⁴ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝³ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels C\ninst✝ : PreservesFiniteLimits G\nX Y : C\nf : X ⟶ Y\n⊢ kernel (G.map (cokernel.π (F.map f))) ≅ kernel (cokernel.π f)\n[PROOFSTEP]\nhave : PreservesColimits G := adj.leftAdjointPreservesColimits\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\nD : Type u₂\ninst✝⁵ : Category.{v, u₂} D\ninst✝⁴ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝³ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels C\ninst✝ : PreservesFiniteLimits G\nX Y : C\nf : X ⟶ Y\nthis : PreservesColimits G\n⊢ kernel (G.map (cokernel.π (F.map f))) ≅ kernel (cokernel.π f)\n[PROOFSTEP]\nhave : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\nD : Type u₂\ninst✝⁵ : Category.{v, u₂} D\ninst✝⁴ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝³ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels C\ninst✝ : PreservesFiniteLimits G\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesColimits G\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ kernel (G.map (cokernel.π (F.map f))) ≅ kernel (cokernel.π f)\n[PROOFSTEP]\ncalc\n  kernel (G.map (cokernel.π (F.map f))) ≅ kernel (cokernel.π (G.map (F.map f)) ≫ cokernelComparison (F.map f) G) :=\n    kernelIsoOfEq (π_comp_cokernelComparison _ _).symm\n  _ ≅ kernel (cokernel.π (G.map (F.map f))) := (kernelCompMono _ _)\n  _ ≅ kernel (cokernel.π (_ ≫ f ≫ _) ≫ (cokernelIsoOfEq _).hom) :=\n    (kernelIsoOfEq (π_comp_cokernelIsoOfEq_hom (NatIso.naturality_2 i f)).symm)\n  _ ≅ kernel (cokernel.π (_ ≫ f ≫ _)) := (kernelCompMono _ _)\n  _ ≅ kernel (cokernel.π (f ≫ i.inv.app Y) ≫ (cokernelEpiComp (i.hom.app X) _).inv) :=\n    (kernelIsoOfEq (by simp only [cokernel.π_desc, cokernelEpiComp_inv]))\n  _ ≅ kernel (cokernel.π (f ≫ _)) := (kernelCompMono _ _)\n  _ ≅ kernel (inv (i.inv.app Y) ≫ cokernel.π f ≫ (cokernelCompIsIso f (i.inv.app Y)).inv) :=\n    (kernelIsoOfEq\n      (by simp only [cokernel.π_desc, cokernelCompIsIso_inv, Iso.hom_inv_id_app_assoc, NatIso.inv_inv_app]))\n  _ ≅ kernel (cokernel.π f ≫ _) := (kernelIsIsoComp _ _)\n  _ ≅ kernel (cokernel.π f) := kernelCompMono _ _\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\nD : Type u₂\ninst✝⁵ : Category.{v, u₂} D\ninst✝⁴ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝³ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels C\ninst✝ : PreservesFiniteLimits G\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesColimits G\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n    cokernel.π (f ≫ NatTrans.app i.inv Y) ≫ (cokernelEpiComp (NatTrans.app i.hom X) (f ≫ NatTrans.app i.inv Y)).inv\n[PROOFSTEP]\nsimp only [cokernel.π_desc, cokernelEpiComp_inv]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\nD : Type u₂\ninst✝⁵ : Category.{v, u₂} D\ninst✝⁴ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝³ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝² : HasCokernels C\ninst✝¹ : HasKernels C\ninst✝ : PreservesFiniteLimits G\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesColimits G\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ cokernel.π (f ≫ NatTrans.app i.inv Y) =\n    inv (NatTrans.app i.inv Y) ≫ cokernel.π f ≫ (cokernelCompIsIso f (NatTrans.app i.inv Y)).inv\n[PROOFSTEP]\nsimp only [cokernel.π_desc, cokernelCompIsIso_inv, Iso.hom_inv_id_app_assoc, NatIso.inv_inv_app]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\n⊢ Abelian.coimage f ≅ Abelian.image f\n[PROOFSTEP]\nhave : PreservesLimits F := adj.rightAdjointPreservesLimits\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis : PreservesLimits F\n⊢ Abelian.coimage f ≅ Abelian.image f\n[PROOFSTEP]\nhaveI : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesLimits F\nthis : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ Abelian.coimage f ≅ Abelian.image f\n[PROOFSTEP]\ncalc\n  Abelian.coimage f ≅ cokernel (kernel.ι f) := Iso.refl _\n  _ ≅ G.obj (cokernel (F.map (kernel.ι f))) := (cokernelIso _ _ i adj _).symm\n  _ ≅ G.obj (cokernel (kernelComparison f F ≫ kernel.ι (F.map f))) := (G.mapIso (cokernelIsoOfEq (by simp)))\n  _ ≅ G.obj (cokernel (kernel.ι (F.map f))) := (G.mapIso (cokernelEpiComp _ _))\n  _ ≅ G.obj (Abelian.coimage (F.map f)) := (Iso.refl _)\n  _ ≅ G.obj (Abelian.image (F.map f)) := (G.mapIso (Abelian.coimageIsoImage _))\n  _ ≅ G.obj (kernel (cokernel.π (F.map f))) := (Iso.refl _)\n  _ ≅ kernel (G.map (cokernel.π (F.map f))) := (PreservesKernel.iso _ _)\n  _ ≅ kernel (cokernel.π f) := (coimageIsoImageAux F G i adj f)\n  _ ≅ Abelian.image f := Iso.refl _\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝ : PreservesLimits F\nthis : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ F.map (kernel.ι f) = kernelComparison f F ≫ kernel.ι (F.map f)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\n⊢ (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f\n[PROOFSTEP]\nhave : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f\n[PROOFSTEP]\nhave : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasKernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝ : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\nthis : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasKernel f'\n⊢ (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f\n[PROOFSTEP]\nhave : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝¹ : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\nthis✝ : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasKernel f'\nthis : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f'\n⊢ (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f\n[PROOFSTEP]\nhave : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasKernel f' := inferInstance\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝² : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\nthis✝¹ : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasKernel f'\nthis✝ : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f'\nthis : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasKernel f'\n⊢ (coimageIsoImage F G i adj f).hom = Abelian.coimageImageComparison f\n[PROOFSTEP]\ndsimp only [coimageIsoImage, Iso.instTransIso_trans, Iso.refl, Iso.trans, Iso.symm, Functor.mapIso, cokernelEpiComp,\n  cokernelIso, cokernelCompIsIso_inv, asIso, coimageIsoImageAux, kernelCompMono]\n[GOAL]\nC : Type u₁\ninst✝⁸ : Category.{v, u₁} C\ninst✝⁷ : Preadditive C\nD : Type u₂\ninst✝⁶ : Category.{v, u₂} D\ninst✝⁵ : Abelian D\nF : C ⥤ D\nG : D ⥤ C\ninst✝⁴ : Functor.PreservesZeroMorphisms G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\ninst✝³ : HasCokernels C\ninst✝² : HasKernels C\ninst✝¹ : PreservesFiniteLimits G\ninst✝ : Functor.PreservesZeroMorphisms F\nX Y : C\nf : X ⟶ Y\nthis✝² : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasCokernel f'\nthis✝¹ : ∀ (X' Y' : C) (f' : X' ⟶ Y'), HasKernel f'\nthis✝ : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasCokernel f'\nthis : ∀ (X' Y' : D) (f' : X' ⟶ Y'), HasKernel f'\n⊢ ((((((((𝟙 (Abelian.coimage f) ≫\n                      cokernel.desc (kernel.ι f) (NatTrans.app i.inv X ≫ cokernel.π (kernel.ι f ≫ NatTrans.app i.inv X))\n                          (_ : kernel.ι f ≫ NatTrans.app i.inv X ≫ cokernel.π (kernel.ι f ≫ NatTrans.app i.inv X) = 0) ≫\n                        cokernel.desc (kernel.ι f ≫ NatTrans.app i.inv X)\n                            (cokernel.π (NatTrans.app i.hom (kernel f) ≫ kernel.ι f ≫ NatTrans.app i.inv X))\n                            (_ :\n                              (kernel.ι f ≫ NatTrans.app i.inv X) ≫\n                                  cokernel.π (NatTrans.app i.hom (kernel f) ≫ kernel.ι f ≫ NatTrans.app i.inv X) =\n                                0) ≫\n                          (cokernelIsoOfEq\n                                (_ :\n                                  (F ⋙ G).map (kernel.ι f) =\n                                    NatTrans.app i.hom (kernel f) ≫\n                                      (𝟭 C).map (kernel.ι f) ≫ NatTrans.app i.inv X)).inv ≫\n                            cokernelComparison (F.map (kernel.ι f)) G) ≫\n                    G.map (cokernelIsoOfEq (_ : F.map (kernel.ι f) = kernelComparison f F ≫ kernel.ι (F.map f))).hom) ≫\n                  G.map\n                    (cokernel.desc (kernelComparison f F ≫ kernel.ι (F.map f)) (cokernel.π (kernel.ι (F.map f)))\n                      (_ : (kernelComparison f F ≫ kernel.ι (F.map f)) ≫ cokernel.π (kernel.ι (F.map f)) = 0))) ≫\n                𝟙 (G.obj (cokernel (kernel.ι (F.map f))))) ≫\n              G.map (Abelian.coimageIsoImage (F.map f)).hom) ≫\n            𝟙 (G.obj (Abelian.image (F.map f)))) ≫\n          (PreservesKernel.iso G (cokernel.π (F.map f))).hom) ≫\n        ((((((((kernelIsoOfEq\n                            (_ :\n                              G.map (cokernel.π (F.map f)) =\n                                cokernel.π (G.map (F.map f)) ≫ cokernelComparison (F.map f) G)).hom ≫\n                        kernel.lift (cokernel.π (G.map (F.map f)))\n                          (kernel.ι (cokernel.π (G.map (F.map f)) ≫ cokernelComparison (F.map f) G))\n                          (_ :\n                            kernel.ι (cokernel.π (G.map (F.map f)) ≫ cokernelComparison (F.map f) G) ≫\n                                cokernel.π (G.map (F.map f)) =\n                              0)) ≫\n                      (kernelIsoOfEq\n                          (_ :\n                            cokernel.π ((F ⋙ G).map f) =\n                              cokernel.π (NatTrans.app i.hom X ≫ (𝟭 C).map f ≫ NatTrans.app i.inv Y) ≫\n                                (cokernelIsoOfEq\n                                    (_ :\n                                      NatTrans.app i.hom X ≫ (𝟭 C).map f ≫ NatTrans.app i.inv Y =\n                                        (F ⋙ G).map f)).hom)).hom) ≫\n                    kernel.lift (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y))\n                      (kernel.ι\n                        (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) ≫\n                          (cokernelIsoOfEq\n                              (_ : NatTrans.app i.hom X ≫ (𝟭 C).map f ≫ NatTrans.app i.inv Y = (F ⋙ G).map f)).hom))\n                      (_ :\n                        kernel.ι\n                              (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) ≫\n                                (cokernelIsoOfEq\n                                    (_ :\n                                      NatTrans.app i.hom X ≫ (𝟭 C).map f ≫ NatTrans.app i.inv Y = (F ⋙ G).map f)).hom) ≫\n                            cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n                          0)) ≫\n                  (kernelIsoOfEq\n                      (_ :\n                        cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n                          cokernel.π (f ≫ NatTrans.app i.inv Y) ≫\n                            cokernel.desc (f ≫ NatTrans.app i.inv Y)\n                              (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y))\n                              (_ :\n                                (f ≫ NatTrans.app i.inv Y) ≫\n                                    cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n                                  0))).hom) ≫\n                kernel.lift (cokernel.π (f ≫ NatTrans.app i.inv Y))\n                  (kernel.ι\n                    (cokernel.π (f ≫ NatTrans.app i.inv Y) ≫\n                      cokernel.desc (f ≫ NatTrans.app i.inv Y)\n                        (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y))\n                        (_ :\n                          (f ≫ NatTrans.app i.inv Y) ≫ cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n                            0)))\n                  (_ :\n                    kernel.ι\n                          (cokernel.π (f ≫ NatTrans.app i.inv Y) ≫\n                            cokernel.desc (f ≫ NatTrans.app i.inv Y)\n                              (cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y))\n                              (_ :\n                                (f ≫ NatTrans.app i.inv Y) ≫\n                                    cokernel.π (NatTrans.app i.hom X ≫ f ≫ NatTrans.app i.inv Y) =\n                                  0)) ≫\n                        cokernel.π (f ≫ NatTrans.app i.inv Y) =\n                      0)) ≫\n              (kernelIsoOfEq\n                  (_ :\n                    cokernel.π (f ≫ NatTrans.app i.inv Y) =\n                      inv (NatTrans.app i.inv Y) ≫\n                        cokernel.π f ≫\n                          cokernel.desc f (NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y))\n                            (_ : f ≫ NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y) = 0))).hom) ≫\n            (kernelIsIsoComp (inv (NatTrans.app i.inv Y))\n                (cokernel.π f ≫\n                  cokernel.desc f (NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y))\n                    (_ : f ≫ NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y) = 0))).hom) ≫\n          kernel.lift (cokernel.π f)\n            (kernel.ι\n              (cokernel.π f ≫\n                cokernel.desc f (NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y))\n                  (_ : f ≫ NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y) = 0)))\n            (_ :\n              kernel.ι\n                    (cokernel.π f ≫\n                      cokernel.desc f (NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y))\n                        (_ : f ≫ NatTrans.app i.inv Y ≫ cokernel.π (f ≫ NatTrans.app i.inv Y) = 0)) ≫\n                  cokernel.π f =\n                0)) ≫\n      𝟙 (kernel (cokernel.π f)) =\n    Abelian.coimageImageComparison f\n[PROOFSTEP]\nsimpa only [← cancel_mono (Abelian.image.ι f), ← cancel_epi (Abelian.coimage.π f), Category.assoc, Category.id_comp,\n  cokernel.π_desc_assoc, π_comp_cokernelIsoOfEq_inv_assoc, PreservesKernel.iso_hom, π_comp_cokernelComparison_assoc, ←\n  G.map_comp_assoc, kernel.lift_ι, Abelian.coimage_image_factorisation, lift_comp_kernelIsoOfEq_hom_assoc,\n  kernelIsIsoComp_hom, kernel.lift_ι_assoc, kernelIsoOfEq_hom_comp_ι_assoc, kernelComparison_comp_ι_assoc,\n  π_comp_cokernelIsoOfEq_hom_assoc, asIso_hom, NatIso.inv_inv_app] using NatIso.naturality_1 i f\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\n⊢ Abelian C\n[PROOFSTEP]\nhaveI := hasKernels F G i\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis : HasKernels C\n⊢ Abelian C\n[PROOFSTEP]\nhaveI := hasCokernels F G i adj\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis✝ : HasKernels C\nthis : HasCokernels C\n⊢ Abelian C\n[PROOFSTEP]\nhave : ∀ {X Y : C} (f : X ⟶ Y), IsIso (Abelian.coimageImageComparison f) :=\n  by\n  intro X Y f\n  rw [← coimageIsoImage_hom F G i adj f]\n  infer_instance\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis✝ : HasKernels C\nthis : HasCokernels C\n⊢ ∀ {X Y : C} (f : X ⟶ Y), IsIso (Abelian.coimageImageComparison f)\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis✝ : HasKernels C\nthis : HasCokernels C\nX Y : C\nf : X ⟶ Y\n⊢ IsIso (Abelian.coimageImageComparison f)\n[PROOFSTEP]\nrw [← coimageIsoImage_hom F G i adj f]\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis✝ : HasKernels C\nthis : HasCokernels C\nX Y : C\nf : X ⟶ Y\n⊢ IsIso (coimageIsoImage F G i adj f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁷ : Category.{v, u₁} C\ninst✝⁶ : Preadditive C\ninst✝⁵ : HasFiniteProducts C\nD : Type u₂\ninst✝⁴ : Category.{v, u₂} D\ninst✝³ : Abelian D\nF : C ⥤ D\ninst✝² : Functor.PreservesZeroMorphisms F\nG : D ⥤ C\ninst✝¹ : Functor.PreservesZeroMorphisms G\ninst✝ : PreservesFiniteLimits G\ni : F ⋙ G ≅ 𝟭 C\nadj : G ⊣ F\nthis✝¹ : HasKernels C\nthis✝ : HasCokernels C\nthis : ∀ {X Y : C} (f : X ⟶ Y), IsIso (Abelian.coimageImageComparison f)\n⊢ Abelian C\n[PROOFSTEP]\napply Abelian.ofCoimageImageComparisonIsIso\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Abelian.Transfer", "llama_tokens": 13010, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6039318479832804, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.29960686320547475}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\nx y : α\ne : encode x = encode y\n⊢ some x = some y\n[PROOFSTEP]\nrw [← encodek, e, encodek]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nx : α\n⊢ (fun n => iget (decode n)) (encode x) = x\n[PROOFSTEP]\nsimp_rw [Encodable.encodek]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\nf : β → α\nfinv : α → Option β\nlinv : ∀ (b : β), finv (f b) = some b\nb : β\n⊢ (fun n => Option.bind (decode n) finv) ((fun b => encode (f b)) b) = some b\n[PROOFSTEP]\nsimp [Encodable.encodek, linv]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\ninst✝ : Encodable α\ne : β ≃ α\nn : ℕ\n⊢ Option.bind (decode n) (some ∘ ↑e.symm) = Option.map (↑e.symm) (decode n)\n[PROOFSTEP]\nrw [Option.map_eq_bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nx✝ : PUnit\n⊢ (fun n => Nat.casesOn n (some PUnit.unit) fun x => none) ((fun x => 0) x✝) = some x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nh : Encodable α\no : Option α\n⊢ (fun n => Nat.casesOn n (some none) fun m => Option.map some (decode m))\n      ((fun o => Option.casesOn o zero fun a => succ (encode a)) o) =\n    some o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nh : Encodable α\n⊢ (fun n => Nat.casesOn n (some none) fun m => Option.map some (decode m))\n      ((fun o => Option.casesOn o zero fun a => succ (encode a)) none) =\n    some none\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nh : Encodable α\nval✝ : α\n⊢ (fun n => Nat.casesOn n (some none) fun m => Option.map some (decode m))\n      ((fun o => Option.casesOn o zero fun a => succ (encode a)) (some val✝)) =\n    some (some val✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nh : Encodable α\nval✝ : α\n⊢ Option.map some (decode (encode val✝)) = some (some val✝)\n[PROOFSTEP]\nsimp [encodek, Nat.succ_ne_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\nn : ℕ\na : α\n⊢ a ∈ decode₂ α n ↔ a ∈ decode n ∧ encode a = n\n[PROOFSTEP]\nsimp [decode₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\nn : ℕ\na : α\n⊢ (∃ a_1, decode n = some a_1 ∧ a_1 = a ∧ encode a_1 = n) ↔ decode n = some a ∧ encode a = n\n[PROOFSTEP]\nexact ⟨fun ⟨_, h₁, rfl, h₂⟩ => ⟨h₁, h₂⟩, fun ⟨h₁, h₂⟩ => ⟨_, h₁, rfl, h₂⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\na : α\n⊢ decode₂ α (encode a) = some a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\na a✝ : α\n⊢ a✝ ∈ decode₂ α (encode a) ↔ a✝ ∈ some a\n[PROOFSTEP]\nsimp [mem_decode₂, eq_comm, decode₂_eq_some]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : Encodable α\nn : ℕ\n⊢ decode₂ α n ≠ none ↔ n ∈ Set.range encode\n[PROOFSTEP]\nsimp_rw [Set.range, Set.mem_setOf_eq, Ne.def, Option.eq_none_iff_forall_not_mem, Encodable.mem_decode₂, not_forall,\n  not_not]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx : ℕ\nh : isSome (decode₂ α x) = true\n⊢ encode (Option.get (decode₂ α x) h) = x\n[PROOFSTEP]\nrw [← decode₂_is_partial_inv (Option.get _ h), Option.some_get]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx : ℕ\nx✝ : (fun x => x ∈ Set.range encode) x\nn : α\nhn : encode n = x\n⊢ isSome (decode₂ α x) = true\n[PROOFSTEP]\nrw [← hn, encodek₂]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx : ℕ\nx✝ : (fun x => x ∈ Set.range encode) x\nn : α\nhn : encode n = x\n⊢ isSome (some n) = true\n[PROOFSTEP]\nexact rfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nn : ↑(Set.range encode)\n⊢ isSome (decode₂ α ↑n) = true\n[PROOFSTEP]\ncases' n.2 with x hx\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nn : ↑(Set.range encode)\nx : α\nhx : encode x = ↑n\n⊢ isSome (decode₂ α ↑n) = true\n[PROOFSTEP]\nrw [← hx, encodek₂]\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nn : ↑(Set.range encode)\nx : α\nhx : encode x = ↑n\n⊢ isSome (some x) = true\n[PROOFSTEP]\nexact rfl\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\na : α\n⊢ (fun n => Option.get (decode₂ α ↑n) (_ : isSome (decode₂ α ↑n) = true))\n      ((fun a => { val := encode a, property := (_ : encode a ∈ Set.range encode) }) a) =\n    a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\na : α\n⊢ Option.get (decode₂ α (encode a)) (_ : isSome (decode₂ α (encode a)) = true) = a\n[PROOFSTEP]\nrw [← Option.some_inj, Option.some_get, encodek₂]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n⊢ (fun a => { val := encode a, property := (_ : encode a ∈ Set.range encode) })\n      ((fun n => Option.get (decode₂ α ↑n) (_ : isSome (decode₂ α ↑n) = true))\n        { val := n, property := (_ : ∃ y, encode y = n) }) =\n    { val := n, property := (_ : ∃ y, encode y = n) }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n⊢ ↑((fun a => { val := encode a, property := (_ : encode a ∈ Set.range encode) })\n        ((fun n => Option.get (decode₂ α ↑n) (_ : isSome (decode₂ α ↑n) = true))\n          { val := n, property := (_ : ∃ y, encode y = n) })) =\n    ↑{ val := n, property := (_ : ∃ y, encode y = n) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n⊢ encode (Option.get (decode₂ α n) (_ : isSome (decode₂ α n) = true)) = n\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← hx]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n| encode (Option.get (decode₂ α n) (_ : isSome (decode₂ α n) = true)) = n\n[PROOFSTEP]\n  rhs\n  rw [← hx]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n| encode (Option.get (decode₂ α n) (_ : isSome (decode₂ α n) = true)) = n\n[PROOFSTEP]\n  rhs\n  rw [← hx]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n| encode (Option.get (decode₂ α n) (_ : isSome (decode₂ α n) = true)) = n\n[PROOFSTEP]\nrhs\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n| n\n[PROOFSTEP]\nrw [← hx]\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝ : Encodable α\nx✝ : ↑(Set.range encode)\nn : ℕ\nx : α\nhx : encode x = n\n⊢ encode (Option.get (decode₂ α n) (_ : isSome (decode₂ α n) = true)) = encode x\n[PROOFSTEP]\nrw [encode_injective.eq_iff, ← Option.some_inj, Option.some_get, ← hx, encodek₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ns : α ⊕ β\n⊢ decodeSum (encodeSum s) = some s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\nval✝ : α\n⊢ decodeSum (encodeSum (Sum.inl val✝)) = some (Sum.inl val✝)\n[PROOFSTEP]\nsimp [encodeSum, div2_val, decodeSum, encodek]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\nval✝ : β\n⊢ decodeSum (encodeSum (Sum.inr val✝)) = some (Sum.inr val✝)\n[PROOFSTEP]\nsimp [encodeSum, div2_val, decodeSum, encodek]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\n⊢ decode n = none\n[PROOFSTEP]\nsuffices decodeSum n = none by\n  change (decodeSum n).bind _ = none\n  rw [this]\n  rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : decodeSum n = none\n⊢ decode n = none\n[PROOFSTEP]\nchange (decodeSum n).bind _ = none\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : decodeSum n = none\n⊢ Option.bind (decodeSum n) (some ∘ ↑Equiv.boolEquivPUnitSumPUnit.symm) = none\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : decodeSum n = none\n⊢ Option.bind none (some ∘ ↑Equiv.boolEquivPUnitSumPUnit.symm) = none\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\n⊢ decodeSum n = none\n[PROOFSTEP]\nhave : 1 ≤ n / 2 := by\n  rw [Nat.le_div_iff_mul_le]\n  exacts [h, by decide]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\n⊢ 1 ≤ n / 2\n[PROOFSTEP]\nrw [Nat.le_div_iff_mul_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\n⊢ 1 * 2 ≤ n\nα : Type u_1 β : Type u_2 n : ℕ h : 2 ≤ n ⊢ 0 < 2\n[PROOFSTEP]\nexacts [h, by decide]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\n⊢ 0 < 2\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : 1 ≤ n / 2\n⊢ decodeSum n = none\n[PROOFSTEP]\ncases' exists_eq_succ_of_ne_zero (_root_.ne_of_gt this) with m e\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : 1 ≤ n / 2\nm : ℕ\ne : n / 2 = succ m\n⊢ decodeSum n = none\n[PROOFSTEP]\nsimp [decodeSum, div2_val]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : 1 ≤ n / 2\nm : ℕ\ne : n / 2 = succ m\n⊢ (match (bodd n, n / 2) with\n    | (false, m) => Option.map Sum.inl (decode m)\n    | (fst, m) => Option.map Sum.inr (decode m)) =\n    none\n[PROOFSTEP]\ncases bodd n\n[GOAL]\ncase intro.false\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : 1 ≤ n / 2\nm : ℕ\ne : n / 2 = succ m\n⊢ (match (false, n / 2) with\n    | (false, m) => Option.map Sum.inl (decode m)\n    | (fst, m) => Option.map Sum.inr (decode m)) =\n    none\n[PROOFSTEP]\nsimp [e]\n[GOAL]\ncase intro.true\nα : Type u_1\nβ : Type u_2\nn : ℕ\nh : 2 ≤ n\nthis : 1 ≤ n / 2\nm : ℕ\ne : n / 2 = succ m\n⊢ (match (true, n / 2) with\n    | (false, m) => Option.map Sum.inl (decode m)\n    | (fst, m) => Option.map Sum.inr (decode m)) =\n    none\n[PROOFSTEP]\nsimp [e]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : α → Type u_3\ninst✝¹ : Encodable α\ninst✝ : (a : α) → Encodable (γ a)\nx✝ : Sigma γ\na : α\nb : γ a\n⊢ decodeSigma (encodeSigma { fst := a, snd := b }) = some { fst := a, snd := b }\n[PROOFSTEP]\nsimp [encodeSigma, decodeSigma, unpair_pair, encodek]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\n⊢ decode n = Option.bind (decode (unpair n).fst) fun a => Option.map (Prod.mk a) (decode (unpair n).snd)\n[PROOFSTEP]\nsimp only [decode_ofEquiv, Equiv.symm_symm, decode_sigma_val]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β))\n      (Option.bind (decode (unpair n).fst) fun a => Option.map (Sigma.mk a) (decode (unpair n).snd)) =\n    Option.bind (decode (unpair n).fst) fun a => Option.map (Prod.mk a) (decode (unpair n).snd)\n[PROOFSTEP]\ncases (decode n.unpair.1 : Option α)\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β)) (Option.bind none fun a => Option.map (Sigma.mk a) (decode (unpair n).snd)) =\n    Option.bind none fun a => Option.map (Prod.mk a) (decode (unpair n).snd)\n[PROOFSTEP]\ncases (decode n.unpair.2 : Option β)\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\nval✝ : α\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β))\n      (Option.bind (some val✝) fun a => Option.map (Sigma.mk a) (decode (unpair n).snd)) =\n    Option.bind (some val✝) fun a => Option.map (Prod.mk a) (decode (unpair n).snd)\n[PROOFSTEP]\ncases (decode n.unpair.2 : Option β)\n[GOAL]\ncase none.none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β)) (Option.bind none fun a => Option.map (Sigma.mk a) none) =\n    Option.bind none fun a => Option.map (Prod.mk a) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase none.some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\nval✝ : β\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β)) (Option.bind none fun a => Option.map (Sigma.mk a) (some val✝)) =\n    Option.bind none fun a => Option.map (Prod.mk a) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\nval✝ : α\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β)) (Option.bind (some val✝) fun a => Option.map (Sigma.mk a) none) =\n    Option.bind (some val✝) fun a => Option.map (Prod.mk a) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Encodable β\ni : Encodable α\nn : ℕ\nval✝¹ : α\nval✝ : β\n⊢ Option.map (↑(Equiv.sigmaEquivProd α β)) (Option.bind (some val✝¹) fun a => Option.map (Sigma.mk a) (some val✝)) =\n    Option.bind (some val✝¹) fun a => Option.map (Prod.mk a) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nP : α → Prop\nencA : Encodable α\ndecP : DecidablePred P\nx✝ : { a // P a }\nv : α\nh : P v\n⊢ decodeSubtype (encodeSubtype { val := v, property := h }) = some { val := v, property := h }\n[PROOFSTEP]\nsimp [encodeSubtype, decodeSubtype, encodek, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nP : α → Prop\nencA : Encodable α\ndecP : DecidablePred P\na : Subtype P\n⊢ encode a = encode ↑a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nP : α → Prop\nencA : Encodable α\ndecP : DecidablePred P\nval✝ : α\nproperty✝ : P val✝\n⊢ encode { val := val✝, property := property✝ } = encode ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ Countable ℕ+\n[PROOFSTEP]\ndelta PNat\n[GOAL]\n⊢ Countable { n // 0 < n }\n[PROOFSTEP]\ninfer_instance\n  -- short-circuit instance search\n[GOAL]\nα : Type u_1\ninst✝ : Encodable α\n⊢ DecidableEq (ULower α)\n[PROOFSTEP]\ndelta ULower\n[GOAL]\nα : Type u_1\ninst✝ : Encodable α\n⊢ DecidableEq ↑(Set.range Encodable.encode)\n[PROOFSTEP]\nexact Encodable.decidableEqOfEncodable _\n[GOAL]\nα : Type u_1\ninst✝ : Encodable α\n⊢ Encodable (ULower α)\n[PROOFSTEP]\ndelta ULower\n[GOAL]\nα : Type u_1\ninst✝ : Encodable α\n⊢ Encodable ↑(Set.range Encodable.encode)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\ninst✝ : Encodable α\na : α\n⊢ up (down a) = a\n[PROOFSTEP]\nsimp [up, down, Equiv.left_inv _ _, Equiv.symm_apply_apply]\n[GOAL]\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\nn : Option α\n⊢ Decidable (Encodable.good p n)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase none\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\n⊢ Decidable (Encodable.good p none)\n[PROOFSTEP]\nunfold good\n[GOAL]\ncase some\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\nval✝ : α\n⊢ Decidable (Encodable.good p (some val✝))\n[PROOFSTEP]\nunfold good\n[GOAL]\ncase none\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\n⊢ Decidable\n    (match none with\n    | some a => p a\n    | none => False)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\nval✝ : α\n⊢ Decidable\n    (match some val✝ with\n    | some a => p a\n    | none => False)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\n⊢ Decidable False\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase some\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\nval✝ : α\n⊢ Decidable (p val✝)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\np : α → Prop\ninst✝¹ : Encodable α\ninst✝ : DecidablePred p\nh : ∃ x, p x\nw : α\npw : p w\n⊢ Encodable.good p (decode (encode w))\n[PROOFSTEP]\nsimp [good, encodek, pw]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\nn : ℕ\n⊢ r (f (Directed.sequence f hf n)) (f (Directed.sequence f hf (n + 1)))\n[PROOFSTEP]\ndsimp [Directed.sequence]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\nn : ℕ\n⊢ r (f (Directed.sequence f hf n))\n    (f\n      (match decode n with\n      | none =>\n        Classical.choose (_ : ∃ z, r (f (Directed.sequence f hf n)) (f z) ∧ r (f (Directed.sequence f hf n)) (f z))\n      | some a => Classical.choose (_ : ∃ z, r (f (Directed.sequence f hf n)) (f z) ∧ r (f a) (f z))))\n[PROOFSTEP]\ngeneralize hf.sequence f n = p\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\nn : ℕ\np : α\n⊢ r (f p)\n    (f\n      (match decode n with\n      | none => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f p) (f z))\n      | some a => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f a) (f z))))\n[PROOFSTEP]\ncases' h : (decode n : Option α) with a\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\nn : ℕ\np : α\nh : decode n = none\n⊢ r (f p)\n    (f\n      (match none with\n      | none => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f p) (f z))\n      | some a => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f a) (f z))))\n[PROOFSTEP]\nexact (Classical.choose_spec (hf p p)).1\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\nn : ℕ\np a : α\nh : decode n = some a\n⊢ r (f p)\n    (f\n      (match some a with\n      | none => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f p) (f z))\n      | some a => Classical.choose (_ : ∃ z, r (f p) (f z) ∧ r (f a) (f z))))\n[PROOFSTEP]\nexact (Classical.choose_spec (hf p a)).1\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\na : α\n⊢ r (f a) (f (Directed.sequence f hf (encode a + 1)))\n[PROOFSTEP]\nsimp only [Directed.sequence, add_eq, add_zero, encodek, and_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Encodable α\ninst✝ : Inhabited α\nr : β → β → Prop\nf : α → β\nhf : Directed r f\na : α\n⊢ r (f a) (f (Classical.choose (_ : ∃ x, (fun x => r (f (Directed.sequence f hf (encode a))) (f x) ∧ r (f a) (f x)) x)))\n[PROOFSTEP]\nexact (Classical.choose_spec (hf _ a)).2\n[GOAL]\nα : Type u_1\ns : Setoid α\ninst✝¹ : DecidableRel fun x x_1 => x ≈ x_1\ninst✝ : Encodable α\n⊢ ∀ (a : Quotient s), (fun n => Quotient.mk'' <$> decode n) ((fun q => encode (rep q)) a) = some a\n[PROOFSTEP]\nrintro ⟨l⟩\n[GOAL]\ncase mk\nα : Type u_1\ns : Setoid α\ninst✝¹ : DecidableRel fun x x_1 => x ≈ x_1\ninst✝ : Encodable α\na✝ : Quotient s\nl : α\n⊢ (fun n => Quotient.mk'' <$> decode n) ((fun q => encode (rep q)) (Quot.mk Setoid.r l)) = some (Quot.mk Setoid.r l)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nα : Type u_1\ns : Setoid α\ninst✝¹ : DecidableRel fun x x_1 => x ≈ x_1\ninst✝ : Encodable α\na✝ : Quotient s\nl : α\n⊢ Option.map Quotient.mk'' (decode (encode (rep (Quot.mk Setoid.r l)))) = some (Quot.mk Setoid.r l)\n[PROOFSTEP]\nrw [encodek]\n[GOAL]\ncase mk\nα : Type u_1\ns : Setoid α\ninst✝¹ : DecidableRel fun x x_1 => x ≈ x_1\ninst✝ : Encodable α\na✝ : Quotient s\nl : α\n⊢ Option.map Quotient.mk'' (some (rep (Quot.mk Setoid.r l))) = some (Quot.mk Setoid.r l)\n[PROOFSTEP]\nexact congr_arg some ⟦l⟧.rep_spec\n", "meta": {"mathlib_filename": "Mathlib.Logic.Encodable.Basic", "llama_tokens": 8932, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.603931819468636, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.29960684905953566}}
{"text": "[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\n⊢ (x ◃ y) ◃ x = x ◃ y\n[PROOFSTEP]\nhave h : (x ◃ y) ◃ x = (x ◃ y) ◃ (x ◃ 1) := by rw [act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\n⊢ (x ◃ y) ◃ x = (x ◃ y) ◃ x ◃ 1\n[PROOFSTEP]\nrw [act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\nh : (x ◃ y) ◃ x = (x ◃ y) ◃ x ◃ 1\n⊢ (x ◃ y) ◃ x = x ◃ y\n[PROOFSTEP]\nrw [h, ← Shelf.self_distrib, act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx : S\n⊢ x ◃ x = x\n[PROOFSTEP]\nrw [← act_one x, ← Shelf.self_distrib, act_one, act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\n⊢ x ◃ x ◃ y = x ◃ y\n[PROOFSTEP]\nhave h : x ◃ (x ◃ y) = (x ◃ 1) ◃ (x ◃ y) := by rw [act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\n⊢ x ◃ x ◃ y = (x ◃ 1) ◃ x ◃ y\n[PROOFSTEP]\nrw [act_one]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y : S\nh : x ◃ x ◃ y = (x ◃ 1) ◃ x ◃ y\n⊢ x ◃ x ◃ y = x ◃ y\n[PROOFSTEP]\nrw [h, ← Shelf.self_distrib, one_act]\n[GOAL]\nS : Type u_1\ninst✝ : UnitalShelf S\nx y z : S\n⊢ (x ◃ y) ◃ z = x ◃ y ◃ z\n[PROOFSTEP]\nrw [self_distrib, self_distrib, act_act_self_eq, act_self_act_eq]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃ y = x ◃ y' ↔ y = y'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃ y = x ◃ y' → y = y'\ncase mpr R : Type u_1 inst✝ : Rack R x y y' : R ⊢ y = y' → x ◃ y = x ◃ y'\n[PROOFSTEP]\napply (act' x).injective\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ y = y' → x ◃ y = x ◃ y'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃ y = x ◃ y\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃⁻¹ y = x ◃⁻¹ y' ↔ y = y'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ x ◃⁻¹ y = x ◃⁻¹ y' → y = y'\ncase mpr R : Type u_1 inst✝ : Rack R x y y' : R ⊢ y = y' → x ◃⁻¹ y = x ◃⁻¹ y'\n[PROOFSTEP]\napply (act' x).symm.injective\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx y y' : R\n⊢ y = y' → x ◃⁻¹ y = x ◃⁻¹ y'\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃⁻¹ y = x ◃⁻¹ y\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : R\n⊢ x ◃⁻¹ y ◃⁻¹ z = (x ◃⁻¹ y) ◃⁻¹ x ◃⁻¹ z\n[PROOFSTEP]\nrw [← left_cancel (x ◃⁻¹ y), right_inv, ← left_cancel x, right_inv, self_distrib]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : R\n⊢ (x ◃ x ◃⁻¹ y) ◃ x ◃ x ◃⁻¹ y ◃⁻¹ z = z\n[PROOFSTEP]\nrepeat' rw [right_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : R\n⊢ (x ◃ x ◃⁻¹ y) ◃ x ◃ x ◃⁻¹ y ◃⁻¹ z = z\n[PROOFSTEP]\nrw [right_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : R\n⊢ y ◃ x ◃ x ◃⁻¹ y ◃⁻¹ z = z\n[PROOFSTEP]\nrw [right_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : R\n⊢ y ◃ y ◃⁻¹ z = z\n[PROOFSTEP]\nrw [right_inv]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx y : R\n⊢ act' (x ◃ y) = act' x * act' y * (act' x)⁻¹\n[PROOFSTEP]\nrw [eq_mul_inv_iff_mul_eq]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx y : R\n⊢ act' (x ◃ y) * act' x = act' x * act' y\n[PROOFSTEP]\next z\n[GOAL]\ncase H\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx y z : R\n⊢ ↑(act' (x ◃ y) * act' x) z = ↑(act' x * act' y) z\n[PROOFSTEP]\napply self_distrib.symm\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\n⊢ ∀ {x y z : Rᵐᵒᵖ},\n    (fun x y => op (unop x ◃⁻¹ unop y)) x ((fun x y => op (unop x ◃⁻¹ unop y)) y z) =\n      (fun x y => op (unop x ◃⁻¹ unop y)) ((fun x y => op (unop x ◃⁻¹ unop y)) x y)\n        ((fun x y => op (unop x ◃⁻¹ unop y)) x z)\n[PROOFSTEP]\nintro x y z\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y z : Rᵐᵒᵖ\n⊢ (fun x y => op (unop x ◃⁻¹ unop y)) x ((fun x y => op (unop x ◃⁻¹ unop y)) y z) =\n    (fun x y => op (unop x ◃⁻¹ unop y)) ((fun x y => op (unop x ◃⁻¹ unop y)) x y)\n      ((fun x y => op (unop x ◃⁻¹ unop y)) x z)\n[PROOFSTEP]\ninduction x using MulOpposite.rec'\n[GOAL]\ncase h\nR : Type u_1\ninst✝ : Rack R\ny z : Rᵐᵒᵖ\nX✝ : R\n⊢ (fun x y => op (unop x ◃⁻¹ unop y)) (op X✝) ((fun x y => op (unop x ◃⁻¹ unop y)) y z) =\n    (fun x y => op (unop x ◃⁻¹ unop y)) ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝) y)\n      ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝) z)\n[PROOFSTEP]\ninduction y using MulOpposite.rec'\n[GOAL]\ncase h.h\nR : Type u_1\ninst✝ : Rack R\nz : Rᵐᵒᵖ\nX✝¹ X✝ : R\n⊢ (fun x y => op (unop x ◃⁻¹ unop y)) (op X✝¹) ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝) z) =\n    (fun x y => op (unop x ◃⁻¹ unop y)) ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝¹) (op X✝))\n      ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝¹) z)\n[PROOFSTEP]\ninduction z using MulOpposite.rec'\n[GOAL]\ncase h.h.h\nR : Type u_1\ninst✝ : Rack R\nX✝² X✝¹ X✝ : R\n⊢ (fun x y => op (unop x ◃⁻¹ unop y)) (op X✝²) ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝¹) (op X✝)) =\n    (fun x y => op (unop x ◃⁻¹ unop y)) ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝²) (op X✝¹))\n      ((fun x y => op (unop x ◃⁻¹ unop y)) (op X✝²) (op X✝))\n[PROOFSTEP]\nsimp only [op_inj, unop_op, op_unop]\n[GOAL]\ncase h.h.h\nR : Type u_1\ninst✝ : Rack R\nX✝² X✝¹ X✝ : R\n⊢ X✝² ◃⁻¹ X✝¹ ◃⁻¹ X✝ = (X✝² ◃⁻¹ X✝¹) ◃⁻¹ X✝² ◃⁻¹ X✝\n[PROOFSTEP]\nrw [self_distrib_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (fun x y => op (unop x ◃ unop y)) (op x) (op x ◃ op y) = op y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ op x ◃ (fun x y => op (unop x ◃ unop y)) (op x) (op y) = op y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (x ◃ x) ◃ y = x ◃ y\n[PROOFSTEP]\nrw [← right_inv x y, ← self_distrib]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (x ◃⁻¹ x) ◃⁻¹ y = x ◃⁻¹ y\n[PROOFSTEP]\nhave h := @self_act_act_eq _ _ (op x) (op y)\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : (op x ◃ op x) ◃ op y = op x ◃ op y\n⊢ (x ◃⁻¹ x) ◃⁻¹ y = x ◃⁻¹ y\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (x ◃ x) ◃⁻¹ y = x ◃⁻¹ y\n[PROOFSTEP]\nrw [← left_cancel (x ◃ x)]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (x ◃ x) ◃ (x ◃ x) ◃⁻¹ y = (x ◃ x) ◃ x ◃⁻¹ y\n[PROOFSTEP]\nrw [right_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ y = (x ◃ x) ◃ x ◃⁻¹ y\n[PROOFSTEP]\nrw [self_act_act_eq]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ y = x ◃ x ◃⁻¹ y\n[PROOFSTEP]\nrw [right_inv]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ (x ◃⁻¹ x) ◃ y = x ◃ y\n[PROOFSTEP]\nhave h := @self_act_invAct_eq _ _ (op x) (op y)\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : (op x ◃ op x) ◃⁻¹ op y = op x ◃⁻¹ op y\n⊢ (x ◃⁻¹ x) ◃ y = x ◃ y\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃ x = y ◃ y ↔ x = y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃ x = y ◃ y → x = y\ncase mpr R : Type u_1 inst✝ : Rack R x y : R ⊢ x = y → x ◃ x = y ◃ y\n[PROOFSTEP]\nswap\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x = y → x ◃ x = y ◃ y\ncase mp R : Type u_1 inst✝ : Rack R x y : R ⊢ x ◃ x = y ◃ y → x = y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝ : Rack R\nx : R\n⊢ x ◃ x = x ◃ x\ncase mp R : Type u_1 inst✝ : Rack R x y : R ⊢ x ◃ x = y ◃ y → x = y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃ x = y ◃ y → x = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : x ◃ x = y ◃ y\n⊢ x = y\n[PROOFSTEP]\ntrans (x ◃ x) ◃⁻¹ x ◃ x\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : x ◃ x = y ◃ y\n⊢ x = (x ◃ x) ◃⁻¹ x ◃ x\nR : Type u_1 inst✝ : Rack R x y : R h : x ◃ x = y ◃ y ⊢ (x ◃ x) ◃⁻¹ x ◃ x = y\n[PROOFSTEP]\nrw [← left_cancel (x ◃ x), right_inv, self_act_act_eq]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : x ◃ x = y ◃ y\n⊢ (x ◃ x) ◃⁻¹ x ◃ x = y\n[PROOFSTEP]\nrw [h, ← left_cancel (y ◃ y), right_inv, self_act_act_eq]\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ x ◃⁻¹ x = y ◃⁻¹ y ↔ x = y\n[PROOFSTEP]\nhave h := @self_act_eq_iff_eq _ _ (op x) (op y)\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\nh : op x ◃ op x = op y ◃ op y ↔ op x = op y\n⊢ x ◃⁻¹ x = y ◃⁻¹ y ↔ x = y\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx : R\n⊢ (fun x => x ◃⁻¹ x) ((fun x => x ◃ x) x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx : R\n⊢ (fun x => x ◃ x) ((fun x => x ◃⁻¹ x) x) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nh : IsInvolutory R\nx y : R\n⊢ x ◃⁻¹ y = x ◃ y\n[PROOFSTEP]\nrw [← left_cancel x, right_inv, h x]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx y z : R\n⊢ x ◃ y ◃ z = (x ◃ y) ◃ z ↔ x ◃ z = z\n[PROOFSTEP]\nrw [self_distrib]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Rack R✝\nR : Type u_2\ninst✝ : Rack R\nx y z : R\n⊢ (x ◃ y) ◃ x ◃ z = (x ◃ y) ◃ z ↔ x ◃ z = z\n[PROOFSTEP]\nrw [left_cancel]\n[GOAL]\nS₁ : Type u_1\nS₂ : Type u_2\nS₃ : Type u_3\ninst✝³ : Shelf S₁\ninst✝² : Shelf S₂\ninst✝¹ : Shelf S₃\nS : Type u_4\ninst✝ : Shelf S\n⊢ ∀ {x y : S}, (fun x => x) (x ◃ y) = (fun x => x) x ◃ (fun x => x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nS₁ : Type u_1\nS₂ : Type u_2\nS₃ : Type u_3\ninst✝² : Shelf S₁\ninst✝¹ : Shelf S₂\ninst✝ : Shelf S₃\ng : S₂ →◃ S₃\nf : S₁ →◃ S₂\n⊢ ∀ {x y : S₁}, (g.toFun ∘ f.toFun) (x ◃ y) = (g.toFun ∘ f.toFun) x ◃ (g.toFun ∘ f.toFun) y\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nx : Q\n⊢ x ◃⁻¹ x = x\n[PROOFSTEP]\nrw [← left_cancel x]\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nx : Q\n⊢ x ◃ x ◃⁻¹ x = x ◃ x\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\n⊢ ∀ {x : Qᵐᵒᵖ}, x ◃ x = x\n[PROOFSTEP]\nintro x\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nx : Qᵐᵒᵖ\n⊢ x ◃ x = x\n[PROOFSTEP]\ninduction' x using MulOpposite.rec'\n[GOAL]\ncase h\nQ : Type u_1\ninst✝ : Quandle Q\nX✝ : Q\n⊢ op X✝ ◃ op X✝ = op X✝\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\n⊢ ∀ {x y z : Conj G},\n    (fun x => ↑(↑MulAut.conj x)) x ((fun x => ↑(↑MulAut.conj x)) y z) =\n      (fun x => ↑(↑MulAut.conj x)) ((fun x => ↑(↑MulAut.conj x)) x y) ((fun x => ↑(↑MulAut.conj x)) x z)\n[PROOFSTEP]\nintro x y z\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y z : Conj G\n⊢ (fun x => ↑(↑MulAut.conj x)) x ((fun x => ↑(↑MulAut.conj x)) y z) =\n    (fun x => ↑(↑MulAut.conj x)) ((fun x => ↑(↑MulAut.conj x)) x y) ((fun x => ↑(↑MulAut.conj x)) x z)\n[PROOFSTEP]\ndsimp only [MulAut.conj_apply]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y z : Conj G\n⊢ x * (y * z * y⁻¹) * x⁻¹ = x * y * x⁻¹ * (x * z * x⁻¹) * (x * y * x⁻¹)⁻¹\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ (fun x => ↑(MulEquiv.symm (↑MulAut.conj x))) x (x ◃ y) = y\n[PROOFSTEP]\nsimp [act', mul_assoc]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ x ◃ (fun x => ↑(MulEquiv.symm (↑MulAut.conj x))) x y = y\n[PROOFSTEP]\nsimp [act', mul_assoc]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\n⊢ ∀ {x : Conj G}, x ◃ x = x\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ x ◃ y = y ↔ y ◃ x = x\n[PROOFSTEP]\ndsimp [Conj] at *\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ x * y * x⁻¹ = y ↔ y * x * y⁻¹ = x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ x * y * x⁻¹ = y → y * x * y⁻¹ = x\ncase mpr Q : Type u_1 inst✝¹ : Quandle Q G : Type u_2 inst✝ : Group G x y : Conj G ⊢ y * x * y⁻¹ = x → x * y * x⁻¹ = y\n[PROOFSTEP]\nrepeat' intro h; conv_rhs => rw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\ncase mp\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ x * y * x⁻¹ = y → y * x * y⁻¹ = x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : x * y * x⁻¹ = y\n⊢ y * x * y⁻¹ = x\n[PROOFSTEP]\nconv_rhs => rw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : x * y * x⁻¹ = y\n| x\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : x * y * x⁻¹ = y\n| x\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : x * y * x⁻¹ = y\n| x\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : x * y * x⁻¹ = y\n| y * x⁻¹⁻¹ * y⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\n⊢ y * x * y⁻¹ = x → x * y * x⁻¹ = y\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : y * x * y⁻¹ = x\n⊢ x * y * x⁻¹ = y\n[PROOFSTEP]\nconv_rhs => rw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : y * x * y⁻¹ = x\n| y\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : y * x * y⁻¹ = x\n| y\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]; simp\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : y * x * y⁻¹ = x\n| y\n[PROOFSTEP]\nrw [eq_mul_inv_of_mul_eq (eq_mul_inv_of_mul_eq h)]\n[GOAL]\nQ : Type u_1\ninst✝¹ : Quandle Q\nG : Type u_2\ninst✝ : Group G\nx y : Conj G\nh : y * x * y⁻¹ = x\n| x * y⁻¹⁻¹ * x⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝² : Quandle Q\nG : Type u_2\nH : Type u_3\ninst✝¹ : Group G\ninst✝ : Group H\nf : G →* H\n⊢ ∀ {x y : Conj G}, ↑f (x ◃ y) = ↑f x ◃ ↑f y\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\na : ZMod n\n⊢ Function.Involutive (dihedralAct n a)\n[PROOFSTEP]\nintro b\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\na b : ZMod n\n⊢ dihedralAct n a (dihedralAct n a b) = b\n[PROOFSTEP]\ndsimp only [dihedralAct]\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\na b : ZMod n\n⊢ 2 * a - (2 * a - b) = b\n[PROOFSTEP]\nsimp\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\n⊢ ∀ {x y z : Dihedral n}, dihedralAct n x (dihedralAct n y z) = dihedralAct n (dihedralAct n x y) (dihedralAct n x z)\n[PROOFSTEP]\nintro x y z\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\nx y z : Dihedral n\n⊢ dihedralAct n x (dihedralAct n y z) = dihedralAct n (dihedralAct n x y) (dihedralAct n x z)\n[PROOFSTEP]\nsimp only [dihedralAct]\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\nx y z : Dihedral n\n⊢ 2 * x - (2 * y - z) = 2 * (2 * x - y) - (2 * x - z)\n[PROOFSTEP]\nring_nf\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\n⊢ ∀ {x : Dihedral n}, x ◃ x = x\n[PROOFSTEP]\nintro x\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\nx : Dihedral n\n⊢ x ◃ x = x\n[PROOFSTEP]\nsimp only [dihedralAct]\n[GOAL]\nQ : Type u_1\ninst✝ : Quandle Q\nn : ℕ\nx : Dihedral n\n⊢ 2 * x - x = x\n[PROOFSTEP]\nring_nf\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\n⊢ ∀ {x y : R}, act' (x ◃ y) = act' x ◃ act' y\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\nx y : R\n⊢ act' (x ◃ y) = act' x ◃ act' y\n[PROOFSTEP]\nexact ad_conj x y\n[GOAL]\nR : Type u_1\ninst✝ : Rack R\n⊢ Equivalence (PreEnvelGroupRel R)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refl\nR : Type u_1\ninst✝ : Rack R\n⊢ ∀ (x : PreEnvelGroup R), PreEnvelGroupRel R x x\n[PROOFSTEP]\napply PreEnvelGroupRel.refl\n[GOAL]\ncase symm\nR : Type u_1\ninst✝ : Rack R\n⊢ ∀ {x y : PreEnvelGroup R}, PreEnvelGroupRel R x y → PreEnvelGroupRel R y x\n[PROOFSTEP]\napply PreEnvelGroupRel.symm\n[GOAL]\ncase trans\nR : Type u_1\ninst✝ : Rack R\n⊢ ∀ {x y z : PreEnvelGroup R}, PreEnvelGroupRel R x y → PreEnvelGroupRel R y z → PreEnvelGroupRel R x z\n[PROOFSTEP]\napply PreEnvelGroupRel.trans\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na✝ b✝ a'✝ b'✝ : PreEnvelGroup R\nha : PreEnvelGroupRel' R a✝ a'✝\nhb : PreEnvelGroupRel' R b✝ b'✝\n⊢ mapAux f (PreEnvelGroup.mul a✝ b✝) = mapAux f (PreEnvelGroup.mul a'✝ b'✝)\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux, well_def f ha, well_def f hb]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na✝ a'✝ : PreEnvelGroup R\nha : PreEnvelGroupRel' R a✝ a'✝\n⊢ mapAux f (PreEnvelGroup.inv a✝) = mapAux f (PreEnvelGroup.inv a'✝)\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux, well_def f ha]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na b c : PreEnvelGroup R\n⊢ mapAux f (PreEnvelGroup.mul (PreEnvelGroup.mul a b) c) = mapAux f (PreEnvelGroup.mul a (PreEnvelGroup.mul b c))\n[PROOFSTEP]\napply mul_assoc\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na : PreEnvelGroup R\n⊢ mapAux f (PreEnvelGroup.mul unit a) = mapAux f a\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na : PreEnvelGroup R\n⊢ mapAux f (PreEnvelGroup.mul a unit) = mapAux f a\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\na : PreEnvelGroup R\n⊢ mapAux f (PreEnvelGroup.mul (PreEnvelGroup.inv a) a) = mapAux f unit\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\nx y : R\n⊢ mapAux f (PreEnvelGroup.mul (PreEnvelGroup.mul (incl x) (incl y)) (PreEnvelGroup.inv (incl x))) =\n    mapAux f (incl (x ◃ y))\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\n⊢ (fun x => Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b)) 1 = 1\n[PROOFSTEP]\nchange Quotient.liftOn ⟦Rack.PreEnvelGroup.unit⟧ (toEnvelGroup.mapAux f) _ = 1\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\n⊢ Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n      (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n    1\n[PROOFSTEP]\nsimp only [Quotient.lift_mk, mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\nx✝ y✝ : EnvelGroup R\nx y : PreEnvelGroup R\n⊢ OneHom.toFun\n      { toFun := fun x => Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n        map_one' :=\n          (_ :\n            Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n              1) }\n      (Quotient.mk (setoid R) x * Quotient.mk (setoid R) y) =\n    OneHom.toFun\n        {\n          toFun := fun x =>\n            Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n          map_one' :=\n            (_ :\n              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                1) }\n        (Quotient.mk (setoid R) x) *\n      OneHom.toFun\n        {\n          toFun := fun x =>\n            Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n          map_one' :=\n            (_ :\n              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                1) }\n        (Quotient.mk (setoid R) y)\n[PROOFSTEP]\nsimp only [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\nx✝ y✝ : EnvelGroup R\nx y : PreEnvelGroup R\n⊢ Quotient.liftOn (Quotient.mk (setoid R) x * Quotient.mk (setoid R) y) (mapAux f)\n      (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n    Quotient.liftOn (Quotient.mk (setoid R) x) (mapAux f)\n        (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) *\n      Quotient.liftOn (Quotient.mk (setoid R) y) (mapAux f)\n        (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b)\n[PROOFSTEP]\nchange Quotient.liftOn ⟦mul x y⟧ (toEnvelGroup.mapAux f) _ = _\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\nx✝ y✝ : EnvelGroup R\nx y : PreEnvelGroup R\n⊢ Quotient.liftOn (Quotient.mk (setoid R) (PreEnvelGroup.mul x y)) (mapAux f)\n      (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n    Quotient.liftOn (Quotient.mk (setoid R) x) (mapAux f)\n        (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) *\n      Quotient.liftOn (Quotient.mk (setoid R) y) (mapAux f)\n        (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b)\n[PROOFSTEP]\nsimp [toEnvelGroup.mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\n⊢ (fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R))\n      ((fun f =>\n          {\n            toOneHom :=\n              {\n                toFun := fun x =>\n                  Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                map_one' :=\n                  (_ :\n                    Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                        (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                      1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : EnvelGroup R),\n                  OneHom.toFun\n                      {\n                        toFun := fun x =>\n                          Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                        map_one' :=\n                          (_ :\n                            Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                              1) }\n                      (x * y) =\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        x *\n                      OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        y) })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase toFun.h\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nf : R →◃ Quandle.Conj G\nx✝ : R\n⊢ ShelfHom.toFun\n      ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R))\n        ((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          f))\n      x✝ =\n    ShelfHom.toFun f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx : PreEnvelGroup R\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\n[PROOFSTEP]\ninduction' x with _ x y ih_x ih_y x ih_x\n[GOAL]\ncase unit\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx : EnvelGroup R\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) unit) =\n    ↑F (Quotient.mk (setoid R) unit)\n[PROOFSTEP]\nexact F.map_one.symm\n[GOAL]\ncase incl\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx : EnvelGroup R\nx✝ : R\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) (incl x✝)) =\n    ↑F (Quotient.mk (setoid R) (incl x✝))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mul\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nih_y :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) y) =\n    ↑F (Quotient.mk (setoid R) y)\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) (PreEnvelGroup.mul x y)) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.mul x y))\n[PROOFSTEP]\nhave hm : ⟦x.mul y⟧ = @Mul.mul (EnvelGroup R) _ ⟦x⟧ ⟦y⟧ := rfl\n[GOAL]\ncase mul\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nih_y :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) y) =\n    ↑F (Quotient.mk (setoid R) y)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.mul x y) = Mul.mul (Quotient.mk (setoid R) x) (Quotient.mk (setoid R) y)\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) (PreEnvelGroup.mul x y)) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.mul x y))\n[PROOFSTEP]\nsimp only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk]\n[GOAL]\ncase mul\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nih_y :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) y) =\n    ↑F (Quotient.mk (setoid R) y)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.mul x y) = Mul.mul (Quotient.mk (setoid R) x) (Quotient.mk (setoid R) y)\n⊢ mapAux (ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) (PreEnvelGroup.mul x y) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.mul x y))\n[PROOFSTEP]\nsuffices ∀ x y, F (Mul.mul x y) = F (x) * F (y)\n  by\n  simp_all only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk, hm]\n  rw [← ih_x, ← ih_y, mapAux]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nih_y :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) y) =\n    ↑F (Quotient.mk (setoid R) y)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.mul x y) = Mul.mul (Quotient.mk (setoid R) x) (Quotient.mk (setoid R) y)\nthis : ∀ (x y : EnvelGroup R), ↑F (Mul.mul x y) = ↑F x * ↑F y\n⊢ mapAux (ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) (PreEnvelGroup.mul x y) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.mul x y))\n[PROOFSTEP]\nsimp_all only [MonoidHom.coe_mk, OneHom.coe_mk, Quotient.lift_mk, hm]\n[GOAL]\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x : mapAux (ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) x = ↑F (Quotient.mk (setoid R) x)\nih_y : mapAux (ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) y = ↑F (Quotient.mk (setoid R) y)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.mul x y) = Mul.mul (Quotient.mk (setoid R) x) (Quotient.mk (setoid R) y)\nthis : ∀ (x y : EnvelGroup R), ↑F (Mul.mul x y) = ↑F x * ↑F y\n⊢ mapAux (ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) (PreEnvelGroup.mul x y) =\n    ↑F (Quotient.mk (setoid R) x) * ↑F (Quotient.mk (setoid R) y)\n[PROOFSTEP]\nrw [← ih_x, ← ih_y, mapAux]\n[GOAL]\ncase mul\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx y : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nih_y :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) y) =\n    ↑F (Quotient.mk (setoid R) y)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.mul x y) = Mul.mul (Quotient.mk (setoid R) x) (Quotient.mk (setoid R) y)\n⊢ ∀ (x y : EnvelGroup R), ↑F (Mul.mul x y) = ↑F x * ↑F y\n[PROOFSTEP]\nexact F.map_mul\n[GOAL]\ncase inv\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) (PreEnvelGroup.inv x)) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.inv x))\n[PROOFSTEP]\nhave hm : ⟦x.inv⟧ = @Inv.inv (EnvelGroup R) _ ⟦x⟧ := rfl\n[GOAL]\ncase inv\nR : Type u_1\ninst✝¹ : Rack R\nG : Type u_2\ninst✝ : Group G\nF : EnvelGroup R →* G\nx✝ : EnvelGroup R\nx : PreEnvelGroup R\nih_x :\n  ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) x) =\n    ↑F (Quotient.mk (setoid R) x)\nhm : Quotient.mk (setoid R) (PreEnvelGroup.inv x) = (Quotient.mk (setoid R) x)⁻¹\n⊢ ↑((fun f =>\n            {\n              toOneHom :=\n                {\n                  toFun := fun x =>\n                    Quotient.liftOn x (mapAux f) (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                  map_one' :=\n                    (_ :\n                      Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                          (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                        1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : EnvelGroup R),\n                    OneHom.toFun\n                        {\n                          toFun := fun x =>\n                            Quotient.liftOn x (mapAux f)\n                              (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                          map_one' :=\n                            (_ :\n                              Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                  (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                1) }\n                        (x * y) =\n                      OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          x *\n                        OneHom.toFun\n                          {\n                            toFun := fun x =>\n                              Quotient.liftOn x (mapAux f)\n                                (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b),\n                            map_one' :=\n                              (_ :\n                                Quotient.liftOn (Quotient.mk (setoid R) unit) (mapAux f)\n                                    (_ : ∀ (a b : PreEnvelGroup R), a ≈ b → mapAux f a = mapAux f b) =\n                                  1) }\n                          y) })\n          ((fun F => ShelfHom.comp (Quandle.Conj.map F) (toEnvelGroup R)) F))\n      (Quotient.mk (setoid R) (PreEnvelGroup.inv x)) =\n    ↑F (Quotient.mk (setoid R) (PreEnvelGroup.inv x))\n[PROOFSTEP]\nrw [hm, F.map_inv, MonoidHom.map_inv, ih_x]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Quandle", "llama_tokens": 29215, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6039318194686359, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.2996068490595356}}
{"text": "[GOAL]\nC : Type ?u.30361\ninst✝ : Category.{?u.30362, ?u.30361} C\nX Y : C\nf : X ⟶ Y\n⊢ 𝟙 X ≫ f = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type ?u.30529\ninst✝ : Category.{?u.30530, ?u.30529} C\nX Y : C\nf : X ⟶ Y\n⊢ f ≫ 𝟙 Y = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : X ⟶ Y\nw : f = g\nh : Y ⟶ Z\n⊢ f ≫ h = g ≫ h\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : g = h\n⊢ f ≫ g = f ≫ h\n[PROOFSTEP]\nrw [w]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : X ⟶ Y\nw : ∀ {Z : C} (h : Y ⟶ Z), f ≫ h = g ≫ h\n⊢ f = g\n[PROOFSTEP]\nconvert w (𝟙 Y)\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : X ⟶ Y\nw : ∀ {Z : C} (h : Y ⟶ Z), f ≫ h = g ≫ h\n⊢ f = f ≫ 𝟙 Y\n[PROOFSTEP]\naesop\n[GOAL]\ncase h.e'_3\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : X ⟶ Y\nw : ∀ {Z : C} (h : Y ⟶ Z), f ≫ h = g ≫ h\n⊢ g = g ≫ 𝟙 Y\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : Y ⟶ Z\nw : ∀ {X : C} (h : X ⟶ Y), h ≫ f = h ≫ g\n⊢ f = g\n[PROOFSTEP]\nconvert w (𝟙 Y)\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : Y ⟶ Z\nw : ∀ {X : C} (h : X ⟶ Y), h ≫ f = h ≫ g\n⊢ f = 𝟙 Y ≫ f\n[PROOFSTEP]\naesop\n[GOAL]\ncase h.e'_3\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf g : Y ⟶ Z\nw : ∀ {X : C} (h : X ⟶ Y), h ≫ f = h ≫ g\n⊢ g = 𝟙 Y ≫ g\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z✝ : C\nf g : X ⟶ Y\nw : (fun {Z} h => f ≫ h) = fun {Z} h => g ≫ h\nZ : C\nh : Y ⟶ Z\n⊢ f ≫ h = g ≫ h\n[PROOFSTEP]\nconvert congr_fun (congr_fun w Z) h\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y Z : C\nf g : Y ⟶ Z\nw : (fun {X} h => h ≫ f) = fun {X} h => h ≫ g\nX : C\nh : X ⟶ Y\n⊢ h ≫ f = h ≫ g\n[PROOFSTEP]\nconvert congr_fun (congr_fun w X) h\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ X\nw : ∀ {Y : C} (g : X ⟶ Y), f ≫ g = g\n⊢ f = 𝟙 X\n[PROOFSTEP]\nconvert w (𝟙 X)\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ X\nw : ∀ {Y : C} (g : X ⟶ Y), f ≫ g = g\n⊢ f = f ≫ 𝟙 X\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ X\nw : ∀ {Y : C} (g : Y ⟶ X), g ≫ f = g\n⊢ f = 𝟙 X\n[PROOFSTEP]\nconvert w (𝟙 X)\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ X\nw : ∀ {Y : C} (g : Y ⟶ X), g ≫ f = g\n⊢ f = 𝟙 X ≫ f\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ : C\nP : Prop\ninst✝ : Decidable P\nX Y Z : C\nf : X ⟶ Y\ng g' : Y ⟶ Z\n⊢ (f ≫ if P then g else g') = if P then f ≫ g else f ≫ g'\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ : C\nP : Prop\ninst✝ : Decidable P\nX Y Z : C\nf f' : X ⟶ Y\ng : Y ⟶ Z\n⊢ (if P then f else f') ≫ g = if P then f ≫ g else f' ≫ g\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ : C\nP : Prop\ninst✝ : Decidable P\nX Y Z : C\nf : X ⟶ Y\ng : P → (Y ⟶ Z)\ng' : ¬P → (Y ⟶ Z)\n⊢ (f ≫ if h : P then g h else g' h) = if h : P then f ≫ g h else f ≫ g' h\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ : C\nP : Prop\ninst✝ : Decidable P\nX Y Z : C\nf : P → (X ⟶ Y)\nf' : ¬P → (X ⟶ Y)\ng : Y ⟶ Z\n⊢ (if h : P then f h else f' h) ≫ g = if h : P then f h ≫ g else f' h ≫ g\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y Z X Z✝ : C\ng h : X ⟶ Z✝\nw : 𝟙 X ≫ g = 𝟙 X ≫ h\n⊢ g = h\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y Z X Z✝ : C\ng h : Z✝ ⟶ X\nw : g ≫ 𝟙 X = h ≫ 𝟙 X\n⊢ g = h\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ninst✝ : Epi f\nh : Y ⟶ Y\n⊢ f ≫ h = f ↔ h = 𝟙 Y\n[PROOFSTEP]\nconvert cancel_epi f\n[GOAL]\ncase h.e'_1.h.e'_3.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ninst✝ : Epi f\nh : Y ⟶ Y\n⊢ f = f ≫ 𝟙 Y\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ninst✝ : Mono f\ng : X ⟶ X\n⊢ g ≫ f = f ↔ g = 𝟙 X\n[PROOFSTEP]\nconvert cancel_mono f\n[GOAL]\ncase h.e'_1.h.e'_3.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : C\nf : X ⟶ Y\ninst✝ : Mono f\ng : X ⟶ X\n⊢ f = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ninst✝¹ : Epi f\ng : Y ⟶ Z\ninst✝ : Epi g\n⊢ Epi (f ≫ g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ninst✝¹ : Epi f\ng : Y ⟶ Z\ninst✝ : Epi g\n⊢ ∀ {Z_1 : C} (g_1 h : Z ⟶ Z_1), (f ≫ g) ≫ g_1 = (f ≫ g) ≫ h → g_1 = h\n[PROOFSTEP]\nintro Z a b w\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Epi f\ng : Y ⟶ Z✝\ninst✝ : Epi g\nZ : C\na b : Z✝ ⟶ Z\nw : (f ≫ g) ≫ a = (f ≫ g) ≫ b\n⊢ a = b\n[PROOFSTEP]\napply (cancel_epi g).1\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Epi f\ng : Y ⟶ Z✝\ninst✝ : Epi g\nZ : C\na b : Z✝ ⟶ Z\nw : (f ≫ g) ≫ a = (f ≫ g) ≫ b\n⊢ g ≫ a = g ≫ b\n[PROOFSTEP]\napply (cancel_epi f).1\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Epi f\ng : Y ⟶ Z✝\ninst✝ : Epi g\nZ : C\na b : Z✝ ⟶ Z\nw : (f ≫ g) ≫ a = (f ≫ g) ≫ b\n⊢ f ≫ g ≫ a = f ≫ g ≫ b\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ninst✝¹ : Mono f\ng : Y ⟶ Z\ninst✝ : Mono g\n⊢ Mono (f ≫ g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ninst✝¹ : Mono f\ng : Y ⟶ Z\ninst✝ : Mono g\n⊢ ∀ {Z_1 : C} (g_1 h : Z_1 ⟶ X), g_1 ≫ f ≫ g = h ≫ f ≫ g → g_1 = h\n[PROOFSTEP]\nintro Z a b w\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Mono f\ng : Y ⟶ Z✝\ninst✝ : Mono g\nZ : C\na b : Z ⟶ X\nw : a ≫ f ≫ g = b ≫ f ≫ g\n⊢ a = b\n[PROOFSTEP]\napply (cancel_mono f).1\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Mono f\ng : Y ⟶ Z✝\ninst✝ : Mono g\nZ : C\na b : Z ⟶ X\nw : a ≫ f ≫ g = b ≫ f ≫ g\n⊢ a ≫ f = b ≫ f\n[PROOFSTEP]\napply (cancel_mono g).1\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ninst✝¹ : Mono f\ng : Y ⟶ Z✝\ninst✝ : Mono g\nZ : C\na b : Z ⟶ X\nw : a ≫ f ≫ g = b ≫ f ≫ g\n⊢ (a ≫ f) ≫ g = (b ≫ f) ≫ g\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono (f ≫ g)\n⊢ Mono f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono (f ≫ g)\n⊢ ∀ {Z : C} (g h : Z ⟶ X), g ≫ f = h ≫ f → g = h\n[PROOFSTEP]\nintro Z a b w\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Mono (f ≫ g)\nZ : C\na b : Z ⟶ X\nw : a ≫ f = b ≫ f\n⊢ a = b\n[PROOFSTEP]\nreplace w := congr_arg (fun k => k ≫ g) w\n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Mono (f ≫ g)\nZ : C\na b : Z ⟶ X\nw : (fun k => k ≫ g) (a ≫ f) = (fun k => k ≫ g) (b ≫ f)\n⊢ a = b\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Mono (f ≫ g)\nZ : C\na b : Z ⟶ X\nw : (a ≫ f) ≫ g = (b ≫ f) ≫ g\n⊢ a = b\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc] at w \n[GOAL]\ncase right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Mono (f ≫ g)\nZ : C\na b : Z ⟶ X\nw : a ≫ f ≫ g = b ≫ f ≫ g\n⊢ a = b\n[PROOFSTEP]\nexact (cancel_mono _).1 w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : X ⟶ Z\ninst✝ : Mono h\nw : f ≫ g = h\n⊢ Mono f\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Mono (f ≫ g)\n⊢ Mono f\n[PROOFSTEP]\nexact mono_of_mono f g\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi (f ≫ g)\n⊢ Epi g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi (f ≫ g)\n⊢ ∀ {Z_1 : C} (g_1 h : Z ⟶ Z_1), g ≫ g_1 = g ≫ h → g_1 = h\n[PROOFSTEP]\nintro Z a b w\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Epi (f ≫ g)\nZ : C\na b : Z✝ ⟶ Z\nw : g ≫ a = g ≫ b\n⊢ a = b\n[PROOFSTEP]\nreplace w := congr_arg (fun k => f ≫ k) w\n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Epi (f ≫ g)\nZ : C\na b : Z✝ ⟶ Z\nw : (fun k => f ≫ k) (g ≫ a) = (fun k => f ≫ k) (g ≫ b)\n⊢ a = b\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Epi (f ≫ g)\nZ : C\na b : Z✝ ⟶ Z\nw : f ≫ g ≫ a = f ≫ g ≫ b\n⊢ a = b\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc] at w \n[GOAL]\ncase left_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝¹ X Y Z✝ : C\nf : X ⟶ Y\ng : Y ⟶ Z✝\ninst✝ : Epi (f ≫ g)\nZ : C\na b : Z✝ ⟶ Z\nw : (f ≫ g) ≫ a = (f ≫ g) ≫ b\n⊢ a = b\n[PROOFSTEP]\nexact (cancel_epi _).1 w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\nh : X ⟶ Z\ninst✝ : Epi h\nw : f ≫ g = h\n⊢ Epi g\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y✝ Z✝ X Y Z : C\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝ : Epi (f ≫ g)\n⊢ Epi g\n[PROOFSTEP]\nexact epi_of_epi f g\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u\ninst✝ : SmallCategory D\n⊢ LargeCategory (ULift D)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.Basic", "llama_tokens": 5861, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6548947425132315, "lm_q2_score": 0.4571367168274948, "lm_q1q2_score": 0.2993764324600862}}
{"text": "[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\nha : IsLeast {g | g ∈ H ∧ 0 < g} a\n⊢ H = closure {a}\n[PROOFSTEP]\nobtain ⟨⟨a_in, a_pos⟩, a_min⟩ := ha\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\n⊢ H = closure {a}\n[PROOFSTEP]\nrefine' le_antisymm _ (H.closure_le.mpr <| by simp [a_in])\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\n⊢ {a} ⊆ ↑H\n[PROOFSTEP]\nsimp [a_in]\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\n⊢ H ≤ closure {a}\n[PROOFSTEP]\nintro g g_in\n[GOAL]\ncase intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\n⊢ g ∈ closure {a}\n[PROOFSTEP]\nobtain ⟨k, ⟨nonneg, lt⟩, _⟩ := existsUnique_zsmul_near_of_pos' a_pos g\n[GOAL]\ncase intro.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\n⊢ g ∈ closure {a}\n[PROOFSTEP]\nhave h_zero : g - k • a = 0 := by\n  by_contra h\n  have h : a ≤ g - k • a := by\n    refine' a_min ⟨_, _⟩\n    · exact AddSubgroup.sub_mem H g_in (AddSubgroup.zsmul_mem H a_in k)\n    · exact lt_of_le_of_ne nonneg (Ne.symm h)\n  have h' : ¬a ≤ g - k • a := not_le.mpr lt\n  contradiction\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\n⊢ g - k • a = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh : ¬g - k • a = 0\n⊢ False\n[PROOFSTEP]\nhave h : a ≤ g - k • a := by\n  refine' a_min ⟨_, _⟩\n  · exact AddSubgroup.sub_mem H g_in (AddSubgroup.zsmul_mem H a_in k)\n  · exact lt_of_le_of_ne nonneg (Ne.symm h)\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh : ¬g - k • a = 0\n⊢ a ≤ g - k • a\n[PROOFSTEP]\nrefine' a_min ⟨_, _⟩\n[GOAL]\ncase refine'_1\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh : ¬g - k • a = 0\n⊢ g - k • a ∈ H\n[PROOFSTEP]\nexact AddSubgroup.sub_mem H g_in (AddSubgroup.zsmul_mem H a_in k)\n[GOAL]\ncase refine'_2\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh : ¬g - k • a = 0\n⊢ 0 < g - k • a\n[PROOFSTEP]\nexact lt_of_le_of_ne nonneg (Ne.symm h)\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh✝ : ¬g - k • a = 0\nh : a ≤ g - k • a\n⊢ False\n[PROOFSTEP]\nhave h' : ¬a ≤ g - k • a := not_le.mpr lt\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh✝ : ¬g - k • a = 0\nh : a ≤ g - k • a\nh' : ¬a ≤ g - k • a\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase intro.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\na_min : a ∈ lowerBounds {g | g ∈ H ∧ 0 < g}\na_in : a ∈ H\na_pos : 0 < a\ng : G\ng_in : g ∈ H\nk : ℤ\nright✝ : ∀ (y : ℤ), (fun k => 0 ≤ g - k • a ∧ g - k • a < a) y → y = k\nnonneg : 0 ≤ g - k • a\nlt : g - k • a < a\nh_zero : g - k • a = 0\n⊢ g ∈ closure {a}\n[PROOFSTEP]\nsimp [sub_eq_zero.mp h_zero, AddSubgroup.mem_closure_singleton]\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\n⊢ ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n[PROOFSTEP]\nhave hex : ∀ g > 0, ∃ n : ℕ, g ∈ Ioc (n • a) ((n + 1) • a) := fun g hg =>\n  by\n  rcases existsUnique_add_zsmul_mem_Ico h₀ 0 (g - a) with ⟨m, ⟨hm, hm'⟩, -⟩\n  simp only [zero_add, sub_le_iff_le_add, sub_add_cancel, ← add_one_zsmul] at hm hm' \n  lift m to ℕ\n  · rw [← Int.lt_add_one_iff, ← zsmul_lt_zsmul_iff h₀, zero_zsmul]\n    exact hg.trans_le hm\n  · simp only [← Nat.cast_succ, coe_nat_zsmul] at hm hm' \n    exact ⟨m, hm', hm⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\n⊢ ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n[PROOFSTEP]\nrcases existsUnique_add_zsmul_mem_Ico h₀ 0 (g - a) with ⟨m, ⟨hm, hm'⟩, -⟩\n[GOAL]\ncase intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℤ\nhm : g - a ≤ 0 + m • a\nhm' : 0 + m • a < g - a + a\n⊢ ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n[PROOFSTEP]\nsimp only [zero_add, sub_le_iff_le_add, sub_add_cancel, ← add_one_zsmul] at hm hm' \n[GOAL]\ncase intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℤ\nhm : g ≤ (m + 1) • a\nhm' : m • a < g\n⊢ ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n[PROOFSTEP]\nlift m to ℕ\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℤ\nhm : g ≤ (m + 1) • a\nhm' : m • a < g\n⊢ 0 ≤ m\n[PROOFSTEP]\nrw [← Int.lt_add_one_iff, ← zsmul_lt_zsmul_iff h₀, zero_zsmul]\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℤ\nhm : g ≤ (m + 1) • a\nhm' : m • a < g\n⊢ 0 < (m + 1) • a\n[PROOFSTEP]\nexact hg.trans_le hm\n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℕ\nhm : g ≤ (↑m + 1) • a\nhm' : ↑m • a < g\n⊢ ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n[PROOFSTEP]\nsimp only [← Nat.cast_succ, coe_nat_zsmul] at hm hm' \n[GOAL]\ncase intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\ng : G\nhg : g > 0\nm : ℕ\nhm : g ≤ Nat.succ m • a\nhm' : m • a < g\n⊢ ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n[PROOFSTEP]\nexact ⟨m, hm', hm⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n⊢ ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n[PROOFSTEP]\nhave : ∃ n : ℕ, Set.Nonempty (H ∩ Ioc (n • a) ((n + 1) • a))\n[GOAL]\ncase this\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\n⊢ ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\n[PROOFSTEP]\nrcases(bot_or_exists_ne_zero H).resolve_left hbot with ⟨g, hgH, hg₀⟩\n[GOAL]\ncase this.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\ng : G\nhgH : g ∈ H\nhg₀ : g ≠ 0\n⊢ ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\n[PROOFSTEP]\nrcases hex |g| (abs_pos.2 hg₀) with ⟨n, hn⟩\n[GOAL]\ncase this.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\ng : G\nhgH : g ∈ H\nhg₀ : g ≠ 0\nn : ℕ\nhn : |g| ∈ Ioc (n • a) ((n + 1) • a)\n⊢ ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\n[PROOFSTEP]\nexact ⟨n, _, (@abs_mem_iff (AddSubgroup G) G _ _).2 hgH, hn⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\n⊢ ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n[PROOFSTEP]\nclassical rcases Nat.findX this with ⟨n, ⟨x, hxH, hnx, hxn⟩, hmin⟩\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\n⊢ ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n[PROOFSTEP]\nrcases Nat.findX this with ⟨n, ⟨x, hxH, hnx, hxn⟩, hmin⟩\n[GOAL]\ncase mk.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\n⊢ ∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n[PROOFSTEP]\nby_contra hxmin\n[GOAL]\ncase mk.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ¬∃ b, IsLeast {g | g ∈ H ∧ 0 < g} b\n⊢ False\n[PROOFSTEP]\nsimp only [IsLeast, not_and, mem_setOf_eq, mem_lowerBounds, not_exists, not_forall, not_le] at hxmin \n[GOAL]\ncase mk.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\n⊢ False\n[PROOFSTEP]\nrcases hxmin x ⟨hxH, (nsmul_nonneg h₀.le _).trans_lt hnx⟩ with ⟨y, ⟨hyH, hy₀⟩, hxy⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\ny : G\nhxy : y < x\nhyH : y ∈ H\nhy₀ : 0 < y\n⊢ False\n[PROOFSTEP]\nrcases hex y hy₀ with ⟨m, hm⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\ny : G\nhxy : y < x\nhyH : y ∈ H\nhy₀ : 0 < y\nm : ℕ\nhm : y ∈ Ioc (m • a) ((m + 1) • a)\n⊢ False\n[PROOFSTEP]\ncases' lt_or_le m n with hmn hnm\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro.inl\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\ny : G\nhxy : y < x\nhyH : y ∈ H\nhy₀ : 0 < y\nm : ℕ\nhm : y ∈ Ioc (m • a) ((m + 1) • a)\nhmn : m < n\n⊢ False\n[PROOFSTEP]\nexact hmin m hmn ⟨y, hyH, hm⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro.inr\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\ny : G\nhxy : y < x\nhyH : y ∈ H\nhy₀ : 0 < y\nm : ℕ\nhm : y ∈ Ioc (m • a) ((m + 1) • a)\nhnm : n ≤ m\n⊢ False\n[PROOFSTEP]\nrefine disjoint_left.1 hd (sub_mem hxH hyH) ⟨sub_pos.2 hxy, sub_lt_iff_lt_add'.2 ?_⟩\n[GOAL]\ncase mk.intro.intro.intro.intro.intro.intro.intro.intro.inr\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\nhbot : H ≠ ⊥\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhex : ∀ (g : G), g > 0 → ∃ n, g ∈ Ioc (n • a) ((n + 1) • a)\nthis : ∃ n, Set.Nonempty (↑H ∩ Ioc (n • a) ((n + 1) • a))\nn : ℕ\nhmin : ∀ (m : ℕ), m < n → ¬Set.Nonempty (↑H ∩ Ioc (m • a) ((m + 1) • a))\nx : G\nhxH : x ∈ ↑H\nhnx : n • a < x\nhxn : x ≤ (n + 1) • a\nhxmin : ∀ (x : G), x ∈ H ∧ 0 < x → ∃ x_1 h, x_1 < x\ny : G\nhxy : y < x\nhyH : y ∈ H\nhy₀ : 0 < y\nm : ℕ\nhm : y ∈ Ioc (m • a) ((m + 1) • a)\nhnm : n ≤ m\n⊢ x < y + a\n[PROOFSTEP]\ncalc\n  x ≤ (n + 1) • a := hxn\n  _ ≤ (m + 1) • a := (nsmul_le_nsmul h₀.le (add_le_add_right hnm _))\n  _ = m • a + a := (succ_nsmul' _ _)\n  _ < y + a := add_lt_add_right hm.1 _\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\n⊢ ∃ b, H = closure {b}\n[PROOFSTEP]\nrcases eq_or_ne H ⊥ with rfl | hbot\n[GOAL]\ncase inl\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\na : G\nh₀ : 0 < a\nhd : Disjoint (↑⊥) (Ioo 0 a)\n⊢ ∃ b, ⊥ = closure {b}\n[PROOFSTEP]\nexact ⟨0, closure_singleton_zero.symm⟩\n[GOAL]\ncase inr\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup G\na : G\nh₀ : 0 < a\nhd : Disjoint (↑H) (Ioo 0 a)\nhbot : H ≠ ⊥\n⊢ ∃ b, H = closure {b}\n[PROOFSTEP]\nexact (exists_isLeast_pos hbot h₀ hd).imp fun _ => cyclic_of_min\n[GOAL]\nG : Type u_1\ninst✝¹ : LinearOrderedAddCommGroup G\ninst✝ : Archimedean G\nH : AddSubgroup ℤ\nthis : Ioo 0 1 = ∅\n⊢ Disjoint (↑H) (Ioo 0 1)\n[PROOFSTEP]\nsimp [this]\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Archimedean", "llama_tokens": 9053, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5964331462646255, "lm_q2_score": 0.5, "lm_q1q2_score": 0.29821657313231276}}
{"text": "[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ Irreducible (factor f)\n[PROOFSTEP]\nrw [factor]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ Irreducible (if H : ∃ g, Irreducible g ∧ g ∣ f then Classical.choose H else X)\n[PROOFSTEP]\nsplit_ifs with H\n[GOAL]\ncase pos\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nH : ∃ g, Irreducible g ∧ g ∣ f\n⊢ Irreducible (Classical.choose H)\n[PROOFSTEP]\nexact (Classical.choose_spec H).1\n[GOAL]\ncase neg\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nH : ¬∃ g, Irreducible g ∧ g ∣ f\n⊢ Irreducible X\n[PROOFSTEP]\nexact irreducible_X\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf1 : ¬IsUnit f\n⊢ factor f ∣ f\n[PROOFSTEP]\nby_cases hf2 : f = 0\n[GOAL]\ncase pos\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf1 : ¬IsUnit f\nhf2 : f = 0\n⊢ factor f ∣ f\n[PROOFSTEP]\nrw [hf2]\n[GOAL]\ncase pos\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf1 : ¬IsUnit f\nhf2 : f = 0\n⊢ factor 0 ∣ 0\n[PROOFSTEP]\nexact dvd_zero _\n[GOAL]\ncase neg\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf1 : ¬IsUnit f\nhf2 : ¬f = 0\n⊢ factor f ∣ f\n[PROOFSTEP]\nrw [factor, dif_pos (WfDvdMonoid.exists_irreducible_factor hf1 hf2)]\n[GOAL]\ncase neg\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf1 : ¬IsUnit f\nhf2 : ¬f = 0\n⊢ Classical.choose (_ : ∃ i, Irreducible i ∧ i ∣ f) ∣ f\n[PROOFSTEP]\nexact (Classical.choose_spec <| WfDvdMonoid.exists_irreducible_factor hf1 hf2).2\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf : natDegree f ≠ 0\n⊢ (X - ↑C (AdjoinRoot.root (factor f))) * removeFactor f = map (AdjoinRoot.of (factor f)) f\n[PROOFSTEP]\nlet ⟨g, hg⟩ := factor_dvd_of_natDegree_ne_zero hf\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf : natDegree f ≠ 0\ng : K[X]\nhg : f = factor f * g\n⊢ (X - ↑C (AdjoinRoot.root (factor f))) * removeFactor f = map (AdjoinRoot.of (factor f)) f\n[PROOFSTEP]\napply (mul_divByMonic_eq_iff_isRoot (R := AdjoinRoot f.factor) (a := AdjoinRoot.root f.factor)).mpr\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nhf : natDegree f ≠ 0\ng : K[X]\nhg : f = factor f * g\n⊢ IsRoot (map (AdjoinRoot.of (factor f)) f) (AdjoinRoot.root (factor f))\n[PROOFSTEP]\nrw [IsRoot.def, eval_map, hg, eval₂_mul, ← hg, AdjoinRoot.eval₂_root, zero_mul]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ natDegree (removeFactor f) = natDegree f - 1\n[PROOFSTEP]\nrw [removeFactor, natDegree_divByMonic (map (AdjoinRoot.of f.factor) f) (monic_X_sub_C _), natDegree_map,\n  natDegree_X_sub_C]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nn : ℕ\nhfn : natDegree f = n + 1\n⊢ natDegree (removeFactor f) = n\n[PROOFSTEP]\nrw [natDegree_removeFactor, hfn, n.add_sub_cancel]\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]), natDegree f = n → Splits (algebraMap K (SplittingFieldAux n f)) f)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhf : natDegree f = Nat.succ n\n⊢ Splits (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f\n[PROOFSTEP]\nrw [← splits_id_iff_splits, algebraMap_succ, ← map_map, splits_id_iff_splits, ←\n  X_sub_C_mul_removeFactor f fun h => by rw [h] at hf ; cases hf]\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]), natDegree f = n → Splits (algebraMap K (SplittingFieldAux n f)) f)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhf : natDegree f = Nat.succ n\nh : natDegree f = 0\n⊢ False\n[PROOFSTEP]\nrw [h] at hf \n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]), natDegree f = n → Splits (algebraMap K (SplittingFieldAux n f)) f)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhf : 0 = Nat.succ n\nh : natDegree f = 0\n⊢ False\n[PROOFSTEP]\ncases hf\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]), natDegree f = n → Splits (algebraMap K (SplittingFieldAux n f)) f)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhf : natDegree f = Nat.succ n\n⊢ Splits (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n    ((X - ↑C (AdjoinRoot.root (factor f))) * removeFactor f)\n[PROOFSTEP]\nexact splits_mul _ (splits_X_sub_C _) (ih _ (natDegree_removeFactor' hf))\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\n⊢ Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f))) = ⊤\n[PROOFSTEP]\nhave hndf : f.natDegree ≠ 0 := by intro h; rw [h] at hfn ; cases hfn\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\n⊢ natDegree f ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nh : natDegree f = 0\n⊢ False\n[PROOFSTEP]\nrw [h] at hfn \n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : 0 = Nat.succ n\nh : natDegree f = 0\n⊢ False\n[PROOFSTEP]\ncases hfn\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\n⊢ Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f))) = ⊤\n[PROOFSTEP]\nhave hfn0 : f ≠ 0 := by intro h; rw [h] at hndf ; exact hndf rfl\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\n⊢ f ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nh : f = 0\n⊢ False\n[PROOFSTEP]\nrw [h] at hndf \n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree 0 ≠ 0\nh : f = 0\n⊢ False\n[PROOFSTEP]\nexact hndf rfl\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\n⊢ Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f))) = ⊤\n[PROOFSTEP]\nhave hmf0 : map (algebraMap K (SplittingFieldAux n.succ f)) f ≠ 0 := map_ne_zero hfn0\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\nhmf0 : map (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f ≠ 0\n⊢ Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux (Nat.succ n) f)) f))) = ⊤\n[PROOFSTEP]\nrw [algebraMap_succ, ← map_map, ← X_sub_C_mul_removeFactor _ hndf, Polynomial.map_mul] at hmf0 ⊢\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\nhmf0 :\n  map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n        (X - ↑C (AdjoinRoot.root (factor f))) *\n      map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f) ≠\n    0\n⊢ Algebra.adjoin K\n      ↑(Multiset.toFinset\n          (roots\n            (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n                (X - ↑C (AdjoinRoot.root (factor f))) *\n              map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f)))) =\n    ⊤\n[PROOFSTEP]\nrw [roots_mul hmf0, Polynomial.map_sub, map_X, map_C, roots_X_sub_C, Multiset.toFinset_add, Finset.coe_union,\n  Multiset.toFinset_singleton, Finset.coe_singleton, Algebra.adjoin_union_eq_adjoin_adjoin, ← Set.image_singleton,\n  Algebra.adjoin_algebraMap K (AdjoinRoot f.factor) (SplittingFieldAux n f.removeFactor), AdjoinRoot.adjoinRoot_eq_top,\n  Algebra.map_top]\n  /- Porting note: was `rw [IsScalarTower.adjoin_range_toAlgHom K (AdjoinRoot f.factor)\n          (SplittingFieldAux n f.removeFactor)]` -/\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\nhmf0 :\n  map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n        (X - ↑C (AdjoinRoot.root (factor f))) *\n      map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f) ≠\n    0\n⊢ Subalgebra.restrictScalars K\n      (Algebra.adjoin\n        { x //\n          x ∈ AlgHom.range (IsScalarTower.toAlgHom K (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) }\n        ↑(Multiset.toFinset\n            (roots\n              (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f))))) =\n    ⊤\n[PROOFSTEP]\nhave :=\n  IsScalarTower.adjoin_range_toAlgHom K (AdjoinRoot f.factor) (SplittingFieldAux n f.removeFactor)\n    (↑(f.removeFactor.map <| algebraMap (AdjoinRoot f.factor) <| SplittingFieldAux n f.removeFactor).roots.toFinset :\n      Set (SplittingFieldAux n f.removeFactor))\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\nhmf0 :\n  map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n        (X - ↑C (AdjoinRoot.root (factor f))) *\n      map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f) ≠\n    0\nthis :\n  Subalgebra.restrictScalars K\n      (Algebra.adjoin\n        { x //\n          x ∈ AlgHom.range (IsScalarTower.toAlgHom K (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) }\n        ↑(Multiset.toFinset\n            (roots\n              (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f))))) =\n    Subalgebra.restrictScalars K\n      (Algebra.adjoin (AdjoinRoot (factor f))\n        ↑(Multiset.toFinset\n            (roots (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f)))))\n⊢ Subalgebra.restrictScalars K\n      (Algebra.adjoin\n        { x //\n          x ∈ AlgHom.range (IsScalarTower.toAlgHom K (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) }\n        ↑(Multiset.toFinset\n            (roots\n              (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f))))) =\n    ⊤\n[PROOFSTEP]\nrefine this.trans ?_\n[GOAL]\nF : Type u\nK✝¹ : Type v\nL : Type w\ninst✝³ : Field K✝¹\ninst✝² : Field L\ninst✝¹ : Field F\nn✝ : ℕ\nK✝ : Type u\ninst✝ : Field K✝\nn : ℕ\nih :\n  (fun n =>\n      ∀ {K : Type u} [inst : Field K] (f : K[X]),\n        natDegree f = n →\n          Algebra.adjoin K ↑(Multiset.toFinset (roots (map (algebraMap K (SplittingFieldAux n f)) f))) = ⊤)\n    n\nK : Type u\nx✝ : Field K\nf : K[X]\nhfn : natDegree f = Nat.succ n\nhndf : natDegree f ≠ 0\nhfn0 : f ≠ 0\nhmf0 :\n  map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f)))\n        (X - ↑C (AdjoinRoot.root (factor f))) *\n      map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f) ≠\n    0\nthis :\n  Subalgebra.restrictScalars K\n      (Algebra.adjoin\n        { x //\n          x ∈ AlgHom.range (IsScalarTower.toAlgHom K (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) }\n        ↑(Multiset.toFinset\n            (roots\n              (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f))))) =\n    Subalgebra.restrictScalars K\n      (Algebra.adjoin (AdjoinRoot (factor f))\n        ↑(Multiset.toFinset\n            (roots (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f)))))\n⊢ Subalgebra.restrictScalars K\n      (Algebra.adjoin (AdjoinRoot (factor f))\n        ↑(Multiset.toFinset\n            (roots\n              (map (algebraMap (AdjoinRoot (factor f)) (SplittingFieldAux n (removeFactor f))) (removeFactor f))))) =\n    ⊤\n[PROOFSTEP]\nrw [ih _ (natDegree_removeFactor' hfn), Subalgebra.restrictScalars_top]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ Function.Surjective ↑(ofMvPolynomial f)\n[PROOFSTEP]\nsuffices AlgHom.range (ofMvPolynomial f) = ⊤ by rw [← Set.range_iff_surjective]; rwa [SetLike.ext'_iff] at this \n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nthis : AlgHom.range (ofMvPolynomial f) = ⊤\n⊢ Function.Surjective ↑(ofMvPolynomial f)\n[PROOFSTEP]\nrw [← Set.range_iff_surjective]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nthis : AlgHom.range (ofMvPolynomial f) = ⊤\n⊢ Set.range ↑(ofMvPolynomial f) = Set.univ\n[PROOFSTEP]\nrwa [SetLike.ext'_iff] at this \n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ AlgHom.range (ofMvPolynomial f) = ⊤\n[PROOFSTEP]\nrw [ofMvPolynomial, ← Algebra.adjoin_range_eq_range_aeval K, eq_top_iff, ← adjoin_rootSet _ _ rfl]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ Algebra.adjoin K (rootSet f (SplittingFieldAux (natDegree f) f)) ≤ Algebra.adjoin K (Set.range fun i => ↑i)\n[PROOFSTEP]\napply Algebra.adjoin_le\n[GOAL]\ncase H\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\n⊢ rootSet f (SplittingFieldAux (natDegree f) f) ⊆ ↑(Algebra.adjoin K (Set.range fun i => ↑i))\n[PROOFSTEP]\nintro α hα\n[GOAL]\ncase H\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nα : SplittingFieldAux (natDegree f) f\nhα : α ∈ rootSet f (SplittingFieldAux (natDegree f) f)\n⊢ α ∈ ↑(Algebra.adjoin K (Set.range fun i => ↑i))\n[PROOFSTEP]\napply Algebra.subset_adjoin\n[GOAL]\ncase H.a\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\nα : SplittingFieldAux (natDegree f) f\nhα : α ∈ rootSet f (SplittingFieldAux (natDegree f) f)\n⊢ α ∈ Set.range fun i => ↑i\n[PROOFSTEP]\nexact ⟨⟨α, hα⟩, rfl⟩\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\napply_fun e\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\n⊢ ↑e (a * a⁻¹) = ↑e 1\n[PROOFSTEP]\nhave : e a ≠ 0 := fun w' => by\n  apply w\n  simp at w' \n  exact w'\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nw' : ↑e a = 0\n⊢ False\n[PROOFSTEP]\napply w\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nw' : ↑e a = 0\n⊢ a = 0\n[PROOFSTEP]\nsimp at w' \n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nw' : a = 0\n⊢ a = 0\n[PROOFSTEP]\nexact w'\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nthis : ↑e a ≠ 0\n⊢ ↑e (a * a⁻¹) = ↑e 1\n[PROOFSTEP]\nsimp only [map_mul, AlgEquiv.apply_symm_apply, ne_eq, AddEquivClass.map_eq_zero_iff, map_one]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nthis : ↑e a ≠ 0\n⊢ ↑(algEquivSplittingFieldAux f) a * (↑(algEquivSplittingFieldAux f) a)⁻¹ = 1\n[PROOFSTEP]\nrw [mul_inv_cancel]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : SplittingField f\nw : a ≠ 0\nthis : ↑e a ≠ 0\n⊢ ↑(algEquivSplittingFieldAux f) a ≠ 0\n[PROOFSTEP]\nassumption\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\napply_fun e\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑e ↑(Rat.mk' a b) = ↑e (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nchange e (algebraMap K _ _) = _\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑e (↑(algebraMap K (SplittingField f)) ↑(Rat.mk' a b)) = ↑e (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nsimp only [map_ratCast, map_natCast, map_mul, map_intCast, AlgEquiv.commutes, AlgEquiv.apply_symm_apply]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\napply Field.ratCast_mk\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℚ\nx : SplittingField f\np : MvPolynomial (↑(rootSet f (SplittingFieldAux (natDegree f) f))) K\n⊢ (fun x x_1 => x • x_1) a p =\n    (fun x x_1 => x * x_1) (↑(algebraMap K (MvPolynomial (↑(rootSet f (SplittingFieldAux (natDegree f) f))) K)) ↑a) p\n[PROOFSTEP]\next\n[GOAL]\ncase a\nF : Type u\nK : Type v\nL : Type w\ninst✝² : Field K\ninst✝¹ : Field L\ninst✝ : Field F\nf : K[X]\ne : SplittingField f ≃ₐ[K] SplittingFieldAux (natDegree f) f := algEquivSplittingFieldAux f\na : ℚ\nx : SplittingField f\np : MvPolynomial (↑(rootSet f (SplittingFieldAux (natDegree f) f))) K\nm✝ : ↑(rootSet f (SplittingFieldAux (natDegree f) f)) →₀ ℕ\n⊢ MvPolynomial.coeff m✝ ((fun x x_1 => x • x_1) a p) =\n    MvPolynomial.coeff m✝\n      ((fun x x_1 => x * x_1) (↑(algebraMap K (MvPolynomial (↑(rootSet f (SplittingFieldAux (natDegree f) f))) K)) ↑a)\n        p)\n[PROOFSTEP]\nsimp [MvPolynomial.algebraMap_eq, Rat.smul_def]\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\n⊢ L ≃ₐ[K] SplittingField f\n[PROOFSTEP]\nrefine'\n  AlgEquiv.ofBijective (lift L f <| splits (SplittingField f) f)\n    ⟨RingHom.injective (lift L f <| splits (SplittingField f) f).toRingHom, _⟩\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\n⊢ Function.Surjective ↑(lift L f (_ : Splits (algebraMap K (SplittingField f)) f))\n[PROOFSTEP]\nhaveI := finiteDimensional (SplittingField f) f\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\nthis : FiniteDimensional K (SplittingField f)\n⊢ Function.Surjective ↑(lift L f (_ : Splits (algebraMap K (SplittingField f)) f))\n[PROOFSTEP]\nhaveI := finiteDimensional L f\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\nthis✝ : FiniteDimensional K (SplittingField f)\nthis : FiniteDimensional K L\n⊢ Function.Surjective ↑(lift L f (_ : Splits (algebraMap K (SplittingField f)) f))\n[PROOFSTEP]\nhave : FiniteDimensional.finrank K L = FiniteDimensional.finrank K (SplittingField f) :=\n  le_antisymm\n    (LinearMap.finrank_le_finrank_of_injective\n      (show Function.Injective (lift L f <| splits (SplittingField f) f).toLinearMap from\n        RingHom.injective (lift L f <| splits (SplittingField f) f : L →+* f.SplittingField)))\n    (LinearMap.finrank_le_finrank_of_injective\n      (show Function.Injective (lift (SplittingField f) f <| splits L f).toLinearMap from\n        RingHom.injective (lift (SplittingField f) f <| splits L f : f.SplittingField →+* L)))\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\nthis✝¹ : FiniteDimensional K (SplittingField f)\nthis✝ : FiniteDimensional K L\nthis : FiniteDimensional.finrank K L = FiniteDimensional.finrank K (SplittingField f)\n⊢ Function.Surjective ↑(lift L f (_ : Splits (algebraMap K (SplittingField f)) f))\n[PROOFSTEP]\nchange Function.Surjective (lift L f <| splits (SplittingField f) f).toLinearMap\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\nthis✝¹ : FiniteDimensional K (SplittingField f)\nthis✝ : FiniteDimensional K L\nthis : FiniteDimensional.finrank K L = FiniteDimensional.finrank K (SplittingField f)\n⊢ Function.Surjective ↑(AlgHom.toLinearMap (lift L f (_ : Splits (algebraMap K (SplittingField f)) f)))\n[PROOFSTEP]\nrefine' (LinearMap.injective_iff_surjective_of_finrank_eq_finrank this).1 _\n[GOAL]\nF : Type u\nK : Type v\nL : Type w\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K L\nf : K[X]\ninst✝ : IsSplittingField K L f\nthis✝¹ : FiniteDimensional K (SplittingField f)\nthis✝ : FiniteDimensional K L\nthis : FiniteDimensional.finrank K L = FiniteDimensional.finrank K (SplittingField f)\n⊢ Function.Injective ↑(AlgHom.toLinearMap (lift L f (_ : Splits (algebraMap K (SplittingField f)) f)))\n[PROOFSTEP]\nexact RingHom.injective (lift L f <| splits (SplittingField f) f : L →+* f.SplittingField)\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.SplittingField.Construction", "llama_tokens": 12843, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5813030906443133, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.29746244384854564}}
{"text": "[GOAL]\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\n⊢ run (f <$> x) = Option.map f <$> run x\n[PROOFSTEP]\nrw [← bind_pure_comp _ x.run]\n[GOAL]\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\n⊢ run (f <$> x) = do\n    let a ← run x\n    pure (Option.map f a)\n[PROOFSTEP]\nchange\n  x.run >>=\n      (fun\n        | some a => OptionT.run (pure (f a))\n        | none => pure none) =\n    _\n[GOAL]\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\n⊢ (do\n      let x ← run x\n      match x with\n        | some a => run (pure (f a))\n        | none => pure none) =\n    do\n    let a ← run x\n    pure (Option.map f a)\n[PROOFSTEP]\napply bind_congr\n[GOAL]\ncase h\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\n⊢ ∀ (a : Option α),\n    (match a with\n      | some a => run (pure (f a))\n      | none => pure none) =\n      pure (Option.map f a)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\na : Option α\n⊢ (match a with\n    | some a => run (pure (f a))\n    | none => pure none) =\n    pure (Option.map f a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase h.none\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\n⊢ (match none with\n    | some a => run (pure (f a))\n    | none => pure none) =\n    pure (Option.map f none)\n[PROOFSTEP]\nsimp [Option.map, Option.bind]\n[GOAL]\ncase h.some\nα β : Type u\nm : Type u → Type v\nx : OptionT m α\ninst✝¹ : Monad m\nf : α → β\ninst✝ : LawfulMonad m\nval✝ : α\n⊢ (match some val✝ with\n    | some a => run (pure (f a))\n    | none => pure none) =\n    pure (Option.map f (some val✝))\n[PROOFSTEP]\nsimp [Option.map, Option.bind]\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\n⊢ ∀ {α : Type u} (x : OptionT m α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\napply OptionT.ext\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\n⊢ OptionT.run (id <$> x✝) = OptionT.run x✝\n[PROOFSTEP]\nsimp only [OptionT.run_map]\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\n⊢ Option.map id <$> OptionT.run x✝ = OptionT.run x✝\n[PROOFSTEP]\nrw [map_congr, id_map]\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\n⊢ ∀ (a : Option α✝), Option.map id a = id a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\na : Option α✝\n⊢ Option.map id a = id a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase h.none\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\n⊢ Option.map id none = id none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.some\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ : Type u\nx✝ : OptionT m α✝\nval✝ : α✝\n⊢ Option.map id (some val✝) = id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\n⊢ ∀ {α β : Type u} (x : α) (f : α → OptionT m β), pure x >>= f = f x\n[PROOFSTEP]\nintros\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ : Type u\nx✝ : α✝\nf✝ : α✝ → OptionT m β✝\n⊢ pure x✝ >>= f✝ = f✝ x✝\n[PROOFSTEP]\napply OptionT.ext\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ : Type u\nx✝ : α✝\nf✝ : α✝ → OptionT m β✝\n⊢ OptionT.run (pure x✝ >>= f✝) = OptionT.run (f✝ x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\n⊢ ∀ {α β γ : Type u} (x : OptionT m α) (f : α → OptionT m β) (g : β → OptionT m γ),\n    x >>= f >>= g = x >>= fun x => f x >>= g\n[PROOFSTEP]\nintros\n[GOAL]\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\n⊢ x✝ >>= f✝ >>= g✝ = x✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\napply OptionT.ext\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\n⊢ OptionT.run (x✝ >>= f✝ >>= g✝) = OptionT.run (x✝ >>= fun x => f✝ x >>= g✝)\n[PROOFSTEP]\nsimp only [OptionT.run_bind, bind_assoc]\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\n⊢ (do\n      let x ← OptionT.run x✝\n      let x ←\n        match x with\n          | some a => OptionT.run (f✝ a)\n          | none => pure none\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none) =\n    do\n    let x ← OptionT.run x✝\n    match x with\n      | some a => do\n        let x ← OptionT.run (f✝ a)\n        match x with\n          | some a => OptionT.run (g✝ a)\n          | none => pure none\n      | none => pure none\n[PROOFSTEP]\nrw [bind_congr]\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\n⊢ ∀ (a : Option α✝),\n    (do\n        let x ←\n          match a with\n            | some a => OptionT.run (f✝ a)\n            | none => pure none\n        match x with\n          | some a => OptionT.run (g✝ a)\n          | none => pure none) =\n      match a with\n      | some a => do\n        let x ← OptionT.run (f✝ a)\n        match x with\n          | some a => OptionT.run (g✝ a)\n          | none => pure none\n      | none => pure none\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\na : Option α✝\n⊢ (do\n      let x ←\n        match a with\n          | some a => OptionT.run (f✝ a)\n          | none => pure none\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none) =\n    match a with\n    | some a => do\n      let x ← OptionT.run (f✝ a)\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none\n    | none => pure none\n[PROOFSTEP]\ncases a\n[GOAL]\ncase h.none\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\n⊢ (do\n      let x ←\n        match none with\n          | some a => OptionT.run (f✝ a)\n          | none => pure none\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none) =\n    match none with\n    | some a => do\n      let x ← OptionT.run (f✝ a)\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none\n    | none => pure none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.some\nm : Type u → Type v\ninst✝¹ : Monad m\ninst✝ : LawfulMonad m\nα✝ β✝ γ✝ : Type u\nx✝ : OptionT m α✝\nf✝ : α✝ → OptionT m β✝\ng✝ : β✝ → OptionT m γ✝\nval✝ : α✝\n⊢ (do\n      let x ←\n        match some val✝ with\n          | some a => OptionT.run (f✝ a)\n          | none => pure none\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none) =\n    match some val✝ with\n    | some a => do\n      let x ← OptionT.run (f✝ a)\n      match x with\n        | some a => OptionT.run (g✝ a)\n        | none => pure none\n    | none => pure none\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Init.Control.Lawful", "llama_tokens": 3649, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.29731079805152366}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g✝ : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Filter α\nh₁ : NeBot f\nh₂ : ∀ (g : Filter α), NeBot g → g ≤ f → f ≤ g\ng : Filter α\nneBot'✝ : NeBot g\nle_of_le✝ : ∀ (g_1 : Filter α), NeBot g_1 → g_1 ≤ g → g ≤ g_1\nx✝ : ↑{ toFilter := f, neBot' := h₁, le_of_le := h₂ } = ↑{ toFilter := g, neBot' := neBot'✝, le_of_le := le_of_le✝ }\n⊢ { toFilter := f, neBot' := h₁, le_of_le := h₂ } = { toFilter := g, neBot' := neBot'✝, le_of_le := le_of_le✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g✝ : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter α\ng : Filter α\nhg : NeBot (g ⊓ ↑f)\n⊢ NeBot (↑f ⊓ g)\n[PROOFSTEP]\nrwa [inf_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g✝ : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter α\ng : Filter α\n⊢ Disjoint (↑f) g ↔ ¬↑f ≤ g\n[PROOFSTEP]\nrw [← inf_neBot_iff, neBot_iff, Ne.def, not_not, disjoint_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\nhsc : ¬sᶜ ∈ f\nh : ↑f ⊓ 𝓟 s = ⊥\n⊢ ↑f ⊓ 𝓟 sᶜᶜ = ⊥\n[PROOFSTEP]\nrwa [compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\n⊢ sᶜ ∈ f ↔ ¬s ∈ f\n[PROOFSTEP]\nrw [← compl_not_mem_iff, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Filter α\nh : ∀ (s : Set α), ¬sᶜ ∈ f ↔ s ∈ f\nhf : f = ⊥\n⊢ False\n[PROOFSTEP]\nsimp [hf] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g✝ : Ultrafilter α\ns t : Set α\np q : α → Prop\nu : Ultrafilter α\nf g : Filter α\n⊢ ¬↑u ≤ f ⊔ g ↔ ¬(↑u ≤ f ∨ ↑u ≤ g)\n[PROOFSTEP]\nsimp only [← disjoint_iff_not_le, not_or, disjoint_sup_right]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\n⊢ s ∪ t ∈ f ↔ s ∈ f ∨ t ∈ f\n[PROOFSTEP]\nsimp only [← mem_coe, ← le_principal_iff, ← sup_principal, le_sup_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\n⊢ (∀ᶠ (x : α) in ↑f, p x → q x) ↔ (∀ᶠ (x : α) in ↑f, p x) → ∀ᶠ (x : α) in ↑f, q x\n[PROOFSTEP]\nsimp only [imp_iff_not_or, eventually_or, eventually_not]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns✝ t : Set α\np q : α → Prop\ns : Set (Set α)\nhs : Set.Finite s\n⊢ ⋃₀ ∅ ∈ f ↔ ∃ t, t ∈ ∅ ∧ t ∈ f\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns✝¹ t : Set α\np q : α → Prop\ns : Set (Set α)\nhs : Set.Finite s\na✝ : Set α\ns✝ : Set (Set α)\nx✝¹ : ¬a✝ ∈ s✝\nx✝ : Set.Finite s✝\nhis : ⋃₀ s✝ ∈ f ↔ ∃ t, t ∈ s✝ ∧ t ∈ f\n⊢ ⋃₀ insert a✝ s✝ ∈ f ↔ ∃ t, t ∈ insert a✝ s✝ ∧ t ∈ f\n[PROOFSTEP]\nsimp [union_mem_iff, his, or_and_right, exists_or]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns✝ t : Set α\np q : α → Prop\nis : Set β\ns : β → Set α\nhis : Set.Finite is\n⊢ ⋃ (i : β) (_ : i ∈ is), s i ∈ f ↔ ∃ i, i ∈ is ∧ s i ∈ f\n[PROOFSTEP]\nsimp only [← sUnion_image, finite_sUnion_mem_iff (his.image s), bex_image_iff]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g✝ : Ultrafilter α\ns t : Set α\np q : α → Prop\nm : α → β\nu : Ultrafilter β\ninj : Injective m\nlarge : range m ∈ u\ng : Filter α\nhg : NeBot g\nhgu : g ≤ Filter.comap m ↑u\n⊢ Filter.comap m ↑u ≤ g\n[PROOFSTEP]\nsimp only [← u.unique (map_le_iff_le_comap.2 hgu), comap_map inj, le_rfl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter α\nh₀ : optParam (Injective id) (_ : Injective id)\n⊢ range id ∈ f\n[PROOFSTEP]\nrw [range_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter α\nh₀ : optParam (Injective id) (_ : Injective id)\n⊢ univ ∈ f\n[PROOFSTEP]\nexact univ_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter γ\nm : α → β\nn : β → γ\ninj₀ : Injective n\nlarge₀ : range n ∈ f\ninj₁ : Injective m\nlarge₁ : range m ∈ comap f inj₀ large₀\ninj₂ : optParam (Injective (n ∘ m)) (_ : Injective (n ∘ m))\n⊢ range (n ∘ m) ∈ f\n[PROOFSTEP]\nrw [range_comp]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns t : Set α\np q : α → Prop\nf : Ultrafilter γ\nm : α → β\nn : β → γ\ninj₀ : Injective n\nlarge₀ : range n ∈ f\ninj₁ : Injective m\nlarge₁ : range m ∈ comap f inj₀ large₀\ninj₂ : optParam (Injective (n ∘ m)) (_ : Injective (n ∘ m))\n⊢ n '' range m ∈ f\n[PROOFSTEP]\nexact image_mem_of_mem_comap large₀ large₁\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns✝ t : Set α\np q : α → Prop\nα✝ : Type ?u.19487\na : α✝\ns : Set α✝\n⊢ ¬sᶜ ∈ pure a ↔ s ∈ pure a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\nm : α → β\na : α\ninj : Injective m\nlarge : range m ∈ pure (m a)\n⊢ 𝓟 (m ⁻¹' {m a}) = ↑(pure a)\n[PROOFSTEP]\nrw [coe_pure, ← principal_singleton, ← image_singleton, preimage_image_eq _ inj]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\nh : Set.Finite s\nh' : s ∈ f\n⊢ ∃ x, x ∈ s ∧ f = pure x\n[PROOFSTEP]\nrw [← biUnion_of_singleton s] at h' \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\nh : Set.Finite s\nh' : ⋃ (x : α) (_ : x ∈ s), {x} ∈ f\n⊢ ∃ x, x ∈ s ∧ f = pure x\n[PROOFSTEP]\nrcases(Ultrafilter.finite_biUnion_mem_iff h).mp h' with ⟨a, has, haf⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type u_1\nf g : Ultrafilter α\ns t : Set α\np q : α → Prop\nh : Set.Finite s\nh' : ⋃ (x : α) (_ : x ∈ s), {x} ∈ f\na : α\nhas : a ∈ s\nhaf : {a} ∈ f\n⊢ ∃ x, x ∈ s ∧ f = pure x\n[PROOFSTEP]\nexact ⟨a, has, eq_of_le (Filter.le_pure_iff.2 haf)⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ g : Ultrafilter α\ns✝ t : Set α\np q : α → Prop\nf : Ultrafilter α\nm : α → Ultrafilter β\ns : Set β\n⊢ (¬sᶜ ∈ Filter.bind ↑f fun x => ↑(m x)) ↔ s ∈ Filter.bind ↑f fun x => ↑(m x)\n[PROOFSTEP]\nsimp only [mem_bind', mem_coe, ← compl_mem_iff_not_mem, compl_setOf, compl_compl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\n⊢ s ∈ f ↔ ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g\n[PROOFSTEP]\nrefine' ⟨fun hf g hg => hg hf, fun H => by_contra fun hf => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\nH : ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g\nhf : ¬s ∈ f\n⊢ False\n[PROOFSTEP]\nset g : Filter (sᶜ : Set α) := comap (↑) f\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\nH : ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g\nhf : ¬s ∈ f\ng : Filter ↑sᶜ := comap Subtype.val f\n⊢ False\n[PROOFSTEP]\nhaveI : NeBot g := comap_neBot_iff_compl_range.2 (by simpa [compl_setOf])\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\nH : ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g\nhf : ¬s ∈ f\ng : Filter ↑sᶜ := comap Subtype.val f\n⊢ ¬(range Subtype.val)ᶜ ∈ f\n[PROOFSTEP]\nsimpa [compl_setOf]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\nH : ∀ (g : Ultrafilter α), ↑g ≤ f → s ∈ g\nhf : ¬s ∈ f\ng : Filter ↑sᶜ := comap Subtype.val f\nthis : NeBot g\n⊢ False\n[PROOFSTEP]\nsimpa using H ((of g).map (↑)) (map_le_iff_le_comap.mpr (of_le g))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ : Filter α\ns : Set α\na : α\nf f' : Filter α\n⊢ ⨆ (g : Ultrafilter α) (_ : ↑g ≤ f), ↑g ≤ f' ↔ f ≤ f'\n[PROOFSTEP]\nsimp only [iSup_le_iff, ← le_iff_ultrafilter]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ : Filter α\ns : Set α\na : α\nf : α → β\nl₁ : Filter α\nl₂ : Filter β\n⊢ Tendsto f l₁ l₂ ↔ ∀ (g : Ultrafilter α), ↑g ≤ l₁ → Tendsto f (↑g) l₂\n[PROOFSTEP]\nsimpa only [tendsto_iff_comap] using le_iff_ultrafilter\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\ng : Filter α\np : Filter α → Prop\nhp : Monotone p\n⊢ (∀ (f : Filter α), NeBot f → f ≤ g → p f) ↔ ∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f\n[PROOFSTEP]\nrefine' ⟨fun H f hf => H f f.neBot hf, _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf : Filter α\ns : Set α\na : α\ng : Filter α\np : Filter α → Prop\nhp : Monotone p\n⊢ (∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f) → ∀ (f : Filter α), NeBot f → f ≤ g → p f\n[PROOFSTEP]\nintro H f hf hfg\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nf✝ : Filter α\ns : Set α\na : α\ng : Filter α\np : Filter α → Prop\nhp : Monotone p\nH : ∀ (f : Ultrafilter α), ↑f ≤ g → p ↑f\nf : Filter α\nhf : NeBot f\nhfg : f ≤ g\n⊢ p f\n[PROOFSTEP]\nexact hp (of_le f) (H _ ((of_le f).trans hfg))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\n⊢ s ∈ ofComapInfPrincipal h\n[PROOFSTEP]\nlet f := Filter.comap m g ⊓ 𝓟 s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\n⊢ s ∈ ofComapInfPrincipal h\n[PROOFSTEP]\nhaveI : f.NeBot := comap_inf_principal_neBot_of_image_mem h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\nthis : NeBot f\n⊢ s ∈ ofComapInfPrincipal h\n[PROOFSTEP]\nhave : s ∈ f := mem_inf_of_right (mem_principal_self s)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\nthis✝ : NeBot f\nthis : s ∈ f\n⊢ s ∈ ofComapInfPrincipal h\n[PROOFSTEP]\nexact le_def.mp (of_le _) s this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\n⊢ map m (ofComapInfPrincipal h) = g\n[PROOFSTEP]\nlet f := Filter.comap m g ⊓ 𝓟 s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\n⊢ map m (ofComapInfPrincipal h) = g\n[PROOFSTEP]\nhaveI : f.NeBot := comap_inf_principal_neBot_of_image_mem h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\nthis : NeBot f\n⊢ map m (ofComapInfPrincipal h) = g\n[PROOFSTEP]\napply eq_of_le\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\nthis : NeBot f\n⊢ ↑(map m (ofComapInfPrincipal h)) ≤ ↑g\n[PROOFSTEP]\ncalc\n  Filter.map m (of f) ≤ Filter.map m f := map_mono (of_le _)\n  _ ≤ (Filter.map m <| Filter.comap m g) ⊓ Filter.map m (𝓟 s) := map_inf_le\n  _ = (Filter.map m <| Filter.comap m g) ⊓ (𝓟 <| m '' s) := by rw [map_principal]\n  _ ≤ ↑g ⊓ (𝓟 <| m '' s) := (inf_le_inf_right _ map_comap_le)\n  _ = ↑g := inf_of_le_left (le_principal_iff.mpr h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type u_1\nm : α → β\ns : Set α\ng : Ultrafilter β\nh : m '' s ∈ g\nf : Filter α := Filter.comap m ↑g ⊓ 𝓟 s\nthis : NeBot f\n⊢ Filter.map m (Filter.comap m ↑g) ⊓ Filter.map m (𝓟 s) = Filter.map m (Filter.comap m ↑g) ⊓ 𝓟 (m '' s)\n[PROOFSTEP]\nrw [map_principal]\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Ultrafilter", "llama_tokens": 5558, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6039318479832805, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.29724809036130573}}
{"text": "[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ f : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nx y : M\n⊢ Pi.prod (↑f) (↑g) (x + y) = Pi.prod (↑f) (↑g) x + Pi.prod (↑f) (↑g) y\n[PROOFSTEP]\nsimp only [Pi.prod, Prod.mk_add_mk, map_add]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ f : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nc : R\nx : M\n⊢ AddHom.toFun\n      { toFun := Pi.prod ↑f ↑g, map_add' := (_ : ∀ (x y : M), (↑f (x + y), ↑g (x + y)) = (↑f x + ↑f y, ↑g x + ↑g y)) }\n      (c • x) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := Pi.prod ↑f ↑g, map_add' := (_ : ∀ (x y : M), (↑f (x + y), ↑g (x + y)) = (↑f x + ↑f y, ↑g x + ↑g y)) }\n        x\n[PROOFSTEP]\nsimp only [Pi.prod, Prod.smul_mk, map_smul, RingHom.id_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)\n⊢ (fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => prod f.fst f.snd,\n                map_add' :=\n                  (_ :\n                    ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                      (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n            map_smul' :=\n              (_ :\n                ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                  AddHom.toFun\n                      { toFun := fun f => prod f.fst f.snd,\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                              (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                      (r • a) =\n                    AddHom.toFun\n                      { toFun := fun f => prod f.fst f.snd,\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                              (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                      (r • a)) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)\nx✝ : M\n⊢ ↑((fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f))\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f => prod f.fst f.snd,\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                            (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                        AddHom.toFun\n                            { toFun := fun f => prod f.fst f.snd,\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                    (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                            (r • a) =\n                          AddHom.toFun\n                            { toFun := fun f => prod f.fst f.snd,\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                    (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                            (r • a)) }.toAddHom\n              f)).fst\n      x✝ =\n    ↑f.fst x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)\nx✝ : M\n⊢ ↑((fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f))\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f => prod f.fst f.snd,\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                            (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                        AddHom.toFun\n                            { toFun := fun f => prod f.fst f.snd,\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                    (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                            (r • a) =\n                          AddHom.toFun\n                            { toFun := fun f => prod f.fst f.snd,\n                              map_add' :=\n                                (_ :\n                                  ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                    (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                            (r • a)) }.toAddHom\n              f)).snd\n      x✝ =\n    ↑f.snd x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : M →ₗ[R] M₂ × M₃\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => prod f.fst f.snd,\n              map_add' :=\n                (_ :\n                  ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                    (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                AddHom.toFun\n                    { toFun := fun f => prod f.fst f.snd,\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                            (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                    (r • a) =\n                  AddHom.toFun\n                    { toFun := fun f => prod f.fst f.snd,\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                            (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                    (r • a)) }.toAddHom\n      ((fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f)) f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h₁\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : M →ₗ[R] M₂ × M₃\nx✝ : M\n⊢ (↑(AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => prod f.fst f.snd,\n                    map_add' :=\n                      (_ :\n                        ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                          (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                      AddHom.toFun\n                          { toFun := fun f => prod f.fst f.snd,\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                  (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                          (r • a) =\n                        AddHom.toFun\n                          { toFun := fun f => prod f.fst f.snd,\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                  (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                          (r • a)) }.toAddHom\n            ((fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f)) f))\n        x✝).fst =\n    (↑f x✝).fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.h₂\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝³ : Module S M₂\ninst✝² : Module S M₃\ninst✝¹ : SMulCommClass R S M₂\ninst✝ : SMulCommClass R S M₃\nf : M →ₗ[R] M₂ × M₃\nx✝ : M\n⊢ (↑(AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => prod f.fst f.snd,\n                    map_add' :=\n                      (_ :\n                        ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                          (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : S) (a : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                      AddHom.toFun\n                          { toFun := fun f => prod f.fst f.snd,\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                  (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                          (r • a) =\n                        AddHom.toFun\n                          { toFun := fun f => prod f.fst f.snd,\n                            map_add' :=\n                              (_ :\n                                ∀ (a b : (M →ₗ[R] M₂) × (M →ₗ[R] M₃)),\n                                  (fun f => prod f.fst f.snd) (a + b) = (fun f => prod f.fst f.snd) (a + b)) }\n                          (r • a)) }.toAddHom\n            ((fun f => (comp (fst R M₂ M₃) f, comp (snd R M₂ M₃) f)) f))\n        x✝).snd =\n    (↑f x✝).snd\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\n⊢ range (inl R M M₂) = ker (snd R M M₂)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ x ∈ range (inl R M M₂) ↔ x ∈ ker (snd R M M₂)\n[PROOFSTEP]\nsimp only [mem_ker, mem_range]\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ (∃ y, ↑(inl R M M₂) y = x) ↔ ↑(snd R M M₂) x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ (∃ y, ↑(inl R M M₂) y = x) → ↑(snd R M M₂) x = 0\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase h.mp.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\ny : M\n⊢ ↑(snd R M M₂) (↑(inl R M M₂) y) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ ↑(snd R M M₂) x = 0 → ∃ y, ↑(inl R M M₂) y = x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\nh : ↑(snd R M M₂) x = 0\n⊢ ∃ y, ↑(inl R M M₂) y = x\n[PROOFSTEP]\nexact ⟨x.fst, Prod.ext rfl h.symm⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\n⊢ range (inr R M M₂) = ker (fst R M M₂)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ x ∈ range (inr R M M₂) ↔ x ∈ ker (fst R M M₂)\n[PROOFSTEP]\nsimp only [mem_ker, mem_range]\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ (∃ y, ↑(inr R M M₂) y = x) ↔ ↑(fst R M M₂) x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ (∃ y, ↑(inr R M M₂) y = x) → ↑(fst R M M₂) x = 0\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase h.mp.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\ny : M₂\n⊢ ↑(fst R M M₂) (↑(inr R M M₂) y) = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\n⊢ ↑(fst R M M₂) x = 0 → ∃ y, ↑(inr R M M₂) y = x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx : M × M₂\nh : ↑(fst R M M₂) x = 0\n⊢ ∃ y, ↑(inr R M M₂) y = x\n[PROOFSTEP]\nexact ⟨x.snd, Prod.ext h.symm rfl⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M\n⊢ ∀ ⦃a₂ : M⦄, ↑(inl R M M₂) x✝ = ↑(inl R M M₂) a₂ → x✝ = a₂\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M₂\n⊢ ∀ ⦃a₂ : M₂⦄, ↑(inr R M M₂) x✝ = ↑(inr R M M₂) a₂ → x✝ = a₂\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\n⊢ comp (coprod f g) (inl R M M₂) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nx✝ : M\n⊢ ↑(comp (coprod f g) (inl R M M₂)) x✝ = ↑f x✝\n[PROOFSTEP]\nsimp only [map_zero, add_zero, coprod_apply, inl_apply, comp_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\n⊢ comp (coprod f g) (inr R M M₂) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nx✝ : M₂\n⊢ ↑(comp (coprod f g) (inr R M M₂)) x✝ = ↑g x✝\n[PROOFSTEP]\nsimp only [map_zero, coprod_apply, inr_apply, zero_add, comp_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\n⊢ coprod (inl R M M₂) (inr R M M₂) = id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h₁\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M × M₂\n⊢ (↑(coprod (inl R M M₂) (inr R M M₂)) x✝).fst = (↑id x✝).fst\n[PROOFSTEP]\nsimp only [Prod.mk_add_mk, add_zero, id_apply, coprod_apply, inl_apply, inr_apply, zero_add]\n[GOAL]\ncase h.h₂\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M × M₂\n⊢ (↑(coprod (inl R M M₂) (inr R M M₂)) x✝).snd = (↑id x✝).snd\n[PROOFSTEP]\nsimp only [Prod.mk_add_mk, add_zero, id_apply, coprod_apply, inl_apply, inr_apply, zero_add]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\n⊢ fst R M M₂ = coprod id 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M × M₂\n⊢ ↑(fst R M M₂) x✝ = ↑(coprod id 0) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\n⊢ snd R M M₂ = coprod 0 id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf : M →ₗ[R] M₂\nx✝ : M × M₂\n⊢ ↑(snd R M M₂) x✝ = ↑(coprod 0 id) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS✝ : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S✝\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nS : Submodule R M\nS' : Submodule R M₂\n⊢ ↑(Submodule.map (coprod f g) (Submodule.prod S S')) = ↑(Submodule.map f S ⊔ Submodule.map g S')\n[PROOFSTEP]\nsimp only [LinearMap.coprod_apply, Submodule.coe_sup, Submodule.map_coe]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS✝ : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S✝\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nS : Submodule R M\nS' : Submodule R M₂\n⊢ (fun a => ↑f a.fst + ↑g a.snd) '' ↑(Submodule.prod S S') = (fun a => ↑f a) '' ↑S + (fun a => ↑g a) '' ↑S'\n[PROOFSTEP]\nrw [← Set.image2_add, Set.image2_image_left, Set.image2_image_right]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS✝ : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S✝\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ : M →ₗ[R] M₂\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nS : Submodule R M\nS' : Submodule R M₂\n⊢ (fun a => ↑f a.fst + ↑g a.snd) '' ↑(Submodule.prod S S') = Set.image2 (fun a b => ↑f a + ↑g b) ↑S ↑S'\n[PROOFSTEP]\nexact Set.image_prod fun m m₂ => f m + g m₂\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\na b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\n⊢ (fun f => coprod f.fst f.snd) (a + b) = (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\na b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\nx✝ : M × M₂\n⊢ ↑((fun f => coprod f.fst f.snd) (a + b)) x✝ = ↑((fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) x✝\n[PROOFSTEP]\nsimp only [Prod.snd_add, add_apply, coprod_apply, Prod.fst_add, add_add_add_comm]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\nr : S\na : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\n⊢ AddHom.toFun\n      { toFun := fun f => coprod f.fst f.snd,\n        map_add' :=\n          (_ :\n            ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n              (fun f => coprod f.fst f.snd) (a + b) =\n                (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n      (r • a) =\n    ↑(RingHom.id S) r •\n      AddHom.toFun\n        { toFun := fun f => coprod f.fst f.snd,\n          map_add' :=\n            (_ :\n              ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                (fun f => coprod f.fst f.snd) (a + b) =\n                  (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n        a\n[PROOFSTEP]\ndsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\nr : S\na : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\n⊢ coprod (r • a.fst) (r • a.snd) = r • coprod a.fst a.snd\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\nr : S\na : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\nx✝ : M × M₂\n⊢ ↑(coprod (r • a.fst) (r • a.snd)) x✝ = ↑(r • coprod a.fst a.snd) x✝\n[PROOFSTEP]\nsimp only [smul_add, smul_apply, Prod.smul_snd, Prod.smul_fst, coprod_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\nf : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)\n⊢ (fun f => (comp f (inl R M M₂), comp f (inr R M M₂)))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => coprod f.fst f.snd,\n                map_add' :=\n                  (_ :\n                    ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                      (fun f => coprod f.fst f.snd) (a + b) =\n                        (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) },\n            map_smul' :=\n              (_ :\n                ∀ (r : S) (a : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                  AddHom.toFun\n                      { toFun := fun f => coprod f.fst f.snd,\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                              (fun f => coprod f.fst f.snd) (a + b) =\n                                (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n                      (r • a) =\n                    ↑(RingHom.id S) r •\n                      AddHom.toFun\n                        { toFun := fun f => coprod f.fst f.snd,\n                          map_add' :=\n                            (_ :\n                              ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                                (fun f => coprod f.fst f.snd) (a + b) =\n                                  (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n                        a) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\nsimp only [Prod.mk.eta, coprod_inl, coprod_inr]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁵ : Semiring R\ninst✝¹⁴ : Semiring S\ninst✝¹³ : AddCommMonoid M\ninst✝¹² : AddCommMonoid M₂\ninst✝¹¹ : AddCommMonoid M₃\ninst✝¹⁰ : AddCommMonoid M₄\ninst✝⁹ : AddCommMonoid M₅\ninst✝⁸ : AddCommMonoid M₆\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂\ninst✝⁵ : Module R M₃\ninst✝⁴ : Module R M₄\ninst✝³ : Module R M₅\ninst✝² : Module R M₆\nf✝ : M →ₗ[R] M₂\ninst✝¹ : Module S M₃\ninst✝ : SMulCommClass R S M₃\nf : M × M₂ →ₗ[R] M₃\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => coprod f.fst f.snd,\n              map_add' :=\n                (_ :\n                  ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                    (fun f => coprod f.fst f.snd) (a + b) =\n                      (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) },\n          map_smul' :=\n            (_ :\n              ∀ (r : S) (a : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                AddHom.toFun\n                    { toFun := fun f => coprod f.fst f.snd,\n                      map_add' :=\n                        (_ :\n                          ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                            (fun f => coprod f.fst f.snd) (a + b) =\n                              (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n                    (r • a) =\n                  ↑(RingHom.id S) r •\n                    AddHom.toFun\n                      { toFun := fun f => coprod f.fst f.snd,\n                        map_add' :=\n                          (_ :\n                            ∀ (a b : (M →ₗ[R] M₃) × (M₂ →ₗ[R] M₃)),\n                              (fun f => coprod f.fst f.snd) (a + b) =\n                                (fun f => coprod f.fst f.snd) a + (fun f => coprod f.fst f.snd) b) }\n                      a) }.toAddHom\n      ((fun f => (comp f (inl R M M₂), comp f (inr R M M₂))) f) =\n    f\n[PROOFSTEP]\nsimp only [← comp_coprod, comp_id, coprod_inl_inr]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ f : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\n⊢ ker (prodMap f g) = Submodule.prod (ker f) (ker g)\n[PROOFSTEP]\ndsimp only [ker]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹³ : Semiring R\ninst✝¹² : Semiring S\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂\ninst✝⁹ : AddCommMonoid M₃\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : AddCommMonoid M₅\ninst✝⁶ : AddCommMonoid M₆\ninst✝⁵ : Module R M\ninst✝⁴ : Module R M₂\ninst✝³ : Module R M₃\ninst✝² : Module R M₄\ninst✝¹ : Module R M₅\ninst✝ : Module R M₆\nf✝ f : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\n⊢ Submodule.comap (prodMap f g) ⊥ = Submodule.prod (Submodule.comap f ⊥) (Submodule.comap g ⊥)\n[PROOFSTEP]\nrw [← prodMap_comap_prod, Submodule.prod_bot]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf : M →ₗ[R] M₂\nA : Type u_4\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\nB : Type u_5\ninst✝¹ : NonUnitalNonAssocSemiring B\ninst✝ : Module R B\na₁ a₂ : A\n⊢ (↑(inl R A B) (a₁ * a₂)).snd = (↑(inl R A B) a₁ * ↑(inl R A B) a₂).snd\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\nS : Type u_3\ninst✝¹⁷ : Semiring R\ninst✝¹⁶ : Semiring S\ninst✝¹⁵ : AddCommMonoid M\ninst✝¹⁴ : AddCommMonoid M₂\ninst✝¹³ : AddCommMonoid M₃\ninst✝¹² : AddCommMonoid M₄\ninst✝¹¹ : AddCommMonoid M₅\ninst✝¹⁰ : AddCommMonoid M₆\ninst✝⁹ : Module R M\ninst✝⁸ : Module R M₂\ninst✝⁷ : Module R M₃\ninst✝⁶ : Module R M₄\ninst✝⁵ : Module R M₅\ninst✝⁴ : Module R M₆\nf : M →ₗ[R] M₂\nA : Type u_4\ninst✝³ : NonUnitalNonAssocSemiring A\ninst✝² : Module R A\nB : Type u_5\ninst✝¹ : NonUnitalNonAssocSemiring B\ninst✝ : Module R B\nb₁ b₂ : B\n⊢ (↑(inr R A B) (b₁ * b₂)).fst = (↑(inr R A B) b₁ * ↑(inr R A B) b₂).fst\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nx : M₃\n⊢ x ∈ range (coprod f g) ↔ x ∈ range f ⊔ range g\n[PROOFSTEP]\nsimp [mem_sup]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ IsCompl (range (inl R M M₂)) (range (inr R M M₂))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase disjoint\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ Disjoint (range (inl R M M₂)) (range (inr R M M₂))\n[PROOFSTEP]\nrw [disjoint_def]\n[GOAL]\ncase disjoint\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ ∀ (x : M × M₂), x ∈ range (inl R M M₂) → x ∈ range (inr R M M₂) → x = 0\n[PROOFSTEP]\nrintro ⟨_, _⟩ ⟨x, hx⟩ ⟨y, hy⟩\n[GOAL]\ncase disjoint.mk.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nfst✝ : M\nsnd✝ : M₂\nx : M\nhx : ↑(inl R M M₂) x = (fst✝, snd✝)\ny : M₂\nhy : ↑(inr R M M₂) y = (fst✝, snd✝)\n⊢ (fst✝, snd✝) = 0\n[PROOFSTEP]\nsimp only [Prod.ext_iff, inl_apply, inr_apply, mem_bot] at hx hy ⊢\n[GOAL]\ncase disjoint.mk.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nfst✝ : M\nsnd✝ : M₂\nx : M\ny : M₂\nhx : x = fst✝ ∧ 0 = snd✝\nhy : 0 = fst✝ ∧ y = snd✝\n⊢ fst✝ = 0.fst ∧ snd✝ = 0.snd\n[PROOFSTEP]\nexact ⟨hy.1.symm, hx.2.symm⟩\n[GOAL]\ncase codisjoint\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ Codisjoint (range (inl R M M₂)) (range (inr R M M₂))\n[PROOFSTEP]\nrw [codisjoint_iff_le_sup]\n[GOAL]\ncase codisjoint\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ ⊤ ≤ range (inl R M M₂) ⊔ range (inr R M M₂)\n[PROOFSTEP]\nrintro ⟨x, y⟩ -\n[GOAL]\ncase codisjoint.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nx : M\ny : M₂\n⊢ (x, y) ∈ range (inl R M M₂) ⊔ range (inr R M M₂)\n[PROOFSTEP]\nsimp only [mem_sup, mem_range, exists_prop]\n[GOAL]\ncase codisjoint.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nx : M\ny : M₂\n⊢ ∃ y_1, (∃ y, ↑(inl R M M₂) y = y_1) ∧ ∃ z, (∃ y, ↑(inr R M M₂) y = z) ∧ y_1 + z = (x, y)\n[PROOFSTEP]\nrefine' ⟨(x, 0), ⟨x, rfl⟩, (0, y), ⟨y, rfl⟩, _⟩\n[GOAL]\ncase codisjoint.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nx : M\ny : M₂\n⊢ (x, 0) + (0, y) = (x, y)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\n⊢ Disjoint (range (inl R M M₂)) (range (inr R M M₂))\n[PROOFSTEP]\nsimp (config := { contextual := true }) [disjoint_def, @eq_comm M 0, @eq_comm M₂ 0]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\n⊢ map (coprod f g) (Submodule.prod p q) = map f p ⊔ map g q\n[PROOFSTEP]\nrefine' le_antisymm _ (sup_le (map_le_iff_le_comap.2 _) (map_le_iff_le_comap.2 _))\n[GOAL]\ncase refine'_1\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\n⊢ map (coprod f g) (Submodule.prod p q) ≤ map f p ⊔ map g q\n[PROOFSTEP]\nrw [SetLike.le_def]\n[GOAL]\ncase refine'_1\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\n⊢ ∀ ⦃x : M₃⦄, x ∈ map (coprod f g) (Submodule.prod p q) → x ∈ map f p ⊔ map g q\n[PROOFSTEP]\nrintro _ ⟨x, ⟨h₁, h₂⟩, rfl⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\nx : M × M₂\nh₁ : x.fst ∈ ↑p\nh₂ : x.snd ∈ ↑q\n⊢ ↑(coprod f g) x ∈ map f p ⊔ map g q\n[PROOFSTEP]\nexact mem_sup.2 ⟨_, ⟨_, h₁, rfl⟩, _, ⟨_, h₂, rfl⟩, rfl⟩\n[GOAL]\ncase refine'_2\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\n⊢ p ≤ comap f (map (coprod f g) (Submodule.prod p q))\n[PROOFSTEP]\nexact fun x hx => ⟨(x, 0), by simp [hx]⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\nx : M\nhx : x ∈ p\n⊢ (x, 0) ∈ ↑(Submodule.prod p q) ∧ ↑(coprod f g) (x, 0) = ↑f x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase refine'_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\n⊢ q ≤ comap g (map (coprod f g) (Submodule.prod p q))\n[PROOFSTEP]\nexact fun x hx => ⟨(0, x), by simp [hx]⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\np : Submodule R M\nq : Submodule R M₂\nx : M₂\nhx : x ∈ q\n⊢ (0, x) ∈ ↑(Submodule.prod p q) ∧ ↑(coprod f g) (0, x) = ↑g x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\np : Submodule R M\nq : Submodule R M₂\n⊢ Submodule.prod p q = map (inl R M M₂) p ⊔ map (inr R M M₂) q\n[PROOFSTEP]\nrw [← map_coprod_prod, coprod_inl_inr, map_id]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\ns : Set M\nt : Set M₂\n⊢ span R (↑(inl R M M₂) '' s ∪ ↑(inr R M M₂) '' t) = Submodule.prod (span R s) (span R t)\n[PROOFSTEP]\nrw [span_union, prod_eq_sup_map, ← span_image, ← span_image]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\n⊢ ker (prod f g) = ker f ⊓ ker g\n[PROOFSTEP]\nrw [ker, ← prod_bot, comap_prod_prod]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\n⊢ comap f ⊥ ⊓ comap g ⊥ = ker f ⊓ ker g\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\n⊢ range (prod f g) ≤ Submodule.prod (range f) (range g)\n[PROOFSTEP]\nsimp only [SetLike.le_def, prod_apply, mem_range, SetLike.mem_coe, mem_prod, exists_imp]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\n⊢ ∀ ⦃x : M₂ × M₃⦄ (x_1 : M), Pi.prod (↑f) (↑g) x_1 = x → (∃ y, ↑f y = x.fst) ∧ ∃ y, ↑g y = x.snd\n[PROOFSTEP]\nrintro _ x rfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommMonoid M₃\ninst✝⁴ : AddCommMonoid M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nx : M\n⊢ (∃ y, ↑f y = (Pi.prod (↑f) (↑g) x).fst) ∧ ∃ y, ↑g y = (Pi.prod (↑f) (↑g) x).snd\n[PROOFSTEP]\nexact ⟨⟨x, rfl⟩, ⟨x, rfl⟩⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\n⊢ Submodule.prod (ker f) (ker g) ≤ ker (coprod f g)\n[PROOFSTEP]\nrintro ⟨y, z⟩\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\ny : M\nz : M₂\n⊢ (y, z) ∈ Submodule.prod (ker f) (ker g) → (y, z) ∈ ker (coprod f g)\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\n⊢ ker (coprod f g) = Submodule.prod (ker f) (ker g)\n[PROOFSTEP]\napply le_antisymm _ (ker_prod_ker_le_ker_coprod f g)\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\n⊢ ker (coprod f g) ≤ Submodule.prod (ker f) (ker g)\n[PROOFSTEP]\nrintro ⟨y, z⟩ h\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : (y, z) ∈ ker (coprod f g)\n⊢ (y, z) ∈ Submodule.prod (ker f) (ker g)\n[PROOFSTEP]\nsimp only [mem_ker, mem_prod, coprod_apply] at h ⊢\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\n⊢ ↑f y = 0 ∧ ↑g z = 0\n[PROOFSTEP]\nhave : f y ∈ (range f) ⊓ (range g) :=\n  by\n  simp only [true_and_iff, mem_range, mem_inf, exists_apply_eq_apply]\n  use-z\n  rwa [eq_comm, map_neg, ← sub_eq_zero, sub_neg_eq_add]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\n⊢ ↑f y ∈ range f ⊓ range g\n[PROOFSTEP]\nsimp only [true_and_iff, mem_range, mem_inf, exists_apply_eq_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\n⊢ ∃ y_1, ↑g y_1 = ↑f y\n[PROOFSTEP]\nuse-z\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\n⊢ ↑g (-z) = ↑f y\n[PROOFSTEP]\nrwa [eq_comm, map_neg, ← sub_eq_zero, sub_neg_eq_add]\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\nthis : ↑f y ∈ range f ⊓ range g\n⊢ ↑f y = 0 ∧ ↑g z = 0\n[PROOFSTEP]\nrw [hd.eq_bot, mem_bot] at this \n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : ↑f y + ↑g z = 0\nthis : ↑f y = 0\n⊢ ↑f y = 0 ∧ ↑g z = 0\n[PROOFSTEP]\nrw [this] at h \n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂✝ : Type w\nV₂ : Type w'\nM₃✝ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝¹² : Semiring R\ninst✝¹¹ : AddCommMonoid M\ninst✝¹⁰ : AddCommMonoid M₂✝\ninst✝⁹ : AddCommMonoid M₃✝\ninst✝⁸ : AddCommMonoid M₄\ninst✝⁷ : Module R M\ninst✝⁶ : Module R M₂✝\ninst✝⁵ : Module R M₃✝\ninst✝⁴ : Module R M₄\nM₂ : Type u_3\ninst✝³ : AddCommGroup M₂\ninst✝² : Module R M₂\nM₃ : Type u_4\ninst✝¹ : AddCommGroup M₃\ninst✝ : Module R M₃\nf : M →ₗ[R] M₃\ng : M₂ →ₗ[R] M₃\nhd : Disjoint (range f) (range g)\ny : M\nz : M₂\nh : 0 + ↑g z = 0\nthis : ↑f y = 0\n⊢ ↑f y = 0 ∧ ↑g z = 0\n[PROOFSTEP]\nsimpa [this] using h\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np q : Submodule R M\nx : M\n⊢ x ∈ p ⊔ q ↔ x ∈ range (coprod (Submodule.subtype p) (Submodule.subtype q))\n[PROOFSTEP]\nsimp [Submodule.mem_sup, SetLike.exists]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (inl R M M₂) p = prod p ⊥\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\n⊢ (x, y) ∈ map (inl R M M₂) p ↔ (x, y) ∈ prod p ⊥\n[PROOFSTEP]\nsimp only [and_left_comm, eq_comm, mem_map, Prod.mk.inj_iff, inl_apply, mem_bot, exists_eq_left', mem_prod]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (inr R M M₂) q = prod ⊥ q\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\n⊢ (x, y) ∈ map (inr R M M₂) q ↔ (x, y) ∈ prod ⊥ q\n[PROOFSTEP]\nsimp [and_left_comm, eq_comm, and_comm]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ comap (fst R M M₂) p = prod p ⊤\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\n⊢ (x, y) ∈ comap (fst R M M₂) p ↔ (x, y) ∈ prod p ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ comap (snd R M M₂) q = prod ⊤ q\n[PROOFSTEP]\next ⟨x, y⟩\n[GOAL]\ncase h.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\n⊢ (x, y) ∈ comap (snd R M M₂) q ↔ (x, y) ∈ prod ⊤ q\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ comap (inl R M M₂) (prod p q) = p\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx✝ : M\n⊢ x✝ ∈ comap (inl R M M₂) (prod p q) ↔ x✝ ∈ p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ comap (inr R M M₂) (prod p q) = q\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx✝ : M₂\n⊢ x✝ ∈ comap (inr R M M₂) (prod p q) ↔ x✝ ∈ q\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (fst R M M₂) (prod p q) = p\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\n⊢ x ∈ map (fst R M M₂) (prod p q) ↔ x ∈ p\n[PROOFSTEP]\nsimp [(⟨0, zero_mem _⟩ : ∃ x, x ∈ q)]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (snd R M M₂) (prod p q) = q\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M₂\n⊢ x ∈ map (snd R M M₂) (prod p q) ↔ x ∈ q\n[PROOFSTEP]\nsimp [(⟨0, zero_mem _⟩ : ∃ x, x ∈ p)]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ker (inl R M M₂) = ⊥\n[PROOFSTEP]\nrw [ker, ← prod_bot, prod_comap_inl]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ker (inr R M M₂) = ⊥\n[PROOFSTEP]\nrw [ker, ← prod_bot, prod_comap_inr]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ range (fst R M M₂) = ⊤\n[PROOFSTEP]\nrw [range_eq_map, ← prod_top, prod_map_fst]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ range (snd R M M₂) = ⊤\n[PROOFSTEP]\nrw [range_eq_map, ← prod_top, prod_map_snd]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ∀ (x y : { x // x ∈ fst R M M₂ }), (fun x => (↑x).fst) (x + y) = (fun x => (↑x).fst) x + (fun x => (↑x).fst) y\n[PROOFSTEP]\nsimp only [AddSubmonoid.coe_add, coe_toAddSubmonoid, Prod.fst_add, Subtype.forall, implies_true, Prod.forall,\n  forall_const]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ∀ (r : R) (x : { x // x ∈ fst R M M₂ }),\n    AddHom.toFun\n        { toFun := fun x => (↑x).fst,\n          map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun x => (↑x).fst,\n            map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) }\n          x\n[PROOFSTEP]\nsimp only [SetLike.val_smul, Prod.smul_fst, RingHom.id_apply, Subtype.forall, implies_true, Prod.forall, forall_const]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\n⊢ (m, 0) ∈ fst R M M₂\n[PROOFSTEP]\nsimp only [fst, comap_bot, mem_ker, snd_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ Function.LeftInverse (fun m => { val := (m, 0), property := (_ : (m, 0) ∈ ker (snd R M M₂)) })\n    {\n          toAddHom :=\n            { toFun := fun x => (↑x).fst,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ fst R M M₂ }), a • (↑a_1).fst = a • (↑a_1).fst) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨⟨x, y⟩, hy⟩\n[GOAL]\ncase mk.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\nhy : (x, y) ∈ fst R M M₂\n⊢ (fun m => { val := (m, 0), property := (_ : (m, 0) ∈ ker (snd R M M₂)) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => (↑x).fst,\n                map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) },\n            map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ fst R M M₂ }), a • (↑a_1).fst = a • (↑a_1).fst) }.toAddHom\n        { val := (x, y), property := hy }) =\n    { val := (x, y), property := hy }\n[PROOFSTEP]\nsimp only [fst, comap_bot, mem_ker, snd_apply] at hy \n[GOAL]\ncase mk.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\nhy✝ : (x, y) ∈ fst R M M₂\nhy : y = 0\n⊢ (fun m => { val := (m, 0), property := (_ : (m, 0) ∈ ker (snd R M M₂)) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => (↑x).fst,\n                map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) },\n            map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ fst R M M₂ }), a • (↑a_1).fst = a • (↑a_1).fst) }.toAddHom\n        { val := (x, y), property := hy✝ }) =\n    { val := (x, y), property := hy✝ }\n[PROOFSTEP]\nsimpa only [Subtype.mk.injEq, Prod.mk.injEq, true_and] using hy.symm\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ Function.RightInverse (fun m => { val := (m, 0), property := (_ : (m, 0) ∈ ker (snd R M M₂)) })\n    {\n          toAddHom :=\n            { toFun := fun x => (↑x).fst,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ fst R M M₂ }), a • (↑a_1).fst = a • (↑a_1).fst) }.toAddHom.toFun\n[PROOFSTEP]\nrintro x\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun x => (↑x).fst,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ fst R M M₂ }), (↑a).fst + (↑a_1).fst = (↑a).fst + (↑a_1).fst) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ fst R M M₂ }), a • (↑a_1).fst = a • (↑a_1).fst) }.toAddHom\n      ((fun m => { val := (m, 0), property := (_ : (m, 0) ∈ ker (snd R M M₂)) }) x) =\n    x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (LinearMap.fst R M M₂) (fst R M M₂) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ⊤ ≤ map (LinearMap.fst R M M₂) (fst R M M₂)\n[PROOFSTEP]\nrintro x -\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\n⊢ x ∈ map (LinearMap.fst R M M₂) (fst R M M₂)\n[PROOFSTEP]\nsimp only [fst, comap_bot, mem_map, mem_ker, snd_apply, fst_apply, Prod.exists, exists_eq_left, exists_eq]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (snd R M M₂) (fst R M M₂) = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (snd R M M₂) (fst R M M₂) ≤ ⊥\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M₂\n⊢ x ∈ map (snd R M M₂) (fst R M M₂) → x ∈ ⊥\n[PROOFSTEP]\nsimp only [fst, comap_bot, mem_map, mem_ker, snd_apply, eq_comm, Prod.exists, exists_eq_left, exists_const, mem_bot,\n  imp_self]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ∀ (x y : { x // x ∈ snd R M M₂ }), (fun x => (↑x).snd) (x + y) = (fun x => (↑x).snd) x + (fun x => (↑x).snd) y\n[PROOFSTEP]\nsimp only [AddSubmonoid.coe_add, coe_toAddSubmonoid, Prod.snd_add, Subtype.forall, implies_true, Prod.forall,\n  forall_const]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ∀ (r : R) (x : { x // x ∈ snd R M M₂ }),\n    AddHom.toFun\n        { toFun := fun x => (↑x).snd,\n          map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun x => (↑x).snd,\n            map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) }\n          x\n[PROOFSTEP]\nsimp only [SetLike.val_smul, Prod.smul_snd, RingHom.id_apply, Subtype.forall, implies_true, Prod.forall, forall_const]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nn : M₂\n⊢ (0, n) ∈ snd R M M₂\n[PROOFSTEP]\nsimp only [snd, comap_bot, mem_ker, fst_apply]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ Function.LeftInverse (fun n => { val := (0, n), property := (_ : (0, n) ∈ ker (LinearMap.fst R M M₂)) })\n    {\n          toAddHom :=\n            { toFun := fun x => (↑x).snd,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ snd R M M₂ }), a • (↑a_1).snd = a • (↑a_1).snd) }.toAddHom.toFun\n[PROOFSTEP]\nrintro ⟨⟨x, y⟩, hx⟩\n[GOAL]\ncase mk.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\nhx : (x, y) ∈ snd R M M₂\n⊢ (fun n => { val := (0, n), property := (_ : (0, n) ∈ ker (LinearMap.fst R M M₂)) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => (↑x).snd,\n                map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) },\n            map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ snd R M M₂ }), a • (↑a_1).snd = a • (↑a_1).snd) }.toAddHom\n        { val := (x, y), property := hx }) =\n    { val := (x, y), property := hx }\n[PROOFSTEP]\nsimp only [snd, comap_bot, mem_ker, fst_apply] at hx \n[GOAL]\ncase mk.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\nhx✝ : (x, y) ∈ snd R M M₂\nhx : x = 0\n⊢ (fun n => { val := (0, n), property := (_ : (0, n) ∈ ker (LinearMap.fst R M M₂)) })\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun x => (↑x).snd,\n                map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) },\n            map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ snd R M M₂ }), a • (↑a_1).snd = a • (↑a_1).snd) }.toAddHom\n        { val := (x, y), property := hx✝ }) =\n    { val := (x, y), property := hx✝ }\n[PROOFSTEP]\nsimpa only [Subtype.mk.injEq, Prod.mk.injEq, and_true] using hx.symm\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ Function.RightInverse (fun n => { val := (0, n), property := (_ : (0, n) ∈ ker (LinearMap.fst R M M₂)) })\n    {\n          toAddHom :=\n            { toFun := fun x => (↑x).snd,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ snd R M M₂ }), a • (↑a_1).snd = a • (↑a_1).snd) }.toAddHom.toFun\n[PROOFSTEP]\nrintro x\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M₂\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun x => (↑x).snd,\n              map_add' := (_ : ∀ (a a_1 : { x // x ∈ snd R M M₂ }), (↑a).snd + (↑a_1).snd = (↑a).snd + (↑a_1).snd) },\n          map_smul' := (_ : ∀ (a : R) (a_1 : { x // x ∈ snd R M M₂ }), a • (↑a_1).snd = a • (↑a_1).snd) }.toAddHom\n      ((fun n => { val := (0, n), property := (_ : (0, n) ∈ ker (LinearMap.fst R M M₂)) }) x) =\n    x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (LinearMap.fst R M M₂) (snd R M M₂) = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (LinearMap.fst R M M₂) (snd R M M₂) ≤ ⊥\n[PROOFSTEP]\nintro x\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\n⊢ x ∈ map (LinearMap.fst R M M₂) (snd R M M₂) → x ∈ ⊥\n[PROOFSTEP]\nsimp only [snd, comap_bot, mem_map, mem_ker, fst_apply, eq_comm, Prod.exists, exists_eq_left, exists_const, mem_bot,\n  imp_self]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ map (LinearMap.snd R M M₂) (snd R M M₂) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ⊤ ≤ map (LinearMap.snd R M M₂) (snd R M M₂)\n[PROOFSTEP]\nrintro x -\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M₂\n⊢ x ∈ map (LinearMap.snd R M M₂) (snd R M M₂)\n[PROOFSTEP]\nsimp only [snd, comap_bot, mem_map, mem_ker, snd_apply, fst_apply, Prod.exists, exists_eq_right, exists_eq]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ fst R M M₂ ⊔ snd R M M₂ = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ ⊤ ≤ fst R M M₂ ⊔ snd R M M₂\n[PROOFSTEP]\nrintro ⟨m, n⟩ -\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ (m, n) ∈ fst R M M₂ ⊔ snd R M M₂\n[PROOFSTEP]\nrw [show (m, n) = (m, 0) + (0, n) by simp]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ (m, n) = (m, 0) + (0, n)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ (m, 0) + (0, n) ∈ fst R M M₂ ⊔ snd R M M₂\n[PROOFSTEP]\napply Submodule.add_mem (Submodule.fst R M M₂ ⊔ Submodule.snd R M M₂)\n[GOAL]\ncase mk.h₁\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ (m, 0) ∈ fst R M M₂ ⊔ snd R M M₂\n[PROOFSTEP]\nexact Submodule.mem_sup_left (Submodule.mem_comap.mpr (by simp))\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ ↑(LinearMap.snd R M M₂) (m, 0) ∈ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.h₂\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ (0, n) ∈ fst R M M₂ ⊔ snd R M M₂\n[PROOFSTEP]\nexact Submodule.mem_sup_right (Submodule.mem_comap.mpr (by simp))\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nm : M\nn : M₂\n⊢ ↑(LinearMap.fst R M M₂) (0, n) ∈ ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ fst R M M₂ ⊓ snd R M M₂ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\n⊢ fst R M M₂ ⊓ snd R M M₂ ≤ ⊥\n[PROOFSTEP]\nrintro ⟨x, y⟩\n[GOAL]\ncase mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\nx : M\ny : M₂\n⊢ (x, y) ∈ fst R M M₂ ⊓ snd R M M₂ → (x, y) ∈ ⊥\n[PROOFSTEP]\nsimp only [fst, comap_bot, snd, ge_iff_le, mem_inf, mem_ker, snd_apply, fst_apply, mem_bot, Prod.mk_eq_zero, and_comm,\n  imp_self]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ q ≤ prod p₁ p₂ ↔ map (LinearMap.fst R M M₂) q ≤ p₁ ∧ map (LinearMap.snd R M M₂) q ≤ p₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ q ≤ prod p₁ p₂ → map (LinearMap.fst R M M₂) q ≤ p₁ ∧ map (LinearMap.snd R M M₂) q ≤ p₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : q ≤ prod p₁ p₂\n⊢ map (LinearMap.fst R M M₂) q ≤ p₁ ∧ map (LinearMap.snd R M M₂) q ≤ p₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : q ≤ prod p₁ p₂\n⊢ map (LinearMap.fst R M M₂) q ≤ p₁\n[PROOFSTEP]\nrintro x ⟨⟨y1, y2⟩, ⟨hy1, rfl⟩⟩\n[GOAL]\ncase mp.left.intro.mk.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : q ≤ prod p₁ p₂\ny1 : M\ny2 : M₂\nhy1 : (y1, y2) ∈ ↑q\n⊢ ↑(LinearMap.fst R M M₂) (y1, y2) ∈ p₁\n[PROOFSTEP]\nexact (h hy1).1\n[GOAL]\ncase mp.right\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : q ≤ prod p₁ p₂\n⊢ map (LinearMap.snd R M M₂) q ≤ p₂\n[PROOFSTEP]\nrintro x ⟨⟨y1, y2⟩, ⟨hy1, rfl⟩⟩\n[GOAL]\ncase mp.right.intro.mk.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : q ≤ prod p₁ p₂\ny1 : M\ny2 : M₂\nhy1 : (y1, y2) ∈ ↑q\n⊢ ↑(LinearMap.snd R M M₂) (y1, y2) ∈ p₂\n[PROOFSTEP]\nexact (h hy1).2\n[GOAL]\ncase mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ map (LinearMap.fst R M M₂) q ≤ p₁ ∧ map (LinearMap.snd R M M₂) q ≤ p₂ → q ≤ prod p₁ p₂\n[PROOFSTEP]\nrintro ⟨hH, hK⟩ ⟨x1, x2⟩ h\n[GOAL]\ncase mpr.intro.mk\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (LinearMap.fst R M M₂) q ≤ p₁\nhK : map (LinearMap.snd R M M₂) q ≤ p₂\nx1 : M\nx2 : M₂\nh : (x1, x2) ∈ q\n⊢ (x1, x2) ∈ prod p₁ p₂\n[PROOFSTEP]\nexact ⟨hH ⟨_, h, rfl⟩, hK ⟨_, h, rfl⟩⟩\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ prod p₁ p₂ ≤ q ↔ map (inl R M M₂) p₁ ≤ q ∧ map (inr R M M₂) p₂ ≤ q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ prod p₁ p₂ ≤ q → map (inl R M M₂) p₁ ≤ q ∧ map (inr R M M₂) p₂ ≤ q\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\n⊢ map (inl R M M₂) p₁ ≤ q ∧ map (inr R M M₂) p₂ ≤ q\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.left\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\n⊢ map (inl R M M₂) p₁ ≤ q\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase mp.left.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\nx : M\nhx : x ∈ ↑p₁\n⊢ ↑(inl R M M₂) x ∈ q\n[PROOFSTEP]\napply h\n[GOAL]\ncase mp.left.intro.intro.a\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\nx : M\nhx : x ∈ ↑p₁\n⊢ ↑(inl R M M₂) x ∈ prod p₁ p₂\n[PROOFSTEP]\nexact ⟨hx, zero_mem p₂⟩\n[GOAL]\ncase mp.right\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\n⊢ map (inr R M M₂) p₂ ≤ q\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase mp.right.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\nx : M₂\nhx : x ∈ ↑p₂\n⊢ ↑(inr R M M₂) x ∈ q\n[PROOFSTEP]\napply h\n[GOAL]\ncase mp.right.intro.intro.a\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nh : prod p₁ p₂ ≤ q\nx : M₂\nhx : x ∈ ↑p₂\n⊢ ↑(inr R M M₂) x ∈ prod p₁ p₂\n[PROOFSTEP]\nexact ⟨zero_mem p₁, hx⟩\n[GOAL]\ncase mpr\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\n⊢ map (inl R M M₂) p₁ ≤ q ∧ map (inr R M M₂) p₂ ≤ q → prod p₁ p₂ ≤ q\n[PROOFSTEP]\nrintro ⟨hH, hK⟩ ⟨x1, x2⟩ ⟨h1, h2⟩\n[GOAL]\ncase mpr.intro.mk.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\n⊢ (x1, x2) ∈ q\n[PROOFSTEP]\nhave h1' : (LinearMap.inl R _ _) x1 ∈ q := by\n  apply hH\n  simpa using h1\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\n⊢ ↑(inl R M M₂) x1 ∈ q\n[PROOFSTEP]\napply hH\n[GOAL]\ncase a\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\n⊢ ↑(inl R M M₂) x1 ∈ map (inl R M M₂) p₁\n[PROOFSTEP]\nsimpa using h1\n[GOAL]\ncase mpr.intro.mk.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\nh1' : ↑(inl R M M₂) x1 ∈ q\n⊢ (x1, x2) ∈ q\n[PROOFSTEP]\nhave h2' : (LinearMap.inr R _ _) x2 ∈ q := by\n  apply hK\n  simpa using h2\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\nh1' : ↑(inl R M M₂) x1 ∈ q\n⊢ ↑(inr R M M₂) x2 ∈ q\n[PROOFSTEP]\napply hK\n[GOAL]\ncase a\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\nh1' : ↑(inl R M M₂) x1 ∈ q\n⊢ ↑(inr R M M₂) x2 ∈ map (inr R M M₂) p₂\n[PROOFSTEP]\nsimpa using h2\n[GOAL]\ncase mpr.intro.mk.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq✝ : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\nq : Submodule R (M × M₂)\nhH : map (inl R M M₂) p₁ ≤ q\nhK : map (inr R M M₂) p₂ ≤ q\nx1 : M\nx2 : M₂\nh1 : (x1, x2).fst ∈ ↑p₁\nh2 : (x1, x2).snd ∈ ↑p₂\nh1' : ↑(inl R M M₂) x1 ∈ q\nh2' : ↑(inr R M M₂) x2 ∈ q\n⊢ (x1, x2) ∈ q\n[PROOFSTEP]\nsimpa using add_mem h1' h2'\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\n⊢ prod p₁ p₂ = ⊥ ↔ p₁ = ⊥ ∧ p₂ = ⊥\n[PROOFSTEP]\nsimp only [eq_bot_iff, prod_le_iff, (gc_map_comap _).le_iff_le, comap_bot, ker_inl, ker_inr]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : Module R M\ninst✝ : Module R M₂\np : Submodule R M\nq : Submodule R M₂\np₁ : Submodule R M\np₂ : Submodule R M₂\n⊢ prod p₁ p₂ = ⊤ ↔ p₁ = ⊤ ∧ p₂ = ⊤\n[PROOFSTEP]\nsimp only [eq_top_iff, le_prod_iff, ← (gc_map_comap _).le_iff_le, map_top, range_fst, range_snd]\n[GOAL]\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\n⊢ LinearMap.comp (LinearMap.fst R N M) ↑(prodComm R M N) = LinearMap.snd R M N\n[PROOFSTEP]\next\n[GOAL]\ncase hl.h\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\nx✝ : M\n⊢ ↑(LinearMap.comp (LinearMap.comp (LinearMap.fst R N M) ↑(prodComm R M N)) (LinearMap.inl R M N)) x✝ =\n    ↑(LinearMap.comp (LinearMap.snd R M N) (LinearMap.inl R M N)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hr.h\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\nx✝ : N\n⊢ ↑(LinearMap.comp (LinearMap.comp (LinearMap.fst R N M) ↑(prodComm R M N)) (LinearMap.inr R M N)) x✝ =\n    ↑(LinearMap.comp (LinearMap.snd R M N) (LinearMap.inr R M N)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\n⊢ LinearMap.comp (LinearMap.snd R N M) ↑(prodComm R M N) = LinearMap.fst R M N\n[PROOFSTEP]\next\n[GOAL]\ncase hl.h\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\nx✝ : M\n⊢ ↑(LinearMap.comp (LinearMap.comp (LinearMap.snd R N M) ↑(prodComm R M N)) (LinearMap.inl R M N)) x✝ =\n    ↑(LinearMap.comp (LinearMap.fst R M N) (LinearMap.inl R M N)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hr.h\nN : Type u_3\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid N\ninst✝¹ : Module R M\ninst✝ : Module R N\nx✝ : N\n⊢ ↑(LinearMap.comp (LinearMap.comp (LinearMap.snd R N M) ↑(prodComm R M N)) (LinearMap.inr R M N)) x✝ =\n    ↑(LinearMap.comp (LinearMap.fst R M N) (LinearMap.inr R M N)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommGroup M₄\nmodule_M : Module R M\nmodule_M₂ : Module R M₂\nmodule_M₃ : Module R M₃\nmodule_M₄ : Module R M₄\ne₁ : M ≃ₗ[R] M₂\ne₂ : M₃ ≃ₗ[R] M₄\nf : M →ₗ[R] M₄\nsrc✝ : M × M₃ →ₗ[R] M₂ × M₄ :=\n  LinearMap.prod (LinearMap.comp (↑e₁) (LinearMap.fst R M M₃))\n    (LinearMap.comp (↑e₂) (LinearMap.snd R M M₃) + LinearMap.comp f (LinearMap.fst R M M₃))\np : M × M₃\n⊢ (fun p => (↑(symm e₁) p.fst, ↑(symm e₂) (p.snd - ↑f (↑(symm e₁) p.fst))))\n      (AddHom.toFun\n        { toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (x : M × M₃),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n        p) =\n    p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : AddCommMonoid M₂\ninst✝¹ : AddCommMonoid M₃\ninst✝ : AddCommGroup M₄\nmodule_M : Module R M\nmodule_M₂ : Module R M₂\nmodule_M₃ : Module R M₃\nmodule_M₄ : Module R M₄\ne₁ : M ≃ₗ[R] M₂\ne₂ : M₃ ≃ₗ[R] M₄\nf : M →ₗ[R] M₄\nsrc✝ : M × M₃ →ₗ[R] M₂ × M₄ :=\n  LinearMap.prod (LinearMap.comp (↑e₁) (LinearMap.fst R M M₃))\n    (LinearMap.comp (↑e₂) (LinearMap.snd R M M₃) + LinearMap.comp f (LinearMap.fst R M M₃))\np : M₂ × M₄\n⊢ AddHom.toFun\n      { toAddHom := src✝.toAddHom,\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (x : M × M₃),\n                AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun src✝.toAddHom x) }.toAddHom\n      ((fun p => (↑(symm e₁) p.fst, ↑(symm e₂) (p.snd - ↑f (↑(symm e₁) p.fst)))) p) =\n    p\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\n⊢ range (prod f g) = Submodule.prod (range f) (range g)\n[PROOFSTEP]\nrefine' le_antisymm (f.range_prod_le g) _\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\n⊢ Submodule.prod (range f) (range g) ≤ range (prod f g)\n[PROOFSTEP]\nsimp only [SetLike.le_def, prod_apply, mem_range, SetLike.mem_coe, mem_prod, exists_imp, and_imp, Prod.forall, Pi.prod]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\n⊢ ∀ (a : M₂) (b : M₃) (x : M), ↑f x = a → ∀ (x : M), ↑g x = b → ∃ y, (↑f y, ↑g y) = (a, b)\n[PROOFSTEP]\nrintro _ _ x rfl y rfl\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\n⊢ ∃ y_1, (↑f y_1, ↑g y_1) = (↑f x, ↑g y)\n[PROOFSTEP]\nsimp only [Prod.mk.inj_iff, ← sub_mem_ker_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\n⊢ ∃ y_1, y_1 - x ∈ ker f ∧ y_1 - y ∈ ker g\n[PROOFSTEP]\nhave : y - x ∈ ker f ⊔ ker g := by simp only [h, mem_top]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\n⊢ y - x ∈ ker f ⊔ ker g\n[PROOFSTEP]\nsimp only [h, mem_top]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\nthis : y - x ∈ ker f ⊔ ker g\n⊢ ∃ y_1, y_1 - x ∈ ker f ∧ y_1 - y ∈ ker g\n[PROOFSTEP]\nrcases mem_sup.1 this with ⟨x', hx', y', hy', H⟩\n[GOAL]\ncase intro.intro.intro.intro\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\nthis : y - x ∈ ker f ⊔ ker g\nx' : M\nhx' : x' ∈ ker f\ny' : M\nhy' : y' ∈ ker g\nH : x' + y' = y - x\n⊢ ∃ y_1, y_1 - x ∈ ker f ∧ y_1 - y ∈ ker g\n[PROOFSTEP]\nrefine' ⟨x' + x, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\nthis : y - x ∈ ker f ⊔ ker g\nx' : M\nhx' : x' ∈ ker f\ny' : M\nhy' : y' ∈ ker g\nH : x' + y' = y - x\n⊢ x' + x - x ∈ ker f\n[PROOFSTEP]\nrwa [add_sub_cancel]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁶ : Ring R\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : AddCommGroup M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M\ninst✝¹ : Module R M₂\ninst✝ : Module R M₃\nf : M →ₗ[R] M₂\ng : M →ₗ[R] M₃\nh : ker f ⊔ ker g = ⊤\nx y : M\nthis : y - x ∈ ker f ⊔ ker g\nx' : M\nhx' : x' ∈ ker f\ny' : M\nhy' : y' ∈ ker g\nH : x' + y' = y - x\n⊢ x' + x - y ∈ ker g\n[PROOFSTEP]\nsimp [← eq_sub_iff_add_eq.1 H, map_add, add_left_inj, self_eq_add_right, mem_ker.mp hy']\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ ↑OrderDual.toDual (tunnel' f i n).fst ≤ ↑OrderDual.toDual (tunnel' f i (n + 1)).fst\n[PROOFSTEP]\ndsimp [tunnel', tunnelAux]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ ↑OrderDual.toDual (tunnel' f i n).fst ≤\n    ↑OrderDual.toDual\n      (Submodule.map (comp (comp (Submodule.subtype (tunnel' f i n).fst) ↑(LinearEquiv.symm (tunnel' f i n).snd)) f)\n        (Submodule.fst R M N))\n[PROOFSTEP]\nrw [Submodule.map_comp, Submodule.map_comp]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ ↑OrderDual.toDual (tunnel' f i n).fst ≤\n    ↑OrderDual.toDual\n      (Submodule.map (Submodule.subtype (tunnel' f i n).fst)\n        (Submodule.map (↑(LinearEquiv.symm (tunnel' f i n).snd)) (Submodule.map f (Submodule.fst R M N))))\n[PROOFSTEP]\napply Submodule.map_subtype_le\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ tailing f i n ≤ ↑OrderDual.ofDual (↑(tunnel f i) n)\n[PROOFSTEP]\ndsimp [tailing, tunnelAux]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Submodule.map (comp (comp (Submodule.subtype (tunnel' f i n).fst) ↑(LinearEquiv.symm (tunnel' f i n).snd)) f)\n      (Submodule.snd R M N) ≤\n    ↑OrderDual.ofDual (↑(tunnel f i) n)\n[PROOFSTEP]\nrw [Submodule.map_comp, Submodule.map_comp]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Submodule.map (Submodule.subtype (tunnel' f i n).fst)\n      (Submodule.map (↑(LinearEquiv.symm (tunnel' f i n).snd)) (Submodule.map f (Submodule.snd R M N))) ≤\n    ↑OrderDual.ofDual (↑(tunnel f i) n)\n[PROOFSTEP]\napply Submodule.map_subtype_le\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Disjoint (tailing f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n[PROOFSTEP]\nrw [disjoint_iff]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ tailing f i n ⊓ ↑OrderDual.ofDual (↑(tunnel f i) (n + 1)) = ⊥\n[PROOFSTEP]\ndsimp [tailing, tunnel, tunnel']\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Submodule.map (tunnelAux f (tunnel' f i n)) (Submodule.snd R M N) ⊓\n      Submodule.map (tunnelAux f (tunnel' f i n)) (Submodule.fst R M N) =\n    ⊥\n[PROOFSTEP]\nerw [Submodule.map_inf_eq_map_inf_comap, Submodule.comap_map_eq_of_injective (tunnelAux_injective _ i _), inf_comm,\n  Submodule.fst_inf_snd, Submodule.map_bot]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ tailing f i n ⊔ ↑OrderDual.ofDual (↑(tunnel f i) (n + 1)) ≤ ↑OrderDual.ofDual (↑(tunnel f i) n)\n[PROOFSTEP]\ndsimp [tailing, tunnel, tunnel', tunnelAux]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Submodule.map (comp (comp (Submodule.subtype (tunnel' f i n).fst) ↑(LinearEquiv.symm (tunnel' f i n).snd)) f)\n        (Submodule.snd R M N) ⊔\n      Submodule.map (comp (comp (Submodule.subtype (tunnel' f i n).fst) ↑(LinearEquiv.symm (tunnel' f i n).snd)) f)\n        (Submodule.fst R M N) ≤\n    (tunnel' f i n).fst\n[PROOFSTEP]\nerw [← Submodule.map_sup, sup_comm, Submodule.fst_sup_snd, Submodule.map_comp, Submodule.map_comp]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Submodule.map (Submodule.subtype (tunnel' f i n).fst)\n      (Submodule.map (↑(LinearEquiv.symm (tunnel' f i n).snd)) (Submodule.map f ⊤)) ≤\n    (tunnel' f i n).fst\n[PROOFSTEP]\napply Submodule.map_subtype_le\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\n⊢ tailings f i 0 = tailing f i 0\n[PROOFSTEP]\nsimp [tailings]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ tailings f i (n + 1) = tailings f i n ⊔ tailing f i (n + 1)\n[PROOFSTEP]\nsimp [tailings]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\n⊢ Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\n⊢ Disjoint (tailings f i Nat.zero) (↑OrderDual.ofDual (↑(tunnel f i) (Nat.zero + 1)))\n[PROOFSTEP]\nsimp only [tailings_zero]\n[GOAL]\ncase zero\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\n⊢ Disjoint (tailing f i 0) (↑OrderDual.ofDual (↑(tunnel f i) (Nat.zero + 1)))\n[PROOFSTEP]\napply tailing_disjoint_tunnel_succ\n[GOAL]\ncase succ\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ Disjoint (tailings f i (Nat.succ n)) (↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)))\n[PROOFSTEP]\nsimp only [tailings_succ]\n[GOAL]\ncase succ\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ Disjoint (tailings f i n ⊔ tailing f i (n + 1)) (↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)))\n[PROOFSTEP]\nrefine' Disjoint.disjoint_sup_left_of_disjoint_sup_right _ _\n[GOAL]\ncase succ.refine'_1\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ Disjoint (tailing f i (n + 1)) (↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)))\ncase succ.refine'_2\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ Disjoint (tailings f i n) (tailing f i (n + 1) ⊔ ↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)))\n[PROOFSTEP]\napply tailing_disjoint_tunnel_succ\n[GOAL]\ncase succ.refine'_2\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ Disjoint (tailings f i n) (tailing f i (n + 1) ⊔ ↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)))\n[PROOFSTEP]\napply Disjoint.mono_right _ ih\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁴ : Ring R\nN : Type u_3\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : AddCommGroup N\ninst✝ : Module R N\nf : M × N →ₗ[R] M\ni : Injective ↑f\nn : ℕ\nih : Disjoint (tailings f i n) (↑OrderDual.ofDual (↑(tunnel f i) (n + 1)))\n⊢ tailing f i (n + 1) ⊔ ↑OrderDual.ofDual (↑(tunnel f i) (Nat.succ n + 1)) ≤ ↑OrderDual.ofDual (↑(tunnel f i) (n + 1))\n[PROOFSTEP]\napply tailing_sup_tunnel_succ_le_tunnel\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\na✝ b✝ : M × M₂\nha : a✝.snd = ↑f a✝.fst\nhb : b✝.snd = ↑f b✝.fst\n⊢ a✝ + b✝ ∈ {p | p.snd = ↑f p.fst}\n[PROOFSTEP]\nchange _ + _ = f (_ + _)\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\na✝ b✝ : M × M₂\nha : a✝.snd = ↑f a✝.fst\nhb : b✝.snd = ↑f b✝.fst\n⊢ a✝.snd + b✝.snd = ↑f (a✝.fst + b✝.fst)\n[PROOFSTEP]\nrw [map_add, ha, hb]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\nc : R\nx : M × M₂\nhx : x.snd = ↑f x.fst\n⊢ c • x ∈\n    {\n          toAddSubsemigroup :=\n            { carrier := {p | p.snd = ↑f p.fst},\n              add_mem' :=\n                (_ : ∀ {a b : M × M₂}, a.snd = ↑f a.fst → b.snd = ↑f b.fst → a.snd + b.snd = ↑f (a.fst + b.fst)) },\n          zero_mem' := (_ : 0.snd = ↑f 0.fst) }.toAddSubsemigroup.carrier\n[PROOFSTEP]\nchange _ • _ = f (_ • _)\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\nc : R\nx : M × M₂\nhx : x.snd = ↑f x.fst\n⊢ c • x.snd = ↑f (c • x.fst)\n[PROOFSTEP]\nrw [map_smul, hx]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\n⊢ graph g = ker (coprod (-g) id)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\nx : M₃ × M₄\n⊢ x ∈ graph g ↔ x ∈ ker (coprod (-g) id)\n[PROOFSTEP]\nchange _ = _ ↔ -g x.1 + x.2 = _\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\nx : M₃ × M₄\n⊢ x.snd = ↑g x.fst ↔ -↑g x.fst + x.snd = 0\n[PROOFSTEP]\nrw [add_comm, add_neg_eq_zero]\n[GOAL]\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\n⊢ graph f = range (prod id f)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nK : Type u'\nM : Type v\nV : Type v'\nM₂ : Type w\nV₂ : Type w'\nM₃ : Type y\nV₃ : Type y'\nM₄ : Type z\nι : Type x\nM₅ : Type u_1\nM₆ : Type u_2\ninst✝⁸ : Semiring R\ninst✝⁷ : AddCommMonoid M\ninst✝⁶ : AddCommMonoid M₂\ninst✝⁵ : AddCommGroup M₃\ninst✝⁴ : AddCommGroup M₄\ninst✝³ : Module R M\ninst✝² : Module R M₂\ninst✝¹ : Module R M₃\ninst✝ : Module R M₄\nf : M →ₗ[R] M₂\ng : M₃ →ₗ[R] M₄\nx : M × M₂\n⊢ x ∈ graph f ↔ x ∈ range (prod id f)\n[PROOFSTEP]\nexact ⟨fun hx => ⟨x.1, Prod.ext rfl hx.symm⟩, fun ⟨u, hu⟩ => hu ▸ rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Prod", "llama_tokens": 69300, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6723317123102955, "lm_q2_score": 0.4416730056646256, "lm_q1q2_score": 0.2969507681797326}}
{"text": "[GOAL]\nR : Type u_1\n𝕜₁ : Type u_2\n𝕜₂ : Type u_3\nE : Type u_4\nF : Type u_5\ninst✝¹³ : AddCommGroup E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : TopologicalSpace F\ninst✝⁹ : TopologicalAddGroup F\ninst✝⁸ : OrderedSemiring R\ninst✝⁷ : NormedField 𝕜₁\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : Module 𝕜₁ E\ninst✝⁴ : Module 𝕜₂ F\nσ : 𝕜₁ →+* 𝕜₂\ninst✝³ : Module R F\ninst✝² : ContinuousConstSMul R F\ninst✝¹ : LocallyConvexSpace R F\ninst✝ : SMulCommClass 𝕜₂ R F\n𝔖 : Set (Set E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\n⊢ LocallyConvexSpace R (E →SL[σ] F)\n[PROOFSTEP]\nletI : TopologicalSpace (E →SL[σ] F) := strongTopology σ F 𝔖\n[GOAL]\nR : Type u_1\n𝕜₁ : Type u_2\n𝕜₂ : Type u_3\nE : Type u_4\nF : Type u_5\ninst✝¹³ : AddCommGroup E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : TopologicalSpace F\ninst✝⁹ : TopologicalAddGroup F\ninst✝⁸ : OrderedSemiring R\ninst✝⁷ : NormedField 𝕜₁\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : Module 𝕜₁ E\ninst✝⁴ : Module 𝕜₂ F\nσ : 𝕜₁ →+* 𝕜₂\ninst✝³ : Module R F\ninst✝² : ContinuousConstSMul R F\ninst✝¹ : LocallyConvexSpace R F\ninst✝ : SMulCommClass 𝕜₂ R F\n𝔖 : Set (Set E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nthis : TopologicalSpace (E →SL[σ] F) := strongTopology σ F 𝔖\n⊢ LocallyConvexSpace R (E →SL[σ] F)\n[PROOFSTEP]\nhaveI : TopologicalAddGroup (E →SL[σ] F) := strongTopology.topologicalAddGroup _ _ _\n[GOAL]\nR : Type u_1\n𝕜₁ : Type u_2\n𝕜₂ : Type u_3\nE : Type u_4\nF : Type u_5\ninst✝¹³ : AddCommGroup E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : TopologicalSpace F\ninst✝⁹ : TopologicalAddGroup F\ninst✝⁸ : OrderedSemiring R\ninst✝⁷ : NormedField 𝕜₁\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : Module 𝕜₁ E\ninst✝⁴ : Module 𝕜₂ F\nσ : 𝕜₁ →+* 𝕜₂\ninst✝³ : Module R F\ninst✝² : ContinuousConstSMul R F\ninst✝¹ : LocallyConvexSpace R F\ninst✝ : SMulCommClass 𝕜₂ R F\n𝔖 : Set (Set E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nthis✝ : TopologicalSpace (E →SL[σ] F) := strongTopology σ F 𝔖\nthis : TopologicalAddGroup (E →SL[σ] F)\n⊢ LocallyConvexSpace R (E →SL[σ] F)\n[PROOFSTEP]\napply\n  LocallyConvexSpace.ofBasisZero _ _ _ _\n    (strongTopology.hasBasis_nhds_zero_of_basis _ _ _ h𝔖₁ h𝔖₂ (LocallyConvexSpace.convex_basis_zero R F)) _\n[GOAL]\nR : Type u_1\n𝕜₁ : Type u_2\n𝕜₂ : Type u_3\nE : Type u_4\nF : Type u_5\ninst✝¹³ : AddCommGroup E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : TopologicalSpace F\ninst✝⁹ : TopologicalAddGroup F\ninst✝⁸ : OrderedSemiring R\ninst✝⁷ : NormedField 𝕜₁\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : Module 𝕜₁ E\ninst✝⁴ : Module 𝕜₂ F\nσ : 𝕜₁ →+* 𝕜₂\ninst✝³ : Module R F\ninst✝² : ContinuousConstSMul R F\ninst✝¹ : LocallyConvexSpace R F\ninst✝ : SMulCommClass 𝕜₂ R F\n𝔖 : Set (Set E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nthis✝ : TopologicalSpace (E →SL[σ] F) := strongTopology σ F 𝔖\nthis : TopologicalAddGroup (E →SL[σ] F)\n⊢ ∀ (i : Set E × Set F),\n    i.fst ∈ 𝔖 ∧ i.snd ∈ 𝓝 0 ∧ Convex R i.snd → Convex R {f | ∀ (x : E), x ∈ i.fst → ↑f x ∈ _root_.id i.snd}\n[PROOFSTEP]\nrintro ⟨S, V⟩ ⟨_, _, hVconvex⟩ f hf g hg a b ha hb hab x hx\n[GOAL]\ncase mk.intro.intro\nR : Type u_1\n𝕜₁ : Type u_2\n𝕜₂ : Type u_3\nE : Type u_4\nF : Type u_5\ninst✝¹³ : AddCommGroup E\ninst✝¹² : TopologicalSpace E\ninst✝¹¹ : AddCommGroup F\ninst✝¹⁰ : TopologicalSpace F\ninst✝⁹ : TopologicalAddGroup F\ninst✝⁸ : OrderedSemiring R\ninst✝⁷ : NormedField 𝕜₁\ninst✝⁶ : NormedField 𝕜₂\ninst✝⁵ : Module 𝕜₁ E\ninst✝⁴ : Module 𝕜₂ F\nσ : 𝕜₁ →+* 𝕜₂\ninst✝³ : Module R F\ninst✝² : ContinuousConstSMul R F\ninst✝¹ : LocallyConvexSpace R F\ninst✝ : SMulCommClass 𝕜₂ R F\n𝔖 : Set (Set E)\nh𝔖₁ : Set.Nonempty 𝔖\nh𝔖₂ : DirectedOn (fun x x_1 => x ⊆ x_1) 𝔖\nthis✝ : TopologicalSpace (E →SL[σ] F) := strongTopology σ F 𝔖\nthis : TopologicalAddGroup (E →SL[σ] F)\nS : Set E\nV : Set F\nleft✝¹ : (S, V).fst ∈ 𝔖\nleft✝ : (S, V).snd ∈ 𝓝 0\nhVconvex : Convex R (S, V).snd\nf : E →SL[σ] F\nhf : f ∈ {f | ∀ (x : E), x ∈ (S, V).fst → ↑f x ∈ _root_.id (S, V).snd}\ng : E →SL[σ] F\nhg : g ∈ {f | ∀ (x : E), x ∈ (S, V).fst → ↑f x ∈ _root_.id (S, V).snd}\na b : R\nha : 0 ≤ a\nhb : 0 ≤ b\nhab : a + b = 1\nx : E\nhx : x ∈ (S, V).fst\n⊢ ↑(a • f + b • g) x ∈ _root_.id (S, V).snd\n[PROOFSTEP]\nexact hVconvex (hf x hx) (hg x hx) ha hb hab\n", "meta": {"mathlib_filename": "Mathlib.Analysis.LocallyConvex.StrongTopology", "llama_tokens": 2223, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7490872243177518, "lm_q2_score": 0.3960681662740417, "lm_q1q2_score": 0.2966896033148437}}
{"text": "[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\n⊢ InjOn (↑(embeddingPiTangent f)) s\n[PROOFSTEP]\nintro x hx y _ h\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh : ↑(embeddingPiTangent f) x = ↑(embeddingPiTangent f) y\n⊢ x = y\n[PROOFSTEP]\nsimp only [embeddingPiTangent_coe, funext_iff] at h \n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh :\n  ∀ (a : ι),\n    (↑(toFun s f a) x • ↑(extChartAt I (c s f a)) x, ↑(toFun s f a) x) =\n      (↑(toFun s f a) y • ↑(extChartAt I (c s f a)) y, ↑(toFun s f a) y)\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨h₁, h₂⟩ := Prod.mk.inj_iff.1 (h (f.ind x hx))\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh :\n  ∀ (a : ι),\n    (↑(toFun s f a) x • ↑(extChartAt I (c s f a)) x, ↑(toFun s f a) x) =\n      (↑(toFun s f a) y • ↑(extChartAt I (c s f a)) y, ↑(toFun s f a) y)\nh₁ :\n  ↑(toFun s f (ind f x hx)) x • ↑(extChartAt I (c s f (ind f x hx))) x =\n    ↑(toFun s f (ind f x hx)) y • ↑(extChartAt I (c s f (ind f x hx))) y\nh₂ : ↑(toFun s f (ind f x hx)) x = ↑(toFun s f (ind f x hx)) y\n⊢ x = y\n[PROOFSTEP]\nrw [f.apply_ind x hx] at h₂ \n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh :\n  ∀ (a : ι),\n    (↑(toFun s f a) x • ↑(extChartAt I (c s f a)) x, ↑(toFun s f a) x) =\n      (↑(toFun s f a) y • ↑(extChartAt I (c s f a)) y, ↑(toFun s f a) y)\nh₁ :\n  ↑(toFun s f (ind f x hx)) x • ↑(extChartAt I (c s f (ind f x hx))) x =\n    ↑(toFun s f (ind f x hx)) y • ↑(extChartAt I (c s f (ind f x hx))) y\nh₂ : 1 = ↑(toFun s f (ind f x hx)) y\n⊢ x = y\n[PROOFSTEP]\nrw [← h₂, f.apply_ind x hx, one_smul, one_smul] at h₁ \n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh :\n  ∀ (a : ι),\n    (↑(toFun s f a) x • ↑(extChartAt I (c s f a)) x, ↑(toFun s f a) x) =\n      (↑(toFun s f a) y • ↑(extChartAt I (c s f a)) y, ↑(toFun s f a) y)\nh₁ : ↑(extChartAt I (c s f (ind f x hx))) x = ↑(extChartAt I (c s f (ind f x hx))) y\nh₂ : 1 = ↑(toFun s f (ind f x hx)) y\n⊢ x = y\n[PROOFSTEP]\nhave := f.mem_extChartAt_source_of_eq_one h₂.symm\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\ny : M\na✝ : y ∈ s\nh :\n  ∀ (a : ι),\n    (↑(toFun s f a) x • ↑(extChartAt I (c s f a)) x, ↑(toFun s f a) x) =\n      (↑(toFun s f a) y • ↑(extChartAt I (c s f a)) y, ↑(toFun s f a) y)\nh₁ : ↑(extChartAt I (c s f (ind f x hx))) x = ↑(extChartAt I (c s f (ind f x hx))) y\nh₂ : 1 = ↑(toFun s f (ind f x hx)) y\nthis : y ∈ (extChartAt I (c s f (ind f x hx))).source\n⊢ x = y\n[PROOFSTEP]\nexact (extChartAt I (f.c _)).injOn (f.mem_extChartAt_ind_source x hx) this h₁\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\n⊢ ContinuousLinearMap.comp\n      (ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx)))\n      (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) =\n    mfderiv I I (↑(chartAt H (c s f (ind f x hx)))) x\n[PROOFSTEP]\nset L :=\n  (ContinuousLinearMap.fst ℝ E ℝ).comp\n    (@ContinuousLinearMap.proj ℝ _ ι (fun _ => E × ℝ) _ _ (fun _ => inferInstance) (f.ind x hx))\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\n⊢ ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) =\n    mfderiv I I (↑(chartAt H (c s f (ind f x hx)))) x\n[PROOFSTEP]\nhave := L.hasMFDerivAt.comp x f.embeddingPiTangent.smooth.mdifferentiableAt.hasMFDerivAt\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\nthis :\n  HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x\n    (ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\n⊢ ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) =\n    mfderiv I I (↑(chartAt H (c s f (ind f x hx)))) x\n[PROOFSTEP]\nconvert hasMFDerivAt_unique this _\n[GOAL]\ncase convert_2\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\nthis :\n  HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x\n    (ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\n⊢ HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x (mfderiv I I (↑(chartAt H (c s f (ind f x hx)))) x)\n[PROOFSTEP]\nrefine' (hasMFDerivAt_extChartAt I (f.mem_chartAt_ind_source x hx)).congr_of_eventuallyEq _\n[GOAL]\ncase convert_2\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\nthis :\n  HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x\n    (ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\n⊢ ↑L ∘ ↑(embeddingPiTangent f) =ᶠ[𝓝 x] ↑(extChartAt I (c s f (ind f x hx)))\n[PROOFSTEP]\nrefine' (f.eventuallyEq_one x hx).mono fun y hy => _\n[GOAL]\ncase convert_2\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\nthis :\n  HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x\n    (ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\ny : M\nhy : ↑(toFun s f (ind f x hx)) y = OfNat.ofNat 1 y\n⊢ (↑L ∘ ↑(embeddingPiTangent f)) y = ↑(extChartAt I (c s f (ind f x hx))) y\n[PROOFSTEP]\nsimp only [embeddingPiTangent_coe, ContinuousLinearMap.coe_comp', (· ∘ ·), ContinuousLinearMap.coe_fst',\n  ContinuousLinearMap.proj_apply]\n[GOAL]\ncase convert_2\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\nL : (ι → E × ℝ) →L[ℝ] E :=\n  ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx))\nthis :\n  HasMFDerivAt I 𝓘(ℝ, E) (↑L ∘ ↑(embeddingPiTangent f)) x\n    (ContinuousLinearMap.comp L (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\ny : M\nhy : ↑(toFun s f (ind f x hx)) y = OfNat.ofNat 1 y\n⊢ ↑(toFun s f (ind f x hx)) y • ↑(extChartAt I (c s f (ind f x hx))) y = ↑(extChartAt I (c s f (ind f x hx))) y\n[PROOFSTEP]\nrw [hy, Pi.one_apply, one_smul]\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\n⊢ LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) = ⊥\n[PROOFSTEP]\napply bot_unique\n[GOAL]\ncase h\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\n⊢ LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) ≤ ⊥\n[PROOFSTEP]\nrw [← (mdifferentiable_chart I (f.c (f.ind x hx))).ker_mfderiv_eq_bot (f.mem_chartAt_ind_source x hx), ←\n  comp_embeddingPiTangent_mfderiv]\n[GOAL]\ncase h\nι : Type uι\nE : Type uE\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁴ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝³ : TopologicalSpace M\ninst✝² : ChartedSpace H M\ninst✝¹ : SmoothManifoldWithCorners I M\ninst✝ : T2Space M\nhi : Fintype ι\ns : Set M\nf : SmoothBumpCovering ι I M s\nx : M\nhx : x ∈ s\n⊢ LinearMap.ker (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x) ≤\n    LinearMap.ker\n      (ContinuousLinearMap.comp\n        (ContinuousLinearMap.comp (ContinuousLinearMap.fst ℝ E ℝ) (ContinuousLinearMap.proj (ind f x hx)))\n        (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\n[PROOFSTEP]\nexact LinearMap.ker_le_ker_comp _ _\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nset F := EuclideanSpace ℝ (Fin <| finrank ℝ (ι → E × ℝ))\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nletI : IsNoetherian ℝ (E × ℝ) := IsNoetherian.iff_fg.2 inferInstance\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\nthis : IsNoetherian ℝ (E × ℝ) := Iff.mpr IsNoetherian.iff_fg inferInstance\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nletI : FiniteDimensional ℝ (ι → E × ℝ) := IsNoetherian.iff_fg.1 inferInstance\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\nthis✝ : IsNoetherian ℝ (E × ℝ) := Iff.mpr IsNoetherian.iff_fg inferInstance\nthis : FiniteDimensional ℝ (ι → E × ℝ) := Iff.mp IsNoetherian.iff_fg inferInstance\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nset eEF : (ι → E × ℝ) ≃L[ℝ] F := ContinuousLinearEquiv.ofFinrankEq finrank_euclideanSpace_fin.symm\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\nthis✝ : IsNoetherian ℝ (E × ℝ) := Iff.mpr IsNoetherian.iff_fg inferInstance\nthis : FiniteDimensional ℝ (ι → E × ℝ) := Iff.mp IsNoetherian.iff_fg inferInstance\neEF : (ι → E × ℝ) ≃L[ℝ] F :=\n  ContinuousLinearEquiv.ofFinrankEq\n    (_ : finrank ℝ (ι → E × ℝ) = finrank ℝ (EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))))\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      Injective e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nrefine\n  ⟨_, eEF ∘ f.embeddingPiTangent, eEF.toDiffeomorph.smooth.comp f.embeddingPiTangent.smooth,\n    eEF.injective.comp f.embeddingPiTangent_injective, fun x => ?_⟩\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\nthis✝ : IsNoetherian ℝ (E × ℝ) := Iff.mpr IsNoetherian.iff_fg inferInstance\nthis : FiniteDimensional ℝ (ι → E × ℝ) := Iff.mp IsNoetherian.iff_fg inferInstance\neEF : (ι → E × ℝ) ≃L[ℝ] F :=\n  ContinuousLinearEquiv.ofFinrankEq\n    (_ : finrank ℝ (ι → E × ℝ) = finrank ℝ (EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))))\nx : M\n⊢ Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))) (↑eEF ∘ ↑(embeddingPiTangent f)) x)\n[PROOFSTEP]\nrw [mfderiv_comp _ eEF.differentiableAt.mdifferentiableAt f.embeddingPiTangent.smooth.mdifferentiableAt, eEF.mfderiv_eq]\n[GOAL]\ncase intro\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\nhi : Fintype ι\ns : Set M\nf✝ : SmoothBumpCovering ι I M s\ninst✝ : Finite ι\nf : SmoothBumpCovering ι I M univ\nval✝ : Fintype ι\nF : Type := EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))\nthis✝ : IsNoetherian ℝ (E × ℝ) := Iff.mpr IsNoetherian.iff_fg inferInstance\nthis : FiniteDimensional ℝ (ι → E × ℝ) := Iff.mp IsNoetherian.iff_fg inferInstance\neEF : (ι → E × ℝ) ≃L[ℝ] F :=\n  ContinuousLinearEquiv.ofFinrankEq\n    (_ : finrank ℝ (ι → E × ℝ) = finrank ℝ (EuclideanSpace ℝ (Fin (finrank ℝ (ι → E × ℝ)))))\nx : M\n⊢ Injective ↑(ContinuousLinearMap.comp (↑eEF) (mfderiv I 𝓘(ℝ, ι → E × ℝ) (↑(embeddingPiTangent f)) x))\n[PROOFSTEP]\nexact eEF.injective.comp (f.embeddingPiTangent_injective_mfderiv _ trivial)\n[GOAL]\nι : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\ninst✝ : CompactSpace M\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      ClosedEmbedding e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nrcases SmoothBumpCovering.exists_isSubordinate I isClosed_univ fun (x : M) _ => univ_mem with ⟨ι, f, -⟩\n[GOAL]\ncase intro.intro\nι✝ : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\ninst✝ : CompactSpace M\nι : Type uM\nf : SmoothBumpCovering ι I M univ\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      ClosedEmbedding e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nhaveI := f.fintype\n[GOAL]\ncase intro.intro\nι✝ : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\ninst✝ : CompactSpace M\nι : Type uM\nf : SmoothBumpCovering ι I M univ\nthis : Fintype ι\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      ClosedEmbedding e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nrcases f.exists_immersion_euclidean with ⟨n, e, hsmooth, hinj, hinj_mfderiv⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nι✝ : Type uι\nE : Type uE\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\nH : Type uH\ninst✝⁵ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type uM\ninst✝⁴ : TopologicalSpace M\ninst✝³ : ChartedSpace H M\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : T2Space M\ninst✝ : CompactSpace M\nι : Type uM\nf : SmoothBumpCovering ι I M univ\nthis : Fintype ι\nn : ℕ\ne : M → EuclideanSpace ℝ (Fin n)\nhsmooth : Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e\nhinj : Injective e\nhinj_mfderiv : ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n⊢ ∃ n e,\n    Smooth I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e ∧\n      ClosedEmbedding e ∧ ∀ (x : M), Injective ↑(mfderiv I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) e x)\n[PROOFSTEP]\nexact ⟨n, e, hsmooth, hsmooth.continuous.closedEmbedding hinj, hinj_mfderiv⟩\n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.WhitneyEmbedding", "llama_tokens": 10852, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.626124191181315, "lm_q2_score": 0.4726834766204328, "lm_q1q2_score": 0.2959585594837405}}
{"text": "[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\n⊢ ∀ (y : { x // x ∈ nonZeroDivisors ℤ }), IsUnit (↑(algebraMap ℤ ℚ) ↑y)\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mk\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx : ℤ\nhx : x ∈ nonZeroDivisors ℤ\n⊢ IsUnit (↑(algebraMap ℤ ℚ) ↑{ val := x, property := hx })\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff_ne_zero] at hx \n[GOAL]\ncase mk\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx : ℤ\nhx✝ : x ∈ nonZeroDivisors ℤ\nhx : x ≠ 0\n⊢ IsUnit (↑(algebraMap ℤ ℚ) ↑{ val := x, property := hx✝ })\n[PROOFSTEP]\nsimpa only [eq_intCast, isUnit_iff_ne_zero, Int.cast_eq_zero, Ne.def, Subtype.coe_mk] using hx\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\n⊢ ∀ (z : ℚ), ∃ x, z * ↑(algebraMap ℤ ℚ) ↑x.snd = ↑(algebraMap ℤ ℚ) x.fst\n[PROOFSTEP]\nrintro ⟨n, d, hd, h⟩\n[GOAL]\ncase mk'\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nn : ℤ\nd : ℕ\nhd : d ≠ 0\nh : Nat.coprime (Int.natAbs n) d\n⊢ ∃ x, mk' n d * ↑(algebraMap ℤ ℚ) ↑x.snd = ↑(algebraMap ℤ ℚ) x.fst\n[PROOFSTEP]\nrefine' ⟨⟨n, ⟨d, _⟩⟩, Rat.mul_den_eq_num⟩\n[GOAL]\ncase mk'\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nn : ℤ\nd : ℕ\nhd : d ≠ 0\nh : Nat.coprime (Int.natAbs n) d\n⊢ ↑d ∈ nonZeroDivisors ℤ\n[PROOFSTEP]\nrw [mem_nonZeroDivisors_iff_ne_zero, Int.coe_nat_ne_zero_iff_pos]\n[GOAL]\ncase mk'\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nn : ℤ\nd : ℕ\nhd : d ≠ 0\nh : Nat.coprime (Int.natAbs n) d\n⊢ 0 < d\n[PROOFSTEP]\nexact Nat.zero_lt_of_ne_zero hd\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\n⊢ ∀ {x y : ℤ}, ↑(algebraMap ℤ ℚ) x = ↑(algebraMap ℤ ℚ) y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nintro x y\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y : ℤ\n⊢ ↑(algebraMap ℤ ℚ) x = ↑(algebraMap ℤ ℚ) y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nrw [eq_intCast, eq_intCast, Int.cast_inj]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y : ℤ\n⊢ x = y ↔ ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\napply Iff.intro\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y : ℤ\n⊢ x = y → ∃ c, ↑c * x = ↑c * y\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx : ℤ\n⊢ ∃ c, ↑c * x = ↑c * x\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase mpr\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y : ℤ\n⊢ (∃ c, ↑c * x = ↑c * y) → x = y\n[PROOFSTEP]\nrintro ⟨⟨c, hc⟩, h⟩\n[GOAL]\ncase mpr.intro.mk\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y c : ℤ\nhc : c ∈ nonZeroDivisors ℤ\nh : ↑{ val := c, property := hc } * x = ↑{ val := c, property := hc } * y\n⊢ x = y\n[PROOFSTEP]\napply mul_left_cancel₀ _ h\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nx y c : ℤ\nhc : c ∈ nonZeroDivisors ℤ\nh : ↑{ val := c, property := hc } * x = ↑{ val := c, property := hc } * y\n⊢ ↑{ val := c, property := hc } ≠ 0\n[PROOFSTEP]\nrwa [mem_nonZeroDivisors_iff_ne_zero] at hc \n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : x ≠ 0\n⊢ x * IsFractionRing.inv A x = 1\n[PROOFSTEP]\nrw [IsFractionRing.inv, dif_neg hx, ←\n  IsUnit.mul_left_inj\n    (map_units K\n      ⟨(sec _ x).1,\n        mem_nonZeroDivisors_iff_ne_zero.2 fun h0 => hx <| eq_zero_of_fst_eq_zero (sec_spec (nonZeroDivisors A) x) h0⟩),\n  one_mul, mul_assoc]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : x ≠ 0\n⊢ x *\n      (mk' K ↑(sec (nonZeroDivisors A) x).snd\n          { val := (sec (nonZeroDivisors A) x).fst,\n            property := (_ : (sec (nonZeroDivisors A) x).fst ∈ nonZeroDivisors A) } *\n        ↑(algebraMap A K)\n          ↑{ val := (sec (nonZeroDivisors A) x).fst,\n              property := (_ : (sec (nonZeroDivisors A) x).fst ∈ nonZeroDivisors A) }) =\n    ↑(algebraMap A K)\n      ↑{ val := (sec (nonZeroDivisors A) x).fst, property := (_ : (sec (nonZeroDivisors A) x).fst ∈ nonZeroDivisors A) }\n[PROOFSTEP]\nrw [mk'_spec, ← eq_mk'_iff_mul_eq]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nx : K\nhx : x ≠ 0\n⊢ x =\n    mk'\n      ((fun x => K)\n        ↑{ val := (sec (nonZeroDivisors A) x).fst,\n            property := (_ : (sec (nonZeroDivisors A) x).fst ∈ nonZeroDivisors A) })\n      (↑{ val := (sec (nonZeroDivisors A) x).fst,\n          property := (_ : (sec (nonZeroDivisors A) x).fst ∈ nonZeroDivisors A) })\n      (sec (nonZeroDivisors A) x).snd\n[PROOFSTEP]\nexact (mk'_sec _ x).symm\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝¹ : IsDomain K := IsFractionRing.isDomain A\nsrc✝ : CommRing K := inferInstanceAs (CommRing K)\n⊢ 0⁻¹ = 0\n[PROOFSTEP]\nchange IsFractionRing.inv A (0 : K) = 0\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝¹ : IsDomain K := IsFractionRing.isDomain A\nsrc✝ : CommRing K := inferInstanceAs (CommRing K)\n⊢ IsFractionRing.inv A 0 = 0\n[PROOFSTEP]\nrw [IsFractionRing.inv]\n[GOAL]\nR : Type u_1\ninst✝¹⁰ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁹ : CommRing S\ninst✝⁸ : Algebra R S\nP : Type u_3\ninst✝⁷ : CommRing P\nA : Type u_4\ninst✝⁶ : CommRing A\ninst✝⁵ : IsDomain A\nK : Type u_5\ninst✝⁴ : CommRing K\ninst✝³ : Algebra R K\ninst✝² : IsFractionRing R K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\nsrc✝¹ : IsDomain K := IsFractionRing.isDomain A\nsrc✝ : CommRing K := inferInstanceAs (CommRing K)\n⊢ (if h : 0 = 0 then 0\n    else\n      mk' K ↑(sec (nonZeroDivisors A) 0).snd\n        { val := (sec (nonZeroDivisors A) 0).fst,\n          property := (_ : (sec (nonZeroDivisors A) 0).fst ∈ nonZeroDivisors A) }) =\n    0\n[PROOFSTEP]\nexact dif_pos rfl\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nz : K\nx y : A\nhy : y ∈ nonZeroDivisors A\nh : mk' K x { val := y, property := hy } = z\n⊢ ↑(algebraMap A K) x / ↑(algebraMap A K) y = z\n[PROOFSTEP]\nrwa [mk'_eq_div] at h \n[GOAL]\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx : R\ny : { x // x ∈ nonZeroDivisors R }\n⊢ mk' K x y = 0 ↔ x = 0\n[PROOFSTEP]\nrefine' ⟨fun hxy => _, fun h => by rw [h, mk'_zero]⟩\n[GOAL]\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx : R\ny : { x // x ∈ nonZeroDivisors R }\nh : x = 0\n⊢ mk' K x y = 0\n[PROOFSTEP]\nrw [h, mk'_zero]\n[GOAL]\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx : R\ny : { x // x ∈ nonZeroDivisors R }\nhxy : mk' K x y = 0\n⊢ x = 0\n[PROOFSTEP]\nsimp_rw [mk'_eq_zero_iff, mul_left_coe_nonZeroDivisors_eq_zero_iff] at hxy \n[GOAL]\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx : R\ny : { x // x ∈ nonZeroDivisors R }\nhxy : ∃ m, x = 0\n⊢ x = 0\n[PROOFSTEP]\nexact (exists_const _).mp hxy\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\n⊢ mk' K x y = 1 ↔ x = ↑y\n[PROOFSTEP]\nrefine' ⟨_, fun hxy => by rw [hxy, mk'_self']⟩\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\nhxy : x = ↑y\n⊢ mk' K x y = 1\n[PROOFSTEP]\nrw [hxy, mk'_self']\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\n⊢ mk' K x y = 1 → x = ↑y\n[PROOFSTEP]\nintro hxy\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\nhxy : mk' K x y = 1\n⊢ x = ↑y\n[PROOFSTEP]\nhave hy : (algebraMap A K) ↑y ≠ (0 : K) := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors y.property\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\nhxy : mk' K x y = 1\nhy : ↑(algebraMap A K) ↑y ≠ 0\n⊢ x = ↑y\n[PROOFSTEP]\nrw [IsFractionRing.mk'_eq_div, div_eq_one_iff_eq hy] at hxy \n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nx : A\ny : { x // x ∈ nonZeroDivisors A }\nhxy : ↑(algebraMap A K) x = ↑(algebraMap A K) ↑y\nhy : ↑(algebraMap A K) ↑y ≠ 0\n⊢ x = ↑y\n[PROOFSTEP]\nexact IsFractionRing.injective A K hxy\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nhg : Injective ↑g\nx : A\ny : { x // x ∈ nonZeroDivisors A }\n⊢ ↑(lift hg) (mk' K x y) = ↑g x / ↑g ↑y\n[PROOFSTEP]\nsimp only [mk'_eq_div, map_div₀, lift_algebraMap]\n[GOAL]\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra B L\ninst✝ : IsFractionRing B L\nh : A ≃+* B\n⊢ Submonoid.map (RingEquiv.toMonoidHom h) (?m.392285 h) = ?m.392287 h\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra B L\ninst✝ : IsFractionRing B L\nh : A ≃+* B\nb : B\n⊢ b ∈ Submonoid.map (RingEquiv.toMonoidHom h) (?m.392285 h) ↔ b ∈ ?m.392287 h\n[PROOFSTEP]\nshow b ∈ h.toEquiv '' _ ↔ _\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra B L\ninst✝ : IsFractionRing B L\nh : A ≃+* B\nb : B\n⊢ b ∈ ↑h.toEquiv '' ↑(?m.392285 h) ↔ b ∈ ?m.392287 h\n[PROOFSTEP]\nerw [h.toEquiv.image_eq_preimage, Set.preimage, Set.mem_setOf_eq, mem_nonZeroDivisors_iff_ne_zero,\n  mem_nonZeroDivisors_iff_ne_zero]\n[GOAL]\ncase h\nR : Type u_1\ninst✝¹³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹² : CommRing S\ninst✝¹¹ : Algebra R S\nP : Type u_3\ninst✝¹⁰ : CommRing P\nA : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁷ : CommRing B\ninst✝⁶ : IsDomain B\ninst✝⁵ : Field K\nL : Type u_7\ninst✝⁴ : Field L\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ng : A →+* L\ninst✝¹ : Algebra B L\ninst✝ : IsFractionRing B L\nh : A ≃+* B\nb : B\n⊢ ↑h.symm b ≠ 0 ↔ b ≠ 0\n[PROOFSTEP]\nexact h.symm.map_ne_zero_iff\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\n⊢ IsFractionRing R S ↔ IsFractionRing P S\n[PROOFSTEP]\ndelta IsFractionRing\n[GOAL]\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\n⊢ IsLocalization (nonZeroDivisors R) S ↔ IsLocalization (nonZeroDivisors P) S\n[PROOFSTEP]\nconvert isLocalization_iff_of_base_ringEquiv (nonZeroDivisors R) S h\n[GOAL]\ncase h.e'_2.h.e'_3\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\n⊢ nonZeroDivisors P = Submonoid.map (RingEquiv.toMonoidHom h) (nonZeroDivisors R)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_2.h.e'_3.h\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\n⊢ x ∈ nonZeroDivisors P ↔ x ∈ Submonoid.map (RingEquiv.toMonoidHom h) (nonZeroDivisors R)\n[PROOFSTEP]\nerw [Submonoid.map_equiv_eq_comap_symm]\n[GOAL]\ncase h.e'_2.h.e'_3.h\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\n⊢ x ∈ nonZeroDivisors P ↔\n    x ∈ Submonoid.comap (MulEquiv.toMonoidHom (MulEquiv.symm (RingEquiv.toMulEquiv h))) (nonZeroDivisors R)\n[PROOFSTEP]\nsimp only [MulEquiv.coe_toMonoidHom, RingEquiv.toMulEquiv_eq_coe, Submonoid.mem_comap]\n[GOAL]\ncase h.e'_2.h.e'_3.h\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\n⊢ x ∈ nonZeroDivisors P ↔ ↑(MulEquiv.symm ↑h) x ∈ nonZeroDivisors R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.e'_2.h.e'_3.h.mp\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\n⊢ x ∈ nonZeroDivisors P → ↑(MulEquiv.symm ↑h) x ∈ nonZeroDivisors R\n[PROOFSTEP]\nrintro hx z (hz : z * h.symm x = 0)\n[GOAL]\ncase h.e'_2.h.e'_3.h.mp\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : x ∈ nonZeroDivisors P\nz : R\nhz : z * ↑(RingEquiv.symm h) x = 0\n⊢ z = 0\n[PROOFSTEP]\nrw [← h.map_eq_zero_iff]\n[GOAL]\ncase h.e'_2.h.e'_3.h.mp\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : x ∈ nonZeroDivisors P\nz : R\nhz : z * ↑(RingEquiv.symm h) x = 0\n⊢ ↑h z = 0\n[PROOFSTEP]\napply hx\n[GOAL]\ncase h.e'_2.h.e'_3.h.mp.a\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : x ∈ nonZeroDivisors P\nz : R\nhz : z * ↑(RingEquiv.symm h) x = 0\n⊢ ↑h z * x = 0\n[PROOFSTEP]\nsimpa only [h.map_zero, h.apply_symm_apply, h.map_mul] using congr_arg h hz\n[GOAL]\ncase h.e'_2.h.e'_3.h.mpr\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\n⊢ ↑(MulEquiv.symm ↑h) x ∈ nonZeroDivisors R → x ∈ nonZeroDivisors P\n[PROOFSTEP]\nrintro (hx : h.symm x ∈ _) z hz\n[GOAL]\ncase h.e'_2.h.e'_3.h.mpr\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : ↑(RingEquiv.symm h) x ∈ nonZeroDivisors R\nz : P\nhz : z * x = 0\n⊢ z = 0\n[PROOFSTEP]\nrw [← h.symm.map_eq_zero_iff]\n[GOAL]\ncase h.e'_2.h.e'_3.h.mpr\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : ↑(RingEquiv.symm h) x ∈ nonZeroDivisors R\nz : P\nhz : z * x = 0\n⊢ ↑(RingEquiv.symm h) z = 0\n[PROOFSTEP]\napply hx\n[GOAL]\ncase h.e'_2.h.e'_3.h.mpr.a\nR : Type u_1\ninst✝¹¹ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝¹⁰ : CommRing S\ninst✝⁹ : Algebra R S\nP : Type u_3\ninst✝⁸ : CommRing P\nA : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝⁵ : CommRing B\ninst✝⁴ : IsDomain B\ninst✝³ : Field K\nL : Type u_7\ninst✝² : Field L\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\ng : A →+* L\nh : R ≃+* P\nx : P\nhx : ↑(RingEquiv.symm h) x ∈ nonZeroDivisors R\nz : P\nhz : z * x = 0\n⊢ ↑(RingEquiv.symm h) z * ↑(RingEquiv.symm h) x = 0\n[PROOFSTEP]\nrw [← h.symm.map_mul, hz, h.symm.map_zero]\n[GOAL]\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ Nontrivial S\n[PROOFSTEP]\napply nontrivial_of_ne\n[GOAL]\ncase h\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ ?x ≠ ?y\ncase x\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\ncase y\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\nh : ?x = ?y\n⊢ False\ncase x\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\ncase y\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\n[PROOFSTEP]\napply @zero_ne_one R\n[GOAL]\ncase h.a\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\nh : ?x = ?y\n⊢ 0 = 1\ncase x\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\ncase y\nR✝ : Type u_1\ninst✝¹⁶ : CommRing R✝\nM : Submonoid R✝\nS✝ : Type u_2\ninst✝¹⁵ : CommRing S✝\ninst✝¹⁴ : Algebra R✝ S✝\nP : Type u_3\ninst✝¹³ : CommRing P\nA : Type u_4\ninst✝¹² : CommRing A\ninst✝¹¹ : IsDomain A\nK : Type u_5\nB : Type u_6\ninst✝¹⁰ : CommRing B\ninst✝⁹ : IsDomain B\ninst✝⁸ : Field K\nL : Type u_7\ninst✝⁷ : Field L\ninst✝⁶ : Algebra A K\ninst✝⁵ : IsFractionRing A K\ng : A →+* L\nR : Type u_8\nS : Type u_9\ninst✝⁴ : CommRing R\ninst✝³ : Nontrivial R\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsFractionRing R S\n⊢ S\n[PROOFSTEP]\nexact\n  IsLocalization.injective S (le_of_eq rfl) (((algebraMap R S).map_zero.trans h).trans (algebraMap R S).map_one.symm)\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\nA : Type u_4\ninst✝¹ : CommRing A\ninst✝ : IsDomain A\nK : Type u_5\nr : A\ns : { x // x ∈ nonZeroDivisors A }\n⊢ Localization.mk r s = ↑(algebraMap A (FractionRing A)) r / ↑(algebraMap A (FractionRing A)) ↑s\n[PROOFSTEP]\nrw [Localization.mk_eq_mk', IsFractionRing.mk'_eq_div]\n[GOAL]\nR : Type u_1\ninst✝⁷ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R S\nP : Type u_3\ninst✝⁴ : CommRing P\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : IsDomain A\nK : Type u_5\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ NoZeroSMulDivisors R (FractionRing A)\n[PROOFSTEP]\napply NoZeroSMulDivisors.of_algebraMap_injective\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁷ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R S\nP : Type u_3\ninst✝⁴ : CommRing P\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : IsDomain A\nK : Type u_5\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ Function.Injective ↑(algebraMap R (FractionRing A))\n[PROOFSTEP]\nrw [IsScalarTower.algebraMap_eq R A]\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁷ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁶ : CommRing S\ninst✝⁵ : Algebra R S\nP : Type u_3\ninst✝⁴ : CommRing P\nA : Type u_4\ninst✝³ : CommRing A\ninst✝² : IsDomain A\nK : Type u_5\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ Function.Injective ↑(RingHom.comp (algebraMap A (FractionRing A)) (algebraMap R A))\n[PROOFSTEP]\napply\n  Function.Injective.comp (NoZeroSMulDivisors.algebraMap_injective A (FractionRing A))\n    (NoZeroSMulDivisors.algebraMap_injective R A)\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.FractionRing", "llama_tokens": 17327, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6150878696277512, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.29553660648204527}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nht : TopologicalSpace α\nh : PolishSpace α\n⊢ CompleteSpace α\n[PROOFSTEP]\nconvert h.complete.choose_spec.2\n[GOAL]\ncase h.e'_2.h.e'_2.h.e'_2\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\nht : TopologicalSpace α\nh : PolishSpace α\n⊢ polishSpaceMetric α = Exists.choose (_ : ∃ m, UniformSpace.toTopologicalSpace = ht ∧ CompleteSpace α)\n[PROOFSTEP]\nexact MetricSpace.replaceTopology_eq _ _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\n⊢ T2Space α\n[PROOFSTEP]\nletI := upgradePolishSpace α\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\nthis : UpgradedPolishSpace α := upgradePolishSpace α\n⊢ T2Space α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝² : Countable ι\nE : ι → Type u_4\ninst✝¹ : (i : ι) → TopologicalSpace (E i)\ninst✝ : ∀ (i : ι), PolishSpace (E i)\n⊢ PolishSpace ((i : ι) → E i)\n[PROOFSTEP]\ncases nonempty_encodable ι\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝² : Countable ι\nE : ι → Type u_4\ninst✝¹ : (i : ι) → TopologicalSpace (E i)\ninst✝ : ∀ (i : ι), PolishSpace (E i)\nval✝ : Encodable ι\n⊢ PolishSpace ((i : ι) → E i)\n[PROOFSTEP]\nletI := fun i => upgradePolishSpace (E i)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝² : Countable ι\nE : ι → Type u_4\ninst✝¹ : (i : ι) → TopologicalSpace (E i)\ninst✝ : ∀ (i : ι), PolishSpace (E i)\nval✝ : Encodable ι\nthis : (i : ι) → UpgradedPolishSpace (E i) := fun i => upgradePolishSpace (E i)\n⊢ PolishSpace ((i : ι) → E i)\n[PROOFSTEP]\nletI : MetricSpace (∀ i, E i) := PiCountable.metricSpace\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝² : Countable ι\nE : ι → Type u_4\ninst✝¹ : (i : ι) → TopologicalSpace (E i)\ninst✝ : ∀ (i : ι), PolishSpace (E i)\nval✝ : Encodable ι\nthis✝ : (i : ι) → UpgradedPolishSpace (E i) := fun i => upgradePolishSpace (E i)\nthis : MetricSpace ((i : ι) → E i) := PiCountable.metricSpace\n⊢ PolishSpace ((i : ι) → E i)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\n⊢ PolishSpace α\n[PROOFSTEP]\nletI := upgradePolishSpace β\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis : UpgradedPolishSpace β := upgradePolishSpace β\n⊢ PolishSpace α\n[PROOFSTEP]\nletI : MetricSpace α := hf.toEmbedding.comapMetricSpace f\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis✝ : UpgradedPolishSpace β := upgradePolishSpace β\nthis : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)\n⊢ PolishSpace α\n[PROOFSTEP]\nhaveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis✝¹ : UpgradedPolishSpace β := upgradePolishSpace β\nthis✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)\nthis : SecondCountableTopology α\n⊢ PolishSpace α\n[PROOFSTEP]\nhave : CompleteSpace α :=\n  by\n  rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]\n  exact hf.closed_range.isComplete\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis✝¹ : UpgradedPolishSpace β := upgradePolishSpace β\nthis✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)\nthis : SecondCountableTopology α\n⊢ CompleteSpace α\n[PROOFSTEP]\nrw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis✝¹ : UpgradedPolishSpace β := upgradePolishSpace β\nthis✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)\nthis : SecondCountableTopology α\n⊢ IsComplete (range f)\n[PROOFSTEP]\nexact hf.closed_range.isComplete\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSpace β\ninst✝ : PolishSpace β\nf : α → β\nhf : ClosedEmbedding f\nthis✝² : UpgradedPolishSpace β := upgradePolishSpace β\nthis✝¹ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)\nthis✝ : SecondCountableTopology α\nthis : CompleteSpace α\n⊢ PolishSpace α\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nrcases isEmpty_or_nonempty ι with (hι | hι)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : IsEmpty ι\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nexact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\ninhabit ι\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nletI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nhaveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nletI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nlet f : α → ∀ n : ι, AuxCopy α n := fun x _ => x\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nhave T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by\n  rw [induced_to_pi]\n  exact iInf_le_of_le n (@induced_id _ (m n)).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nn : ι\n⊢ induced f T ≤ m n\n[PROOFSTEP]\nrw [induced_to_pi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nn : ι\n⊢ ⨅ (i : ι), induced (fun x => f x i) inferInstance ≤ m n\n[PROOFSTEP]\nexact iInf_le_of_le n (@induced_id _ (m n)).le\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\n⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α\n[PROOFSTEP]\nrefine'\n  ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩\n    -- show that the new topology is Polish, as the pullback of a Polish topology under a closed\n      -- embedding.\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\n⊢ PolishSpace α\n[PROOFSTEP]\nhave A : range f = ⋂ n, {x | x n = x default} := by\n  ext x\n  constructor\n  · rintro ⟨y, rfl⟩\n    exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]\n  · refine fun hx ↦ ⟨x default, ?_⟩\n    ext1 n\n    symm\n    exact mem_iInter.1 hx n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\n⊢ range f = ⋂ (n : ι), {x | x n = x default}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\n⊢ x ∈ range f ↔ x ∈ ⋂ (n : ι), {x | x n = x default}\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\n⊢ x ∈ range f → x ∈ ⋂ (n : ι), {x | x n = x default}\n[PROOFSTEP]\nrintro ⟨y, rfl⟩\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\ny : α\n⊢ f y ∈ ⋂ (n : ι), {x | x n = x default}\n[PROOFSTEP]\nexact mem_iInter.2 fun n => by simp only [mem_setOf_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\ny : α\nn : ι\n⊢ f y ∈ {x | x n = x default}\n[PROOFSTEP]\nsimp only [mem_setOf_eq]\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\n⊢ x ∈ ⋂ (n : ι), {x | x n = x default} → x ∈ range f\n[PROOFSTEP]\nrefine fun hx ↦ ⟨x default, ?_⟩\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\nhx : x ∈ ⋂ (n : ι), {x | x n = x default}\n⊢ f (x default) = x\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h.mpr.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\nhx : x ∈ ⋂ (n : ι), {x | x n = x default}\nn : ι\n⊢ f (x default) n = x n\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.mpr.h\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nx : (n : ι) → AuxCopy α n\nhx : x ∈ ⋂ (n : ι), {x | x n = x default}\nn : ι\n⊢ x n = f (x default) n\n[PROOFSTEP]\nexact mem_iInter.1 hx n\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\n⊢ PolishSpace α\n[PROOFSTEP]\nhave f_closed : IsClosed (range f) := by\n  rw [A]\n  refine isClosed_iInter fun n => ?_\n  have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦\n    have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)\n    this.comp (continuous_apply i)\n  apply isClosed_eq (C n) (C default)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\n⊢ IsClosed (range f)\n[PROOFSTEP]\nrw [A]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\n⊢ IsClosed (⋂ (n : ι), {x | x n = x default})\n[PROOFSTEP]\nrefine isClosed_iInter fun n => ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nn : ι\n⊢ IsClosed {x | x n = x default}\n[PROOFSTEP]\nhave C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦\n  have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)\n  this.comp (continuous_apply i)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nn : ι\nC : ∀ (i : ι), Continuous fun x => id (x i)\n⊢ IsClosed {x | x n = x default}\n[PROOFSTEP]\napply isClosed_eq (C n) (C default)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\n⊢ PolishSpace α\n[PROOFSTEP]\nhave K : @_root_.Embedding _ _ (T.induced f) T f :=\n  by\n  refine Function.Injective.embedding_induced fun x y hxy ↦ ?_\n  have : f x default = f y default := by rw [hxy]\n  exact this\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\n⊢ _root_.Embedding f\n[PROOFSTEP]\nrefine Function.Injective.embedding_induced fun x y hxy ↦ ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nx y : α\nhxy : f x = f y\n⊢ x = y\n[PROOFSTEP]\nhave : f x default = f y default := by rw [hxy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nx y : α\nhxy : f x = f y\n⊢ f x default = f y default\n[PROOFSTEP]\nrw [hxy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝¹ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis✝ : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nx y : α\nhxy : f x = f y\nthis : f x default = f y default\n⊢ x = y\n[PROOFSTEP]\nexact this\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\n⊢ PolishSpace α\n[PROOFSTEP]\nhave L : @ClosedEmbedding _ _ (T.induced f) T f :=\n  by\n  refine @ClosedEmbedding.mk _ _ (T.induced f) T f ?_ ?_\n  · exact K\n  · exact f_closed\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\n⊢ ClosedEmbedding f\n[PROOFSTEP]\nrefine @ClosedEmbedding.mk _ _ (T.induced f) T f ?_ ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\n⊢ _root_.Embedding f\n[PROOFSTEP]\nexact K\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\n⊢ IsClosed (range f)\n[PROOFSTEP]\nexact f_closed\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\nL : ClosedEmbedding f\n⊢ PolishSpace α\n[PROOFSTEP]\nexact @ClosedEmbedding.polishSpace _ _ (T.induced f) T (by infer_instance) _ L\n[GOAL]\nα : Type u_1\nβ : Type u_2\nι : Type u_3\ninst✝ : Countable ι\nt : TopologicalSpace α\np : PolishSpace α\nm : ι → TopologicalSpace α\nhm : ∀ (n : ι), m n ≤ t\nh'm : ∀ (n : ι), PolishSpace α\nhι : Nonempty ι\ninhabited_h : Inhabited ι\nthis✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n\nthis : ∀ (n : ι), PolishSpace (AuxCopy α n)\nT : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance\nf : α → (n : ι) → AuxCopy α n := fun x x_1 => x\nT_le_m : ∀ (n : ι), induced f T ≤ m n\nA : range f = ⋂ (n : ι), {x | x n = x default}\nf_closed : IsClosed (range f)\nK : _root_.Embedding f\nL : ClosedEmbedding f\n⊢ PolishSpace ((n : ι) → AuxCopy α n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\n⊢ MetricSpace (CompleteCopy s)\n[PROOFSTEP]\nrefine\n  @MetricSpace.ofT0PseudoMetricSpace (CompleteCopy s)\n    (.ofDistTopology dist (fun _ ↦ ?_) (fun _ _ ↦ ?_) (fun x y z ↦ ?_) fun t ↦ ?_) _\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nx✝ : CompleteCopy s\n⊢ dist x✝ x✝ = 0\n[PROOFSTEP]\nsimp only [dist_eq, dist_self, one_div, sub_self, abs_zero, add_zero]\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nx✝¹ x✝ : CompleteCopy s\n⊢ dist x✝¹ x✝ = dist x✝ x✝¹\n[PROOFSTEP]\nsimp only [dist_eq, dist_comm, abs_sub_comm]\n[GOAL]\ncase refine_3\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nx y z : CompleteCopy s\n⊢ dist x z ≤ dist x y + dist y z\n[PROOFSTEP]\ncalc\n  dist x z = dist x.1 z.1 + |1 / infDist x.1 sᶜ - 1 / infDist z.1 sᶜ| := rfl\n  _ ≤\n      dist x.1 y.1 + dist y.1 z.1 +\n        (|1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ| + |1 / infDist y.1 sᶜ - 1 / infDist z.1 sᶜ|) :=\n    (add_le_add (dist_triangle _ _ _) (dist_triangle (1 / infDist _ _) _ _))\n  _ = dist x y + dist y z := add_add_add_comm ..\n[GOAL]\ncase refine_4\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\n⊢ IsOpen t ↔ ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\n[PROOFSTEP]\nrefine ⟨fun h x hx ↦ ?_, fun h ↦ isOpen_iff_mem_nhds.2 fun x hx ↦ ?_⟩\n[GOAL]\ncase refine_4.refine_1\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : IsOpen t\nx : CompleteCopy s\nhx : x ∈ t\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\n[PROOFSTEP]\nrcases(Metric.isOpen_iff (α := s)).1 h x hx with ⟨ε, ε0, hε⟩\n[GOAL]\ncase refine_4.refine_1.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : IsOpen t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ball x ε ⊆ t\n⊢ ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\n[PROOFSTEP]\nexact ⟨ε, ε0, fun y hy ↦ hε <| (dist_comm _ _).trans_lt <| (dist_val_le_dist _ _).trans_lt hy⟩\n[GOAL]\ncase refine_4.refine_2\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\n⊢ t ∈ 𝓝 x\n[PROOFSTEP]\nrcases h x hx with ⟨ε, ε0, hε⟩\n[GOAL]\ncase refine_4.refine_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\n⊢ t ∈ 𝓝 x\n[PROOFSTEP]\nsimp only [dist_eq, one_div] at hε \n[GOAL]\ncase refine_4.refine_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\n⊢ t ∈ 𝓝 x\n[PROOFSTEP]\nhave :\n  Tendsto (fun y : s ↦ dist x.1 y.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist y.1 sᶜ)⁻¹|) (𝓝 x)\n    (𝓝 (dist x.1 x.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist x.1 sᶜ)⁻¹|))\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\n⊢ Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x)\n    (𝓝 (dist ↑x ↑x + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑x) (↑s)ᶜ)⁻¹|))\n[PROOFSTEP]\nrefine (tendsto_const_nhds.dist continuous_subtype_val.continuousAt).add (tendsto_const_nhds.sub <| ?_).abs\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\n⊢ Tendsto (fun y => (infDist (↑y) (↑s)ᶜ)⁻¹) (𝓝 x) (𝓝 (infDist (↑x) (↑s)ᶜ)⁻¹)\n[PROOFSTEP]\nrefine (continuousAt_inv_infDist_pt ?_).comp continuous_subtype_val.continuousAt\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\n⊢ ¬↑x ∈ closure (↑s)ᶜ\n[PROOFSTEP]\nrw [s.isOpen.isClosed_compl.closure_eq, mem_compl_iff, not_not]\n[GOAL]\ncase this\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\n⊢ ↑x ∈ ↑s\n[PROOFSTEP]\nexact x.2\n[GOAL]\ncase refine_4.refine_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\nthis :\n  Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x)\n    (𝓝 (dist ↑x ↑x + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑x) (↑s)ᶜ)⁻¹|))\n⊢ t ∈ 𝓝 x\n[PROOFSTEP]\nsimp only [dist_self, sub_self, abs_zero, zero_add] at this \n[GOAL]\ncase refine_4.refine_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : MetricSpace α\ns : Opens α\nt : Set (CompleteCopy s)\nh : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t\nx : CompleteCopy s\nhx : x ∈ t\nε : ℝ\nε0 : ε > 0\nhε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t\nthis : Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x) (𝓝 0)\n⊢ t ∈ 𝓝 x\n[PROOFSTEP]\nexact mem_of_superset (this <| gt_mem_nhds ε0) hε\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\n⊢ CompleteSpace (CompleteCopy s)\n[PROOFSTEP]\nrefine Metric.complete_of_convergent_controlled_sequences ((1 / 2) ^ ·) (by simp) fun u hu ↦ ?_\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\n⊢ ∀ (n : ℕ), 0 < (fun x => (1 / 2) ^ x) n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nhave A : CauchySeq fun n => (u n).1\n[GOAL]\ncase A\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\n⊢ CauchySeq fun n => ↑(u n)\n[PROOFSTEP]\nrefine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_\n[GOAL]\ncase A.refine_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nn m N : ℕ\nhNn : N ≤ n\nhNm : N ≤ m\n⊢ dist ↑(u n) ↑(u m) ≤ (fun n => (1 / 2) ^ n) N\n[PROOFSTEP]\nexact (dist_val_le_dist (u n) (u m)).trans (hu N n m hNn hNm).le\n[GOAL]\ncase A.refine_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\n⊢ Tendsto (fun n => (1 / 2) ^ n) atTop (𝓝 0)\n[PROOFSTEP]\nexact tendsto_pow_atTop_nhds_0_of_lt_1 (by norm_num) (by norm_num)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\n⊢ 0 ≤ 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nobtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nby_cases xs : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : x ∈ s\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nexact ⟨⟨x, xs⟩, tendsto_subtype_rng.2 xlim⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nobtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 sᶜ < C\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\n⊢ ∃ C, ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\n[PROOFSTEP]\nrefine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 sᶜ, fun n ↦ ?_⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nn : ℕ\n⊢ 1 / infDist (↑(u n)) (↑s)ᶜ < (1 / 2) ^ 0 + 1 / infDist (↑(u 0)) (↑s)ᶜ\n[PROOFSTEP]\nrw [← sub_lt_iff_lt_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nn : ℕ\n⊢ 1 / infDist (↑(u n)) (↑s)ᶜ - 1 / infDist (↑(u 0)) (↑s)ᶜ < (1 / 2) ^ 0\n[PROOFSTEP]\ncalc\n  _ ≤ |1 / infDist (u n).1 sᶜ - 1 / infDist (u 0).1 sᶜ| := le_abs_self _\n  _ = |1 / infDist (u 0).1 sᶜ - 1 / infDist (u n).1 sᶜ| := (abs_sub_comm _ _)\n  _ ≤ dist (u 0) (u n) := (le_add_of_nonneg_left dist_nonneg)\n  _ < (1 / 2) ^ 0 := hu 0 0 n le_rfl n.zero_le\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nhave Cpos : 0 < C := lt_of_le_of_lt (div_nonneg zero_le_one infDist_nonneg) (hC 0)\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nhave Hmem : ∀ {y}, y ∈ s ↔ 0 < infDist y sᶜ := fun {y} ↦ by\n  rw [← s.isOpen.isClosed_compl.not_mem_iff_infDist_pos ⟨x, xs⟩]; exact not_not.symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\ny : α\n⊢ y ∈ s ↔ 0 < infDist y (↑s)ᶜ\n[PROOFSTEP]\nrw [← s.isOpen.isClosed_compl.not_mem_iff_infDist_pos ⟨x, xs⟩]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\ny : α\n⊢ y ∈ s ↔ ¬y ∈ (↑s)ᶜ\n[PROOFSTEP]\nexact not_not.symm\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nhave I : ∀ n, 1 / C ≤ infDist (u n).1 sᶜ := fun n ↦\n  by\n  have : 0 < infDist (u n).1 sᶜ := Hmem.1 (u n).2\n  rw [div_le_iff' Cpos]\n  exact (div_le_iff this).1 (hC n).le\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\nn : ℕ\n⊢ 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ\n[PROOFSTEP]\nhave : 0 < infDist (u n).1 sᶜ := Hmem.1 (u n).2\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\nn : ℕ\nthis : 0 < infDist (↑(u n)) (↑s)ᶜ\n⊢ 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ\n[PROOFSTEP]\nrw [div_le_iff' Cpos]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\nn : ℕ\nthis : 0 < infDist (↑(u n)) (↑s)ᶜ\n⊢ 1 ≤ C * infDist (↑(u n)) (↑s)ᶜ\n[PROOFSTEP]\nexact (div_le_iff this).1 (hC n).le\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\nI : ∀ (n : ℕ), 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nhave I' : 1 / C ≤ infDist x sᶜ :=\n  have : Tendsto (fun n => infDist (u n).1 sᶜ) atTop (𝓝 (infDist x sᶜ)) :=\n    ((continuous_infDist_pt (sᶜ : Set α)).tendsto x).comp xlim\n  ge_of_tendsto' this I\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : MetricSpace α\ns : Opens α\ninst✝ : CompleteSpace α\nu : ℕ → CompleteCopy s\nhu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N\nA : CauchySeq fun n => ↑(u n)\nx : α\nxlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)\nxs : ¬x ∈ s\nC : ℝ\nhC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C\nCpos : 0 < C\nHmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ\nI : ∀ (n : ℕ), 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ\nI' : 1 / C ≤ infDist x (↑s)ᶜ\n⊢ ∃ x, Tendsto u atTop (𝓝 x)\n[PROOFSTEP]\nexact absurd (Hmem.2 <| lt_of_lt_of_le (div_pos one_pos Cpos) I') xs\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : MetricSpace α✝\ns✝ : Opens α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsOpen s\n⊢ PolishSpace ↑s\n[PROOFSTEP]\nletI := upgradePolishSpace α\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : MetricSpace α✝\ns✝ : Opens α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsOpen s\nthis : UpgradedPolishSpace α := upgradePolishSpace α\n⊢ PolishSpace ↑s\n[PROOFSTEP]\nlift s to Opens α using hs\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : MetricSpace α✝\ns✝ : Opens α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\nthis : UpgradedPolishSpace α := upgradePolishSpace α\ns : Opens α\n⊢ PolishSpace ↑↑s\n[PROOFSTEP]\nhave : SecondCountableTopology s.CompleteCopy := inferInstanceAs (SecondCountableTopology s)\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\ninst✝² : MetricSpace α✝\ns✝ : Opens α✝\nα : Type u_3\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\nthis✝ : UpgradedPolishSpace α := upgradePolishSpace α\ns : Opens α\nthis : SecondCountableTopology (CompleteCopy s)\n⊢ PolishSpace ↑↑s\n[PROOFSTEP]\nexact inferInstanceAs (PolishSpace s.CompleteCopy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\n⊢ IsClopenable s\n[PROOFSTEP]\nhaveI : PolishSpace s := hs.polishSpace\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis : PolishSpace ↑s\n⊢ IsClopenable s\n[PROOFSTEP]\nlet t : Set α := sᶜ\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis : PolishSpace ↑s\nt : Set α := sᶜ\n⊢ IsClopenable s\n[PROOFSTEP]\nhaveI : PolishSpace t := hs.isOpen_compl.polishSpace\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\n⊢ IsClopenable s\n[PROOFSTEP]\nlet f : s ⊕ t ≃ α := Equiv.Set.sumCompl s\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\n⊢ IsClopenable s\n[PROOFSTEP]\nhave hle : TopologicalSpace.coinduced f instTopologicalSpaceSum ≤ ‹_›\n[GOAL]\ncase hle\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\n⊢ coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n[PROOFSTEP]\nsimp only [instTopologicalSpaceSum, coinduced_sup, coinduced_compose, sup_le_iff, ← continuous_iff_coinduced_le]\n[GOAL]\ncase hle\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\n⊢ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inl) ∧ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inr)\n[PROOFSTEP]\nexact ⟨continuous_subtype_val, continuous_subtype_val⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ IsClopenable s\n[PROOFSTEP]\nrefine ⟨.coinduced f instTopologicalSpaceSum, hle, ?_, hs.mono hle, ?_⟩\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ PolishSpace α\n[PROOFSTEP]\nrw [← f.induced_symm]\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ PolishSpace α\n[PROOFSTEP]\nexact f.symm.polishSpace_induced\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ IsOpen s\n[PROOFSTEP]\nrw [isOpen_coinduced, isOpen_sum_iff]\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ IsOpen (Sum.inl ⁻¹' (↑f ⁻¹' s)) ∧ IsOpen (Sum.inr ⁻¹' (↑f ⁻¹' s))\n[PROOFSTEP]\nconvert And.intro (isOpen_univ (α := s)) (isOpen_empty (α := (sᶜ : Set α)))\n[GOAL]\ncase h.e'_1.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ Sum.inl ⁻¹' (↑f ⁻¹' s) = univ\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_2.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\n⊢ Sum.inr ⁻¹' (↑f ⁻¹' s) = ∅\n[PROOFSTEP]\next ⟨x, hx⟩\n[GOAL]\ncase h.e'_1.h.e'_3.h.mk\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\nx : α\nhx : x ∈ s\n⊢ { val := x, property := hx } ∈ Sum.inl ⁻¹' (↑f ⁻¹' s) ↔ { val := x, property := hx } ∈ univ\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase h.e'_2.h.e'_3.h.mk\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsClosed s\nthis✝ : PolishSpace ↑s\nt : Set α := sᶜ\nthis : PolishSpace ↑t\nf : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s\nhle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹\nx : α\nhx : x ∈ t\n⊢ { val := x, property := hx } ∈ Sum.inr ⁻¹' (↑f ⁻¹' s) ↔ { val := x, property := hx } ∈ ∅\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : TopologicalSpace α\ns : Set α\nhs : IsClopenable s\n⊢ IsClopenable sᶜ\n[PROOFSTEP]\nrcases hs with ⟨t, t_le, t_polish, h, h'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝ : TopologicalSpace α\ns : Set α\nt : TopologicalSpace α\nt_le : t ≤ inst✝\nt_polish : PolishSpace α\nh : IsClosed s\nh' : IsOpen s\n⊢ IsClopenable sᶜ\n[PROOFSTEP]\nexact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : TopologicalSpace α\ninst✝ : PolishSpace α\ns : Set α\nhs : IsOpen s\n⊢ IsClopenable s\n[PROOFSTEP]\nsimpa using hs.isClosed_compl.isClopenable.compl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nhs : ∀ (n : ℕ), IsClopenable (s n)\n⊢ IsClopenable (⋃ (n : ℕ), s n)\n[PROOFSTEP]\nchoose m mt m_polish _ m_open using hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\n⊢ IsClopenable (⋃ (n : ℕ), s n)\n[PROOFSTEP]\nobtain ⟨t', t'm, -, t'_polish⟩ : ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=\n  exists_polishSpace_forall_le m mt m_polish\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\n⊢ IsClopenable (⋃ (n : ℕ), s n)\n[PROOFSTEP]\nhave A : IsOpen[t'] (⋃ n, s n) := by\n  apply isOpen_iUnion\n  intro n\n  apply t'm n\n  exact m_open n\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\n⊢ IsOpen (⋃ (n : ℕ), s n)\n[PROOFSTEP]\napply isOpen_iUnion\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\n⊢ ∀ (i : ℕ), IsOpen (s i)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\nn : ℕ\n⊢ IsOpen (s n)\n[PROOFSTEP]\napply t'm n\n[GOAL]\ncase h.a\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\nn : ℕ\n⊢ IsOpen (s n)\n[PROOFSTEP]\nexact m_open n\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\nA : IsOpen (⋃ (n : ℕ), s n)\n⊢ IsClopenable (⋃ (n : ℕ), s n)\n[PROOFSTEP]\nobtain ⟨t'', t''_le, t''_polish, h1, h2⟩ :\n  ∃ t'' : TopologicalSpace α, t'' ≤ t' ∧ @PolishSpace α t'' ∧ IsClosed[t''] (⋃ n, s n) ∧ IsOpen[t''] (⋃ n, s n) :=\n  @IsOpen.isClopenable α t' t'_polish _ A\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : TopologicalSpace α\ninst✝ : PolishSpace α\ns : ℕ → Set α\nm : ℕ → TopologicalSpace α\nmt : ∀ (n : ℕ), m n ≤ t\nm_polish : ∀ (n : ℕ), PolishSpace α\nh✝ : ∀ (n : ℕ), IsClosed (s n)\nm_open : ∀ (n : ℕ), IsOpen (s n)\nt' : TopologicalSpace α\nt'm : ∀ (n : ℕ), t' ≤ m n\nt'_polish : PolishSpace α\nA : IsOpen (⋃ (n : ℕ), s n)\nt'' : TopologicalSpace α\nt''_le : t'' ≤ t'\nt''_polish : PolishSpace α\nh1 : IsClosed (⋃ (n : ℕ), s n)\nh2 : IsOpen (⋃ (n : ℕ), s n)\n⊢ IsClopenable (⋃ (n : ℕ), s n)\n[PROOFSTEP]\nexact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.MetricSpace.Polish", "llama_tokens": 27301, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6688802471698041, "lm_q2_score": 0.44167300566462553, "lm_q1q2_score": 0.295426349197185}}
{"text": "[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\ng : ℝ[X]\n⊢ comp (Polynomial.toContinuousMapOn g (Set.Icc (-‖f‖) ‖f‖)) (attachBound ↑f) = ↑(↑(Polynomial.aeval f) g)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\ng : ℝ[X]\na✝ : X\n⊢ ↑(comp (Polynomial.toContinuousMapOn g (Set.Icc (-‖f‖) ‖f‖)) (attachBound ↑f)) a✝ = ↑↑(↑(Polynomial.aeval f) g) a✝\n[PROOFSTEP]\nsimp only [ContinuousMap.coe_comp, Function.comp_apply, ContinuousMap.attachBound_apply_coe,\n  Polynomial.toContinuousMapOn_apply, Polynomial.aeval_subalgebra_coe, Polynomial.aeval_continuousMap_apply,\n  Polynomial.toContinuousMap_apply]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\ng : ℝ[X]\n⊢ comp (Polynomial.toContinuousMapOn g (Set.Icc (-‖f‖) ‖f‖)) (attachBound ↑f) ∈ A\n[PROOFSTEP]\nrw [polynomial_comp_attachBound]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\ng : ℝ[X]\n⊢ ↑(↑(Polynomial.aeval f) g) ∈ A\n[PROOFSTEP]\napply SetLike.coe_mem\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\n⊢ comp p (attachBound ↑f) ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nhave mem_closure : p ∈ (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖)).topologicalClosure :=\n  continuousMap_mem_polynomialFunctions_closure _ _ p\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\n⊢ comp p (attachBound ↑f) ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nhave frequently_mem_polynomials := mem_closure_iff_frequently.mp mem_closure\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\nfrequently_mem_polynomials :\n  ∃ᶠ (x : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)) in nhds p, x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\n⊢ comp p (attachBound ↑f) ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\napply mem_closure_iff_frequently.mpr\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\nfrequently_mem_polynomials :\n  ∃ᶠ (x : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)) in nhds p, x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\n⊢ ∃ᶠ (x : C(X, ℝ)) in nhds (comp p (attachBound ↑f)), x ∈ ↑A\n[PROOFSTEP]\nrefine'\n  ((compRightContinuousMap ℝ (attachBound (f : C(X, ℝ)))).continuousAt p).tendsto.frequently_map _ _\n    frequently_mem_polynomials\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\nfrequently_mem_polynomials :\n  ∃ᶠ (x : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)) in nhds p, x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\n⊢ ∀ (x : C(↑(Set.Icc (-‖↑f‖) ‖↑f‖), ℝ)),\n    x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖)) → ↑(compRightContinuousMap ℝ (attachBound ↑f)) x ∈ ↑A\n[PROOFSTEP]\nrintro _ ⟨g, ⟨-, rfl⟩⟩\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\nfrequently_mem_polynomials :\n  ∃ᶠ (x : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)) in nhds p, x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\ng : ℝ[X]\n⊢ ↑(compRightContinuousMap ℝ (attachBound ↑f)) (↑↑(Polynomial.toContinuousMapOnAlgHom (Set.Icc (-‖f‖) ‖f‖)) g) ∈ ↑A\n[PROOFSTEP]\nsimp only [SetLike.mem_coe, AlgHom.coe_toRingHom, compRightContinuousMap_apply,\n  Polynomial.toContinuousMapOnAlgHom_apply]\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\np : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)\nmem_closure : p ∈ Subalgebra.topologicalClosure (polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\nfrequently_mem_polynomials :\n  ∃ᶠ (x : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ)) in nhds p, x ∈ ↑(polynomialFunctions (Set.Icc (-‖f‖) ‖f‖))\ng : ℝ[X]\n⊢ comp (Polynomial.toContinuousMapOn g (Set.Icc (-‖f‖) ‖f‖)) (attachBound ↑f) ∈ A\n[PROOFSTEP]\napply polynomial_comp_attachBound_mem\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\n⊢ abs ↑f ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nlet f' := attachBound (f : C(X, ℝ))\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\nf' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := attachBound ↑f\n⊢ abs ↑f ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nlet abs : C(Set.Icc (-‖f‖) ‖f‖, ℝ) := { toFun := fun x : Set.Icc (-‖f‖) ‖f‖ => |(x : ℝ)| }\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\nf' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := attachBound ↑f\nabs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := mk fun x => |↑x|\n⊢ ContinuousMap.abs ↑f ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nchange abs.comp f' ∈ A.topologicalClosure\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf : { x // x ∈ A }\nf' : C(X, ↑(Set.Icc (-‖↑f‖) ‖↑f‖)) := attachBound ↑f\nabs : C(↑(Set.Icc (-‖f‖) ‖f‖), ℝ) := mk fun x => |↑x|\n⊢ comp abs f' ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\napply comp_attachBound_mem_closure\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ ↑f ⊓ ↑g ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nrw [inf_eq_half_smul_add_sub_abs_sub' ℝ]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ 2⁻¹ • (↑f + ↑g - |↑g - ↑f|) ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nrefine'\n  A.topologicalClosure.smul_mem\n    (A.topologicalClosure.sub_mem\n      (A.topologicalClosure.add_mem (A.le_topologicalClosure f.property) (A.le_topologicalClosure g.property)) _)\n    _\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ |↑g - ↑f| ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nexact_mod_cast abs_mem_subalgebra_closure A _\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑f ⊓ ↑g ∈ A\n[PROOFSTEP]\nconvert inf_mem_subalgebra_closure A f g\n[GOAL]\ncase h.e'_5\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ A = Subalgebra.topologicalClosure A\n[PROOFSTEP]\napply SetLike.ext'\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑A = ↑(Subalgebra.topologicalClosure A)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑(Subalgebra.topologicalClosure A) = ↑A\n[PROOFSTEP]\nerw [closure_eq_iff_isClosed]\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ IsClosed ↑A\n[PROOFSTEP]\nexact h\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ ↑f ⊔ ↑g ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nrw [sup_eq_half_smul_add_add_abs_sub' ℝ]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ 2⁻¹ • (↑f + ↑g + |↑g - ↑f|) ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nrefine'\n  A.topologicalClosure.smul_mem\n    (A.topologicalClosure.add_mem\n      (A.topologicalClosure.add_mem (A.le_topologicalClosure f.property) (A.le_topologicalClosure g.property)) _)\n    _\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nf g : { x // x ∈ A }\n⊢ |↑g - ↑f| ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nexact_mod_cast abs_mem_subalgebra_closure A _\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑f ⊔ ↑g ∈ A\n[PROOFSTEP]\nconvert sup_mem_subalgebra_closure A f g\n[GOAL]\ncase h.e'_5\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ A = Subalgebra.topologicalClosure A\n[PROOFSTEP]\napply SetLike.ext'\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑A = ↑(Subalgebra.topologicalClosure A)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ ↑(Subalgebra.topologicalClosure A) = ↑A\n[PROOFSTEP]\nerw [closure_eq_iff_isClosed]\n[GOAL]\ncase h.e'_5.h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nh : IsClosed ↑A\nf g : { x // x ∈ A }\n⊢ IsClosed ↑A\n[PROOFSTEP]\nexact h\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\n⊢ closure L = ⊤\n[PROOFSTEP]\napply eq_top_iff.mpr\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\n⊢ ⊤ ≤ closure L\n[PROOFSTEP]\nrintro f -\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\n⊢ f ∈ closure L\n[PROOFSTEP]\nrefine' Filter.Frequently.mem_closure ((Filter.HasBasis.frequently_iff Metric.nhds_basis_ball).mpr fun ε pos => _)\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\n⊢ ∃ x, x ∈ Metric.ball f ε ∧ x ∈ L\n[PROOFSTEP]\nsimp only [exists_prop, Metric.mem_ball]\n  -- It will be helpful to assume `X` is nonempty later,\n    -- so we get that out of the way here.\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nby_cases nX : Nonempty X\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\ncase neg\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : ¬Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : ¬Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nexact\n  ⟨nA.some, (dist_lt_iff pos).mpr fun x => False.elim (nX ⟨x⟩), nA.choose_spec⟩\n    /-\n        The strategy now is to pick a family of continuous functions `g x y` in `A`\n        with the property that `g x y x = f x` and `g x y y = f y`\n        (this is immediate from `h : SeparatesPointsStrongly`)\n        then use continuity to see that `g x y` is close to `f` near both `x` and `y`,\n        and finally using compactness to produce the desired function `h`\n        as a maximum over finitely many `x` of a minimum over finitely many `y` of the `g x y`.\n        -/\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : Set.SeparatesPointsStrongly L\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\ndsimp only [Set.SeparatesPointsStrongly] at sep \n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nchoose g hg w₁ w₂ using sep f\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet U : X → X → Set X := fun x y => {z | f z - ε < g x y z}\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave U_nhd_y : ∀ x y, U x y ∈ 𝓝 y := by\n  intro x y\n  refine' IsOpen.mem_nhds _ _\n  · apply isOpen_lt <;> continuity\n  · rw [Set.mem_setOf_eq, w₂]\n    exact sub_lt_self _ pos\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\n⊢ ∀ (x y : X), U x y ∈ 𝓝 y\n[PROOFSTEP]\nintro x y\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ U x y ∈ 𝓝 y\n[PROOFSTEP]\nrefine' IsOpen.mem_nhds _ _\n[GOAL]\ncase refine'_1\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ IsOpen (U x y)\n[PROOFSTEP]\napply isOpen_lt\n[GOAL]\ncase refine'_1.hf\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ Continuous fun b => ↑f b - ε\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase refine'_1.hg\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ Continuous fun b => ↑(g x y) b\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase refine'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ y ∈ U x y\n[PROOFSTEP]\nrw [Set.mem_setOf_eq, w₂]\n[GOAL]\ncase refine'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nx y : X\n⊢ ↑f y - ε < ↑f y\n[PROOFSTEP]\nexact sub_lt_self _ pos\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet ys : ∀ _, Finset X := fun x => (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x)).choose\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet ys_w : ∀ x, ⋃ y ∈ ys x, U x y = ⊤ := fun x => (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x)).choose_spec\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave ys_nonempty : ∀ x, (ys x).Nonempty := fun x =>\n  Set.nonempty_of_union_eq_top_of_nonempty _ _ nX\n    (ys_w x)\n      -- Thus for each `x` we have the desired `h x : A` so `f z - ε < h x z` everywhere\n        -- and `h x x = f x`.\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet h : ∀ _, L := fun x =>\n  ⟨(ys x).sup' (ys_nonempty x) fun y => (g x y : C(X, ℝ)), Finset.sup'_mem _ sup_mem _ _ _ fun y _ => hg x y⟩\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave lt_h : ∀ x z, f z - ε < (h x : X → ℝ) z := by\n  intro x z\n  obtain ⟨y, ym, zm⟩ := Set.exists_set_mem_of_union_eq_top _ _ (ys_w x) z\n  dsimp\n  simp only [Subtype.coe_mk, sup'_coe, Finset.sup'_apply, Finset.lt_sup'_iff]\n  exact ⟨y, ym, zm⟩\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\n⊢ ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\n[PROOFSTEP]\nintro x z\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nx z : X\n⊢ ↑f z - ε < ↑↑(h x) z\n[PROOFSTEP]\nobtain ⟨y, ym, zm⟩ := Set.exists_set_mem_of_union_eq_top _ _ (ys_w x) z\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nx z y : X\nym : y ∈ fun i => i ∈ (ys x).val\nzm : z ∈ U x y\n⊢ ↑f z - ε < ↑↑(h x) z\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nx z y : X\nym : y ∈ fun i => i ∈ (ys x).val\nzm : z ∈ U x y\n⊢ ↑f z - ε <\n    ↑(Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n          (_ : Finset.Nonempty (ys x)) fun y => g x y)\n      z\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, sup'_coe, Finset.sup'_apply, Finset.lt_sup'_iff]\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nx z y : X\nym : y ∈ fun i => i ∈ (ys x).val\nzm : z ∈ U x y\n⊢ ∃ b, b ∈ Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤) ∧ ↑f z - ε < ↑(g x b) z\n[PROOFSTEP]\nexact ⟨y, ym, zm⟩\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave h_eq : ∀ x, (h x : X → ℝ) x = f x := by intro x;\n  simp [w₁]\n    -- For each `x`, we define `W x` to be `{z | h x z < f z + ε}`,\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\n⊢ ∀ (x : X), ↑↑(h x) x = ↑f x\n[PROOFSTEP]\nintro x\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nx : X\n⊢ ↑↑(h x) x = ↑f x\n[PROOFSTEP]\nsimp [w₁]\n  -- For each `x`, we define `W x` to be `{z | h x z < f z + ε}`,\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet W : ∀ _, Set X := fun x =>\n  {z | (h x : X → ℝ) z < f z + ε}\n    -- This is still a neighbourhood of `x`.\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave W_nhd : ∀ x, W x ∈ 𝓝 x := by\n  intro x\n  refine' IsOpen.mem_nhds _ _\n  ·\n    -- Porting note: mathlib3 `continuity` found `continuous_set_coe`\n    apply isOpen_lt (continuous_set_coe _ _)\n    continuity\n  · dsimp only [Set.mem_setOf_eq]\n    rw [h_eq]\n    exact lt_add_of_pos_right _ pos\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\n⊢ ∀ (x : X), W x ∈ 𝓝 x\n[PROOFSTEP]\nintro x\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ W x ∈ 𝓝 x\n[PROOFSTEP]\nrefine' IsOpen.mem_nhds _ _\n[GOAL]\ncase refine'_1\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ IsOpen (W x)\n[PROOFSTEP]\napply isOpen_lt (continuous_set_coe _ _)\n[GOAL]\ncase refine'_1\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ Continuous fun b => ↑f b + ε\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase refine'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ x ∈ W x\n[PROOFSTEP]\ndsimp only [Set.mem_setOf_eq]\n[GOAL]\ncase refine'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ ↑(Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n          (_ : Finset.Nonempty (ys x)) fun y => g x y)\n      x <\n    ↑f x + ε\n[PROOFSTEP]\nrw [h_eq]\n[GOAL]\ncase refine'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nx : X\n⊢ ↑f x < ↑f x + ε\n[PROOFSTEP]\nexact lt_add_of_pos_right _ pos\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet xs : Finset X := (CompactSpace.elim_nhds_subcover W W_nhd).choose\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet xs_w : ⋃ x ∈ xs, W x = ⊤ := (CompactSpace.elim_nhds_subcover W W_nhd).choose_spec\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nhave xs_nonempty : xs.Nonempty := Set.nonempty_of_union_eq_top_of_nonempty _ _ nX xs_w\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nlet k : (L : Type _) :=\n  ⟨xs.inf' xs_nonempty fun x => (h x : C(X, ℝ)), Finset.inf'_mem _ inf_mem _ _ _ fun x _ => (h x).2⟩\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\n⊢ ∃ x, dist x f < ε ∧ x ∈ L\n[PROOFSTEP]\nrefine'\n  ⟨k.1, _, k.2⟩\n    -- We just need to verify the bound, which we do pointwise.\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\n⊢ dist (↑k) f < ε\n[PROOFSTEP]\nrw [dist_lt_iff pos]\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\n⊢ ∀ (x : X), dist (↑↑k x) (↑f x) < ε\n[PROOFSTEP]\nintro z\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ dist (↑↑k z) (↑f z) < ε\n[PROOFSTEP]\nrw [show ∀ a b ε : ℝ, dist a b < ε ↔ a < b + ε ∧ b - ε < a by intros;\n    simp only [← Metric.mem_ball, Real.ball_eq_Ioo, Set.mem_Ioo, and_comm]]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ∀ (a b ε : ℝ), dist a b < ε ↔ a < b + ε ∧ b - ε < a\n[PROOFSTEP]\nintros\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\na✝ b✝ ε✝ : ℝ\n⊢ dist a✝ b✝ < ε✝ ↔ a✝ < b✝ + ε✝ ∧ b✝ - ε✝ < a✝\n[PROOFSTEP]\nsimp only [← Metric.mem_ball, Real.ball_eq_Ioo, Set.mem_Ioo, and_comm]\n[GOAL]\ncase pos\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ↑↑k z < ↑f z + ε ∧ ↑f z - ε < ↑↑k z\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase pos.left\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ↑↑k z < ↑f z + ε\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos.left\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ↑(Finset.inf'\n          (Exists.choose\n            (_ :\n              ∃ t,\n                ⋃ (x : X) (_ : x ∈ t),\n                    {z |\n                      ↑(Finset.sup'\n                              (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n                              (_ : Finset.Nonempty (ys x)) fun y => g x y)\n                          z <\n                        ↑f z + ε} =\n                  ⊤))\n          xs_nonempty fun x =>\n          Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n            (_ : Finset.Nonempty (ys x)) fun y => g x y)\n      z <\n    ↑f z + ε\n[PROOFSTEP]\nsimp only [Finset.inf'_lt_iff, ContinuousMap.inf'_apply]\n[GOAL]\ncase pos.left\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ∃ i,\n    i ∈\n        Exists.choose\n          (_ :\n            ∃ t,\n              ⋃ (x : X) (_ : x ∈ t),\n                  {z |\n                    ↑(Finset.sup'\n                            (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n                            (_ : Finset.Nonempty (ys x)) fun y => g x y)\n                        z <\n                      ↑f z + ε} =\n                ⊤) ∧\n      ↑(Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), {z | ↑f z - ε < ↑(g i x) z} = ⊤))\n              (_ : Finset.Nonempty (ys i)) fun y => g i y)\n          z <\n        ↑f z + ε\n[PROOFSTEP]\nexact Set.exists_set_mem_of_union_eq_top _ _ xs_w z\n[GOAL]\ncase pos.right\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ↑f z - ε < ↑↑k z\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase pos.right\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ↑f z - ε <\n    ↑(Finset.inf'\n          (Exists.choose\n            (_ :\n              ∃ t,\n                ⋃ (x : X) (_ : x ∈ t),\n                    {z |\n                      ↑(Finset.sup'\n                              (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n                              (_ : Finset.Nonempty (ys x)) fun y => g x y)\n                          z <\n                        ↑f z + ε} =\n                  ⊤))\n          xs_nonempty fun x =>\n          Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n            (_ : Finset.Nonempty (ys x)) fun y => g x y)\n      z\n[PROOFSTEP]\nsimp only [Finset.lt_inf'_iff, ContinuousMap.inf'_apply]\n[GOAL]\ncase pos.right\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz : X\n⊢ ∀ (i : X),\n    i ∈\n        Exists.choose\n          (_ :\n            ∃ t,\n              ⋃ (x : X) (_ : x ∈ t),\n                  {z |\n                    ↑(Finset.sup'\n                            (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n                            (_ : Finset.Nonempty (ys x)) fun y => g x y)\n                        z <\n                      ↑f z + ε} =\n                ⊤) →\n      ↑f z - ε <\n        ↑(Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), {z | ↑f z - ε < ↑(g i x) z} = ⊤))\n              (_ : Finset.Nonempty (ys i)) fun y => g i y)\n          z\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase pos.right\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nL : Set C(X, ℝ)\nnA : Set.Nonempty L\ninf_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊓ g ∈ L\nsup_mem : ∀ (f : C(X, ℝ)), f ∈ L → ∀ (g : C(X, ℝ)), g ∈ L → f ⊔ g ∈ L\nsep : ∀ (v : X → ℝ) (x y : X), ∃ f, f ∈ L ∧ ↑f x = v x ∧ ↑f y = v y\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nnX : Nonempty X\ng : X → X → C(X, ℝ)\nhg : ∀ (x y : X), g x y ∈ L\nw₁ : ∀ (x y : X), ↑(g x y) x = ↑f x\nw₂ : ∀ (x y : X), ↑(g x y) y = ↑f y\nU : X → X → Set X := fun x y => {z | ↑f z - ε < ↑(g x y) z}\nU_nhd_y : ∀ (x y : X), U x y ∈ 𝓝 y\nys : X → Finset X := fun x => Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), U x x_1 = ⊤)\nys_w : ∀ (x : X), ⋃ (y : X) (_ : y ∈ ys x), U x y = ⊤ :=\n  fun x => Exists.choose_spec (CompactSpace.elim_nhds_subcover (U x) (U_nhd_y x))\nys_nonempty : ∀ (x : X), Finset.Nonempty (ys x)\nh : X → ↑L :=\n  fun x =>\n    { val := Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y,\n      property := (_ : (Finset.sup' (ys x) (_ : Finset.Nonempty (ys x)) fun y => g x y) ∈ L) }\nlt_h : ∀ (x z : X), ↑f z - ε < ↑↑(h x) z\nh_eq : ∀ (x : X), ↑↑(h x) x = ↑f x\nW : X → Set X := fun x => {z | ↑↑(h x) z < ↑f z + ε}\nW_nhd : ∀ (x : X), W x ∈ 𝓝 x\nxs : Finset X := Exists.choose (_ : ∃ t, ⋃ (x : X) (_ : x ∈ t), W x = ⊤)\nxs_w : ⋃ (x : X) (_ : x ∈ xs), W x = ⊤ := Exists.choose_spec (CompactSpace.elim_nhds_subcover W W_nhd)\nxs_nonempty : Finset.Nonempty xs\nk : ↑L :=\n  { val := Finset.inf' xs xs_nonempty fun x => ↑(h x),\n    property := (_ : (Finset.inf' xs xs_nonempty fun x => ↑(h x)) ∈ L) }\nz x : X\n⊢ ↑f z - ε <\n    ↑(Finset.sup' (Exists.choose (_ : ∃ t, ⋃ (x_1 : X) (_ : x_1 ∈ t), {z | ↑f z - ε < ↑(g x x_1) z} = ⊤))\n          (_ : Finset.Nonempty (ys x)) fun y => g x y)\n      z\n[PROOFSTEP]\napply lt_h\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\n⊢ Subalgebra.topologicalClosure A = ⊤\n[PROOFSTEP]\napply SetLike.ext'\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\n⊢ ↑(Subalgebra.topologicalClosure A) = ↑⊤\n[PROOFSTEP]\nlet L := A.topologicalClosure\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nL : Subalgebra ℝ C(X, ℝ) := Subalgebra.topologicalClosure A\n⊢ ↑(Subalgebra.topologicalClosure A) = ↑⊤\n[PROOFSTEP]\nhave n : Set.Nonempty (L : Set C(X, ℝ)) := ⟨(1 : C(X, ℝ)), A.le_topologicalClosure A.one_mem⟩\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nL : Subalgebra ℝ C(X, ℝ) := Subalgebra.topologicalClosure A\nn : Set.Nonempty ↑L\n⊢ ↑(Subalgebra.topologicalClosure A) = ↑⊤\n[PROOFSTEP]\nconvert\n  sublattice_closure_eq_top (L : Set C(X, ℝ)) n\n    (fun f fm g gm => inf_mem_closed_subalgebra L A.isClosed_topologicalClosure ⟨f, fm⟩ ⟨g, gm⟩)\n    (fun f fm g gm => sup_mem_closed_subalgebra L A.isClosed_topologicalClosure ⟨f, fm⟩ ⟨g, gm⟩)\n    (Subalgebra.SeparatesPoints.strongly (Subalgebra.separatesPoints_monotone A.le_topologicalClosure w))\n[GOAL]\ncase h.e'_2\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nL : Subalgebra ℝ C(X, ℝ) := Subalgebra.topologicalClosure A\nn : Set.Nonempty ↑L\n⊢ ↑(Subalgebra.topologicalClosure A) = closure ↑L\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\n⊢ f ∈ Subalgebra.topologicalClosure A\n[PROOFSTEP]\nrw [subalgebra_topologicalClosure_eq_top_of_separatesPoints A w]\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\n⊢ f ∈ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\n⊢ ∃ g, ‖↑g - f‖ < ε\n[PROOFSTEP]\nhave w := mem_closure_iff_frequently.mp (continuousMap_mem_subalgebra_closure_of_separatesPoints A w f)\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw✝ : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nw : ∃ᶠ (x : C(X, ℝ)) in 𝓝 f, x ∈ ↑A\n⊢ ∃ g, ‖↑g - f‖ < ε\n[PROOFSTEP]\nrw [Metric.nhds_basis_ball.frequently_iff] at w \n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw✝ : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nw : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A\n⊢ ∃ g, ‖↑g - f‖ < ε\n[PROOFSTEP]\nobtain ⟨g, H, m⟩ := w ε pos\n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw✝ : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nw : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A\ng : C(X, ℝ)\nH : g ∈ Metric.ball f ε\nm : g ∈ ↑A\n⊢ ∃ g, ‖↑g - f‖ < ε\n[PROOFSTEP]\nrw [Metric.mem_ball, dist_eq_norm] at H \n[GOAL]\ncase intro.intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw✝ : Subalgebra.SeparatesPoints A\nf : C(X, ℝ)\nε : ℝ\npos : 0 < ε\nw : ∀ (i : ℝ), 0 < i → ∃ x, x ∈ Metric.ball f i ∧ x ∈ ↑A\ng : C(X, ℝ)\nH : ‖g - f‖ < ε\nm : g ∈ ↑A\n⊢ ∃ g, ‖↑g - f‖ < ε\n[PROOFSTEP]\nexact ⟨⟨g, m⟩, H⟩\n[GOAL]\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : X → ℝ\nc : Continuous f\nε : ℝ\npos : 0 < ε\n⊢ ∃ g, ∀ (x : X), ‖↑↑g x - f x‖ < ε\n[PROOFSTEP]\nobtain ⟨g, b⟩ := exists_mem_subalgebra_near_continuousMap_of_separatesPoints A w ⟨f, c⟩ ε pos\n[GOAL]\ncase intro\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : X → ℝ\nc : Continuous f\nε : ℝ\npos : 0 < ε\ng : { x // x ∈ A }\nb : ‖↑g - mk f‖ < ε\n⊢ ∃ g, ∀ (x : X), ‖↑↑g x - f x‖ < ε\n[PROOFSTEP]\nuse g\n[GOAL]\ncase h\nX : Type u_1\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : Subalgebra ℝ C(X, ℝ)\nw : Subalgebra.SeparatesPoints A\nf : X → ℝ\nc : Continuous f\nε : ℝ\npos : 0 < ε\ng : { x // x ∈ A }\nb : ‖↑g - mk f‖ < ε\n⊢ ∀ (x : X), ‖↑↑g x - f x‖ < ε\n[PROOFSTEP]\nrwa [norm_lt_iff _ pos] at b \n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\n⊢ SeparatesPoints\n    (comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra))\n[PROOFSTEP]\nintro x₁ x₂ hx\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\n⊢ ∃ f,\n    f ∈\n        (fun f => ↑f) ''\n          ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra)) ∧\n      f x₁ ≠ f x₂\n[PROOFSTEP]\nobtain ⟨_, ⟨f, hfA, rfl⟩, hf⟩ := hA hx\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\n⊢ ∃ f,\n    f ∈\n        (fun f => ↑f) ''\n          ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra)) ∧\n      f x₁ ≠ f x₂\n[PROOFSTEP]\nlet F : C(X, 𝕜) :=\n  f -\n    const _\n      (f x₂)\n        -- Subtract the constant `f x₂` from `f`; this is still an element of the subalgebra\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\n⊢ ∃ f,\n    f ∈\n        (fun f => ↑f) ''\n          ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra)) ∧\n      f x₁ ≠ f x₂\n[PROOFSTEP]\nhave hFA : F ∈ A :=\n  by\n  refine' A.sub_mem hfA (@Eq.subst _ (· ∈ A) _ _ _ <| A.smul_mem A.one_mem <| f x₂)\n  ext1\n  simp only [coe_smul, coe_one, smul_apply, one_apply, Algebra.id.smul_eq_mul, mul_one, const_apply]\n    -- Consider now the function `fun x ↦ |f x - f x₂| ^ 2`\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\n⊢ F ∈ A\n[PROOFSTEP]\nrefine' A.sub_mem hfA (@Eq.subst _ (· ∈ A) _ _ _ <| A.smul_mem A.one_mem <| f x₂)\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\n⊢ ↑f x₂ • 1 = const X (↑f x₂)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\na✝ : X\n⊢ ↑(↑f x₂ • 1) a✝ = ↑(const X (↑f x₂)) a✝\n[PROOFSTEP]\nsimp only [coe_smul, coe_one, smul_apply, one_apply, Algebra.id.smul_eq_mul, mul_one, const_apply]\n  -- Consider now the function `fun x ↦ |f x - f x₂| ^ 2`\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\n⊢ ∃ f,\n    f ∈\n        (fun f => ↑f) ''\n          ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra)) ∧\n      f x₁ ≠ f x₂\n[PROOFSTEP]\nrefine' ⟨_, ⟨(⟨IsROrC.normSq, continuous_normSq⟩ : C(𝕜, ℝ)).comp F, _, rfl⟩, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\n⊢ comp (ContinuousMap.mk ↑normSq) F ∈\n    ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A.toSubalgebra))\n[PROOFSTEP]\nrw [SetLike.mem_coe, Subalgebra.mem_comap]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\n⊢ ↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F) ∈\n    restrictScalars ℝ A.toSubalgebra\n[PROOFSTEP]\nconvert (A.restrictScalars ℝ).mul_mem hFA (star_mem hFA : star F ∈ A)\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\n⊢ ↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F) = F * star F\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_4.h\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\na✝ : X\n⊢ ↑(↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F)) a✝ =\n    ↑(F * star F) a✝\n[PROOFSTEP]\nexact (IsROrC.mul_conj (K := 𝕜) _).symm\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\n⊢ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₁ ≠ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₂\n[PROOFSTEP]\nhave : f x₁ - f x₂ ≠ 0 := sub_ne_zero.mpr hf\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\n𝕜 : Type u_2\nX : Type u_1\ninst✝¹ : IsROrC 𝕜\ninst✝ : TopologicalSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : SeparatesPoints A.toSubalgebra\nx₁ x₂ : X\nhx : x₁ ≠ x₂\nf : C(X, 𝕜)\nhfA : f ∈ ↑A.toSubalgebra\nhf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂\nF : C(X, 𝕜) := f - const X (↑f x₂)\nhFA : F ∈ A\nthis : ↑f x₁ - ↑f x₂ ≠ 0\n⊢ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₁ ≠ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₂\n[PROOFSTEP]\nsimpa only [comp_apply, coe_sub, coe_const, sub_apply, coe_mk, sub_self, map_zero, Ne.def, normSq_eq_zero,\n  const_apply] using this\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\n⊢ StarSubalgebra.topologicalClosure A = ⊤\n[PROOFSTEP]\nrw [StarSubalgebra.eq_top_iff]\n  -- Let `I` be the natural inclusion of `C(X, ℝ)` into `C(X, 𝕜)`\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\n⊢ ∀ (x : C(X, 𝕜)), x ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nlet I : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ofRealClm.compLeftContinuous ℝ X\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\n⊢ ∀ (x : C(X, 𝕜)), x ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nhave key : LinearMap.range I ≤ (A.toSubmodule.restrictScalars ℝ).topologicalClosure := by\n  -- Let `A₀` be the subalgebra of `C(X, ℝ)` consisting of `A`'s purely real elements; it is the\n      -- preimage of `A` under `I`.  In this argument we only need its submodule structure.\n  let A₀ : Submodule ℝ C(X, ℝ) := (A.toSubmodule.restrictScalars ℝ).comap I\n  have SW : A₀.topologicalClosure = ⊤ :=\n    haveI := subalgebra_topologicalClosure_eq_top_of_separatesPoints _ hA.isROrC_to_real\n    congr_arg Subalgebra.toSubmodule this\n  rw [← Submodule.map_top, ← SW]\n    -- So it suffices to prove that the image under `I` of the closure of `A₀` is contained in the\n        -- closure of `A`, which follows by abstract nonsense\n  have h₁ := A₀.topologicalClosure_map ((@ofRealClm 𝕜 _).compLeftContinuousCompact X)\n  have h₂ := (A.toSubmodule.restrictScalars ℝ).map_comap_le I\n  exact\n    h₁.trans\n      (Submodule.topologicalClosure_mono h₂)\n        -- In particular, for a function `f` in `C(X, 𝕜)`, the real and imaginary parts of `f` are in the\n          -- closure of `A`\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\n⊢ LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nlet A₀ : Submodule ℝ C(X, ℝ) := (A.toSubmodule.restrictScalars ℝ).comap I\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nA₀ : Submodule ℝ C(X, ℝ) := Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n⊢ LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nhave SW : A₀.topologicalClosure = ⊤ :=\n  haveI := subalgebra_topologicalClosure_eq_top_of_separatesPoints _ hA.isROrC_to_real\n  congr_arg Subalgebra.toSubmodule this\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nA₀ : Submodule ℝ C(X, ℝ) := Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nSW : Submodule.topologicalClosure A₀ = ⊤\n⊢ LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nrw [← Submodule.map_top, ← SW]\n  -- So it suffices to prove that the image under `I` of the closure of `A₀` is contained in the\n      -- closure of `A`, which follows by abstract nonsense\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nA₀ : Submodule ℝ C(X, ℝ) := Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nSW : Submodule.topologicalClosure A₀ = ⊤\n⊢ Submodule.map I (Submodule.topologicalClosure A₀) ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nhave h₁ := A₀.topologicalClosure_map ((@ofRealClm 𝕜 _).compLeftContinuousCompact X)\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nA₀ : Submodule ℝ C(X, ℝ) := Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nSW : Submodule.topologicalClosure A₀ = ⊤\nh₁ :\n  Submodule.map (↑(ContinuousLinearMap.compLeftContinuousCompact X ofRealClm)) (Submodule.topologicalClosure A₀) ≤\n    Submodule.topologicalClosure (Submodule.map (↑(ContinuousLinearMap.compLeftContinuousCompact X ofRealClm)) A₀)\n⊢ Submodule.map I (Submodule.topologicalClosure A₀) ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nhave h₂ := (A.toSubmodule.restrictScalars ℝ).map_comap_le I\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nA₀ : Submodule ℝ C(X, ℝ) := Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nSW : Submodule.topologicalClosure A₀ = ⊤\nh₁ :\n  Submodule.map (↑(ContinuousLinearMap.compLeftContinuousCompact X ofRealClm)) (Submodule.topologicalClosure A₀) ≤\n    Submodule.topologicalClosure (Submodule.map (↑(ContinuousLinearMap.compLeftContinuousCompact X ofRealClm)) A₀)\nh₂ :\n  Submodule.map I (Submodule.comap I (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))) ≤\n    Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra)\n⊢ Submodule.map I (Submodule.topologicalClosure A₀) ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n[PROOFSTEP]\nexact\n  h₁.trans\n    (Submodule.topologicalClosure_mono h₂)\n      -- In particular, for a function `f` in `C(X, 𝕜)`, the real and imaginary parts of `f` are in the\n        -- closure of `A`\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\n⊢ ∀ (x : C(X, 𝕜)), x ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nintro f\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nlet f_re : C(X, ℝ) := (⟨IsROrC.re, IsROrC.reClm.continuous⟩ : C(𝕜, ℝ)).comp f\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nlet f_im : C(X, ℝ) := (⟨IsROrC.im, IsROrC.imClm.continuous⟩ : C(𝕜, ℝ)).comp f\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nhave h_f_re : I f_re ∈ A.topologicalClosure := key ⟨f_re, rfl⟩\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nhave h_f_im : I f_im ∈ A.topologicalClosure :=\n  key\n    ⟨f_im, rfl⟩\n      -- So `f_re + I • f_im` is in the closure of `A`\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nhave := A.topologicalClosure.add_mem h_f_re (A.topologicalClosure.smul_mem h_f_im IsROrC.I)\n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\nthis : ↑I f_re + IsROrC.I • ↑I f_im ∈ (StarSubalgebra.topologicalClosure A).toSubalgebra\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nrw [StarSubalgebra.mem_toSubalgebra] at this \n[GOAL]\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\nthis : ↑I f_re + IsROrC.I • ↑I f_im ∈ StarSubalgebra.topologicalClosure A\n⊢ f ∈ StarSubalgebra.topologicalClosure A\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\nthis : ↑I f_re + IsROrC.I • ↑I f_im ∈ StarSubalgebra.topologicalClosure A\n⊢ f = ↑I f_re + IsROrC.I • ↑I f_im\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_4.h\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\nthis : ↑I f_re + IsROrC.I • ↑I f_im ∈ StarSubalgebra.topologicalClosure A\na✝ : X\n⊢ ↑f a✝ = ↑(↑I f_re + IsROrC.I • ↑I f_im) a✝\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase h.e'_4.h.h\n𝕜 : Type u_2\nX : Type u_1\ninst✝² : IsROrC 𝕜\ninst✝¹ : TopologicalSpace X\ninst✝ : CompactSpace X\nA : StarSubalgebra 𝕜 C(X, 𝕜)\nhA : Subalgebra.SeparatesPoints A.toSubalgebra\nI : C(X, ℝ) →ₗ[ℝ] C(X, 𝕜) := ContinuousLinearMap.compLeftContinuous ℝ X ofRealClm\nkey :\n  LinearMap.range I ≤\n    Submodule.topologicalClosure (Submodule.restrictScalars ℝ (↑Subalgebra.toSubmodule A.toSubalgebra))\nf : C(X, 𝕜)\nf_re : C(X, ℝ) := comp (mk ↑re) f\nf_im : C(X, ℝ) := comp (mk ↑im) f\nh_f_re : ↑I f_re ∈ StarSubalgebra.topologicalClosure A\nh_f_im : ↑I f_im ∈ StarSubalgebra.topologicalClosure A\nthis : ↑I f_re + IsROrC.I • ↑I f_im ∈ StarSubalgebra.topologicalClosure A\na✝ : X\n⊢ ↑(↑I f_re + IsROrC.I • ↑I f_im) a✝ = ↑f a✝\n[PROOFSTEP]\nsimp [mul_comm IsROrC.I _]\n[GOAL]\nA : Type u_1\ninst✝⁴ : Ring A\ninst✝³ : Algebra ℝ A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set ℝ\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, ℝ) →ₐ[ℝ] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ φ = ψ\n[PROOFSTEP]\nsuffices (⊤ : Subalgebra ℝ C(s, ℝ)) ≤ AlgHom.equalizer φ ψ from AlgHom.ext fun x => this (by trivial)\n[GOAL]\nA : Type u_1\ninst✝⁴ : Ring A\ninst✝³ : Algebra ℝ A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set ℝ\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, ℝ) →ₐ[ℝ] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\nthis : ⊤ ≤ AlgHom.equalizer φ ψ\nx : C(↑s, ℝ)\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nA : Type u_1\ninst✝⁴ : Ring A\ninst✝³ : Algebra ℝ A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set ℝ\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, ℝ) →ₐ[ℝ] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ ⊤ ≤ AlgHom.equalizer φ ψ\n[PROOFSTEP]\nrw [← polynomialFunctions.topologicalClosure s]\n[GOAL]\nA : Type u_1\ninst✝⁴ : Ring A\ninst✝³ : Algebra ℝ A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set ℝ\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, ℝ) →ₐ[ℝ] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ Subalgebra.topologicalClosure (polynomialFunctions s) ≤ AlgHom.equalizer φ ψ\n[PROOFSTEP]\nexact\n  Subalgebra.topologicalClosure_minimal (polynomialFunctions s) (polynomialFunctions.le_equalizer s φ ψ h)\n    (isClosed_eq hφ hψ)\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : Ring A\ninst✝⁴ : StarRing A\ninst✝³ : Algebra 𝕜 A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set 𝕜\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, 𝕜) →⋆ₐ[𝕜] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ φ = ψ\n[PROOFSTEP]\nsuffices (⊤ : StarSubalgebra 𝕜 C(s, 𝕜)) ≤ StarAlgHom.equalizer φ ψ from StarAlgHom.ext fun x => this mem_top\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : Ring A\ninst✝⁴ : StarRing A\ninst✝³ : Algebra 𝕜 A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set 𝕜\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, 𝕜) →⋆ₐ[𝕜] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ ⊤ ≤ StarAlgHom.equalizer φ ψ\n[PROOFSTEP]\nrw [← polynomialFunctions.starClosure_topologicalClosure s]\n[GOAL]\n𝕜 : Type u_1\nA : Type u_2\ninst✝⁶ : IsROrC 𝕜\ninst✝⁵ : Ring A\ninst✝⁴ : StarRing A\ninst✝³ : Algebra 𝕜 A\ninst✝² : TopologicalSpace A\ninst✝¹ : T2Space A\ns : Set 𝕜\ninst✝ : CompactSpace ↑s\nφ ψ : C(↑s, 𝕜) →⋆ₐ[𝕜] A\nhφ : Continuous ↑φ\nhψ : Continuous ↑ψ\nh : ↑φ (↑(toContinuousMapOnAlgHom s) X) = ↑ψ (↑(toContinuousMapOnAlgHom s) X)\n⊢ topologicalClosure (Subalgebra.starClosure (polynomialFunctions s)) ≤ StarAlgHom.equalizer φ ψ\n[PROOFSTEP]\nexact\n  StarSubalgebra.topologicalClosure_minimal (polynomialFunctions.starClosure_le_equalizer s φ ψ h) (isClosed_eq hφ hψ)\n", "meta": {"mathlib_filename": "Mathlib.Topology.ContinuousFunction.StoneWeierstrass", "llama_tokens": 56913, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.585101139733739, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.29483607469542883}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX : C\n⊢ AddCommGroup (End X)\n[PROOFSTEP]\ndsimp [End]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX : C\n⊢ AddCommGroup (X ⟶ X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf : P ⟶ Q\ng g' : Q ⟶ R\n⊢ (fun g => f ≫ g) (g + g') = (fun g => f ≫ g) g + (fun g => f ≫ g) g'\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\ng : Q ⟶ R\nf f' : P ⟶ Q\n⊢ (fun f => f ≫ g) (f + f') = (fun f => f ≫ g) f + (fun f => f ≫ g) f'\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf f' : P ⟶ Q\ng g' : Q ⟶ R\n⊢ (-f) ≫ (-g) = f ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP✝ Q✝ R : C\nf✝ f' : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R\nP Q : C\nf : P ⟶ Q\ninst✝ : Epi f\nZ✝ : C\ng g' : Q ⟶ Z✝\nH : (-f) ≫ g = (-f) ≫ g'\n⊢ g = g'\n[PROOFSTEP]\nrwa [neg_comp, neg_comp, ← comp_neg, ← comp_neg, cancel_epi, neg_inj] at H \n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP✝ Q✝ R : C\nf✝ f' : P✝ ⟶ Q✝\ng✝ g'✝ : Q✝ ⟶ R\nP Q : C\nf : P ⟶ Q\ninst✝ : Mono f\nZ✝ : C\ng g' : Z✝ ⟶ P\nH : g ≫ (-f) = g' ≫ (-f)\n⊢ g = g'\n[PROOFSTEP]\nrwa [comp_neg, comp_neg, ← neg_comp, ← neg_comp, cancel_mono, neg_inj] at H \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng g' : Q ⟶ R\nX : C\nsrc✝ : Monoid (End X) := End.monoid\nf : End X\n⊢ 0 * f = 0\n[PROOFSTEP]\ndsimp [mul]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng g' : Q ⟶ R\nX : C\nsrc✝ : Monoid (End X) := End.monoid\nf : End X\n⊢ f ≫ 0 = 0\n[PROOFSTEP]\nexact HasZeroMorphisms.comp_zero f _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng g' : Q ⟶ R\nX : C\nsrc✝ : Monoid (End X) := End.monoid\nf : End X\n⊢ f * 0 = 0\n[PROOFSTEP]\ndsimp [mul]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng g' : Q ⟶ R\nX : C\nsrc✝ : Monoid (End X) := End.monoid\nf : End X\n⊢ 0 ≫ f = 0\n[PROOFSTEP]\nexact HasZeroMorphisms.zero_comp _ f\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng✝ g' : Q ⟶ R\nX Y : C\nf : X ⟶ Y\ninst✝ : HasLimit (parallelPair f 0)\nw : kernel.ι f = 0\nP✝ : C\ng : P✝ ⟶ X\nh : g ≫ f = 0\n⊢ g = 0\n[PROOFSTEP]\nrw [← kernel.lift_ι f g h, w, Limits.comp_zero]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP Q R : C\nf✝ f' : P ⟶ Q\ng✝ g' : Q ⟶ R\nX Y : C\nf : X ⟶ Y\ninst✝ : HasColimit (parallelPair f 0)\nw : cokernel.π f = 0\nR✝ : C\ng : Y ⟶ R✝\nh : f ≫ g = 0\n⊢ g = 0\n[PROOFSTEP]\nrw [← cokernel.π_desc f g h, w, Limits.zero_comp]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP Q R : C\nf f' : P ⟶ Q\ng g' : Q ⟶ R\ninst✝ : IsIso f\n⊢ f ≫ g = 0 ↔ g = 0\n[PROOFSTEP]\nrw [← IsIso.eq_inv_comp, Limits.comp_zero]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : Preadditive C\nP Q R : C\nf f' : P ⟶ Q\ng g' : Q ⟶ R\ninst✝ : IsIso g\n⊢ f ≫ g = 0 ↔ f = 0\n[PROOFSTEP]\nrw [← IsIso.eq_comp_inv, Limits.zero_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : KernelFork (f - g)\n⊢ Fork.ι c ≫ f = Fork.ι c ≫ g\n[PROOFSTEP]\nrw [← sub_eq_zero, ← comp_sub, c.condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Fork f g\n⊢ Fork.ι c ≫ (f - g) = Fork.ι c ≫ 0\n[PROOFSTEP]\nrw [comp_sub, comp_zero, sub_eq_zero, c.condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nP : C\nι : P ⟶ X\nw : ι ≫ f = ι ≫ g\n⊢ ι ≫ (f - g) = 0\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : KernelFork (f - g)\ni : IsLimit c\ns : Fork f g\nm✝ :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (forkOfKernelFork c).pt).obj WalkingParallelPair.zero\nh : m✝ ≫ Fork.ι (forkOfKernelFork c) = Fork.ι s\n⊢ m✝ = IsLimit.lift i (kernelForkOfFork s)\n[PROOFSTEP]\napply Fork.IsLimit.hom_ext i\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : KernelFork (f - g)\ni : IsLimit c\ns : Fork f g\nm✝ :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (forkOfKernelFork c).pt).obj WalkingParallelPair.zero\nh : m✝ ≫ Fork.ι (forkOfKernelFork c) = Fork.ι s\n⊢ m✝ ≫ Fork.ι c = IsLimit.lift i (kernelForkOfFork s) ≫ Fork.ι c\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Fork f g\ni : IsLimit c\ns : Fork (f - g) 0\nm✝ :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (kernelForkOfFork c).pt).obj WalkingParallelPair.zero\nh : m✝ ≫ Fork.ι (kernelForkOfFork c) = Fork.ι s\n⊢ m✝ = IsLimit.lift i (forkOfKernelFork s)\n[PROOFSTEP]\napply Fork.IsLimit.hom_ext i\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Fork f g\ni : IsLimit c\ns : Fork (f - g) 0\nm✝ :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (kernelForkOfFork c).pt).obj WalkingParallelPair.zero\nh : m✝ ≫ Fork.ι (kernelForkOfFork c) = Fork.ι s\n⊢ m✝ ≫ Fork.ι c = IsLimit.lift i (forkOfKernelFork s) ≫ Fork.ι c\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : CokernelCofork (f - g)\n⊢ f ≫ Cofork.π c = g ≫ Cofork.π c\n[PROOFSTEP]\nrw [← sub_eq_zero, ← sub_comp, c.condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Cofork f g\n⊢ (f - g) ≫ Cofork.π c = 0 ≫ Cofork.π c\n[PROOFSTEP]\nrw [sub_comp, zero_comp, sub_eq_zero, c.condition]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nP : C\nπ : Y ⟶ P\nw : f ≫ π = g ≫ π\n⊢ (f - g) ≫ π = 0\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : CokernelCofork (f - g)\ni : IsColimit c\ns : Cofork f g\nm✝ :\n  ((Functor.const WalkingParallelPair).obj (coforkOfCokernelCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (coforkOfCokernelCofork c) ≫ m✝ = Cofork.π s\n⊢ m✝ = IsColimit.desc i (cokernelCoforkOfCofork s)\n[PROOFSTEP]\napply Cofork.IsColimit.hom_ext i\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : CokernelCofork (f - g)\ni : IsColimit c\ns : Cofork f g\nm✝ :\n  ((Functor.const WalkingParallelPair).obj (coforkOfCokernelCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (coforkOfCokernelCofork c) ≫ m✝ = Cofork.π s\n⊢ Cofork.π c ≫ m✝ = Cofork.π c ≫ IsColimit.desc i (cokernelCoforkOfCofork s)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Cofork f g\ni : IsColimit c\ns : Cofork (f - g) 0\nm✝ :\n  ((Functor.const WalkingParallelPair).obj (cokernelCoforkOfCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (cokernelCoforkOfCofork c) ≫ m✝ = Cofork.π s\n⊢ m✝ = IsColimit.desc i (coforkOfCokernelCofork s)\n[PROOFSTEP]\napply Cofork.IsColimit.hom_ext i\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX Y : C\nf g : X ⟶ Y\nc : Cofork f g\ni : IsColimit c\ns : Cofork (f - g) 0\nm✝ :\n  ((Functor.const WalkingParallelPair).obj (cokernelCoforkOfCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (cokernelCoforkOfCofork c) ≫ m✝ = Cofork.π s\n⊢ Cofork.π c ≫ m✝ = Cofork.π c ≫ IsColimit.desc i (coforkOfCokernelCofork s)\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.Basic", "llama_tokens": 4266, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5506073802837478, "lm_q2_score": 0.5350984286266115, "lm_q1q2_score": 0.2946291439800485}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝ : C\n⊢ { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n          map := fun {X Y} f =>\n            NatTrans.mk fun X_1 =>\n              { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                map_add' :=\n                  (_ :\n                    ∀\n                      (g g' :\n                        ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj X_1)),\n                      (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n      (𝟙 x✝) =\n    𝟙\n      ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun X_1 =>\n                { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                              X_1)),\n                        (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n        x✝)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝² : C\nx✝¹ : Cᵒᵖ\nx✝ :\n  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun X_1 =>\n                  { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                X_1)),\n                          (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n          x✝²).obj\n      x✝¹)\n⊢ ↑(NatTrans.app\n          ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n                map := fun {X Y} f =>\n                  NatTrans.mk fun X_1 =>\n                    { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                      map_add' :=\n                        (_ :\n                          ∀\n                            (g g' :\n                              ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                  X_1)),\n                            (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n            (𝟙 x✝²))\n          x✝¹)\n      x✝ =\n    ↑(NatTrans.app\n          (𝟙\n            ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun X_1 =>\n                      { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat)\n                                        X).obj\n                                    X_1)),\n                              (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n              x✝²))\n          x✝¹)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝² : C\nx✝¹ : Cᵒᵖ\nx✝ :\n  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun X_1 =>\n                  { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                X_1)),\n                          (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n          x✝²).obj\n      x✝¹)\n⊢ x✝ ≫ 𝟙 x✝² = x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n          map := fun {X Y} f =>\n            NatTrans.mk fun X_1 =>\n              { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                map_add' :=\n                  (_ :\n                    ∀\n                      (g g' :\n                        ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj X_1)),\n                      (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n      (f ≫ g) =\n    { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun X_1 =>\n                { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                              X_1)),\n                        (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n        f ≫\n      { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun X_1 =>\n                { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                              X_1)),\n                        (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx✝¹ : Cᵒᵖ\nx✝ :\n  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun X_1 =>\n                  { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                X_1)),\n                          (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n          X✝).obj\n      x✝¹)\n⊢ ↑(NatTrans.app\n          ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n                map := fun {X Y} f =>\n                  NatTrans.mk fun X_1 =>\n                    { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                      map_add' :=\n                        (_ :\n                          ∀\n                            (g g' :\n                              ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                  X_1)),\n                            (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n            (f ≫ g))\n          x✝¹)\n      x✝ =\n    ↑(NatTrans.app\n          ({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun X_1 =>\n                      { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat)\n                                        X).obj\n                                    X_1)),\n                              (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n              f ≫\n            { obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun X_1 =>\n                      { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat)\n                                        X).obj\n                                    X_1)),\n                              (g + g') ≫ f = g ≫ f + g' ≫ f) } }.map\n              g)\n          x✝¹)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : C\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx✝¹ : Cᵒᵖ\nx✝ :\n  ↑(({ obj := fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun X_1 =>\n                  { toZeroHom := { toFun := fun g => g ≫ f, map_zero' := (_ : 0 ≫ f = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun Y => preadditiveYonedaObj Y ⋙ forget₂ (ModuleCat (End Y)) AddCommGroupCat) X).obj\n                                X_1)),\n                          (g + g') ≫ f = g ≫ f + g' ≫ f) } }.obj\n          X✝).obj\n      x✝¹)\n⊢ x✝ ≫ f ≫ g = (x✝ ≫ f) ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝ : Cᵒᵖ\n⊢ { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n          map := fun {X Y} f =>\n            NatTrans.mk fun Y_1 =>\n              { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                map_add' :=\n                  (_ :\n                    ∀\n                      (g g' :\n                        ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                            Y_1)),\n                      f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n      (𝟙 x✝) =\n    𝟙\n      ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun Y_1 =>\n                { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                              Y_1)),\n                        f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n        x✝)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝² : Cᵒᵖ\nx✝¹ : C\nx✝ :\n  ↑(({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun Y_1 =>\n                  { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                                Y_1)),\n                          f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n          x✝²).obj\n      x✝¹)\n⊢ ↑(NatTrans.app\n          ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n                map := fun {X Y} f =>\n                  NatTrans.mk fun Y_1 =>\n                    { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                      map_add' :=\n                        (_ :\n                          ∀\n                            (g g' :\n                              ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat)\n                                      X).obj\n                                  Y_1)),\n                            f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n            (𝟙 x✝²))\n          x✝¹)\n      x✝ =\n    ↑(NatTrans.app\n          (𝟙\n            ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun Y_1 =>\n                      { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat)\n                                        X).obj\n                                    Y_1)),\n                              f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n              x✝²))\n          x✝¹)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nx✝² : Cᵒᵖ\nx✝¹ : C\nx✝ :\n  ↑(({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun Y_1 =>\n                  { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                                Y_1)),\n                          f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n          x✝²).obj\n      x✝¹)\n⊢ 𝟙 x✝².unop ≫ x✝ = x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : Cᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n          map := fun {X Y} f =>\n            NatTrans.mk fun Y_1 =>\n              { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                map_add' :=\n                  (_ :\n                    ∀\n                      (g g' :\n                        ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                            Y_1)),\n                      f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n      (f ≫ g) =\n    { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun Y_1 =>\n                { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                              Y_1)),\n                        f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n        f ≫\n      { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n            map := fun {X Y} f =>\n              NatTrans.mk fun Y_1 =>\n                { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                  map_add' :=\n                    (_ :\n                      ∀\n                        (g g' :\n                          ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                              Y_1)),\n                        f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : Cᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx✝¹ : C\nx✝ :\n  ↑(({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun Y_1 =>\n                  { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                                Y_1)),\n                          f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n          X✝).obj\n      x✝¹)\n⊢ ↑(NatTrans.app\n          ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n                map := fun {X Y} f =>\n                  NatTrans.mk fun Y_1 =>\n                    { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                      map_add' :=\n                        (_ :\n                          ∀\n                            (g g' :\n                              ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat)\n                                      X).obj\n                                  Y_1)),\n                            f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n            (f ≫ g))\n          x✝¹)\n      x✝ =\n    ↑(NatTrans.app\n          ({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun Y_1 =>\n                      { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat)\n                                        X).obj\n                                    Y_1)),\n                              f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n              f ≫\n            { obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n                  map := fun {X Y} f =>\n                    NatTrans.mk fun Y_1 =>\n                      { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                        map_add' :=\n                          (_ :\n                            ∀\n                              (g g' :\n                                ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat)\n                                        X).obj\n                                    Y_1)),\n                              f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.map\n              g)\n          x✝¹)\n      x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Preadditive C\nX✝ Y✝ Z✝ : Cᵒᵖ\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\nx✝¹ : C\nx✝ :\n  ↑(({ obj := fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat,\n              map := fun {X Y} f =>\n                NatTrans.mk fun Y_1 =>\n                  { toZeroHom := { toFun := fun g => f.unop ≫ g, map_zero' := (_ : f.unop ≫ 0 = 0) },\n                    map_add' :=\n                      (_ :\n                        ∀\n                          (g g' :\n                            ↑(((fun X => preadditiveCoyonedaObj X ⋙ forget₂ (ModuleCat (End X)) AddCommGroupCat) X).obj\n                                Y_1)),\n                          f.unop ≫ (g + g') = f.unop ≫ g + f.unop ≫ g') } }.obj\n          X✝).obj\n      x✝¹)\n⊢ (g.unop ≫ f.unop) ≫ x✝ = g.unop ≫ f.unop ≫ x✝\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.Yoneda.Basic", "llama_tokens": 7268, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7577943712746406, "lm_q2_score": 0.38861802670584894, "lm_q1q2_score": 0.2944925532135503}}
{"text": "[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\n⊢ Unbounded (fun x x_1 => x ≤ x_1) s ↔ ∀ (a : α), ∃ b, b ∈ s ∧ a < b\n[PROOFSTEP]\nsimp only [Unbounded, not_le]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\n⊢ Unbounded (fun x x_1 => x < x_1) s ↔ ∀ (a : α), ∃ b, b ∈ s ∧ a ≤ b\n[PROOFSTEP]\nsimp only [Unbounded, not_lt]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\n⊢ Bounded (fun x x_1 => x ≤ x_1) s ↔ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nrefine' ⟨fun h => _, bounded_le_of_bounded_lt⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\nh : Bounded (fun x x_1 => x ≤ x_1) s\n⊢ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\ncases' h with a ha\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\na : α\nha : ∀ (b : α), b ∈ s → (fun x x_1 => x ≤ x_1) b a\n⊢ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\ncases' exists_gt a with b hb\n[GOAL]\ncase intro.intro\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\na : α\nha : ∀ (b : α), b ∈ s → (fun x x_1 => x ≤ x_1) b a\nb : α\nhb : a < b\n⊢ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nexact ⟨b, fun c hc => lt_of_le_of_lt (ha c hc) hb⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\n⊢ Unbounded (fun x x_1 => x < x_1) s ↔ Unbounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nsimp_rw [← not_bounded_iff, bounded_le_iff_bounded_lt]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMaxOrder α\na : α\n⊢ Bounded (fun x x_1 => x < x_1) (Iic a)\n[PROOFSTEP]\nsimp only [← bounded_le_iff_bounded_lt, bounded_le_Iic]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : Preorder α\ninst✝ : NoMinOrder α\na : α\n⊢ Bounded (fun x x_1 => x > x_1) (Ici a)\n[PROOFSTEP]\nsimp only [← bounded_ge_iff_bounded_gt, bounded_ge_Ici]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\nH : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m\na : α\n⊢ Bounded r (s ∩ {b | ¬r b a}) ↔ Bounded r s\n[PROOFSTEP]\nrefine' ⟨_, Bounded.mono (Set.inter_subset_left s _)⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\nH : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m\na : α\n⊢ Bounded r (s ∩ {b | ¬r b a}) → Bounded r s\n[PROOFSTEP]\nrintro ⟨b, hb⟩\n[GOAL]\ncase intro\nα : Type u_1\nr : α → α → Prop\ns t : Set α\nH : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m\na b : α\nhb : ∀ (b_1 : α), b_1 ∈ s ∩ {b | ¬r b a} → r b_1 b\n⊢ Bounded r s\n[PROOFSTEP]\ncases' H a b with m hm\n[GOAL]\ncase intro.intro\nα : Type u_1\nr : α → α → Prop\ns t : Set α\nH : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m\na b : α\nhb : ∀ (b_1 : α), b_1 ∈ s ∩ {b | ¬r b a} → r b_1 b\nm : α\nhm : ∀ (c : α), r c a ∨ r c b → r c m\n⊢ Bounded r s\n[PROOFSTEP]\nexact ⟨m, fun c hc => hm c (or_iff_not_imp_left.2 fun hca => hb c ⟨hc, hca⟩)⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\nH : ∀ (a b : α), ∃ m, ∀ (c : α), r c a ∨ r c b → r c m\na : α\n⊢ Unbounded r (s ∩ {b | ¬r b a}) ↔ Unbounded r s\n[PROOFSTEP]\nsimp_rw [← not_bounded_iff, bounded_inter_not H]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : SemilatticeSup α\na : α\n⊢ Unbounded (fun x x_1 => x ≤ x_1) (s ∩ {b | ¬b ≤ a}) ↔ Unbounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nrw [← not_bounded_iff, ← not_bounded_iff, not_iff_not]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : SemilatticeSup α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | ¬b ≤ a}) ↔ Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nexact bounded_le_inter_not_le a\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a < b}) ↔ Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nsimp_rw [← not_le, bounded_le_inter_not_le]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Unbounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a < b}) ↔ Unbounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nconvert @unbounded_le_inter_not_le _ s _ a\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4.h.e'_2.h.a\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na x✝ : α\n⊢ a < x✝ ↔ ¬x✝ ≤ a\n[PROOFSTEP]\nexact lt_iff_not_le\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) ↔ Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nrefine' ⟨_, Bounded.mono (Set.inter_subset_left s _)⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) → Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nrw [← @bounded_le_inter_lt _ s _ a]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) → Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a < b})\n[PROOFSTEP]\nexact Bounded.mono fun x ⟨hx, hx'⟩ => ⟨hx, le_of_lt hx'⟩\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Unbounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) ↔ Unbounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nrw [← not_bounded_iff, ← not_bounded_iff, not_iff_not]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a ≤ b}) ↔ Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nexact bounded_le_inter_le a\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : SemilatticeSup α\na : α\n⊢ Unbounded (fun x x_1 => x < x_1) (s ∩ {b | ¬b < a}) ↔ Unbounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nrw [← not_bounded_iff, ← not_bounded_iff, not_iff_not]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : SemilatticeSup α\na : α\n⊢ Bounded (fun x x_1 => x < x_1) (s ∩ {b | ¬b < a}) ↔ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nexact bounded_lt_inter_not_lt a\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Bounded (fun x x_1 => x < x_1) (s ∩ {b | a ≤ b}) ↔ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nconvert @bounded_lt_inter_not_lt _ s _ a\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4.h.e'_2.h.a\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na x✝ : α\n⊢ a ≤ x✝ ↔ ¬x✝ < a\n[PROOFSTEP]\nexact not_lt.symm\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na : α\n⊢ Unbounded (fun x x_1 => x < x_1) (s ∩ {b | a ≤ b}) ↔ Unbounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nconvert @unbounded_lt_inter_not_lt _ s _ a\n[GOAL]\ncase h.e'_1.h.e'_3.h.e'_4.h.e'_2.h.a\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝ : LinearOrder α\na x✝ : α\n⊢ a ≤ x✝ ↔ ¬x✝ < a\n[PROOFSTEP]\nexact not_lt.symm\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : LinearOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ Bounded (fun x x_1 => x < x_1) (s ∩ {b | a < b}) ↔ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nrw [← bounded_le_iff_bounded_lt, ← bounded_le_iff_bounded_lt]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : LinearOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ Bounded (fun x x_1 => x ≤ x_1) (s ∩ {b | a < b}) ↔ Bounded (fun x x_1 => x ≤ x_1) s\n[PROOFSTEP]\nexact bounded_le_inter_lt a\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : LinearOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ Unbounded (fun x x_1 => x < x_1) (s ∩ {b | a < b}) ↔ Unbounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nrw [← not_bounded_iff, ← not_bounded_iff, not_iff_not]\n[GOAL]\nα : Type u_1\nr : α → α → Prop\ns t : Set α\ninst✝¹ : LinearOrder α\ninst✝ : NoMaxOrder α\na : α\n⊢ Bounded (fun x x_1 => x < x_1) (s ∩ {b | a < b}) ↔ Bounded (fun x x_1 => x < x_1) s\n[PROOFSTEP]\nexact bounded_lt_inter_lt a\n", "meta": {"mathlib_filename": "Mathlib.Order.Bounded", "llama_tokens": 3948, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6224593452091672, "lm_q2_score": 0.4726834766204328, "lm_q1q2_score": 0.2942262473483473}}
{"text": "[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\n⊢ Set.IsPwo (Function.support 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\nx : HahnSeries Γ R\n⊢ Set.Nonempty (support x) ↔ x ≠ 0\n[PROOFSTEP]\nrw [support, support_nonempty_iff, Ne.def, coeff_fun_eq_zero_iff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na b : Γ\nr : R\n⊢ coeff (↑(single a) r) b = if b = a then r else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na b : Γ\nr : R\nh : b = a\n⊢ coeff (↑(single a) r) b = r\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na b : Γ\nr : R\nh : ¬b = a\n⊢ coeff (↑(single a) r) b = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na✝ b : Γ\nr✝ : R\na : Γ\nr s : R\nrs : ↑(single a) r = ↑(single a) s\n⊢ r = s\n[PROOFSTEP]\nrw [← single_coeff_same a r, ← single_coeff_same a s, rs]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na✝ b : Γ\nr✝ : R\na : Γ\nr : R\n⊢ ↑(single a) r = 0 ↔ r = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na✝ b : Γ\nr✝ : R\na : Γ\nr : R\n⊢ ↑(single a) r = 0 → r = 0\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mp\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na✝ b : Γ\nr✝ : R\na : Γ\nr : R\n⊢ r ≠ 0 → ↑(single a) r ≠ 0\n[PROOFSTEP]\nexact single_ne_zero\n[GOAL]\ncase mpr\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : Zero R\na✝ b : Γ\nr✝ : R\na : Γ\nr : R\n⊢ r = 0 → ↑(single a) r = 0\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Zero R\na b : Γ\nr : R\ninst✝¹ : Nonempty Γ\ninst✝ : Nontrivial R\n⊢ ∃ x y, x ≠ y\n[PROOFSTEP]\nobtain ⟨r, s, rs⟩ := exists_pair_ne R\n[GOAL]\ncase intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Zero R\na b : Γ\nr✝ : R\ninst✝¹ : Nonempty Γ\ninst✝ : Nontrivial R\nr s : R\nrs : r ≠ s\n⊢ ∃ x y, x ≠ y\n[PROOFSTEP]\ninhabit Γ\n[GOAL]\ncase intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Zero R\na b : Γ\nr✝ : R\ninst✝¹ : Nonempty Γ\ninst✝ : Nontrivial R\nr s : R\nrs : r ≠ s\ninhabited_h : Inhabited Γ\n⊢ ∃ x y, x ≠ y\n[PROOFSTEP]\nrefine' ⟨single default r, single default s, fun con => rs _⟩\n[GOAL]\ncase intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Zero R\na b : Γ\nr✝ : R\ninst✝¹ : Nonempty Γ\ninst✝ : Nontrivial R\nr s : R\nrs : r ≠ s\ninhabited_h : Inhabited Γ\ncon : ↑(single default) r = ↑(single default) s\n⊢ r = s\n[PROOFSTEP]\nrw [← single_coeff_same (default : Γ) r, con, single_coeff_same]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\nhx : x ≠ 0\n⊢ coeff x (order x) ≠ 0\n[PROOFSTEP]\nrw [order_of_ne hx]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\nhx : x ≠ 0\n⊢ coeff x (Set.IsWf.min (_ : Set.IsWf (support x)) (_ : Set.Nonempty (support x))) ≠ 0\n[PROOFSTEP]\nexact x.isWf_support.min_mem (support_nonempty_iff.2 hx)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\ni : Γ\nhi : i < order x\n⊢ coeff x i = 0\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase inl\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\ni : Γ\nhi : i < order 0\n⊢ coeff 0 i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\ni : Γ\nhi : i < order x\nhx : x ≠ 0\n⊢ coeff x i = 0\n[PROOFSTEP]\ncontrapose! hi\n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\ni : Γ\nhx : x ≠ 0\nhi : coeff x i ≠ 0\n⊢ ¬i < order x\n[PROOFSTEP]\nrw [← mem_support] at hi \n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\ni : Γ\nhx : x ≠ 0\nhi : i ∈ support x\n⊢ ¬i < order x\n[PROOFSTEP]\nrw [order_of_ne hx]\n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\ninst✝ : Zero Γ\nx : HahnSeries Γ R\ni : Γ\nhx : x ≠ 0\nhi : i ∈ support x\n⊢ ¬i < Set.IsWf.min (_ : Set.IsWf (support x)) (_ : Set.Nonempty (support x))\n[PROOFSTEP]\nexact Set.IsWf.not_lt_min _ _ hi\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b✝ : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\nb : Γ'\nhb : b ∈ Function.support fun b => if h : b ∈ ↑f '' support x then coeff x (Classical.choose h) else 0\n⊢ b ∈ ↑f '' support x\n[PROOFSTEP]\ncontrapose! hb\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b✝ : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\nb : Γ'\nhb : ¬b ∈ (fun a => ↑f a) '' support x\n⊢ ¬b ∈\n      Function.support fun b =>\n        if h : b ∈ (fun a => ↑f a) '' support x then coeff x (Classical.choose (_ : b ∈ ↑f '' support x)) else 0\n[PROOFSTEP]\nrw [Function.mem_support, dif_neg hb, Classical.not_not]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\n⊢ coeff (embDomain f x) (↑f a) = coeff x a\n[PROOFSTEP]\nrw [embDomain]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\n⊢ coeff\n      { coeff := fun b => if h : b ∈ ↑f '' support x then coeff x (Classical.choose h) else 0,\n        isPwo_support' :=\n          (_ :\n            Set.IsPwo (Function.support fun b => if h : b ∈ ↑f '' support x then coeff x (Classical.choose h) else 0)) }\n      (↑f a) =\n    coeff x a\n[PROOFSTEP]\ndsimp only\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\n⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a\n[PROOFSTEP]\nby_cases ha : a ∈ x.support\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : a ∈ support x\n⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a\n[PROOFSTEP]\nrw [dif_pos (Set.mem_image_of_mem f ha)]\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : a ∈ support x\n⊢ coeff x (Classical.choose (_ : ↑f a ∈ ↑f '' support x)) = coeff x a\n[PROOFSTEP]\nexact congr rfl (f.injective (Classical.choose_spec (Set.mem_image_of_mem f ha)).2)\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : ¬a ∈ support x\n⊢ (if h : ↑f a ∈ ↑f '' support x then coeff x (Classical.choose h) else 0) = coeff x a\n[PROOFSTEP]\nrw [dif_neg, Classical.not_not.1 fun c => ha ((mem_support _ _).2 c)]\n[GOAL]\ncase neg.hnc\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : ¬a ∈ support x\n⊢ ¬↑f a ∈ ↑f '' support x\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\ncase neg.hnc\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : ↑f a ∈ ↑f '' support x\n⊢ a ∈ support x\n[PROOFSTEP]\nobtain ⟨b, hb1, hb2⟩ := (Set.mem_image _ _ _).1 ha\n[GOAL]\ncase neg.hnc.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na✝ b✝ : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\na : Γ\nha : ↑f a ∈ ↑f '' support x\nb : Γ\nhb1 : b ∈ support x\nhb2 : ↑f b = ↑f a\n⊢ a ∈ support x\n[PROOFSTEP]\nrwa [f.injective hb2] at hb1 \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\n⊢ support (embDomain f x) ⊆ ↑f '' support x\n[PROOFSTEP]\nintro g hg\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\ng : Γ'\nhg : g ∈ support (embDomain f x)\n⊢ g ∈ ↑f '' support x\n[PROOFSTEP]\ncontrapose! hg\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx : HahnSeries Γ R\ng : Γ'\nhg : ¬g ∈ (fun a => ↑f a) '' support x\n⊢ ¬g ∈ support (embDomain f x)\n[PROOFSTEP]\nrw [mem_support, embDomain_notin_image_support hg, Classical.not_not]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\n⊢ embDomain f 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx✝ : Γ'\n⊢ coeff (embDomain f 0) x✝ = coeff 0 x✝\n[PROOFSTEP]\nsimp [embDomain_notin_image_support]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\n⊢ embDomain f (↑(single g) r) = ↑(single (↑f g)) r\n[PROOFSTEP]\next g'\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\n⊢ coeff (embDomain f (↑(single g) r)) g' = coeff (↑(single (↑f g)) r) g'\n[PROOFSTEP]\nby_cases h : g' = f g\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\nh : g' = ↑f g\n⊢ coeff (embDomain f (↑(single g) r)) g' = coeff (↑(single (↑f g)) r) g'\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\nh : ¬g' = ↑f g\n⊢ coeff (embDomain f (↑(single g) r)) g' = coeff (↑(single (↑f g)) r) g'\n[PROOFSTEP]\nrw [embDomain_notin_image_support, single_coeff_of_ne h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\nh : ¬g' = ↑f g\n⊢ ¬g' ∈ ↑f '' support (↑(single g) r)\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\nh : ¬g' = ↑f g\nhr : r = 0\n⊢ ¬g' ∈ ↑f '' support (↑(single g) r)\n[PROOFSTEP]\nsimp [hr]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr✝ : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\ng : Γ\nr : R\ng' : Γ'\nh : ¬g' = ↑f g\nhr : ¬r = 0\n⊢ ¬g' ∈ ↑f '' support (↑(single g) r)\n[PROOFSTEP]\nrwa [support_single_of_ne hr, Set.image_singleton, Set.mem_singleton_iff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\nxy : embDomain f x = embDomain f y\n⊢ x = y\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\nxy : embDomain f x = embDomain f y\ng : Γ\n⊢ coeff x g = coeff y g\n[PROOFSTEP]\nrw [HahnSeries.ext_iff, Function.funext_iff] at xy \n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\nxy : ∀ (a : Γ'), coeff (embDomain f x) a = coeff (embDomain f y) a\ng : Γ\n⊢ coeff x g = coeff y g\n[PROOFSTEP]\nhave xyg := xy (f g)\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : Zero R\na b : Γ\nr : R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\nxy : ∀ (a : Γ'), coeff (embDomain f x) a = coeff (embDomain f y) a\ng : Γ\nxyg : coeff (embDomain f x) (↑f g) = coeff (embDomain f y) (↑f g)\n⊢ coeff x g = coeff y g\n[PROOFSTEP]\nrwa [embDomain_coeff, embDomain_coeff] at xyg \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y z : HahnSeries Γ R\n⊢ x + y + z = x + (y + z)\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y z : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x + y + z) x✝ = coeff (x + (y + z)) x✝\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx : HahnSeries Γ R\n⊢ 0 + x = x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (0 + x) x✝ = coeff x x✝\n[PROOFSTEP]\napply zero_add\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx : HahnSeries Γ R\n⊢ x + 0 = x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x + 0) x✝ = coeff x x✝\n[PROOFSTEP]\napply add_zero\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y : HahnSeries Γ R\na : Γ\nha : a ∈ support (x + y)\n⊢ a ∈ support x ∪ support y\n[PROOFSTEP]\nrw [mem_support, add_coeff] at ha \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y : HahnSeries Γ R\na : Γ\nha : coeff x a + coeff y a ≠ 0\n⊢ a ∈ support x ∪ support y\n[PROOFSTEP]\nrw [Set.mem_union, mem_support, mem_support]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y : HahnSeries Γ R\na : Γ\nha : coeff x a + coeff y a ≠ 0\n⊢ coeff x a ≠ 0 ∨ coeff y a ≠ 0\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\nx y : HahnSeries Γ R\na : Γ\nha : coeff x a = 0 ∧ coeff y a = 0\n⊢ coeff x a + coeff y a = 0\n[PROOFSTEP]\nrw [ha.1, ha.2, add_zero]\n[GOAL]\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : x = 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : ¬x = 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : y = 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nrw [order_of_ne hx, order_of_ne hy, order_of_ne hxy]\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (Set.IsWf.min (_ : Set.IsWf (support x)) (_ : Set.Nonempty (support x)))\n      (Set.IsWf.min (_ : Set.IsWf (support y)) (_ : Set.Nonempty (support y))) ≤\n    Set.IsWf.min (_ : Set.IsWf (support (x + y))) (_ : Set.Nonempty (support (x + y)))\n[PROOFSTEP]\nrefine' le_of_eq_of_le _ (Set.IsWf.min_le_min_of_subset (support_add_subset (x := x) (y := y)))\n[GOAL]\ncase neg.refine'_1\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ✝\ninst✝¹ : AddMonoid R\nΓ : Type u_3\ninst✝ : LinearOrderedCancelAddCommMonoid Γ\nx y : HahnSeries Γ R\nhxy : x + y ≠ 0\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min (Set.IsWf.min (_ : Set.IsWf (support x)) (_ : Set.Nonempty (support x)))\n      (Set.IsWf.min (_ : Set.IsWf (support y)) (_ : Set.Nonempty (support y))) =\n    Set.IsWf.min ?neg.refine'_2✝ ?neg.refine'_3✝\n[PROOFSTEP]\nexact (Set.IsWf.min_union _ _ _ _).symm\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\na : Γ\nsrc✝ : ZeroHom R (HahnSeries Γ R) := single a\nx y : R\n⊢ ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } (x + y) =\n    ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } x +\n      ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } y\n[PROOFSTEP]\next b\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\na : Γ\nsrc✝ : ZeroHom R (HahnSeries Γ R) := single a\nx y : R\nb : Γ\n⊢ coeff (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } (x + y)) b =\n    coeff\n      (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } x +\n        ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } y)\n      b\n[PROOFSTEP]\nby_cases h : b = a\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\na : Γ\nsrc✝ : ZeroHom R (HahnSeries Γ R) := single a\nx y : R\nb : Γ\nh : b = a\n⊢ coeff (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } (x + y)) b =\n    coeff\n      (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } x +\n        ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } y)\n      b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddMonoid R\na : Γ\nsrc✝ : ZeroHom R (HahnSeries Γ R) := single a\nx y : R\nb : Γ\nh : ¬b = a\n⊢ coeff (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } (x + y)) b =\n    coeff\n      (ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } x +\n        ZeroHom.toFun { toFun := src✝.toFun, map_zero' := (_ : ZeroHom.toFun src✝ 0 = 0) } y)\n      b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddMonoid R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\n⊢ embDomain f (x + y) = embDomain f x + embDomain f y\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddMonoid R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\ng : Γ'\n⊢ coeff (embDomain f (x + y)) g = coeff (embDomain f x + embDomain f y) g\n[PROOFSTEP]\nby_cases hg : g ∈ Set.range f\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddMonoid R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\ng : Γ'\nhg : g ∈ Set.range ↑f\n⊢ coeff (embDomain f (x + y)) g = coeff (embDomain f x + embDomain f y) g\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := hg\n[GOAL]\ncase pos.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddMonoid R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\na : Γ\n⊢ coeff (embDomain f (x + y)) (↑f a) = coeff (embDomain f x + embDomain f y) (↑f a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddMonoid R\nΓ' : Type u_3\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nx y : HahnSeries Γ R\ng : Γ'\nhg : ¬g ∈ Set.range ↑f\n⊢ coeff (embDomain f (x + y)) g = coeff (embDomain f x + embDomain f y) g\n[PROOFSTEP]\nsimp [embDomain_notin_range hg]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx y : HahnSeries Γ R\n⊢ x + y = y + x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx y : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x + y) x✝ = coeff (y + x) x✝\n[PROOFSTEP]\napply add_comm\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx : HahnSeries Γ R\n⊢ Set.IsPwo (Function.support fun a => -coeff x a)\n[PROOFSTEP]\nrw [Function.support_neg]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx : HahnSeries Γ R\n⊢ Set.IsPwo (Function.support fun a => coeff x a)\n[PROOFSTEP]\nexact x.isPwo_support\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx : HahnSeries Γ R\n⊢ -x + x = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nsrc✝ : AddMonoid (HahnSeries Γ R) := inferInstanceAs (AddMonoid (HahnSeries Γ R))\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (-x + x) x✝ = coeff 0 x✝\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nx : HahnSeries Γ R\n⊢ support (-x) = support x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ x✝ ∈ support (-x) ↔ x✝ ∈ support x\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nx y : HahnSeries Γ R\n⊢ (x - y).coeff = x.coeff - y.coeff\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nx y : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x - y) x✝ = (x.coeff - y.coeff) x✝\n[PROOFSTEP]\nsimp [sub_eq_add_neg]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddGroup R\nx y : HahnSeries Γ R\na : Γ\n⊢ coeff (x - y) a = coeff x a - coeff y a\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddGroup R\ninst✝ : Zero Γ\nf : HahnSeries Γ R\n⊢ order (-f) = order f\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddGroup R\ninst✝ : Zero Γ\nf : HahnSeries Γ R\nhf : f = 0\n⊢ order (-f) = order f\n[PROOFSTEP]\nsimp only [hf, neg_zero]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : PartialOrder Γ\ninst✝¹ : AddGroup R\ninst✝ : Zero Γ\nf : HahnSeries Γ R\nhf : ¬f = 0\n⊢ order (-f) = order f\n[PROOFSTEP]\nsimp only [order, support_neg, neg_eq_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝ : HahnSeries Γ V\n⊢ 1 • x✝ = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝¹ : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff (1 • x✝¹) x✝ = coeff x✝¹ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝² x✝¹ : R\nx✝ : HahnSeries Γ V\n⊢ (x✝² * x✝¹) • x✝ = x✝² • x✝¹ • x✝\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝³ x✝² : R\nx✝¹ : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff ((x✝³ * x✝²) • x✝¹) x✝ = coeff (x✝³ • x✝² • x✝¹) x✝\n[PROOFSTEP]\nsimp [mul_smul]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝ : R\n⊢ x✝ • 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝¹ : R\nx✝ : Γ\n⊢ coeff (x✝¹ • 0) x✝ = coeff 0 x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝² : R\nx✝¹ x✝ : HahnSeries Γ V\n⊢ x✝² • (x✝¹ + x✝) = x✝² • x✝¹ + x✝² • x✝\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\nV : Type u_3\ninst✝² : Monoid R\ninst✝¹ : AddMonoid V\ninst✝ : DistribMulAction R V\nx✝³ : R\nx✝² x✝¹ : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff (x✝³ • (x✝² + x✝¹)) x✝ = coeff (x✝³ • x✝² + x✝³ • x✝¹) x✝\n[PROOFSTEP]\nsimp [smul_add]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝⁷ : PartialOrder Γ\nV : Type u_3\ninst✝⁶ : Monoid R\ninst✝⁵ : AddMonoid V\ninst✝⁴ : DistribMulAction R V\nS : Type u_4\ninst✝³ : Monoid S\ninst✝² : DistribMulAction S V\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S V\nr : R\ns : S\na : HahnSeries Γ V\n⊢ (r • s) • a = r • s • a\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝⁷ : PartialOrder Γ\nV : Type u_3\ninst✝⁶ : Monoid R\ninst✝⁵ : AddMonoid V\ninst✝⁴ : DistribMulAction R V\nS : Type u_4\ninst✝³ : Monoid S\ninst✝² : DistribMulAction S V\ninst✝¹ : SMul R S\ninst✝ : IsScalarTower R S V\nr : R\ns : S\na : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff ((r • s) • a) x✝ = coeff (r • s • a) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝⁶ : PartialOrder Γ\nV : Type u_3\ninst✝⁵ : Monoid R\ninst✝⁴ : AddMonoid V\ninst✝³ : DistribMulAction R V\nS : Type u_4\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S V\ninst✝ : SMulCommClass R S V\nr : R\ns : S\na : HahnSeries Γ V\n⊢ r • s • a = s • r • a\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝⁶ : PartialOrder Γ\nV : Type u_3\ninst✝⁵ : Monoid R\ninst✝⁴ : AddMonoid V\ninst✝³ : DistribMulAction R V\nS : Type u_4\ninst✝² : Monoid S\ninst✝¹ : DistribMulAction S V\ninst✝ : SMulCommClass R S V\nr : R\ns : S\na : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff (r • s • a) x✝ = coeff (s • r • a) x✝\n[PROOFSTEP]\nsimp [smul_comm]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\nsrc✝ : DistribMulAction R (HahnSeries Γ V) := inferInstanceAs (DistribMulAction R (HahnSeries Γ V))\nx✝² x✝¹ : R\nx✝ : HahnSeries Γ V\n⊢ (x✝² + x✝¹) • x✝ = x✝² • x✝ + x✝¹ • x✝\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\nsrc✝ : DistribMulAction R (HahnSeries Γ V) := inferInstanceAs (DistribMulAction R (HahnSeries Γ V))\nx✝³ x✝² : R\nx✝¹ : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff ((x✝³ + x✝²) • x✝¹) x✝ = coeff (x✝³ • x✝¹ + x✝² • x✝¹) x✝\n[PROOFSTEP]\nsimp [add_smul]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\nsrc✝ : DistribMulAction R (HahnSeries Γ V) := inferInstanceAs (DistribMulAction R (HahnSeries Γ V))\nx✝ : HahnSeries Γ V\n⊢ 0 • x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\nsrc✝ : DistribMulAction R (HahnSeries Γ V) := inferInstanceAs (DistribMulAction R (HahnSeries Γ V))\nx✝¹ : HahnSeries Γ V\nx✝ : Γ\n⊢ coeff (0 • x✝¹) x✝ = coeff 0 x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\na : Γ\nsrc✝ : R →+ HahnSeries Γ R := addMonoidHom a\nr s : R\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n      (r • s) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        s\n[PROOFSTEP]\next b\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\na : Γ\nsrc✝ : R →+ HahnSeries Γ R := addMonoidHom a\nr s : R\nb : Γ\n⊢ coeff\n      (AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        (r • s))\n      b =\n    coeff\n      (↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n          s)\n      b\n[PROOFSTEP]\nby_cases h : b = a\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\na : Γ\nsrc✝ : R →+ HahnSeries Γ R := addMonoidHom a\nr s : R\nb : Γ\nh : b = a\n⊢ coeff\n      (AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        (r • s))\n      b =\n    coeff\n      (↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n          s)\n      b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝³ : PartialOrder Γ\ninst✝² : Semiring R\nV : Type u_3\ninst✝¹ : AddCommMonoid V\ninst✝ : Module R V\na : Γ\nsrc✝ : R →+ HahnSeries Γ R := addMonoidHom a\nr s : R\nb : Γ\nh : ¬b = a\n⊢ coeff\n      (AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n        (r • s))\n      b =\n    coeff\n      (↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := src✝.toFun,\n            map_add' :=\n              (_ : ∀ (x y : R), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) }\n          s)\n      b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝⁴ : PartialOrder Γ\ninst✝³ : Semiring R\nV : Type u_3\ninst✝² : AddCommMonoid V\ninst✝¹ : Module R V\nΓ' : Type u_4\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nr : R\nx : HahnSeries Γ R\n⊢ embDomain f (r • x) = r • embDomain f x\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝⁴ : PartialOrder Γ\ninst✝³ : Semiring R\nV : Type u_3\ninst✝² : AddCommMonoid V\ninst✝¹ : Module R V\nΓ' : Type u_4\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nr : R\nx : HahnSeries Γ R\ng : Γ'\n⊢ coeff (embDomain f (r • x)) g = coeff (r • embDomain f x) g\n[PROOFSTEP]\nby_cases hg : g ∈ Set.range f\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝⁴ : PartialOrder Γ\ninst✝³ : Semiring R\nV : Type u_3\ninst✝² : AddCommMonoid V\ninst✝¹ : Module R V\nΓ' : Type u_4\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nr : R\nx : HahnSeries Γ R\ng : Γ'\nhg : g ∈ Set.range ↑f\n⊢ coeff (embDomain f (r • x)) g = coeff (r • embDomain f x) g\n[PROOFSTEP]\nobtain ⟨a, rfl⟩ := hg\n[GOAL]\ncase pos.intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁴ : PartialOrder Γ\ninst✝³ : Semiring R\nV : Type u_3\ninst✝² : AddCommMonoid V\ninst✝¹ : Module R V\nΓ' : Type u_4\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nr : R\nx : HahnSeries Γ R\na : Γ\n⊢ coeff (embDomain f (r • x)) (↑f a) = coeff (r • embDomain f x) (↑f a)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝⁴ : PartialOrder Γ\ninst✝³ : Semiring R\nV : Type u_3\ninst✝² : AddCommMonoid V\ninst✝¹ : Module R V\nΓ' : Type u_4\ninst✝ : PartialOrder Γ'\nf : Γ ↪o Γ'\nr : R\nx : HahnSeries Γ R\ng : Γ'\nhg : ¬g ∈ Set.range ↑f\n⊢ coeff (embDomain f (r • x)) g = coeff (r • embDomain f x) g\n[PROOFSTEP]\nsimp [embDomain_notin_range hg]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : MulZeroOneClass R\n⊢ order 1 = 0\n[PROOFSTEP]\ncases' subsingleton_or_nontrivial R with h h\n[GOAL]\ncase inl\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : MulZeroOneClass R\nh : Subsingleton R\n⊢ order 1 = 0\n[PROOFSTEP]\nhaveI := h\n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : MulZeroOneClass R\nh : Nontrivial R\n⊢ order 1 = 0\n[PROOFSTEP]\nhaveI := h\n[GOAL]\ncase inl\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : MulZeroOneClass R\nh this : Subsingleton R\n⊢ order 1 = 0\n[PROOFSTEP]\nrw [Subsingleton.elim (1 : HahnSeries Γ R) 0, order_zero]\n[GOAL]\ncase inr\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : MulZeroOneClass R\nh this : Nontrivial R\n⊢ order 1 = 0\n[PROOFSTEP]\nexact order_single one_ne_zero\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ {a |\n      ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a,\n          coeff x ij.fst * coeff y ij.snd ≠\n        0} ⊆\n    {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a)}\n[PROOFSTEP]\nintro a ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\nha :\n  a ∈\n    {a |\n      ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a,\n          coeff x ij.fst * coeff y ij.snd ≠\n        0}\n⊢ a ∈ {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a)}\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\nha : ¬a ∈ {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a)}\n⊢ ¬a ∈\n      {a |\n        ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a,\n            coeff x ij.fst * coeff y ij.snd ≠\n          0}\n[PROOFSTEP]\nsimp [not_nonempty_iff_eq_empty.1 ha]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhys : support y ⊆ s\n⊢ coeff (x * y) a = ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) hs a, coeff x ij.fst * coeff y ij.snd\n[PROOFSTEP]\nrw [mul_coeff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhys : support y ⊆ s\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a, coeff x ij.fst * coeff y ij.snd =\n    ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) hs a, coeff x ij.fst * coeff y ij.snd\n[PROOFSTEP]\napply sum_subset_zero_on_sdiff (addAntidiagonal_mono_right hys) _ fun _ _ => rfl\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhys : support y ⊆ s\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈\n        addAntidiagonal (_ : Set.IsPwo (support x)) hs a \\\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a →\n      coeff x x_1.fst * coeff y x_1.snd = 0\n[PROOFSTEP]\nintro b hb\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhys : support y ⊆ s\nb : Γ × Γ\nhb :\n  b ∈\n    addAntidiagonal (_ : Set.IsPwo (support x)) hs a \\\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a\n⊢ coeff x b.fst * coeff y b.snd = 0\n[PROOFSTEP]\nsimp only [not_and, mem_sdiff, mem_addAntidiagonal, mem_support, not_imp_not] at hb \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhys : support y ⊆ s\nb : Γ × Γ\nhb : (coeff x b.fst ≠ 0 ∧ b.snd ∈ s ∧ b.fst + b.snd = a) ∧ (coeff x b.fst ≠ 0 → b.fst + b.snd = a → coeff y b.snd = 0)\n⊢ coeff x b.fst * coeff y b.snd = 0\n[PROOFSTEP]\nrw [hb.2 hb.1.1 hb.1.2.2, mul_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhxs : support x ⊆ s\n⊢ coeff (x * y) a = ∑ ij in addAntidiagonal hs (_ : Set.IsPwo (support y)) a, coeff x ij.fst * coeff y ij.snd\n[PROOFSTEP]\nrw [mul_coeff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhxs : support x ⊆ s\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a, coeff x ij.fst * coeff y ij.snd =\n    ∑ ij in addAntidiagonal hs (_ : Set.IsPwo (support y)) a, coeff x ij.fst * coeff y ij.snd\n[PROOFSTEP]\napply sum_subset_zero_on_sdiff (addAntidiagonal_mono_left hxs) _ fun _ _ => rfl\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhxs : support x ⊆ s\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈\n        addAntidiagonal hs (_ : Set.IsPwo (support y)) a \\\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a →\n      coeff x x_1.fst * coeff y x_1.snd = 0\n[PROOFSTEP]\nintro b hb\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhxs : support x ⊆ s\nb : Γ × Γ\nhb :\n  b ∈\n    addAntidiagonal hs (_ : Set.IsPwo (support y)) a \\\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a\n⊢ coeff x b.fst * coeff y b.snd = 0\n[PROOFSTEP]\nsimp only [not_and', mem_sdiff, mem_addAntidiagonal, mem_support, not_ne_iff] at hb \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\na : Γ\ns : Set Γ\nhs : Set.IsPwo s\nhxs : support x ⊆ s\nb : Γ × Γ\nhb : (b.fst ∈ s ∧ coeff y b.snd ≠ 0 ∧ b.fst + b.snd = a) ∧ (coeff y b.snd ≠ 0 ∧ b.fst + b.snd = a → coeff x b.fst = 0)\n⊢ coeff x b.fst * coeff y b.snd = 0\n[PROOFSTEP]\nrw [hb.2 ⟨hb.1.2.1, hb.1.2.2⟩, zero_mul]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\n⊢ x * (y + z) = x * y + x * z\n[PROOFSTEP]\next a\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\n⊢ coeff (x * (y + z)) a = coeff (x * y + x * z) a\n[PROOFSTEP]\nhave hwf := y.isPwo_support.union z.isPwo_support\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\n⊢ coeff (x * (y + z)) a = coeff (x * y + x * z) a\n[PROOFSTEP]\nrw [mul_coeff_right' hwf, add_coeff, mul_coeff_right' hwf (Set.subset_union_right _ _),\n  mul_coeff_right' hwf (Set.subset_union_left _ _)]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) hwf a, coeff x ij.fst * coeff (y + z) ij.snd =\n    ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) hwf a, coeff x ij.fst * coeff y ij.snd +\n      ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) hwf a, coeff x ij.fst * coeff z ij.snd\n[PROOFSTEP]\nsimp only [add_coeff, mul_add, sum_add_distrib]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\n⊢ support (y + z) ⊆ support y ∪ support z\n[PROOFSTEP]\nintro b\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\nb : Γ\n⊢ b ∈ support (y + z) → b ∈ support y ∪ support z\n[PROOFSTEP]\nsimp only [add_coeff, Ne.def, Set.mem_union, Set.mem_setOf_eq, mem_support]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\nb : Γ\n⊢ ¬coeff y b + coeff z b = 0 → ¬coeff y b = 0 ∨ ¬coeff z b = 0\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\nb : Γ\n⊢ coeff y b = 0 ∧ coeff z b = 0 → coeff y b + coeff z b = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support y ∪ support z)\nb : Γ\nh : coeff y b = 0 ∧ coeff z b = 0\n⊢ coeff y b + coeff z b = 0\n[PROOFSTEP]\nrw [h.1, h.2, add_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\n⊢ (x + y) * z = x * z + y * z\n[PROOFSTEP]\next a\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\n⊢ coeff ((x + y) * z) a = coeff (x * z + y * z) a\n[PROOFSTEP]\nhave hwf := x.isPwo_support.union y.isPwo_support\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\n⊢ coeff ((x + y) * z) a = coeff (x * z + y * z) a\n[PROOFSTEP]\nrw [mul_coeff_left' hwf, add_coeff, mul_coeff_left' hwf (Set.subset_union_right _ _),\n  mul_coeff_left' hwf (Set.subset_union_left _ _)]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\n⊢ ∑ ij in addAntidiagonal hwf (_ : Set.IsPwo (support z)) a, coeff (x + y) ij.fst * coeff z ij.snd =\n    ∑ ij in addAntidiagonal hwf (_ : Set.IsPwo (support z)) a, coeff x ij.fst * coeff z ij.snd +\n      ∑ ij in addAntidiagonal hwf (_ : Set.IsPwo (support z)) a, coeff y ij.fst * coeff z ij.snd\n[PROOFSTEP]\nsimp only [add_coeff, add_mul, sum_add_distrib]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\n⊢ support (x + y) ⊆ support x ∪ support y\n[PROOFSTEP]\nintro b\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\nb : Γ\n⊢ b ∈ support (x + y) → b ∈ support x ∪ support y\n[PROOFSTEP]\nsimp only [add_coeff, Ne.def, Set.mem_union, Set.mem_setOf_eq, mem_support]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\nb : Γ\n⊢ ¬coeff x b + coeff y b = 0 → ¬coeff x b = 0 ∨ ¬coeff y b = 0\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\nb : Γ\n⊢ coeff x b = 0 ∧ coeff y b = 0 → coeff x b + coeff y b = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : Mul (HahnSeries Γ R) := inferInstanceAs (Mul (HahnSeries Γ R))\nsrc✝ : Add (HahnSeries Γ R) := inferInstanceAs (Add (HahnSeries Γ R))\nx y z : HahnSeries Γ R\na : Γ\nhwf : Set.IsPwo (support x ∪ support y)\nb : Γ\nh : coeff x b = 0 ∧ coeff y b = 0\n⊢ coeff x b + coeff y b = 0\n[PROOFSTEP]\nrw [h.1, h.2, add_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\n⊢ coeff (↑(single b) r * x) (a + b) = r * coeff x a\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : r = 0\n⊢ coeff (↑(single b) r * x) (a + b) = r * coeff x a\n[PROOFSTEP]\nsimp [hr, mul_coeff]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\n⊢ coeff (↑(single b) r * x) (a + b) = r * coeff x a\n[PROOFSTEP]\nsimp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne.def, not_false_iff, smul_eq_mul]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),\n      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =\n    r * coeff x a\n[PROOFSTEP]\nby_cases hx : x.coeff a = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),\n      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =\n    r * coeff x a\n[PROOFSTEP]\nsimp only [hx, mul_zero]\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),\n      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =\n    0\n[PROOFSTEP]\nrw [sum_congr _ fun _ _ => rfl, sum_empty]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) = ∅\n[PROOFSTEP]\next ⟨a1, a2⟩\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\n⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) ↔ (a1, a2) ∈ ∅\n[PROOFSTEP]\nsimp only [not_mem_empty, not_and, Set.mem_singleton_iff, Classical.not_not, mem_addAntidiagonal, Set.mem_setOf_eq,\n  iff_false_iff]\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\n⊢ a1 = b → a2 ∈ support x → ¬a1 + a2 = a + b\n[PROOFSTEP]\nrintro rfl h2 h1\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\nh2 : a2 ∈ support x\nh1 : a1 + a2 = a + a1\n⊢ False\n[PROOFSTEP]\nrw [add_comm] at h1 \n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\nh2 : a2 ∈ support x\nh1 : a2 + a1 = a + a1\n⊢ False\n[PROOFSTEP]\nrw [← add_right_cancel h1] at hx \n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\na1 a2 : Γ\nhx : coeff x a2 = 0\nh2 : a2 ∈ support x\nh1 : a2 + a1 = a + a1\n⊢ False\n[PROOFSTEP]\nexact h2 hx\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),\n      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =\n    r * coeff x a\n[PROOFSTEP]\ntrans ∑ ij : Γ × Γ in {(b, a)}, (single b r).coeff ij.fst * x.coeff ij.snd\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),\n      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =\n    ∑ ij in {(b, a)}, coeff (↑(single b) r) ij.fst * coeff x ij.snd\n[PROOFSTEP]\napply sum_congr _ fun _ _ => rfl\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) = {(b, a)}\n[PROOFSTEP]\next ⟨a1, a2⟩\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) ↔ (a1, a2) ∈ {(b, a)}\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, Prod.mk.inj_iff, mem_addAntidiagonal, mem_singleton, Set.mem_setOf_eq]\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 = b ∧ a2 ∈ support x ∧ a1 + a2 = a + b ↔ a1 = b ∧ a2 = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 = b ∧ a2 ∈ support x ∧ a1 + a2 = a + b → a1 = b ∧ a2 = a\n[PROOFSTEP]\nrintro ⟨rfl, _, h1⟩\n[GOAL]\ncase a.mk.mp.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\nleft✝ : a2 ∈ support x\nh1 : a1 + a2 = a + a1\n⊢ a1 = a1 ∧ a2 = a\n[PROOFSTEP]\nrw [add_comm] at h1 \n[GOAL]\ncase a.mk.mp.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\nleft✝ : a2 ∈ support x\nh1 : a2 + a1 = a + a1\n⊢ a1 = a1 ∧ a2 = a\n[PROOFSTEP]\nrefine' ⟨rfl, add_right_cancel h1⟩\n[GOAL]\ncase a.mk.mpr\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 = b ∧ a2 = a → a1 = b ∧ a2 ∈ support x ∧ a1 + a2 = a + b\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\nhr : ¬r = 0\na1 a2 : Γ\nhx : ¬coeff x a2 = 0\n⊢ a1 = a1 ∧ a2 ∈ support x ∧ a1 + a2 = a2 + a1\n[PROOFSTEP]\nexact ⟨rfl, by simp [hx], add_comm _ _⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\nhr : ¬r = 0\na1 a2 : Γ\nhx : ¬coeff x a2 = 0\n⊢ a2 ∈ support x\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ ij in {(b, a)}, coeff (↑(single b) r) ij.fst * coeff x ij.snd = r * coeff x a\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\n⊢ coeff (x * ↑(single b) r) (a + b) = coeff x a * r\n[PROOFSTEP]\nby_cases hr : r = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : r = 0\n⊢ coeff (x * ↑(single b) r) (a + b) = coeff x a * r\n[PROOFSTEP]\nsimp [hr, mul_coeff]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\n⊢ coeff (x * ↑(single b) r) (a + b) = coeff x a * r\n[PROOFSTEP]\nsimp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne.def, not_false_iff, smul_eq_mul]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b),\n      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =\n    coeff x a * r\n[PROOFSTEP]\nby_cases hx : x.coeff a = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b),\n      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =\n    coeff x a * r\n[PROOFSTEP]\nsimp only [hx, zero_mul]\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b),\n      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =\n    0\n[PROOFSTEP]\nrw [sum_congr _ fun _ _ => rfl, sum_empty]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\n⊢ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b) = ∅\n[PROOFSTEP]\next ⟨a1, a2⟩\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\n⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b) ↔ (a1, a2) ∈ ∅\n[PROOFSTEP]\nsimp only [not_mem_empty, not_and, Set.mem_singleton_iff, Classical.not_not, mem_addAntidiagonal, Set.mem_setOf_eq,\n  iff_false_iff]\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\n⊢ a1 ∈ support x → a2 = b → ¬a1 + a2 = a + b\n[PROOFSTEP]\nrintro h2 rfl h1\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : coeff x a = 0\na1 a2 : Γ\nh2 : a1 ∈ support x\nh1 : a1 + a2 = a + a2\n⊢ False\n[PROOFSTEP]\nrw [← add_right_cancel h1] at hx \n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\na1 : Γ\nhx : coeff x a1 = 0\na2 : Γ\nh2 : a1 ∈ support x\nh1 : a1 + a2 = a + a2\n⊢ False\n[PROOFSTEP]\nexact h2 hx\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b),\n      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =\n    coeff x a * r\n[PROOFSTEP]\ntrans ∑ ij : Γ × Γ in {(a, b)}, x.coeff ij.fst * (single b r).coeff ij.snd\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b),\n      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =\n    ∑ ij in {(a, b)}, coeff x ij.fst * coeff (↑(single b) r) ij.snd\n[PROOFSTEP]\napply sum_congr _ fun _ _ => rfl\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b) = {(a, b)}\n[PROOFSTEP]\next ⟨a1, a2⟩\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo {b}) (a + b) ↔ (a1, a2) ∈ {(a, b)}\n[PROOFSTEP]\nsimp only [Set.mem_singleton_iff, Prod.mk.inj_iff, mem_addAntidiagonal, mem_singleton, Set.mem_setOf_eq]\n[GOAL]\ncase a.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 ∈ support x ∧ a2 = b ∧ a1 + a2 = a + b ↔ a1 = a ∧ a2 = b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mk.mp\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 ∈ support x ∧ a2 = b ∧ a1 + a2 = a + b → a1 = a ∧ a2 = b\n[PROOFSTEP]\nrintro ⟨_, rfl, h1⟩\n[GOAL]\ncase a.mk.mp.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\nleft✝ : a1 ∈ support x\nh1 : a1 + a2 = a + a2\n⊢ a1 = a ∧ a2 = a2\n[PROOFSTEP]\nrefine' ⟨add_right_cancel h1, rfl⟩\n[GOAL]\ncase a.mk.mpr\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\na1 a2 : Γ\n⊢ a1 = a ∧ a2 = b → a1 ∈ support x ∧ a2 = b ∧ a1 + a2 = a + b\n[PROOFSTEP]\nrintro ⟨rfl, rfl⟩\n[GOAL]\ncase a.mk.mpr.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\nhr : ¬r = 0\na1 a2 : Γ\nhx : ¬coeff x a1 = 0\n⊢ a1 ∈ support x ∧ a2 = a2 ∧ a1 + a2 = a1 + a2\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na b : Γ\nhr : ¬r = 0\nhx : ¬coeff x a = 0\n⊢ ∑ ij in {(a, b)}, coeff x ij.fst * coeff (↑(single b) r) ij.snd = coeff x a * r\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\n⊢ coeff (x * ↑(single 0) r) a = coeff x a * r\n[PROOFSTEP]\nrw [← add_zero a, mul_single_coeff_add, add_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nr : R\nx : HahnSeries Γ R\na : Γ\n⊢ coeff (↑(single 0) r * x) a = r * coeff x a\n[PROOFSTEP]\nrw [← add_zero a, single_mul_coeff_add, add_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nr : R\nx : HahnSeries Γ R\n⊢ ↑(single 0) r * x = r • x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nr : R\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (↑(single 0) r * x) x✝ = coeff (r • x) x✝\n[PROOFSTEP]\nexact single_zero_mul_coeff\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ support (x * y) ⊆ support x + support y\n[PROOFSTEP]\napply Set.Subset.trans (fun x hx => _) support_addAntidiagonal_subset_add\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ Set.IsPwo (support x)\n[PROOFSTEP]\nexact x.isPwo_support\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ Set.IsPwo (support y)\n[PROOFSTEP]\nexact y.isPwo_support\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ ∀ (x_1 : Γ),\n    x_1 ∈ support (x * y) →\n      x_1 ∈ {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a)}\n[PROOFSTEP]\nintro x hx\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx✝ y : HahnSeries Γ R\nx : Γ\nhx : x ∈ support (x✝ * y)\n⊢ x ∈ {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x✝)) (_ : Set.IsPwo (support y)) a)}\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx✝ y : HahnSeries Γ R\nx : Γ\nhx : ¬x ∈ {a | Finset.Nonempty (addAntidiagonal (_ : Set.IsPwo (support x✝)) (_ : Set.IsPwo (support y)) a)}\n⊢ ¬x ∈ support (x✝ * y)\n[PROOFSTEP]\nsimp only [not_nonempty_iff_eq_empty, Ne.def, Set.mem_setOf_eq] at hx \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx✝ y : HahnSeries Γ R\nx : Γ\nhx : addAntidiagonal (_ : Set.IsPwo (support x✝)) (_ : Set.IsPwo (support y)) x = ∅\n⊢ ¬x ∈ support (x✝ * y)\n[PROOFSTEP]\nsimp [hx, mul_coeff]\n[GOAL]\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝¹ : LinearOrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\n⊢ coeff (x * y) (order x + order y) = coeff x (order x) * coeff y (order y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝¹ : LinearOrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\nhx : x = 0\n⊢ coeff (x * y) (order x + order y) = coeff x (order x) * coeff y (order y)\n[PROOFSTEP]\nsimp [hx, mul_coeff]\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝¹ : LinearOrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\nhx : ¬x = 0\n⊢ coeff (x * y) (order x + order y) = coeff x (order x) * coeff y (order y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝¹ : LinearOrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : y = 0\n⊢ coeff (x * y) (order x + order y) = coeff x (order x) * coeff y (order y)\n[PROOFSTEP]\nsimp [hy, mul_coeff]\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝¹ : LinearOrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ coeff (x * y) (order x + order y) = coeff x (order x) * coeff y (order y)\n[PROOFSTEP]\nrw [order_of_ne hx, order_of_ne hy, mul_coeff, Finset.addAntidiagonal_min_add_min, Finset.sum_singleton]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\n⊢ x * y * z = x * (y * z)\n[PROOFSTEP]\next b\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ coeff (x * y * z) b = coeff (x * (y * z)) b\n[PROOFSTEP]\nrw [mul_coeff_left' (x.isPwo_support.add y.isPwo_support) support_mul_subset_add_support,\n  mul_coeff_right' (y.isPwo_support.add z.isPwo_support) support_mul_subset_add_support]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b,\n      coeff (x * y) ij.fst * coeff z ij.snd =\n    ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b,\n      coeff x ij.fst * coeff (y * z) ij.snd\n[PROOFSTEP]\nsimp only [mul_coeff, add_coeff, sum_mul, mul_sum, sum_sigma']\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∑ x_1 in\n      Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n        addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst,\n      coeff x x_1.snd.fst * coeff y x_1.snd.snd * coeff z x_1.fst.snd =\n    ∑ x_1 in\n      Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b) fun a =>\n        addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support z)) a.snd,\n      coeff x x_1.fst.fst * (coeff y x_1.snd.fst * coeff z x_1.snd.snd)\n[PROOFSTEP]\nrefine' sum_bij_ne_zero (fun a _ _ => ⟨⟨a.2.1, a.2.2 + a.1.2⟩, ⟨a.2.2, a.1.2⟩⟩) _ _ _ _\n[GOAL]\ncase coeff.h.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∀ (a : (_ : Γ × Γ) × Γ × Γ)\n    (h₁ :\n      a ∈\n        Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst)\n    (h₂ : coeff x a.snd.fst * coeff y a.snd.snd * coeff z a.fst.snd ≠ 0),\n    (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁ h₂ ∈\n      Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b) fun a =>\n        addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support z)) a.snd\n[PROOFSTEP]\nrintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ H1 H2\n[GOAL]\ncase coeff.h.refine'_1.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i j k l : Γ\nH1 :\n  { fst := (i, j), snd := (k, l) } ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst\nH2 :\n  coeff x { fst := (i, j), snd := (k, l) }.snd.fst * coeff y { fst := (i, j), snd := (k, l) }.snd.snd *\n      coeff z { fst := (i, j), snd := (k, l) }.fst.snd ≠\n    0\n⊢ (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n      { fst := (i, j), snd := (k, l) } H1 H2 ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support z)) a.snd\n[PROOFSTEP]\nsimp only [and_true_iff, Set.image2_add, eq_self_iff_true, mem_addAntidiagonal, Ne.def, Set.image_prod, mem_sigma,\n  Set.mem_setOf_eq] at H1 H2 ⊢\n[GOAL]\ncase coeff.h.refine'_1.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i j k l : Γ\nH2 : ¬coeff x k * coeff y l * coeff z j = 0\nH1 : (i ∈ support x + support y ∧ j ∈ support z ∧ i + j = b) ∧ k ∈ support x ∧ l ∈ support y ∧ k + l = i\n⊢ (k ∈ support x ∧ l + j ∈ support y + support z ∧ k + (l + j) = b) ∧ l ∈ support y ∧ j ∈ support z\n[PROOFSTEP]\nobtain ⟨⟨H3, nz, rfl⟩, nx, ny, rfl⟩ := H1\n[GOAL]\ncase coeff.h.refine'_1.mk.mk.mk.intro.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nj k l : Γ\nH2 : ¬coeff x k * coeff y l * coeff z j = 0\nnz : j ∈ support z\nnx : k ∈ support x\nny : l ∈ support y\nH3 : k + l ∈ support x + support y\n⊢ (k ∈ support x ∧ l + j ∈ support y + support z ∧ k + (l + j) = k + l + j) ∧ l ∈ support y ∧ j ∈ support z\n[PROOFSTEP]\nexact ⟨⟨nx, Set.add_mem_add ny nz, (add_assoc _ _ _).symm⟩, ny, nz⟩\n[GOAL]\ncase coeff.h.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∀ (a₁ a₂ : (_ : Γ × Γ) × Γ × Γ)\n    (h₁₁ :\n      a₁ ∈\n        Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst)\n    (h₁₂ : coeff x a₁.snd.fst * coeff y a₁.snd.snd * coeff z a₁.fst.snd ≠ 0)\n    (h₂₁ :\n      a₂ ∈\n        Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst)\n    (h₂₂ : coeff x a₂.snd.fst * coeff y a₂.snd.snd * coeff z a₂.fst.snd ≠ 0),\n    (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a₁ h₁₁ h₁₂ =\n        (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a₂ h₂₁ h₂₂ →\n      a₁ = a₂\n[PROOFSTEP]\nrintro ⟨⟨i1, j1⟩, k1, l1⟩ ⟨⟨i2, j2⟩, k2, l2⟩ H1 H2 H3 H4 H5\n[GOAL]\ncase coeff.h.refine'_2.mk.mk.mk.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i1 j1 k1 l1 i2 j2 k2 l2 : Γ\nH1 :\n  { fst := (i1, j1), snd := (k1, l1) } ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst\nH2 :\n  coeff x { fst := (i1, j1), snd := (k1, l1) }.snd.fst * coeff y { fst := (i1, j1), snd := (k1, l1) }.snd.snd *\n      coeff z { fst := (i1, j1), snd := (k1, l1) }.fst.snd ≠\n    0\nH3 :\n  { fst := (i2, j2), snd := (k2, l2) } ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst\nH4 :\n  coeff x { fst := (i2, j2), snd := (k2, l2) }.snd.fst * coeff y { fst := (i2, j2), snd := (k2, l2) }.snd.snd *\n      coeff z { fst := (i2, j2), snd := (k2, l2) }.fst.snd ≠\n    0\nH5 :\n  (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n      { fst := (i1, j1), snd := (k1, l1) } H1 H2 =\n    (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n      { fst := (i2, j2), snd := (k2, l2) } H3 H4\n⊢ { fst := (i1, j1), snd := (k1, l1) } = { fst := (i2, j2), snd := (k2, l2) }\n[PROOFSTEP]\nsimp only [Set.image2_add, Prod.mk.inj_iff, mem_addAntidiagonal, Ne.def, Set.image_prod, mem_sigma, Set.mem_setOf_eq,\n  heq_iff_eq] at H1 H3 H5 \n[GOAL]\ncase coeff.h.refine'_2.mk.mk.mk.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i1 j1 k1 l1 i2 j2 k2 l2 : Γ\nH2 :\n  coeff x { fst := (i1, j1), snd := (k1, l1) }.snd.fst * coeff y { fst := (i1, j1), snd := (k1, l1) }.snd.snd *\n      coeff z { fst := (i1, j1), snd := (k1, l1) }.fst.snd ≠\n    0\nH4 :\n  coeff x { fst := (i2, j2), snd := (k2, l2) }.snd.fst * coeff y { fst := (i2, j2), snd := (k2, l2) }.snd.snd *\n      coeff z { fst := (i2, j2), snd := (k2, l2) }.fst.snd ≠\n    0\nH5 : { fst := (k1, l1 + j1), snd := (l1, j1) } = { fst := (k2, l2 + j2), snd := (l2, j2) }\nH1 : (i1 ∈ support x + support y ∧ j1 ∈ support z ∧ i1 + j1 = b) ∧ k1 ∈ support x ∧ l1 ∈ support y ∧ k1 + l1 = i1\nH3 : (i2 ∈ support x + support y ∧ j2 ∈ support z ∧ i2 + j2 = b) ∧ k2 ∈ support x ∧ l2 ∈ support y ∧ k2 + l2 = i2\n⊢ { fst := (i1, j1), snd := (k1, l1) } = { fst := (i2, j2), snd := (k2, l2) }\n[PROOFSTEP]\nobtain (⟨⟨rfl, _⟩, rfl, rfl⟩ : (k1 = k2 ∧ l1 + j1 = l2 + j2) ∧ l1 = l2 ∧ j1 = j2) := by simpa using H5\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i1 j1 k1 l1 i2 j2 k2 l2 : Γ\nH2 :\n  coeff x { fst := (i1, j1), snd := (k1, l1) }.snd.fst * coeff y { fst := (i1, j1), snd := (k1, l1) }.snd.snd *\n      coeff z { fst := (i1, j1), snd := (k1, l1) }.fst.snd ≠\n    0\nH4 :\n  coeff x { fst := (i2, j2), snd := (k2, l2) }.snd.fst * coeff y { fst := (i2, j2), snd := (k2, l2) }.snd.snd *\n      coeff z { fst := (i2, j2), snd := (k2, l2) }.fst.snd ≠\n    0\nH5 : { fst := (k1, l1 + j1), snd := (l1, j1) } = { fst := (k2, l2 + j2), snd := (l2, j2) }\nH1 : (i1 ∈ support x + support y ∧ j1 ∈ support z ∧ i1 + j1 = b) ∧ k1 ∈ support x ∧ l1 ∈ support y ∧ k1 + l1 = i1\nH3 : (i2 ∈ support x + support y ∧ j2 ∈ support z ∧ i2 + j2 = b) ∧ k2 ∈ support x ∧ l2 ∈ support y ∧ k2 + l2 = i2\n⊢ (k1 = k2 ∧ l1 + j1 = l2 + j2) ∧ l1 = l2 ∧ j1 = j2\n[PROOFSTEP]\nsimpa using H5\n[GOAL]\ncase coeff.h.refine'_2.mk.mk.mk.mk.mk.mk.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i1 j1 k1 l1 i2 : Γ\nH2 :\n  coeff x { fst := (i1, j1), snd := (k1, l1) }.snd.fst * coeff y { fst := (i1, j1), snd := (k1, l1) }.snd.snd *\n      coeff z { fst := (i1, j1), snd := (k1, l1) }.fst.snd ≠\n    0\nH1 : (i1 ∈ support x + support y ∧ j1 ∈ support z ∧ i1 + j1 = b) ∧ k1 ∈ support x ∧ l1 ∈ support y ∧ k1 + l1 = i1\nright✝ : l1 + j1 = l1 + j1\nH4 :\n  coeff x { fst := (i2, j1), snd := (k1, l1) }.snd.fst * coeff y { fst := (i2, j1), snd := (k1, l1) }.snd.snd *\n      coeff z { fst := (i2, j1), snd := (k1, l1) }.fst.snd ≠\n    0\nH5 : { fst := (k1, l1 + j1), snd := (l1, j1) } = { fst := (k1, l1 + j1), snd := (l1, j1) }\nH3 : (i2 ∈ support x + support y ∧ j1 ∈ support z ∧ i2 + j1 = b) ∧ k1 ∈ support x ∧ l1 ∈ support y ∧ k1 + l1 = i2\n⊢ { fst := (i1, j1), snd := (k1, l1) } = { fst := (i2, j1), snd := (k1, l1) }\n[PROOFSTEP]\nsimp only [and_true_iff, Prod.mk.inj_iff, eq_self_iff_true, heq_iff_eq, ← H1.2.2.2, ← H3.2.2.2]\n[GOAL]\ncase coeff.h.refine'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∀ (b_1 : (_ : Γ × Γ) × Γ × Γ),\n    (b_1 ∈\n        Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b) fun a =>\n          addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support z)) a.snd) →\n      coeff x b_1.fst.fst * (coeff y b_1.snd.fst * coeff z b_1.snd.snd) ≠ 0 →\n        ∃ a h₁ h₂,\n          b_1 = (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁ h₂\n[PROOFSTEP]\nrintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ H1 H2\n[GOAL]\ncase coeff.h.refine'_3.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i j k l : Γ\nH1 :\n  { fst := (i, j), snd := (k, l) } ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y + support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support z)) a.snd\nH2 :\n  coeff x { fst := (i, j), snd := (k, l) }.fst.fst *\n      (coeff y { fst := (i, j), snd := (k, l) }.snd.fst * coeff z { fst := (i, j), snd := (k, l) }.snd.snd) ≠\n    0\n⊢ ∃ a h₁ h₂,\n    { fst := (i, j), snd := (k, l) } =\n      (fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁ h₂\n[PROOFSTEP]\nsimp only [exists_prop, Set.image2_add, Prod.mk.inj_iff, mem_addAntidiagonal, Sigma.exists, Ne.def, Set.image_prod,\n  mem_sigma, Set.mem_setOf_eq, heq_iff_eq, Prod.exists] at H1 H2 ⊢\n[GOAL]\ncase coeff.h.refine'_3.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i j k l : Γ\nH2 : ¬coeff x i * (coeff y k * coeff z l) = 0\nH1 : (i ∈ support x ∧ j ∈ support y + support z ∧ i + j = b) ∧ k ∈ support y ∧ l ∈ support z ∧ k + l = j\n⊢ ∃ a b_1 a_1 b_2,\n    ((a ∈ support x + support y ∧ b_1 ∈ support z ∧ a + b_1 = b) ∧ a_1 ∈ support x ∧ b_2 ∈ support y ∧ a_1 + b_2 = a) ∧\n      ¬coeff x a_1 * coeff y b_2 * coeff z b_1 = 0 ∧\n        { fst := (i, j), snd := (k, l) } = { fst := (a_1, b_2 + b_1), snd := (b_2, b_1) }\n[PROOFSTEP]\nobtain ⟨⟨nx, H, rfl⟩, ny, nz, rfl⟩ := H1\n[GOAL]\ncase coeff.h.refine'_3.mk.mk.mk.intro.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\ni k l : Γ\nH2 : ¬coeff x i * (coeff y k * coeff z l) = 0\nnx : i ∈ support x\nny : k ∈ support y\nnz : l ∈ support z\nH : k + l ∈ support y + support z\n⊢ ∃ a b a_1 b_1,\n    ((a ∈ support x + support y ∧ b ∈ support z ∧ a + b = i + (k + l)) ∧\n        a_1 ∈ support x ∧ b_1 ∈ support y ∧ a_1 + b_1 = a) ∧\n      ¬coeff x a_1 * coeff y b_1 * coeff z b = 0 ∧\n        { fst := (i, k + l), snd := (k, l) } = { fst := (a_1, b_1 + b), snd := (b_1, b) }\n[PROOFSTEP]\nexact\n  ⟨i + k, l, i, k, ⟨⟨Set.add_mem_add nx ny, nz, add_assoc _ _ _⟩, nx, ny, rfl⟩, fun h => H2 <| by rw [← h, mul_assoc],\n    rfl⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\ni k l : Γ\nH2 : ¬coeff x i * (coeff y k * coeff z l) = 0\nnx : i ∈ support x\nny : k ∈ support y\nnz : l ∈ support z\nH : k + l ∈ support y + support z\nh : coeff x i * coeff y k * coeff z l = 0\n⊢ coeff x i * (coeff y k * coeff z l) = 0\n[PROOFSTEP]\nrw [← h, mul_assoc]\n[GOAL]\ncase coeff.h.refine'_4\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb : Γ\n⊢ ∀ (a : (_ : Γ × Γ) × Γ × Γ)\n    (h₁ :\n      a ∈\n        Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n          addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst)\n    (h₂ : coeff x a.snd.fst * coeff y a.snd.snd * coeff z a.fst.snd ≠ 0),\n    coeff x a.snd.fst * coeff y a.snd.snd * coeff z a.fst.snd =\n      coeff x\n          ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁\n                h₂).fst.fst *\n        (coeff y\n            ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁\n                  h₂).snd.fst *\n          coeff z\n            ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) }) a h₁\n                  h₂).snd.snd)\n[PROOFSTEP]\nrintro ⟨⟨i, j⟩, ⟨k, l⟩⟩ _ _\n[GOAL]\ncase coeff.h.refine'_4.mk.mk.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalSemiring R\nx y z : HahnSeries Γ R\nb i j k l : Γ\nh₁✝ :\n  { fst := (i, j), snd := (k, l) } ∈\n    Finset.sigma (addAntidiagonal (_ : Set.IsPwo (support x + support y)) (_ : Set.IsPwo (support z)) b) fun a =>\n      addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) a.fst\nh₂✝ :\n  coeff x { fst := (i, j), snd := (k, l) }.snd.fst * coeff y { fst := (i, j), snd := (k, l) }.snd.snd *\n      coeff z { fst := (i, j), snd := (k, l) }.fst.snd ≠\n    0\n⊢ coeff x { fst := (i, j), snd := (k, l) }.snd.fst * coeff y { fst := (i, j), snd := (k, l) }.snd.snd *\n      coeff z { fst := (i, j), snd := (k, l) }.fst.snd =\n    coeff x\n        ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n              { fst := (i, j), snd := (k, l) } h₁✝ h₂✝).fst.fst *\n      (coeff y\n          ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n                { fst := (i, j), snd := (k, l) } h₁✝ h₂✝).snd.fst *\n        coeff z\n          ((fun a x_1 x => { fst := (a.snd.fst, a.snd.snd + a.fst.snd), snd := (a.snd.snd, a.fst.snd) })\n                { fst := (i, j), snd := (k, l) } h₁✝ h₂✝).snd.snd)\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : AddCommMonoid (HahnSeries Γ R) := inferInstanceAs (AddCommMonoid (HahnSeries Γ R))\nsrc✝ : Distrib (HahnSeries Γ R) := inferInstanceAs (Distrib (HahnSeries Γ R))\nx✝ : HahnSeries Γ R\n⊢ 0 * x✝ = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : AddCommMonoid (HahnSeries Γ R) := inferInstanceAs (AddCommMonoid (HahnSeries Γ R))\nsrc✝ : Distrib (HahnSeries Γ R) := inferInstanceAs (Distrib (HahnSeries Γ R))\nx✝¹ : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (0 * x✝¹) x✝ = coeff 0 x✝\n[PROOFSTEP]\nsimp [mul_coeff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : AddCommMonoid (HahnSeries Γ R) := inferInstanceAs (AddCommMonoid (HahnSeries Γ R))\nsrc✝ : Distrib (HahnSeries Γ R) := inferInstanceAs (Distrib (HahnSeries Γ R))\nx✝ : HahnSeries Γ R\n⊢ x✝ * 0 = 0\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\nsrc✝¹ : AddCommMonoid (HahnSeries Γ R) := inferInstanceAs (AddCommMonoid (HahnSeries Γ R))\nsrc✝ : Distrib (HahnSeries Γ R) := inferInstanceAs (Distrib (HahnSeries Γ R))\nx✝¹ : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x✝¹ * 0) x✝ = coeff 0 x✝\n[PROOFSTEP]\nsimp [mul_coeff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nsrc✝¹ : AddMonoidWithOne (HahnSeries Γ R) := AddMonoidWithOne.unary\nsrc✝ : NonUnitalNonAssocSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalNonAssocSemiring (HahnSeries Γ R))\nx : HahnSeries Γ R\n⊢ 1 * x = x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nsrc✝¹ : AddMonoidWithOne (HahnSeries Γ R) := AddMonoidWithOne.unary\nsrc✝ : NonUnitalNonAssocSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalNonAssocSemiring (HahnSeries Γ R))\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (1 * x) x✝ = coeff x x✝\n[PROOFSTEP]\nexact single_zero_mul_coeff.trans (one_mul _)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nsrc✝¹ : AddMonoidWithOne (HahnSeries Γ R) := AddMonoidWithOne.unary\nsrc✝ : NonUnitalNonAssocSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalNonAssocSemiring (HahnSeries Γ R))\nx : HahnSeries Γ R\n⊢ x * 1 = x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nsrc✝¹ : AddMonoidWithOne (HahnSeries Γ R) := AddMonoidWithOne.unary\nsrc✝ : NonUnitalNonAssocSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalNonAssocSemiring (HahnSeries Γ R))\nx : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x * 1) x✝ = coeff x x✝\n[PROOFSTEP]\nexact mul_single_zero_coeff.trans (mul_one _)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalCommSemiring R\nsrc✝ : NonUnitalSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalSemiring (HahnSeries Γ R))\nx y : HahnSeries Γ R\n⊢ x * y = y * x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalCommSemiring R\nsrc✝ : NonUnitalSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalSemiring (HahnSeries Γ R))\nx y : HahnSeries Γ R\nx✝ : Γ\n⊢ coeff (x * y) x✝ = coeff (y * x) x✝\n[PROOFSTEP]\nsimp_rw [mul_coeff, mul_comm]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalCommSemiring R\nsrc✝ : NonUnitalSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalSemiring (HahnSeries Γ R))\nx y : HahnSeries Γ R\nx✝ : Γ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) x✝, coeff x ij.fst * coeff y ij.snd =\n    ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support x)) x✝,\n      coeff x x_1.snd * coeff y x_1.fst\n[PROOFSTEP]\nrefine'\n  sum_bij (fun a _ => a.swap) (fun a ha => _) (fun a _ => rfl) (fun _ _ _ _ => Prod.swap_inj.1) fun a ha =>\n    ⟨a.swap, _, a.swap_swap.symm⟩\n[GOAL]\ncase coeff.h.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalCommSemiring R\nsrc✝ : NonUnitalSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalSemiring (HahnSeries Γ R))\nx y : HahnSeries Γ R\nx✝ : Γ\na : Γ × Γ\nha : a ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) x✝\n⊢ (fun a x => Prod.swap a) a ha ∈ addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support x)) x✝\n[PROOFSTEP]\nrwa [swap_mem_addAntidiagonal]\n[GOAL]\ncase coeff.h.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalCommSemiring R\nsrc✝ : NonUnitalSemiring (HahnSeries Γ R) := inferInstanceAs (NonUnitalSemiring (HahnSeries Γ R))\nx y : HahnSeries Γ R\nx✝ : Γ\na : Γ × Γ\nha : a ∈ addAntidiagonal (_ : Set.IsPwo (support y)) (_ : Set.IsPwo (support x)) x✝\n⊢ Prod.swap a ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) x✝\n[PROOFSTEP]\nrwa [swap_mem_addAntidiagonal]\n[GOAL]\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nxy : x * y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nxy : x * y = 0\nhx : x = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nxy : x * y = 0\nhx : x = 0\n⊢ x = 0\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase neg\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nxy : x * y = 0\nhx : ¬x = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nxy : x * y = 0\nhx : ¬x = 0\n⊢ y = 0\n[PROOFSTEP]\ncontrapose! xy\n[GOAL]\ncase neg.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nxy : y ≠ 0\n⊢ x * y ≠ 0\n[PROOFSTEP]\nrw [Ne, HahnSeries.ext_iff, Function.funext_iff, not_forall]\n[GOAL]\ncase neg.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nxy : y ≠ 0\n⊢ ∃ x_1, ¬coeff (x * y) x_1 = coeff 0 x_1\n[PROOFSTEP]\nrefine' ⟨x.order + y.order, _⟩\n[GOAL]\ncase neg.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nxy : y ≠ 0\n⊢ ¬coeff (x * y) (order x + order y) = coeff 0 (order x + order y)\n[PROOFSTEP]\nrw [mul_coeff_order_add_order x y, zero_coeff, mul_eq_zero]\n[GOAL]\ncase neg.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type ?u.1364118\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nxy : y ≠ 0\n⊢ ¬(coeff x (order x) = 0 ∨ coeff y (order y) = 0)\n[PROOFSTEP]\nsimp [coeff_order_ne_zero, hx, xy]\n[GOAL]\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ order (x * y) = order x + order y\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ order (x * y) ≤ order x + order y\n[PROOFSTEP]\napply order_le_of_coeff_ne_zero\n[GOAL]\ncase a.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ coeff (x * y) (order x + order y) ≠ 0\n[PROOFSTEP]\nrw [mul_coeff_order_add_order x y]\n[GOAL]\ncase a.h\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ coeff x (order x) * coeff y (order y) ≠ 0\n[PROOFSTEP]\nexact mul_ne_zero (coeff_order_ne_zero hx) (coeff_order_ne_zero hy)\n[GOAL]\ncase a\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ order x + order y ≤ order (x * y)\n[PROOFSTEP]\nrw [order_of_ne hx, order_of_ne hy, order_of_ne (mul_ne_zero hx hy), ← Set.IsWf.min_add]\n[GOAL]\ncase a\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : NonUnitalNonAssocSemiring R\ninst✝ : NoZeroDivisors R\nx y : HahnSeries Γ R\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ Set.IsWf.min (_ : Set.IsWf (support x + support y)) (_ : Set.Nonempty (support x + support y)) ≤\n    Set.IsWf.min (_ : Set.IsWf (support (x * y))) (_ : Set.Nonempty (support (x * y)))\n[PROOFSTEP]\nexact Set.IsWf.min_le_min_of_subset support_mul_subset_add_support\n[GOAL]\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\nx : HahnSeries Γ R\nn : ℕ\n⊢ order (x ^ n) = n • order x\n[PROOFSTEP]\ninduction' n with h IH\n[GOAL]\ncase zero\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\nx : HahnSeries Γ R\n⊢ order (x ^ Nat.zero) = Nat.zero • order x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\nx : HahnSeries Γ R\nh : ℕ\nIH : order (x ^ h) = h • order x\n⊢ order (x ^ Nat.succ h) = Nat.succ h • order x\n[PROOFSTEP]\nrcases eq_or_ne x 0 with (rfl | hx)\n[GOAL]\ncase succ.inl\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\nh : ℕ\nIH : order (0 ^ h) = h • order 0\n⊢ order (0 ^ Nat.succ h) = Nat.succ h • order 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ.inr\nΓ✝ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ✝\nΓ : Type u_3\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R\ninst✝ : NoZeroDivisors R\nx : HahnSeries Γ R\nh : ℕ\nIH : order (x ^ h) = h • order x\nhx : x ≠ 0\n⊢ order (x ^ Nat.succ h) = Nat.succ h • order x\n[PROOFSTEP]\nrw [pow_succ', order_mul (pow_ne_zero _ hx) hx, succ_nsmul', IH]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\n⊢ ↑(single a) r * ↑(single b) s = ↑(single (a + b)) (r * s)\n[PROOFSTEP]\next x\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\n⊢ coeff (↑(single a) r * ↑(single b) s) x = coeff (↑(single (a + b)) (r * s)) x\n[PROOFSTEP]\nby_cases h : x = a + b\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\nh : x = a + b\n⊢ coeff (↑(single a) r * ↑(single b) s) x = coeff (↑(single (a + b)) (r * s)) x\n[PROOFSTEP]\nrw [h, mul_single_coeff_add]\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\nh : x = a + b\n⊢ coeff (↑(single a) r) a * s = coeff (↑(single (a + b)) (r * s)) (a + b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\nh : ¬x = a + b\n⊢ coeff (↑(single a) r * ↑(single b) s) x = coeff (↑(single (a + b)) (r * s)) x\n[PROOFSTEP]\nrw [single_coeff_of_ne h, mul_coeff, sum_eq_zero]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\nh : ¬x = a + b\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support (↑(single a) r))) (_ : Set.IsPwo (support (↑(single b) s))) x →\n      coeff (↑(single a) r) x_1.fst * coeff (↑(single b) s) x_1.snd = 0\n[PROOFSTEP]\nsimp_rw [mem_addAntidiagonal]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\nx : Γ\nh : ¬x = a + b\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1.fst ∈ support (↑(single a) r) ∧ x_1.snd ∈ support (↑(single b) s) ∧ x_1.fst + x_1.snd = x →\n      coeff (↑(single a) r) x_1.fst * coeff (↑(single b) s) x_1.snd = 0\n[PROOFSTEP]\nrintro ⟨y, z⟩ ⟨hy, hz, rfl⟩\n[GOAL]\ncase neg.mk.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\ny z : Γ\nhy : (y, z).fst ∈ support (↑(single a) r)\nhz : (y, z).snd ∈ support (↑(single b) s)\nh : ¬(y, z).fst + (y, z).snd = a + b\n⊢ coeff (↑(single a) r) (y, z).fst * coeff (↑(single b) s) (y, z).snd = 0\n[PROOFSTEP]\nrw [eq_of_mem_support_single hy, eq_of_mem_support_single hz] at h \n[GOAL]\ncase neg.mk.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonUnitalNonAssocSemiring R\na b : Γ\nr s : R\ny z : Γ\nhy : (y, z).fst ∈ support (↑(single a) r)\nhz : (y, z).snd ∈ support (↑(single b) s)\nh : ¬a + b = a + b\n⊢ coeff (↑(single a) r) (y, z).fst * coeff (↑(single b) s) (y, z).snd = 0\n[PROOFSTEP]\nexact (h rfl).elim\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nx y : R\n⊢ OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y\n[PROOFSTEP]\nrw [single_mul_single, zero_add]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nx y : R\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n          map_mul' :=\n            (_ :\n              ∀ (x y : R),\n                OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n      (x + y) =\n    OneHom.toFun\n        (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n        x +\n      OneHom.toFun\n        (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n        y\n[PROOFSTEP]\next a\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nx y : R\na : Γ\n⊢ coeff\n      (OneHom.toFun\n        (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n        (x + y))\n      a =\n    coeff\n      (OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          y)\n      a\n[PROOFSTEP]\nby_cases h : a = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nx y : R\na : Γ\nh : a = 0\n⊢ coeff\n      (OneHom.toFun\n        (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n        (x + y))\n      a =\n    coeff\n      (OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          y)\n      a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nx y : R\na : Γ\nh : ¬a = 0\n⊢ coeff\n      (OneHom.toFun\n        (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n            map_mul' :=\n              (_ :\n                ∀ (x y : R),\n                  OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n        (x + y))\n      a =\n    coeff\n      (OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          x +\n        OneHom.toFun\n          (↑{ toOneHom := { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) },\n              map_mul' :=\n                (_ :\n                  ∀ (x y : R),\n                    OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } (x * y) =\n                      OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } x *\n                        OneHom.toFun { toFun := ↑(single 0), map_one' := (_ : ↑(single 0) 1 = ↑(single 0) 1) } y) })\n          y)\n      a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\n⊢ Injective ↑C\n[PROOFSTEP]\nintro r s rs\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr s : R\nrs : ↑C r = ↑C s\n⊢ r = s\n[PROOFSTEP]\nrw [HahnSeries.ext_iff, Function.funext_iff] at rs \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr s : R\nrs : ∀ (a : Γ), coeff (↑C r) a = coeff (↑C s) a\n⊢ r = s\n[PROOFSTEP]\nhave h := rs 0\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr s : R\nrs : ∀ (a : Γ), coeff (↑C r) a = coeff (↑C s) a\nh : coeff (↑C r) 0 = coeff (↑C s) 0\n⊢ r = s\n[PROOFSTEP]\nrwa [C_apply, single_coeff_same, C_apply, single_coeff_same] at h \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\nh : r ≠ 0\n⊢ ↑C r ≠ 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\nh : ↑C r = 0\n⊢ r = 0\n[PROOFSTEP]\nrw [← C_zero] at h \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\nh : ↑C r = ↑C 0\n⊢ r = 0\n[PROOFSTEP]\nexact C_injective h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\n⊢ order (↑C r) = 0\n[PROOFSTEP]\nby_cases h : r = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\nh : r = 0\n⊢ order (↑C r) = 0\n[PROOFSTEP]\nrw [h, C_zero, order_zero]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : NonAssocSemiring R\nr : R\nh : ¬r = 0\n⊢ order (↑C r) = 0\n[PROOFSTEP]\nexact order_single h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\n⊢ embDomain f (x * y) = embDomain f x * embDomain f y\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ'\n⊢ coeff (embDomain f (x * y)) g = coeff (embDomain f x * embDomain f y) g\n[PROOFSTEP]\nby_cases hg : g ∈ Set.range f\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ'\nhg : g ∈ Set.range ↑f\n⊢ coeff (embDomain f (x * y)) g = coeff (embDomain f x * embDomain f y) g\n[PROOFSTEP]\nobtain ⟨g, rfl⟩ := hg\n[GOAL]\ncase pos.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ coeff (embDomain f (x * y)) (↑f g) = coeff (embDomain f x * embDomain f y) (↑f g)\n[PROOFSTEP]\nsimp only [mul_coeff, embDomain_coeff]\n[GOAL]\ncase pos.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g, coeff x ij.fst * coeff y ij.snd =\n    ∑ ij in addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g),\n      coeff (embDomain f x) ij.fst * coeff (embDomain f y) ij.snd\n[PROOFSTEP]\ntrans\n  ∑ ij in\n    (addAntidiagonal x.isPwo_support y.isPwo_support g).map (Function.Embedding.prodMap f.toEmbedding f.toEmbedding),\n    (embDomain f x).coeff ij.1 * (embDomain f y).coeff ij.2\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g, coeff x ij.fst * coeff y ij.snd =\n    ∑ ij in\n      Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n        (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g),\n      coeff (embDomain f x) ij.fst * coeff (embDomain f y) ij.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ ∑ ij in\n      Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n        (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g),\n      coeff (embDomain f x) ij.fst * coeff (embDomain f y) ij.snd =\n    ∑ ij in addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g),\n      coeff (embDomain f x) ij.fst * coeff (embDomain f y) ij.snd\n[PROOFSTEP]\napply sum_subset\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n      (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g) ⊆\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\n[PROOFSTEP]\nrintro ⟨i, j⟩ hij\n[GOAL]\ncase h.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\ni j : Γ'\nhij :\n  (i, j) ∈\n    Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n      (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g)\n⊢ (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\n[PROOFSTEP]\nsimp only [exists_prop, mem_map, Prod.mk.inj_iff, mem_addAntidiagonal, Function.Embedding.coe_prodMap, mem_support,\n  Prod.exists] at hij \n[GOAL]\ncase h.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\ni j : Γ'\nhij : ∃ a b, (coeff x a ≠ 0 ∧ coeff y b ≠ 0 ∧ a + b = g) ∧ Prod.map ↑f.toEmbedding ↑f.toEmbedding (a, b) = (i, j)\n⊢ (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\n[PROOFSTEP]\nobtain ⟨i, j, ⟨hx, hy, rfl⟩, rfl, rfl⟩ := hij\n[GOAL]\ncase h.mk.intro.intro.intro.intro.intro.refl\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ni j : Γ\nhx : coeff x i ≠ 0\nhy : coeff y j ≠ 0\n⊢ (↑f.toEmbedding i, ↑f.toEmbedding j) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f (i + j))\n[PROOFSTEP]\nsimp [hx, hy, hf]\n[GOAL]\ncase hf\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\n⊢ ∀ (x_1 : Γ' × Γ'),\n    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g) →\n      ¬x_1 ∈\n            Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n              (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g) →\n        coeff (embDomain f x) x_1.fst * coeff (embDomain f y) x_1.snd = 0\n[PROOFSTEP]\nrintro ⟨_, _⟩ h1 h2\n[GOAL]\ncase hf.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\nfst✝ snd✝ : Γ'\nh1 :\n  (fst✝, snd✝) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\nh2 :\n  ¬(fst✝, snd✝) ∈\n      Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n        (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g)\n⊢ coeff (embDomain f x) (fst✝, snd✝).fst * coeff (embDomain f y) (fst✝, snd✝).snd = 0\n[PROOFSTEP]\ncontrapose! h2\n[GOAL]\ncase hf.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\nfst✝ snd✝ : Γ'\nh1 :\n  (fst✝, snd✝) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\nh2 : coeff (embDomain f x) fst✝ * coeff (embDomain f y) snd✝ ≠ 0\n⊢ (fst✝, snd✝) ∈\n    Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n      (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g)\n[PROOFSTEP]\nobtain ⟨i, _, rfl⟩ := support_embDomain_subset (ne_zero_and_ne_zero_of_mul h2).1\n[GOAL]\ncase hf.mk.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ\nsnd✝ : Γ'\ni : Γ\nleft✝ : i ∈ support x\nh1 :\n  (↑f i, snd✝) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\nh2 : coeff (embDomain f x) (↑f i) * coeff (embDomain f y) snd✝ ≠ 0\n⊢ (↑f i, snd✝) ∈\n    Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n      (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g)\n[PROOFSTEP]\nobtain ⟨j, _, rfl⟩ := support_embDomain_subset (ne_zero_and_ne_zero_of_mul h2).2\n[GOAL]\ncase hf.mk.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng i : Γ\nleft✝¹ : i ∈ support x\nj : Γ\nleft✝ : j ∈ support y\nh1 :\n  (↑f i, ↑f j) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\nh2 : coeff (embDomain f x) (↑f i) * coeff (embDomain f y) (↑f j) ≠ 0\n⊢ (↑f i, ↑f j) ∈\n    Finset.map (Embedding.prodMap f.toEmbedding f.toEmbedding)\n      (addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support y)) g)\n[PROOFSTEP]\nsimp only [exists_prop, mem_map, Prod.mk.inj_iff, mem_addAntidiagonal, Function.Embedding.coe_prodMap, mem_support,\n  Prod.exists]\n[GOAL]\ncase hf.mk.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng i : Γ\nleft✝¹ : i ∈ support x\nj : Γ\nleft✝ : j ∈ support y\nh1 :\n  (↑f i, ↑f j) ∈\n    addAntidiagonal (_ : Set.IsPwo (support (embDomain f x))) (_ : Set.IsPwo (support (embDomain f y))) (↑f g)\nh2 : coeff (embDomain f x) (↑f i) * coeff (embDomain f y) (↑f j) ≠ 0\n⊢ ∃ a b, (coeff x a ≠ 0 ∧ coeff y b ≠ 0 ∧ a + b = g) ∧ Prod.map ↑f.toEmbedding ↑f.toEmbedding (a, b) = (↑f i, ↑f j)\n[PROOFSTEP]\nsimp only [mem_addAntidiagonal, embDomain_coeff, mem_support, ← hf, OrderEmbedding.eq_iff_eq] at h1 \n[GOAL]\ncase hf.mk.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng i : Γ\nleft✝¹ : i ∈ support x\nj : Γ\nleft✝ : j ∈ support y\nh2 : coeff (embDomain f x) (↑f i) * coeff (embDomain f y) (↑f j) ≠ 0\nh1 : coeff x i ≠ 0 ∧ coeff y j ≠ 0 ∧ i + j = g\n⊢ ∃ a b, (coeff x a ≠ 0 ∧ coeff y b ≠ 0 ∧ a + b = g) ∧ Prod.map ↑f.toEmbedding ↑f.toEmbedding (a, b) = (↑f i, ↑f j)\n[PROOFSTEP]\nexact ⟨i, j, h1, rfl⟩\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ'\nhg : ¬g ∈ Set.range ↑f\n⊢ coeff (embDomain f (x * y)) g = coeff (embDomain f x * embDomain f y) g\n[PROOFSTEP]\nrw [embDomain_notin_range hg, eq_comm]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ'\nhg : ¬g ∈ Set.range ↑f\n⊢ coeff (embDomain f x * embDomain f y) g = 0\n[PROOFSTEP]\ncontrapose! hg\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ng : Γ'\nhg : coeff (embDomain f x * embDomain f y) g ≠ 0\n⊢ g ∈ Set.range ↑f\n[PROOFSTEP]\nobtain ⟨_, _, hi, hj, rfl⟩ := support_mul_subset_add_support ((mem_support _ _).2 hg)\n[GOAL]\ncase neg.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\nw✝¹ w✝ : Γ'\nhi : w✝¹ ∈ support (embDomain f x)\nhj : w✝ ∈ support (embDomain f y)\nhg : coeff (embDomain f x * embDomain f y) ((fun x x_1 => x + x_1) w✝¹ w✝) ≠ 0\n⊢ (fun x x_1 => x + x_1) w✝¹ w✝ ∈ Set.range ↑f\n[PROOFSTEP]\nobtain ⟨i, _, rfl⟩ := support_embDomain_subset hi\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\nw✝ : Γ'\nhj : w✝ ∈ support (embDomain f y)\ni : Γ\nleft✝ : i ∈ support x\nhi : ↑f i ∈ support (embDomain f x)\nhg : coeff (embDomain f x * embDomain f y) ((fun x x_1 => x + x_1) (↑f i) w✝) ≠ 0\n⊢ (fun x x_1 => x + x_1) (↑f i) w✝ ∈ Set.range ↑f\n[PROOFSTEP]\nobtain ⟨j, _, rfl⟩ := support_embDomain_subset hj\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonUnitalNonAssocSemiring R\nf : Γ ↪o Γ'\nhf : ∀ (x y : Γ), ↑f (x + y) = ↑f x + ↑f y\nx y : HahnSeries Γ R\ni : Γ\nleft✝¹ : i ∈ support x\nhi : ↑f i ∈ support (embDomain f x)\nj : Γ\nleft✝ : j ∈ support y\nhj : ↑f j ∈ support (embDomain f y)\nhg : coeff (embDomain f x * embDomain f y) ((fun x x_1 => x + x_1) (↑f i) (↑f j)) ≠ 0\n⊢ (fun x x_1 => x + x_1) (↑f i) (↑f j) ∈ Set.range ↑f\n[PROOFSTEP]\nrefine' ⟨i + j, hf i j⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\nΓ' : Type u_3\ninst✝¹ : OrderedCancelAddCommMonoid Γ'\ninst✝ : NonAssocSemiring R\nf : Γ →+ Γ'\nhfi : Injective ↑f\nhf : ∀ (g g' : Γ), ↑f g ≤ ↑f g' ↔ g ≤ g'\nr : R\n⊢ ↑(single (↑{ toEmbedding := { toFun := ↑f, inj' := hfi }, map_rel_iff' := (_ : ∀ {a b : Γ}, ↑f a ≤ ↑f b ↔ a ≤ b) } 0))\n      r =\n    ↑C r\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : (fun x => HahnSeries Γ A) r\n⊢ ↑(RingHom.comp C (algebraMap R A)) r * x = x * ↑(RingHom.comp C (algebraMap R A)) r\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : (fun x => HahnSeries Γ A) r\nx✝ : Γ\n⊢ coeff (↑(RingHom.comp C (algebraMap R A)) r * x) x✝ = coeff (x * ↑(RingHom.comp C (algebraMap R A)) r) x✝\n[PROOFSTEP]\nsimp only [smul_coeff, single_zero_mul_eq_smul, RingHom.coe_comp, RingHom.toFun_eq_coe, C_apply, Function.comp_apply,\n  algebraMap_smul, mul_single_zero_coeff]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : (fun x => HahnSeries Γ A) r\nx✝ : Γ\n⊢ r • coeff x x✝ = coeff x x✝ * ↑(algebraMap R A) r\n[PROOFSTEP]\nrw [← Algebra.commutes, Algebra.smul_def]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : (fun x => HahnSeries Γ A) r\n⊢ r • x = ↑(RingHom.comp C (algebraMap R A)) r * x\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝³ : OrderedCancelAddCommMonoid Γ\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nr : R\nx : (fun x => HahnSeries Γ A) r\nx✝ : Γ\n⊢ coeff (r • x) x✝ = coeff (↑(RingHom.comp C (algebraMap R A)) r * x) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\n⊢ ⊥ ≠ ⊤\n[PROOFSTEP]\nrw [Ne.def, SetLike.ext_iff, not_forall]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\n⊢ ∃ x, ¬(x ∈ ⊥ ↔ x ∈ ⊤)\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := exists_ne (0 : Γ)\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\n⊢ ∃ x, ¬(x ∈ ⊥ ↔ x ∈ ⊤)\n[PROOFSTEP]\nrefine' ⟨single a 1, _⟩\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\n⊢ ¬(↑(single a) 1 ∈ ⊥ ↔ ↑(single a) 1 ∈ ⊤)\n[PROOFSTEP]\nsimp only [Algebra.mem_bot, not_exists, Set.mem_range, iff_true_iff, Algebra.mem_top]\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\n⊢ ∀ (x : R), ¬↑(algebraMap R (HahnSeries Γ R)) x = ↑(single a) 1\n[PROOFSTEP]\nintro x\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\nx : R\n⊢ ¬↑(algebraMap R (HahnSeries Γ R)) x = ↑(single a) 1\n[PROOFSTEP]\nrw [HahnSeries.ext_iff, Function.funext_iff, not_forall]\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\nx : R\n⊢ ∃ x_1, ¬coeff (↑(algebraMap R (HahnSeries Γ R)) x) x_1 = coeff (↑(single a) 1) x_1\n[PROOFSTEP]\nrefine' ⟨a, _⟩\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\nx : R\n⊢ ¬coeff (↑(algebraMap R (HahnSeries Γ R)) x) a = coeff (↑(single a) 1) a\n[PROOFSTEP]\nrw [single_coeff_same, algebraMap_apply, C_apply, single_coeff_of_ne ha]\n[GOAL]\ncase intro\nΓ : Type u_1\nR : Type u_2\ninst✝⁵ : OrderedCancelAddCommMonoid Γ\ninst✝⁴ : CommSemiring R\nA : Type u_3\ninst✝³ : Semiring A\ninst✝² : Algebra R A\ninst✝¹ : Nontrivial Γ\ninst✝ : Nontrivial R\na : Γ\nha : a ≠ 0\nx : R\n⊢ ¬0 = 1\n[PROOFSTEP]\nexact zero_ne_one\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf : HahnSeries ℕ R\n⊢ (fun f =>\n        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n      ((fun f => PowerSeries.mk f.coeff) f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf : HahnSeries ℕ R\nx✝ : ℕ\n⊢ coeff\n      ((fun f =>\n          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n        ((fun f => PowerSeries.mk f.coeff) f))\n      x✝ =\n    coeff f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf : PowerSeries R\n⊢ (fun f => PowerSeries.mk f.coeff)\n      ((fun f =>\n          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n        f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf : PowerSeries R\nn✝ : ℕ\n⊢ ↑(PowerSeries.coeff R n✝)\n      ((fun f => PowerSeries.mk f.coeff)\n        ((fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n          f)) =\n    ↑(PowerSeries.coeff R n✝) f\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\n⊢ Equiv.toFun\n      { toFun := fun f => PowerSeries.mk f.coeff,\n        invFun := fun f =>\n          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n        left_inv :=\n          (_ :\n            ∀ (f : HahnSeries ℕ R),\n              (fun f =>\n                    { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                      isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                  ((fun f => PowerSeries.mk f.coeff) f) =\n                f),\n        right_inv :=\n          (_ :\n            ∀ (f : PowerSeries R),\n              (fun f => PowerSeries.mk f.coeff)\n                  ((fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    f) =\n                f) }\n      (f * g) =\n    Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        f *\n      Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        g\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\n⊢ ↑(PowerSeries.coeff R n)\n      (Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        (f * g)) =\n    ↑(PowerSeries.coeff R n)\n      (Equiv.toFun\n          { toFun := fun f => PowerSeries.mk f.coeff,\n            invFun := fun f =>\n              { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries ℕ R),\n                  (fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      ((fun f => PowerSeries.mk f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : PowerSeries R),\n                  (fun f => PowerSeries.mk f.coeff)\n                      ((fun f =>\n                          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                        f) =\n                    f) }\n          f *\n        Equiv.toFun\n          { toFun := fun f => PowerSeries.mk f.coeff,\n            invFun := fun f =>\n              { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries ℕ R),\n                  (fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      ((fun f => PowerSeries.mk f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : PowerSeries R),\n                  (fun f => PowerSeries.mk f.coeff)\n                      ((fun f =>\n                          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                        f) =\n                    f) }\n          g)\n[PROOFSTEP]\nsimp only [PowerSeries.coeff_mul, PowerSeries.coeff_mk, mul_coeff, isPwo_support]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n, coeff f ij.fst * coeff g ij.snd =\n    ∑ x in Nat.antidiagonal n, coeff f x.fst * coeff g x.snd\n[PROOFSTEP]\nclassical\nrefine' sum_filter_ne_zero.symm.trans ((sum_congr _ fun _ _ => rfl).trans sum_filter_ne_zero)\next m\nsimp only [Nat.mem_antidiagonal, mem_addAntidiagonal, and_congr_left_iff, mem_filter, mem_support]\nrintro h\nrw [and_iff_right (left_ne_zero_of_mul h), and_iff_right (right_ne_zero_of_mul h)]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n, coeff f ij.fst * coeff g ij.snd =\n    ∑ x in Nat.antidiagonal n, coeff f x.fst * coeff g x.snd\n[PROOFSTEP]\nrefine' sum_filter_ne_zero.symm.trans ((sum_congr _ fun _ _ => rfl).trans sum_filter_ne_zero)\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\n⊢ filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0)\n      (addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n) =\n    filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0) (Nat.antidiagonal n)\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\nm : ℕ × ℕ\n⊢ m ∈\n      filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0)\n        (addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n) ↔\n    m ∈ filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0) (Nat.antidiagonal n)\n[PROOFSTEP]\nsimp only [Nat.mem_antidiagonal, mem_addAntidiagonal, and_congr_left_iff, mem_filter, mem_support]\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\nm : ℕ × ℕ\n⊢ coeff f m.fst * coeff g m.snd ≠ 0 → (coeff f m.fst ≠ 0 ∧ coeff g m.snd ≠ 0 ∧ m.fst + m.snd = n ↔ m.fst + m.snd = n)\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn : ℕ\nm : ℕ × ℕ\nh : coeff f m.fst * coeff g m.snd ≠ 0\n⊢ coeff f m.fst ≠ 0 ∧ coeff g m.snd ≠ 0 ∧ m.fst + m.snd = n ↔ m.fst + m.snd = n\n[PROOFSTEP]\nrw [and_iff_right (left_ne_zero_of_mul h), and_iff_right (right_ne_zero_of_mul h)]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\n⊢ Equiv.toFun\n      { toFun := fun f => PowerSeries.mk f.coeff,\n        invFun := fun f =>\n          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n        left_inv :=\n          (_ :\n            ∀ (f : HahnSeries ℕ R),\n              (fun f =>\n                    { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                      isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                  ((fun f => PowerSeries.mk f.coeff) f) =\n                f),\n        right_inv :=\n          (_ :\n            ∀ (f : PowerSeries R),\n              (fun f => PowerSeries.mk f.coeff)\n                  ((fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    f) =\n                f) }\n      (f + g) =\n    Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        f +\n      Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝ : Semiring R\nf g : HahnSeries ℕ R\nn✝ : ℕ\n⊢ ↑(PowerSeries.coeff R n✝)\n      (Equiv.toFun\n        { toFun := fun f => PowerSeries.mk f.coeff,\n          invFun := fun f =>\n            { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n              isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries ℕ R),\n                (fun f =>\n                      { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                        isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                    ((fun f => PowerSeries.mk f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : PowerSeries R),\n                (fun f => PowerSeries.mk f.coeff)\n                    ((fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      f) =\n                  f) }\n        (f + g)) =\n    ↑(PowerSeries.coeff R n✝)\n      (Equiv.toFun\n          { toFun := fun f => PowerSeries.mk f.coeff,\n            invFun := fun f =>\n              { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries ℕ R),\n                  (fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      ((fun f => PowerSeries.mk f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : PowerSeries R),\n                  (fun f => PowerSeries.mk f.coeff)\n                      ((fun f =>\n                          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                        f) =\n                    f) }\n          f +\n        Equiv.toFun\n          { toFun := fun f => PowerSeries.mk f.coeff,\n            invFun := fun f =>\n              { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries ℕ R),\n                  (fun f =>\n                        { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                          isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                      ((fun f => PowerSeries.mk f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : PowerSeries R),\n                  (fun f => PowerSeries.mk f.coeff)\n                      ((fun f =>\n                          { coeff := fun n => ↑(PowerSeries.coeff R n) f,\n                            isPwo_support' := (_ : Set.IsPwo (Function.support fun n => ↑(PowerSeries.coeff R n) f)) })\n                        f) =\n                    f) }\n          g)\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nx : PowerSeries R\n⊢ ∀ {a b : ℕ},\n    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n        ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n      a ≤ b\n[PROOFSTEP]\nsimp only [Function.Embedding.coeFn_mk]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nx : PowerSeries R\n⊢ ∀ {a b : ℕ}, ↑a ≤ ↑b ↔ a ≤ b\n[PROOFSTEP]\nexact Nat.cast_le\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nx : PowerSeries R\nn : ℕ\n⊢ coeff (↑(ofPowerSeries Γ R) x) ↑n = ↑(PowerSeries.coeff R n) x\n[PROOFSTEP]\nsimp [ofPowerSeries_apply]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\n⊢ ↑(ofPowerSeries Γ R) (↑(PowerSeries.C R) r) = ↑C r\n[PROOFSTEP]\next n\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\n⊢ coeff (↑(ofPowerSeries Γ R) (↑(PowerSeries.C R) r)) n = coeff (↑C r) n\n[PROOFSTEP]\nsimp only [ofPowerSeries_apply, C, RingHom.coe_mk, MonoidHom.coe_mk, OneHom.coe_mk, ne_eq, single_coeff]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))\n      n =\n    if n = 0 then r else 0\n[PROOFSTEP]\nsplit_ifs with hn\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\nhn : n = 0\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))\n      n =\n    r\n[PROOFSTEP]\nsubst hn\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))\n      0 =\n    r\n[PROOFSTEP]\nconvert @embDomain_coeff ℕ R _ _ Γ _ _ _ 0\n[GOAL]\ncase h.e'_2.h.e'_6\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\n⊢ 0 =\n    ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n      0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\n⊢ r = coeff (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)) 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\nhn : ¬n = 0\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r)))\n      n =\n    0\n[PROOFSTEP]\nrw [embDomain_notin_image_support]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\nhn : ¬n = 0\n⊢ ¬n ∈\n      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : ℕ},\n                  ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                    a ≤ b) } ''\n        support (↑(RingEquiv.symm toPowerSeries) (↑(PowerSeries.C R) r))\n[PROOFSTEP]\nsimp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support, PowerSeries.coeff_C]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\nhn : ¬n = 0\n⊢ ∀ (x : ℕ),\n    ¬((if x = 0 then r else 0) ≠ 0 ∧\n        ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n                map_rel_iff' :=\n                  (_ :\n                    ∀ {a b : ℕ},\n                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                          ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                        a ≤ b) }\n            x =\n          n)\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nr : R\nn : Γ\nhn : ¬n = 0\nx✝ : ℕ\n⊢ ¬((if x✝ = 0 then r else 0) ≠ 0 ∧\n      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n              map_rel_iff' :=\n                (_ :\n                  ∀ {a b : ℕ},\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                        ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                      a ≤ b) }\n          x✝ =\n        n)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Ne.symm hn]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\n⊢ ↑(ofPowerSeries Γ R) PowerSeries.X = ↑(single 1) 1\n[PROOFSTEP]\next n\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\n⊢ coeff (↑(ofPowerSeries Γ R) PowerSeries.X) n = coeff (↑(single 1) 1) n\n[PROOFSTEP]\nsimp only [single_coeff, ofPowerSeries_apply, RingHom.coe_mk]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) PowerSeries.X))\n      n =\n    if n = 1 then 1 else 0\n[PROOFSTEP]\nsplit_ifs with hn\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : n = 1\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) PowerSeries.X))\n      n =\n    1\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : n = 1\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) PowerSeries.X))\n      1 =\n    1\n[PROOFSTEP]\nconvert @embDomain_coeff ℕ R _ _ Γ _ _ _ 1\n[GOAL]\ncase h.e'_2.h.e'_6\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : n = 1\n⊢ 1 =\n    ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n      1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : n = 1\n⊢ 1 = coeff (↑(RingEquiv.symm toPowerSeries) PowerSeries.X) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : ¬n = 1\n⊢ coeff\n      (embDomain\n        { toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : ℕ},\n                ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                  a ≤ b) }\n        (↑(RingEquiv.symm toPowerSeries) PowerSeries.X))\n      n =\n    0\n[PROOFSTEP]\nrw [embDomain_notin_image_support]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : ¬n = 1\n⊢ ¬n ∈\n      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : ℕ},\n                  ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                    a ≤ b) } ''\n        support (↑(RingEquiv.symm toPowerSeries) PowerSeries.X)\n[PROOFSTEP]\nsimp only [not_exists, Set.mem_image, toPowerSeries_symm_apply_coeff, mem_support, PowerSeries.coeff_X]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : ¬n = 1\n⊢ ∀ (x : ℕ),\n    ¬((if x = 1 then 1 else 0) ≠ 0 ∧\n        ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n                map_rel_iff' :=\n                  (_ :\n                    ∀ {a b : ℕ},\n                      ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                          ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                        a ≤ b) }\n            x =\n          n)\n[PROOFSTEP]\nintro\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : Semiring R\ninst✝ : StrictOrderedSemiring Γ\nn : Γ\nhn : ¬n = 1\nx✝ : ℕ\n⊢ ¬((if x✝ = 1 then 1 else 0) ≠ 0 ∧\n      ↑{ toEmbedding := { toFun := Nat.cast, inj' := (_ : Injective Nat.cast) },\n              map_rel_iff' :=\n                (_ :\n                  ∀ {a b : ℕ},\n                    ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } a ≤\n                        ↑{ toFun := Nat.cast, inj' := (_ : Injective Nat.cast) } b ↔\n                      a ≤ b) }\n          x✝ =\n        n)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [Ne.symm hn]\n[GOAL]\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring R✝\ninst✝¹ : StrictOrderedSemiring Γ\nR : Type u_3\ninst✝ : CommSemiring R\nn : ℕ\n⊢ ↑(ofPowerSeries Γ R) (PowerSeries.X ^ n) = ↑(single ↑n) 1\n[PROOFSTEP]\nrw [RingHom.map_pow]\n[GOAL]\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring R✝\ninst✝¹ : StrictOrderedSemiring Γ\nR : Type u_3\ninst✝ : CommSemiring R\nn : ℕ\n⊢ ↑(ofPowerSeries Γ R) PowerSeries.X ^ n = ↑(single ↑n) 1\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring R✝\ninst✝¹ : StrictOrderedSemiring Γ\nR : Type u_3\ninst✝ : CommSemiring R\n⊢ ↑(ofPowerSeries Γ R) PowerSeries.X ^ Nat.zero = ↑(single ↑Nat.zero) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring R✝\ninst✝¹ : StrictOrderedSemiring Γ\nR : Type u_3\ninst✝ : CommSemiring R\n⊢ 1 = ↑(single 0) 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : Semiring R✝\ninst✝¹ : StrictOrderedSemiring Γ\nR : Type u_3\ninst✝ : CommSemiring R\nn : ℕ\nih : ↑(ofPowerSeries Γ R) PowerSeries.X ^ n = ↑(single ↑n) 1\n⊢ ↑(ofPowerSeries Γ R) PowerSeries.X ^ Nat.succ n = ↑(single ↑(Nat.succ n)) 1\n[PROOFSTEP]\nrw [pow_succ, pow_succ, ih, ofPowerSeries_X, mul_comm, single_mul_single, one_mul, Nat.cast_succ, add_comm]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf : HahnSeries (σ →₀ ℕ) R\n⊢ (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) ((fun f => f.coeff) f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf : HahnSeries (σ →₀ ℕ) R\nx✝ : σ →₀ ℕ\n⊢ coeff ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) ((fun f => f.coeff) f)) x✝ =\n    coeff f x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf : MvPowerSeries σ R\n⊢ (fun f => f.coeff) ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf : MvPowerSeries σ R\nn✝ : σ →₀ ℕ\n⊢ ↑(MvPowerSeries.coeff R n✝)\n      ((fun f => f.coeff) ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f)) =\n    ↑(MvPowerSeries.coeff R n✝) f\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\n⊢ Equiv.toFun\n      { toFun := fun f => f.coeff,\n        invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n        left_inv :=\n          (_ :\n            ∀ (f : HahnSeries (σ →₀ ℕ) R),\n              (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) ((fun f => f.coeff) f) =\n                f),\n        right_inv :=\n          (_ :\n            ∀ (f : MvPowerSeries σ R),\n              (fun f => f.coeff) ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                f) }\n      (f * g) =\n    Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        f *\n      Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        g\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ ↑(MvPowerSeries.coeff R n)\n      (Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        (f * g)) =\n    ↑(MvPowerSeries.coeff R n)\n      (Equiv.toFun\n          { toFun := fun f => f.coeff,\n            invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                  (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                      ((fun f => f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : MvPowerSeries σ R),\n                  (fun f => f.coeff)\n                      ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                    f) }\n          f *\n        Equiv.toFun\n          { toFun := fun f => f.coeff,\n            invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                  (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                      ((fun f => f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : MvPowerSeries σ R),\n                  (fun f => f.coeff)\n                      ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                    f) }\n          g)\n[PROOFSTEP]\nsimp only [MvPowerSeries.coeff_mul]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ ↑(MvPowerSeries.coeff R n) (f * g).coeff =\n    ∑ x in Finsupp.antidiagonal n, ↑(MvPowerSeries.coeff R x.fst) f.coeff * ↑(MvPowerSeries.coeff R x.snd) g.coeff\n[PROOFSTEP]\nclassical\nchange (f * g).coeff n = _\nsimp_rw [mul_coeff]\nrefine' sum_filter_ne_zero.symm.trans ((sum_congr _ fun _ _ => rfl).trans sum_filter_ne_zero)\next m\nsimp only [and_congr_left_iff, mem_addAntidiagonal, mem_filter, mem_support, Finsupp.mem_antidiagonal]\nrintro h\nrw [and_iff_right (left_ne_zero_of_mul h), and_iff_right (right_ne_zero_of_mul h)]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ ↑(MvPowerSeries.coeff R n) (f * g).coeff =\n    ∑ x in Finsupp.antidiagonal n, ↑(MvPowerSeries.coeff R x.fst) f.coeff * ↑(MvPowerSeries.coeff R x.snd) g.coeff\n[PROOFSTEP]\nchange (f * g).coeff n = _\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ coeff (f * g) n =\n    ∑ x in Finsupp.antidiagonal n, ↑(MvPowerSeries.coeff R x.fst) f.coeff * ↑(MvPowerSeries.coeff R x.snd) g.coeff\n[PROOFSTEP]\nsimp_rw [mul_coeff]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n, coeff f ij.fst * coeff g ij.snd =\n    ∑ x in Finsupp.antidiagonal n, ↑(MvPowerSeries.coeff R x.fst) f.coeff * ↑(MvPowerSeries.coeff R x.snd) g.coeff\n[PROOFSTEP]\nrefine' sum_filter_ne_zero.symm.trans ((sum_congr _ fun _ _ => rfl).trans sum_filter_ne_zero)\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\n⊢ filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0)\n      (addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n) =\n    filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0) (Finsupp.antidiagonal n)\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\nm : (σ →₀ ℕ) × (σ →₀ ℕ)\n⊢ m ∈\n      filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0)\n        (addAntidiagonal (_ : Set.IsPwo (support f)) (_ : Set.IsPwo (support g)) n) ↔\n    m ∈ filter (fun x => coeff f x.fst * coeff g x.snd ≠ 0) (Finsupp.antidiagonal n)\n[PROOFSTEP]\nsimp only [and_congr_left_iff, mem_addAntidiagonal, mem_filter, mem_support, Finsupp.mem_antidiagonal]\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\nm : (σ →₀ ℕ) × (σ →₀ ℕ)\n⊢ coeff f m.fst * coeff g m.snd ≠ 0 → (coeff f m.fst ≠ 0 ∧ coeff g m.snd ≠ 0 ∧ m.fst + m.snd = n ↔ m.fst + m.snd = n)\n[PROOFSTEP]\nrintro h\n[GOAL]\ncase h.a\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn : σ →₀ ℕ\nm : (σ →₀ ℕ) × (σ →₀ ℕ)\nh : coeff f m.fst * coeff g m.snd ≠ 0\n⊢ coeff f m.fst ≠ 0 ∧ coeff g m.snd ≠ 0 ∧ m.fst + m.snd = n ↔ m.fst + m.snd = n\n[PROOFSTEP]\nrw [and_iff_right (left_ne_zero_of_mul h), and_iff_right (right_ne_zero_of_mul h)]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\n⊢ Equiv.toFun\n      { toFun := fun f => f.coeff,\n        invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n        left_inv :=\n          (_ :\n            ∀ (f : HahnSeries (σ →₀ ℕ) R),\n              (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) ((fun f => f.coeff) f) =\n                f),\n        right_inv :=\n          (_ :\n            ∀ (f : MvPowerSeries σ R),\n              (fun f => f.coeff) ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                f) }\n      (f + g) =\n    Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        f +\n      Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : Semiring R\ninst✝¹ : StrictOrderedSemiring Γ\nσ : Type u_3\ninst✝ : Fintype σ\nf g : HahnSeries (σ →₀ ℕ) R\nn✝ : σ →₀ ℕ\n⊢ ↑(MvPowerSeries.coeff R n✝)\n      (Equiv.toFun\n        { toFun := fun f => f.coeff,\n          invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n          left_inv :=\n            (_ :\n              ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                    ((fun f => f.coeff) f) =\n                  f),\n          right_inv :=\n            (_ :\n              ∀ (f : MvPowerSeries σ R),\n                (fun f => f.coeff)\n                    ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                  f) }\n        (f + g)) =\n    ↑(MvPowerSeries.coeff R n✝)\n      (Equiv.toFun\n          { toFun := fun f => f.coeff,\n            invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                  (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                      ((fun f => f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : MvPowerSeries σ R),\n                  (fun f => f.coeff)\n                      ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                    f) }\n          f +\n        Equiv.toFun\n          { toFun := fun f => f.coeff,\n            invFun := fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) },\n            left_inv :=\n              (_ :\n                ∀ (f : HahnSeries (σ →₀ ℕ) R),\n                  (fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) })\n                      ((fun f => f.coeff) f) =\n                    f),\n            right_inv :=\n              (_ :\n                ∀ (f : MvPowerSeries σ R),\n                  (fun f => f.coeff)\n                      ((fun f => { coeff := f, isPwo_support' := (_ : Set.IsPwo (Function.support f)) }) f) =\n                    f) }\n          g)\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\n⊢ Equiv.toFun src✝.toEquiv (↑(algebraMap R (HahnSeries ℕ A)) r) = ↑(algebraMap R (PowerSeries A)) r\n[PROOFSTEP]\next n\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\nn : ℕ\n⊢ ↑(PowerSeries.coeff A n) (Equiv.toFun src✝.toEquiv (↑(algebraMap R (HahnSeries ℕ A)) r)) =\n    ↑(PowerSeries.coeff A n) (↑(algebraMap R (PowerSeries A)) r)\n[PROOFSTEP]\nsimp only [algebraMap_apply, PowerSeries.algebraMap_apply, C_apply, coeff_toPowerSeries]\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\nn : ℕ\n⊢ ↑(PowerSeries.coeff A n) (Equiv.toFun toPowerSeries.toEquiv (↑(single 0) (↑(algebraMap R A) r))) =\n    ↑(PowerSeries.coeff A n) (↑(PowerSeries.C A) (↑(algebraMap R A) r))\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase h.zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\n⊢ ↑(PowerSeries.coeff A Nat.zero) (Equiv.toFun toPowerSeries.toEquiv (↑(single 0) (↑(algebraMap R A) r))) =\n    ↑(PowerSeries.coeff A Nat.zero) (↑(PowerSeries.C A) (↑(algebraMap R A) r))\n[PROOFSTEP]\nsimp [PowerSeries.coeff_zero_eq_constantCoeff, single_coeff_same]\n[GOAL]\ncase h.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\nn : ℕ\n⊢ ↑(PowerSeries.coeff A (Nat.succ n)) (Equiv.toFun toPowerSeries.toEquiv (↑(single 0) (↑(algebraMap R A) r))) =\n    ↑(PowerSeries.coeff A (Nat.succ n)) (↑(PowerSeries.C A) (↑(algebraMap R A) r))\n[PROOFSTEP]\nsimp [n.succ_ne_zero, Ne.def, not_false_iff, single_coeff_of_ne]\n[GOAL]\ncase h.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : CommSemiring R\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\nsrc✝ : HahnSeries ℕ A ≃+* PowerSeries A := toPowerSeries\nr : R\nn : ℕ\n⊢ 0 = ↑(PowerSeries.coeff A (Nat.succ n)) (↑(PowerSeries.C A) (↑(algebraMap R A) r))\n[PROOFSTEP]\nrw [PowerSeries.coeff_C, if_neg n.succ_ne_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\n⊢ ↑(order 1) = 0\n[PROOFSTEP]\nsimp [order_of_ne]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : x = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : x = 0\nhy : y = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : x = 0\nhy : ¬y = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : y = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nsimp [hx, hy]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min ((fun x => if x = 0 then ⊤ else ↑(order x)) x) ((fun x => if x = 0 then ⊤ else ↑(order x)) y) ≤\n    (fun x => if x = 0 then ⊤ else ↑(order x)) (x + y)\n[PROOFSTEP]\nsimp only [hx, hy, support_nonempty_iff, if_neg, not_false_iff, isWf_support]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ min ↑(order x) ↑(order y) ≤ if x + y = 0 then ⊤ else ↑(order (x + y))\n[PROOFSTEP]\nby_cases hxy : x + y = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\nhxy : x + y = 0\n⊢ min ↑(order x) ↑(order y) ≤ if x + y = 0 then ⊤ else ↑(order (x + y))\n[PROOFSTEP]\nsimp [hxy]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\nhxy : ¬x + y = 0\n⊢ min ↑(order x) ↑(order y) ≤ if x + y = 0 then ⊤ else ↑(order (x + y))\n[PROOFSTEP]\nrw [if_neg hxy, ← WithTop.coe_min, WithTop.coe_le_coe]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\nhxy : ¬x + y = 0\n⊢ min (order x) (order y) ≤ order (x + y)\n[PROOFSTEP]\nexact min_order_le_order_add hxy\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\n⊢ (fun x => if x = 0 then ⊤ else ↑(order x)) (x * y) =\n    (fun x => if x = 0 then ⊤ else ↑(order x)) x + (fun x => if x = 0 then ⊤ else ↑(order x)) y\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : x = 0\n⊢ (fun x => if x = 0 then ⊤ else ↑(order x)) (x * y) =\n    (fun x => if x = 0 then ⊤ else ↑(order x)) x + (fun x => if x = 0 then ⊤ else ↑(order x)) y\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\n⊢ (fun x => if x = 0 then ⊤ else ↑(order x)) (x * y) =\n    (fun x => if x = 0 then ⊤ else ↑(order x)) x + (fun x => if x = 0 then ⊤ else ↑(order x)) y\n[PROOFSTEP]\nby_cases hy : y = 0\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : y = 0\n⊢ (fun x => if x = 0 then ⊤ else ↑(order x)) (x * y) =\n    (fun x => if x = 0 then ⊤ else ↑(order x)) x + (fun x => if x = 0 then ⊤ else ↑(order x)) y\n[PROOFSTEP]\nsimp [hy]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ (fun x => if x = 0 then ⊤ else ↑(order x)) (x * y) =\n    (fun x => if x = 0 then ⊤ else ↑(order x)) x + (fun x => if x = 0 then ⊤ else ↑(order x)) y\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx y : HahnSeries Γ R\nhx : ¬x = 0\nhy : ¬y = 0\n⊢ (if x * y = 0 then ⊤ else ↑(order (x * y))) = (if x = 0 then ⊤ else ↑(order x)) + if y = 0 then ⊤ else ↑(order y)\n[PROOFSTEP]\nrw [if_neg hx, if_neg hy, if_neg (mul_ne_zero hx hy), ← WithTop.coe_add, WithTop.coe_eq_coe, order_mul hx hy]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\ng : Γ\nh : coeff x g ≠ 0\n⊢ ↑(addVal Γ R) x ≤ ↑g\n[PROOFSTEP]\nrw [addVal_apply_of_ne (ne_zero_of_coeff_ne_zero h), WithTop.coe_le_coe]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\ng : Γ\nh : coeff x g ≠ 0\n⊢ order x ≤ g\n[PROOFSTEP]\nexact order_le_of_coeff_ne_zero h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\n[PROOFSTEP]\napply (x.isWf_support.isPwo.addSubmonoid_closure _).mono _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ∀ (x_1 : Γ), x_1 ∈ support x → 0 ≤ x_1\n[PROOFSTEP]\nexact fun g hg => WithTop.coe_le_coe.1 (le_trans (le_of_lt hx) (addVal_le_of_coeff_ne_zero hg))\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ⋃ (n : ℕ), support (x ^ n) ⊆ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nrefine' Set.iUnion_subset fun n => _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\n⊢ support (x ^ n) ⊆ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ support (x ^ Nat.zero) ⊆ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nintro g hn\n[GOAL]\ncase succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\nih : support (x ^ n) ⊆ ↑(AddSubmonoid.closure (support x))\n⊢ support (x ^ Nat.succ n) ⊆ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nintro g hn\n[GOAL]\ncase zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhn : g ∈ support (x ^ Nat.zero)\n⊢ g ∈ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nsimp only [Nat.zero_eq, pow_zero, support_one, Set.mem_singleton_iff] at hn \n[GOAL]\ncase zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhn : g = 0\n⊢ g ∈ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nrw [hn, SetLike.mem_coe]\n[GOAL]\ncase zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhn : g = 0\n⊢ 0 ∈ AddSubmonoid.closure (support x)\n[PROOFSTEP]\nexact AddSubmonoid.zero_mem _\n[GOAL]\ncase succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\nih : support (x ^ n) ⊆ ↑(AddSubmonoid.closure (support x))\ng : Γ\nhn : g ∈ support (x ^ Nat.succ n)\n⊢ g ∈ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nobtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support hn\n[GOAL]\ncase succ.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : Ring R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\nih : support (x ^ n) ⊆ ↑(AddSubmonoid.closure (support x))\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (npowRec n x)\nhn : (fun x x_1 => x + x_1) i j ∈ support (x ^ Nat.succ n)\n⊢ (fun x x_1 => x + x_1) i j ∈ ↑(AddSubmonoid.closure (support x))\n[PROOFSTEP]\nexact SetLike.mem_coe.2 (AddSubmonoid.add_mem _ (AddSubmonoid.subset_closure hi) (ih hj))\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\n⊢ ⋃ (a : α), support ((↑x + ↑y) a) ⊆ (⋃ (a : α), support (↑x a)) ∪ ⋃ (a : α), support (↑y a)\n[PROOFSTEP]\nrw [← Set.iUnion_union_distrib]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\n⊢ ⋃ (a : α), support ((↑x + ↑y) a) ⊆ ⋃ (i : α), support (↑x i) ∪ support (↑y i)\n[PROOFSTEP]\nexact Set.iUnion_mono fun a => support_add_subset\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\ng : Γ\n⊢ {a | coeff ((↑x + ↑y) a) g ≠ 0} ⊆\n    (Function.support fun a => coeff (↑x a) g) ∪ Function.support fun a => coeff (↑y a) g\n[PROOFSTEP]\nintro a ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\ng : Γ\na : α\nha : a ∈ {a | coeff ((↑x + ↑y) a) g ≠ 0}\n⊢ a ∈ (Function.support fun a => coeff (↑x a) g) ∪ Function.support fun a => coeff (↑y a) g\n[PROOFSTEP]\nchange (x a).coeff g + (y a).coeff g ≠ 0 at ha \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\ng : Γ\na : α\nha : coeff (↑x a) g + coeff (↑y a) g ≠ 0\n⊢ a ∈ (Function.support fun a => coeff (↑x a) g) ∪ Function.support fun a => coeff (↑y a) g\n[PROOFSTEP]\nrw [Set.mem_union, Function.mem_support, Function.mem_support]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\ng : Γ\na : α\nha : coeff (↑x a) g + coeff (↑y a) g ≠ 0\n⊢ coeff (↑x a) g ≠ 0 ∨ coeff (↑y a) g ≠ 0\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nx y : SummableFamily Γ R α\ng : Γ\na : α\nha : coeff (↑x a) g = 0 ∧ coeff (↑y a) g = 0\n⊢ coeff (↑x a) g + coeff (↑y a) g = 0\n[PROOFSTEP]\nrw [ha.1, ha.2, add_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\n⊢ Set.IsPwo (⋃ (a : α), support (OfNat.ofNat 0 a))\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\n⊢ ∀ (g : Γ), Set.Finite {a | coeff (OfNat.ofNat 0 a) g ≠ 0}\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nr s t : SummableFamily Γ R α\n⊢ r + s + t = r + (s + t)\n[PROOFSTEP]\next\n[GOAL]\ncase h.coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nr s t : SummableFamily Γ R α\na✝ : α\nx✝ : Γ\n⊢ coeff (↑(r + s + t) a✝) x✝ = coeff (↑(r + (s + t)) a✝) x✝\n[PROOFSTEP]\napply add_assoc\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\n⊢ 0 + s = s\n[PROOFSTEP]\next\n[GOAL]\ncase h.coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\na✝ : α\nx✝ : Γ\n⊢ coeff (↑(0 + s) a✝) x✝ = coeff (↑s a✝) x✝\n[PROOFSTEP]\napply zero_add\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\n⊢ s + 0 = s\n[PROOFSTEP]\next\n[GOAL]\ncase h.coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\na✝ : α\nx✝ : Γ\n⊢ coeff (↑(s + 0) a✝) x✝ = coeff (↑s a✝) x✝\n[PROOFSTEP]\napply add_zero\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns t : SummableFamily Γ R α\n⊢ s + t = t + s\n[PROOFSTEP]\next\n[GOAL]\ncase h.coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns t : SummableFamily Γ R α\na✝ : α\nx✝ : Γ\n⊢ coeff (↑(s + t) a✝) x✝ = coeff (↑(t + s) a✝) x✝\n[PROOFSTEP]\napply add_comm\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\n⊢ (g ∈ Function.support fun g => ∑ᶠ (i : α), coeff (↑s i) g) → g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\ncontrapose\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\n⊢ ¬g ∈ ⋃ (a : α), support (↑s a) → ¬g ∈ Function.support fun g => ∑ᶠ (i : α), coeff (↑s i) g\n[PROOFSTEP]\nrw [Set.mem_iUnion, not_exists, Function.mem_support, Classical.not_not]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\n⊢ (∀ (x : α), ¬g ∈ support (↑s x)) → ∑ᶠ (i : α), coeff (↑s i) g = 0\n[PROOFSTEP]\nsimp_rw [mem_support, Classical.not_not]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\n⊢ (∀ (x : α), coeff (↑s x) g = 0) → ∑ᶠ (i : α), coeff (↑s i) g = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\nh : ∀ (x : α), coeff (↑s x) g = 0\n⊢ ∑ᶠ (i : α), coeff (↑s i) g = 0\n[PROOFSTEP]\nrw [finsum_congr h, finsum_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\nhg : g ∈ support (hsum s)\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nrw [mem_support, hsum_coeff, finsum_eq_sum _ (s.finite_co_support _)] at hg \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\nhg : ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (↑s a) g)), coeff (↑s i) g ≠ 0\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nobtain ⟨a, _, h2⟩ := exists_ne_zero_of_sum_ne_zero hg\n[GOAL]\ncase intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\nhg : ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (↑s a) g)), coeff (↑s i) g ≠ 0\na : α\nleft✝ : a ∈ Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (↑s a) g))\nh2 : coeff (↑s a) g ≠ 0\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\ncase intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns : SummableFamily Γ R α\ng : Γ\nhg : ∑ i in Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (↑s a) g)), coeff (↑s i) g ≠ 0\na : α\nleft✝ : a ∈ Set.Finite.toFinset (_ : Set.Finite (Function.support fun a => coeff (↑s a) g))\nh2 : coeff (↑s a) g ≠ 0\n⊢ ∃ i, g ∈ support (↑s i)\n[PROOFSTEP]\nexact ⟨a, h2⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns t : SummableFamily Γ R α\n⊢ hsum (s + t) = hsum s + hsum t\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns t : SummableFamily Γ R α\ng : Γ\n⊢ coeff (hsum (s + t)) g = coeff (hsum s + hsum t) g\n[PROOFSTEP]\nsimp only [hsum_coeff, add_coeff, add_apply]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\ns t : SummableFamily Γ R α\ng : Γ\n⊢ ∑ᶠ (i : α), (coeff (↑s i) g + coeff (↑t i) g) = ∑ᶠ (i : α), coeff (↑s i) g + ∑ᶠ (i : α), coeff (↑t i) g\n[PROOFSTEP]\nexact finsum_add_distrib (s.finite_co_support _) (t.finite_co_support _)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns✝ t : SummableFamily Γ R α\na : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\ns : SummableFamily Γ R α\n⊢ Set.IsPwo (⋃ (a : α), support ((fun a => -↑s a) a))\n[PROOFSTEP]\nsimp_rw [support_neg]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns✝ t : SummableFamily Γ R α\na : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\ns : SummableFamily Γ R α\n⊢ Set.IsPwo (⋃ (a : α), support (↑s a))\n[PROOFSTEP]\nexact s.isPwo_iUnion_support'\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns✝ t : SummableFamily Γ R α\na : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\ns : SummableFamily Γ R α\ng : Γ\n⊢ Set.Finite {a | coeff ((fun a => -↑s a) a) g ≠ 0}\n[PROOFSTEP]\nsimp only [neg_coeff', Pi.neg_apply, Ne.def, neg_eq_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns✝ t : SummableFamily Γ R α\na : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\ns : SummableFamily Γ R α\ng : Γ\n⊢ Set.Finite {a | ¬coeff (↑s a) g = 0}\n[PROOFSTEP]\nexact s.finite_co_support g\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns t : SummableFamily Γ R α\na✝ : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\na : SummableFamily Γ R α\n⊢ -a + a = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h.coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommGroup R\nα : Type u_3\ns t : SummableFamily Γ R α\na✝¹ : α\nsrc✝ : AddCommMonoid (SummableFamily Γ R α) := inferInstanceAs (AddCommMonoid (SummableFamily Γ R α))\na : SummableFamily Γ R α\na✝ : α\nx✝ : Γ\n⊢ coeff (↑(-a + a) a✝) x✝ = coeff (↑0 a✝) x✝\n[PROOFSTEP]\napply add_left_neg\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\n⊢ Set.IsPwo (⋃ (a : α), support ((fun a => x * ↑s a) a))\n[PROOFSTEP]\napply (x.isPwo_support.add s.isPwo_iUnion_support).mono\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\n⊢ ⋃ (a : α), support ((fun a => x * ↑s a) a) ⊆ support x + ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nrefine' Set.Subset.trans (Set.iUnion_mono fun a => support_mul_subset_add_support) _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\n⊢ ⋃ (i : α), support x + support (↑s i) ⊆ support x + ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nintro g\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ g ∈ ⋃ (i : α), support x + support (↑s i) → g ∈ support x + ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, exists_imp]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∀ (x_1 : α), g ∈ support x + support (↑s x_1) → g ∈ support x + ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nexact fun a ha => (Set.add_subset_add (Set.Subset.refl _) (Set.subset_iUnion _ a)) ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ Set.Finite {a | coeff ((fun a => x * ↑s a) a) g ≠ 0}\n[PROOFSTEP]\nrefine'\n  ((addAntidiagonal x.isPwo_support s.isPwo_iUnion_support g).finite_toSet.biUnion' fun ij _ => _).subset fun a ha => _\n[GOAL]\ncase refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ (i : Γ × Γ) → i ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g) → Set α\n[PROOFSTEP]\nexact fun ij _ => Function.support fun a => (s a).coeff ij.2\n[GOAL]\ncase refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\nij : Γ × Γ\nx✝ : ij ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g)\n⊢ Set.Finite (Function.support fun a => coeff (↑s a) ij.snd)\n[PROOFSTEP]\napply s.finite_co_support\n[GOAL]\ncase refine'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\na : α\nha : a ∈ {a | coeff ((fun a => x * ↑s a) a) g ≠ 0}\n⊢ a ∈\n    ⋃ (i : Γ × Γ) (_ :\n      i ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g)),\n      Function.support fun a => coeff (↑s a) i.snd\n[PROOFSTEP]\nobtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support ha\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\na : α\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (↑s a)\nha : a ∈ {a | coeff ((fun a => x * ↑s a) a) ((fun x x_1 => x + x_1) i j) ≠ 0}\n⊢ a ∈\n    ⋃ (i_1 : Γ × Γ) (_ :\n      i_1 ∈\n        ↑(addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a)))\n            ((fun x x_1 => x + x_1) i j))),\n      Function.support fun a => coeff (↑s a) i_1.snd\n[PROOFSTEP]\nsimp only [exists_prop, Set.mem_iUnion, mem_addAntidiagonal, mul_coeff, mem_support, isPwo_support, Prod.exists]\n[GOAL]\ncase refine'_3.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\na : α\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (↑s a)\nha : a ∈ {a | coeff ((fun a => x * ↑s a) a) ((fun x x_1 => x + x_1) i j) ≠ 0}\n⊢ ∃ a_1 b,\n    (a_1, b) ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) (i + j)) ∧\n      a ∈ Function.support fun a => coeff (↑s a) b\n[PROOFSTEP]\nexact ⟨i, j, mem_coe.2 (mem_addAntidiagonal.2 ⟨hi, Set.mem_iUnion.2 ⟨a, hj⟩, rfl⟩), hj⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\n⊢ hsum (x • s) = x * hsum s\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ coeff (hsum (x • s)) g = coeff (x * hsum s) g\n[PROOFSTEP]\nsimp only [mul_coeff, hsum_coeff, smul_apply]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∑ᶠ (i : α),\n      ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (↑s i))) g,\n        coeff x ij.fst * coeff (↑s i) ij.snd =\n    ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g,\n      coeff x x_1.fst * ∑ᶠ (i : α), coeff (↑s i) x_1.snd\n[PROOFSTEP]\nrefine'\n  (Eq.trans (finsum_congr fun a => _)\n        (finsum_sum_comm (addAntidiagonal x.isPwo_support s.isPwo_iUnion_support g)\n          (fun i ij => x.coeff (Prod.fst ij) * (s i).coeff ij.snd) _)).trans\n    _\n[GOAL]\ncase coeff.h.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\na : α\n⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (↑s a))) g,\n      coeff x ij.fst * coeff (↑s a) ij.snd =\n    ∑ b in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g,\n      coeff x b.fst * coeff (↑s a) b.snd\n[PROOFSTEP]\nrefine' sum_subset (addAntidiagonal_mono_right (Set.subset_iUnion (fun j => support (toFun s j)) a)) _\n[GOAL]\ncase coeff.h.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\na : α\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g →\n      ¬x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (↑s a))) g →\n        coeff x x_1.fst * coeff (↑s a) x_1.snd = 0\n[PROOFSTEP]\nrintro ⟨i, j⟩ hU ha\n[GOAL]\ncase coeff.h.refine'_1.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\na : α\ni j : Γ\nhU : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\nha : ¬(i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (↑s a))) g\n⊢ coeff x (i, j).fst * coeff (↑s a) (i, j).snd = 0\n[PROOFSTEP]\nrw [mem_addAntidiagonal] at *\n[GOAL]\ncase coeff.h.refine'_1.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\na : α\ni j : Γ\nhU : (i, j).fst ∈ support x ∧ (i, j).snd ∈ ⋃ (a : α), support (↑s a) ∧ (i, j).fst + (i, j).snd = g\nha : ¬((i, j).fst ∈ support x ∧ (i, j).snd ∈ support (↑s a) ∧ (i, j).fst + (i, j).snd = g)\n⊢ coeff x (i, j).fst * coeff (↑s a) (i, j).snd = 0\n[PROOFSTEP]\nrw [Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, mul_zero]\n[GOAL]\ncase coeff.h.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∀ (b : Γ × Γ),\n    b ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g →\n      Set.Finite (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (↑s i) ij.snd) a b)\n[PROOFSTEP]\nrintro ⟨i, j⟩ _\n[GOAL]\ncase coeff.h.refine'_2.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\n⊢ Set.Finite (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (↑s i) ij.snd) a (i, j))\n[PROOFSTEP]\nrefine' (s.finite_co_support j).subset _\n[GOAL]\ncase coeff.h.refine'_2.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\n⊢ (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (↑s i) ij.snd) a (i, j)) ⊆\n    Function.support fun a => coeff (↑s a) j\n[PROOFSTEP]\nsimp_rw [Function.support_subset_iff', Function.mem_support, Classical.not_not]\n[GOAL]\ncase coeff.h.refine'_2.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\n⊢ ∀ (x_1 : α), coeff (↑s x_1) j = 0 → coeff x i * coeff (↑s x_1) j = 0\n[PROOFSTEP]\nintro a ha\n[GOAL]\ncase coeff.h.refine'_2.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\na : α\nha : coeff (↑s a) j = 0\n⊢ coeff x i * coeff (↑s a) j = 0\n[PROOFSTEP]\nrw [ha, mul_zero]\n[GOAL]\ncase coeff.h.refine'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∑ b in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g,\n      ∑ᶠ (a : α), coeff x b.fst * coeff (↑s a) b.snd =\n    ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g,\n      coeff x x_1.fst * ∑ᶠ (i : α), coeff (↑s i) x_1.snd\n[PROOFSTEP]\nrefine' (sum_congr rfl _).trans (sum_subset (addAntidiagonal_mono_right _) _).symm\n[GOAL]\ncase coeff.h.refine'_3.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g →\n      ∑ᶠ (a : α), coeff x x_1.fst * coeff (↑s a) x_1.snd = coeff x x_1.fst * ∑ᶠ (i : α), coeff (↑s i) x_1.snd\n[PROOFSTEP]\nrintro ⟨i, j⟩ _\n[GOAL]\ncase coeff.h.refine'_3.refine'_1.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\n⊢ ∑ᶠ (a : α), coeff x (i, j).fst * coeff (↑s a) (i, j).snd =\n    coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (↑s i_1) (i, j).snd\n[PROOFSTEP]\nrw [mul_finsum]\n[GOAL]\ncase coeff.h.refine'_3.refine'_1.mk.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\na✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\n⊢ Set.Finite (Function.support fun i_1 => coeff (↑s i_1) (i, j).snd)\n[PROOFSTEP]\napply s.finite_co_support\n[GOAL]\ncase coeff.h.refine'_3.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ support (hsum s) ⊆ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase coeff.h.refine'_3.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx✝ : HahnSeries Γ R\ns : SummableFamily Γ R α\ng x : Γ\nhx : x ∈ support (hsum s)\n⊢ x ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Ne.def, mem_support]\n[GOAL]\ncase coeff.h.refine'_3.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx✝ : HahnSeries Γ R\ns : SummableFamily Γ R α\ng x : Γ\nhx : x ∈ support (hsum s)\n⊢ ∃ i, ¬coeff (↑s i) x = 0\n[PROOFSTEP]\ncontrapose! hx\n[GOAL]\ncase coeff.h.refine'_3.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx✝ : HahnSeries Γ R\ns : SummableFamily Γ R α\ng x : Γ\nhx : ∀ (i : α), coeff (↑s i) x = 0\n⊢ ¬x ∈ support (hsum s)\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase coeff.h.refine'_3.refine'_3\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng : Γ\n⊢ ∀ (x_1 : Γ × Γ),\n    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g →\n      ¬x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g →\n        coeff x x_1.fst * ∑ᶠ (i : α), coeff (↑s i) x_1.snd = 0\n[PROOFSTEP]\nrintro ⟨i, j⟩ hU ha\n[GOAL]\ncase coeff.h.refine'_3.refine'_3.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\nhU : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (↑s a))) g\nha : ¬(i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g\n⊢ coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (↑s i_1) (i, j).snd = 0\n[PROOFSTEP]\nrw [mem_addAntidiagonal] at *\n[GOAL]\ncase coeff.h.refine'_3.refine'_3.mk\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : OrderedCancelAddCommMonoid Γ\ninst✝ : Semiring R\nα : Type u_3\nx : HahnSeries Γ R\ns : SummableFamily Γ R α\ng i j : Γ\nhU : (i, j).fst ∈ support x ∧ (i, j).snd ∈ ⋃ (a : α), support (↑s a) ∧ (i, j).fst + (i, j).snd = g\nha : ¬((i, j).fst ∈ support x ∧ (i, j).snd ∈ support (hsum s) ∧ (i, j).fst + (i, j).snd = g)\n⊢ coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (↑s i_1) (i, j).snd = 0\n[PROOFSTEP]\nrw [← hsum_coeff, Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, mul_zero]\n[GOAL]\nΓ : Type u_1\nR✝ : Type u_2\ninst✝² : OrderedCancelAddCommMonoid Γ\ninst✝¹ : Semiring R✝\nα : Type u_3\nR : Type u_4\ninst✝ : Ring R\ns t : SummableFamily Γ R α\n⊢ hsum (s - t) = hsum s - hsum t\n[PROOFSTEP]\nrw [← lsum_apply, LinearMap.map_sub, lsum_apply, lsum_apply]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\n⊢ Set.IsPwo (⋃ (a : α), support (↑f a))\n[PROOFSTEP]\napply (f.support.isPwo_bUnion.2 fun a _ => (f a).isPwo_support).mono\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\n⊢ ⋃ (a : α), support (↑f a) ⊆ ⋃ (i : α) (_ : i ∈ f.support), support (↑f i)\n[PROOFSTEP]\nrefine' Set.iUnion_subset_iff.2 fun a g hg => _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\na : α\ng : Γ\nhg : g ∈ support (↑f a)\n⊢ g ∈ ⋃ (i : α) (_ : i ∈ f.support), support (↑f i)\n[PROOFSTEP]\nhave haf : a ∈ f.support := by\n  rw [Finsupp.mem_support_iff, ← support_nonempty_iff]\n  exact ⟨g, hg⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\na : α\ng : Γ\nhg : g ∈ support (↑f a)\n⊢ a ∈ f.support\n[PROOFSTEP]\nrw [Finsupp.mem_support_iff, ← support_nonempty_iff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\na : α\ng : Γ\nhg : g ∈ support (↑f a)\n⊢ Set.Nonempty (support (↑f a))\n[PROOFSTEP]\nexact ⟨g, hg⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\na : α\ng : Γ\nhg : g ∈ support (↑f a)\nhaf : a ∈ f.support\n⊢ g ∈ ⋃ (i : α) (_ : i ∈ f.support), support (↑f i)\n[PROOFSTEP]\nexact Set.mem_biUnion haf hg\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\n⊢ Set.Finite {a | coeff (↑f a) g ≠ 0}\n[PROOFSTEP]\nrefine' f.support.finite_toSet.subset fun a ha => _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\na : α\nha : a ∈ {a | coeff (↑f a) g ≠ 0}\n⊢ a ∈ ↑f.support\n[PROOFSTEP]\nsimp only [coeff.addMonoidHom_apply, mem_coe, Finsupp.mem_support_iff, Ne.def, Function.mem_support]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\na : α\nha : a ∈ {a | coeff (↑f a) g ≠ 0}\n⊢ ¬↑f a = 0\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\na : α\nha : ↑f a = 0\n⊢ ¬a ∈ {a | coeff (↑f a) g ≠ 0}\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\n⊢ hsum (ofFinsupp f) = Finsupp.sum f fun x => id\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\n⊢ coeff (hsum (ofFinsupp f)) g = coeff (Finsupp.sum f fun x => id) g\n[PROOFSTEP]\nsimp only [hsum_coeff, coe_ofFinsupp, Finsupp.sum, Ne.def]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\n⊢ ∑ᶠ (i : α), coeff (↑f i) g = coeff (∑ x in f.support, id (↑f x)) g\n[PROOFSTEP]\nsimp_rw [← coeff.addMonoidHom_apply, id.def]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\n⊢ ∑ᶠ (i : α), ↑(coeff.addMonoidHom g) (↑f i) = ↑(coeff.addMonoidHom g) (∑ x in f.support, ↑f x)\n[PROOFSTEP]\nrw [map_sum, finsum_eq_sum_of_support_subset]\n[GOAL]\ncase coeff.h.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\n⊢ (Function.support fun i => ↑(coeff.addMonoidHom g) (↑f i)) ⊆ ↑f.support\n[PROOFSTEP]\nintro x h\n[GOAL]\ncase coeff.h.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\nx : α\nh : x ∈ Function.support fun i => ↑(coeff.addMonoidHom g) (↑f i)\n⊢ x ∈ ↑f.support\n[PROOFSTEP]\nsimp only [coeff.addMonoidHom_apply, mem_coe, Finsupp.mem_support_iff, Ne.def]\n[GOAL]\ncase coeff.h.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\nx : α\nh : x ∈ Function.support fun i => ↑(coeff.addMonoidHom g) (↑f i)\n⊢ ¬↑f x = 0\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase coeff.h.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nf : α →₀ HahnSeries Γ R\ng : Γ\nx : α\nh : ↑f x = 0\n⊢ ¬x ∈ Function.support fun i => ↑(coeff.addMonoidHom g) (↑f i)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\n⊢ Set.IsPwo (⋃ (a : β), support ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) a))\n[PROOFSTEP]\nrefine' s.isPwo_iUnion_support.mono (Set.iUnion_subset fun b g h => _)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nh : g ∈ support ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) b)\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nby_cases hb : b ∈ Set.range f\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nh : g ∈ support ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) b)\nhb : b ∈ Set.range ↑f\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\ndsimp only at h \n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nh : g ∈ support (if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0)\nhb : b ∈ Set.range ↑f\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nrw [dif_pos hb] at h \n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nhb : b ∈ Set.range ↑f\nh : g ∈ support (↑s (Classical.choose hb))\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\nexact Set.mem_iUnion.2 ⟨Classical.choose hb, h⟩\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nh : g ∈ support ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) b)\nhb : ¬b ∈ Set.range ↑f\n⊢ g ∈ ⋃ (a : α), support (↑s a)\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nhb : ¬b ∈ Set.range ↑f\nh : ¬g ∈ ⋃ (a : α), support (↑s a)\n⊢ ¬g ∈ support (if h : b ∈ Set.range ↑f then ↑s (Classical.choose (_ : b ∈ Set.range ↑f)) else 0)\n[PROOFSTEP]\nrw [dif_neg hb]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\nb : β\ng : Γ\nhb : ¬b ∈ Set.range ↑f\nh : ¬g ∈ ⋃ (a : α), support (↑s a)\n⊢ ¬g ∈ support 0\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\n⊢ {a | coeff ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) a) g ≠ 0} ⊆\n    ↑f '' Function.support fun a => coeff (↑s a) g\n[PROOFSTEP]\nintro b h\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\nb : β\nh : b ∈ {a | coeff ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) a) g ≠ 0}\n⊢ b ∈ ↑f '' Function.support fun a => coeff (↑s a) g\n[PROOFSTEP]\nby_cases hb : b ∈ Set.range f\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\nb : β\nh : b ∈ {a | coeff ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) a) g ≠ 0}\nhb : b ∈ Set.range ↑f\n⊢ b ∈ ↑f '' Function.support fun a => coeff (↑s a) g\n[PROOFSTEP]\nsimp only [Ne.def, Set.mem_setOf_eq, dif_pos hb] at h \n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\nb : β\nhb : b ∈ Set.range ↑f\nh : ¬coeff (↑s (Classical.choose (_ : b ∈ Set.range ↑f))) g = 0\n⊢ b ∈ ↑f '' Function.support fun a => coeff (↑s a) g\n[PROOFSTEP]\nexact ⟨Classical.choose hb, h, Classical.choose_spec hb⟩\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\nb : β\nh : b ∈ {a | coeff ((fun b => if h : b ∈ Set.range ↑f then ↑s (Classical.choose h) else 0) a) g ≠ 0}\nhb : ¬b ∈ Set.range ↑f\n⊢ b ∈ ↑f '' Function.support fun a => coeff (↑s a) g\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\ng : Γ\nb : β\nhb : ¬b ∈ Set.range ↑f\nh : ¬b ∈ (fun a => ↑f a) '' Function.support fun a => coeff (↑s a) g\n⊢ ¬b ∈ {a | coeff (if h : a ∈ Set.range ↑f then ↑s (Classical.choose (_ : a ∈ Set.range ↑f)) else 0) g ≠ 0}\n[PROOFSTEP]\nsimp only [Ne.def, Set.mem_setOf_eq, dif_neg hb, Classical.not_not, zero_coeff]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\n⊢ ↑(embDomain s f) (↑f a) = ↑s a\n[PROOFSTEP]\nrw [embDomain_apply, dif_pos (Set.mem_range_self a)]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\n⊢ ↑s (Classical.choose (_ : ↑f a ∈ Set.range ↑f)) = ↑s a\n[PROOFSTEP]\nexact congr rfl (f.injective (Classical.choose_spec (Set.mem_range_self a)))\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\nh : ¬b ∈ Set.range ↑f\n⊢ ↑(embDomain s f) b = 0\n[PROOFSTEP]\nrw [embDomain_apply, dif_neg h]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\n⊢ hsum (embDomain s f) = hsum s\n[PROOFSTEP]\next g\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\ng : Γ\n⊢ coeff (hsum (embDomain s f)) g = coeff (hsum s) g\n[PROOFSTEP]\nsimp only [hsum_coeff, embDomain_apply, apply_dite HahnSeries.coeff, dite_apply, zero_coeff]\n[GOAL]\ncase coeff.h\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : PartialOrder Γ\ninst✝ : AddCommMonoid R\nα : Type u_3\nβ : Type u_4\ns : SummableFamily Γ R α\nf : α ↪ β\na : α\nb : β\ng : Γ\n⊢ (∑ᶠ (i : β), if h : i ∈ Set.range ↑f then coeff (↑s (Classical.choose (_ : i ∈ Set.range ↑f))) g else 0) =\n    ∑ᶠ (i : α), coeff (↑s i) g\n[PROOFSTEP]\nexact finsum_emb_domain f fun a => (s a).coeff g\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\n[PROOFSTEP]\nhave hpwo := isPwo_iUnion_support_powers hx\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\n[PROOFSTEP]\nby_cases hg : g ∈ ⋃ n : ℕ, {g | (x ^ n).coeff g ≠ 0}\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : ¬g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\n[PROOFSTEP]\nswap\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : ¬g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\n[PROOFSTEP]\nexact Set.finite_empty.subset fun n hn => hg (Set.mem_iUnion.2 ⟨n, hn⟩)\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) g ≠ 0}\n[PROOFSTEP]\napply hpwo.isWf.induction hg\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\n⊢ ∀ (y : Γ),\n    y ∈ ⋃ (n : ℕ), support (x ^ n) →\n      (∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}) →\n        Set.Finite {a | coeff ((fun n => x ^ n) a) y ≠ 0}\n[PROOFSTEP]\nintro y ys hy\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\n⊢ Set.Finite {a | coeff ((fun n => x ^ n) a) y ≠ 0}\n[PROOFSTEP]\nrefine'\n  ((((addAntidiagonal x.isPwo_support hpwo y).finite_toSet.biUnion fun ij hij => hy ij.snd _ _).image Nat.succ).union\n        (Set.finite_singleton 0)).subset\n    _\n[GOAL]\ncase pos.refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nij : Γ × Γ\nhij : ij ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo y)\n⊢ ij.snd ∈ ⋃ (n : ℕ), support (x ^ n)\n[PROOFSTEP]\nexact (mem_addAntidiagonal.1 (mem_coe.1 hij)).2.1\n[GOAL]\ncase pos.refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nij : Γ × Γ\nhij : ij ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo y)\n⊢ ij.snd < y\n[PROOFSTEP]\nobtain ⟨hi, _, rfl⟩ := mem_addAntidiagonal.1 (mem_coe.1 hij)\n[GOAL]\ncase pos.refine'_2.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\nij : Γ × Γ\nhi : ij.fst ∈ support x\nleft✝ : ij.snd ∈ ⋃ (n : ℕ), support (x ^ n)\nys : ij.fst + ij.snd ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < ij.fst + ij.snd → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhij : ij ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo (ij.fst + ij.snd))\n⊢ ij.snd < ij.fst + ij.snd\n[PROOFSTEP]\nrw [← zero_add ij.snd, ← add_assoc, add_zero]\n[GOAL]\ncase pos.refine'_2.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\nij : Γ × Γ\nhi : ij.fst ∈ support x\nleft✝ : ij.snd ∈ ⋃ (n : ℕ), support (x ^ n)\nys : ij.fst + ij.snd ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < ij.fst + ij.snd → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhij : ij ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo (ij.fst + ij.snd))\n⊢ 0 + ij.snd < ij.fst + ij.snd\n[PROOFSTEP]\nexact add_lt_add_right (WithTop.coe_lt_coe.1 (lt_of_lt_of_le hx (addVal_le_of_coeff_ne_zero hi))) _\n[GOAL]\ncase pos.refine'_3\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\n⊢ {a | coeff ((fun n => x ^ n) a) y ≠ 0} ⊆\n    (Nat.succ ''\n        ⋃ (i : Γ × Γ) (_ : i ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo y)),\n          {a | coeff ((fun n => x ^ n) a) i.snd ≠ 0}) ∪\n      {0}\n[PROOFSTEP]\nrintro (_ | n) hn\n[GOAL]\ncase pos.refine'_3.zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhn : Nat.zero ∈ {a | coeff ((fun n => x ^ n) a) y ≠ 0}\n⊢ Nat.zero ∈\n    (Nat.succ ''\n        ⋃ (i : Γ × Γ) (_ : i ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo y)),\n          {a | coeff ((fun n => x ^ n) a) i.snd ≠ 0}) ∪\n      {0}\n[PROOFSTEP]\nexact Set.mem_union_right _ (Set.mem_singleton 0)\n[GOAL]\ncase pos.refine'_3.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\ny : Γ\nys : y ∈ ⋃ (n : ℕ), support (x ^ n)\nhy : ∀ (z : Γ), z ∈ ⋃ (n : ℕ), support (x ^ n) → z < y → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nn : ℕ\nhn : Nat.succ n ∈ {a | coeff ((fun n => x ^ n) a) y ≠ 0}\n⊢ Nat.succ n ∈\n    (Nat.succ ''\n        ⋃ (i : Γ × Γ) (_ : i ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo y)),\n          {a | coeff ((fun n => x ^ n) a) i.snd ≠ 0}) ∪\n      {0}\n[PROOFSTEP]\nobtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support hn\n[GOAL]\ncase pos.refine'_3.succ.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\nn : ℕ\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (npowRec n x)\nys : (fun x x_1 => x + x_1) i j ∈ ⋃ (n : ℕ), support (x ^ n)\nhy :\n  ∀ (z : Γ),\n    z ∈ ⋃ (n : ℕ), support (x ^ n) → z < (fun x x_1 => x + x_1) i j → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhn : Nat.succ n ∈ {a | coeff ((fun n => x ^ n) a) ((fun x x_1 => x + x_1) i j) ≠ 0}\n⊢ Nat.succ n ∈\n    (Nat.succ ''\n        ⋃ (i_1 : Γ × Γ) (_ : i_1 ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo ((fun x x_1 => x + x_1) i j))),\n          {a | coeff ((fun n => x ^ n) a) i_1.snd ≠ 0}) ∪\n      {0}\n[PROOFSTEP]\nrefine' Set.mem_union_left _ ⟨n, Set.mem_iUnion.2 ⟨⟨i, j⟩, Set.mem_iUnion.2 ⟨_, hj⟩⟩, rfl⟩\n[GOAL]\ncase pos.refine'_3.succ.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\nn : ℕ\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (npowRec n x)\nys : (fun x x_1 => x + x_1) i j ∈ ⋃ (n : ℕ), support (x ^ n)\nhy :\n  ∀ (z : Γ),\n    z ∈ ⋃ (n : ℕ), support (x ^ n) → z < (fun x x_1 => x + x_1) i j → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhn : Nat.succ n ∈ {a | coeff ((fun n => x ^ n) a) ((fun x x_1 => x + x_1) i j) ≠ 0}\n⊢ (i, j) ∈ ↑(addAntidiagonal (_ : Set.IsPwo (support x)) hpwo ((fun x x_1 => x + x_1) i j))\n[PROOFSTEP]\nsimp only [and_true_iff, Set.mem_iUnion, mem_addAntidiagonal, mem_coe, eq_self_iff_true, Ne.def, mem_support,\n  Set.mem_setOf_eq]\n[GOAL]\ncase pos.refine'_3.succ.intro.intro.intro.intro\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\ng : Γ\nhpwo : Set.IsPwo (⋃ (n : ℕ), support (x ^ n))\nhg : g ∈ ⋃ (n : ℕ), {g | coeff (x ^ n) g ≠ 0}\nn : ℕ\ni j : Γ\nhi : i ∈ support x\nhj : j ∈ support (npowRec n x)\nys : (fun x x_1 => x + x_1) i j ∈ ⋃ (n : ℕ), support (x ^ n)\nhy :\n  ∀ (z : Γ),\n    z ∈ ⋃ (n : ℕ), support (x ^ n) → z < (fun x x_1 => x + x_1) i j → Set.Finite {a | coeff ((fun n => x ^ n) a) z ≠ 0}\nhn : Nat.succ n ∈ {a | coeff ((fun n => x ^ n) a) ((fun x x_1 => x + x_1) i j) ≠ 0}\n⊢ ¬coeff x i = 0 ∧ ∃ i, ¬coeff (x ^ i) j = 0\n[PROOFSTEP]\nexact ⟨hi, n, hj⟩\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ embDomain (x • powers x hx) { toFun := Nat.succ, inj' := Nat.succ_injective } =\n    powers x hx - ofFinsupp (Finsupp.single 0 1)\n[PROOFSTEP]\napply SummableFamily.ext\n[GOAL]\ncase h\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ∀ (a : ℕ),\n    ↑(embDomain (x • powers x hx) { toFun := Nat.succ, inj' := Nat.succ_injective }) a =\n      ↑(powers x hx - ofFinsupp (Finsupp.single 0 1)) a\n[PROOFSTEP]\nrintro (_ | n)\n[GOAL]\ncase h.zero\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ↑(embDomain (x • powers x hx) { toFun := Nat.succ, inj' := Nat.succ_injective }) Nat.zero =\n    ↑(powers x hx - ofFinsupp (Finsupp.single 0 1)) Nat.zero\n[PROOFSTEP]\nrw [embDomain_notin_range, sub_apply, coe_powers, pow_zero, coe_ofFinsupp, Finsupp.single_eq_same, sub_self]\n[GOAL]\ncase h.zero.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ¬Nat.zero ∈ Set.range ↑{ toFun := Nat.succ, inj' := Nat.succ_injective }\n[PROOFSTEP]\nrw [Set.mem_range, not_exists]\n[GOAL]\ncase h.zero.h\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ ∀ (x : ℕ), ¬↑{ toFun := Nat.succ, inj' := Nat.succ_injective } x = Nat.zero\n[PROOFSTEP]\nexact Nat.succ_ne_zero\n[GOAL]\ncase h.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\n⊢ ↑(embDomain (x • powers x hx) { toFun := Nat.succ, inj' := Nat.succ_injective }) (Nat.succ n) =\n    ↑(powers x hx - ofFinsupp (Finsupp.single 0 1)) (Nat.succ n)\n[PROOFSTEP]\nrefine' Eq.trans (embDomain_image _ ⟨Nat.succ, Nat.succ_injective⟩) _\n[GOAL]\ncase h.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\n⊢ ↑(x • powers x hx) n = ↑(powers x hx - ofFinsupp (Finsupp.single 0 1)) (Nat.succ n)\n[PROOFSTEP]\nsimp only [pow_succ, coe_powers, coe_sub, smul_apply, coe_ofFinsupp, Pi.sub_apply]\n[GOAL]\ncase h.succ\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\nn : ℕ\n⊢ x * x ^ n = x * x ^ n - ↑(Finsupp.single 0 1) (Nat.succ n)\n[PROOFSTEP]\nrw [Finsupp.single_eq_of_ne n.succ_ne_zero.symm, sub_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ (1 - x) * hsum (powers x hx) = 1\n[PROOFSTEP]\nrw [← hsum_smul, sub_smul 1 x (powers x hx), one_smul, hsum_sub, ←\n  hsum_embDomain (x • powers x hx) ⟨Nat.succ, Nat.succ_injective⟩, embDomain_succ_smul_powers]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedCancelAddCommMonoid Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nhx : 0 < ↑(addVal Γ R) x\n⊢ hsum (powers x hx) - hsum (powers x hx - ofFinsupp (Finsupp.single 0 1)) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\n⊢ 0 < ↑(addVal Γ R) (1 - ↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nhave h10 : (1 : R) ≠ 0 := one_ne_zero\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\n⊢ 0 < ↑(addVal Γ R) (1 - ↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nhave x0 : x ≠ 0 := ne_zero_of_coeff_ne_zero (right_ne_zero_of_mul_eq_one hr)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ 0 < ↑(addVal Γ R) (1 - ↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nrefine' lt_of_le_of_ne ((addVal Γ R).map_le_sub (ge_of_eq (addVal Γ R).map_one) _) _\n[GOAL]\ncase refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ 0 ≤ ↑(addVal Γ R) (↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nsimp only [AddValuation.map_mul]\n[GOAL]\ncase refine'_1\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ 0 ≤ ↑(addVal Γ R) (↑C r) + ↑(addVal Γ R) (↑(single (-order x)) 1) + ↑(addVal Γ R) x\n[PROOFSTEP]\nrw [addVal_apply_of_ne x0, addVal_apply_of_ne (single_ne_zero h10), addVal_apply_of_ne _, order_C, order_single h10,\n  WithTop.coe_zero, zero_add, ← WithTop.coe_add, neg_add_self, WithTop.coe_zero]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ ↑C r ≠ 0\n[PROOFSTEP]\nexact C_ne_zero (left_ne_zero_of_mul_eq_one hr)\n[GOAL]\ncase refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ 0 ≠ ↑(addVal Γ R) (1 - ↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nrw [addVal_apply, ← WithTop.coe_zero]\n[GOAL]\ncase refine'_2\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\n⊢ ↑0 ≠ if 1 - ↑C r * ↑(single (-order x)) 1 * x = 0 then ⊤ else ↑(order (1 - ↑C r * ↑(single (-order x)) 1 * x))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\nh : 1 - ↑C r * ↑(single (-order x)) 1 * x = 0\n⊢ ↑0 ≠ ⊤\n[PROOFSTEP]\napply WithTop.coe_ne_top\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\nh : ¬1 - ↑C r * ↑(single (-order x)) 1 * x = 0\n⊢ ↑0 ≠ ↑(order (1 - ↑C r * ↑(single (-order x)) 1 * x))\n[PROOFSTEP]\nrw [Ne.def, WithTop.coe_eq_coe]\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\nh : ¬1 - ↑C r * ↑(single (-order x)) 1 * x = 0\n⊢ ¬0 = order (1 - ↑C r * ↑(single (-order x)) 1 * x)\n[PROOFSTEP]\nintro con\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\nh : ¬1 - ↑C r * ↑(single (-order x)) 1 * x = 0\ncon : 0 = order (1 - ↑C r * ↑(single (-order x)) 1 * x)\n⊢ False\n[PROOFSTEP]\napply coeff_order_ne_zero h\n[GOAL]\ncase neg\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nr : R\nhr : r * coeff x (order x) = 1\nh10 : 1 ≠ 0\nx0 : x ≠ 0\nh : ¬1 - ↑C r * ↑(single (-order x)) 1 * x = 0\ncon : 0 = order (1 - ↑C r * ↑(single (-order x)) 1 * x)\n⊢ coeff (1 - ↑C r * ↑(single (-order x)) 1 * x) (order (1 - ↑C r * ↑(single (-order x)) 1 * x)) = 0\n[PROOFSTEP]\nrw [← con, mul_assoc, sub_coeff, one_coeff, if_pos rfl, C_mul_eq_smul, smul_coeff, smul_eq_mul, ← add_neg_self x.order,\n  single_mul_coeff_add, one_mul, hr, sub_self]\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\n⊢ IsUnit x ↔ IsUnit (coeff x (order x))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\n⊢ IsUnit x → IsUnit (coeff x (order x))\n[PROOFSTEP]\nrintro ⟨⟨u, i, ui, iu⟩, rfl⟩\n[GOAL]\ncase mp.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nu i : HahnSeries Γ R\nui : u * i = 1\niu : i * u = 1\n⊢ IsUnit\n    (coeff (↑{ val := u, inv := i, val_inv := ui, inv_val := iu })\n      (order ↑{ val := u, inv := i, val_inv := ui, inv_val := iu }))\n[PROOFSTEP]\nrefine' isUnit_of_mul_eq_one (u.coeff u.order) (i.coeff i.order) ((mul_coeff_order_add_order u i).symm.trans _)\n[GOAL]\ncase mp.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nu i : HahnSeries Γ R\nui : u * i = 1\niu : i * u = 1\n⊢ coeff (u * i) (order u + order i) = 1\n[PROOFSTEP]\nrw [ui, one_coeff, if_pos]\n[GOAL]\ncase mp.intro.mk.hc\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nu i : HahnSeries Γ R\nui : u * i = 1\niu : i * u = 1\n⊢ order u + order i = 0\n[PROOFSTEP]\nrw [← order_mul (left_ne_zero_of_mul_eq_one ui) (right_ne_zero_of_mul_eq_one ui), ui, order_one]\n[GOAL]\ncase mpr\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\n⊢ IsUnit (coeff x (order x)) → IsUnit x\n[PROOFSTEP]\nrintro ⟨⟨u, i, ui, iu⟩, h⟩\n[GOAL]\ncase mpr.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nu i : R\nui : u * i = 1\niu : i * u = 1\nh : ↑{ val := u, inv := i, val_inv := ui, inv_val := iu } = coeff x (order x)\n⊢ IsUnit x\n[PROOFSTEP]\nrw [Units.val_mk] at h \n[GOAL]\ncase mpr.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nu i : R\nui : u * i = 1\niu : i * u = 1\nh : u = coeff x (order x)\n⊢ IsUnit x\n[PROOFSTEP]\nrw [h] at iu \n[GOAL]\ncase mpr.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nu i : R\nui : u * i = 1\niu : i * coeff x (order x) = 1\nh : u = coeff x (order x)\n⊢ IsUnit x\n[PROOFSTEP]\nhave h := SummableFamily.one_sub_self_mul_hsum_powers (unit_aux x iu)\n[GOAL]\ncase mpr.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nu i : R\nui : u * i = 1\niu : i * coeff x (order x) = 1\nh✝ : u = coeff x (order x)\nh :\n  (1 - (1 - ↑C i * ↑(single (-order x)) 1 * x)) *\n      SummableFamily.hsum\n        (SummableFamily.powers (1 - ↑C i * ↑(single (-order x)) 1 * x)\n          (_ : 0 < ↑(addVal Γ R) (1 - ↑C i * ↑(single (-order x)) 1 * x))) =\n    1\n⊢ IsUnit x\n[PROOFSTEP]\nrw [sub_sub_cancel] at h \n[GOAL]\ncase mpr.intro.mk\nΓ : Type u_1\nR : Type u_2\ninst✝² : LinearOrderedAddCommGroup Γ\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : HahnSeries Γ R\nu i : R\nui : u * i = 1\niu : i * coeff x (order x) = 1\nh✝ : u = coeff x (order x)\nh :\n  ↑C i * ↑(single (-order x)) 1 * x *\n      SummableFamily.hsum\n        (SummableFamily.powers (1 - ↑C i * ↑(single (-order x)) 1 * x)\n          (_ : 0 < ↑(addVal Γ R) (1 - ↑C i * ↑(single (-order x)) 1 * x))) =\n    1\n⊢ IsUnit x\n[PROOFSTEP]\nexact isUnit_of_mul_isUnit_right (isUnit_of_mul_eq_one _ _ h)\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : LinearOrderedAddCommGroup Γ\ninst✝ : Field R\nsrc✝¹ : IsDomain (HahnSeries Γ R) := inferInstanceAs (IsDomain (HahnSeries Γ R))\nsrc✝ : CommRing (HahnSeries Γ R) := inferInstanceAs (CommRing (HahnSeries Γ R))\nx : HahnSeries Γ R\nx0 : x ≠ 0\n⊢ x * x⁻¹ = 1\n[PROOFSTEP]\nrefine' (congr rfl (dif_neg x0)).trans _\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : LinearOrderedAddCommGroup Γ\ninst✝ : Field R\nsrc✝¹ : IsDomain (HahnSeries Γ R) := inferInstanceAs (IsDomain (HahnSeries Γ R))\nsrc✝ : CommRing (HahnSeries Γ R) := inferInstanceAs (CommRing (HahnSeries Γ R))\nx : HahnSeries Γ R\nx0 : x ≠ 0\n⊢ x *\n      (↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 *\n        SummableFamily.hsum\n          (SummableFamily.powers (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)\n            (_ : 0 < ↑(addVal Γ R) (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)))) =\n    1\n[PROOFSTEP]\nhave h := SummableFamily.one_sub_self_mul_hsum_powers (unit_aux x (inv_mul_cancel (coeff_order_ne_zero x0)))\n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : LinearOrderedAddCommGroup Γ\ninst✝ : Field R\nsrc✝¹ : IsDomain (HahnSeries Γ R) := inferInstanceAs (IsDomain (HahnSeries Γ R))\nsrc✝ : CommRing (HahnSeries Γ R) := inferInstanceAs (CommRing (HahnSeries Γ R))\nx : HahnSeries Γ R\nx0 : x ≠ 0\nh :\n  (1 - (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)) *\n      SummableFamily.hsum\n        (SummableFamily.powers (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)\n          (_ : 0 < ↑(addVal Γ R) (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x))) =\n    1\n⊢ x *\n      (↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 *\n        SummableFamily.hsum\n          (SummableFamily.powers (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)\n            (_ : 0 < ↑(addVal Γ R) (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)))) =\n    1\n[PROOFSTEP]\nrw [sub_sub_cancel] at h \n[GOAL]\nΓ : Type u_1\nR : Type u_2\ninst✝¹ : LinearOrderedAddCommGroup Γ\ninst✝ : Field R\nsrc✝¹ : IsDomain (HahnSeries Γ R) := inferInstanceAs (IsDomain (HahnSeries Γ R))\nsrc✝ : CommRing (HahnSeries Γ R) := inferInstanceAs (CommRing (HahnSeries Γ R))\nx : HahnSeries Γ R\nx0 : x ≠ 0\nh :\n  ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x *\n      SummableFamily.hsum\n        (SummableFamily.powers (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)\n          (_ : 0 < ↑(addVal Γ R) (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x))) =\n    1\n⊢ x *\n      (↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 *\n        SummableFamily.hsum\n          (SummableFamily.powers (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)\n            (_ : 0 < ↑(addVal Γ R) (1 - ↑C (coeff x (order x))⁻¹ * ↑(single (-order x)) 1 * x)))) =\n    1\n[PROOFSTEP]\nrw [← mul_assoc, mul_comm x, h]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.HahnSeries", "llama_tokens": 116267, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.29401824317072395}}
{"text": "[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\n⊢ card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n[PROOFSTEP]\nlet i : DecidableRel ((· ⊆ ·) : Finset α → Finset α → Prop) := fun _ _ => Classical.dec _\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\n⊢ card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n[PROOFSTEP]\nrefine' card_mul_le_card_mul' (· ⊆ ·) (fun s hs => _) (fun s hs => _)\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ 𝒜\n⊢ r ≤ card (bipartiteBelow (fun x x_1 => x ⊆ x_1) (∂ 𝒜) s)\n[PROOFSTEP]\nrw [← h𝒜 hs, ← card_image_of_injOn s.erase_injOn]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ 𝒜\n⊢ card (image (erase s) s) ≤ card (bipartiteBelow (fun x x_1 => x ⊆ x_1) (∂ 𝒜) s)\n[PROOFSTEP]\nrefine' card_le_of_subset _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ 𝒜\n⊢ image (erase s) s ⊆ bipartiteBelow (fun x x_1 => x ⊆ x_1) (∂ 𝒜) s\n[PROOFSTEP]\nsimp_rw [image_subset_iff, mem_bipartiteBelow]\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ 𝒜\n⊢ ∀ (x : α), x ∈ s → erase s x ∈ ∂ 𝒜 ∧ erase s x ⊆ s\n[PROOFSTEP]\nexact fun a ha => ⟨erase_mem_shadow hs ha, erase_subset _ _⟩\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\n⊢ card (bipartiteAbove (fun x x_1 => x ⊆ x_1) 𝒜 s) ≤ Fintype.card α - r + 1\n[PROOFSTEP]\nrefine' le_trans _ tsub_tsub_le_tsub_add\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\n⊢ card (bipartiteAbove (fun x x_1 => x ⊆ x_1) 𝒜 s) ≤ Fintype.card α - (r - 1)\n[PROOFSTEP]\nrw [← (Set.Sized.shadow h𝒜) hs, ← card_compl, ← card_image_of_injOn (insert_inj_on' _)]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\n⊢ card (bipartiteAbove (fun x x_1 => x ⊆ x_1) 𝒜 s) ≤ card (image (fun a => insert a s) sᶜ)\n[PROOFSTEP]\nrefine'\n  card_le_of_subset fun t ht =>\n    _\n      -- porting note: commented out the following line\n        -- infer_instance\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ bipartiteAbove (fun x x_1 => x ⊆ x_1) 𝒜 s\n⊢ t ∈ image (fun a => insert a s) sᶜ\n[PROOFSTEP]\nrw [mem_bipartiteAbove] at ht \n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\n⊢ t ∈ image (fun a => insert a s) sᶜ\n[PROOFSTEP]\nhave : ∅ ∉ 𝒜 := by\n  rw [← mem_coe, h𝒜.empty_mem_iff, coe_eq_singleton]\n  rintro rfl\n  rw [shadow_singleton_empty] at hs \n  exact not_mem_empty s hs\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\n⊢ ¬∅ ∈ 𝒜\n[PROOFSTEP]\nrw [← mem_coe, h𝒜.empty_mem_iff, coe_eq_singleton]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\n⊢ ¬𝒜 = {∅}\n[PROOFSTEP]\nrintro rfl\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nr : ℕ\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns t : Finset α\nh𝒜 : Set.Sized r ↑{∅}\nhs : s ∈ ∂ {∅}\nht : t ∈ {∅} ∧ s ⊆ t\n⊢ False\n[PROOFSTEP]\nrw [shadow_singleton_empty] at hs \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\nr : ℕ\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns t : Finset α\nh𝒜 : Set.Sized r ↑{∅}\nhs : s ∈ ∅\nht : t ∈ {∅} ∧ s ⊆ t\n⊢ False\n[PROOFSTEP]\nexact not_mem_empty s hs\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\nthis : ¬∅ ∈ 𝒜\n⊢ t ∈ image (fun a => insert a s) sᶜ\n[PROOFSTEP]\nhave h :=\n  exists_eq_insert_iff.2 ⟨ht.2, by rw [(sized_shadow_iff this).1 (Set.Sized.shadow h𝒜) ht.1, (Set.Sized.shadow h𝒜) hs]⟩\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\nthis : ¬∅ ∈ 𝒜\n⊢ card s + 1 = card t\n[PROOFSTEP]\nrw [(sized_shadow_iff this).1 (Set.Sized.shadow h𝒜) ht.1, (Set.Sized.shadow h𝒜) hs]\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nt : Finset α\nht : t ∈ 𝒜 ∧ s ⊆ t\nthis : ¬∅ ∈ 𝒜\nh : ∃ a x, insert a s = t\n⊢ t ∈ image (fun a => insert a s) sᶜ\n[PROOFSTEP]\nrcases h with ⟨a, ha, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nh𝒜 : Set.Sized r ↑𝒜\ni : DecidableRel fun x x_1 => x ⊆ x_1 := fun x x_1 => Classical.dec ((fun x x_2 => x ⊆ x_2) x x_1)\ns : Finset α\nhs : s ∈ ∂ 𝒜\nthis : ¬∅ ∈ 𝒜\na : α\nha : ¬a ∈ s\nht : insert a s ∈ 𝒜 ∧ s ⊆ insert a s\n⊢ insert a s ∈ image (fun a => insert a s) sᶜ\n[PROOFSTEP]\nexact mem_image_of_mem _ (mem_compl.2 ha)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nh𝒜 : Set.Sized r ↑𝒜\n⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card (∂ 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nobtain hr' | hr' := lt_or_le (Fintype.card α) r\n[GOAL]\ncase inl\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nh𝒜 : Set.Sized r ↑𝒜\nhr' : Fintype.card α < r\n⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card (∂ 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nrw [choose_eq_zero_of_lt hr', cast_zero, div_zero]\n[GOAL]\ncase inl\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nh𝒜 : Set.Sized r ↑𝒜\nhr' : Fintype.card α < r\n⊢ 0 ≤ ↑(card (∂ 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nexact div_nonneg (cast_nonneg _) (cast_nonneg _)\n[GOAL]\ncase inr\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nh𝒜 : Set.Sized r ↑𝒜\nhr' : r ≤ Fintype.card α\n⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card (∂ 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nreplace h𝒜 := card_mul_le_card_shadow_mul h𝒜\n[GOAL]\ncase inr\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ ↑(card 𝒜) / ↑(Nat.choose (Fintype.card α) r) ≤ ↑(card (∂ 𝒜)) / ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nrw [div_le_div_iff]\n[GOAL]\ncase inr\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ ↑(card 𝒜) * ↑(Nat.choose (Fintype.card α) (r - 1)) ≤ ↑(card (∂ 𝒜)) * ↑(Nat.choose (Fintype.card α) r)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.b0\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ 0 < ↑(Nat.choose (Fintype.card α) r)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr.d0\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ 0 < ↑(Nat.choose (Fintype.card α) (r - 1))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (r - 1) ≤ card (∂ 𝒜) * Nat.choose (Fintype.card α) r\n[PROOFSTEP]\ncases' r with r\n[GOAL]\ncase inr.zero\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nhr : zero ≠ 0\nhr' : zero ≤ Fintype.card α\nh𝒜 : card 𝒜 * zero ≤ card (∂ 𝒜) * (Fintype.card α - zero + 1)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (zero - 1) ≤ card (∂ 𝒜) * Nat.choose (Fintype.card α) zero\n[PROOFSTEP]\nexact (hr rfl).elim\n[GOAL]\ncase inr.succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : succ r ≠ 0\nhr' : succ r ≤ Fintype.card α\nh𝒜 : card 𝒜 * succ r ≤ card (∂ 𝒜) * (Fintype.card α - succ r + 1)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (succ r - 1) ≤ card (∂ 𝒜) * Nat.choose (Fintype.card α) (succ r)\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one] at *\n[GOAL]\ncase inr.succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - (r + 1) + 1)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) ≤ card (∂ 𝒜) * Nat.choose (Fintype.card α) (r + 1)\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub hr', add_tsub_add_eq_tsub_right] at h𝒜 \n[GOAL]\ncase inr.succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) ≤ card (∂ 𝒜) * Nat.choose (Fintype.card α) (r + 1)\n[PROOFSTEP]\napply le_of_mul_le_mul_right _ (pos_iff_ne_zero.2 hr)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) * (r + 1) ≤\n    card (∂ 𝒜) * Nat.choose (Fintype.card α) (r + 1) * (r + 1)\n[PROOFSTEP]\nconvert Nat.mul_le_mul_right ((Fintype.card α).choose r) h𝒜 using 1\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ card 𝒜 * Nat.choose (Fintype.card α) (r + 1 - 1) * (r + 1) = card 𝒜 * (r + 1) * Nat.choose (Fintype.card α) r\n[PROOFSTEP]\nsimp [mul_assoc, Nat.choose_succ_right_eq]\n[GOAL]\ncase h.e'_3\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ Nat.choose (Fintype.card α) r * (r + 1) = (r + 1) * Nat.choose (Fintype.card α) r ∨ 𝒜 = ∅\n[PROOFSTEP]\nexact Or.inl (mul_comm _ _)\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ card (∂ 𝒜) * Nat.choose (Fintype.card α) (r + 1) * (r + 1) =\n    card (∂ 𝒜) * (Fintype.card α - r) * Nat.choose (Fintype.card α) r\n[PROOFSTEP]\nsimp only [mul_assoc, choose_succ_right_eq, mul_eq_mul_left_iff]\n[GOAL]\ncase h.e'_4\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r + 1 ≠ 0\nhr' : r + 1 ≤ Fintype.card α\nh𝒜 : card 𝒜 * (r + 1) ≤ card (∂ 𝒜) * (Fintype.card α - r)\n⊢ Nat.choose (Fintype.card α) r * (Fintype.card α - r) = (Fintype.card α - r) * Nat.choose (Fintype.card α) r ∨\n    card (∂ 𝒜) = 0\n[PROOFSTEP]\nexact Or.inl (mul_comm _ _)\n[GOAL]\ncase inr.b0\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ 0 < Nat.choose (Fintype.card α) r\n[PROOFSTEP]\nexact Nat.choose_pos hr'\n[GOAL]\ncase inr.d0\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nr : ℕ\nhr : r ≠ 0\nhr' : r ≤ Fintype.card α\nh𝒜 : card 𝒜 * r ≤ card (∂ 𝒜) * (Fintype.card α - r + 1)\n⊢ 0 < Nat.choose (Fintype.card α) (r - 1)\n[PROOFSTEP]\nexact Nat.choose_pos (r.pred_le.trans hr')\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ s ∈ falling k 𝒜 ↔ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k\n[PROOFSTEP]\nsimp_rw [falling, mem_sup, mem_powersetLen]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ (∃ v, v ∈ 𝒜 ∧ s ⊆ v ∧ card s = k) ↔ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k\n[PROOFSTEP]\naesop\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\n⊢ 𝒜 # k ∪ ∂ (falling (k + 1) 𝒜) = falling k 𝒜\n[PROOFSTEP]\next s\n[GOAL]\ncase a\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\n⊢ s ∈ 𝒜 # k ∪ ∂ (falling (k + 1) 𝒜) ↔ s ∈ falling k 𝒜\n[PROOFSTEP]\nsimp_rw [mem_union, mem_slice, mem_shadow_iff, mem_falling]\n[GOAL]\ncase a\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\n⊢ (s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s) ↔\n    (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\n⊢ (s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s) →\n    (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k\n[PROOFSTEP]\nrintro (h | ⟨s, ⟨⟨t, ht, hst⟩, hs⟩, a, ha, rfl⟩)\n[GOAL]\ncase a.mp.inl\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nh : s ∈ 𝒜 ∧ card s = k\n⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k\n[PROOFSTEP]\nexact ⟨⟨s, h.1, Subset.refl _⟩, h.2⟩\n[GOAL]\ncase a.mp.inr.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k + 1\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\na : α\nha : a ∈ s\n⊢ (∃ t, t ∈ 𝒜 ∧ erase s a ⊆ t) ∧ card (erase s a) = k\n[PROOFSTEP]\nrefine' ⟨⟨t, ht, (erase_subset _ _).trans hst⟩, _⟩\n[GOAL]\ncase a.mp.inr.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k + 1\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\na : α\nha : a ∈ s\n⊢ card (erase s a) = k\n[PROOFSTEP]\nrw [card_erase_of_mem ha, hs]\n[GOAL]\ncase a.mp.inr.intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k + 1\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\na : α\nha : a ∈ s\n⊢ k + 1 - 1 = k\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.mpr\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\n⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k →\n    s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nrintro ⟨⟨t, ht, hst⟩, hs⟩\n[GOAL]\ncase a.mpr.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\n⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nby_cases h : s ∈ 𝒜\n[GOAL]\ncase pos\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : s ∈ 𝒜\n⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nexact Or.inl ⟨h, hs⟩\n[GOAL]\ncase neg\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\nh : ¬s ∈ 𝒜\n⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nobtain ⟨a, ha, hst⟩ := ssubset_iff.1 (ssubset_of_subset_of_ne hst (ht.ne_of_not_mem h).symm)\n[GOAL]\ncase neg.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k\nt : Finset α\nht : t ∈ 𝒜\nhst✝ : s ⊆ t\nh : ¬s ∈ 𝒜\na : α\nha : ¬a ∈ s\nhst : insert a s ⊆ t\n⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s\n[PROOFSTEP]\nrefine' Or.inr ⟨insert a s, ⟨⟨t, ht, hst⟩, _⟩, a, mem_insert_self _ _, erase_insert ha⟩\n[GOAL]\ncase neg.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ s : Finset α\nhs : card s = k\nt : Finset α\nht : t ∈ 𝒜\nhst✝ : s ⊆ t\nh : ¬s ∈ 𝒜\na : α\nha : ¬a ∈ s\nhst : insert a s ⊆ t\n⊢ card (insert a s) = k + 1\n[PROOFSTEP]\nrw [card_insert_of_not_mem ha, hs]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ : Finset α\nm n : ℕ\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\ns : Finset α\nh₁ : s ∈ ∂ (falling n 𝒜)\nh₂ : s ∈ 𝒜 # m\n⊢ False\n[PROOFSTEP]\nsimp_rw [mem_shadow_iff, mem_falling] at h₁ \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ : Finset α\nm n : ℕ\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\ns : Finset α\nh₂ : s ∈ 𝒜 # m\nh₁ : ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = n) ∧ ∃ a, a ∈ t ∧ erase t a = s\n⊢ False\n[PROOFSTEP]\nobtain ⟨s, ⟨⟨t, ht, hst⟩, _⟩, a, ha, rfl⟩ := h₁\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ : Finset α\nm n : ℕ\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\ns : Finset α\nright✝ : card s = n\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\na : α\nha : a ∈ s\nh₂ : erase s a ∈ 𝒜 # m\n⊢ False\n[PROOFSTEP]\nrefine' h𝒜 (slice_subset h₂) ht _ ((erase_subset _ _).trans hst)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ : Finset α\nm n : ℕ\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\ns : Finset α\nright✝ : card s = n\nt : Finset α\nht : t ∈ 𝒜\nhst : s ⊆ t\na : α\nha : a ∈ s\nh₂ : erase s a ∈ 𝒜 # m\n⊢ erase s a ≠ t\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns✝ : Finset α\nm n : ℕ\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\ns : Finset α\nright✝ : card s = n\na : α\nha : a ∈ s\nh₂ : erase s a ∈ 𝒜 # m\nht : erase s a ∈ 𝒜\nhst : s ⊆ erase s a\n⊢ False\n[PROOFSTEP]\nexact not_mem_erase _ _ (hst ha)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk : k ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in range (k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n    ↑(card (falling (Fintype.card α - k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k))\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nhk : zero ≤ Fintype.card α\n⊢ ∑ r in range (zero + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n    ↑(card (falling (Fintype.card α - zero) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - zero))\n[PROOFSTEP]\nsimp only [tsub_zero, cast_one, cast_le, sum_singleton, div_one, choose_self, range_one, zero_eq, zero_add, range_one,\n  ge_iff_le, sum_singleton, nonpos_iff_eq_zero, tsub_zero, choose_self, cast_one, div_one, cast_le]\n[GOAL]\ncase zero\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nhk : zero ≤ Fintype.card α\n⊢ card (𝒜 # Fintype.card α) ≤ card (falling (Fintype.card α) 𝒜)\n[PROOFSTEP]\nexact card_le_of_subset (slice_subset_falling _ _)\n[GOAL]\ncase succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk✝ : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k✝ ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nk : ℕ\nih :\n  k ≤ Fintype.card α →\n    ∑ r in range (k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n      ↑(card (falling (Fintype.card α - k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k))\nhk : succ k ≤ Fintype.card α\n⊢ ∑ r in range (succ k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n    ↑(card (falling (Fintype.card α - succ k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - succ k))\n[PROOFSTEP]\nrw [succ_eq_add_one] at *\n[GOAL]\ncase succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk✝ : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k✝ ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nk : ℕ\nih :\n  k ≤ Fintype.card α →\n    ∑ r in range (k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n      ↑(card (falling (Fintype.card α - k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k))\nhk : k + 1 ≤ Fintype.card α\n⊢ ∑ r in range (k + 1 + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n    ↑(card (falling (Fintype.card α - (k + 1)) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - (k + 1)))\n[PROOFSTEP]\nrw [sum_range_succ, ← slice_union_shadow_falling_succ,\n  card_disjoint_union (IsAntichain.disjoint_slice_shadow_falling h𝒜), cast_add, _root_.add_div, add_comm]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk✝ : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k✝ ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nk : ℕ\nih :\n  k ≤ Fintype.card α →\n    ∑ r in range (k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n      ↑(card (falling (Fintype.card α - k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k))\nhk : k + 1 ≤ Fintype.card α\n⊢ ↑(card (𝒜 # (Fintype.card α - (k + 1)))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - (k + 1))) +\n      ∑ x in range (k + 1), ↑(card (𝒜 # (Fintype.card α - x))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - x)) ≤\n    ↑(card (𝒜 # (Fintype.card α - (k + 1)))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - (k + 1))) +\n      ↑(card (∂ (falling (Fintype.card α - (k + 1) + 1) 𝒜))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - (k + 1)))\n[PROOFSTEP]\nrw [← tsub_tsub, tsub_add_cancel_of_le (le_tsub_of_add_le_left hk)]\n[GOAL]\ncase succ\n𝕜 : Type u_1\nα : Type u_2\ninst✝² : LinearOrderedField 𝕜\ninst✝¹ : DecidableEq α\nk✝ : ℕ\n𝒜 : Finset (Finset α)\ns : Finset α\ninst✝ : Fintype α\nhk✝ : k✝ ≤ Fintype.card α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nk : ℕ\nih :\n  k ≤ Fintype.card α →\n    ∑ r in range (k + 1), ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n      ↑(card (falling (Fintype.card α - k) 𝒜)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k))\nhk : k + 1 ≤ Fintype.card α\n⊢ ↑(card (𝒜 # (Fintype.card α - k - 1))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k - 1)) +\n      ∑ x in range (k + 1), ↑(card (𝒜 # (Fintype.card α - x))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - x)) ≤\n    ↑(card (𝒜 # (Fintype.card α - k - 1))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k - 1)) +\n      ↑(card (∂ (falling (Fintype.card α - k) 𝒜))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - k - 1))\n[PROOFSTEP]\nexact\n  add_le_add_left\n    ((ih <| le_of_succ_le hk).trans <|\n      card_div_choose_le_card_shadow_div_choose (tsub_pos_iff_lt.2 <| Nat.succ_le_iff.1 hk).ne' <| sized_falling _ _)\n    _\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in range (Fintype.card α + 1), ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) r) ≤ 1\n[PROOFSTEP]\nclassical\nrw [← sum_flip]\nrefine' (le_card_falling_div_choose le_rfl h𝒜).trans _\nrw [div_le_iff] <;> norm_cast\n· simpa only [Nat.sub_self, one_mul, Nat.choose_zero_right, falling] using Set.Sized.card_le (sized_falling 0 𝒜)\n· rw [tsub_self, choose_zero_right]\n  exact zero_lt_one\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in range (Fintype.card α + 1), ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) r) ≤ 1\n[PROOFSTEP]\nrw [← sum_flip]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in range (Fintype.card α + 1),\n      ↑(card (𝒜 # (Fintype.card α - r))) / ↑(Nat.choose (Fintype.card α) (Fintype.card α - r)) ≤\n    1\n[PROOFSTEP]\nrefine' (le_card_falling_div_choose le_rfl h𝒜).trans _\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ↑(card (falling (Fintype.card α - Fintype.card α) 𝒜)) /\n      ↑(Nat.choose (Fintype.card α) (Fintype.card α - Fintype.card α)) ≤\n    1\n[PROOFSTEP]\nrw [div_le_iff]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ↑(card (falling (Fintype.card α - Fintype.card α) 𝒜)) ≤\n    1 * ↑(Nat.choose (Fintype.card α) (Fintype.card α - Fintype.card α))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ 0 < ↑(Nat.choose (Fintype.card α) (Fintype.card α - Fintype.card α))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ card (falling (Fintype.card α - Fintype.card α) 𝒜) ≤ 1 * Nat.choose (Fintype.card α) (Fintype.card α - Fintype.card α)\n[PROOFSTEP]\nsimpa only [Nat.sub_self, one_mul, Nat.choose_zero_right, falling] using Set.Sized.card_le (sized_falling 0 𝒜)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ 0 < Nat.choose (Fintype.card α) (Fintype.card α - Fintype.card α)\n[PROOFSTEP]\nrw [tsub_self, choose_zero_right]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\n𝒜 : Finset (Finset α)\ns : Finset α\nk : ℕ\ninst✝ : Fintype α\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ 0 < 1\n[PROOFSTEP]\nexact zero_lt_one\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n[PROOFSTEP]\nclassical\nsuffices (∑ r in Iic (Fintype.card α), ((𝒜 # r).card : ℚ) / (Fintype.card α).choose (Fintype.card α / 2)) ≤ 1\n  by\n  rw [← sum_div, ← Nat.cast_sum, div_le_one] at this \n  simp only [cast_le] at this \n  rwa [sum_card_slice] at this \n  simp only [cast_pos]\n  exact choose_pos (Nat.div_le_self _ _)\nrw [Iic_eq_Icc, ← Ico_succ_right, bot_eq_zero, Ico_zero_eq_range]\nrefine' (sum_le_sum fun r hr => _).trans (sum_card_slice_div_choose_le_one h𝒜)\nrw [mem_range] at hr \nrefine' div_le_div_of_le_left _ _ _ <;> norm_cast\n· exact Nat.zero_le _\n· exact choose_pos (lt_succ_iff.1 hr)\n· exact choose_le_middle _ _\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n[PROOFSTEP]\nsuffices (∑ r in Iic (Fintype.card α), ((𝒜 # r).card : ℚ) / (Fintype.card α).choose (Fintype.card α / 2)) ≤ 1\n  by\n  rw [← sum_div, ← Nat.cast_sum, div_le_one] at this \n  simp only [cast_le] at this \n  rwa [sum_card_slice] at this \n  simp only [cast_pos]\n  exact choose_pos (Nat.div_le_self _ _)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ∑ r in Iic (Fintype.card α), ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n[PROOFSTEP]\nrw [← sum_div, ← Nat.cast_sum, div_le_one] at this \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ↑(∑ x in Iic (Fintype.card α), card (𝒜 # x)) ≤ ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2))\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ↑(∑ x in Iic (Fintype.card α), card (𝒜 # x)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n⊢ 0 < ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2))\n[PROOFSTEP]\nsimp only [cast_le] at this \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ∑ x in Iic (Fintype.card α), card (𝒜 # x) ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n⊢ card 𝒜 ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ↑(∑ x in Iic (Fintype.card α), card (𝒜 # x)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n⊢ 0 < ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2))\n[PROOFSTEP]\nrwa [sum_card_slice] at this \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ↑(∑ x in Iic (Fintype.card α), card (𝒜 # x)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n⊢ 0 < ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2))\n[PROOFSTEP]\nsimp only [cast_pos]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nthis : ↑(∑ x in Iic (Fintype.card α), card (𝒜 # x)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n⊢ 0 < Nat.choose (Fintype.card α) (Fintype.card α / 2)\n[PROOFSTEP]\nexact choose_pos (Nat.div_le_self _ _)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in Iic (Fintype.card α), ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n[PROOFSTEP]\nrw [Iic_eq_Icc, ← Ico_succ_right, bot_eq_zero, Ico_zero_eq_range]\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\n⊢ ∑ r in range (succ (Fintype.card α)), ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤ 1\n[PROOFSTEP]\nrefine' (sum_le_sum fun r hr => _).trans (sum_card_slice_div_choose_le_one h𝒜)\n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r ∈ range (succ (Fintype.card α))\n⊢ ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤\n    ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) r)\n[PROOFSTEP]\nrw [mem_range] at hr \n[GOAL]\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2)) ≤\n    ↑(card (𝒜 # r)) / ↑(Nat.choose (Fintype.card α) r)\n[PROOFSTEP]\nrefine' div_le_div_of_le_left _ _ _\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ 0 ≤ ↑(card (𝒜 # r))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ 0 < ↑(Nat.choose (Fintype.card α) r)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ ↑(Nat.choose (Fintype.card α) r) ≤ ↑(Nat.choose (Fintype.card α) (Fintype.card α / 2))\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase refine'_1\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ 0 ≤ card (𝒜 # r)\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\ncase refine'_2\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ 0 < Nat.choose (Fintype.card α) r\n[PROOFSTEP]\nexact choose_pos (lt_succ_iff.1 hr)\n[GOAL]\ncase refine'_3\n𝕜 : Type u_1\nα : Type u_2\ninst✝¹ : LinearOrderedField 𝕜\ninst✝ : Fintype α\n𝒜 : Finset (Finset α)\nh𝒜 : IsAntichain (fun x x_1 => x ⊆ x_1) ↑𝒜\nr : ℕ\nhr : r < succ (Fintype.card α)\n⊢ Nat.choose (Fintype.card α) r ≤ Nat.choose (Fintype.card α) (Fintype.card α / 2)\n[PROOFSTEP]\nexact choose_le_middle _ _\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.LYM", "llama_tokens": 20903, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.29401824317072395}}
{"text": "[GOAL]\nα : Type u_1\n⊢ LeftInverse toList ofList\n[PROOFSTEP]\nintro xs\n[GOAL]\nα : Type u_1\nxs : List α\n⊢ toList (ofList xs) = xs\n[PROOFSTEP]\ninduction xs\n[GOAL]\ncase nil\nα : Type u_1\n⊢ toList (ofList []) = []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : toList (ofList tail✝) = tail✝\n⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝\n[PROOFSTEP]\nsimpa [ofList, toList]\n[GOAL]\nα : Type u_1\n⊢ Function.RightInverse toList ofList\n[PROOFSTEP]\nintro xs\n[GOAL]\nα : Type u_1\nxs : LazyList α\n⊢ ofList (toList xs) = xs\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα : Type u_1\n⊢ ofList (toList nil) = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nxs : LazyList α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\ntl_ih✝ : ?m.1024 tl✝\n⊢ ofList (toList (cons hd✝ tl✝)) = cons hd✝ tl✝\n[PROOFSTEP]\nsimpa only [toList, ofList, cons.injEq, true_and]\n[GOAL]\ncase mk\nα : Type u_1\nxs : LazyList α\nfn✝ : Unit → LazyList α\nih : ∀ (a : Unit), ofList (toList (fn✝ a)) = fn✝ a\n⊢ { fn := fun x => ofList (toList (Thunk.get { fn := fn✝ })) } = { fn := fn✝ }\n[PROOFSTEP]\nrw [Thunk.get, ih]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : ¬Thunk.get xs = Thunk.get ys\n⊢ Decidable (cons x xs = cons y ys)\n[PROOFSTEP]\napply isFalse\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : ¬Thunk.get xs = Thunk.get ys\n⊢ ¬cons x xs = cons y ys\n[PROOFSTEP]\nsimp only [cons.injEq, not_and]\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : ¬Thunk.get xs = Thunk.get ys\n⊢ x = y → ¬xs = ys\n[PROOFSTEP]\nintro _ xs_ys\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : ¬Thunk.get xs = Thunk.get ys\na✝ : x = y\nxs_ys : xs = ys\n⊢ False\n[PROOFSTEP]\napply h2\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : ¬Thunk.get xs = Thunk.get ys\na✝ : x = y\nxs_ys : xs = ys\n⊢ Thunk.get xs = Thunk.get ys\n[PROOFSTEP]\nrw [xs_ys]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : Thunk.get xs = Thunk.get ys\n⊢ Decidable (cons x xs = cons y ys)\n[PROOFSTEP]\napply isTrue\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : Thunk.get xs = Thunk.get ys\n⊢ cons x xs = cons y ys\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_tl\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : Thunk.get xs = Thunk.get ys\n⊢ xs = ys\n[PROOFSTEP]\next\n[GOAL]\ncase h.e_tl.eq\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : x = y\nh2 : Thunk.get xs = Thunk.get ys\n⊢ Thunk.get xs = Thunk.get ys\n[PROOFSTEP]\nexact h2\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : ¬x = y\n⊢ Decidable (cons x xs = cons y ys)\n[PROOFSTEP]\napply isFalse\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : ¬x = y\n⊢ ¬cons x xs = cons y ys\n[PROOFSTEP]\nsimp only [cons.injEq, not_and]\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : ¬x = y\n⊢ x = y → ¬xs = ys\n[PROOFSTEP]\nintro\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nx : α\nxs : Thunk (LazyList α)\ny : α\nys : Thunk (LazyList α)\nh : ¬x = y\na✝ : x = y\n⊢ ¬xs = ys\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\n⊢ Decidable (nil = cons hd✝ tl✝)\n[PROOFSTEP]\napply isFalse\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\n⊢ ¬nil = cons hd✝ tl✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\n⊢ Decidable (cons hd✝ tl✝ = nil)\n[PROOFSTEP]\napply isFalse\n[GOAL]\ncase h\nα : Type u\ninst✝ : DecidableEq α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\n⊢ ¬cons hd✝ tl✝ = nil\n[PROOFSTEP]\nsimp\n[GOAL]\n⊢ LawfulTraversable LazyList\n[PROOFSTEP]\napply Equiv.isLawfulTraversable' listEquivLazyList\n[GOAL]\ncase h₀\n⊢ ∀ {α β : Type ?u.19468} (f : α → β), Functor.map f = Equiv.map listEquivLazyList f\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\n⊢ ∀ {α β : Type ?u.19468} (f : β), Functor.mapConst f = (Equiv.map listEquivLazyList ∘ const α) f\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₂\n⊢ ∀ {F : Type ?u.19468 → Type ?u.19468} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type ?u.19468}\n    (f : α → F β), traverse f = Equiv.traverse listEquivLazyList f\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₀\nα✝ β✝ : Type ?u.19468\nf✝ : α✝ → β✝\n⊢ Functor.map f✝ = Equiv.map listEquivLazyList f✝\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nα✝ β✝ : Type ?u.19468\nf✝ : β✝\n⊢ Functor.mapConst f✝ = (Equiv.map listEquivLazyList ∘ const α✝) f✝\n[PROOFSTEP]\next\n[GOAL]\ncase h₂\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf✝ : α✝ → F✝ β✝\n⊢ traverse f✝ = Equiv.traverse listEquivLazyList f✝\n[PROOFSTEP]\next\n[GOAL]\ncase h₀.h\nα✝ β✝ : Type ?u.19468\nf✝ : α✝ → β✝\nx✝ : LazyList α✝\n⊢ f✝ <$> x✝ = Equiv.map listEquivLazyList f✝ x✝\n[PROOFSTEP]\nrename_i f xs\n[GOAL]\ncase h₁.h\nα✝ β✝ : Type ?u.19468\nf✝ : β✝\nx✝ : LazyList α✝\n⊢ Functor.mapConst f✝ x✝ = (Equiv.map listEquivLazyList ∘ const α✝) f✝ x✝\n[PROOFSTEP]\nrename_i f xs\n[GOAL]\ncase h₂.h\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf✝ : α✝ → F✝ β✝\nx✝ : LazyList α✝\n⊢ traverse f✝ x✝ = Equiv.traverse listEquivLazyList f✝ x✝\n[PROOFSTEP]\nrename_i f xs\n[GOAL]\ncase h₀.h\nα✝ β✝ : Type ?u.19468\nf : α✝ → β✝\nxs : LazyList α✝\n⊢ f <$> xs = Equiv.map listEquivLazyList f xs\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase h₀.h.nil\nα✝ β✝ : Type ?u.19468\nf : α✝ → β✝\n⊢ f <$> nil = Equiv.map listEquivLazyList f nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₀.h.cons\nα✝ β✝ : Type ?u.19468\nf : α✝ → β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.19696 tl✝\n⊢ f <$> cons hd✝ tl✝ = Equiv.map listEquivLazyList f (cons hd✝ tl✝)\n[PROOFSTEP]\nsimpa only [Equiv.map, Functor.map, listEquivLazyList, Equiv.coe_fn_symm_mk, Equiv.coe_fn_mk, LazyList.traverse,\n  Seq.seq, toList, ofList, cons.injEq, true_and]\n[GOAL]\ncase h₀.h.mk\nα✝ β✝ : Type ?u.19468\nf : α✝ → β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), f <$> fn✝ a = Equiv.map listEquivLazyList f (fn✝ a)\n⊢ Thunk.pure (LazyList.traverse f (Thunk.get { fn := fn✝ })) =\n    { fn := fun x => ofList (List.map f (toList (Thunk.get { fn := fn✝ }))) }\n[PROOFSTEP]\next\n[GOAL]\ncase h₀.h.mk.eq\nα✝ β✝ : Type ?u.19468\nf : α✝ → β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), f <$> fn✝ a = Equiv.map listEquivLazyList f (fn✝ a)\n⊢ Thunk.get (Thunk.pure (LazyList.traverse f (Thunk.get { fn := fn✝ }))) =\n    Thunk.get { fn := fun x => ofList (List.map f (toList (Thunk.get { fn := fn✝ }))) }\n[PROOFSTEP]\napply ih\n[GOAL]\ncase h₁.h\nα✝ β✝ : Type ?u.19468\nf : β✝\nxs : LazyList α✝\n⊢ Functor.mapConst f xs = (Equiv.map listEquivLazyList ∘ const α✝) f xs\n[PROOFSTEP]\nsimp only [Equiv.map, listEquivLazyList, Equiv.coe_fn_symm_mk, Equiv.coe_fn_mk, comp, Functor.mapConst]\n[GOAL]\ncase h₁.h\nα✝ β✝ : Type ?u.19468\nf : β✝\nxs : LazyList α✝\n⊢ LazyList.traverse (const α✝ f) xs = ofList (const α✝ f <$> toList xs)\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase h₁.h.nil\nα✝ β✝ : Type ?u.19468\nf : β✝\n⊢ LazyList.traverse (const α✝ f) nil = ofList (const α✝ f <$> toList nil)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.h.cons\nα✝ β✝ : Type ?u.19468\nf : β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.21260 tl✝\n⊢ LazyList.traverse (const α✝ f) (cons hd✝ tl✝) = ofList (const α✝ f <$> toList (cons hd✝ tl✝))\n[PROOFSTEP]\nsimpa only [toList, ofList, LazyList.traverse, Seq.seq, Functor.map, cons.injEq, true_and]\n[GOAL]\ncase h₁.h.mk\nα✝ β✝ : Type ?u.19468\nf : β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), LazyList.traverse (const α✝ f) (fn✝ a) = ofList (const α✝ f <$> toList (fn✝ a))\n⊢ Thunk.pure (LazyList.traverse (const α✝ f) (Thunk.get { fn := fn✝ })) =\n    { fn := fun x => ofList (List.map (const α✝ f) (toList (Thunk.get { fn := fn✝ }))) }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h₁.h.mk.e_a\nα✝ β✝ : Type ?u.19468\nf : β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), LazyList.traverse (const α✝ f) (fn✝ a) = ofList (const α✝ f <$> toList (fn✝ a))\n⊢ LazyList.traverse (const α✝ f) (Thunk.get { fn := fn✝ }) =\n    ofList (List.map (const α✝ f) (toList (Thunk.get { fn := fn✝ })))\n[PROOFSTEP]\napply ih\n[GOAL]\ncase h₂.h\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\n⊢ traverse f xs = Equiv.traverse listEquivLazyList f xs\n[PROOFSTEP]\nsimp only [traverse, Equiv.traverse, listEquivLazyList, Equiv.coe_fn_mk, Equiv.coe_fn_symm_mk]\n[GOAL]\ncase h₂.h\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\n⊢ LazyList.traverse f xs = ofList <$> List.traverse f (toList xs)\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ tl ih _ ih\n[GOAL]\ncase h₂.h.nil\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\n⊢ LazyList.traverse f nil = ofList <$> List.traverse f (toList nil)\n[PROOFSTEP]\nsimp only [List.traverse, map_pure]\n[GOAL]\ncase h₂.h.nil\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\n⊢ LazyList.traverse f nil = pure (ofList [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h.cons\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl : Thunk (LazyList α✝)\nih : ?m.22684 tl\n⊢ LazyList.traverse f (cons hd✝ tl) = ofList <$> List.traverse f (toList (cons hd✝ tl))\n[PROOFSTEP]\nhave : tl.get.traverse f = ofList <$> tl.get.toList.traverse f := ih\n[GOAL]\ncase h₂.h.cons\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl : Thunk (LazyList α✝)\nih this : LazyList.traverse f (Thunk.get tl) = ofList <$> List.traverse f (toList (Thunk.get tl))\n⊢ LazyList.traverse f (cons hd✝ tl) = ofList <$> List.traverse f (toList (cons hd✝ tl))\n[PROOFSTEP]\nsimp only [traverse._eq_2, ih, Functor.map_map, seq_map_assoc, toList, List.traverse, map_seq]\n[GOAL]\ncase h₂.h.cons\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl : Thunk (LazyList α✝)\nih this : LazyList.traverse f (Thunk.get tl) = ofList <$> List.traverse f (toList (Thunk.get tl))\n⊢ (Seq.seq (((fun x => x ∘ Thunk.pure ∘ ofList) ∘ cons) <$> f hd✝) fun x => List.traverse f (toList (Thunk.get tl))) =\n    Seq.seq (((fun x => ofList ∘ x) ∘ List.cons) <$> f hd✝) fun x => List.traverse f (toList (Thunk.get tl))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h.mk\nF✝ : Type ?u.19468 → Type ?u.19468\ninst✝¹ : Applicative F✝\ninst✝ : LawfulApplicative F✝\nα✝ β✝ : Type ?u.19468\nf : α✝ → F✝ β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), LazyList.traverse f (fn✝ a) = ofList <$> List.traverse f (toList (fn✝ a))\n⊢ LazyList.traverse f (Thunk.get { fn := fn✝ }) = ofList <$> List.traverse f (toList (Thunk.get { fn := fn✝ }))\n[PROOFSTEP]\napply ih\n[GOAL]\nα : Type u_1\nxs : LazyList α\n⊢ append xs (Thunk.pure nil) = xs\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα : Type u_1\n⊢ append nil (Thunk.pure nil) = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nxs : LazyList α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\ntl_ih✝ : ?m.62141 tl✝\n⊢ append (cons hd✝ tl✝) (Thunk.pure nil) = cons hd✝ tl✝\n[PROOFSTEP]\nsimpa only [append, cons.injEq, true_and]\n[GOAL]\ncase mk\nα : Type u_1\nxs : LazyList α\nfn✝ : Unit → LazyList α\nih : ∀ (a : Unit), append (fn✝ a) (Thunk.pure nil) = fn✝ a\n⊢ { fn := fun x => append (Thunk.get { fn := fn✝ }) (Thunk.pure nil) } = { fn := fn✝ }\n[PROOFSTEP]\next\n[GOAL]\ncase mk.eq\nα : Type u_1\nxs : LazyList α\nfn✝ : Unit → LazyList α\nih : ∀ (a : Unit), append (fn✝ a) (Thunk.pure nil) = fn✝ a\n⊢ Thunk.get { fn := fun x => append (Thunk.get { fn := fn✝ }) (Thunk.pure nil) } = Thunk.get { fn := fn✝ }\n[PROOFSTEP]\napply ih\n[GOAL]\nα : Type u_1\nxs ys zs : LazyList α\n⊢ append (append xs { fn := fun x => ys }) { fn := fun x => zs } =\n    append xs { fn := fun x => append ys { fn := fun x => zs } }\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα : Type u_1\nys zs : LazyList α\n⊢ append (append nil { fn := fun x => ys }) { fn := fun x => zs } =\n    append nil { fn := fun x => append ys { fn := fun x => zs } }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nxs ys zs : LazyList α\nhd✝ : α\ntl✝ : Thunk (LazyList α)\ntl_ih✝ : ?m.65384 tl✝\n⊢ append (append (cons hd✝ tl✝) { fn := fun x => ys }) { fn := fun x => zs } =\n    append (cons hd✝ tl✝) { fn := fun x => append ys { fn := fun x => zs } }\n[PROOFSTEP]\nsimpa only [append, cons.injEq, true_and]\n[GOAL]\ncase mk\nα : Type u_1\nxs ys zs : LazyList α\nfn✝ : Unit → LazyList α\nih :\n  ∀ (a : Unit),\n    append (append (fn✝ a) { fn := fun x => ys }) { fn := fun x => zs } =\n      append (fn✝ a) { fn := fun x => append ys { fn := fun x => zs } }\n⊢ {\n      fn := fun x =>\n        append (Thunk.get { fn := fun x => append (Thunk.get { fn := fn✝ }) { fn := fun x => ys } })\n          { fn := fun x => zs } } =\n    { fn := fun x => append (Thunk.get { fn := fn✝ }) { fn := fun x => append ys { fn := fun x => zs } } }\n[PROOFSTEP]\next\n[GOAL]\ncase mk.eq\nα : Type u_1\nxs ys zs : LazyList α\nfn✝ : Unit → LazyList α\nih :\n  ∀ (a : Unit),\n    append (append (fn✝ a) { fn := fun x => ys }) { fn := fun x => zs } =\n      append (fn✝ a) { fn := fun x => append ys { fn := fun x => zs } }\n⊢ Thunk.get\n      {\n        fn := fun x =>\n          append (Thunk.get { fn := fun x => append (Thunk.get { fn := fn✝ }) { fn := fun x => ys } })\n            { fn := fun x => zs } } =\n    Thunk.get { fn := fun x => append (Thunk.get { fn := fn✝ }) { fn := fun x => append ys { fn := fun x => zs } } }\n[PROOFSTEP]\napply ih\n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\n⊢ LazyList.bind (append xs ys) f = append (LazyList.bind xs f) { fn := fun x => LazyList.bind (Thunk.get ys) f }\n[PROOFSTEP]\nmatch xs with\n| LazyList.nil => rfl\n| LazyList.cons x xs =>\n  simp only [append, Thunk.get, LazyList.bind]\n  have := append_bind xs.get ys f\n  simp only [Thunk.get] at this \n  rw [this, append_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\n⊢ LazyList.bind (append nil ys) f = append (LazyList.bind nil f) { fn := fun x => LazyList.bind (Thunk.get ys) f }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs✝ : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\nx : α\nxs : Thunk (LazyList α)\n⊢ LazyList.bind (append (cons x xs) ys) f =\n    append (LazyList.bind (cons x xs) f) { fn := fun x => LazyList.bind (Thunk.get ys) f }\n[PROOFSTEP]\nsimp only [append, Thunk.get, LazyList.bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs✝ : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\nx : α\nxs : Thunk (LazyList α)\n⊢ append (f x) { fn := fun x => LazyList.bind (append (Thunk.fn xs ()) ys) f } =\n    append (append (f x) { fn := fun x => LazyList.bind (Thunk.fn xs ()) f })\n      { fn := fun x => LazyList.bind (Thunk.fn ys ()) f }\n[PROOFSTEP]\nhave := append_bind xs.get ys f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs✝ : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\nx : α\nxs : Thunk (LazyList α)\nthis :\n  LazyList.bind (append (Thunk.get xs) ys) f =\n    append (LazyList.bind (Thunk.get xs) f) { fn := fun x => LazyList.bind (Thunk.get ys) f }\n⊢ append (f x) { fn := fun x => LazyList.bind (append (Thunk.fn xs ()) ys) f } =\n    append (append (f x) { fn := fun x => LazyList.bind (Thunk.fn xs ()) f })\n      { fn := fun x => LazyList.bind (Thunk.fn ys ()) f }\n[PROOFSTEP]\nsimp only [Thunk.get] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nxs✝ : LazyList α\nys : Thunk (LazyList α)\nf : α → LazyList β\nx : α\nxs : Thunk (LazyList α)\nthis :\n  LazyList.bind (append (Thunk.fn xs ()) ys) f =\n    append (LazyList.bind (Thunk.fn xs ()) f) { fn := fun x => LazyList.bind (Thunk.fn ys ()) f }\n⊢ append (f x) { fn := fun x => LazyList.bind (append (Thunk.fn xs ()) ys) f } =\n    append (append (f x) { fn := fun x => LazyList.bind (Thunk.fn xs ()) f })\n      { fn := fun x => LazyList.bind (Thunk.fn ys ()) f }\n[PROOFSTEP]\nrw [this, append_assoc]\n[GOAL]\n⊢ ∀ {α : Type ?u.75696} (x : LazyList α), id <$> x = x\n[PROOFSTEP]\nintro _ xs\n[GOAL]\nα✝ : Type ?u.75696\nxs : LazyList α✝\n⊢ id <$> xs = xs\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα✝ : Type ?u.75696\n⊢ id <$> nil = nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα✝ : Type ?u.75696\nxs : LazyList α✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.75815 tl✝\n⊢ id <$> cons hd✝ tl✝ = cons hd✝ tl✝\n[PROOFSTEP]\nsimpa only [Functor.map, traverse._eq_2, id_eq, Id.map_eq, Seq.seq, cons.injEq, true_and]\n[GOAL]\ncase mk\nα✝ : Type ?u.75696\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), id <$> fn✝ a = fn✝ a\n⊢ Thunk.pure (LazyList.traverse id (Thunk.get { fn := fn✝ })) = { fn := fn✝ }\n[PROOFSTEP]\next\n[GOAL]\ncase mk.eq\nα✝ : Type ?u.75696\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), id <$> fn✝ a = fn✝ a\n⊢ Thunk.get (Thunk.pure (LazyList.traverse id (Thunk.get { fn := fn✝ }))) = Thunk.get { fn := fn✝ }\n[PROOFSTEP]\napply ih\n[GOAL]\n⊢ ∀ {α β : Type ?u.75696} (x : α) (f : α → LazyList β), pure x >>= f = f x\n[PROOFSTEP]\nintros\n[GOAL]\nα✝ β✝ : Type ?u.75696\nx✝ : α✝\nf✝ : α✝ → LazyList β✝\n⊢ pure x✝ >>= f✝ = f✝ x✝\n[PROOFSTEP]\nsimp only [bind, pure, singleton, LazyList.bind]\n[GOAL]\nα✝ β✝ : Type ?u.75696\nx✝ : α✝\nf✝ : α✝ → LazyList β✝\n⊢ append (f✝ x✝) { fn := fun x => LazyList.bind (Thunk.get (Thunk.pure nil)) f✝ } = f✝ x✝\n[PROOFSTEP]\napply append_nil\n[GOAL]\n⊢ ∀ {α β γ : Type ?u.75696} (x : LazyList α) (f : α → LazyList β) (g : β → LazyList γ),\n    x >>= f >>= g = x >>= fun x => f x >>= g\n[PROOFSTEP]\nintro _ _ _ xs _ _\n[GOAL]\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\n⊢ xs >>= f✝ >>= g✝ = xs >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα✝ β✝ γ✝ : Type ?u.75696\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\n⊢ nil >>= f✝ >>= g✝ = nil >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.76333 tl✝\n⊢ cons hd✝ tl✝ >>= f✝ >>= g✝ = cons hd✝ tl✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\nsimp only [bind, LazyList.bind, append_bind]\n[GOAL]\ncase cons\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.76333 tl✝\n⊢ append (LazyList.bind (f✝ hd✝) g✝)\n      { fn := fun x => LazyList.bind (Thunk.get { fn := fun x => LazyList.bind (Thunk.get tl✝) f✝ }) g✝ } =\n    append (LazyList.bind (f✝ hd✝) g✝) { fn := fun x => LazyList.bind (Thunk.get tl✝) fun x => LazyList.bind (f✝ x) g✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), fn✝ a >>= f✝ >>= g✝ = fn✝ a >>= fun x => f✝ x >>= g✝\n⊢ { fn := fun x => LazyList.bind (Thunk.get { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) f✝ }) g✝ } =\n    { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) fun x => LazyList.bind (f✝ x) g✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.e_fn\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), fn✝ a >>= f✝ >>= g✝ = fn✝ a >>= fun x => f✝ x >>= g✝\n⊢ (fun x => LazyList.bind (Thunk.get { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) f✝ }) g✝) = fun x =>\n    LazyList.bind (Thunk.get { fn := fn✝ }) fun x => LazyList.bind (f✝ x) g✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase mk.e_fn.h\nα✝ β✝ γ✝ : Type ?u.75696\nxs : LazyList α✝\nf✝ : α✝ → LazyList β✝\ng✝ : β✝ → LazyList γ✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), fn✝ a >>= f✝ >>= g✝ = fn✝ a >>= fun x => f✝ x >>= g✝\nx✝ : Unit\n⊢ LazyList.bind (Thunk.get { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) f✝ }) g✝ =\n    LazyList.bind (Thunk.get { fn := fn✝ }) fun x => LazyList.bind (f✝ x) g✝\n[PROOFSTEP]\napply ih\n[GOAL]\n⊢ ∀ {α β : Type ?u.75696} (f : α → β) (x : LazyList α),\n    (do\n        let y ← x\n        pure (f y)) =\n      f <$> x\n[PROOFSTEP]\nintro _ _ f xs\n[GOAL]\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\n⊢ (do\n      let y ← xs\n      pure (f y)) =\n    f <$> xs\n[PROOFSTEP]\nsimp only [bind, Functor.map, pure, singleton]\n[GOAL]\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\n⊢ (LazyList.bind xs fun y => cons (f y) (Thunk.pure nil)) = LazyList.traverse f xs\n[PROOFSTEP]\ninduction' xs using LazyList.rec with _ _ _ _ ih\n[GOAL]\ncase nil\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\n⊢ (LazyList.bind nil fun y => cons (f y) (Thunk.pure nil)) = LazyList.traverse f nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.77095 tl✝\n⊢ (LazyList.bind (cons hd✝ tl✝) fun y => cons (f y) (Thunk.pure nil)) = LazyList.traverse f (cons hd✝ tl✝)\n[PROOFSTEP]\nsimp only [bind._eq_2, append, traverse._eq_2, Id.map_eq, cons.injEq, true_and]\n[GOAL]\ncase cons\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\nhd✝ : α✝\ntl✝ : Thunk (LazyList α✝)\ntl_ih✝ : ?m.77095 tl✝\n⊢ cons (f hd✝)\n      {\n        fn := fun x =>\n          append (Thunk.get (Thunk.pure nil))\n            { fn := fun x => LazyList.bind (Thunk.get tl✝) fun y => cons (f y) (Thunk.pure nil) } } =\n    Seq.seq (cons (f hd✝)) fun x => Thunk.pure (LazyList.traverse f (Thunk.get tl✝))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), (LazyList.bind (fn✝ a) fun y => cons (f y) (Thunk.pure nil)) = LazyList.traverse f (fn✝ a)\n⊢ {\n      fn := fun x =>\n        append (Thunk.get (Thunk.pure nil))\n          { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) fun y => cons (f y) (Thunk.pure nil) } } =\n    (fun x => Thunk.pure (LazyList.traverse f (Thunk.get { fn := fn✝ }))) ()\n[PROOFSTEP]\next\n[GOAL]\ncase mk.eq\nα✝ β✝ : Type ?u.75696\nf : α✝ → β✝\nxs : LazyList α✝\nfn✝ : Unit → LazyList α✝\nih : ∀ (a : Unit), (LazyList.bind (fn✝ a) fun y => cons (f y) (Thunk.pure nil)) = LazyList.traverse f (fn✝ a)\n⊢ Thunk.get\n      {\n        fn := fun x =>\n          append (Thunk.get (Thunk.pure nil))\n            { fn := fun x => LazyList.bind (Thunk.get { fn := fn✝ }) fun y => cons (f y) (Thunk.pure nil) } } =\n    Thunk.get ((fun x => Thunk.pure (LazyList.traverse f (Thunk.get { fn := fn✝ }))) ())\n[PROOFSTEP]\napply ih\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx : α\n⊢ Decidable (x ∈ nil)\n[PROOFSTEP]\napply Decidable.isFalse\n[GOAL]\ncase h\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx : α\n⊢ ¬x ∈ nil\n[PROOFSTEP]\nsimp [Membership.mem, LazyList.Mem]\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : x = y\n⊢ Decidable (x ∈ cons y ys)\n[PROOFSTEP]\napply Decidable.isTrue\n[GOAL]\ncase h\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : x = y\n⊢ x ∈ cons y ys\n[PROOFSTEP]\nsimp only [Membership.mem, LazyList.Mem]\n[GOAL]\ncase h\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : x = y\n⊢ x = y ∨ LazyList.Mem x (Thunk.get ys)\n[PROOFSTEP]\nexact Or.inl h\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : ¬x = y\n⊢ Decidable (x ∈ cons y ys)\n[PROOFSTEP]\nhave := Mem.decidable x ys.get\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : ¬x = y\nthis : Decidable (x ∈ Thunk.get ys)\n⊢ Decidable (x ∈ cons y ys)\n[PROOFSTEP]\nhave : (x ∈ ys.get) ↔ (x ∈ cons y ys) := by simp [(· ∈ ·), LazyList.Mem, h]\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : ¬x = y\nthis : Decidable (x ∈ Thunk.get ys)\n⊢ x ∈ Thunk.get ys ↔ x ∈ cons y ys\n[PROOFSTEP]\nsimp [(· ∈ ·), LazyList.Mem, h]\n[GOAL]\nα : Type ?u.93639\ninst✝ : DecidableEq α\nx y : α\nys : Thunk (LazyList α)\nh : ¬x = y\nthis✝ : Decidable (x ∈ Thunk.get ys)\nthis : x ∈ Thunk.get ys ↔ x ∈ cons y ys\n⊢ Decidable (x ∈ cons y ys)\n[PROOFSTEP]\nexact decidable_of_decidable_of_iff this\n[GOAL]\nα : Type u_1\nx y : α\nys : Thunk (LazyList α)\n⊢ x ∈ cons y ys ↔ x = y ∨ x ∈ Thunk.get ys\n[PROOFSTEP]\nsimp [Membership.mem, LazyList.Mem]\n[GOAL]\nα : Type u_1\np : α → Prop\na : α\nl : Thunk (LazyList α)\n⊢ (∀ (x : α), x ∈ cons a l → p x) ↔ p a ∧ ∀ (x : α), x ∈ Thunk.get l → p x\n[PROOFSTEP]\nsimp only [Membership.mem, LazyList.Mem, or_imp, forall_and, forall_eq]\n", "meta": {"mathlib_filename": "Mathlib.Data.LazyList.Basic", "llama_tokens": 13525, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5736784220301065, "lm_q2_score": 0.5117166047041652, "lm_q1q2_score": 0.2935607743132893}}
{"text": "[GOAL]\nα : Type u\ninst✝ : LinearOrder α\n⊢ IsTotalPreorder α fun x x_1 => x ≤ x_1\n[PROOFSTEP]\ninfer_instance\n  -- porting note: added\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.lt ↔ a < b\n[PROOFSTEP]\nrw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.lt ↔ a < b\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : a < b\n⊢ Ordering.lt = Ordering.lt ↔ a < b\n[PROOFSTEP]\nsimp only [*, lt_irrefl]\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False ↔ a < b\n[PROOFSTEP]\nsimp only [*, lt_irrefl]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False ↔ a < b\n[PROOFSTEP]\nsimp only [*, lt_irrefl]\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.gt ↔ a > b\n[PROOFSTEP]\nrw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.gt ↔ a > b\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : a < b\n⊢ False ↔ a > b\n[PROOFSTEP]\nsimp only [*, lt_irrefl, not_lt_of_gt]\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ False ↔ a > b\n[PROOFSTEP]\nsimp only [*, lt_irrefl, not_lt_of_gt]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ Ordering.gt = Ordering.gt ↔ a > b\n[PROOFSTEP]\nsimp only [*, lt_irrefl, not_lt_of_gt]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ True ↔ a > b\n[PROOFSTEP]\ncase _ h₁ h₂ =>\n  have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂\n  exact true_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh₁ : ¬a < b\nh₂ : ¬a = b\n⊢ True ↔ a > b\n[PROOFSTEP]\ncase _ h₁ h₂ =>\n  have h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂\n  exact true_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh₁ : ¬a < b\nh₂ : ¬a = b\n⊢ True ↔ a > b\n[PROOFSTEP]\nhave h : b < a := lt_trichotomy a b |>.resolve_left h₁ |>.resolve_left h₂\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh₁ : ¬a < b\nh₂ : ¬a = b\nh : b < a\n⊢ True ↔ a > b\n[PROOFSTEP]\nexact true_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.eq ↔ a = b\n[PROOFSTEP]\nrw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.eq ↔ a = b\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : a < b\n⊢ False ↔ a = b\n[PROOFSTEP]\ntry simp only []\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : a < b\n⊢ False ↔ a = b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ Ordering.eq = Ordering.eq ↔ a = b\n[PROOFSTEP]\ntry simp only []\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ Ordering.eq = Ordering.eq ↔ a = b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False ↔ a = b\n[PROOFSTEP]\ntry simp only []\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False ↔ a = b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : a < b\n⊢ False ↔ a = b\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ True ↔ a = b\ncase neg α : Type u inst✝ : LinearOrder α a b : α h✝¹ : ¬a < b h✝ : ¬a = b ⊢ False ↔ a = b\n[PROOFSTEP]\ncase _ h => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : a < b\n⊢ False ↔ a = b\n[PROOFSTEP]\ncase _ h => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : a < b\n⊢ False ↔ a = b\n[PROOFSTEP]\nexact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h\n[GOAL]\ncase pos\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : a = b\n⊢ True ↔ a = b\ncase neg α : Type u inst✝ : LinearOrder α a b : α h✝¹ : ¬a < b h✝ : ¬a = b ⊢ False ↔ a = b\n[PROOFSTEP]\ncase _ _ h => exact true_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : ¬a < b\nh : a = b\n⊢ True ↔ a = b\n[PROOFSTEP]\ncase _ _ h => exact true_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : ¬a < b\nh : a = b\n⊢ True ↔ a = b\n[PROOFSTEP]\nexact true_iff_iff.2 h\n[GOAL]\ncase neg\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝¹ : ¬a < b\nh✝ : ¬a = b\n⊢ False ↔ a = b\n[PROOFSTEP]\ncase _ _ h => exact false_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : ¬a < b\nh : ¬a = b\n⊢ False ↔ a = b\n[PROOFSTEP]\ncase _ _ h => exact false_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh✝ : ¬a < b\nh : ¬a = b\n⊢ False ↔ a = b\n[PROOFSTEP]\nexact false_iff_iff.2 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b ≠ Ordering.gt ↔ a ≤ b\n[PROOFSTEP]\ncases h : compare a b\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ Ordering.lt ≠ Ordering.gt ↔ a ≤ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ Ordering.eq ≠ Ordering.gt ↔ a ≤ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ Ordering.gt ≠ Ordering.gt ↔ a ≤ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ True ↔ a ≤ b\n[PROOFSTEP]\nexact true_iff_iff.2 <| le_of_lt <| compare_lt_iff_lt.1 h\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ True ↔ a ≤ b\n[PROOFSTEP]\nexact true_iff_iff.2 <| le_of_eq <| compare_eq_iff_eq.1 h\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ False ↔ a ≤ b\n[PROOFSTEP]\nexact false_iff_iff.2 <| not_le_of_gt <| compare_gt_iff_gt.1 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b ≠ Ordering.lt ↔ a ≥ b\n[PROOFSTEP]\ncases h : compare a b\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ Ordering.lt ≠ Ordering.lt ↔ a ≥ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ Ordering.eq ≠ Ordering.lt ↔ a ≥ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ Ordering.gt ≠ Ordering.lt ↔ a ≥ b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ False ↔ a ≥ b\n[PROOFSTEP]\nexact false_iff_iff.2 <| (lt_iff_not_ge a b).1 <| compare_lt_iff_lt.1 h\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ True ↔ a ≥ b\n[PROOFSTEP]\nexact true_iff_iff.2 <| le_of_eq <| (·.symm) <| compare_eq_iff_eq.1 h\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ True ↔ a ≥ b\n[PROOFSTEP]\nexact true_iff_iff.2 <| le_of_lt <| compare_gt_iff_gt.1 h\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\no : Ordering\n⊢ compare a b = o ↔ Ordering.toRel o a b\n[PROOFSTEP]\ncases o\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.lt ↔ Ordering.toRel Ordering.lt a b\n[PROOFSTEP]\nsimp only [Ordering.toRel]\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.eq ↔ Ordering.toRel Ordering.eq a b\n[PROOFSTEP]\nsimp only [Ordering.toRel]\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.gt ↔ Ordering.toRel Ordering.gt a b\n[PROOFSTEP]\nsimp only [Ordering.toRel]\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.lt ↔ a < b\n[PROOFSTEP]\nexact compare_lt_iff_lt\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.eq ↔ a = b\n[PROOFSTEP]\nexact compare_eq_iff_eq\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ compare a b = Ordering.gt ↔ a > b\n[PROOFSTEP]\nexact compare_gt_iff_gt\n[GOAL]\nα : Type u\ninst✝ : LinearOrder α\na b : α\n⊢ Ordering.swap (compare a b) = compare b a\n[PROOFSTEP]\ncases h : compare a b\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ Ordering.swap Ordering.lt = compare b a\n[PROOFSTEP]\nsimp only [Ordering.swap]\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ Ordering.swap Ordering.eq = compare b a\n[PROOFSTEP]\nsimp only [Ordering.swap]\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ Ordering.swap Ordering.gt = compare b a\n[PROOFSTEP]\nsimp only [Ordering.swap]\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ Ordering.gt = compare b a\n[PROOFSTEP]\nsymm\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ Ordering.eq = compare b a\n[PROOFSTEP]\nsymm\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ Ordering.lt = compare b a\n[PROOFSTEP]\nsymm\n[GOAL]\ncase lt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.lt\n⊢ compare b a = Ordering.gt\n[PROOFSTEP]\nexact compare_gt_iff_gt.2 <| compare_lt_iff_lt.1 h\n[GOAL]\ncase eq\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.eq\n⊢ compare b a = Ordering.eq\n[PROOFSTEP]\nexact compare_eq_iff_eq.2 <| compare_eq_iff_eq.1 h |>.symm\n[GOAL]\ncase gt\nα : Type u\ninst✝ : LinearOrder α\na b : α\nh : compare a b = Ordering.gt\n⊢ compare b a = Ordering.lt\n[PROOFSTEP]\nexact compare_lt_iff_lt.2 <| compare_gt_iff_gt.1 h\n", "meta": {"mathlib_filename": "Mathlib.Init.Algebra.Order", "llama_tokens": 4714, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5736784074525096, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.293560766853691}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA B : StructuredArrow S T\nf : A ⟶ B\n⊢ A.hom ≫ T.map f.right = B.hom\n[PROOFSTEP]\nhave := f.w\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA B : StructuredArrow S T\nf : A ⟶ B\nthis : (Functor.fromPUnit S).map f.left ≫ B.hom = A.hom ≫ T.map f.right\n⊢ A.hom ≫ T.map f.right = B.hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf f' : StructuredArrow S T\ng : f.right ⟶ f'.right\nw : autoParam (f.hom ≫ T.map g = f'.hom) _auto✝\n⊢ f.left = f'.left\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf f' : StructuredArrow S T\ng : f.right ⟶ f'.right\nw : autoParam (f.hom ≫ T.map g = f'.hom) _auto✝\n⊢ (Functor.fromPUnit S).map (eqToHom (_ : f.left = f'.left)) ≫ f'.hom = f.hom ≫ T.map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf f' : StructuredArrow S T\ng : f.right ⟶ f'.right\nw : autoParam (f.hom ≫ T.map g = f'.hom) _auto✝\n⊢ 𝟙 S ≫ f'.hom = f.hom ≫ T.map g\n[PROOFSTEP]\nsimpa using w.symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf : StructuredArrow S T\ng : f.right ⟶ Y'\n⊢ f.left = (mk (f.hom ≫ T.map g)).left\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf f' : StructuredArrow S T\ng : f.right ≅ f'.right\nw : autoParam (f.hom ≫ T.map g.hom = f'.hom) _auto✝\n⊢ f.left = f'.left\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf f' : StructuredArrow S T\ng : f.right ≅ f'.right\nw : autoParam (f.hom ≫ T.map g.hom = f'.hom) _auto✝\n⊢ (Functor.fromPUnit S).map (eqToIso (_ : f.left = f'.left)).hom ≫ f'.hom = f.hom ≫ T.map g.hom\n[PROOFSTEP]\nsimpa [eqToHom_map] using w.symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf : StructuredArrow S T\n⊢ (map (𝟙 S)).obj f = f\n[PROOFSTEP]\nrw [eq_mk f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf : StructuredArrow S T\n⊢ (map (𝟙 S)).obj (mk f.hom) = mk f.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf : S ⟶ S'\nf' : S' ⟶ S''\nh : StructuredArrow S'' T\n⊢ (map (f ≫ f')).obj h = (map f).obj ((map f').obj h)\n[PROOFSTEP]\nrw [eq_mk h]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nf : S ⟶ S'\nf' : S' ⟶ S''\nh : StructuredArrow S'' T\n⊢ (map (f ≫ f')).obj (mk h.hom) = (map f).obj ((map f').obj (mk h.hom))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ Z.hom ≫ T.map (inv ((proj S T).map f)) = Y.hom\n[PROOFSTEP]\nrw [Functor.map_inv, IsIso.comp_inv_eq]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ Z.hom = Y.hom ≫ T.map ((proj S T).map f)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ f ≫ homMk (inv ((proj S T).map f)) = 𝟙 Y ∧ homMk (inv ((proj S T).map f)) ≫ f = 𝟙 Z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ f ≫ homMk (inv ((proj S T).map f)) = 𝟙 Y\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ homMk (inv ((proj S T).map f)) ≫ f = 𝟙 Z\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (f ≫ homMk (inv ((proj S T).map f))).left = (𝟙 Y).left\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase left.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (f ≫ homMk (inv ((proj S T).map f))).right = (𝟙 Y).right\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase right.left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (homMk (inv ((proj S T).map f)) ≫ f).left = (𝟙 Z).left\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase right.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (homMk (inv ((proj S T).map f)) ≫ f).right = (𝟙 Z).right\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase left.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso f.right\n⊢ f.right ≫ inv f.right = 𝟙 Y.right\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nS S' S'' : D\nY✝ Y' : C\nT T' : C ⥤ D\nY Z : StructuredArrow S T\nf : Y ⟶ Z\nt : IsIso f.right\n⊢ inv f.right ≫ f.right = 𝟙 Z.right\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\ninst✝¹ : Full T\ninst✝ : Faithful T\nc : Cocone (Functor.empty (StructuredArrow (T.obj Y) T))\nm : (asEmptyCocone (mk (𝟙 (T.obj Y)))).pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone (mk (𝟙 (T.obj Y)))).ι j ≫ m = NatTrans.app c.ι j\n⊢ m = (fun c => homMk (T.preimage c.pt.hom)) c\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\ninst✝¹ : Full T\ninst✝ : Faithful T\nc : Cocone (Functor.empty (StructuredArrow (T.obj Y) T))\nm : (asEmptyCocone (mk (𝟙 (T.obj Y)))).pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone (mk (𝟙 (T.obj Y)))).ι j ≫ m = NatTrans.app c.ι j\n⊢ m.left = ((fun c => homMk (T.preimage c.pt.hom)) c).left\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase right\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\ninst✝¹ : Full T\ninst✝ : Faithful T\nc : Cocone (Functor.empty (StructuredArrow (T.obj Y) T))\nm : (asEmptyCocone (mk (𝟙 (T.obj Y)))).pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone (mk (𝟙 (T.obj Y)))).ι j ≫ m = NatTrans.app c.ι j\n⊢ m.right = ((fun c => homMk (T.preimage c.pt.hom)) c).right\n[PROOFSTEP]\napply T.map_injective\n[GOAL]\ncase right.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\ninst✝¹ : Full T\ninst✝ : Faithful T\nc : Cocone (Functor.empty (StructuredArrow (T.obj Y) T))\nm : (asEmptyCocone (mk (𝟙 (T.obj Y)))).pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone (mk (𝟙 (T.obj Y)))).ι j ≫ m = NatTrans.app c.ι j\n⊢ T.map m.right = T.map ((fun c => homMk (T.preimage c.pt.hom)) c).right\n[PROOFSTEP]\nsimpa only [homMk_right, T.image_preimage, ← w m] using (Category.id_comp _).symm\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS✝ S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝¹ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝ : Category.{v₄, u₄} B\nS : C\nF : B ⥤ C\nG : C ⥤ D\nX✝ Y✝ : StructuredArrow S F\nf : X✝ ⟶ Y✝\n⊢ ((fun X => mk (G.map X.hom)) X✝).hom ≫ (F ⋙ G).map f.right = ((fun X => mk (G.map X.hom)) Y✝).hom\n[PROOFSTEP]\nsimp [Functor.comp_map, ← G.map_comp, ← f.w]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nS✝ S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝¹ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝ : Category.{v₄, u₄} B\nS : C\nF : B ⥤ C\nG : C ⥤ D\nx✝³ x✝² : StructuredArrow S F\nx✝¹ x✝ : x✝³ ⟶ x✝²\nh : (post S F G).map x✝¹ = (post S F G).map x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\nsimpa [ext_iff] using h\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nS✝ S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝² : Category.{v₃, u₃} A\nB : Type u₄\ninst✝¹ : Category.{v₄, u₄} B\nS : C\nF : B ⥤ C\nG : C ⥤ D\ninst✝ : Faithful G\nx✝¹ x✝ : StructuredArrow S F\nf : (post S F G).obj x✝¹ ⟶ (post S F G).obj x✝\n⊢ G.map (x✝¹.hom ≫ F.map f.right) = G.map x✝.hom\n[PROOFSTEP]\nsimpa using f.w.symm\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nS✝ S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝² : Category.{v₃, u₃} A\nB : Type u₄\ninst✝¹ : Category.{v₄, u₄} B\nS : C\nF : B ⥤ C\nG : C ⥤ D\ninst✝ : Full G\nh : StructuredArrow (G.obj S) (F ⋙ G)\n⊢ ((post S F G).obj (mk (G.preimage h.hom))).hom ≫\n      (F ⋙ G).map (Iso.refl ((post S F G).obj (mk (G.preimage h.hom))).right).hom =\n    h.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\n⊢ Small.{v₁, max u₁ v₂} ↑((proj S T).toPrefunctor.obj ⁻¹' 𝒢)\n[PROOFSTEP]\nsuffices (proj S T).obj ⁻¹' 𝒢 = Set.range fun f : Σ G : 𝒢, S ⟶ T.obj G => mk f.2\n  by\n  rw [this]\n  infer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nthis : (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n⊢ Small.{v₁, max u₁ v₂} ↑((proj S T).toPrefunctor.obj ⁻¹' 𝒢)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nthis : (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n⊢ Small.{v₁, max u₁ v₂} ↑(Set.range fun f => mk f.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\n⊢ (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n[PROOFSTEP]\nexact Set.ext fun X => ⟨fun h => ⟨⟨⟨_, h⟩, X.hom⟩, (eq_mk _).symm⟩, by aesop_cat⟩\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nS S' S'' : D\nY Y' : C\nT T' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nX : StructuredArrow S T\n⊢ (X ∈ Set.range fun f => mk f.snd) → X ∈ (proj S T).toPrefunctor.obj ⁻¹' 𝒢\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA B : CostructuredArrow S T\nf : A ⟶ B\n⊢ S.map f.left ≫ B.hom = A.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nX Y : CostructuredArrow S T\nh : X = Y\n⊢ X.left = Y.left\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nX Y : CostructuredArrow S T\nh : X = Y\n⊢ (eqToHom h).left = eqToHom (_ : X.left = Y.left)\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nX : CostructuredArrow S T\n⊢ (eqToHom (_ : X = X)).left = eqToHom (_ : X.left = X.left)\n[PROOFSTEP]\nsimp only [eqToHom_refl, id_left]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf f' : CostructuredArrow S T\ng : f.left ⟶ f'.left\nw : autoParam (S.map g ≫ f'.hom = f.hom) _auto✝\n⊢ f.right = f'.right\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf f' : CostructuredArrow S T\ng : f.left ⟶ f'.left\nw : autoParam (S.map g ≫ f'.hom = f.hom) _auto✝\n⊢ S.map g ≫ f'.hom = f.hom ≫ (Functor.fromPUnit T).map (eqToHom (_ : f.right = f'.right))\n[PROOFSTEP]\nsimpa [eqToHom_map] using w\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf : CostructuredArrow S T\ng : Y' ⟶ f.left\n⊢ (mk (S.map g ≫ f.hom)).right = f.right\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf f' : CostructuredArrow S T\ng : f.left ≅ f'.left\nw : autoParam (S.map g.hom ≫ f'.hom = f.hom) _auto✝\n⊢ f.right = f'.right\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf f' : CostructuredArrow S T\ng : f.left ≅ f'.left\nw : autoParam (S.map g.hom ≫ f'.hom = f.hom) _auto✝\n⊢ S.map g.hom ≫ f'.hom = f.hom ≫ (Functor.fromPUnit T).map (eqToIso (_ : f.right = f'.right)).hom\n[PROOFSTEP]\nsimpa [eqToHom_map] using w\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf : CostructuredArrow S T\n⊢ (map (𝟙 T)).obj f = f\n[PROOFSTEP]\nrw [eq_mk f]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf : CostructuredArrow S T\n⊢ (map (𝟙 T)).obj (mk f.hom) = mk f.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf : T ⟶ T'\nf' : T' ⟶ T''\nh : CostructuredArrow S T\n⊢ (map (f ≫ f')).obj h = (map f').obj ((map f).obj h)\n[PROOFSTEP]\nrw [eq_mk h]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nf : T ⟶ T'\nf' : T' ⟶ T''\nh : CostructuredArrow S T\n⊢ (map (f ≫ f')).obj (mk h.hom) = (map f').obj ((map f).obj (mk h.hom))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ S.map (inv ((proj S T).map f)) ≫ Y.hom = Z.hom\n[PROOFSTEP]\nrw [Functor.map_inv, IsIso.inv_comp_eq]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ Y.hom = S.map ((proj S T).map f) ≫ Z.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ f ≫ homMk (inv ((proj S T).map f)) = 𝟙 Y ∧ homMk (inv ((proj S T).map f)) ≫ f = 𝟙 Z\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ f ≫ homMk (inv ((proj S T).map f)) = 𝟙 Y\n[PROOFSTEP]\next\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ homMk (inv ((proj S T).map f)) ≫ f = 𝟙 Z\n[PROOFSTEP]\next\n[GOAL]\ncase left.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (f ≫ homMk (inv ((proj S T).map f))).left = (𝟙 Y).left\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase right.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso ((proj S T).map f)\n⊢ (homMk (inv ((proj S T).map f)) ≫ f).left = (𝟙 Z).left\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\ncase left.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso f.left\n⊢ f.left ≫ inv f.left = 𝟙 Y.left\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nT T' T'' : D\nY✝ Y' : C\nS S' : C ⥤ D\nY Z : CostructuredArrow S T\nf : Y ⟶ Z\nt : IsIso f.left\n⊢ inv f.left ≫ f.left = 𝟙 Z.left\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\ninst✝¹ : Full S\ninst✝ : Faithful S\n⊢ ∀ (s : Cone (Functor.empty (CostructuredArrow S (S.obj Y)))) (m : s.pt ⟶ (asEmptyCone (mk (𝟙 (S.obj Y)))).pt),\n    (∀ (j : Discrete PEmpty), m ≫ NatTrans.app (asEmptyCone (mk (𝟙 (S.obj Y)))).π j = NatTrans.app s.π j) →\n      m = (fun c => homMk (S.preimage c.pt.hom)) s\n[PROOFSTEP]\nrintro c m -\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\ninst✝¹ : Full S\ninst✝ : Faithful S\nc : Cone (Functor.empty (CostructuredArrow S (S.obj Y)))\nm : c.pt ⟶ (asEmptyCone (mk (𝟙 (S.obj Y)))).pt\n⊢ m = (fun c => homMk (S.preimage c.pt.hom)) c\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\ninst✝¹ : Full S\ninst✝ : Faithful S\nc : Cone (Functor.empty (CostructuredArrow S (S.obj Y)))\nm : c.pt ⟶ (asEmptyCone (mk (𝟙 (S.obj Y)))).pt\n⊢ m.left = ((fun c => homMk (S.preimage c.pt.hom)) c).left\n[PROOFSTEP]\napply S.map_injective\n[GOAL]\ncase h.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\ninst✝¹ : Full S\ninst✝ : Faithful S\nc : Cone (Functor.empty (CostructuredArrow S (S.obj Y)))\nm : c.pt ⟶ (asEmptyCone (mk (𝟙 (S.obj Y)))).pt\n⊢ S.map m.left = S.map ((fun c => homMk (S.preimage c.pt.hom)) c).left\n[PROOFSTEP]\nsimpa only [homMk_left, S.image_preimage, ← w m] using (Category.comp_id _).symm\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS✝ S' : C ⥤ D\nA : Type u₃\ninst✝¹ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝ : Category.{v₄, u₄} B\nF : B ⥤ C\nG : C ⥤ D\nS : C\nX✝ Y✝ : CostructuredArrow F S\nf : X✝ ⟶ Y✝\n⊢ (F ⋙ G).map f.left ≫ ((fun X => mk (G.map X.hom)) Y✝).hom = ((fun X => mk (G.map X.hom)) X✝).hom\n[PROOFSTEP]\nsimp [Functor.comp_map, ← G.map_comp, ← f.w]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS✝ S' : C ⥤ D\nA : Type u₃\ninst✝¹ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝ : Category.{v₄, u₄} B\nF : B ⥤ C\nG : C ⥤ D\nS : C\nx✝³ x✝² : CostructuredArrow F S\nx✝¹ x✝ : x✝³ ⟶ x✝²\nh : (post F G S).map x✝¹ = (post F G S).map x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\nsimpa [ext_iff] using h\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS✝ S' : C ⥤ D\nA : Type u₃\ninst✝² : Category.{v₃, u₃} A\nB : Type u₄\ninst✝¹ : Category.{v₄, u₄} B\nF : B ⥤ C\nG : C ⥤ D\nS : C\ninst✝ : Faithful G\nx✝¹ x✝ : CostructuredArrow F S\nf : (post F G S).obj x✝¹ ⟶ (post F G S).obj x✝\n⊢ G.map (F.map f.left ≫ x✝.hom) = G.map x✝¹.hom\n[PROOFSTEP]\nsimpa using f.w\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS✝ S' : C ⥤ D\nA : Type u₃\ninst✝² : Category.{v₃, u₃} A\nB : Type u₄\ninst✝¹ : Category.{v₄, u₄} B\nF : B ⥤ C\nG : C ⥤ D\nS : C\ninst✝ : Full G\nh : CostructuredArrow (F ⋙ G) (G.obj S)\n⊢ (F ⋙ G).map (Iso.refl ((post F G S).obj (mk (G.preimage h.hom))).left).hom ≫ h.hom =\n    ((post F G S).obj (mk (G.preimage h.hom))).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\n⊢ Small.{v₁, max u₁ v₂} ↑((proj S T).toPrefunctor.obj ⁻¹' 𝒢)\n[PROOFSTEP]\nsuffices (proj S T).obj ⁻¹' 𝒢 = Set.range fun f : Σ G : 𝒢, S.obj G ⟶ T => mk f.2\n  by\n  rw [this]\n  infer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nthis : (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n⊢ Small.{v₁, max u₁ v₂} ↑((proj S T).toPrefunctor.obj ⁻¹' 𝒢)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nthis : (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n⊢ Small.{v₁, max u₁ v₂} ↑(Set.range fun f => mk f.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\n⊢ (proj S T).toPrefunctor.obj ⁻¹' 𝒢 = Set.range fun f => mk f.snd\n[PROOFSTEP]\nexact Set.ext fun X => ⟨fun h => ⟨⟨⟨_, h⟩, X.hom⟩, (eq_mk _).symm⟩, by aesop_cat⟩\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nT T' T'' : D\nY Y' : C\nS S' : C ⥤ D\nA : Type u₃\ninst✝³ : Category.{v₃, u₃} A\nB : Type u₄\ninst✝² : Category.{v₄, u₄} B\n𝒢 : Set C\ninst✝¹ : Small.{v₁, u₁} ↑𝒢\ninst✝ : LocallySmall D\nX : CostructuredArrow S T\n⊢ (X ∈ Set.range fun f => mk f.snd) → X ∈ (proj S T).toPrefunctor.obj ⁻¹' 𝒢\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow d F)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ F.op.map f.unop.right.op ≫ ((fun X => CostructuredArrow.mk X.unop.hom.op) Y✝).hom =\n    ((fun X => CostructuredArrow.mk X.unop.hom.op) X✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow d F)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (F.map f.unop.right).op ≫ Y✝.unop.hom.op = X✝.unop.hom.op\n[PROOFSTEP]\nrw [← op_comp, ← f.unop.w, Functor.const_obj_map]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow d F)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (𝟙 d ≫ X✝.unop.hom).op = X✝.unop.hom.op\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow (op d) F.op)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ F.map f.unop.right.unop ≫ ((fun X => CostructuredArrow.mk X.unop.hom.unop) Y✝).hom =\n    ((fun X => CostructuredArrow.mk X.unop.hom.unop) X✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow (op d) F.op)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ F.map f.unop.right.unop ≫ Y✝.unop.hom.unop = X✝.unop.hom.unop\n[PROOFSTEP]\nrw [← Quiver.Hom.unop_op (F.map (Quiver.Hom.unop f.unop.right)), ← unop_comp, ← F.op_map, ← f.unop.w,\n  Functor.const_obj_map]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (StructuredArrow (op d) F.op)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (𝟙 (op d) ≫ X✝.unop.hom).unop = X✝.unop.hom.unop\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F d)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ ((fun X => StructuredArrow.mk X.unop.hom.op) X✝).hom ≫ F.op.map f.unop.left.op =\n    ((fun X => StructuredArrow.mk X.unop.hom.op) Y✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F d)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ X✝.unop.hom.op ≫ (F.map f.unop.left).op = Y✝.unop.hom.op\n[PROOFSTEP]\nrw [← op_comp, f.unop.w, Functor.const_obj_map]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F d)ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (Y✝.unop.hom ≫ 𝟙 d).op = Y✝.unop.hom.op\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F.op (op d))ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ ((fun X => StructuredArrow.mk X.unop.hom.unop) X✝).hom ≫ F.map f.unop.left.unop =\n    ((fun X => StructuredArrow.mk X.unop.hom.unop) Y✝).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F.op (op d))ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ X✝.unop.hom.unop ≫ F.map f.unop.left.unop = Y✝.unop.hom.unop\n[PROOFSTEP]\nrw [← Quiver.Hom.unop_op (F.map f.unop.left.unop), ← unop_comp, ← F.op_map, f.unop.w, Functor.const_obj_map]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX✝ Y✝ : (CostructuredArrow F.op (op d))ᵒᵖ\nf : X✝ ⟶ Y✝\n⊢ (Y✝.unop.hom ≫ 𝟙 (op d)).unop = Y✝.unop.hom.unop\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (StructuredArrow d F)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (StructuredArrow d F)ᵒᵖ).map f ≫ ((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) Y).hom).unop =\n    (((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) X).hom ≫\n        (StructuredArrow.toCostructuredArrow F d ⋙ (CostructuredArrow.toStructuredArrow' F d).rightOp).map f).unop\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (StructuredArrow d F)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (StructuredArrow d F)ᵒᵖ).map f ≫\n          ((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) Y).hom).unop.left =\n    (((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) X).hom ≫\n          (StructuredArrow.toCostructuredArrow F d ⋙ (CostructuredArrow.toStructuredArrow' F d).rightOp).map\n            f).unop.left\n[PROOFSTEP]\ndsimp [StructuredArrow.isoMk, Comma.isoMk, StructuredArrow.homMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (StructuredArrow d F)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (StructuredArrow d F)ᵒᵖ).map f ≫\n          ((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) Y).hom).unop.right =\n    (((fun X => Iso.op (StructuredArrow.isoMk (Iso.refl X.unop.right))) X).hom ≫\n          (StructuredArrow.toCostructuredArrow F d ⋙ (CostructuredArrow.toStructuredArrow' F d).rightOp).map\n            f).unop.right\n[PROOFSTEP]\ndsimp [StructuredArrow.isoMk, Comma.isoMk, StructuredArrow.homMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (StructuredArrow d F)ᵒᵖ\nf : X ⟶ Y\n⊢ 𝟙 Y.unop.right ≫ f.unop.right = f.unop.right ≫ 𝟙 X.unop.right\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : CostructuredArrow F.op (op d)\nf : X ⟶ Y\n⊢ ((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).map f ≫\n      ((fun X =>\n            CostructuredArrow.isoMk\n              (Iso.refl\n                (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                    X).left))\n          Y).hom =\n    ((fun X =>\n            CostructuredArrow.isoMk\n              (Iso.refl\n                (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                    X).left))\n          X).hom ≫\n      (𝟭 (CostructuredArrow F.op (op d))).map f\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : CostructuredArrow F.op (op d)\nf : X ⟶ Y\n⊢ (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).map f ≫\n        ((fun X =>\n              CostructuredArrow.isoMk\n                (Iso.refl\n                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                      X).left))\n            Y).hom).left =\n    (((fun X =>\n              CostructuredArrow.isoMk\n                (Iso.refl\n                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                      X).left))\n            X).hom ≫\n        (𝟭 (CostructuredArrow F.op (op d))).map f).left\n[PROOFSTEP]\ndsimp [CostructuredArrow.isoMk, Comma.isoMk, CostructuredArrow.homMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : CostructuredArrow F.op (op d)\nf : X ⟶ Y\n⊢ (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).map f ≫\n        ((fun X =>\n              CostructuredArrow.isoMk\n                (Iso.refl\n                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                      X).left))\n            Y).hom).right =\n    (((fun X =>\n              CostructuredArrow.isoMk\n                (Iso.refl\n                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj\n                      X).left))\n            X).hom ≫\n        (𝟭 (CostructuredArrow F.op (op d))).map f).right\n[PROOFSTEP]\ndsimp [CostructuredArrow.isoMk, Comma.isoMk, CostructuredArrow.homMk]\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : CostructuredArrow F.op (op d)\nf : X ⟶ Y\n⊢ f.left ≫ 𝟙 Y.left = 𝟙 X.left ≫ f.left\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (CostructuredArrow F d)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫\n        ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop =\n    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫\n        (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map f).unop\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (CostructuredArrow F d)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫\n          ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop.left =\n    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫\n          (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map\n            f).unop.left\n[PROOFSTEP]\ndsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (CostructuredArrow F d)ᵒᵖ\nf : X ⟶ Y\n⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫\n          ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop.right =\n    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫\n          (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map\n            f).unop.right\n[PROOFSTEP]\ndsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : (CostructuredArrow F d)ᵒᵖ\nf : X ⟶ Y\n⊢ 𝟙 Y.unop.left ≫ f.unop.left = f.unop.left ≫ 𝟙 X.unop.left\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : StructuredArrow (op d) F.op\nf : X ⟶ Y\n⊢ ((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫\n      ((fun X =>\n            StructuredArrow.isoMk\n              (Iso.refl\n                (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                    X).right))\n          Y).hom =\n    ((fun X =>\n            StructuredArrow.isoMk\n              (Iso.refl\n                (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                    X).right))\n          X).hom ≫\n      (𝟭 (StructuredArrow (op d) F.op)).map f\n[PROOFSTEP]\napply CommaMorphism.ext\n[GOAL]\ncase left\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : StructuredArrow (op d) F.op\nf : X ⟶ Y\n⊢ (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫\n        ((fun X =>\n              StructuredArrow.isoMk\n                (Iso.refl\n                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                      X).right))\n            Y).hom).left =\n    (((fun X =>\n              StructuredArrow.isoMk\n                (Iso.refl\n                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                      X).right))\n            X).hom ≫\n        (𝟭 (StructuredArrow (op d) F.op)).map f).left\n[PROOFSTEP]\ndsimp [StructuredArrow.isoMk, StructuredArrow.homMk, Comma.isoMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : StructuredArrow (op d) F.op\nf : X ⟶ Y\n⊢ (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫\n        ((fun X =>\n              StructuredArrow.isoMk\n                (Iso.refl\n                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                      X).right))\n            Y).hom).right =\n    (((fun X =>\n              StructuredArrow.isoMk\n                (Iso.refl\n                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj\n                      X).right))\n            X).hom ≫\n        (𝟭 (StructuredArrow (op d) F.op)).map f).right\n[PROOFSTEP]\ndsimp [StructuredArrow.isoMk, StructuredArrow.homMk, Comma.isoMk]\n[GOAL]\ncase right\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : C ⥤ D\nd : D\nX Y : StructuredArrow (op d) F.op\nf : X ⟶ Y\n⊢ f.right ≫ 𝟙 Y.right = 𝟙 X.right ≫ f.right\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.StructuredArrow", "llama_tokens": 19041, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5736784074525096, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.293560766853691}}
{"text": "[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ NeBot (cocompact ℚ ⊓ 𝓝 p)\n[PROOFSTEP]\nrefine' (hasBasis_cocompact.inf (nhds_basis_opens _)).neBot_iff.2 _\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ ∀ {i : Set ℚ × Set ℚ}, IsCompact i.fst ∧ p ∈ i.snd ∧ IsOpen i.snd → Set.Nonempty (i.fstᶜ ∩ i.snd)\n[PROOFSTEP]\nrintro ⟨s, o⟩ ⟨hs, hpo, ho⟩\n[GOAL]\ncase mk.intro.intro\np q : ℚ\ns✝ t s o : Set ℚ\nhs : IsCompact (s, o).fst\nhpo : p ∈ (s, o).snd\nho : IsOpen (s, o).snd\n⊢ Set.Nonempty ((s, o).fstᶜ ∩ (s, o).snd)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\ncase mk.intro.intro\np q : ℚ\ns✝ t s o : Set ℚ\nhs : IsCompact (s, o).fst\nhpo : p ∈ (s, o).snd\nho : IsOpen (s, o).snd\n⊢ Set.Nonempty ((s, o).snd ∩ (s, o).fstᶜ)\n[PROOFSTEP]\nexact (dense_compl_compact hs).inter_open_nonempty _ ho ⟨p, hpo⟩\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ ¬IsCountablyGenerated (cocompact ℚ)\n[PROOFSTEP]\nintro H\n[GOAL]\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\n⊢ False\n[PROOFSTEP]\nrcases exists_seq_tendsto (cocompact ℚ ⊓ 𝓝 0) with ⟨x, hx⟩\n[GOAL]\ncase intro\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhx : Tendsto x atTop (cocompact ℚ ⊓ 𝓝 0)\n⊢ False\n[PROOFSTEP]\nrw [tendsto_inf] at hx \n[GOAL]\ncase intro\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhx : Tendsto x atTop (cocompact ℚ) ∧ Tendsto x atTop (𝓝 0)\n⊢ False\n[PROOFSTEP]\nrcases hx with ⟨hxc, hx0⟩\n[GOAL]\ncase intro.intro\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhxc : Tendsto x atTop (cocompact ℚ)\nhx0 : Tendsto x atTop (𝓝 0)\n⊢ False\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n : ℕ, x n ∉ insert (0 : ℚ) (range x)\n[GOAL]\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhxc : Tendsto x atTop (cocompact ℚ)\nhx0 : Tendsto x atTop (𝓝 0)\n⊢ ∃ n, ¬x n ∈ insert 0 (range x)\ncase intro.intro.intro\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhxc : Tendsto x atTop (cocompact ℚ)\nhx0 : Tendsto x atTop (𝓝 0)\nn : ℕ\nhn : ¬x n ∈ insert 0 (range x)\n⊢ False\n[PROOFSTEP]\nexact (hxc.eventually hx0.isCompact_insert_range.compl_mem_cocompact).exists\n[GOAL]\ncase intro.intro.intro\np q : ℚ\ns t : Set ℚ\nH : IsCountablyGenerated (cocompact ℚ)\nx : ℕ → ℚ\nhxc : Tendsto x atTop (cocompact ℚ)\nhx0 : Tendsto x atTop (𝓝 0)\nn : ℕ\nhn : ¬x n ∈ insert 0 (range x)\n⊢ False\n[PROOFSTEP]\nexact hn (Or.inr ⟨n, rfl⟩)\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ ¬IsCountablyGenerated (𝓝 ∞)\n[PROOFSTEP]\nintro\n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : IsCountablyGenerated (𝓝 ∞)\n⊢ False\n[PROOFSTEP]\nhave : IsCountablyGenerated (comap (OnePoint.some : ℚ → ℚ∞) (𝓝 ∞)) := by infer_instance\n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : IsCountablyGenerated (𝓝 ∞)\n⊢ IsCountablyGenerated (comap OnePoint.some (𝓝 ∞))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : IsCountablyGenerated (𝓝 ∞)\nthis : IsCountablyGenerated (comap OnePoint.some (𝓝 ∞))\n⊢ False\n[PROOFSTEP]\nrw [OnePoint.comap_coe_nhds_infty, coclosedCompact_eq_cocompact] at this \n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : IsCountablyGenerated (𝓝 ∞)\nthis : IsCountablyGenerated (cocompact ℚ)\n⊢ False\n[PROOFSTEP]\nexact not_countably_generated_cocompact this\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ ¬FirstCountableTopology ℚ∞\n[PROOFSTEP]\nintro\n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : FirstCountableTopology ℚ∞\n⊢ False\n[PROOFSTEP]\nexact not_countably_generated_nhds_infty_opc inferInstance\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ ¬SecondCountableTopology ℚ∞\n[PROOFSTEP]\nintro\n[GOAL]\np q : ℚ\ns t : Set ℚ\na✝ : SecondCountableTopology ℚ∞\n⊢ False\n[PROOFSTEP]\nexact not_firstCountableTopology_opc inferInstance\n[GOAL]\np q : ℚ\ns t : Set ℚ\n⊢ TotallyDisconnectedSpace ℚ\n[PROOFSTEP]\nrefine' ⟨fun s hsu hs x hx y hy => _⟩\n[GOAL]\np q : ℚ\ns✝ t s : Set ℚ\nhsu : s ⊆ univ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\n⊢ x = y\n[PROOFSTEP]\nclear hsu\n[GOAL]\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\n⊢ x = y\n[PROOFSTEP]\nby_contra' H : x ≠ y\n[GOAL]\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\n⊢ False\n[PROOFSTEP]\nwlog hlt : x < y\n[GOAL]\ncase inr\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nthis :\n  ∀ {p q : ℚ} {s t : Set ℚ} (s : Set ℚ), IsPreconnected s → ∀ (x : ℚ), x ∈ s → ∀ (y : ℚ), y ∈ s → x ≠ y → x < y → False\nhlt : ¬x < y\n⊢ False\n[PROOFSTEP]\nrefine' this s hs y hy x hx H.symm <| H.lt_or_lt.resolve_left hlt\n[GOAL]\ncase inr.refine'_1\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nthis :\n  ∀ {p q : ℚ} {s t : Set ℚ} (s : Set ℚ), IsPreconnected s → ∀ (x : ℚ), x ∈ s → ∀ (y : ℚ), y ∈ s → x ≠ y → x < y → False\nhlt : ¬x < y\n⊢ ℚ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.refine'_2\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nthis :\n  ∀ {p q : ℚ} {s t : Set ℚ} (s : Set ℚ), IsPreconnected s → ∀ (x : ℚ), x ∈ s → ∀ (y : ℚ), y ∈ s → x ≠ y → x < y → False\nhlt : ¬x < y\n⊢ ℚ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.refine'_3\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nthis :\n  ∀ {p q : ℚ} {s t : Set ℚ} (s : Set ℚ), IsPreconnected s → ∀ (x : ℚ), x ∈ s → ∀ (y : ℚ), y ∈ s → x ≠ y → x < y → False\nhlt : ¬x < y\n⊢ Set ℚ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.refine'_4\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nthis :\n  ∀ {p q : ℚ} {s t : Set ℚ} (s : Set ℚ), IsPreconnected s → ∀ (x : ℚ), x ∈ s → ∀ (y : ℚ), y ∈ s → x ≠ y → x < y → False\nhlt : ¬x < y\n⊢ Set ℚ\n[PROOFSTEP]\nassumption\n[GOAL]\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nhlt : x < y\n⊢ False\n[PROOFSTEP]\nrcases exists_irrational_btwn (Rat.cast_lt.2 hlt) with ⟨z, hz, hxz, hzy⟩\n[GOAL]\ncase intro.intro.intro\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nhlt : x < y\nz : ℝ\nhz : Irrational z\nhxz : ↑x < z\nhzy : z < ↑y\n⊢ False\n[PROOFSTEP]\nhave := hs.image _ continuous_coe_real.continuousOn\n[GOAL]\ncase intro.intro.intro\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nhlt : x < y\nz : ℝ\nhz : Irrational z\nhxz : ↑x < z\nhzy : z < ↑y\nthis : IsPreconnected (Rat.cast '' s)\n⊢ False\n[PROOFSTEP]\nrw [isPreconnected_iff_ordConnected] at this \n[GOAL]\ncase intro.intro.intro\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nhlt : x < y\nz : ℝ\nhz : Irrational z\nhxz : ↑x < z\nhzy : z < ↑y\nthis✝ : IsPreconnected (Rat.cast '' s)\nthis : OrdConnected (Rat.cast '' s)\n⊢ False\n[PROOFSTEP]\nhave : z ∈ Rat.cast '' s := this.out (mem_image_of_mem _ hx) (mem_image_of_mem _ hy) ⟨hxz.le, hzy.le⟩\n[GOAL]\ncase intro.intro.intro\np q : ℚ\ns✝ t s : Set ℚ\nhs : IsPreconnected s\nx : ℚ\nhx : x ∈ s\ny : ℚ\nhy : y ∈ s\nH : x ≠ y\nhlt : x < y\nz : ℝ\nhz : Irrational z\nhxz : ↑x < z\nhzy : z < ↑y\nthis✝¹ : IsPreconnected (Rat.cast '' s)\nthis✝ : OrdConnected (Rat.cast '' s)\nthis : z ∈ Rat.cast '' s\n⊢ False\n[PROOFSTEP]\nexact hz (image_subset_range _ _ this)\n", "meta": {"mathlib_filename": "Mathlib.Topology.Instances.RatLemmas", "llama_tokens": 3649, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5964331319177488, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.2935573112807121}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝² : NonUnitalNonAssocSemiring R\ninst✝¹ : NonUnitalNonAssocSemiring S\ninst✝ : NonUnitalNonAssocSemiring T\nf✝ : R →ₙ+* S\ng : R →ₙ+* T\nf : R →ₙ+* S × T\nx : R\n⊢ ↑(NonUnitalRingHom.prod (comp (fst S T) f) (comp (snd S T) f)) x = ↑f x\n[PROOFSTEP]\nsimp only [prod_apply, coe_fst, coe_snd, comp_apply, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝² : NonAssocSemiring R\ninst✝¹ : NonAssocSemiring S\ninst✝ : NonAssocSemiring T\nf✝ : R →+* S\ng : R →+* T\nf : R →+* S × T\nx : R\n⊢ ↑(RingHom.prod (comp (fst S T) f) (comp (snd S T) f)) x = ↑f x\n[PROOFSTEP]\nsimp only [prod_apply, coe_fst, coe_snd, comp_apply, Prod.mk.eta]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\nx : R × S\n⊢ (fun x => (x, 0)) x.fst = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\nfst✝ : R\nsnd✝ : S\n⊢ (fun x => (x, 0)) (fst✝, snd✝).fst = (fst✝, snd✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\n⊢ ∀ (x y : R),\n    Equiv.toFun\n        { toFun := fun x => (x, 0), invFun := Prod.fst,\n          left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n          right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n        (x * y) =\n      Equiv.toFun\n          { toFun := fun x => (x, 0), invFun := Prod.fst,\n            left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n            right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n          x *\n        Equiv.toFun\n          { toFun := fun x => (x, 0), invFun := Prod.fst,\n            left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n            right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n          y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\n⊢ ∀ (x y : R),\n    Equiv.toFun\n        { toFun := fun x => (x, 0), invFun := Prod.fst,\n          left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n          right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n        (x + y) =\n      Equiv.toFun\n          { toFun := fun x => (x, 0), invFun := Prod.fst,\n            left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n            right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n          x +\n        Equiv.toFun\n          { toFun := fun x => (x, 0), invFun := Prod.fst,\n            left_inv := (_ : ∀ (x : R), ((fun x => (x, 0)) x).fst = ((fun x => (x, 0)) x).fst),\n            right_inv := (_ : ∀ (x : R × S), (fun x => (x, 0)) x.fst = x) }\n          y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\nx : S × R\n⊢ (fun x => (0, x)) x.snd = x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\nfst✝ : S\nsnd✝ : R\n⊢ (fun x => (0, x)) (fst✝, snd✝).snd = (fst✝, snd✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\n⊢ ∀ (x y : R),\n    Equiv.toFun\n        { toFun := fun x => (0, x), invFun := Prod.snd,\n          left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n          right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n        (x * y) =\n      Equiv.toFun\n          { toFun := fun x => (0, x), invFun := Prod.snd,\n            left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n            right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n          x *\n        Equiv.toFun\n          { toFun := fun x => (0, x), invFun := Prod.snd,\n            left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n            right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n          y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR : Type u_3\nR' : Type u_4\nS : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\ninst✝⁴ : NonAssocSemiring R\ninst✝³ : NonAssocSemiring S\ninst✝² : NonAssocSemiring R'\ninst✝¹ : NonAssocSemiring S'\ninst✝ : Subsingleton S\n⊢ ∀ (x y : R),\n    Equiv.toFun\n        { toFun := fun x => (0, x), invFun := Prod.snd,\n          left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n          right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n        (x + y) =\n      Equiv.toFun\n          { toFun := fun x => (0, x), invFun := Prod.snd,\n            left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n            right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n          x +\n        Equiv.toFun\n          { toFun := fun x => (0, x), invFun := Prod.snd,\n            left_inv := (_ : ∀ (x : R), ((fun x => (0, x)) x).snd = ((fun x => (0, x)) x).snd),\n            right_inv := (_ : ∀ (x : S × R), (fun x => (0, x)) x.snd = x) }\n          y\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\n⊢ False\n[PROOFSTEP]\nhave := NoZeroDivisors.eq_zero_or_eq_zero_of_mul_eq_zero (show ((0 : R), (1 : S)) * (1, 0) = 0 by simp)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\n⊢ (0, 1) * (1, 0) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\nthis : (0, 1) = 0 ∨ (1, 0) = 0\n⊢ False\n[PROOFSTEP]\nrw [Prod.mk_eq_zero, Prod.mk_eq_zero] at this \n[GOAL]\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\nthis : 0 = 0 ∧ 1 = 0 ∨ 1 = 0 ∧ 0 = 0\n⊢ False\n[PROOFSTEP]\nrcases this with (⟨_, h⟩ | ⟨h, _⟩)\n[GOAL]\ncase inl.intro\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\nleft✝ : 0 = 0\nh : 1 = 0\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h.symm\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\nR✝ : Type u_3\nR' : Type u_4\nS✝ : Type u_5\nS' : Type u_6\nT : Type u_7\nT' : Type u_8\nR : Type u_9\nS : Type u_10\ninst✝⁴ : Ring R\ninst✝³ : Ring S\ninst✝² : IsDomain (R × S)\ninst✝¹ : Nontrivial R\ninst✝ : Nontrivial S\nh : 1 = 0\nright✝ : 0 = 0\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h.symm\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Ring.Prod", "llama_tokens": 4235, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6261241772283034, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.29352114538869767}}
{"text": "[GOAL]\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\n⊢ Measurable fun x => ↑↑μ ((fun y => y * x) ⁻¹' s)\n[PROOFSTEP]\nsuffices Measurable fun y => μ ((fun x => (x, y)) ⁻¹' ((fun z : G × G => ((1 : G), z.1 * z.2)) ⁻¹' univ ×ˢ s)) by\n  convert this using 1; ext1 x; congr 1 with y : 1; simp\n[GOAL]\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\nthis : Measurable fun y => ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\n⊢ Measurable fun x => ↑↑μ ((fun y => y * x) ⁻¹' s)\n[PROOFSTEP]\nconvert this using 1\n[GOAL]\ncase h.e'_5\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\nthis : Measurable fun y => ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\n⊢ (fun x => ↑↑μ ((fun y => y * x) ⁻¹' s)) = fun y =>\n    ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\n[PROOFSTEP]\next1 x\n[GOAL]\ncase h.e'_5.h\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\nthis : Measurable fun y => ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\nx : G\n⊢ ↑↑μ ((fun y => y * x) ⁻¹' s) = ↑↑μ ((fun x_1 => (x_1, x)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\n[PROOFSTEP]\ncongr 1 with y : 1\n[GOAL]\ncase h.e'_5.h.e_a.h\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\nthis : Measurable fun y => ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\nx y : G\n⊢ y ∈ (fun y => y * x) ⁻¹' s ↔ y ∈ (fun x_1 => (x_1, x)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s)\n[PROOFSTEP]\nsimp\n[GOAL]\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\n⊢ Measurable fun y => ↑↑μ ((fun x => (x, y)) ⁻¹' ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s))\n[PROOFSTEP]\napply measurable_measure_prod_mk_right\n[GOAL]\ncase hs\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\n⊢ MeasurableSet ((fun z => (1, z.fst * z.snd)) ⁻¹' univ ×ˢ s)\n[PROOFSTEP]\napply measurable_const.prod_mk measurable_mul (MeasurableSet.univ.prod hs)\n[GOAL]\nG : Type u_1\ninst✝⁴ : MeasurableSpace G\ninst✝³ : Group G\ninst✝² : MeasurableMul₂ G\nμ ν : Measure G\ninst✝¹ : SigmaFinite ν\ninst✝ : SigmaFinite μ\ns : Set G\nhs : MeasurableSet s\n⊢ MeasurableSpace G\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\n⊢ MeasurePreserving fun z => (z.snd * z.fst, z.fst⁻¹)\n[PROOFSTEP]\nconvert (measurePreserving_prod_inv_mul_swap ν μ).comp (measurePreserving_prod_mul_swap μ ν) using 1\n[GOAL]\ncase h.e'_5\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\n⊢ (fun z => (z.snd * z.fst, z.fst⁻¹)) = (fun z => (z.snd, z.snd⁻¹ * z.fst)) ∘ fun z => (z.snd, z.snd * z.fst)\n[PROOFSTEP]\next1 ⟨x, y⟩\n[GOAL]\ncase h.e'_5.h.mk\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nx y : G\n⊢ ((x, y).snd * (x, y).fst, (x, y).fst⁻¹) =\n    ((fun z => (z.snd, z.snd⁻¹ * z.fst)) ∘ fun z => (z.snd, z.snd * z.fst)) (x, y)\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, mul_inv_rev, inv_mul_cancel_right]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\n⊢ QuasiMeasurePreserving Inv.inv\n[PROOFSTEP]\nrefine' ⟨measurable_inv, AbsolutelyContinuous.mk fun s hsm hμs => _⟩\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ ↑↑(map Inv.inv μ) s = 0\n[PROOFSTEP]\nrw [map_apply measurable_inv hsm, inv_preimage]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\n⊢ ↑↑μ s⁻¹ = 0\n[PROOFSTEP]\nhave hf : Measurable fun z : G × G => (z.2 * z.1, z.1⁻¹) :=\n  (measurable_snd.mul measurable_fst).prod_mk measurable_fst.inv\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\nhf : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\n⊢ ↑↑μ s⁻¹ = 0\n[PROOFSTEP]\nsuffices map (fun z : G × G => (z.2 * z.1, z.1⁻¹)) (μ.prod μ) (s⁻¹ ×ˢ s⁻¹) = 0 by\n  simpa only [(measurePreserving_mul_prod_inv μ μ).map_eq, prod_prod, mul_eq_zero (M₀ := ℝ≥0∞), or_self_iff] using this\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\nhf : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nthis : ↑↑(map (fun z => (z.snd * z.fst, z.fst⁻¹)) (Measure.prod μ μ)) (s⁻¹ ×ˢ s⁻¹) = 0\n⊢ ↑↑μ s⁻¹ = 0\n[PROOFSTEP]\nsimpa only [(measurePreserving_mul_prod_inv μ μ).map_eq, prod_prod, mul_eq_zero (M₀ := ℝ≥0∞), or_self_iff] using this\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\nhf : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\n⊢ ↑↑(map (fun z => (z.snd * z.fst, z.fst⁻¹)) (Measure.prod μ μ)) (s⁻¹ ×ˢ s⁻¹) = 0\n[PROOFSTEP]\nhave hsm' : MeasurableSet (s⁻¹ ×ˢ s⁻¹) := hsm.inv.prod hsm.inv\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nhsm : MeasurableSet s\nhμs : ↑↑μ s = 0\nhf : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nhsm' : MeasurableSet (s⁻¹ ×ˢ s⁻¹)\n⊢ ↑↑(map (fun z => (z.snd * z.fst, z.fst⁻¹)) (Measure.prod μ μ)) (s⁻¹ ×ˢ s⁻¹) = 0\n[PROOFSTEP]\nsimp_rw [map_apply hf hsm', prod_apply_symm (μ := μ) (ν := μ) (hf hsm'), preimage_preimage, mk_preimage_prod,\n  inv_preimage, inv_inv, measure_mono_null (inter_subset_right _ _) hμs, lintegral_zero]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\n⊢ ↑↑μ s⁻¹ = 0 ↔ ↑↑μ s = 0\n[PROOFSTEP]\nrefine' ⟨fun hs => _, (quasiMeasurePreserving_inv μ).preimage_null⟩\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\nhs : ↑↑μ s⁻¹ = 0\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nrw [← inv_inv s]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\nhs : ↑↑μ s⁻¹ = 0\n⊢ ↑↑μ s⁻¹⁻¹ = 0\n[PROOFSTEP]\nexact (quasiMeasurePreserving_inv μ).preimage_null hs\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\n⊢ μ ≪ Measure.inv μ\n[PROOFSTEP]\nrefine' AbsolutelyContinuous.mk fun s _ => _\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ns : Set G\nx✝ : MeasurableSet s\n⊢ ↑↑(Measure.inv μ) s = 0 → ↑↑μ s = 0\n[PROOFSTEP]\nsimp_rw [inv_apply μ s, measure_inv_null, imp_self]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), f (y * x) x⁻¹ ∂ν ∂μ = ∫⁻ (x : G), ∫⁻ (y : G), f x y ∂ν ∂μ\n[PROOFSTEP]\nhave h : Measurable fun z : G × G => (z.2 * z.1, z.1⁻¹) :=\n  (measurable_snd.mul measurable_fst).prod_mk measurable_fst.inv\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), f (y * x) x⁻¹ ∂ν ∂μ = ∫⁻ (x : G), ∫⁻ (y : G), f x y ∂ν ∂μ\n[PROOFSTEP]\nhave h2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹) (μ.prod ν) :=\n  hf.comp_quasiMeasurePreserving (measurePreserving_mul_prod_inv μ ν).quasiMeasurePreserving\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), f (y * x) x⁻¹ ∂ν ∂μ = ∫⁻ (x : G), ∫⁻ (y : G), f x y ∂ν ∂μ\n[PROOFSTEP]\nsimp_rw [lintegral_lintegral h2f, lintegral_lintegral hf]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n⊢ ∫⁻ (z : G × G), f (z.snd * z.fst) z.fst⁻¹ ∂Measure.prod μ ν = ∫⁻ (z : G × G), f z.fst z.snd ∂Measure.prod μ ν\n[PROOFSTEP]\nconv_rhs => rw [← (measurePreserving_mul_prod_inv μ ν).map_eq]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n| ∫⁻ (z : G × G), f z.fst z.snd ∂Measure.prod μ ν\n[PROOFSTEP]\nrw [← (measurePreserving_mul_prod_inv μ ν).map_eq]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n| ∫⁻ (z : G × G), f z.fst z.snd ∂Measure.prod μ ν\n[PROOFSTEP]\nrw [← (measurePreserving_mul_prod_inv μ ν).map_eq]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n| ∫⁻ (z : G × G), f z.fst z.snd ∂Measure.prod μ ν\n[PROOFSTEP]\nrw [← (measurePreserving_mul_prod_inv μ ν).map_eq]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n⊢ ∫⁻ (z : G × G), f (z.snd * z.fst) z.fst⁻¹ ∂Measure.prod μ ν =\n    ∫⁻ (z : G × G), f z.fst z.snd ∂map (fun z => (z.snd * z.fst, z.fst⁻¹)) (Measure.prod μ ν)\n[PROOFSTEP]\nsymm\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nf : G → G → ℝ≥0∞\nhf : AEMeasurable (uncurry f)\nh : Measurable fun z => (z.snd * z.fst, z.fst⁻¹)\nh2f : AEMeasurable (uncurry fun x y => f (y * x) x⁻¹)\n⊢ ∫⁻ (z : G × G), f z.fst z.snd ∂map (fun z => (z.snd * z.fst, z.fst⁻¹)) (Measure.prod μ ν) =\n    ∫⁻ (z : G × G), f (z.snd * z.fst) z.fst⁻¹ ∂Measure.prod μ ν\n[PROOFSTEP]\nexact lintegral_map' (hf.mono' (measurePreserving_mul_prod_inv μ ν).map_eq.absolutelyContinuous) h.aemeasurable\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ny : G\n⊢ ↑↑μ ((fun x => x * y) ⁻¹' s) = 0 ↔ ↑↑μ ((fun x => y⁻¹ * x) ⁻¹' s⁻¹)⁻¹ = 0\n[PROOFSTEP]\nsimp_rw [← inv_preimage, preimage_preimage, mul_inv_rev, inv_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ny : G\n⊢ ↑↑μ ((fun x => y⁻¹ * x) ⁻¹' s⁻¹)⁻¹ = 0 ↔ ↑↑μ s = 0\n[PROOFSTEP]\nsimp only [measure_inv_null μ, measure_preimage_mul]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ μ ≪ map (fun x => x * g) μ\n[PROOFSTEP]\nrefine' AbsolutelyContinuous.mk fun s hs => _\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\ns : Set G\nhs : MeasurableSet s\n⊢ ↑↑(map (fun x => x * g) μ) s = 0 → ↑↑μ s = 0\n[PROOFSTEP]\nrw [map_apply (measurable_mul_const g) hs, measure_mul_right_null]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\ns : Set G\nhs : MeasurableSet s\n⊢ ↑↑μ s = 0 → ↑↑μ s = 0\n[PROOFSTEP]\nexact id\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ μ ≪ map (fun h => g / h) μ\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ μ ≪ map (fun h => g * h⁻¹) μ\n[PROOFSTEP]\nerw [← map_map (measurable_const_mul g) measurable_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ μ ≪ map (fun x => g * x) (map Inv.inv μ)\n[PROOFSTEP]\nconv_lhs => rw [← map_mul_left_eq_self μ g]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n| μ\n[PROOFSTEP]\nrw [← map_mul_left_eq_self μ g]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ map (fun x => g * x) μ ≪ map (fun x => g * x) (map Inv.inv μ)\n[PROOFSTEP]\nexact (absolutelyContinuous_inv μ).map (measurable_const_mul g)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ ↑↑μ s * ∫⁻ (y : G), f y ∂ν = ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ\n[PROOFSTEP]\nrw [← set_lintegral_one, ← lintegral_indicator _ sm, ←\n  lintegral_lintegral_mul (measurable_const.indicator sm).aemeasurable hf.aemeasurable, ←\n  lintegral_lintegral_mul_inv μ ν]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), indicator s (fun x => 1) (y * x) * f x⁻¹ ∂ν ∂μ =\n    ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ\ncase hf\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ AEMeasurable (uncurry fun x y => indicator s (fun x => 1) x * f y)\n[PROOFSTEP]\nswap\n[GOAL]\ncase hf\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ AEMeasurable (uncurry fun x y => indicator s (fun x => 1) x * f y)\n[PROOFSTEP]\nexact (((measurable_const.indicator sm).comp measurable_fst).mul (hf.comp measurable_snd)).aemeasurable\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), indicator s (fun x => 1) (y * x) * f x⁻¹ ∂ν ∂μ =\n    ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ\n[PROOFSTEP]\nhave ms : ∀ x : G, Measurable fun y => ((fun z => z * x) ⁻¹' s).indicator (fun _ => (1 : ℝ≥0∞)) y := fun x =>\n  measurable_const.indicator (measurable_mul_const _ sm)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), indicator s (fun x => 1) (y * x) * f x⁻¹ ∂ν ∂μ =\n    ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ\n[PROOFSTEP]\nhave : ∀ x y, s.indicator (fun _ : G => (1 : ℝ≥0∞)) (y * x) = ((fun z => z * x) ⁻¹' s).indicator (fun b : G => 1) y :=\n  by intro x y; symm; convert indicator_comp_right (M := ℝ≥0∞) fun y => y * x using 2; ext1; rfl\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\n⊢ ∀ (x y : G), indicator s (fun x => 1) (y * x) = indicator ((fun z => z * x) ⁻¹' s) (fun b => 1) y\n[PROOFSTEP]\nintro x y\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\nx y : G\n⊢ indicator s (fun x => 1) (y * x) = indicator ((fun z => z * x) ⁻¹' s) (fun b => 1) y\n[PROOFSTEP]\nsymm\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\nx y : G\n⊢ indicator ((fun z => z * x) ⁻¹' s) (fun b => 1) y = indicator s (fun x => 1) (y * x)\n[PROOFSTEP]\nconvert indicator_comp_right (M := ℝ≥0∞) fun y => y * x using 2\n[GOAL]\ncase h.e'_2.h.e'_5\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\nx y : G\n⊢ (fun b => 1) = (fun x => 1) ∘ fun y => y * x\n[PROOFSTEP]\next1\n[GOAL]\ncase h.e'_2.h.e'_5.h\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\nx y x✝ : G\n⊢ 1 = ((fun x => 1) ∘ fun y => y * x) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nf : G → ℝ≥0∞\nhf : Measurable f\nms : ∀ (x : G), Measurable fun y => indicator ((fun z => z * x) ⁻¹' s) (fun x => 1) y\nthis : ∀ (x y : G), indicator s (fun x => 1) (y * x) = indicator ((fun z => z * x) ⁻¹' s) (fun b => 1) y\n⊢ ∫⁻ (x : G), ∫⁻ (y : G), indicator s (fun x => 1) (y * x) * f x⁻¹ ∂ν ∂μ =\n    ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * f x⁻¹ ∂μ\n[PROOFSTEP]\nsimp_rw [this, lintegral_mul_const _ (ms _), lintegral_indicator _ (measurable_mul_const _ sm), set_lintegral_one]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhν : ν ≠ 0\n⊢ μ ≪ ν\n[PROOFSTEP]\nrefine' AbsolutelyContinuous.mk fun s sm hνs => _\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhν : ν ≠ 0\ns : Set G\nsm : MeasurableSet s\nhνs : ↑↑ν s = 0\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nhave h1 := measure_mul_lintegral_eq μ ν sm 1 measurable_one\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhν : ν ≠ 0\ns : Set G\nsm : MeasurableSet s\nhνs : ↑↑ν s = 0\nh1 : ↑↑μ s * ∫⁻ (y : G), OfNat.ofNat 1 y ∂ν = ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * OfNat.ofNat 1 x⁻¹ ∂μ\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nsimp_rw [Pi.one_apply, lintegral_one, mul_one, (measure_mul_right_null ν _).mpr hνs, lintegral_zero,\n  mul_eq_zero (M₀ := ℝ≥0∞), measure_univ_eq_zero.not.mpr hν, or_false_iff] at h1 \n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhν : ν ≠ 0\ns : Set G\nsm : MeasurableSet s\nhνs : ↑↑ν s = 0\nh1 : ↑↑μ s = 0\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nexact h1\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∀ᵐ (x : G) ∂μ, ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n[PROOFSTEP]\nrefine' ae_of_forall_measure_lt_top_ae_restrict' ν.inv _ _\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\n⊢ ∀ (s_1 : Set G),\n    MeasurableSet s_1 →\n      ↑↑μ s_1 < ⊤ → ↑↑(Measure.inv ν) s_1 < ⊤ → ∀ᵐ (x : G) ∂Measure.restrict μ s_1, ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n[PROOFSTEP]\nintro A hA _ h3A\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑(Measure.inv ν) A < ⊤\n⊢ ∀ᵐ (x : G) ∂Measure.restrict μ A, ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n[PROOFSTEP]\nsimp only [ν.inv_apply] at h3A \n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\n⊢ ∀ᵐ (x : G) ∂Measure.restrict μ A, ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n[PROOFSTEP]\napply ae_lt_top (measurable_measure_mul_right ν sm)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\n⊢ ∫⁻ (x : G) in A, ↑↑ν ((fun y => y * x) ⁻¹' s) ∂μ ≠ ⊤\n[PROOFSTEP]\nhave h1 := measure_mul_lintegral_eq μ ν sm (A⁻¹.indicator 1) (measurable_one.indicator hA.inv)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\nh1 : ↑↑μ s * ∫⁻ (y : G), indicator A⁻¹ 1 y ∂ν = ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * indicator A⁻¹ 1 x⁻¹ ∂μ\n⊢ ∫⁻ (x : G) in A, ↑↑ν ((fun y => y * x) ⁻¹' s) ∂μ ≠ ⊤\n[PROOFSTEP]\nrw [lintegral_indicator _ hA.inv] at h1 \n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\nh1 : ↑↑μ s * ∫⁻ (a : G) in A⁻¹, OfNat.ofNat 1 a ∂ν = ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * indicator A⁻¹ 1 x⁻¹ ∂μ\n⊢ ∫⁻ (x : G) in A, ↑↑ν ((fun y => y * x) ⁻¹' s) ∂μ ≠ ⊤\n[PROOFSTEP]\nsimp_rw [Pi.one_apply, set_lintegral_one, ← image_inv, indicator_image inv_injective, image_inv, ←\n  indicator_mul_right _ fun x => ν ((fun y => y * x) ⁻¹' s), Function.comp, Pi.one_apply, mul_one] at h1 \n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\nh1 : ↑↑μ s * ↑↑ν A⁻¹ = ∫⁻ (x : G), indicator A (fun a => ↑↑ν ((fun y => y * a) ⁻¹' s)) x ∂μ\n⊢ ∫⁻ (x : G) in A, ↑↑ν ((fun y => y * x) ⁻¹' s) ∂μ ≠ ⊤\n[PROOFSTEP]\nrw [← lintegral_indicator _ hA, ← h1]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nhμs : ↑↑μ s ≠ ⊤\nA : Set G\nhA : MeasurableSet A\na✝ : ↑↑μ A < ⊤\nh3A : ↑↑ν A⁻¹ < ⊤\nh1 : ↑↑μ s * ↑↑ν A⁻¹ = ∫⁻ (x : G), indicator A (fun a => ↑↑ν ((fun y => y * a) ⁻¹' s)) x ∂μ\n⊢ ↑↑μ s * ↑↑ν A⁻¹ ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.mul_ne_top hμs h3A.ne\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ ∀ᵐ (x : G) ∂μ, ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n[PROOFSTEP]\nrefine' (ae_measure_preimage_mul_right_lt_top ν ν sm h3s).filter_mono _\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ ae μ ≤ ae ν\n[PROOFSTEP]\nrefine' (absolutelyContinuous_of_isMulLeftInvariant μ ν _).ae_le\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ ν ≠ 0\n[PROOFSTEP]\nrefine' mt _ h2s\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ ν = 0 → ↑↑ν s = 0\n[PROOFSTEP]\nintro hν\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nhν : ν = 0\n⊢ ↑↑ν s = 0\n[PROOFSTEP]\nrw [hν, Measure.coe_zero, Pi.zero_apply]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\n⊢ ↑↑μ s * ∫⁻ (y : G), f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν = ∫⁻ (x : G), f x ∂μ\n[PROOFSTEP]\nset g := fun y => f y⁻¹ / ν ((fun x => x * y⁻¹) ⁻¹' s)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\ng : G → ℝ≥0∞ := fun y => f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s)\n⊢ ↑↑μ s * lintegral ν g = ∫⁻ (x : G), f x ∂μ\n[PROOFSTEP]\nhave hg : Measurable g := (hf.comp measurable_inv).div ((measurable_measure_mul_right ν sm).comp measurable_inv)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\ng : G → ℝ≥0∞ := fun y => f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s)\nhg : Measurable g\n⊢ ↑↑μ s * lintegral ν g = ∫⁻ (x : G), f x ∂μ\n[PROOFSTEP]\nsimp_rw [measure_mul_lintegral_eq μ ν sm g hg, inv_inv]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\ng : G → ℝ≥0∞ := fun y => f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s)\nhg : Measurable g\n⊢ ∫⁻ (x : G), ↑↑ν ((fun z => z * x) ⁻¹' s) * (f x / ↑↑ν ((fun z => z * x) ⁻¹' s)) ∂μ = ∫⁻ (x : G), f x ∂μ\n[PROOFSTEP]\nrefine' lintegral_congr_ae _\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\ng : G → ℝ≥0∞ := fun y => f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s)\nhg : Measurable g\n⊢ (fun x => ↑↑ν ((fun z => z * x) ⁻¹' s) * (f x / ↑↑ν ((fun z => z * x) ⁻¹' s))) =ᶠ[ae μ] fun x => f x\n[PROOFSTEP]\nrefine' (ae_measure_preimage_mul_right_lt_top_of_ne_zero μ ν sm h2s h3s).mono fun x hx => _\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nsm : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nf : G → ℝ≥0∞\nhf : Measurable f\ng : G → ℝ≥0∞ := fun y => f y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s)\nhg : Measurable g\nx : G\nhx : ↑↑ν ((fun y => y * x) ⁻¹' s) < ⊤\n⊢ (fun x => ↑↑ν ((fun z => z * x) ⁻¹' s) * (f x / ↑↑ν ((fun z => z * x) ⁻¹' s))) x = (fun x => f x) x\n[PROOFSTEP]\nsimp_rw [ENNReal.mul_div_cancel' (measure_mul_right_ne_zero ν h2s _) hx.ne]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\ns t : Set G\nhs : MeasurableSet s\nht : MeasurableSet t\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ ↑↑μ s * ↑↑ν t = ↑↑ν s * ↑↑μ t\n[PROOFSTEP]\nhave h1 := measure_lintegral_div_measure ν ν hs h2s h3s (t.indicator fun _ => 1) (measurable_const.indicator ht)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\ns t : Set G\nhs : MeasurableSet s\nht : MeasurableSet t\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nh1 :\n  ↑↑ν s * ∫⁻ (y : G), indicator t (fun x => 1) y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν =\n    ∫⁻ (x : G), indicator t (fun x => 1) x ∂ν\n⊢ ↑↑μ s * ↑↑ν t = ↑↑ν s * ↑↑μ t\n[PROOFSTEP]\nhave h2 := measure_lintegral_div_measure μ ν hs h2s h3s (t.indicator fun _ => 1) (measurable_const.indicator ht)\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\ns t : Set G\nhs : MeasurableSet s\nht : MeasurableSet t\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nh1 :\n  ↑↑ν s * ∫⁻ (y : G), indicator t (fun x => 1) y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν =\n    ∫⁻ (x : G), indicator t (fun x => 1) x ∂ν\nh2 :\n  ↑↑μ s * ∫⁻ (y : G), indicator t (fun x => 1) y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν =\n    ∫⁻ (x : G), indicator t (fun x => 1) x ∂μ\n⊢ ↑↑μ s * ↑↑ν t = ↑↑ν s * ↑↑μ t\n[PROOFSTEP]\nrw [lintegral_indicator _ ht, set_lintegral_one] at h1 h2 \n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns✝ : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\ns t : Set G\nhs : MeasurableSet s\nht : MeasurableSet t\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nh1 : ↑↑ν s * ∫⁻ (y : G), indicator t (fun x => 1) y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν = ↑↑ν t\nh2 : ↑↑μ s * ∫⁻ (y : G), indicator t (fun x => 1) y⁻¹ / ↑↑ν ((fun x => x * y⁻¹) ⁻¹' s) ∂ν = ↑↑μ t\n⊢ ↑↑μ s * ↑↑ν t = ↑↑ν s * ↑↑μ t\n[PROOFSTEP]\nrw [← h1, mul_left_comm, h2]\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhs : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\n⊢ μ = (↑↑μ s / ↑↑ν s) • ν\n[PROOFSTEP]\next1 t ht\n[GOAL]\ncase h\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulLeftInvariant μ\ninst✝ : IsMulLeftInvariant ν\nhs : MeasurableSet s\nh2s : ↑↑ν s ≠ 0\nh3s : ↑↑ν s ≠ ⊤\nt : Set G\nht : MeasurableSet t\n⊢ ↑↑μ t = ↑↑((↑↑μ s / ↑↑ν s) • ν) t\n[PROOFSTEP]\nrw [smul_apply, smul_eq_mul, mul_comm, ← mul_div_assoc, mul_comm, measure_mul_measure_eq μ ν hs ht h2s h3s,\n  mul_div_assoc, ENNReal.mul_div_cancel' h2s h3s]\n[GOAL]\nG : Type u_1\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : Group G\ninst✝³ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝² : SigmaFinite ν\ninst✝¹ : SigmaFinite μ\ns : Set G\ninst✝ : IsMulRightInvariant μ\n⊢ MeasurePreserving ?m.111352\n[PROOFSTEP]\napply measurePreserving_prod_mul_swap_right μ ν\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\n⊢ MeasurePreserving ?m.118254\n[PROOFSTEP]\napply measurePreserving_prod_div_swap μ ν\n[GOAL]\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulRightInvariant μ\ninst✝ : IsMulRightInvariant ν\n⊢ MeasurePreserving fun z => (z.fst * z.snd, z.fst⁻¹)\n[PROOFSTEP]\nconvert (measurePreserving_prod_div_swap ν μ).comp (measurePreserving_prod_mul_swap_right μ ν) using 1\n[GOAL]\ncase h.e'_5\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulRightInvariant μ\ninst✝ : IsMulRightInvariant ν\n⊢ (fun z => (z.fst * z.snd, z.fst⁻¹)) = (fun z => (z.snd, z.fst / z.snd)) ∘ fun z => (z.snd, z.fst * z.snd)\n[PROOFSTEP]\next1 ⟨x, y⟩\n[GOAL]\ncase h.e'_5.h.mk\nG : Type u_1\ninst✝⁷ : MeasurableSpace G\ninst✝⁶ : Group G\ninst✝⁵ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝⁴ : SigmaFinite ν\ninst✝³ : SigmaFinite μ\ns : Set G\ninst✝² : MeasurableInv G\ninst✝¹ : IsMulRightInvariant μ\ninst✝ : IsMulRightInvariant ν\nx y : G\n⊢ ((x, y).fst * (x, y).snd, (x, y).fst⁻¹) = ((fun z => (z.snd, z.fst / z.snd)) ∘ fun z => (z.snd, z.fst * z.snd)) (x, y)\n[PROOFSTEP]\nsimp_rw [Function.comp_apply, div_mul_eq_div_div_swap, div_self', one_div]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\n⊢ QuasiMeasurePreserving Inv.inv\n[PROOFSTEP]\nrw [← μ.inv_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\n⊢ QuasiMeasurePreserving Inv.inv\n[PROOFSTEP]\nexact (quasiMeasurePreserving_inv μ.inv).mono (inv_absolutelyContinuous μ.inv) (absolutelyContinuous_inv μ.inv)\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => g / h\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => g * h⁻¹\n[PROOFSTEP]\nexact (measurePreserving_mul_left μ g).quasiMeasurePreserving.comp (quasiMeasurePreserving_inv μ)\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => g / h\n[PROOFSTEP]\nrw [← μ.inv_inv]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => g / h\n[PROOFSTEP]\nexact (quasiMeasurePreserving_div_left μ.inv g).mono (inv_absolutelyContinuous μ.inv) (absolutelyContinuous_inv μ.inv)\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\n⊢ QuasiMeasurePreserving fun p => p.fst / p.snd\n[PROOFSTEP]\nrefine' QuasiMeasurePreserving.prod_of_left measurable_div (eventually_of_forall fun y => _)\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ny : G\n⊢ QuasiMeasurePreserving fun x => (x, y).fst / (x, y).snd\n[PROOFSTEP]\nexact (measurePreserving_div_right μ y).quasiMeasurePreserving\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => h * g\n[PROOFSTEP]\nrefine' ⟨measurable_mul_const g, AbsolutelyContinuous.mk fun s hs => _⟩\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\ns : Set G\nhs : MeasurableSet s\n⊢ ↑↑μ s = 0 → ↑↑(map (fun h => h * g) μ) s = 0\n[PROOFSTEP]\nrw [map_apply (measurable_mul_const g) hs, measure_mul_right_null]\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns✝ : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulLeftInvariant μ\ng : G\ns : Set G\nhs : MeasurableSet s\n⊢ ↑↑μ s = 0 → ↑↑μ s = 0\n[PROOFSTEP]\nexact id\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\n⊢ QuasiMeasurePreserving fun h => g * h\n[PROOFSTEP]\nhave :=\n  (quasiMeasurePreserving_mul_right μ.inv g⁻¹).mono (inv_absolutelyContinuous μ.inv) (absolutelyContinuous_inv μ.inv)\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\nthis : QuasiMeasurePreserving fun h => h * g⁻¹\n⊢ QuasiMeasurePreserving fun h => g * h\n[PROOFSTEP]\nrw [μ.inv_inv] at this \n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\nthis : QuasiMeasurePreserving fun h => h * g⁻¹\n⊢ QuasiMeasurePreserving fun h => g * h\n[PROOFSTEP]\nhave :=\n  (quasiMeasurePreserving_inv_of_right_invariant μ).comp (this.comp (quasiMeasurePreserving_inv_of_right_invariant μ))\n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\nthis✝ : QuasiMeasurePreserving fun h => h * g⁻¹\nthis : QuasiMeasurePreserving (Inv.inv ∘ (fun h => h * g⁻¹) ∘ Inv.inv)\n⊢ QuasiMeasurePreserving fun h => g * h\n[PROOFSTEP]\nsimp_rw [Function.comp, mul_inv_rev, inv_inv] at this \n[GOAL]\nG : Type u_1\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : Group G\ninst✝⁴ : MeasurableMul₂ G\nμ ν : Measure G\ninst✝³ : SigmaFinite ν\ninst✝² : SigmaFinite μ\ns : Set G\ninst✝¹ : MeasurableInv G\ninst✝ : IsMulRightInvariant μ\ng : G\nthis✝ : QuasiMeasurePreserving fun h => h * g⁻¹\nthis : QuasiMeasurePreserving fun x => g * x\n⊢ QuasiMeasurePreserving fun h => g * h\n[PROOFSTEP]\nexact this\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Group.Prod", "llama_tokens": 24810, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5774953651858117, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.293258998007607}}
{"text": "[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₁.toMulOneClass = m₂.toMulOneClass := MulOneClass.ext h_mul\n[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis : toMulOneClass = toMulOneClass\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave h₁ : m₁.one = m₂.one := congr_arg (·.one) (this)\n[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\n⊢ m₁ = m₂\n[PROOFSTEP]\nlet f : @MonoidHom M M m₁.toMulOneClass m₂.toMulOneClass :=\n  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)\n[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₁.npow = m₂.npow := by\n  ext n x\n  exact @MonoidHom.map_pow M M m₁ m₂ f x n\n[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\n⊢ npow = npow\n[PROOFSTEP]\next n x\n[GOAL]\ncase h.h\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nn : ℕ\nx : M\n⊢ npow n x = npow n x\n[PROOFSTEP]\nexact @MonoidHom.map_pow M M m₁ m₂ f x n\n[GOAL]\nM : Type u\nm₁ m₂ : Monoid M\nh_mul : Mul.mul = Mul.mul\nthis✝ : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : npow = npow\n⊢ m₁ = m₂\n[PROOFSTEP]\nrcases m₁ with @⟨@⟨⟨_⟩⟩, ⟨_⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u\nm₂ : Monoid M\nnpow✝ : ℕ → M → M\nmul✝ : M → M → M\nmul_assoc✝ : ∀ (a b c : M), a * b * c = a * (b * c)\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\none✝ : M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nh_mul : Mul.mul = Mul.mul\nthis✝ : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : npow = npow\n⊢ mk one_mul✝ mul_one✝ npow✝ = m₂\n[PROOFSTEP]\nrcases m₂ with @⟨@⟨⟨_⟩⟩, ⟨_⟩⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.mk.mk\nM : Type u\nnpow✝¹ : ℕ → M → M\nmul✝¹ : M → M → M\nmul_assoc✝¹ : ∀ (a b c : M), a * b * c = a * (b * c)\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\none✝¹ : M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow✝ : ℕ → M → M\nmul✝ : M → M → M\nmul_assoc✝ : ∀ (a b c : M), a * b * c = a * (b * c)\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\none✝ : M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nh_mul : Mul.mul = Mul.mul\nthis✝ : toMulOneClass = toMulOneClass\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : npow = npow\n⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u\n⊢ Function.Injective (@toMonoid M)\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ h\n[GOAL]\ncase mk.mk\nM : Type u\ntoMonoid✝¹ : Monoid M\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoMonoid✝ : Monoid M\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toMonoid = toMonoid\n⊢ mk mul_comm✝¹ = mk mul_comm✝\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u\n⊢ Function.Injective (@toMonoid M)\n[PROOFSTEP]\nrintro @⟨@⟨⟩⟩ @⟨@⟨⟩⟩ h\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.mk.mk.e_toLeftCancelSemigroup.e_toSemigroup\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ toSemigroup✝¹ = toSemigroup✝\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk.mk.mk.mk.e_toOne\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ toOne✝¹ = toOne✝\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk.mk.mk.mk.e_npow\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ npow✝¹ = npow✝\n[PROOFSTEP]\ninjection h\n[GOAL]\nM : Type u\n⊢ Function.Injective (@toMonoid M)\n[PROOFSTEP]\nrintro @⟨@⟨⟩⟩ @⟨@⟨⟩⟩ h\n[GOAL]\ncase mk.mk.mk.mk\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ mk one_mul✝¹ mul_one✝¹ npow✝¹ = mk one_mul✝ mul_one✝ npow✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.mk.mk.e_toRightCancelSemigroup.e_toSemigroup\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ toSemigroup✝¹ = toSemigroup✝\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk.mk.mk.mk.e_toOne\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ toOne✝¹ = toOne✝\n[PROOFSTEP]\ninjection h\n[GOAL]\ncase mk.mk.mk.mk.e_npow\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nh : toMonoid = toMonoid\n⊢ npow✝¹ = npow✝\n[PROOFSTEP]\ninjection h\n[GOAL]\nM : Type u\n⊢ Function.Injective (@toLeftCancelMonoid M)\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ h\n[GOAL]\ncase mk.mk\nM : Type u\ntoLeftCancelMonoid✝¹ : LeftCancelMonoid M\nmul_right_cancel✝¹ : ∀ (a b c : M), a * b = c * b → a = c\ntoLeftCancelMonoid✝ : LeftCancelMonoid M\nmul_right_cancel✝ : ∀ (a b c : M), a * b = c * b → a = c\nh : toLeftCancelMonoid = toLeftCancelMonoid\n⊢ mk mul_right_cancel✝¹ = mk mul_right_cancel✝\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u\n⊢ Function.Injective (@toCommMonoid M)\n[PROOFSTEP]\nrintro @⟨@⟨@⟨⟩⟩⟩ @⟨@⟨@⟨⟩⟩⟩ h\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ mk mul_comm✝¹ = mk mul_comm✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ toSemigroup✝¹ = toSemigroup✝\n[PROOFSTEP]\n{ injection h with h'\n  injection h'\n}\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ toSemigroup✝¹ = toSemigroup✝\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toLeftCancelSemigroup.e_toSemigroup\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh' :\n  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =\n    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow\n⊢ toSemigroup✝¹ = toSemigroup✝\n[PROOFSTEP]\ninjection h'\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ toOne✝¹ = toOne✝\n[PROOFSTEP]\n{ injection h with h'\n  injection h'\n}\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ toOne✝¹ = toOne✝\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_toOne\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh' :\n  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =\n    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow\n⊢ toOne✝¹ = toOne✝\n[PROOFSTEP]\ninjection h'\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ npow✝¹ = npow✝\n[PROOFSTEP]\n{ injection h with h'\n  injection h'\n}\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh : toCommMonoid = toCommMonoid\n⊢ npow✝¹ = npow✝\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase mk.mk.mk.mk.mk.mk.e_toLeftCancelMonoid.e_npow\nM : Type u\ntoOne✝¹ : One M\nnpow✝¹ : ℕ → M → M\nnpow_zero✝¹ : ∀ (x : M), npow✝¹ 0 x = 1\ntoSemigroup✝¹ : Semigroup M\nmul_left_cancel✝¹ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝¹ : ∀ (a : M), 1 * a = a\nmul_one✝¹ : ∀ (a : M), a * 1 = a\nnpow_succ✝¹ : ∀ (n : ℕ) (x : M), npow✝¹ (n + 1) x = x * npow✝¹ n x\nmul_comm✝¹ : ∀ (a b : M), a * b = b * a\ntoOne✝ : One M\nnpow✝ : ℕ → M → M\nnpow_zero✝ : ∀ (x : M), npow✝ 0 x = 1\ntoSemigroup✝ : Semigroup M\nmul_left_cancel✝ : ∀ (a b c : M), a * b = a * c → b = c\none_mul✝ : ∀ (a : M), 1 * a = a\nmul_one✝ : ∀ (a : M), a * 1 = a\nnpow_succ✝ : ∀ (n : ℕ) (x : M), npow✝ (n + 1) x = x * npow✝ n x\nmul_comm✝ : ∀ (a b : M), a * b = b * a\nh' :\n  Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow =\n    Monoid.mk (_ : ∀ (a : M), 1 * a = a) (_ : ∀ (a : M), a * 1 = a) LeftCancelMonoid.npow\n⊢ npow✝¹ = npow✝\n[PROOFSTEP]\ninjection h'\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave h_mon := Monoid.ext h_mul\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave h₁ : m₁.one = m₂.one := congr_arg (·.one) h_mon\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\n⊢ m₁ = m₂\n[PROOFSTEP]\nlet f : @MonoidHom M M m₁.toMulOneClass m₂.toMulOneClass :=\n  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₁.npow = m₂.npow := congr_arg (·.npow) h_mon\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : Monoid.npow = Monoid.npow\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₁.zpow = m₂.zpow := by\n  ext m x\n  exact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : Monoid.npow = Monoid.npow\n⊢ zpow = zpow\n[PROOFSTEP]\next m x\n[GOAL]\ncase h.h\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis : Monoid.npow = Monoid.npow\nm : ℤ\nx : M\n⊢ zpow m x = zpow m x\n[PROOFSTEP]\nexact @MonoidHom.map_zpow' M M m₁ m₂ f (congr_fun h_inv) x m\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝ : Monoid.npow = Monoid.npow\nthis : zpow = zpow\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₁.div = m₂.div := by\n  ext a b\n  exact @map_div' _ _ (@MonoidHom _ _ (_) _) (id _) _ (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝ : Monoid.npow = Monoid.npow\nthis : zpow = zpow\n⊢ Div.div = Div.div\n[PROOFSTEP]\next a b\n[GOAL]\ncase h.h\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝ : Monoid.npow = Monoid.npow\nthis : zpow = zpow\na b : M\n⊢ Div.div a b = Div.div a b\n[PROOFSTEP]\nexact @map_div' _ _ (@MonoidHom _ _ (_) _) (id _) _ (@MonoidHom.monoidHomClass _ _ (_) _) f (congr_fun h_inv) a b\n[GOAL]\nM : Type u_1\nm₁ m₂ : DivInvMonoid M\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝¹ : Monoid.npow = Monoid.npow\nthis✝ : zpow = zpow\nthis : Div.div = Div.div\n⊢ m₁ = m₂\n[PROOFSTEP]\nrcases m₁ with @⟨_, ⟨_⟩, ⟨_⟩⟩\n[GOAL]\ncase mk.mk.mk\nM : Type u_1\nm₂ : DivInvMonoid M\ntoMonoid✝ : Monoid M\nzpow✝ : ℤ → M → M\nzpow_zero'✝ : ∀ (a : M), zpow✝ 0 a = 1\nzpow_succ'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.ofNat (Nat.succ n)) a = a * zpow✝ (Int.ofNat n) a\ninv✝ : M → M\nzpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑(Nat.succ n)) a)⁻¹\ndiv✝ : M → M → M\ndiv_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝¹ : Monoid.npow = Monoid.npow\nthis✝ : zpow = zpow\nthis : Div.div = Div.div\n⊢ mk zpow✝ = m₂\n[PROOFSTEP]\nrcases m₂ with @⟨_, ⟨_⟩, ⟨_⟩⟩\n[GOAL]\ncase mk.mk.mk.mk.mk.mk\nM : Type u_1\ntoMonoid✝¹ : Monoid M\nzpow✝¹ : ℤ → M → M\nzpow_zero'✝¹ : ∀ (a : M), zpow✝¹ 0 a = 1\nzpow_succ'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.ofNat (Nat.succ n)) a = a * zpow✝¹ (Int.ofNat n) a\ninv✝¹ : M → M\nzpow_neg'✝¹ : ∀ (n : ℕ) (a : M), zpow✝¹ (Int.negSucc n) a = (zpow✝¹ (↑(Nat.succ n)) a)⁻¹\ndiv✝¹ : M → M → M\ndiv_eq_mul_inv✝¹ : ∀ (a b : M), a / b = a * b⁻¹\ntoMonoid✝ : Monoid M\nzpow✝ : ℤ → M → M\nzpow_zero'✝ : ∀ (a : M), zpow✝ 0 a = 1\nzpow_succ'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.ofNat (Nat.succ n)) a = a * zpow✝ (Int.ofNat n) a\ninv✝ : M → M\nzpow_neg'✝ : ∀ (n : ℕ) (a : M), zpow✝ (Int.negSucc n) a = (zpow✝ (↑(Nat.succ n)) a)⁻¹\ndiv✝ : M → M → M\ndiv_eq_mul_inv✝ : ∀ (a b : M), a / b = a * b⁻¹\nh_mul : Mul.mul = Mul.mul\nh_inv : Inv.inv = Inv.inv\nh_mon : toMonoid = toMonoid\nh₁ : One.one = One.one\nf : M →* M := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : M), Mul.mul x y = Mul.mul x y) }\nthis✝¹ : Monoid.npow = Monoid.npow\nthis✝ : zpow = zpow\nthis : Div.div = Div.div\n⊢ mk zpow✝¹ = mk zpow✝\n[PROOFSTEP]\ncongr\n[GOAL]\nG : Type u_1\ng₁ g₂ : Group G\nh_mul : Mul.mul = Mul.mul\n⊢ g₁ = g₂\n[PROOFSTEP]\nhave h₁ : g₁.one = g₂.one := congr_arg (·.one) (Monoid.ext h_mul)\n[GOAL]\nG : Type u_1\ng₁ g₂ : Group G\nh_mul : Mul.mul = Mul.mul\nh₁ : One.one = One.one\n⊢ g₁ = g₂\n[PROOFSTEP]\nlet f : @MonoidHom G G g₁.toMulOneClass g₂.toMulOneClass :=\n  @MonoidHom.mk _ _ (_) _ (@OneHom.mk _ _ (_) _ id h₁) (fun x y => congr_fun (congr_fun h_mul x) y)\n[GOAL]\nG : Type u_1\ng₁ g₂ : Group G\nh_mul : Mul.mul = Mul.mul\nh₁ : One.one = One.one\nf : G →* G := { toOneHom := { toFun := id, map_one' := h₁ }, map_mul' := (_ : ∀ (x y : G), Mul.mul x y = Mul.mul x y) }\n⊢ g₁ = g₂\n[PROOFSTEP]\nexact\n  Group.toDivInvMonoid_injective (DivInvMonoid.ext h_mul (funext <| @MonoidHom.map_inv G G g₁ g₂.toDivisionMonoid f))\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Group.Ext", "llama_tokens": 14486, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6150878555160665, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.29313835555535167}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\n⊢ ∀ (x : ↑(toTopCat X)),\n    ∃ U R, Nonempty (restrict X (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅ Spec.toLocallyRingedSpace.obj (op R))\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\n⊢ ∃ U R, Nonempty (restrict X (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅ Spec.toLocallyRingedSpace.obj (op R))\n[PROOFSTEP]\nobtain ⟨R, f, h₁, h₂⟩ := h x\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ ∃ U R, Nonempty (restrict X (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅ Spec.toLocallyRingedSpace.obj (op R))\n[PROOFSTEP]\nrefine' ⟨⟨⟨_, h₂.base_open.open_range⟩, h₁⟩, R, ⟨_⟩⟩\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ restrict X\n      (_ :\n        OpenEmbedding\n          ↑(Opens.inclusion\n              { obj := { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) },\n                  property := h₁ }.obj)) ≅\n    Spec.toLocallyRingedSpace.obj (op R)\n[PROOFSTEP]\napply LocallyRingedSpace.isoOfSheafedSpaceIso\n[GOAL]\ncase intro.intro.intro.f\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ (restrict X\n        (_ :\n          OpenEmbedding\n            ↑(Opens.inclusion\n                { obj := { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) },\n                    property := h₁ }.obj))).toSheafedSpace ≅\n    (Spec.toLocallyRingedSpace.obj (op R)).toSheafedSpace\n[PROOFSTEP]\nrefine' SheafedSpace.forgetToPresheafedSpace.preimageIso _\n[GOAL]\ncase intro.intro.intro.f\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ SheafedSpace.forgetToPresheafedSpace.obj\n      (restrict X\n          (_ :\n            OpenEmbedding\n              ↑(Opens.inclusion\n                  { obj := { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) },\n                      property := h₁ }.obj))).toSheafedSpace ≅\n    SheafedSpace.forgetToPresheafedSpace.obj (Spec.toLocallyRingedSpace.obj (op R)).toSheafedSpace\n[PROOFSTEP]\nskip\n[GOAL]\ncase intro.intro.intro.f\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ SheafedSpace.forgetToPresheafedSpace.obj\n      (restrict X\n          (_ :\n            OpenEmbedding\n              ↑(Opens.inclusion\n                  { obj := { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) },\n                      property := h₁ }.obj))).toSheafedSpace ≅\n    SheafedSpace.forgetToPresheafedSpace.obj (Spec.toLocallyRingedSpace.obj (op R)).toSheafedSpace\n[PROOFSTEP]\napply PresheafedSpace.IsOpenImmersion.isoOfRangeEq (PresheafedSpace.ofRestrict _ _) f.1\n[GOAL]\ncase intro.intro.intro.f\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ Set.range ↑(PresheafedSpace.ofRestrict X.toPresheafedSpace ?m.3415).base = Set.range ↑f.val.base\n[PROOFSTEP]\nexact Subtype.range_coe_subtype\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : LocallyRingedSpace\nh : ∀ (x : ↑(toTopCat X)), ∃ R f, x ∈ Set.range ↑f.val.base ∧ IsOpenImmersion f\nx : ↑(toTopCat X)\nR : CommRingCat\nf : Spec.toLocallyRingedSpace.obj (op R) ⟶ X\nh₁ : x ∈ Set.range ↑f.val.base\nh₂ : IsOpenImmersion f\n⊢ OpenEmbedding\n    ↑(Opens.inclusion\n        { obj := { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) },\n            property := h₁ }.obj)\n[PROOFSTEP]\nexact\n  Opens.openEmbedding\n    _\n      -- Porting note : was `infer_instance`\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\n⊢ ∀ (x : ↑↑X.toPresheafedSpace),\n    x ∈\n      Set.range\n        ↑((fun x =>\n                  (Nonempty.some\n                        (_ :\n                          Nonempty\n                            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                (_ :\n                                  OpenEmbedding\n                                    ↑(Opens.inclusion\n                                        (Exists.choose\n                                            (_ :\n                                              ∃ U R,\n                                                Nonempty\n                                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                    Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                              Spec.toLocallyRingedSpace.obj\n                                (op\n                                  (Exists.choose\n                                    (_ :\n                                      ∃ R,\n                                        Nonempty\n                                          (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                              (_ :\n                                                OpenEmbedding\n                                                  ↑(Opens.inclusion\n                                                      (Exists.choose\n                                                          (_ :\n                                                            ∃ U R,\n                                                              Nonempty\n                                                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                                    (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                                  Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                            Spec.toLocallyRingedSpace.obj (op R)))))))).inv ≫\n                    LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Exists.choose\n                                  (_ :\n                                    ∃ U R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))).obj)))\n                ((fun x => x) x)).val.base\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      ↑((fun x =>\n                (Nonempty.some\n                      (_ :\n                        Nonempty\n                          (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                              (_ :\n                                OpenEmbedding\n                                  ↑(Opens.inclusion\n                                      (Exists.choose\n                                          (_ :\n                                            ∃ U R,\n                                              Nonempty\n                                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                    (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                  Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                            Spec.toLocallyRingedSpace.obj\n                              (op\n                                (Exists.choose\n                                  (_ :\n                                    ∃ R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ :\n                                              OpenEmbedding\n                                                ↑(Opens.inclusion\n                                                    (Exists.choose\n                                                        (_ :\n                                                          ∃ U R,\n                                                            Nonempty\n                                                              (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                                  (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                                Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))))))).inv ≫\n                  LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)))\n              ((fun x => x) x)).val.base\n[PROOFSTEP]\nerw [coe_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      (↑(LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Exists.choose\n                            (_ :\n                              ∃ U R,\n                                Nonempty\n                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                    Spec.toLocallyRingedSpace.obj (op R)))).obj))).val.base ∘\n        ↑(Nonempty.some\n                  (_ :\n                    Nonempty\n                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                          (_ :\n                            OpenEmbedding\n                              ↑(Opens.inclusion\n                                  (Exists.choose\n                                      (_ :\n                                        ∃ U R,\n                                          Nonempty\n                                            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                              Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                        Spec.toLocallyRingedSpace.obj\n                          (op\n                            (Exists.choose\n                              (_ :\n                                ∃ R,\n                                  Nonempty\n                                    (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                        (_ :\n                                          OpenEmbedding\n                                            ↑(Opens.inclusion\n                                                (Exists.choose\n                                                    (_ :\n                                                      ∃ U R,\n                                                        Nonempty\n                                                          (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                              (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                            Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                      Spec.toLocallyRingedSpace.obj (op R)))))))).inv.val.base)\n[PROOFSTEP]\nrw [Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      ↑(LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      (Exists.choose\n                          (_ :\n                            ∃ U R,\n                              Nonempty\n                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                    (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                  Spec.toLocallyRingedSpace.obj (op R)))).obj))).val.base\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(Nonempty.some\n              (_ :\n                Nonempty\n                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Exists.choose\n                                  (_ :\n                                    ∃ U R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                    Spec.toLocallyRingedSpace.obj\n                      (op\n                        (Exists.choose\n                          (_ :\n                            ∃ R,\n                              Nonempty\n                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            (Exists.choose\n                                                (_ :\n                                                  ∃ U R,\n                                                    Nonempty\n                                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                  Spec.toLocallyRingedSpace.obj (op R)))))))).inv.val.base\n[PROOFSTEP]\nerw [Subtype.range_coe_subtype]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    {x_1 |\n      x_1 ∈\n        (Exists.choose\n            (_ :\n              ∃ U R,\n                Nonempty\n                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                    Spec.toLocallyRingedSpace.obj (op R)))).obj}\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(Nonempty.some\n              (_ :\n                Nonempty\n                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Exists.choose\n                                  (_ :\n                                    ∃ U R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                    Spec.toLocallyRingedSpace.obj\n                      (op\n                        (Exists.choose\n                          (_ :\n                            ∃ R,\n                              Nonempty\n                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            (Exists.choose\n                                                (_ :\n                                                  ∃ U R,\n                                                    Nonempty\n                                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                  Spec.toLocallyRingedSpace.obj (op R)))))))).inv.val.base\n[PROOFSTEP]\nexact (X.local_affine x).choose.2\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(Nonempty.some\n              (_ :\n                Nonempty\n                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Exists.choose\n                                  (_ :\n                                    ∃ U R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                    Spec.toLocallyRingedSpace.obj\n                      (op\n                        (Exists.choose\n                          (_ :\n                            ∃ R,\n                              Nonempty\n                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            (Exists.choose\n                                                (_ :\n                                                  ∃ U R,\n                                                    Nonempty\n                                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                  Spec.toLocallyRingedSpace.obj (op R)))))))).inv.val.base\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ Epi\n    (Nonempty.some\n            (_ :\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj\n                    (op\n                      (Exists.choose\n                        (_ :\n                          ∃ R,\n                            Nonempty\n                              (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          (Exists.choose\n                                              (_ :\n                                                ∃ U R,\n                                                  Nonempty\n                                                    (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                        (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                      Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                Spec.toLocallyRingedSpace.obj (op R)))))))).inv.val.base\n[PROOFSTEP]\nchange Epi ((SheafedSpace.forget _).map (LocallyRingedSpace.forgetToSheafedSpace.map _))\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ Epi\n    ((SheafedSpace.forget CommRingCat).map\n      (LocallyRingedSpace.forgetToSheafedSpace.map\n        (Nonempty.some\n            (_ :\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj\n                    (op\n                      (Exists.choose\n                        (_ :\n                          ∃ R,\n                            Nonempty\n                              (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          (Exists.choose\n                                              (_ :\n                                                ∃ U R,\n                                                  Nonempty\n                                                    (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                        (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                      Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                Spec.toLocallyRingedSpace.obj (op R)))))))).inv))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ IsOpenImmersion\n    ((fun x =>\n        (Nonempty.some\n              (_ :\n                Nonempty\n                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              (Exists.choose\n                                  (_ :\n                                    ∃ U R,\n                                      Nonempty\n                                        (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                            (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                          Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                    Spec.toLocallyRingedSpace.obj\n                      (op\n                        (Exists.choose\n                          (_ :\n                            ∃ R,\n                              Nonempty\n                                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                    (_ :\n                                      OpenEmbedding\n                                        ↑(Opens.inclusion\n                                            (Exists.choose\n                                                (_ :\n                                                  ∃ U R,\n                                                    Nonempty\n                                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                  Spec.toLocallyRingedSpace.obj (op R)))))))).inv ≫\n          LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n            (_ :\n              OpenEmbedding\n                ↑(Opens.inclusion\n                    (Exists.choose\n                        (_ :\n                          ∃ U R,\n                            Nonempty\n                              (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                  (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                Spec.toLocallyRingedSpace.obj (op R)))).obj)))\n      x)\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) PresheafedSpace.IsOpenImmersion.comp\n[GOAL]\ncase hg\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\n⊢ PresheafedSpace.IsOpenImmersion\n    (LocallyRingedSpace.ofRestrict X.toLocallyRingedSpace\n        (_ :\n          OpenEmbedding\n            ↑(Opens.inclusion\n                (Exists.choose\n                    (_ :\n                      ∃ U R,\n                        Nonempty\n                          (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                              (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                            Spec.toLocallyRingedSpace.obj (op R)))).obj))).val\n[PROOFSTEP]\napply PresheafedSpace.IsOpenImmersion.ofRestrict\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      ↑((fun x => map (f x.fst) x.snd ≫ map 𝒰 x.fst)\n              ((fun x =>\n                  { fst := AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x,\n                    snd :=\n                      AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                        (Exists.choose\n                          (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)) })\n                x)).val.base\n[PROOFSTEP]\nlet y := (𝒰.Covers x).choose\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\n⊢ x ∈\n    Set.range\n      ↑((fun x => map (f x.fst) x.snd ≫ map 𝒰 x.fst)\n              ((fun x =>\n                  { fst := AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x,\n                    snd :=\n                      AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                        (Exists.choose\n                          (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)) })\n                x)).val.base\n[PROOFSTEP]\nhave hy : (𝒰.map (𝒰.f x)).val.base y = x := (𝒰.Covers x).choose_spec\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\nhy : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base y = x\n⊢ x ∈\n    Set.range\n      ↑((fun x => map (f x.fst) x.snd ≫ map 𝒰 x.fst)\n              ((fun x =>\n                  { fst := AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x,\n                    snd :=\n                      AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                        (Exists.choose\n                          (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)) })\n                x)).val.base\n[PROOFSTEP]\nrcases(f (𝒰.f x)).Covers y with ⟨z, hz⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\nhy : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base y = x\nz :\n  (forget TopCat).obj\n    ↑(obj (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n          (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).toPresheafedSpace\nhz :\n  ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n              (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).val.base\n      z =\n    y\n⊢ x ∈\n    Set.range\n      ↑((fun x => map (f x.fst) x.snd ≫ map 𝒰 x.fst)\n              ((fun x =>\n                  { fst := AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x,\n                    snd :=\n                      AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                        (Exists.choose\n                          (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)) })\n                x)).val.base\n[PROOFSTEP]\nchange x ∈ Set.range ((f (𝒰.f x)).map ((f (𝒰.f x)).f y) ≫ 𝒰.map (𝒰.f x)).1.base\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\nhy : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base y = x\nz :\n  (forget TopCat).obj\n    ↑(obj (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n          (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).toPresheafedSpace\nhz :\n  ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n              (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).val.base\n      z =\n    y\n⊢ x ∈\n    Set.range\n      ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y) ≫\n              map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base\n[PROOFSTEP]\nuse z\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\nhy : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base y = x\nz :\n  (forget TopCat).obj\n    ↑(obj (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n          (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).toPresheafedSpace\nhz :\n  ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n              (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).val.base\n      z =\n    y\n⊢ ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y) ≫\n              map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base\n      z =\n    x\n[PROOFSTEP]\nerw [comp_apply]\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (map 𝒰 x ≫ f✝) g\nf : (x : 𝒰.J) → OpenCover (obj 𝒰 x)\nx : ↑↑X.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).toPresheafedSpace :=\n  Exists.choose (_ : x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base)\nhy : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base y = x\nz :\n  (forget TopCat).obj\n    ↑(obj (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n          (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).toPresheafedSpace\nhz :\n  ↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n              (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).val.base\n      z =\n    y\n⊢ ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base\n      (↑(map (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x))\n                (AlgebraicGeometry.Scheme.OpenCover.f (f (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) y)).val.base\n        z) =\n    x\n[PROOFSTEP]\nrw [hz, hy]\n  -- Porting note : weirdly, even though no input is needed, `inferInstance` does not work\n    -- `PresheafedSpace.IsOpenImmersion.comp` is marked as `instance`\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ x ∈ Set.range ↑((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\nrw [Set.range_iff_surjective.mpr]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ x ∈ Set.univ\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ Function.Surjective ↑((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\nall_goals try trivial\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ x ∈ Set.univ\n[PROOFSTEP]\ntry trivial\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ x ∈ Set.univ\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ Function.Surjective ↑((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\ntry trivial\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ Function.Surjective ↑((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\ntrivial\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ Function.Surjective ↑((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰 : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nx : ↑↑Y.toPresheafedSpace\n⊢ Epi ((fun x => f) ((fun x => PUnit.unit) x)).val.base\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ Set.range ↑(map ((fun x => ↑e₁.symm (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) x)).val.base\n[PROOFSTEP]\nrw [e₂, Scheme.comp_val_base, coe_comp, Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ,\n  e₁.rightInverse_symm]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ Set.range ↑(AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base\n[PROOFSTEP]\nexact 𝒰.Covers x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\nx : ↑↑X.toPresheafedSpace\n⊢ Function.Surjective ↑(e₂✝ ((fun x => ↑e₁.symm (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) x)).hom.val.base\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\nx : ↑↑X.toPresheafedSpace\n⊢ Epi (e₂✝ ((fun x => ↑e₁.symm (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)) x)).hom.val.base\n[PROOFSTEP]\ninfer_instance\n  -- Porting note : weirdly, even though no input is needed, `inferInstance` does not work\n      -- `PresheafedSpace.IsOpenImmersion.comp` is marked as `instance`\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\ni : J\n⊢ IsOpenImmersion (map i)\n[PROOFSTEP]\nrw [e₂]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (AlgebraicGeometry.Scheme.OpenCover.map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nJ : Type u_1\nobj : J → Scheme\nmap : (i : J) → obj i ⟶ X\ne₁ : J ≃ 𝒰.J\ne₂✝ : (i : J) → obj i ≅ AlgebraicGeometry.Scheme.OpenCover.obj 𝒰 (↑e₁ i)\ne₂ : ∀ (i : J), map i = (e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i)\ni : J\n⊢ IsOpenImmersion ((e₂✝ i).hom ≫ AlgebraicGeometry.Scheme.OpenCover.map 𝒰 (↑e₁ i))\n[PROOFSTEP]\nexact PresheafedSpace.IsOpenImmersion.comp _ _\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰✝ : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f✝) g\nX : Scheme\n𝒰 : OpenCover X\nY : Scheme\nf : Y ⟶ X\ninst✝ : IsOpenImmersion f\n⊢ ∀ (x : Option 𝒰.J), IsOpenImmersion ((fun i => Option.rec f 𝒰.map i) x)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase none\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰✝ : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f✝) g\nX : Scheme\n𝒰 : OpenCover X\nY : Scheme\nf : Y ⟶ X\ninst✝ : IsOpenImmersion f\n⊢ IsOpenImmersion ((fun i => Option.rec f 𝒰.map i) none)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰✝ : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f✝) g\nX : Scheme\n𝒰 : OpenCover X\nY : Scheme\nf : Y ⟶ X\ninst✝ : IsOpenImmersion f\nval✝ : 𝒰.J\n⊢ IsOpenImmersion ((fun i => Option.rec f 𝒰.map i) (some val✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰✝ : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f✝) g\nX : Scheme\n𝒰 : OpenCover X\nY : Scheme\nf : Y ⟶ X\ninst✝ : IsOpenImmersion f\n⊢ IsOpenImmersion f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase some\nC : Type u\ninst✝² : Category.{v, u} C\nX✝ Y✝ Z : Scheme\n𝒰✝ : OpenCover X✝\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\ninst✝¹ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f✝) g\nX : Scheme\n𝒰 : OpenCover X\nY : Scheme\nf : Y ⟶ X\ninst✝ : IsOpenImmersion f\nval✝ : 𝒰.J\n⊢ IsOpenImmersion (map 𝒰 val✝)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nR : CommRingCat\nf : ↑R\n⊢ IsOpenImmersion (Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op)\n[PROOFSTEP]\napply SheafedSpace.IsOpenImmersion.of_stalk_iso (H := ?_)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nR : CommRingCat\nf : ↑R\n⊢ OpenEmbedding ↑(Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op).val.base\n[PROOFSTEP]\nexact (PrimeSpectrum.localization_away_openEmbedding (Localization.Away f) f : _)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nR : CommRingCat\nf : ↑R\nhf : OpenEmbedding ↑(Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op).val.base\n⊢ ∀ (x : ↑↑(Spec.obj (op (CommRingCat.of (Localization.Away f)))).toPresheafedSpace),\n    IsIso (PresheafedSpace.stalkMap (Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op).val x)\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf✝ : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f✝) g\nR : CommRingCat\nf : ↑R\nhf : OpenEmbedding ↑(Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op).val.base\nx : ↑↑(Spec.obj (op (CommRingCat.of (Localization.Away f)))).toPresheafedSpace\n⊢ IsIso (PresheafedSpace.stalkMap (Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away f))).op).val x)\n[PROOFSTEP]\nexact Spec_map_localization_isIso R (Submonoid.powers f) x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nR : CommRingCat\nr : ↑↑(Spec.obj (op R)).toPresheafedSpace\n⊢ r ∈ Set.range ↑((fun r => Spec.map (algebraMap (↑R) (Localization.Away r)).op) ((fun x => 1) r)).val.base\n[PROOFSTEP]\nrw [Set.range_iff_surjective.mpr ((TopCat.epi_iff_surjective _).mp _)]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nR : CommRingCat\nr : ↑↑(Spec.obj (op R)).toPresheafedSpace\n⊢ r ∈ Set.univ\n[PROOFSTEP]\nexact trivial\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nR : CommRingCat\nr : ↑↑(Spec.obj (op R)).toPresheafedSpace\n⊢ Epi ((fun r => Spec.map (algebraMap (↑R) (Localization.Away r)).op) ((fun x => 1) r)).val.base\n[PROOFSTEP]\nchange Epi (Spec.map (CommRingCat.ofHom (algebraMap _ _)).op).1.base\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nR : CommRingCat\nr : ↑↑(Spec.obj (op R)).toPresheafedSpace\n⊢ Epi (Spec.map (CommRingCat.ofHom (algebraMap (↑R) (Localization.Away ((fun x => 1) r)))).op).val.base\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\nr :\n  ↑(Exists.choose\n      (_ :\n        ∃ R,\n          Nonempty\n            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Exists.choose\n                            (_ :\n                              ∃ U R,\n                                Nonempty\n                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                    Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n              Spec.toLocallyRingedSpace.obj (op R))))\n⊢ Set.range ↑(OpenCover.map (affineBasisCover X) { fst := x, snd := r }).val.base =\n    ↑(OpenCover.map (affineCover X) x).val.base '' (PrimeSpectrum.basicOpen r).carrier\n[PROOFSTEP]\nerw [coe_comp, Set.range_comp]\n  -- Porting note : `congr` fails to see the goal is comparing image of the same function\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\nr :\n  ↑(Exists.choose\n      (_ :\n        ∃ R,\n          Nonempty\n            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Exists.choose\n                            (_ :\n                              ∃ U R,\n                                Nonempty\n                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                    Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n              Spec.toLocallyRingedSpace.obj (op R))))\n⊢ ↑(OpenCover.map (affineCover X) { fst := x, snd := r }.fst).val.base ''\n      Set.range\n        ↑(OpenCover.map\n                ((fun x =>\n                    affineBasisCoverOfAffine\n                      (Exists.choose\n                        (_ :\n                          ∃ R,\n                            Nonempty\n                              (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                  (_ :\n                                    OpenEmbedding\n                                      ↑(Opens.inclusion\n                                          (Exists.choose\n                                              (_ :\n                                                ∃ U R,\n                                                  Nonempty\n                                                    (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                        (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                      Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                                Spec.toLocallyRingedSpace.obj (op R)))))\n                  { fst := x, snd := r }.fst)\n                { fst := x, snd := r }.snd).val.base =\n    ↑(OpenCover.map (affineCover X) x).val.base '' (PrimeSpectrum.basicOpen r).carrier\n[PROOFSTEP]\nrefine congr_arg (_ '' ·) ?_\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\nx : ↑↑X.toPresheafedSpace\nr :\n  ↑(Exists.choose\n      (_ :\n        ∃ R,\n          Nonempty\n            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                (_ :\n                  OpenEmbedding\n                    ↑(Opens.inclusion\n                        (Exists.choose\n                            (_ :\n                              ∃ U R,\n                                Nonempty\n                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                    Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n              Spec.toLocallyRingedSpace.obj (op R))))\n⊢ Set.range\n      ↑(OpenCover.map\n              ((fun x =>\n                  affineBasisCoverOfAffine\n                    (Exists.choose\n                      (_ :\n                        ∃ R,\n                          Nonempty\n                            (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                (_ :\n                                  OpenEmbedding\n                                    ↑(Opens.inclusion\n                                        (Exists.choose\n                                            (_ :\n                                              ∃ U R,\n                                                Nonempty\n                                                  (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                                      (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                                    Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                              Spec.toLocallyRingedSpace.obj (op R)))))\n                { fst := x, snd := r }.fst)\n              { fst := x, snd := r }.snd).val.base =\n    (PrimeSpectrum.basicOpen r).carrier\n[PROOFSTEP]\nexact (PrimeSpectrum.localization_away_comap_range (Localization.Away r) r : _)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\n⊢ IsTopologicalBasis {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base}\n[PROOFSTEP]\napply TopologicalSpace.isTopologicalBasis_of_open_of_nhds\n[GOAL]\ncase h_open\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\n⊢ ∀ (u : Set ↑↑X.toPresheafedSpace),\n    u ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} → IsOpen u\n[PROOFSTEP]\nrintro _ ⟨a, rfl⟩\n[GOAL]\ncase h_open.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : (affineBasisCover X).J\n⊢ IsOpen (Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base)\n[PROOFSTEP]\nexact IsOpenImmersion.open_range (X.affineBasisCover.map a)\n[GOAL]\ncase h_nhds\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\n⊢ ∀ (a : ↑↑X.toPresheafedSpace) (u : Set ↑↑X.toPresheafedSpace),\n    a ∈ u →\n      IsOpen u → ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nrintro a U haU hU\n[GOAL]\ncase h_nhds\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\n⊢ ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ U\n[PROOFSTEP]\nrcases X.affineCover.Covers a with ⟨x, e⟩\n[GOAL]\ncase h_nhds.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\n⊢ ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ U\n[PROOFSTEP]\nlet U' := (X.affineCover.map (X.affineCover.f a)).1.base ⁻¹' U\n[GOAL]\ncase h_nhds.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\n⊢ ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ U\n[PROOFSTEP]\nhave hxU' : x ∈ U' := by rw [← e] at haU ; exact haU\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\n⊢ x ∈ U'\n[PROOFSTEP]\nrw [← e] at haU \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\nhaU : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x ∈ U\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\n⊢ x ∈ U'\n[PROOFSTEP]\nexact haU\n[GOAL]\ncase h_nhds.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\n⊢ ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ U\n[PROOFSTEP]\nrcases PrimeSpectrum.isBasis_basic_opens.exists_subset_of_mem_open hxU'\n    ((X.affineCover.map (X.affineCover.f a)).1.base.continuous_toFun.isOpen_preimage _ hU) with\n  ⟨_, ⟨_, ⟨s, rfl⟩, rfl⟩, hxV, hVU⟩\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ ∃ v, v ∈ {x | ∃ a, x = Set.range ↑(OpenCover.map (affineBasisCover X) a).val.base} ∧ a ∈ v ∧ v ⊆ U\n[PROOFSTEP]\nrefine' ⟨_, ⟨⟨_, s⟩, rfl⟩, _, _⟩\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ a ∈ Set.range ↑(OpenCover.map (affineBasisCover X) { fst := OpenCover.f (affineCover X) a, snd := s }).val.base\n[PROOFSTEP]\nerw [affineBasisCover_map_range]\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ Set.range ↑(OpenCover.map (affineBasisCover X) { fst := OpenCover.f (affineCover X) a, snd := s }).val.base ⊆ U\n[PROOFSTEP]\nerw [affineBasisCover_map_range]\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ a ∈ ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base '' (PrimeSpectrum.basicOpen s).carrier\n[PROOFSTEP]\nexact ⟨x, hxV, e⟩\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base '' (PrimeSpectrum.basicOpen s).carrier ⊆ U\n[PROOFSTEP]\nrw [Set.image_subset_iff]\n[GOAL]\ncase h_nhds.intro.intro.intro.intro.intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰 : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nX : Scheme\na : ↑↑X.toPresheafedSpace\nU : Set ↑↑X.toPresheafedSpace\nhaU : a ∈ U\nhU : IsOpen U\nx : (forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace\ne : ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base x = a\nU' : Set ((forget TopCat).obj ↑(OpenCover.obj (affineCover X) (OpenCover.f (affineCover X) a)).toPresheafedSpace) :=\n  ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\nhxU' : x ∈ U'\ns :\n  ↑(op\n        (Exists.choose\n          (_ :\n            ∃ R,\n              Nonempty\n                (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            (Exists.choose\n                                (_ :\n                                  ∃ U R,\n                                    Nonempty\n                                      (LocallyRingedSpace.restrict X.toLocallyRingedSpace\n                                          (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n                                        Spec.toLocallyRingedSpace.obj (op R)))).obj)) ≅\n                  Spec.toLocallyRingedSpace.obj (op R))))).unop\nhxV : x ∈ ↑(PrimeSpectrum.basicOpen s)\nhVU : ↑(PrimeSpectrum.basicOpen s) ⊆ U'\n⊢ (PrimeSpectrum.basicOpen s).carrier ⊆ ↑(OpenCover.map (affineCover X) (OpenCover.f (affineCover X) a)).val.base ⁻¹' U\n[PROOFSTEP]\nexact hVU\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ OpenCover X\n[PROOFSTEP]\nhave :=\n  @CompactSpace.elim_nhds_subcover _ _ H (fun x : X => Set.range (𝒰.map (𝒰.f x)).1.base) fun x =>\n    (IsOpenImmersion.open_range (𝒰.map (𝒰.f x))).mem_nhds (𝒰.Covers x)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\n⊢ OpenCover X\n[PROOFSTEP]\nlet t := this.choose\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\n⊢ OpenCover X\n[PROOFSTEP]\nhave h : ∀ x : X, ∃ y : t, x ∈ Set.range (𝒰.map (𝒰.f y)).1.base :=\n  by\n  intro x\n  have h' : x ∈ (⊤ : Set X) := trivial\n  rw [← Classical.choose_spec this, Set.mem_iUnion] at h' \n  rcases h' with ⟨y, _, ⟨hy, rfl⟩, hy'⟩\n  exact ⟨⟨y, hy⟩, hy'⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\n⊢ ∀ (x : ↑↑X.toPresheafedSpace), ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\nx : ↑↑X.toPresheafedSpace\n⊢ ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n[PROOFSTEP]\nhave h' : x ∈ (⊤ : Set X) := trivial\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\nx : ↑↑X.toPresheafedSpace\nh' : x ∈ ⊤\n⊢ ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n[PROOFSTEP]\nrw [← Classical.choose_spec this, Set.mem_iUnion] at h' \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\nx : ↑↑X.toPresheafedSpace\nh' :\n  ∃ i,\n    x ∈\n      ⋃ (_ : i ∈ Classical.choose this),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) i\n⊢ ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n[PROOFSTEP]\nrcases h' with ⟨y, _, ⟨hy, rfl⟩, hy'⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\nx y : ↑↑X.toPresheafedSpace\nhy : y ∈ Classical.choose this\nhy' : x ∈ (fun h => (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) y) hy\n⊢ ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n[PROOFSTEP]\nexact ⟨⟨y, hy⟩, hy'⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ Y Z : Scheme\n𝒰✝ : OpenCover X✝\nf : X✝ ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰✝.J), HasPullback (map 𝒰✝ x ≫ f) g\nX : Scheme\n𝒰 : OpenCover X\nH : CompactSpace ↑↑X.toPresheafedSpace\nthis :\n  ∃ t,\n    ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t),\n        (fun x => Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 x)).val.base) x =\n      ⊤\nt : Finset ↑↑X.toPresheafedSpace := Exists.choose this\nh : ∀ (x : ↑↑X.toPresheafedSpace), ∃ y, x ∈ Set.range ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 ↑y)).val.base\n⊢ OpenCover X\n[PROOFSTEP]\nexact\n  { J := t\n    obj := fun x => 𝒰.obj (𝒰.f x.1)\n    map := fun x => 𝒰.map (𝒰.f x.1)\n    f := fun x => (h x).choose\n    Covers := fun x => (h x).choose_spec }\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ Fintype (OpenCover.finiteSubcover 𝒰).J\n[PROOFSTEP]\ndelta OpenCover.finiteSubcover\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\n𝒰 : OpenCover X\nf : X ⟶ Z\ng : Y ⟶ Z\ninst✝ : ∀ (x : 𝒰.J), HasPullback (OpenCover.map 𝒰 x ≫ f) g\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ Fintype\n    (let_fun this :=\n        (_ :\n          ∃ t, ⋃ (x : ↑↑X.toPresheafedSpace) (_ : x ∈ t), Set.range ↑(OpenCover.map 𝒰 (OpenCover.f 𝒰 x)).val.base = ⊤);\n      let t := Exists.choose this;\n      let_fun h :=\n        (_ : ∀ (x : ↑↑X.toPresheafedSpace), ∃ y, x ∈ Set.range ↑(OpenCover.map 𝒰 (OpenCover.f 𝒰 ↑y)).val.base);\n      OpenCover.mk { x // x ∈ t } (fun x => OpenCover.obj 𝒰 (OpenCover.f 𝒰 ↑x))\n        (fun x => OpenCover.map 𝒰 (OpenCover.f 𝒰 ↑x))\n        (fun x => Exists.choose (_ : ∃ y, x ∈ Set.range ↑(OpenCover.map 𝒰 (OpenCover.f 𝒰 ↑y)).val.base))\n        (_ :\n          ∀ (x : ↑↑X.toPresheafedSpace),\n            x ∈\n              Set.range\n                ↑(OpenCover.map 𝒰\n                        (OpenCover.f 𝒰\n                          ↑(Exists.choose\n                              (_ : ∃ y, x ∈ Set.range ↑(OpenCover.map 𝒰 (OpenCover.f 𝒰 ↑y)).val.base)))).val.base)).J\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\n⊢ Scheme\n[PROOFSTEP]\napply LocallyRingedSpace.IsOpenImmersion.scheme (toLocallyRingedSpace _ f)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\n⊢ ∀ (x : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))),\n    ∃ R f_1, x ∈ Set.range ↑f_1.val.base ∧ LocallyRingedSpace.IsOpenImmersion f_1\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\n⊢ ∃ R f_1, x ∈ Set.range ↑f_1.val.base ∧ LocallyRingedSpace.IsOpenImmersion f_1\n[PROOFSTEP]\nobtain ⟨_, ⟨i, rfl⟩, hx, hi⟩ :=\n  Y.affineBasisCover_is_basis.exists_subset_of_mem_open (Set.mem_range_self x) H.base_open.open_range\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ ∃ R f_1, x ∈ Set.range ↑f_1.val.base ∧ LocallyRingedSpace.IsOpenImmersion f_1\n[PROOFSTEP]\nuse Y.affineBasisCoverRing i\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ ∃ f_1, x ∈ Set.range ↑f_1.val.base ∧ LocallyRingedSpace.IsOpenImmersion f_1\n[PROOFSTEP]\nuse LocallyRingedSpace.IsOpenImmersion.lift (toLocallyRingedSpaceHom _ f) _ hi\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ x ∈\n      Set.range\n        ↑(LocallyRingedSpace.IsOpenImmersion.lift (toLocallyRingedSpaceHom Y.toLocallyRingedSpace f)\n                (Scheme.OpenCover.map (Scheme.affineBasisCover Y) i) hi).val.base ∧\n    LocallyRingedSpace.IsOpenImmersion\n      (LocallyRingedSpace.IsOpenImmersion.lift (toLocallyRingedSpaceHom Y.toLocallyRingedSpace f)\n        (Scheme.OpenCover.map (Scheme.affineBasisCover Y) i) hi)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ x ∈\n    Set.range\n      ↑(LocallyRingedSpace.IsOpenImmersion.lift (toLocallyRingedSpaceHom Y.toLocallyRingedSpace f)\n              (Scheme.OpenCover.map (Scheme.affineBasisCover Y) i) hi).val.base\n[PROOFSTEP]\nrw [LocallyRingedSpace.IsOpenImmersion.lift_range]\n[GOAL]\ncase h.left\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ x ∈\n    ↑(toLocallyRingedSpaceHom Y.toLocallyRingedSpace f).val.base ⁻¹'\n      Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\n[PROOFSTEP]\nexact hx\n[GOAL]\ncase h.right\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ LocallyRingedSpace.IsOpenImmersion\n    (LocallyRingedSpace.IsOpenImmersion.lift (toLocallyRingedSpaceHom Y.toLocallyRingedSpace f)\n      (Scheme.OpenCover.map (Scheme.affineBasisCover Y) i) hi)\n[PROOFSTEP]\ndelta LocallyRingedSpace.IsOpenImmersion.lift\n[GOAL]\ncase h.right\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH : IsOpenImmersion f\nx : ↑(LocallyRingedSpace.toTopCat (toLocallyRingedSpace Y.toLocallyRingedSpace f))\ni : (Scheme.affineBasisCover Y).J\nhx : ↑f.base x ∈ Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base\nhi : Set.range ↑(Scheme.OpenCover.map (Scheme.affineBasisCover Y) i).val.base ⊆ Set.range ↑f.base\n⊢ LocallyRingedSpace.IsOpenImmersion\n    (let_fun this := (_ : IsIso pullback.snd);\n    inv pullback.snd ≫ pullback.fst)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ : PresheafedSpace CommRingCat\nY✝ : Scheme\nf : X✝ ⟶ Y✝.toPresheafedSpace\nH✝ : IsOpenImmersion f\nX Y : Scheme\nH : X.toLocallyRingedSpace = Y.toLocallyRingedSpace\n⊢ X = Y\n[PROOFSTEP]\ncases X\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY✝ : Scheme\nf : X ⟶ Y✝.toPresheafedSpace\nH✝ : IsOpenImmersion f\nY : Scheme\ntoLocallyRingedSpace✝ : LocallyRingedSpace\nlocal_affine✝ :\n  ∀ (x : ↑(LocallyRingedSpace.toTopCat toLocallyRingedSpace✝)),\n    ∃ U R,\n      Nonempty\n        (LocallyRingedSpace.restrict toLocallyRingedSpace✝ (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n          Spec.toLocallyRingedSpace.obj (op R))\nH :\n  { toLocallyRingedSpace := toLocallyRingedSpace✝, local_affine := local_affine✝ }.toLocallyRingedSpace =\n    Y.toLocallyRingedSpace\n⊢ { toLocallyRingedSpace := toLocallyRingedSpace✝, local_affine := local_affine✝ } = Y\n[PROOFSTEP]\ncases Y\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : PresheafedSpace CommRingCat\nY : Scheme\nf : X ⟶ Y.toPresheafedSpace\nH✝ : IsOpenImmersion f\ntoLocallyRingedSpace✝¹ : LocallyRingedSpace\nlocal_affine✝¹ :\n  ∀ (x : ↑(LocallyRingedSpace.toTopCat toLocallyRingedSpace✝¹)),\n    ∃ U R,\n      Nonempty\n        (LocallyRingedSpace.restrict toLocallyRingedSpace✝¹ (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n          Spec.toLocallyRingedSpace.obj (op R))\ntoLocallyRingedSpace✝ : LocallyRingedSpace\nlocal_affine✝ :\n  ∀ (x : ↑(LocallyRingedSpace.toTopCat toLocallyRingedSpace✝)),\n    ∃ U R,\n      Nonempty\n        (LocallyRingedSpace.restrict toLocallyRingedSpace✝ (_ : OpenEmbedding ↑(Opens.inclusion U.obj)) ≅\n          Spec.toLocallyRingedSpace.obj (op R))\nH :\n  { toLocallyRingedSpace := toLocallyRingedSpace✝¹, local_affine := local_affine✝¹ }.toLocallyRingedSpace =\n    { toLocallyRingedSpace := toLocallyRingedSpace✝, local_affine := local_affine✝ }.toLocallyRingedSpace\n⊢ { toLocallyRingedSpace := toLocallyRingedSpace✝¹, local_affine := local_affine✝¹ } =\n    { toLocallyRingedSpace := toLocallyRingedSpace✝, local_affine := local_affine✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : PresheafedSpace CommRingCat\nY✝ : Scheme\nf✝ : X✝ ⟶ Y✝.toPresheafedSpace\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : AlgebraicGeometry.IsOpenImmersion f\n⊢ toScheme Y f.val = X\n[PROOFSTEP]\napply scheme_eq_of_locallyRingedSpace_eq\n[GOAL]\ncase H\nC : Type u\ninst✝¹ : Category.{v, u} C\nX✝ : PresheafedSpace CommRingCat\nY✝ : Scheme\nf✝ : X✝ ⟶ Y✝.toPresheafedSpace\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : AlgebraicGeometry.IsOpenImmersion f\n⊢ (toScheme Y f.val).toLocallyRingedSpace = X.toLocallyRingedSpace\n[PROOFSTEP]\nexact locallyRingedSpace_toLocallyRingedSpace f\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nU : TopCat\nX : Scheme\nf : U ⟶ TopCat.of ↑↑X.toPresheafedSpace\nh : OpenEmbedding ↑f\n⊢ PresheafedSpace.IsOpenImmersion (PresheafedSpace.ofRestrict X.toPresheafedSpace h)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsIso g\n⊢ IsIso ((inducedFunctor Scheme.toLocallyRingedSpace).map g)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ IsIso f ↔ IsIso f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nrw [isIso_iff_isOpenImmersion, IsOpenImmersion.iff_stalk_iso, and_comm, ← and_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ ((Epi f.val.base ∧ OpenEmbedding ↑f.val.base) ∧\n      ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)) ↔\n    IsIso f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nrefine' and_congr ⟨_, _⟩ Iff.rfl\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ Epi f.val.base ∧ OpenEmbedding ↑f.val.base → IsIso f.val.base\n[PROOFSTEP]\nrintro ⟨h₁, h₂⟩\n[GOAL]\ncase refine'_1.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\nh₁ : Epi f.val.base\nh₂ : OpenEmbedding ↑f.val.base\n⊢ IsIso f.val.base\n[PROOFSTEP]\nconvert_to\n  IsIso\n    (TopCat.isoOfHomeo\n        (Homeomorph.homeomorphOfContinuousOpen (Equiv.ofBijective _ ⟨h₂.inj, (TopCat.epi_iff_surjective _).mp h₁⟩)\n          h₂.continuous h₂.isOpenMap)).hom\n[GOAL]\ncase refine'_1.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\nh₁ : Epi f.val.base\nh₂ : OpenEmbedding ↑f.val.base\n⊢ IsIso\n    (TopCat.isoOfHomeo\n        (Homeomorph.homeomorphOfContinuousOpen\n          (Equiv.ofBijective ↑f.val.base (_ : Function.Injective ↑f.val.base ∧ Function.Surjective ↑f.val.base))\n          (_ : Continuous ↑f.val.base) (_ : IsOpenMap ↑f.val.base))).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ IsIso f.val.base → Epi f.val.base ∧ OpenEmbedding ↑f.val.base\n[PROOFSTEP]\nintro H\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng : Y✝ ⟶ Z\nH✝ : IsOpenImmersion f✝\nX Y : Scheme\nf : X ⟶ Y\nH : IsIso f.val.base\n⊢ Epi f.val.base ∧ OpenEmbedding ↑f.val.base\n[PROOFSTEP]\nexact ⟨inferInstance, (TopCat.homeoOfIso (asIso f.1.base)).openEmbedding⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Mono f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan f g ⋙ forget)\n[PROOFSTEP]\napply @hasLimitOfIso _ _ _ _ _ _ ?_ (diagramIsoCospan.{u} _).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan ((cospan f g ⋙ forget).map WalkingCospan.Hom.inl) ((cospan f g ⋙ forget).map WalkingCospan.Hom.inr))\n[PROOFSTEP]\nchange HasLimit (cospan ((forget).map f) ((forget).map g))\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan (forget.map f) (forget.map g))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan g f ⋙ forget)\n[PROOFSTEP]\napply @hasLimitOfIso _ _ _ _ _ _ ?_ (diagramIsoCospan.{u} _).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr))\n[PROOFSTEP]\nchange HasLimit (cospan ((forget).map g) ((forget).map f))\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ HasLimit (cospan (forget.map g) (forget.map f))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ forget.obj (PresheafedSpace.IsOpenImmersion.toScheme Y pullback.snd.val) =\n    limit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ forget.obj (PresheafedSpace.IsOpenImmersion.toScheme Y pullback.fst.val) =\n    limit (cospan ((cospan g f ⋙ forget).map Hom.inl) ((cospan g f ⋙ forget).map Hom.inr))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ IsOpenImmersion pullback.snd\n[PROOFSTEP]\nhave := PreservesPullback.iso_hom_snd forget f g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\nthis : (PreservesPullback.iso forget f g).hom ≫ pullback.snd = forget.map pullback.snd\n⊢ IsOpenImmersion pullback.snd\n[PROOFSTEP]\ndsimp only [Scheme.forgetToLocallyRingedSpace, inducedFunctor_map] at this \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\nthis : (PreservesPullback.iso (inducedFunctor Scheme.toLocallyRingedSpace) f g).hom ≫ pullback.snd = pullback.snd\n⊢ IsOpenImmersion pullback.snd\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\nthis : (PreservesPullback.iso (inducedFunctor Scheme.toLocallyRingedSpace) f g).hom ≫ pullback.snd = pullback.snd\n⊢ IsOpenImmersion ((PreservesPullback.iso (inducedFunctor Scheme.toLocallyRingedSpace) f g).hom ≫ pullback.snd)\n[PROOFSTEP]\nchange LocallyRingedSpace.IsOpenImmersion _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\nthis : (PreservesPullback.iso (inducedFunctor Scheme.toLocallyRingedSpace) f g).hom ≫ pullback.snd = pullback.snd\n⊢ LocallyRingedSpace.IsOpenImmersion\n    ((PreservesPullback.iso (inducedFunctor Scheme.toLocallyRingedSpace) f g).hom ≫ pullback.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ IsOpenImmersion pullback.fst\n[PROOFSTEP]\nrw [← pullbackSymmetry_hom_comp_snd]\n  -- Porting note : was just `infer_instance`, it is a bit weird that no explicit class instance is\n    -- provided but still class inference fail to find this\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ IsOpenImmersion ((pullbackSymmetry g f).hom ≫ pullback.snd)\n[PROOFSTEP]\nexact LocallyRingedSpace.IsOpenImmersion.comp (H := inferInstance) _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\n⊢ IsOpenImmersion (limit.π (cospan f g) one)\n[PROOFSTEP]\nrw [← limit.w (cospan f g) WalkingCospan.Hom.inl]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\n⊢ IsOpenImmersion (limit.π (cospan f g) left ≫ (cospan f g).map Hom.inl)\n[PROOFSTEP]\nchange\n  IsOpenImmersion\n    (_ ≫ f)\n      -- Porting note : was just `infer_instance`, it is a bit weird that no explicit class instance is\n        -- provided but still class inference fail to find this\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\n⊢ IsOpenImmersion (limit.π (cospan f g) left ≫ f)\n[PROOFSTEP]\nexact LocallyRingedSpace.IsOpenImmersion.comp (H := inferInstance) _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan f g) Scheme.forgetToTop\n[PROOFSTEP]\ndelta Scheme.forgetToTop\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan f g) (forget ⋙ LocallyRingedSpace.forgetToTop)\n[PROOFSTEP]\napply @Limits.compPreservesLimit (K := cospan f g) (F := forget) (G := LocallyRingedSpace.forgetToTop) ?_ ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan f g) forget\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan f g ⋙ forget) LocallyRingedSpace.forgetToTop\n[PROOFSTEP]\napply @preservesLimitOfIsoDiagram (F := _) _ _ _ _ _ _ (diagramIsoCospan.{u} _).symm ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan ((cospan f g ⋙ forget).map Hom.inl) ((cospan f g ⋙ forget).map Hom.inr))\n    LocallyRingedSpace.forgetToTop\n[PROOFSTEP]\ndsimp [LocallyRingedSpace.forgetToTop]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ PreservesLimit (cospan f g) (LocallyRingedSpace.forgetToSheafedSpace ⋙ SheafedSpace.forget CommRingCat)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑pullback.snd.val.base =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nrw [← show _ = (pullback.snd : pullback f g ⟶ _).1.base from PreservesPullback.iso_hom_snd Scheme.forgetToTop f g]\n  -- Porting note : was `rw`\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑((PreservesPullback.iso Scheme.forgetToTop f g).hom ≫ pullback.snd) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nerw [coe_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range (↑pullback.snd ∘ ↑(PreservesPullback.iso Scheme.forgetToTop f g).hom) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nrw [Set.range_comp, Set.range_iff_surjective.mpr, ←\n  @Set.preimage_univ _ _ (pullback.fst : pullback f.1.base g.1.base ⟶ _)]\n  -- Porting note : was `rw`\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑pullback.snd '' (↑pullback.fst ⁻¹' Set.univ) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop f g).hom\n[PROOFSTEP]\nerw [TopCat.pullback_snd_image_fst_preimage]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑(Scheme.forgetToTop.map g) ⁻¹' (↑(Scheme.forgetToTop.map f) '' Set.univ) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop f g).hom\n[PROOFSTEP]\nrw [Set.image_univ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑(Scheme.forgetToTop.map g) ⁻¹' Set.range ↑(Scheme.forgetToTop.map f) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop f g).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop f g).hom\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Epi (PreservesPullback.iso Scheme.forgetToTop f g).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑pullback.fst.val.base =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nrw [← show _ = (pullback.fst : pullback g f ⟶ _).1.base from PreservesPullback.iso_hom_fst Scheme.forgetToTop g f]\n  -- Porting note : was `rw`\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑((PreservesPullback.iso Scheme.forgetToTop g f).hom ≫ pullback.fst) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nerw [coe_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range (↑pullback.fst ∘ ↑(PreservesPullback.iso Scheme.forgetToTop g f).hom) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\n[PROOFSTEP]\nrw [Set.range_comp, Set.range_iff_surjective.mpr, ←\n  @Set.preimage_univ _ _ (pullback.snd : pullback g.1.base f.1.base ⟶ _)]\n  -- Porting note : was `rw`\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑pullback.fst '' (↑pullback.snd ⁻¹' Set.univ) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop g f).hom\n[PROOFSTEP]\nerw [TopCat.pullback_fst_image_snd_preimage]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑(Scheme.forgetToTop.map g) ⁻¹' (↑(Scheme.forgetToTop.map f) '' Set.univ) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop g f).hom\n[PROOFSTEP]\nrw [Set.image_univ]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ ↑(Scheme.forgetToTop.map g) ⁻¹' Set.range ↑(Scheme.forgetToTop.map f) =\n    ((Opens.map g.val.base).obj\n        { carrier := Set.range ↑f.val.base, is_open' := (_ : IsOpen (Set.range ↑f.val.base)) }).carrier\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop g f).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Function.Surjective ↑(PreservesPullback.iso Scheme.forgetToTop g f).hom\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Epi (PreservesPullback.iso Scheme.forgetToTop g f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑(pullback.fst ≫ f).val.base = Set.range ↑f.val.base ∩ Set.range ↑g.val.base\n[PROOFSTEP]\nrw [pullback.condition, Scheme.comp_val_base, coe_comp, Set.range_comp, range_pullback_snd_of_left,\n  Opens.carrier_eq_coe, Opens.map_obj, Opens.coe_mk, Set.image_preimage_eq_inter_range, Set.inter_comm]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\n⊢ Set.range ↑(pullback.fst ≫ g).val.base = Set.range ↑g.val.base ∩ Set.range ↑f.val.base\n[PROOFSTEP]\nrw [Scheme.comp_val_base, coe_comp, Set.range_comp, range_pullback_fst_of_right, Opens.map_obj, Opens.carrier_eq_coe,\n  Opens.coe_mk, Set.image_preimage_eq_inter_range, Set.inter_comm]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\ne : Set.range ↑f.val.base = Set.range ↑g.val.base\n⊢ lift g f (_ : Set.range ↑f.val.base ≤ Set.range ↑g.val.base) ≫\n      lift f g (_ : Set.range ↑g.val.base ≤ Set.range ↑f.val.base) =\n    𝟙 X\n[PROOFSTEP]\nrw [← cancel_mono f]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\ne : Set.range ↑f.val.base = Set.range ↑g.val.base\n⊢ (lift g f (_ : Set.range ↑f.val.base ≤ Set.range ↑g.val.base) ≫\n        lift f g (_ : Set.range ↑g.val.base ≤ Set.range ↑f.val.base)) ≫\n      f =\n    𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\ne : Set.range ↑f.val.base = Set.range ↑g.val.base\n⊢ lift f g (_ : Set.range ↑g.val.base ≤ Set.range ↑f.val.base) ≫\n      lift g f (_ : Set.range ↑f.val.base ≤ Set.range ↑g.val.base) =\n    𝟙 Y\n[PROOFSTEP]\nrw [← cancel_mono g]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Z\ng : Y ⟶ Z\nH : IsOpenImmersion f\ninst✝ : IsOpenImmersion g\ne : Set.range ↑f.val.base = Set.range ↑g.val.base\n⊢ (lift f g (_ : Set.range ↑g.val.base ≤ Set.range ↑f.val.base) ≫\n        lift g f (_ : Set.range ↑f.val.base ≤ Set.range ↑g.val.base)) ≫\n      g =\n    𝟙 Y ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH✝ : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nfg : Y ⟶ X\nH : fg = f ≫ g\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ (Opens.map f.val.base).obj V = (Opens.map fg.val.base).obj ((Scheme.Hom.opensFunctor g).obj V)\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ (Opens.map f.val.base).obj V = (Opens.map (f ≫ g).val.base).obj ((Scheme.Hom.opensFunctor g).obj V)\n[PROOFSTEP]\nrw [Scheme.comp_val_base, Opens.map_comp_obj]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ (Opens.map f.val.base).obj V =\n    (Opens.map f.val.base).obj ((Opens.map g.val.base).obj ((Scheme.Hom.opensFunctor g).obj V))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ V = (Opens.map g.val.base).obj ((Scheme.Hom.opensFunctor g).obj V)\n[PROOFSTEP]\next1\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ ↑V = ↑((Opens.map g.val.base).obj ((Scheme.Hom.opensFunctor g).obj V))\n[PROOFSTEP]\nexact (Set.preimage_image_eq _ h.base_open.inj).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH✝ : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nfg : Y ⟶ X\nH : fg = f ≫ g\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ NatTrans.app f.val.c (op V) =\n    Scheme.Hom.invApp g V ≫\n      NatTrans.app fg.val.c (op ((Scheme.Hom.opensFunctor g).obj V)) ≫\n        Y.presheaf.map\n          (eqToHom\n              (_ : (Opens.map f.val.base).obj V = (Opens.map fg.val.base).obj ((Scheme.Hom.opensFunctor g).obj V))).op\n[PROOFSTEP]\nsubst H\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ NatTrans.app f.val.c (op V) =\n    Scheme.Hom.invApp g V ≫\n      NatTrans.app (f ≫ g).val.c (op ((Scheme.Hom.opensFunctor g).obj V)) ≫\n        Y.presheaf.map\n          (eqToHom\n              (_ :\n                (Opens.map f.val.base).obj V = (Opens.map (f ≫ g).val.base).obj ((Scheme.Hom.opensFunctor g).obj V))).op\n[PROOFSTEP]\nrw [Scheme.comp_val_c_app, Category.assoc, Scheme.Hom.invApp, PresheafedSpace.IsOpenImmersion.invApp_app_assoc,\n  f.val.c.naturality_assoc, TopCat.Presheaf.pushforwardObj_map, ← Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\n⊢ NatTrans.app f.val.c (op V) =\n    NatTrans.app f.val.c (op V) ≫\n      Y.presheaf.map\n        ((Opens.map f.val.base).op.map\n            (eqToHom\n              (_ :\n                op V =\n                  op ((Opens.map g.val.base).obj (op ((PresheafedSpace.IsOpenImmersion.openFunctor h).obj V)).unop))) ≫\n          (eqToHom\n              (_ :\n                (Opens.map f.val.base).obj V =\n                  (Opens.map (f ≫ g).val.base).obj ((Scheme.Hom.opensFunctor g).obj V))).op)\n[PROOFSTEP]\nconvert (Category.comp_id <| f.1.c.app (op V)).symm\n[GOAL]\ncase h.e'_3.h.e'_7.h\nC : Type u\ninst✝ : Category.{v, u} C\nX✝ Y✝ Z : Scheme\nf✝ : X✝ ⟶ Z\ng✝ : Y✝ ⟶ Z\nH : IsOpenImmersion f✝\nX Y U : Scheme\nf : Y ⟶ U\ng : U ⟶ X\nh : IsOpenImmersion g\nV : Opens ↑↑U.toPresheafedSpace\ne_5✝ : Y.presheaf.obj (op ((Opens.map f.val.base).obj V)) = (f.val.base _* Y.presheaf).obj (op V)\n⊢ Y.presheaf.map\n      ((Opens.map f.val.base).op.map\n          (eqToHom\n            (_ :\n              op V =\n                op ((Opens.map g.val.base).obj (op ((PresheafedSpace.IsOpenImmersion.openFunctor h).obj V)).unop))) ≫\n        (eqToHom\n            (_ :\n              (Opens.map f.val.base).obj V =\n                (Opens.map (f ≫ g).val.base).obj ((Scheme.Hom.opensFunctor g).obj V))).op) =\n    𝟙 ((f.val.base _* Y.presheaf).obj (op V))\n[PROOFSTEP]\nconvert Y.presheaf.map_id _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\n⊢ (Hom.opensFunctor f).obj (basicOpen X r) = basicOpen Y (↑(Hom.invApp f U) r)\n[PROOFSTEP]\nhave e := Scheme.preimage_basicOpen f (Scheme.Hom.invApp f U r)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(Hom.invApp f U) r)) =\n    basicOpen X (↑(NatTrans.app f.val.c (op ((Hom.opensFunctor f).obj U))) (↑(Hom.invApp f U) r))\n⊢ (Hom.opensFunctor f).obj (basicOpen X r) = basicOpen Y (↑(Hom.invApp f U) r)\n[PROOFSTEP]\nrw [Scheme.Hom.invApp] at e \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    basicOpen X\n      (↑(NatTrans.app f.val.c (op ((Hom.opensFunctor f).obj U))) (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r))\n⊢ (Hom.opensFunctor f).obj (basicOpen X r) = basicOpen Y (↑(Hom.invApp f U) r)\n[PROOFSTEP]\nerw [PresheafedSpace.IsOpenImmersion.invApp_app_apply] at e \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    basicOpen X\n      (↑(X.presheaf.map\n            (eqToHom\n              (_ :\n                op U =\n                  op ((Opens.map f.val.base).obj (op ((PresheafedSpace.IsOpenImmersion.openFunctor H).obj U)).unop))))\n        r)\n⊢ (Hom.opensFunctor f).obj (basicOpen X r) = basicOpen Y (↑(Hom.invApp f U) r)\n[PROOFSTEP]\nrw [Scheme.basicOpen_res, inf_eq_right.mpr _] at e \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ (Hom.opensFunctor f).obj (basicOpen X r) = basicOpen Y (↑(Hom.invApp f U) r)\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nrw [← e]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ (Hom.opensFunctor f).obj\n      ((Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r))) =\n    basicOpen Y (↑(Hom.invApp f U) r)\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\next1\n  -- Porting note : this `dsimp` was not necessary\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ ↑((Hom.opensFunctor f).obj\n        ((Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)))) =\n    ↑(basicOpen Y (↑(Hom.invApp f U) r))\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\ndsimp [Opens.map]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ ↑f.val.base '' (↑f.val.base ⁻¹' ↑(basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r))) =\n    ↑(basicOpen Y (↑(Hom.invApp f U) r))\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nrefine' Set.image_preimage_eq_inter_range.trans _\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ ↑(basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) ∩ Set.range ↑f.val.base =\n    ↑(basicOpen Y (↑(Hom.invApp f U) r))\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nerw [Set.inter_eq_left_iff_subset]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne : (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) = basicOpen X r\n⊢ ↑(basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) ⊆ Set.range ↑f.val.base\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nrefine' Set.Subset.trans (Scheme.basicOpen_le _ _) (Set.image_subset_range _ _)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ basicOpen X r ≤ (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\nrefine' le_trans (Scheme.basicOpen_le _ _) (le_of_eq _)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ U = (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nU : Opens ↑↑X.toPresheafedSpace\nr : ↑(X.presheaf.obj (op U))\ne :\n  (Opens.map f.val.base).obj (basicOpen Y (↑(PresheafedSpace.IsOpenImmersion.invApp H U) r)) =\n    (Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U) ⊓ basicOpen X r\n⊢ ↑U = ↑((Opens.map f.val.base).obj ((Hom.opensFunctor f).obj U))\n[PROOFSTEP]\nexact (Set.preimage_image_eq _ H.base_open.inj).symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base\n[PROOFSTEP]\ndsimp [ofRestrict, LocallyRingedSpace.ofRestrict, Opens.inclusion]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ContinuousMap.mk Subtype.val) ⊆ Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val, Subtype.range_val]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ ↑U ⊆ ↑V\n[PROOFSTEP]\nexact i.le\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\n⊢ { obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n          map := fun {U V} i =>\n            Over.homMk\n              (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ :\n                  Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n      (𝟙 U) =\n    𝟙\n      ({ obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n            map := fun {U V} i =>\n              Over.homMk\n                (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ :\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.obj\n        U)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\n⊢ ({ obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n            map := fun {U V} i =>\n              Over.homMk\n                (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ :\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n        (𝟙 U)).left =\n    (𝟙\n        ({ obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n              map := fun {U V} i =>\n                Over.homMk\n                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                    (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ :\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                        Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.obj\n          U)).left\n[PROOFSTEP]\ndsimp only [Over.homMk_left, Over.id_left]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\n⊢ IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ :\n        Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base) =\n    𝟙 (Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).left\n[PROOFSTEP]\nrw [← cancel_mono (X.ofRestrict U.openEmbedding), Category.id_comp, IsOpenImmersion.lift_fac]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ { obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n          map := fun {U V} i =>\n            Over.homMk\n              (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ :\n                  Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n      (i ≫ j) =\n    { obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n            map := fun {U V} i =>\n              Over.homMk\n                (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ :\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n        i ≫\n      { obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n            map := fun {U V} i =>\n              Over.homMk\n                (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ :\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n        j\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ ({ obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n            map := fun {U V} i =>\n              Over.homMk\n                (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ :\n                    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n        (i ≫ j)).left =\n    ({ obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n              map := fun {U V} i =>\n                Over.homMk\n                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                    (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ :\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                        Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n          i ≫\n        { obj := fun U => Over.mk (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))),\n              map := fun {U V} i =>\n                Over.homMk\n                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                    (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ :\n                      Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n                        Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base)) }.map\n          j).left\n[PROOFSTEP]\ndsimp only [Over.homMk_left, Over.comp_left]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n      (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ :\n        Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) =\n    IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base) ≫\n      IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base)\n[PROOFSTEP]\nrw [← cancel_mono (X.ofRestrict W.openEmbedding), Category.assoc]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) ≫\n      ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)) =\n    IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base) ≫\n      IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base ⊆\n              Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) ≫\n        ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))\n[PROOFSTEP]\niterate 3 rw [IsOpenImmersion.lift_fac]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) ≫\n      ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)) =\n    IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base) ≫\n      IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base ⊆\n              Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) ≫\n        ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))\n[PROOFSTEP]\nrw [IsOpenImmersion.lift_fac]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) =\n    IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base) ≫\n      IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W)))\n          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base ⊆\n              Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))).val.base) ≫\n        ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion W))\n[PROOFSTEP]\nrw [IsOpenImmersion.lift_fac]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V W : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nj : V ⟶ W\n⊢ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)) =\n    IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (_ :\n          Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n            Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base) ≫\n      ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))\n[PROOFSTEP]\nrw [IsOpenImmersion.lift_fac]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base\n[PROOFSTEP]\ndsimp [ofRestrict, LocallyRingedSpace.ofRestrict, Opens.inclusion]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ContinuousMap.mk Subtype.val) ⊆ Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val, Subtype.range_val]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ ↑U ⊆ ↑V\n[PROOFSTEP]\nexact i.le\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base ⊆\n    Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base\n[PROOFSTEP]\ndsimp [ofRestrict, LocallyRingedSpace.ofRestrict, Opens.inclusion]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ Set.range ↑(ContinuousMap.mk Subtype.val) ⊆ Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val, Subtype.range_val]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ ↑U ⊆ ↑V\n[PROOFSTEP]\nexact i.le\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\n⊢ ((restrictFunctor X).map i).left.val.base = (Opens.toTopCat ↑X.toPresheafedSpace).map i\n[PROOFSTEP]\next a\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\na : (forget TopCat).obj ↑((restrictFunctor X).obj U).left.toPresheafedSpace\n⊢ ↑((restrictFunctor X).map i).left.val.base a = ↑((Opens.toTopCat ↑X.toPresheafedSpace).map i) a\n[PROOFSTEP]\nrefine\n  Subtype.ext\n    ?_\n      -- Porting note : `ext` did not pick up `Subtype.ext`\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\na : (forget TopCat).obj ↑((restrictFunctor X).obj U).left.toPresheafedSpace\n⊢ ↑(↑((restrictFunctor X).map i).left.val.base a) = ↑(↑((Opens.toTopCat ↑X.toPresheafedSpace).map i) a)\n[PROOFSTEP]\nexact (congr_arg (fun f : X.restrict U.openEmbedding ⟶ X => f.1.base a) (X.restrictFunctor_map_ofRestrict i))\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W\n[PROOFSTEP]\nsimp only [← SetLike.coe_subset_coe, IsOpenMap.functor_obj_coe, Set.image_subset_iff, Scheme.restrictFunctor_map_base,\n  Opens.map_coe, Opens.inclusion_apply]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\n⊢ ↑((Opens.toTopCat ↑X.toPresheafedSpace).map i) ⁻¹' ↑W ⊆\n    (fun a => ↑(Opens.inclusion U) a) ⁻¹' ((fun a => ↑(Opens.inclusion V) a) '' ↑W)\n[PROOFSTEP]\nrintro _ h\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\na✝ : (forget TopCat).obj ((Opens.toTopCat ↑X.toPresheafedSpace).obj U)\nh : a✝ ∈ ↑((Opens.toTopCat ↑X.toPresheafedSpace).map i) ⁻¹' ↑W\n⊢ a✝ ∈ (fun a => ↑(Opens.inclusion U) a) ⁻¹' ((fun a => ↑(Opens.inclusion V) a) '' ↑W)\n[PROOFSTEP]\nexact ⟨_, h, rfl⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\n⊢ NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nhave e₁ := Scheme.congr_app (X.restrictFunctor_map_ofRestrict i) (op <| V.openEmbedding.isOpenMap.functor.obj W)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  NatTrans.app (((restrictFunctor X).map i).left ≫ ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.c\n      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n    NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      ((restrictFunctor X).obj U).left.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n              (Opens.map\n                      (((restrictFunctor X).map i).left ≫\n                            ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))\n⊢ NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nrw [Scheme.comp_val_c_app] at e₁ \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      NatTrans.app ((restrictFunctor X).map i).left.val.c\n        ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      ((restrictFunctor X).obj U).left.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n              (Opens.map\n                      (((restrictFunctor X).map i).left ≫\n                            ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))\n⊢ NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nhave e₂ := (X.restrictFunctor.map i).1.val.c.naturality (eqToHom <| W.map_functor_eq (U := V)).op\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      NatTrans.app ((restrictFunctor X).map i).left.val.c\n        ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      ((restrictFunctor X).obj U).left.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n              (Opens.map\n                      (((restrictFunctor X).map i).left ≫\n                            ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))\ne₂ :\n  ((restrictFunctor X).obj V).left.presheaf.map\n        (eqToHom\n            (_ :\n              (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                W)).op ≫\n      NatTrans.app ((restrictFunctor X).map i).left.val.c\n        (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) ≫\n      (((restrictFunctor X).map i).left.val.base _* ((restrictFunctor X).obj U).left.presheaf).map\n        (eqToHom\n            (_ :\n              (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                W)).op\n⊢ NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nrw [← IsIso.eq_inv_comp] at e₂ \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      NatTrans.app ((restrictFunctor X).map i).left.val.c\n        ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    NatTrans.app (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) ≫\n      ((restrictFunctor X).obj U).left.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n              (Opens.map\n                      (((restrictFunctor X).map i).left ≫\n                            ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))\ne₂ :\n  NatTrans.app ((restrictFunctor X).map i).left.val.c\n      (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    inv\n        (((restrictFunctor X).obj V).left.presheaf.map\n          (eqToHom\n              (_ :\n                (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                  W)).op) ≫\n      NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) ≫\n        (((restrictFunctor X).map i).left.val.base _* ((restrictFunctor X).obj U).left.presheaf).map\n          (eqToHom\n              (_ :\n                (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                  W)).op\n⊢ NatTrans.app ((restrictFunctor X).map i).left.val.c (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\ndsimp at e₁ e₂ ⊢\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  X.presheaf.map\n        (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion V))).counit\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n      NatTrans.app\n        (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n              (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n        (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    X.presheaf.map\n        (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n      X.presheaf.map\n        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n            (eqToHom\n                (_ :\n                  op\n                      ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                    op\n                      ((Opens.map\n                            (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                  (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                  (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                        ((Opens.map (Opens.inclusion V)).obj\n                          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))).unop).op\ne₂ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    inv\n        (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).map\n              (eqToHom\n                (_ :\n                  (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                    W))).op) ≫\n      NatTrans.app\n          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n          (op W) ≫\n        X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              ((Opens.map\n                    (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                          (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).map\n                (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      W)))).op\n⊢ NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nrw [e₂, W.adjunction_counit_map_functor (U := V), ← IsIso.eq_inv_comp, IsIso.inv_comp_eq, ← IsIso.eq_comp_inv] at e₁ \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₁ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).map\n              (eqToHom\n                (_ :\n                  (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                    W))).op ≫\n        inv\n            (X.presheaf.map\n              (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      (𝟭 (Opens ↑↑X.toPresheafedSpace)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))).op) ≫\n          X.presheaf.map\n              (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n            X.presheaf.map\n              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n                  (eqToHom\n                      (_ :\n                        op\n                            ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                          op\n                            ((Opens.map\n                                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                        (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                              ((Opens.map (Opens.inclusion V)).obj\n                                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))).unop).op) ≫\n      inv\n        (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              ((Opens.map\n                    (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                          (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).map\n                (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      W)))).op)\ne₂ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    inv\n        (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).map\n              (eqToHom\n                (_ :\n                  (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                    W))).op) ≫\n      NatTrans.app\n          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n          (op W) ≫\n        X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              ((Opens.map\n                    (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                          (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).map\n                (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      W)))).op\n⊢ NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nsimp_rw [eqToHom_map (Opens.map _), eqToHom_map (IsOpenMap.functor _), ← Functor.map_inv, ← Functor.map_comp] at e₁ \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₂ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    inv\n        (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).map\n              (eqToHom\n                (_ :\n                  (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                    W))).op) ≫\n      NatTrans.app\n          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n          (op W) ≫\n        X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              ((Opens.map\n                    (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                          (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).map\n                (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      W)))).op\ne₁ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    X.presheaf.map\n      (((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                    ((Opens.map (Opens.inclusion V)).obj\n                      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n          inv\n              (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      (𝟭 (Opens ↑↑X.toPresheafedSpace)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))).op ≫\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n                  (eqToHom\n                      (_ :\n                        op\n                            ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                          op\n                            ((Opens.map\n                                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                        (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                              ((Opens.map (Opens.inclusion V)).obj\n                                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))).unop).op) ≫\n        inv\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      ((Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      W))).op)\n⊢ NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\nrw [e₁]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : Opens ↑↑X.toPresheafedSpace\ni : U ⟶ V\nW : Opens { x // x ∈ V }\ne₂ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op ((Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n    inv\n        (X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).map\n              (eqToHom\n                (_ :\n                  (Opens.map (Opens.inclusion V)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                    W))).op) ≫\n      NatTrans.app\n          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n          (op W) ≫\n        X.presheaf.map\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n              ((Opens.map\n                    (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                          (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                          (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).map\n                (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      W)))).op\ne₁ :\n  NatTrans.app\n      (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n            (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.c\n      (op W) =\n    X.presheaf.map\n      (((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                    ((Opens.map (Opens.inclusion V)).obj\n                      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n          inv\n              (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      (𝟭 (Opens ↑↑X.toPresheafedSpace)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))).op ≫\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n                  (eqToHom\n                      (_ :\n                        op\n                            ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                          op\n                            ((Opens.map\n                                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                        (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                              ((Opens.map (Opens.inclusion V)).obj\n                                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))).unop).op) ≫\n        inv\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      ((Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      W))).op)\n⊢ X.presheaf.map\n      (((eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                    ((Opens.map (Opens.inclusion V)).obj\n                      ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n          inv\n              (eqToHom\n                  (_ :\n                    (Opens.map (Opens.inclusion V) ⋙ IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W) =\n                      (𝟭 (Opens ↑↑X.toPresheafedSpace)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))).op ≫\n            (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n                  ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op ≫\n              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).map\n                  (eqToHom\n                      (_ :\n                        op\n                            ((Opens.map (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n                              ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)) =\n                          op\n                            ((Opens.map\n                                  (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                        (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                        (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                              ((Opens.map (Opens.inclusion V)).obj\n                                ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))))).unop).op) ≫\n        inv\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      ((Opens.map (Opens.inclusion V)).obj\n                        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W))) =\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                    ((Opens.map\n                          (IsOpenImmersion.lift (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion V)))\n                                (ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                                (_ : Set.range Subtype.val ⊆ Set.range Subtype.val)).val.base).obj\n                      W))).op) =\n    X.presheaf.map\n      (homOfLE\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                ((Opens.map ((restrictFunctor X).map i).left.val.base).obj W) ≤\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V))).obj W)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n⊢ ∀ {X_1 Y : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ} (f : X_1 ⟶ Y),\n    ((restrictFunctor X).op ⋙ (Over.forget X).op ⋙ Γ).map f ≫\n        ((fun U =>\n              X.presheaf.mapIso\n                (Iso.op\n                  (eqToIso (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤ = U.unop)).symm))\n            Y).hom =\n      ((fun U =>\n              X.presheaf.mapIso\n                (Iso.op\n                  (eqToIso (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤ = U.unop)).symm))\n            X_1).hom ≫\n        X.presheaf.map f\n[PROOFSTEP]\nintro U V i\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\ni : U ⟶ V\n⊢ ((restrictFunctor X).op ⋙ (Over.forget X).op ⋙ Γ).map i ≫\n      ((fun U =>\n            X.presheaf.mapIso\n              (Iso.op\n                (eqToIso (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤ = U.unop)).symm))\n          V).hom =\n    ((fun U =>\n            X.presheaf.mapIso\n              (Iso.op\n                (eqToIso (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤ = U.unop)).symm))\n          U).hom ≫\n      X.presheaf.map i\n[PROOFSTEP]\ndsimp [-Scheme.restrictFunctor_map_left]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\ni : U ⟶ V\n⊢ NatTrans.app ((restrictFunctor X).map i.unop).left.val.c (op ⊤) ≫\n      X.presheaf.map (eqToHom (_ : V.unop = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V.unop))).obj ⊤)).op =\n    X.presheaf.map (eqToHom (_ : U.unop = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤)).op ≫\n      X.presheaf.map i\n[PROOFSTEP]\nrw [X.restrictFunctor_map_app, ← Functor.map_comp, ← Functor.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\nU V : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\ni : U ⟶ V\n⊢ X.presheaf.map\n      ((homOfLE\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V.unop))).obj\n                  ((Opens.map ((restrictFunctor X).map i.unop).left.val.base).obj ⊤) ≤\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤)).op ≫\n        (eqToHom (_ : V.unop = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion V.unop))).obj ⊤)).op) =\n    X.presheaf.map ((eqToHom (_ : U.unop = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U.unop))).obj ⊤)).op ≫ i)\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≅\n    restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\n[PROOFSTEP]\napply\n  IsOpenImmersion.isoOfRangeEq (f := X.ofRestrict _ ≫ f) (H :=\n    PresheafedSpace.IsOpenImmersion.comp (hf := inferInstance) (hg := inferInstance)) (Y.ofRestrict _) _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Set.range ↑(ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫ f).val.base =\n    Set.range ↑(ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base\n[PROOFSTEP]\ndsimp [Opens.inclusion]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Set.range ↑(ContinuousMap.mk Subtype.val ≫ f.val.base) = Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [coe_comp, Set.range_comp, ContinuousMap.coe_mk, ContinuousMap.coe_mk]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base '' Set.range Subtype.val = Set.range Subtype.val\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base '' Set.range Subtype.val = Set.range Subtype.val\n[PROOFSTEP]\nrw [Subtype.range_val, Subtype.range_coe]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base '' ↑((Opens.map f.val.base).obj U) = ↑U\n[PROOFSTEP]\nrefine' @Set.image_preimage_eq _ _ f.1.base U.1 _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Function.Surjective ↑f.val.base\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Epi f.val.base\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ x ∈\n    Set.range ↑((fun x => pullback.fst) ((fun x => AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)) x)).val.base\n[PROOFSTEP]\nrw [←\n  show _ = (pullback.fst : pullback f (𝒰.map (𝒰.f (f.1.base x))) ⟶ _).1.base from\n    PreservesPullback.iso_hom_fst Scheme.forgetToTop f (𝒰.map (𝒰.f (f.1.base x)))]\n  -- Porting note : `rw` to `erw` on this single lemma\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      ↑((PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom ≫\n          pullback.fst)\n[PROOFSTEP]\nerw [coe_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      (↑pullback.fst ∘\n        ↑(PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom)\n[PROOFSTEP]\nrw [Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ, TopCat.pullback_fst_range]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ x ∈\n    {x_1 |\n      ∃ y,\n        ↑(forgetToTop.map f) x_1 =\n          ↑(forgetToTop.map (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))) y}\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom\n[PROOFSTEP]\nobtain ⟨y, h⟩ := 𝒰.Covers (f.1.base x)\n[GOAL]\ncase intro\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\ny : (forget TopCat).obj ↑(obj 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x))).toPresheafedSpace\nh : ↑(map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x))).val.base y = ↑f.val.base x\n⊢ x ∈\n    {x_1 |\n      ∃ y,\n        ↑(forgetToTop.map f) x_1 =\n          ↑(forgetToTop.map (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))) y}\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom\n[PROOFSTEP]\nexact ⟨y, h.symm⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ Function.Surjective\n    ↑(PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom\n[PROOFSTEP]\nrw [← TopCat.epi_iff_surjective]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nW : Scheme\nf : W ⟶ X\nx : ↑↑W.toPresheafedSpace\n⊢ Epi (PreservesPullback.iso forgetToTop f (map 𝒰 (AlgebraicGeometry.Scheme.OpenCover.f 𝒰 (↑f.val.base x)))).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\n⊢ ⋃ (i : 𝒰.J), Set.range ↑(map 𝒰 i).val.base = Set.univ\n[PROOFSTEP]\nrw [Set.eq_univ_iff_forall]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\n⊢ ∀ (x : (forget TopCat).obj ↑X.toPresheafedSpace), x ∈ ⋃ (i : 𝒰.J), Set.range ↑(map 𝒰 i).val.base\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nx : (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ x ∈ ⋃ (i : 𝒰.J), Set.range ↑(map 𝒰 i).val.base\n[PROOFSTEP]\nrw [Set.mem_iUnion]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\nx : (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ ∃ i, x ∈ Set.range ↑(map 𝒰 i).val.base\n[PROOFSTEP]\nexact ⟨𝒰.f x, 𝒰.Covers x⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\n⊢ ↑(⨆ (i : 𝒰.J), Hom.opensRange (map 𝒰 i)) = ↑⊤\n[PROOFSTEP]\nrw [Opens.coe_iSup]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\n⊢ ⋃ (i : 𝒰.J), ↑(Hom.opensRange (map 𝒰 i)) = ↑⊤\n[PROOFSTEP]\nexact 𝒰.iUnion_range\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\n⊢ CompactSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\ncases nonempty_fintype 𝒰.J\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\nval✝ : Fintype 𝒰.J\n⊢ CompactSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nrw [← isCompact_univ_iff, ← 𝒰.iUnion_range]\n[GOAL]\ncase intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\nval✝ : Fintype 𝒰.J\n⊢ IsCompact (⋃ (i : 𝒰.J), Set.range ↑(map 𝒰 i).val.base)\n[PROOFSTEP]\napply isCompact_iUnion\n[GOAL]\ncase intro.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\nval✝ : Fintype 𝒰.J\n⊢ ∀ (i : 𝒰.J), IsCompact (Set.range ↑(map 𝒰 i).val.base)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase intro.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\nval✝ : Fintype 𝒰.J\ni : 𝒰.J\n⊢ IsCompact (Set.range ↑(map 𝒰 i).val.base)\n[PROOFSTEP]\nrw [isCompact_iff_compactSpace]\n[GOAL]\ncase intro.h\nC : Type u\ninst✝¹ : Category.{v, u} C\nX : Scheme\n𝒰 : OpenCover X\ninst✝ : Finite 𝒰.J\nH : ∀ (i : 𝒰.J), CompactSpace ↑↑(obj 𝒰 i).toPresheafedSpace\nval✝ : Fintype 𝒰.J\ni : 𝒰.J\n⊢ CompactSpace ↑(Set.range ↑(map 𝒰 i).val.base)\n[PROOFSTEP]\nexact\n  @Homeomorph.compactSpace _ _ _ _ (H i)\n    (TopCat.homeoOfIso\n      (asIso\n        (IsOpenImmersion.isoOfRangeEq (𝒰.map i)\n                (X.ofRestrict (Opens.openEmbedding ⟨_, (𝒰.IsOpen i).base_open.open_range⟩))\n                Subtype.range_coe.symm).hom.1.base))\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰₁ : OpenCover X\n𝒰₂ : OpenCover X\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ Set.range ↑((fun ij => pullback.fst ≫ map 𝒰₁ ij.fst) ((fun x => (f 𝒰₁ x, f 𝒰₂ x)) x)).val.base\n[PROOFSTEP]\nrw [IsOpenImmersion.range_pullback_to_base_of_left]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : Scheme\n𝒰₁ : OpenCover X\n𝒰₂ : OpenCover X\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range ↑(map 𝒰₁ ((fun x => (f 𝒰₁ x, f 𝒰₂ x)) x).fst).val.base ∩\n      Set.range ↑(map 𝒰₂ ((fun x => (f 𝒰₁ x, f 𝒰₂ x)) x).snd).val.base\n[PROOFSTEP]\nexact\n  ⟨𝒰₁.Covers x, 𝒰₂.Covers x⟩\n    -- Porting note : was automatic\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\ns : Type u_1\nX : Scheme\nU : s → Opens ↑↑X.toPresheafedSpace\nhU : ⨆ (i : s), U i = ⊤\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntriv\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\ns : Type u_1\nX : Scheme\nU : s → Opens ↑↑X.toPresheafedSpace\nhU : ⨆ (i : s), U i = ⊤\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n    Set.range\n      ↑((fun i => ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion (U i))))\n              ((fun x => Exists.choose (_ : ∃ i, x ∈ U i)) x)).val.base\n[PROOFSTEP]\nerw [Subtype.range_coe]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\ns : Type u_1\nX : Scheme\nU : s → Opens ↑↑X.toPresheafedSpace\nhU : ⨆ (i : s), U i = ⊤\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ↑(U ((fun x => Exists.choose (_ : ∃ i, x ∈ U i)) x))\n[PROOFSTEP]\nhave : x ∈ ⨆ i, U i := hU.symm ▸ show x ∈ (⊤ : Opens X) by triv\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\ns : Type u_1\nX : Scheme\nU : s → Opens ↑↑X.toPresheafedSpace\nhU : ⨆ (i : s), U i = ⊤\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntriv\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\ns : Type u_1\nX : Scheme\nU : s → Opens ↑↑X.toPresheafedSpace\nhU : ⨆ (i : s), U i = ⊤\nx : ↑↑X.toPresheafedSpace\nthis : x ∈ ⨆ (i : s), U i\n⊢ x ∈ ↑(U ((fun x => Exists.choose (_ : ∃ i, x ∈ U i)) x))\n[PROOFSTEP]\nexact (Opens.mem_iSup.mp this).choose_spec\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ pullback f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) ≅\n    Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))\n[PROOFSTEP]\nrefine' IsOpenImmersion.isoOfRangeEq pullback.fst (X.ofRestrict _) _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Set.range ↑pullback.fst.val.base =\n    Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.base\n[PROOFSTEP]\nrw [IsOpenImmersion.range_pullback_fst_of_right]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ((Opens.map f.val.base).obj\n        { carrier := Set.range ↑(Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base,\n          is_open' :=\n            (_ :\n              IsOpen (Set.range ↑(Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base)) }).carrier =\n    Set.range ↑(Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.base\n[PROOFSTEP]\ndsimp [Opens.inclusion]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base ⁻¹' Set.range ↑(ContinuousMap.mk Subtype.val) = Set.range ↑(ContinuousMap.mk Subtype.val)\n[PROOFSTEP]\nrw [ContinuousMap.coe_mk, ContinuousMap.coe_mk, Subtype.range_val, Subtype.range_coe]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base ⁻¹' ↑U = ↑((Opens.map f.val.base).obj U)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict f U).inv ≫ pullback.fst =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))\n[PROOFSTEP]\ndelta pullbackRestrictIsoRestrict\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (IsOpenImmersion.isoOfRangeEq pullback.fst\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n          (_ :\n            Set.range ↑pullback.fst.val.base =\n              Set.range\n                ↑(Scheme.ofRestrict X\n                        (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.base)).inv ≫\n      pullback.fst =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict f U).hom ≫\n      Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) =\n    pullback.fst\n[PROOFSTEP]\ndelta pullbackRestrictIsoRestrict\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (IsOpenImmersion.isoOfRangeEq pullback.fst\n          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n          (_ :\n            Set.range ↑pullback.fst.val.base =\n              Set.range\n                ↑(Scheme.ofRestrict X\n                        (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.base)).hom ≫\n      Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) =\n    pullback.fst\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)) =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫ f\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ ((pullbackRestrictIsoRestrict f U).inv ≫ pullback.snd) ≫\n      Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)) =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫ f\n[PROOFSTEP]\nrw [Category.assoc, pullback.condition.symm, pullbackRestrictIsoRestrict_inv_fst_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ IsPullback (f ∣_ U) (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ IsPullback ((pullbackRestrictIsoRestrict f U).inv ≫ pullback.snd)\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n[PROOFSTEP]\nrw [← Category.id_comp f]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ IsPullback ((pullbackRestrictIsoRestrict (𝟙 X ≫ f) U).inv ≫ pullback.snd)\n    (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (𝟙 X ≫ f).val.base).obj U))))\n    (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) (𝟙 X ≫ f)\n[PROOFSTEP]\nrefine' (IsPullback.of_horiz_isIso ⟨_⟩).paste_horiz (IsPullback.of_hasPullback f (Y.ofRestrict U.openEmbedding)).flip\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict (𝟙 X ≫ f) U).inv ≫ pullback.fst =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (𝟙 X ≫ f).val.base).obj U))) ≫ 𝟙 X\n[PROOFSTEP]\nerw [pullbackRestrictIsoRestrict_inv_fst]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (𝟙 X ≫ f).val.base).obj U))) =\n    Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (𝟙 X ≫ f).val.base).obj U))) ≫ 𝟙 X\n[PROOFSTEP]\nrw [Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (f ≫ g) ∣_ U = (f ∣_ (Opens.map g.val.base).obj U) ≫ g ∣_ U\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫ pullback.snd =\n    ((pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd\n[PROOFSTEP]\nrw [← pullbackRightPullbackFstIso_inv_snd_snd]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫\n      (pullbackRightPullbackFstIso g (Scheme.ofRestrict Z (_ : OpenEmbedding ↑(Opens.inclusion U))) f).inv ≫\n        pullback.snd ≫ pullback.snd =\n    ((pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict g U).inv ≫ pullback.snd\n[PROOFSTEP]\nsimp_rw [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫\n          (pullbackRightPullbackFstIso g (Scheme.ofRestrict Z (_ : OpenEmbedding ↑(Opens.inclusion U))) f).inv) ≫\n        pullback.snd) ≫\n      pullback.snd =\n    (((pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫ pullback.snd) ≫\n        (pullbackRestrictIsoRestrict g U).inv) ≫\n      pullback.snd\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ ((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫\n        (pullbackRightPullbackFstIso g (Scheme.ofRestrict Z (_ : OpenEmbedding ↑(Opens.inclusion U))) f).inv) ≫\n      pullback.snd =\n    ((pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫ pullback.snd) ≫\n      (pullbackRestrictIsoRestrict g U).inv\n[PROOFSTEP]\nrw [← cancel_mono pullback.fst]\n[GOAL]\ncase e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (((pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫\n          (pullbackRightPullbackFstIso g (Scheme.ofRestrict Z (_ : OpenEmbedding ↑(Opens.inclusion U))) f).inv) ≫\n        pullback.snd) ≫\n      pullback.fst =\n    (((pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫ pullback.snd) ≫\n        (pullbackRestrictIsoRestrict g U).inv) ≫\n      pullback.fst\n[PROOFSTEP]\nsimp_rw [Category.assoc]\n[GOAL]\ncase e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\nU : Opens ↑↑Z.toPresheafedSpace\n⊢ (pullbackRestrictIsoRestrict (f ≫ g) U).inv ≫\n      (pullbackRightPullbackFstIso g (Scheme.ofRestrict Z (_ : OpenEmbedding ↑(Opens.inclusion U))) f).inv ≫\n        pullback.snd ≫ pullback.fst =\n    (pullbackRestrictIsoRestrict f ((Opens.map g.val.base).obj U)).inv ≫\n      pullback.snd ≫ (pullbackRestrictIsoRestrict g U).inv ≫ pullback.fst\n[PROOFSTEP]\nrw [pullbackRestrictIsoRestrict_inv_fst, pullbackRightPullbackFstIso_inv_snd_fst, ← pullback.condition,\n  pullbackRestrictIsoRestrict_inv_fst_assoc, pullbackRestrictIsoRestrict_inv_fst_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ IsIso (f ∣_ U)\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ IsIso ((pullbackRestrictIsoRestrict f U).inv ≫ pullback.snd)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n      ((Opens.map (f ∣_ U).val.base).obj V) =\n    (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n        ((Opens.map (f ∣_ U).val.base).obj V)) =\n    ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))\n[PROOFSTEP]\next x\n[GOAL]\ncase h.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n      ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n          ((Opens.map (f ∣_ U).val.base).obj V)) ↔\n    x ∈ ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.mp\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈\n      ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n          ((Opens.map (f ∣_ U).val.base).obj V)) →\n    x ∈ ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))\n[PROOFSTEP]\nrintro ⟨⟨x, hx⟩, hx' : (f ∣_ U).1.base _ ∈ V, rfl⟩\n[GOAL]\ncase h.h.mp.intro.mk.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ (Opens.map f.val.base).obj U\nhx' : ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V\n⊢ ↑(Opens.inclusion ((Opens.map f.val.base).obj U)) { val := x, property := hx } ∈\n    ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))\n[PROOFSTEP]\nrefine'\n  ⟨⟨_, hx⟩, _, rfl⟩\n    -- Porting note : this rewrite was not necessary\n[GOAL]\ncase h.h.mp.intro.mk.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ (Opens.map f.val.base).obj U\nhx' : ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V\n⊢ { val := ↑f.val.base x, property := hx } ∈ ↑V\n[PROOFSTEP]\nrw [SetLike.mem_coe]\n[GOAL]\ncase h.h.mp.intro.mk.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ (Opens.map f.val.base).obj U\nhx' : ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V\n⊢ { val := ↑f.val.base x, property := hx } ∈ V\n[PROOFSTEP]\nconvert hx'\n[GOAL]\ncase h.e'_4.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ (Opens.map f.val.base).obj U\nhx' : ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V\ne_1✝ :\n  (forget TopCat).obj ((Opens.toTopCat ↑Y.toPresheafedSpace).obj U) =\n    (fun x =>\n        (forget TopCat).obj\n          ↑(Scheme.restrict Y\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n      { val := x, property := hx }\n⊢ { val := ↑f.val.base x, property := hx } = ↑(f ∣_ U).val.base { val := x, property := hx }\n[PROOFSTEP]\nrefine Subtype.ext ?_\n[GOAL]\ncase h.e'_4.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : x ∈ (Opens.map f.val.base).obj U\nhx' : ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V\ne_1✝ :\n  (forget TopCat).obj ((Opens.toTopCat ↑Y.toPresheafedSpace).obj U) =\n    (fun x =>\n        (forget TopCat).obj\n          ↑(Scheme.restrict Y\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n      { val := x, property := hx }\n⊢ ↑{ val := ↑f.val.base x, property := hx } = ↑(↑(f ∣_ U).val.base { val := x, property := hx })\n[PROOFSTEP]\nexact (morphismRestrict_base_coe f U ⟨x, hx⟩).symm\n[GOAL]\ncase h.h.mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\n⊢ x ∈ ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) →\n    x ∈\n      ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n          ((Opens.map (f ∣_ U).val.base).obj V))\n[PROOFSTEP]\nrintro ⟨⟨x, hx⟩, hx' : _ ∈ V.1, rfl : x = _⟩\n[GOAL]\ncase h.h.mpr.intro.mk.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : ↑f.val.base x ∈ U\nhx' : { val := ↑f.val.base x, property := hx } ∈ V.carrier\n⊢ x ∈\n    ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n        ((Opens.map (f ∣_ U).val.base).obj V))\n[PROOFSTEP]\nrefine' ⟨⟨_, hx⟩, (_ : (f ∣_ U).1.base ⟨x, hx⟩ ∈ V.1), rfl⟩\n[GOAL]\ncase h.h.mpr.intro.mk.intro\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : ↑f.val.base x ∈ U\nhx' : { val := ↑f.val.base x, property := hx } ∈ V.carrier\n⊢ ↑(f ∣_ U).val.base { val := x, property := hx } ∈ V.carrier\n[PROOFSTEP]\nconvert hx'\n[GOAL]\ncase h.e'_4.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : ↑f.val.base x ∈ U\nhx' : { val := ↑f.val.base x, property := hx } ∈ V.carrier\ne_1✝ :\n  (fun x =>\n        (forget TopCat).obj\n          ↑(Scheme.restrict Y\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n      { val := x, property := hx } =\n    { x // x ∈ U }\n⊢ ↑(f ∣_ U).val.base { val := x, property := hx } = { val := ↑f.val.base x, property := hx }\n[PROOFSTEP]\nrefine Subtype.ext ?_\n[GOAL]\ncase h.e'_4.h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nx : ↑↑X.toPresheafedSpace\nhx : ↑f.val.base x ∈ U\nhx' : { val := ↑f.val.base x, property := hx } ∈ V.carrier\ne_1✝ :\n  (fun x =>\n        (forget TopCat).obj\n          ↑(Scheme.restrict Y\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n      { val := x, property := hx } =\n    { x // x ∈ U }\n⊢ ↑(↑(f ∣_ U).val.base { val := x, property := hx }) = ↑{ val := ↑f.val.base x, property := hx }\n[PROOFSTEP]\nexact morphismRestrict_base_coe f U ⟨x, hx⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nhave := Scheme.congr_app (morphismRestrict_ι f U) (op (U.openEmbedding.isOpenMap.functor.obj V))\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n      (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n    NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫ f).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            ((Opens.map f.val.base).obj\n                              U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                            f).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n              (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nrw [Scheme.comp_val_c_app, Scheme.comp_val_c_app_assoc] at this \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nhave e : (Opens.map U.inclusion).obj (U.openEmbedding.isOpenMap.functor.obj V) = V := by ext1;\n  exact Set.preimage_image_eq _ Subtype.coe_injective\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\n⊢ (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\n⊢ ↑((Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) = ↑V\n[PROOFSTEP]\nexact Set.preimage_image_eq _ Subtype.coe_injective\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nhave : _ ≫ X.presheaf.map _ = _ := (((f ∣_ U).1.c.naturality (eqToHom e).op).symm.trans ?_).trans this\n[GOAL]\ncase refine_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis✝ :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\nthis :\n  NatTrans.app (f ∣_ U).val.c (op V) ≫\n      X.presheaf.map\n        ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n          ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nrw [← IsIso.eq_comp_inv, ← Functor.map_inv, Category.assoc] at this \n[GOAL]\ncase refine_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis✝ :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\nthis :\n  NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n          (Scheme.restrict X\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                ((Opens.map f.val.base).obj\n                                  U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        X.presheaf.map\n          (inv\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)))\n⊢ NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase refine_2\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis✝ :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\nthis :\n  NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n          (Scheme.restrict X\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                ((Opens.map f.val.base).obj\n                                  U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        X.presheaf.map\n          (inv\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)))\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n          (Scheme.restrict X\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                ((Opens.map f.val.base).obj\n                                  U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        X.presheaf.map\n          (inv\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine_2.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis✝ :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\nthis :\n  NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n          (Scheme.restrict X\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                ((Opens.map f.val.base).obj\n                                  U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        X.presheaf.map\n          (inv\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)))\n⊢ (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n      X.presheaf.map\n        (inv\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n            ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op))) =\n    X.presheaf.map\n      (eqToHom\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                ((Opens.map (f ∣_ U).val.base).obj V) =\n              (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\nerw [← X.presheaf.map_comp, ← X.presheaf.map_comp]\n[GOAL]\ncase refine_2.e_a\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis✝ :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\nthis :\n  NatTrans.app (f ∣_ U).val.c (op V) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      (NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n            ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n          (Scheme.restrict X\n                        (_ :\n                          OpenEmbedding\n                            ↑(Opens.inclusion\n                                ((Opens.map f.val.base).obj\n                                  U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        X.presheaf.map\n          (inv\n            ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n              ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op)))\n⊢ X.presheaf.map\n      (((NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).counit\n              ((Opens.map f.val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).unop).op ≫\n          (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                                f).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                  (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                    (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))) ≫\n        inv\n          ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).op.map\n            ((Opens.map (f ∣_ U).val.base).op.map (eqToHom e).op))) =\n    X.presheaf.map\n      (eqToHom\n          (_ :\n            (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                ((Opens.map (f ∣_ U).val.base).obj V) =\n              (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase refine_1\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\n⊢ (Scheme.restrict Y\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n        (eqToHom e).op ≫\n      NatTrans.app (f ∣_ U).val.c\n        (op ((Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)))\n[PROOFSTEP]\nchange Y.presheaf.map _ ≫ _ = Y.presheaf.map _ ≫ _\n[GOAL]\ncase refine_1\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\nthis :\n  NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c\n        (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      NatTrans.app (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).val.c\n          ((Opens.map f.val.base).op.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) ≫\n        (Scheme.restrict X\n                      (_ :\n                        OpenEmbedding\n                          ↑(Opens.inclusion\n                              ((Opens.map f.val.base).obj\n                                U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (Scheme.ofRestrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) ≫\n                              f).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) =\n                (Opens.map ((f ∣_ U) ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n                  (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))))\ne : (Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V) = V\n⊢ Y.presheaf.map ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.map (eqToHom e).op) ≫\n      NatTrans.app (f ∣_ U).val.c\n        (op ((Opens.map (Opens.inclusion U)).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) =\n    Y.presheaf.map\n        (NatTrans.app (IsOpenMap.adjunction (_ : IsOpenMap ↑(Opens.inclusion U))).counit\n            (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)).unop).op ≫\n      NatTrans.app (f ∣_ U).val.c\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).op.obj\n          (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Scheme.Γ.map (f ∣_ U).op =\n    Y.presheaf.map (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n      NatTrans.app f.val.c (op U) ≫\n        X.presheaf.map\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj U)).op\n[PROOFSTEP]\nrw [Scheme.Γ_map_op, morphismRestrict_c_app f U ⊤, f.val.c.naturality_assoc]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj ⊤) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))).op =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)) ≫\n      (f.val.base _* X.presheaf).map\n          (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n        X.presheaf.map\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj U)).op\n[PROOFSTEP]\nerw [← X.presheaf.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)) ≫\n      X.presheaf.map\n        (eqToHom\n            (_ :\n              (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj ⊤) =\n                (Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤))).op =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)) ≫\n      X.presheaf.map\n        ((Opens.map f.val.base).op.map\n            (eqToHom (_ : U = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)).op ≫\n          (eqToHom\n              (_ :\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj ⊤ =\n                  (Opens.map f.val.base).obj U)).op)\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\n⊢ Arrow.mk (f ∣_ Scheme.Hom.opensRange g) ≅ Arrow.mk pullback.snd\n[PROOFSTEP]\nlet V : Opens Y := Scheme.Hom.opensRange g\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\n⊢ Arrow.mk (f ∣_ Scheme.Hom.opensRange g) ≅ Arrow.mk pullback.snd\n[PROOFSTEP]\nlet e := IsOpenImmersion.isoOfRangeEq g (Y.ofRestrict V.openEmbedding) Subtype.range_coe.symm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\n⊢ Arrow.mk (f ∣_ Scheme.Hom.opensRange g) ≅ Arrow.mk pullback.snd\n[PROOFSTEP]\nlet t : pullback f g ⟶ pullback f (Y.ofRestrict V.openEmbedding) :=\n  pullback.map _ _ _ _ (𝟙 _) e.hom (𝟙 _) (by rw [Category.comp_id, Category.id_comp])\n    (by rw [Category.comp_id, IsOpenImmersion.isoOfRangeEq_hom, IsOpenImmersion.lift_fac])\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\n⊢ f ≫ 𝟙 Y = 𝟙 X ≫ f\n[PROOFSTEP]\nrw [Category.comp_id, Category.id_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\n⊢ g ≫ 𝟙 Y = e.hom ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))\n[PROOFSTEP]\nrw [Category.comp_id, IsOpenImmersion.isoOfRangeEq_hom, IsOpenImmersion.lift_fac]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\nt : pullback f g ⟶ pullback f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) :=\n  pullback.map f g f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) (𝟙 X) e.hom (𝟙 Y)\n    (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f) (_ : g ≫ 𝟙 Y = e.hom ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n⊢ Arrow.mk (f ∣_ Scheme.Hom.opensRange g) ≅ Arrow.mk pullback.snd\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\nt : pullback f g ⟶ pullback f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) :=\n  pullback.map f g f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) (𝟙 X) e.hom (𝟙 Y)\n    (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f) (_ : g ≫ 𝟙 Y = e.hom ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n⊢ Arrow.mk pullback.snd ≅ Arrow.mk (f ∣_ Scheme.Hom.opensRange g)\n[PROOFSTEP]\nrefine' Arrow.isoMk (asIso t ≪≫ pullbackRestrictIsoRestrict f V) e _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y U : Scheme\nf : X ⟶ Y\ng : U ⟶ Y\nhg : IsOpenImmersion g\nV : Opens ↑↑Y.toPresheafedSpace := Scheme.Hom.opensRange g\ne : U ≅ Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)) :=\n  IsOpenImmersion.isoOfRangeEq g (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n    (_ : Set.range ↑g.val.base = Set.range Subtype.val)\nt : pullback f g ⟶ pullback f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) :=\n  pullback.map f g f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V))) (𝟙 X) e.hom (𝟙 Y)\n    (_ : f ≫ 𝟙 Y = 𝟙 X ≫ f) (_ : g ≫ 𝟙 Y = e.hom ≫ Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion V)))\n⊢ (asIso t ≪≫ pullbackRestrictIsoRestrict f V).hom ≫ (Arrow.mk (f ∣_ Scheme.Hom.opensRange g)).hom =\n    (Arrow.mk pullback.snd).hom ≫ e.hom\n[PROOFSTEP]\nrw [Iso.trans_hom, asIso_hom, ← Iso.comp_inv_eq, ← cancel_mono g, Arrow.mk_hom, Arrow.mk_hom,\n  IsOpenImmersion.isoOfRangeEq_inv, Category.assoc, Category.assoc, Category.assoc, IsOpenImmersion.lift_fac, ←\n  pullback.condition, morphismRestrict_ι, pullbackRestrictIsoRestrict_hom_restrict_assoc, pullback.lift_fst_assoc,\n  Category.comp_id]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU V : Opens ↑↑Y.toPresheafedSpace\ne : U = V\n⊢ Arrow.mk (f ∣_ U) = Arrow.mk (f ∣_ V)\n[PROOFSTEP]\nsubst e\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\n⊢ Arrow.mk (f ∣_ U) = Arrow.mk (f ∣_ U)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nset g := ((Y.restrict U.openEmbedding).ofRestrict (V.openEmbedding (X := TopCat.of U)) ≫ Y.ofRestrict U.openEmbedding)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nhave i1 : IsOpenImmersion g := PresheafedSpace.IsOpenImmersion.comp _ _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nhave i2 : HasPullback f g := IsOpenImmersion.hasPullback_of_right g f\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nset h : _ ⟶ pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry _ _).hom ≫\n      pullback.map _ _ _ _ (𝟙 _) ((pullbackRestrictIsoRestrict f U).inv ≫ (pullbackSymmetry _ _).hom) (𝟙 _)\n          ((Category.comp_id _).trans (Category.id_comp _).symm) (by aesop_cat) ≫\n        (pullbackRightPullbackFstIso _ _ _).hom ≫ (pullbackSymmetry _ _).hom\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\n⊢ (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n    ((pullbackRestrictIsoRestrict f U).inv ≫\n        (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n      pullback.fst\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nhave i3 : IsIso h\n[GOAL]\ncase i3\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\n⊢ IsIso h\n[PROOFSTEP]\nrepeat apply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\ncase i3\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\n⊢ IsIso h\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\ncase inst\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\n⊢ IsIso\n    ((pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom)\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\ncase inst\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\n⊢ IsIso\n    (pullback.map\n        (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n          (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (f ∣_ U)\n        (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n          (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        pullback.fst\n        (𝟙\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V))))\n        ((pullbackRestrictIsoRestrict f U).inv ≫\n          (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n        (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n        (_ :\n          Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n              𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n            𝟙\n                (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n              Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))\n        (_ :\n          (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n            ((pullbackRestrictIsoRestrict f U).inv ≫\n                (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n              pullback.fst) ≫\n      (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n            (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n        (pullbackSymmetry\n            (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n              Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            f).hom)\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\n\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsIso.comp_isIso\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nhave : (f ∣_ U ∣_ V) ≫ (Iso.refl _).hom = (asIso h).hom ≫ pullback.snd (f := f) (g := g)\n[GOAL]\ncase this\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\n⊢ (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n[PROOFSTEP]\nsimp only [Category.comp_id, pullbackRightPullbackFstIso_hom_fst, Iso.refl_hom, Category.assoc,\n  pullbackSymmetry_hom_comp_snd, asIso_hom, pullback.lift_fst, pullbackSymmetry_hom_comp_fst]\n[GOAL]\ncase this\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\n⊢ f ∣_ U ∣_ V = (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫ pullback.snd\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ Arrow.mk (f ∣_ U ∣_ V) ≅ Arrow.mk (f ∣_ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\nrefine' Arrow.isoMk' _ _ _ _ this.symm ≪≫ (morphismRestrictOpensRange _ _).symm ≪≫ morphismRestrictEq _ _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ Scheme.Hom.opensRange g = (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ ↑(Scheme.Hom.opensRange g) = ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ Set.range ↑(Opens.inclusion V ≫ Opens.inclusion U) = ↑(Opens.inclusion U) '' ↑V\n[PROOFSTEP]\nrw [coe_comp, Set.range_comp]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ ↑(Opens.inclusion U) '' Set.range ↑(Opens.inclusion V) = ↑(Opens.inclusion U) '' ↑V\n[PROOFSTEP]\napply congr_arg (U.inclusion '' ·)\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nV : Opens { x // x ∈ U }\ng : Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n    (_ : OpenEmbedding ↑(Opens.inclusion V)) ⟶\n  Y :=\n  Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n    Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))\ni1 : IsOpenImmersion g\ni2 : HasPullback f g\nh : Scheme.restrict (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))))\n    (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map (f ∣_ U).val.base).obj V))) ⟶\n  pullback f g :=\n  (pullbackRestrictIsoRestrict (f ∣_ U) V).inv ≫\n    (pullbackSymmetry (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n      pullback.map\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (f ∣_ U)\n          (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          pullback.fst\n          (𝟙\n            (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              (_ : OpenEmbedding ↑(Opens.inclusion V))))\n          ((pullbackRestrictIsoRestrict f U).inv ≫\n            (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom)\n          (𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))))\n          (_ :\n            Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              𝟙\n                  (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                    (_ : OpenEmbedding ↑(Opens.inclusion V))) ≫\n                Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)))\n          (_ :\n            (f ∣_ U) ≫ 𝟙 (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) =\n              ((pullbackRestrictIsoRestrict f U).inv ≫\n                  (pullbackSymmetry f (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom) ≫\n                pullback.fst) ≫\n        (pullbackRightPullbackFstIso (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))) f\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom ≫\n          (pullbackSymmetry\n              (Scheme.ofRestrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n                  (_ : OpenEmbedding ↑(Opens.inclusion V)) ≫\n                Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n              f).hom\ni3 : IsIso h\nthis :\n  (f ∣_ U ∣_ V) ≫\n      (Iso.refl\n          (Scheme.restrict (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n            (_ : OpenEmbedding ↑(Opens.inclusion V)))).hom =\n    (asIso h).hom ≫ pullback.snd\n⊢ Set.range ↑(Opens.inclusion V) = ↑V\n[PROOFSTEP]\nexact Subtype.range_val\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\n⊢ Arrow.mk\n      (f ∣_ U ∣_\n        Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) r)) ≅\n    Arrow.mk (f ∣_ Scheme.basicOpen Y r)\n[PROOFSTEP]\nrefine' morphismRestrictRestrict _ _ _ ≪≫ morphismRestrictEq _ _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nhave e := Scheme.preimage_basicOpen (Y.ofRestrict U.openEmbedding) r\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(NatTrans.app (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.c (op U)) r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nerw [Scheme.ofRestrict_val_c_app, Opens.adjunction_counit_app_self, eqToHom_op] at e \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op) r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nrw [← (Y.restrict U.openEmbedding).basicOpen_res_eq _ (eqToHom U.inclusion_map_eq_top).op]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑((Scheme.restrict Y\n                          (_ :\n                            OpenEmbedding\n                              ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n              (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op)\n          (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op)\n            r))) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nerw [← comp_apply]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op ≫\n              (Scheme.restrict Y\n                            (_ :\n                              OpenEmbedding\n                                ↑(Opens.inclusion\n                                    U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.map\n                (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op)\n          r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nerw [← Y.presheaf.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map\n              ((eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op ≫\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.map\n                  (eqToHom (_ : (Opens.map (Opens.inclusion U)).obj U = ⊤)).op))\n          r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nrw [eqToHom_op, eqToHom_op, eqToHom_map, eqToHom_trans]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      (Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n        (↑(Y.presheaf.map\n              (eqToHom\n                (_ :\n                  op U =\n                    (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).op.obj\n                      (op ((Opens.map (Opens.inclusion U)).obj U)))))\n          r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\nerw [← e]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n      ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r)) =\n    Scheme.basicOpen Y r\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n        ((Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj\n          (Scheme.basicOpen Y r))) =\n    ↑(Scheme.basicOpen Y r)\n[PROOFSTEP]\ndsimp [Opens.map, Opens.inclusion]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ ↑(ContinuousMap.mk Subtype.val) '' (↑(ContinuousMap.mk Subtype.val) ⁻¹' ↑(Scheme.basicOpen Y r)) =\n    ↑(Scheme.basicOpen Y r)\n[PROOFSTEP]\nrw [Set.image_preimage_eq_inter_range, Set.inter_eq_left_iff_subset, ContinuousMap.coe_mk, Subtype.range_val]\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nr : ↑(Y.presheaf.obj (op U))\ne :\n  (Opens.map (Scheme.ofRestrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).val.base).obj (Scheme.basicOpen Y r) =\n    Scheme.basicOpen (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U)))\n      (↑(Y.presheaf.map\n            (eqToHom\n              (_ :\n                op (op U).unop =\n                  op\n                    ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj\n                      ((Opens.map (Opens.inclusion U)).obj (op U).unop)))))\n        r)\n⊢ ↑(Scheme.basicOpen Y r) ⊆ ↑U\n[PROOFSTEP]\nexact Y.basicOpen_le r\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ Arrow.mk (PresheafedSpace.stalkMap (f ∣_ U).val x) ≅ Arrow.mk (PresheafedSpace.stalkMap f.val ↑x)\n[PROOFSTEP]\nfapply Arrow.isoMk'\n[GOAL]\ncase e₁\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ PresheafedSpace.stalk\n      (Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n      (↑(f ∣_ U).val.base x) ≅\n    PresheafedSpace.stalk Y.toPresheafedSpace (↑f.val.base ↑x)\n[PROOFSTEP]\nrefine' Y.restrictStalkIso U.openEmbedding ((f ∣_ U).1.1 x) ≪≫ TopCat.Presheaf.stalkCongr _ _\n[GOAL]\ncase e₁\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ Inseparable (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) (↑f.val.base ↑x)\n[PROOFSTEP]\napply Inseparable.of_eq\n[GOAL]\ncase e₁.e\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ↑(Opens.inclusion U) (↑(f ∣_ U).val.base x) = ↑f.val.base ↑x\n[PROOFSTEP]\nexact morphismRestrict_base_coe f U x\n[GOAL]\ncase e₂\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ PresheafedSpace.stalk\n      (Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n      x ≅\n    PresheafedSpace.stalk X.toPresheafedSpace ↑x\n[PROOFSTEP]\nexact X.restrictStalkIso (Opens.openEmbedding _) _\n[GOAL]\ncase h\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ autoParam\n    ((PresheafedSpace.restrictStalkIso Y.toPresheafedSpace (_ : OpenEmbedding ↑(Opens.inclusion U))\n              (↑(f ∣_ U).val.base x) ≪≫\n            TopCat.Presheaf.stalkCongr Y.presheaf\n              (_ : Inseparable (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) (↑f.val.base ↑x))).hom ≫\n        PresheafedSpace.stalkMap f.val ↑x =\n      PresheafedSpace.stalkMap (f ∣_ U).val x ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom)\n    _auto✝\n[PROOFSTEP]\napply TopCat.Presheaf.stalk_hom_ext\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ ∀\n    (U_1 :\n      Opens\n        ↑↑(Scheme.restrict Y\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n    (hxU : ↑(f ∣_ U).val.base x ∈ U_1),\n    TopCat.Presheaf.germ\n          (Scheme.restrict Y\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := ↑(f ∣_ U).val.base x, property := hxU } ≫\n        (PresheafedSpace.restrictStalkIso Y.toPresheafedSpace (_ : OpenEmbedding ↑(Opens.inclusion U))\n                (↑(f ∣_ U).val.base x) ≪≫\n              TopCat.Presheaf.stalkCongr Y.presheaf\n                (_ : Inseparable (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) (↑f.val.base ↑x))).hom ≫\n          PresheafedSpace.stalkMap f.val ↑x =\n      TopCat.Presheaf.germ\n          (Scheme.restrict Y\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := ↑(f ∣_ U).val.base x, property := hxU } ≫\n        PresheafedSpace.stalkMap (f ∣_ U).val x ≫\n          (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n              (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nintro V hxV\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ TopCat.Presheaf.germ\n        (Scheme.restrict Y\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n        { val := ↑(f ∣_ U).val.base x, property := hxV } ≫\n      (PresheafedSpace.restrictStalkIso Y.toPresheafedSpace (_ : OpenEmbedding ↑(Opens.inclusion U))\n              (↑(f ∣_ U).val.base x) ≪≫\n            TopCat.Presheaf.stalkCongr Y.presheaf\n              (_ : Inseparable (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) (↑f.val.base ↑x))).hom ≫\n        PresheafedSpace.stalkMap f.val ↑x =\n    TopCat.Presheaf.germ\n        (Scheme.restrict Y\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n        { val := ↑(f ∣_ U).val.base x, property := hxV } ≫\n      PresheafedSpace.stalkMap (f ∣_ U).val x ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nsimp only [TopCat.Presheaf.stalkCongr_hom, CategoryTheory.Category.assoc, CategoryTheory.Iso.trans_hom]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ TopCat.Presheaf.germ\n        (Scheme.restrict Y\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n        { val := ↑(f ∣_ U).val.base x, property := hxV } ≫\n      (PresheafedSpace.restrictStalkIso Y.toPresheafedSpace (_ : OpenEmbedding ↑(Opens.inclusion U))\n            (↑(f ∣_ U).val.base x)).hom ≫\n        TopCat.Presheaf.stalkSpecializes Y.presheaf\n            (_ : nhds (↑f.val.base ↑x) ≤ nhds (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x))) ≫\n          PresheafedSpace.stalkMap f.val ↑x =\n    TopCat.Presheaf.germ\n        (Scheme.restrict Y\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n        { val := ↑(f ∣_ U).val.base x, property := hxV } ≫\n      PresheafedSpace.stalkMap (f ∣_ U).val x ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nerw [PresheafedSpace.restrictStalkIso_hom_eq_germ_assoc]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ TopCat.Presheaf.germ Y.presheaf\n        { val := ↑(Opens.inclusion U) (↑(f ∣_ U).val.base x),\n          property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) } ≫\n      TopCat.Presheaf.stalkSpecializes Y.presheaf\n          (_ : nhds (↑f.val.base ↑x) ≤ nhds (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x))) ≫\n        PresheafedSpace.stalkMap f.val ↑x =\n    TopCat.Presheaf.germ\n        (Scheme.restrict Y\n                  (_ :\n                    OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n        { val := ↑(f ∣_ U).val.base x, property := hxV } ≫\n      PresheafedSpace.stalkMap (f ∣_ U).val x ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nerw [PresheafedSpace.stalkMap_germ_assoc _ V ⟨_, hxV⟩]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ TopCat.Presheaf.germ Y.presheaf\n        { val := ↑(Opens.inclusion U) (↑(f ∣_ U).val.base x),\n          property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑(Opens.inclusion U) (↑(f ∣_ U).val.base x)) } ≫\n      TopCat.Presheaf.stalkSpecializes Y.presheaf\n          (_ : nhds (↑f.val.base ↑x) ≤ nhds (↑(Opens.inclusion U) (↑(f ∣_ U).val.base x))) ≫\n        PresheafedSpace.stalkMap f.val ↑x =\n    NatTrans.app (f ∣_ U).val.c (op V) ≫\n      TopCat.Presheaf.germ\n          (Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            ((Opens.map f.val.base).obj\n                              U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := x, property := hxV } ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nrw [TopCat.Presheaf.germ_stalk_specializes'_assoc]\n  -- Porting note : explicit variables and proofs were not necessary\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ TopCat.Presheaf.germ Y.presheaf\n        { val := ↑f.val.base ↑x,\n          property := (_ : ↑f.val.base ↑x ∈ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) } ≫\n      PresheafedSpace.stalkMap f.val ↑x =\n    NatTrans.app (f ∣_ U).val.c (op V) ≫\n      TopCat.Presheaf.germ\n          (Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            ((Opens.map f.val.base).obj\n                              U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := x, property := hxV } ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nerw [PresheafedSpace.stalkMap_germ _ (U.openEmbedding.isOpenMap.functor.obj V) ⟨x.1, ⟨⟨f.1.base x.1, x.2⟩, _, rfl⟩⟩]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      TopCat.Presheaf.germ X.presheaf\n        { val := ↑x, property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑f.val.base ↑x) } =\n    NatTrans.app (f ∣_ U).val.c (op V) ≫\n      TopCat.Presheaf.germ\n          (Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            ((Opens.map f.val.base).obj\n                              U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := x, property := hxV } ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ { val := ↑f.val.base ↑x, property := (_ : ↑x ∈ (Opens.map f.val.base).obj U) } ∈ ↑V\n[PROOFSTEP]\nswap\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ { val := ↑f.val.base ↑x, property := (_ : ↑x ∈ (Opens.map f.val.base).obj U) } ∈ ↑V\n[PROOFSTEP]\nrw [morphismRestrict_val_base] at hxV \n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : Set.restrictPreimage U.carrier (↑f.val.base) x ∈ V\n⊢ { val := ↑f.val.base ↑x, property := (_ : ↑x ∈ (Opens.map f.val.base).obj U) } ∈ ↑V\n[PROOFSTEP]\nexact hxV\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      TopCat.Presheaf.germ X.presheaf\n        { val := ↑x, property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑f.val.base ↑x) } =\n    NatTrans.app (f ∣_ U).val.c (op V) ≫\n      TopCat.Presheaf.germ\n          (Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion\n                            ((Opens.map f.val.base).obj\n                              U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf\n          { val := x, property := hxV } ≫\n        (PresheafedSpace.restrictStalkIso X.toPresheafedSpace\n            (_ : OpenEmbedding ↑(Opens.inclusion ((Opens.map f.val.base).obj U))) x).hom\n[PROOFSTEP]\nerw [PresheafedSpace.restrictStalkIso_hom_eq_germ]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      TopCat.Presheaf.germ X.presheaf\n        { val := ↑x, property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑f.val.base ↑x) } =\n    NatTrans.app (f ∣_ U).val.c (op V) ≫\n      TopCat.Presheaf.germ X.presheaf\n        { val := ↑(Opens.inclusion ((Opens.map f.val.base).obj U)) x,\n          property :=\n            (_ :\n              ↑(Opens.inclusion ((Opens.map f.val.base).obj U)) x ∈\n                (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                  ((Opens.map (f ∣_ U).val.base).obj V)) }\n[PROOFSTEP]\nrw [morphismRestrict_c_app, Category.assoc, TopCat.Presheaf.germ_res]\n[GOAL]\ncase h.ih\nC : Type u\ninst✝ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\nx :\n  ↑↑(Scheme.restrict X\n              (_ :\n                OpenEmbedding\n                  ↑(Opens.inclusion\n                      ((Opens.map f.val.base).obj U)))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nV :\n  Opens\n    ↑↑(Scheme.restrict Y (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nhxV : ↑(f ∣_ U).val.base x ∈ V\n⊢ NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      TopCat.Presheaf.germ X.presheaf\n        { val := ↑x, property := (_ : ∃ a, a ∈ ↑V ∧ ↑(Opens.inclusion U) a = ↑f.val.base ↑x) } =\n    NatTrans.app f.val.c (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V)) ≫\n      TopCat.Presheaf.germ X.presheaf\n        ((fun x =>\n            { val := ↑x,\n              property :=\n                (_ :\n                  ↑x ∈\n                    ↑((Opens.map f.val.base).obj ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj V))) })\n          { val := ↑(Opens.inclusion ((Opens.map f.val.base).obj U)) x,\n            property :=\n              (_ :\n                ↑(Opens.inclusion ((Opens.map f.val.base).obj U)) x ∈\n                  (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion ((Opens.map f.val.base).obj U)))).obj\n                    ((Opens.map (f ∣_ U).val.base).obj V)) })\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\ninst✝ : IsOpenImmersion f\n⊢ IsOpenImmersion (f ∣_ U)\n[PROOFSTEP]\ndelta morphismRestrict\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nX Y : Scheme\nf : X ⟶ Y\nU : Opens ↑↑Y.toPresheafedSpace\ninst✝ : IsOpenImmersion f\n⊢ IsOpenImmersion ((pullbackRestrictIsoRestrict f U).inv ≫ pullback.snd)\n[PROOFSTEP]\nrefine PresheafedSpace.IsOpenImmersion.comp _ _\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.OpenImmersion.Scheme", "llama_tokens": 132619, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5506073655352404, "lm_q2_score": 0.5312093733737562, "lm_q1q2_score": 0.29248779362094973}}
{"text": "[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nx✝³ : α\nx✝² x✝¹ : List α\nx✝ : x✝² ~ x✝¹\nhs : a ∈ x✝² ↔ a ∈ x✝¹\n⊢ a ∈ x✝³ :: x✝² ↔ a ∈ x✝³ :: x✝¹\n[PROOFSTEP]\nsimp only [mem_cons, hs]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nx✝² x✝¹ : α\nx✝ : List α\n⊢ a ∈ x✝¹ :: x✝² :: x✝ ↔ a ∈ x✝² :: x✝¹ :: x✝\n[PROOFSTEP]\nsimp only [mem_cons, or_left_comm]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na : α\nl : List α\n⊢ a :: (l ++ []) ~ a :: l\n[PROOFSTEP]\nrw [append_nil]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂✝ l₂ : List α\n⊢ [] ++ l₂ ~ l₂ ++ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\na : α\n⊢ concat l a ~ a :: l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α\np : l₁✝ ~ l₂✝\n_x : α\nl₁ l₂ : List α\n_p : l₁ ~ l₂\nr : length l₁ = length l₂\n⊢ length (_x :: l₁) = length (_x :: l₂)\n[PROOFSTEP]\nsimp [r]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ : List α\np : l₁ ~ l₂\n_x _y : α\nl : List α\n⊢ length (_y :: _x :: l) = length (_x :: _y :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\nl : List α\nx✝ : [] ~ x :: l\np : [] ~ x :: l := x✝\n⊢ False\n[PROOFSTEP]\ninjection p.symm.eq_nil\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na : α\nl : List α\n⊢ reverse (a :: l) ~ a :: l\n[PROOFSTEP]\nrw [reverse_cons]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na : α\nl : List α\n⊢ reverse l ++ [a] ~ a :: l\n[PROOFSTEP]\nexact (perm_append_singleton _ _).trans ((reverse_perm l).cons a)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b : α\n⊢ [a] ~ [b] ↔ a = b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option β\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ List.filterMap f l₁ ~ List.filterMap f l₂\n[PROOFSTEP]\ninduction p with\n| nil => simp\n| cons x _p IH => cases h : f x <;> simp [h, filterMap, IH, Perm.cons]\n| swap x y l₂ => cases hx : f x <;> cases hy : f y <;> simp [hx, hy, filterMap, swap]\n| trans _p₁ _p₂ IH₁ IH₂ => exact IH₁.trans IH₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option β\nl₁ l₂ : List α\np : l₁ ~ l₂\n⊢ List.filterMap f l₁ ~ List.filterMap f l₂\n[PROOFSTEP]\ninduction p with\n| nil => simp\n| cons x _p IH => cases h : f x <;> simp [h, filterMap, IH, Perm.cons]\n| swap x y l₂ => cases hx : f x <;> cases hy : f y <;> simp [hx, hy, filterMap, swap]\n| trans _p₁ _p₂ IH₁ IH₂ => exact IH₁.trans IH₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option β\nl₁ l₂ : List α\n⊢ List.filterMap f [] ~ List.filterMap f []\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option β\nl₁ l₂ : List α\n⊢ List.filterMap f [] ~ List.filterMap f []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\n⊢ List.filterMap f (x :: l₁✝) ~ List.filterMap f (x :: l₂✝)\n[PROOFSTEP]\n\n| cons x _p IH => cases h : f x <;> simp [h, filterMap, IH, Perm.cons]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\n⊢ List.filterMap f (x :: l₁✝) ~ List.filterMap f (x :: l₂✝)\n[PROOFSTEP]\ncases h : f x\n[GOAL]\ncase cons.none\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\nh : f x = none\n⊢ List.filterMap f (x :: l₁✝) ~ List.filterMap f (x :: l₂✝)\n[PROOFSTEP]\nsimp [h, filterMap, IH, Perm.cons]\n[GOAL]\ncase cons.some\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\nval✝ : β\nh : f x = some val✝\n⊢ List.filterMap f (x :: l₁✝) ~ List.filterMap f (x :: l₂✝)\n[PROOFSTEP]\nsimp [h, filterMap, IH, Perm.cons]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\n\n| swap x y l₂ => cases hx : f x <;> cases hy : f y <;> simp [hx, hy, filterMap, swap]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\ncases hx : f x\n[GOAL]\ncase swap.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nhx : f x = none\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\ncases hy : f y\n[GOAL]\ncase swap.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nval✝ : β\nhx : f x = some val✝\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\ncases hy : f y\n[GOAL]\ncase swap.none.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nhx : f x = none\nhy : f y = none\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\nsimp [hx, hy, filterMap, swap]\n[GOAL]\ncase swap.none.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nhx : f x = none\nval✝ : β\nhy : f y = some val✝\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\nsimp [hx, hy, filterMap, swap]\n[GOAL]\ncase swap.some.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nval✝ : β\nhx : f x = some val✝\nhy : f y = none\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\nsimp [hx, hy, filterMap, swap]\n[GOAL]\ncase swap.some.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂✝ : List α\nx y : α\nl₂ : List α\nval✝¹ : β\nhx : f x = some val✝¹\nval✝ : β\nhy : f y = some val✝\n⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)\n[PROOFSTEP]\nsimp [hx, hy, filterMap, swap]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\n_p₁ : l₁✝ ~ l₂✝\n_p₂ : l₂✝ ~ l₃✝\nIH₁ : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\nIH₂ : List.filterMap f l₂✝ ~ List.filterMap f l₃✝\n⊢ List.filterMap f l₁✝ ~ List.filterMap f l₃✝\n[PROOFSTEP]\n\n| trans _p₁ _p₂ IH₁ IH₂ => exact IH₁.trans IH₂\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option β\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\n_p₁ : l₁✝ ~ l₂✝\n_p₂ : l₂✝ ~ l₃✝\nIH₁ : List.filterMap f l₁✝ ~ List.filterMap f l₂✝\nIH₂ : List.filterMap f l₂✝ ~ List.filterMap f l₃✝\n⊢ List.filterMap f l₁✝ ~ List.filterMap f l₃✝\n[PROOFSTEP]\nexact IH₁.trans IH₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np✝ : α → Prop\nf : (a : α) → p✝ a → β\nl₁ l₂ : List α\np : l₁ ~ l₂\nH₁ : ∀ (a : α), a ∈ l₁ → p✝ a\nH₂ : ∀ (a : α), a ∈ l₂ → p✝ a\n⊢ List.pmap f l₁ H₁ ~ List.pmap f l₂ H₂\n[PROOFSTEP]\ninduction p with\n| nil => simp\n| cons x _p IH => simp [IH, Perm.cons]\n| swap x y => simp [swap]\n| trans _p₁ p₂ IH₁ IH₂ =>\n  refine' IH₁.trans IH₂\n  exact fun a m => H₂ a (p₂.subset m)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np✝ : α → Prop\nf : (a : α) → p✝ a → β\nl₁ l₂ : List α\np : l₁ ~ l₂\nH₁ : ∀ (a : α), a ∈ l₁ → p✝ a\nH₂ : ∀ (a : α), a ∈ l₂ → p✝ a\n⊢ List.pmap f l₁ H₁ ~ List.pmap f l₂ H₂\n[PROOFSTEP]\ninduction p with\n| nil => simp\n| cons x _p IH => simp [IH, Perm.cons]\n| swap x y => simp [swap]\n| trans _p₁ p₂ IH₁ IH₂ =>\n  refine' IH₁.trans IH₂\n  exact fun a m => H₂ a (p₂.subset m)\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nH₁ H₂ : ∀ (a : α), a ∈ [] → p a\n⊢ List.pmap f [] H₁ ~ List.pmap f [] H₂\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nH₁ H₂ : ∀ (a : α), a ∈ [] → p a\n⊢ List.pmap f [] H₁ ~ List.pmap f [] H₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : ∀ {H₁ : ∀ (a : α), a ∈ l₁✝ → p a} {H₂ : ∀ (a : α), a ∈ l₂✝ → p a}, List.pmap f l₁✝ H₁ ~ List.pmap f l₂✝ H₂\nH₁ : ∀ (a : α), a ∈ x :: l₁✝ → p a\nH₂ : ∀ (a : α), a ∈ x :: l₂✝ → p a\n⊢ List.pmap f (x :: l₁✝) H₁ ~ List.pmap f (x :: l₂✝) H₂\n[PROOFSTEP]\n\n| cons x _p IH => simp [IH, Perm.cons]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nx : α\nl₁✝ l₂✝ : List α\n_p : l₁✝ ~ l₂✝\nIH : ∀ {H₁ : ∀ (a : α), a ∈ l₁✝ → p a} {H₂ : ∀ (a : α), a ∈ l₂✝ → p a}, List.pmap f l₁✝ H₁ ~ List.pmap f l₂✝ H₂\nH₁ : ∀ (a : α), a ∈ x :: l₁✝ → p a\nH₂ : ∀ (a : α), a ∈ x :: l₂✝ → p a\n⊢ List.pmap f (x :: l₁✝) H₁ ~ List.pmap f (x :: l₂✝) H₂\n[PROOFSTEP]\nsimp [IH, Perm.cons]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nx y : α\nl✝ : List α\nH₁ : ∀ (a : α), a ∈ y :: x :: l✝ → p a\nH₂ : ∀ (a : α), a ∈ x :: y :: l✝ → p a\n⊢ List.pmap f (y :: x :: l✝) H₁ ~ List.pmap f (x :: y :: l✝) H₂\n[PROOFSTEP]\n\n| swap x y => simp [swap]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ : List α\nx y : α\nl✝ : List α\nH₁ : ∀ (a : α), a ∈ y :: x :: l✝ → p a\nH₂ : ∀ (a : α), a ∈ x :: y :: l✝ → p a\n⊢ List.pmap f (y :: x :: l✝) H₁ ~ List.pmap f (x :: y :: l✝) H₂\n[PROOFSTEP]\nsimp [swap]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\n_p₁ : l₁✝ ~ l₂✝\np₂ : l₂✝ ~ l₃✝\nIH₁ : ∀ {H₁ : ∀ (a : α), a ∈ l₁✝ → p a} {H₂ : ∀ (a : α), a ∈ l₂✝ → p a}, List.pmap f l₁✝ H₁ ~ List.pmap f l₂✝ H₂\nIH₂ : ∀ {H₁ : ∀ (a : α), a ∈ l₂✝ → p a} {H₂ : ∀ (a : α), a ∈ l₃✝ → p a}, List.pmap f l₂✝ H₁ ~ List.pmap f l₃✝ H₂\nH₁ : ∀ (a : α), a ∈ l₁✝ → p a\nH₂ : ∀ (a : α), a ∈ l₃✝ → p a\n⊢ List.pmap f l₁✝ H₁ ~ List.pmap f l₃✝ H₂\n[PROOFSTEP]\n\n| trans _p₁ p₂ IH₁ IH₂ =>\n  refine' IH₁.trans IH₂\n  exact fun a m => H₂ a (p₂.subset m)\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\n_p₁ : l₁✝ ~ l₂✝\np₂ : l₂✝ ~ l₃✝\nIH₁ : ∀ {H₁ : ∀ (a : α), a ∈ l₁✝ → p a} {H₂ : ∀ (a : α), a ∈ l₂✝ → p a}, List.pmap f l₁✝ H₁ ~ List.pmap f l₂✝ H₂\nIH₂ : ∀ {H₁ : ∀ (a : α), a ∈ l₂✝ → p a} {H₂ : ∀ (a : α), a ∈ l₃✝ → p a}, List.pmap f l₂✝ H₁ ~ List.pmap f l₃✝ H₂\nH₁ : ∀ (a : α), a ∈ l₁✝ → p a\nH₂ : ∀ (a : α), a ∈ l₃✝ → p a\n⊢ List.pmap f l₁✝ H₁ ~ List.pmap f l₃✝ H₂\n[PROOFSTEP]\nrefine' IH₁.trans IH₂\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\np : α → Prop\nf : (a : α) → p a → β\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\n_p₁ : l₁✝ ~ l₂✝\np₂ : l₂✝ ~ l₃✝\nIH₁ : ∀ {H₁ : ∀ (a : α), a ∈ l₁✝ → p a} {H₂ : ∀ (a : α), a ∈ l₂✝ → p a}, List.pmap f l₁✝ H₁ ~ List.pmap f l₂✝ H₂\nIH₂ : ∀ {H₁ : ∀ (a : α), a ∈ l₂✝ → p a} {H₂ : ∀ (a : α), a ∈ l₃✝ → p a}, List.pmap f l₂✝ H₁ ~ List.pmap f l₃✝ H₂\nH₁ : ∀ (a : α), a ∈ l₁✝ → p a\nH₂ : ∀ (a : α), a ∈ l₃✝ → p a\n⊢ ∀ (a : α), a ∈ l₂✝ → p a\n[PROOFSTEP]\nexact fun a m => H₂ a (p₂.subset m)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Bool\nl₁ l₂ : List α\ns : l₁ ~ l₂\n⊢ List.filter p l₁ ~ List.filter p l₂\n[PROOFSTEP]\nrw [← filterMap_eq_filter]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Bool\nl₁ l₂ : List α\ns : l₁ ~ l₂\n⊢ List.filterMap (Option.guard fun x => p x = true) l₁ ~ List.filterMap (Option.guard fun x => p x = true) l₂\n[PROOFSTEP]\napply s.filterMap _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nl : List α\n⊢ filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\n[PROOFSTEP]\ninduction' l with x l ih\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\n⊢ filter p [] ++ filter (fun x => decide ¬p x = true) [] ~ []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\n⊢ filter p (x :: l) ++ filter (fun x => decide ¬p x = true) (x :: l) ~ x :: l\n[PROOFSTEP]\nby_cases h : p x\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\nh : p x = true\n⊢ filter p (x :: l) ++ filter (fun x => decide ¬p x = true) (x :: l) ~ x :: l\n[PROOFSTEP]\nsimp only [h, filter_cons_of_pos, filter_cons_of_neg, not_true, not_false_iff, cons_append]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\nh : p x = true\n⊢ x :: (filter p l ++ filter (fun x => decide ¬p x = true) l) ~ x :: l\n[PROOFSTEP]\nexact ih.cons x\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\nh : ¬p x = true\n⊢ filter p (x :: l) ++ filter (fun x => decide ¬p x = true) (x :: l) ~ x :: l\n[PROOFSTEP]\nsimp only [h, filter_cons_of_neg, not_false_iff, filter_cons_of_pos]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\nh : ¬p x = true\n⊢ filter p l ++ x :: filter (fun x => decide ¬p x = true) l ~ x :: l\n[PROOFSTEP]\nrefine' Perm.trans _ (ih.cons x)\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nx : α\nl : List α\nih : filter p l ++ filter (fun x => decide ¬p x = true) l ~ l\nh : ¬p x = true\n⊢ filter p l ++ x :: filter (fun x => decide ¬p x = true) l ~\n    x :: (filter p l ++ filter (fun x => decide ¬p x = true) l)\n[PROOFSTEP]\nexact perm_append_comm.trans (perm_append_comm.cons _)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l₂' : List α\ns : l₁ <+ l₂\np : l₂ ~ l₂'\n⊢ ∃ l₁' x, l₁' <+ l₂'\n[PROOFSTEP]\ninduction p generalizing l₁ with\n| nil => exact ⟨[], eq_nil_of_sublist_nil s ▸ Perm.refl _, nil_sublist _⟩\n| cons x _ IH =>\n  cases' s with _ _ _ s l₁ _ _ s\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨l₁', p', s'.cons _⟩\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨x :: l₁', p'.cons x, s'.cons₂ _⟩\n| swap x y _ =>\n  cases' s with _ _ _ s l₁ _ _ s <;> cases' s with _ _ _ s l₁ _ _ s\n  · exact ⟨l₁, Perm.refl _, (s.cons _).cons _⟩\n  · exact ⟨x :: l₁, Perm.refl _, (s.cons _).cons₂ _⟩\n  · exact ⟨y :: l₁, Perm.refl _, (s.cons₂ _).cons _⟩\n  · exact ⟨x :: y :: l₁, Perm.swap _ _ _, (s.cons₂ _).cons₂ _⟩\n| trans _ _ IH₁ IH₂ =>\n  exact\n    let ⟨m₁, pm, sm⟩ := IH₁ s\n    let ⟨r₁, pr, sr⟩ := IH₂ sm\n    ⟨r₁, pr.trans pm, sr⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l₂' : List α\ns : l₁ <+ l₂\np : l₂ ~ l₂'\n⊢ ∃ l₁' x, l₁' <+ l₂'\n[PROOFSTEP]\ninduction p generalizing l₁ with\n| nil => exact ⟨[], eq_nil_of_sublist_nil s ▸ Perm.refl _, nil_sublist _⟩\n| cons x _ IH =>\n  cases' s with _ _ _ s l₁ _ _ s\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨l₁', p', s'.cons _⟩\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨x :: l₁', p'.cons x, s'.cons₂ _⟩\n| swap x y _ =>\n  cases' s with _ _ _ s l₁ _ _ s <;> cases' s with _ _ _ s l₁ _ _ s\n  · exact ⟨l₁, Perm.refl _, (s.cons _).cons _⟩\n  · exact ⟨x :: l₁, Perm.refl _, (s.cons _).cons₂ _⟩\n  · exact ⟨y :: l₁, Perm.refl _, (s.cons₂ _).cons _⟩\n  · exact ⟨x :: y :: l₁, Perm.swap _ _ _, (s.cons₂ _).cons₂ _⟩\n| trans _ _ IH₁ IH₂ =>\n  exact\n    let ⟨m₁, pm, sm⟩ := IH₁ s\n    let ⟨r₁, pr, sr⟩ := IH₂ sm\n    ⟨r₁, pr.trans pm, sr⟩\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' l₁ : List α\ns : l₁ <+ []\n⊢ ∃ l₁' x, l₁' <+ []\n[PROOFSTEP]\n\n| nil => exact ⟨[], eq_nil_of_sublist_nil s ▸ Perm.refl _, nil_sublist _⟩\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' l₁ : List α\ns : l₁ <+ []\n⊢ ∃ l₁' x, l₁' <+ []\n[PROOFSTEP]\nexact ⟨[], eq_nil_of_sublist_nil s ▸ Perm.refl _, nil_sublist _⟩\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nIH : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nl₁ : List α\ns : l₁ <+ x :: l₁✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: l₂✝\n[PROOFSTEP]\n\n| cons x _ IH =>\n  cases' s with _ _ _ s l₁ _ _ s\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨l₁', p', s'.cons _⟩\n  ·\n    exact\n      let ⟨l₁', p', s'⟩ := IH s\n      ⟨x :: l₁', p'.cons x, s'.cons₂ _⟩\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nIH : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nl₁ : List α\ns : l₁ <+ x :: l₁✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: l₂✝\n[PROOFSTEP]\ncases' s with _ _ _ s l₁ _ _ s\n[GOAL]\ncase cons.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nIH : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nl₁ : List α\ns : l₁ <+ l₁✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: l₂✝\n[PROOFSTEP]\nexact\n  let ⟨l₁', p', s'⟩ := IH s\n  ⟨l₁', p', s'.cons _⟩\n[GOAL]\ncase cons.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nIH : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nl₁ : List α\ns : l₁ <+ l₁✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: l₂✝\n[PROOFSTEP]\nexact\n  let ⟨l₁', p', s'⟩ := IH s\n  ⟨x :: l₁', p'.cons x, s'.cons₂ _⟩\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ y :: x :: l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\n\n| swap x y _ =>\n  cases' s with _ _ _ s l₁ _ _ s <;> cases' s with _ _ _ s l₁ _ _ s\n  · exact ⟨l₁, Perm.refl _, (s.cons _).cons _⟩\n  · exact ⟨x :: l₁, Perm.refl _, (s.cons _).cons₂ _⟩\n  · exact ⟨y :: l₁, Perm.refl _, (s.cons₂ _).cons _⟩\n  · exact ⟨x :: y :: l₁, Perm.swap _ _ _, (s.cons₂ _).cons₂ _⟩\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ y :: x :: l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\ncases' s with _ _ _ s l₁ _ _ s\n[GOAL]\ncase swap.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ x :: l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\ncases' s with _ _ _ s l₁ _ _ s\n[GOAL]\ncase swap.cons₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ x :: l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\ncases' s with _ _ _ s l₁ _ _ s\n[GOAL]\ncase swap.cons.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\nexact ⟨l₁, Perm.refl _, (s.cons _).cons _⟩\n[GOAL]\ncase swap.cons.cons₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\nexact ⟨x :: l₁, Perm.refl _, (s.cons _).cons₂ _⟩\n[GOAL]\ncase swap.cons₂.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\nexact ⟨y :: l₁, Perm.refl _, (s.cons₂ _).cons _⟩\n[GOAL]\ncase swap.cons₂.cons₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₂ l₂' : List α\nx y : α\nl✝ l₁ : List α\ns : l₁ <+ l✝\n⊢ ∃ l₁' x_1, l₁' <+ x :: y :: l✝\n[PROOFSTEP]\nexact ⟨x :: y :: l₁, Perm.swap _ _ _, (s.cons₂ _).cons₂ _⟩\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nIH₁ : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nIH₂ : ∀ {l₁ : List α}, l₁ <+ l₂✝ → ∃ l₁' x, l₁' <+ l₃✝\nl₁ : List α\ns : l₁ <+ l₁✝\n⊢ ∃ l₁' x, l₁' <+ l₃✝\n[PROOFSTEP]\n\n| trans _ _ IH₁ IH₂ =>\n  exact\n    let ⟨m₁, pm, sm⟩ := IH₁ s\n    let ⟨r₁, pr, sr⟩ := IH₂ sm\n    ⟨r₁, pr.trans pm, sr⟩\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₂ l₂' l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nIH₁ : ∀ {l₁ : List α}, l₁ <+ l₁✝ → ∃ l₁' x, l₁' <+ l₂✝\nIH₂ : ∀ {l₁ : List α}, l₁ <+ l₂✝ → ∃ l₁' x, l₁' <+ l₃✝\nl₁ : List α\ns : l₁ <+ l₁✝\n⊢ ∃ l₁' x, l₁' <+ l₃✝\n[PROOFSTEP]\nexact\n  let ⟨m₁, pm, sm⟩ := IH₁ s\n  let ⟨r₁, pr, sr⟩ := IH₂ sm\n  ⟨r₁, pr.trans pm, sr⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nh : l₁ ~ l₂\n⊢ sizeOf l₁ = sizeOf l₂\n[PROOFSTEP]\ninduction h with\n  -- hd l₁ l₂ h₁₂ h_sz₁₂ a b l l₁ l₂ l₃ h₁₂ h₂₃ h_sz₁₂ h_sz₂₃\n| nil => rfl\n| cons _ _ h_sz₁₂ => simp [h_sz₁₂]\n| swap => simp [add_left_comm]\n| trans _ _ h_sz₁₂ h_sz₂₃ => simp [h_sz₁₂, h_sz₂₃]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nh : l₁ ~ l₂\n⊢ sizeOf l₁ = sizeOf l₂\n[PROOFSTEP]\ninduction h with\n  -- hd l₁ l₂ h₁₂ h_sz₁₂ a b l l₁ l₂ l₃ h₁₂ h₂₃ h_sz₁₂ h_sz₂₃\n| nil => rfl\n| cons _ _ h_sz₁₂ => simp [h_sz₁₂]\n| swap => simp [add_left_comm]\n| trans _ _ h_sz₁₂ h_sz₂₃ => simp [h_sz₁₂, h_sz₂₃]\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\n⊢ sizeOf [] = sizeOf []\n[PROOFSTEP]\n\n| nil => rfl\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\n⊢ sizeOf [] = sizeOf []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nh_sz₁₂ : sizeOf l₁✝ = sizeOf l₂✝\n⊢ sizeOf (x✝ :: l₁✝) = sizeOf (x✝ :: l₂✝)\n[PROOFSTEP]\n\n| cons _ _ h_sz₁₂ => simp [h_sz₁₂]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nh_sz₁₂ : sizeOf l₁✝ = sizeOf l₂✝\n⊢ sizeOf (x✝ :: l₁✝) = sizeOf (x✝ :: l₂✝)\n[PROOFSTEP]\nsimp [h_sz₁₂]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nx✝ y✝ : α\nl✝ : List α\n⊢ sizeOf (y✝ :: x✝ :: l✝) = sizeOf (x✝ :: y✝ :: l✝)\n[PROOFSTEP]\n\n| swap => simp [add_left_comm]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : SizeOf α\nl₁ l₂ : List α\nx✝ y✝ : α\nl✝ : List α\n⊢ sizeOf (y✝ :: x✝ :: l✝) = sizeOf (x✝ :: y✝ :: l✝)\n[PROOFSTEP]\nsimp [add_left_comm]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : SizeOf α\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nh_sz₁₂ : sizeOf l₁✝ = sizeOf l₂✝\nh_sz₂₃ : sizeOf l₂✝ = sizeOf l₃✝\n⊢ sizeOf l₁✝ = sizeOf l₃✝\n[PROOFSTEP]\n\n| trans _ _ h_sz₁₂ h_sz₂₃ => simp [h_sz₁₂, h_sz₂₃]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : SizeOf α\nl₁ l₂ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nh_sz₁₂ : sizeOf l₁✝ = sizeOf l₂✝\nh_sz₂₃ : sizeOf l₂✝ = sizeOf l₃✝\n⊢ sizeOf l₁✝ = sizeOf l₃✝\n[PROOFSTEP]\nsimp [h_sz₁₂, h_sz₂₃]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\n⊢ Perm ∘r Perm = Perm\n[PROOFSTEP]\nfunext a c\n[GOAL]\ncase h.h\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\na c : List α\n⊢ (Perm ∘r Perm) a c = (a ~ c)\n[PROOFSTEP]\napply propext\n[GOAL]\ncase h.h.a\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\na c : List α\n⊢ (Perm ∘r Perm) a c ↔ a ~ c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.a.mp\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\na c : List α\n⊢ (Perm ∘r Perm) a c → a ~ c\n[PROOFSTEP]\nexact fun ⟨b, hab, hba⟩ => Perm.trans hab hba\n[GOAL]\ncase h.h.a.mpr\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\na c : List α\n⊢ a ~ c → (Perm ∘r Perm) a c\n[PROOFSTEP]\nexact fun h => ⟨a, Perm.refl a, h⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nv : List β\nhlu : l ~ u\nhuv : Forall₂ r u v\n⊢ (Forall₂ r ∘r Perm) l v\n[PROOFSTEP]\ninduction hlu generalizing v\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nv : List β\nhuv : Forall₂ r [] v\n⊢ (Forall₂ r ∘r Perm) [] v\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\nv : List β\nhuv : Forall₂ r (x✝ :: l₂✝) v\n⊢ (Forall₂ r ∘r Perm) (x✝ :: l₁✝) v\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nx✝ y✝ : α\nl✝ : List α\nv : List β\nhuv : Forall₂ r (x✝ :: y✝ :: l✝) v\n⊢ (Forall₂ r ∘r Perm) (y✝ :: x✝ :: l✝) v\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\na_ih✝ : ∀ {v : List β}, Forall₂ r l₃✝ v → (Forall₂ r ∘r Perm) l₂✝ v\nv : List β\nhuv : Forall₂ r l₃✝ v\n⊢ (Forall₂ r ∘r Perm) l₁✝ v\n[PROOFSTEP]\ncase nil => cases huv; exact ⟨[], Forall₂.nil, Perm.nil⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nv : List β\nhuv : Forall₂ r [] v\n⊢ (Forall₂ r ∘r Perm) [] v\n[PROOFSTEP]\ncase nil => cases huv; exact ⟨[], Forall₂.nil, Perm.nil⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nv : List β\nhuv : Forall₂ r [] v\n⊢ (Forall₂ r ∘r Perm) [] v\n[PROOFSTEP]\ncases huv\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\n⊢ (Forall₂ r ∘r Perm) [] []\n[PROOFSTEP]\nexact ⟨[], Forall₂.nil, Perm.nil⟩\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\nv : List β\nhuv : Forall₂ r (x✝ :: l₂✝) v\n⊢ (Forall₂ r ∘r Perm) (x✝ :: l₁✝) v\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nx✝ y✝ : α\nl✝ : List α\nv : List β\nhuv : Forall₂ r (x✝ :: y✝ :: l✝) v\n⊢ (Forall₂ r ∘r Perm) (y✝ :: x✝ :: l✝) v\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\na_ih✝ : ∀ {v : List β}, Forall₂ r l₃✝ v → (Forall₂ r ∘r Perm) l₂✝ v\nv : List β\nhuv : Forall₂ r l₃✝ v\n⊢ (Forall₂ r ∘r Perm) l₁✝ v\n[PROOFSTEP]\ncase cons a l u _hlu ih =>\n  cases' huv with _ b _ v hab huv'\n  rcases ih huv' with ⟨l₂, h₁₂, h₂₃⟩\n  exact ⟨b :: l₂, Forall₂.cons hab h₁₂, h₂₃.cons _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl✝ u✝ : List α\na : α\nl u : List α\n_hlu : l ~ u\nih : ∀ {v : List β}, Forall₂ r u v → (Forall₂ r ∘r Perm) l v\nv : List β\nhuv : Forall₂ r (a :: u) v\n⊢ (Forall₂ r ∘r Perm) (a :: l) v\n[PROOFSTEP]\ncase cons a l u _hlu ih =>\n  cases' huv with _ b _ v hab huv'\n  rcases ih huv' with ⟨l₂, h₁₂, h₂₃⟩\n  exact ⟨b :: l₂, Forall₂.cons hab h₁₂, h₂₃.cons _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl✝ u✝ : List α\na : α\nl u : List α\n_hlu : l ~ u\nih : ∀ {v : List β}, Forall₂ r u v → (Forall₂ r ∘r Perm) l v\nv : List β\nhuv : Forall₂ r (a :: u) v\n⊢ (Forall₂ r ∘r Perm) (a :: l) v\n[PROOFSTEP]\ncases' huv with _ b _ v hab huv'\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl✝ u✝ : List α\na : α\nl u : List α\n_hlu : l ~ u\nih : ∀ {v : List β}, Forall₂ r u v → (Forall₂ r ∘r Perm) l v\nb : β\nv : List β\nhab : r a b\nhuv' : Forall₂ r u v\n⊢ (Forall₂ r ∘r Perm) (a :: l) (b :: v)\n[PROOFSTEP]\nrcases ih huv' with ⟨l₂, h₁₂, h₂₃⟩\n[GOAL]\ncase cons.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl✝ u✝ : List α\na : α\nl u : List α\n_hlu : l ~ u\nih : ∀ {v : List β}, Forall₂ r u v → (Forall₂ r ∘r Perm) l v\nb : β\nv : List β\nhab : r a b\nhuv' : Forall₂ r u v\nl₂ : List β\nh₁₂ : Forall₂ r l l₂\nh₂₃ : l₂ ~ v\n⊢ (Forall₂ r ∘r Perm) (a :: l) (b :: v)\n[PROOFSTEP]\nexact ⟨b :: l₂, Forall₂.cons hab h₁₂, h₂₃.cons _⟩\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\nx✝ y✝ : α\nl✝ : List α\nv : List β\nhuv : Forall₂ r (x✝ :: y✝ :: l✝) v\n⊢ (Forall₂ r ∘r Perm) (y✝ :: x✝ :: l✝) v\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\na_ih✝ : ∀ {v : List β}, Forall₂ r l₃✝ v → (Forall₂ r ∘r Perm) l₂✝ v\nv : List β\nhuv : Forall₂ r l₃✝ v\n⊢ (Forall₂ r ∘r Perm) l₁✝ v\n[PROOFSTEP]\ncase swap a₁ a₂ h₂₃ =>\n  cases' huv with _ b₁ _ l₂ h₁ hr₂₃\n  cases' hr₂₃ with _ b₂ _ l₂ h₂ h₁₂\n  exact ⟨b₂ :: b₁ :: l₂, Forall₂.cons h₂ (Forall₂.cons h₁ h₁₂), Perm.swap _ _ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\na₁ a₂ : α\nh₂₃ : List α\nv : List β\nhuv : Forall₂ r (a₁ :: a₂ :: h₂₃) v\n⊢ (Forall₂ r ∘r Perm) (a₂ :: a₁ :: h₂₃) v\n[PROOFSTEP]\ncase swap a₁ a₂ h₂₃ =>\n  cases' huv with _ b₁ _ l₂ h₁ hr₂₃\n  cases' hr₂₃ with _ b₂ _ l₂ h₂ h₁₂\n  exact ⟨b₂ :: b₁ :: l₂, Forall₂.cons h₂ (Forall₂.cons h₁ h₁₂), Perm.swap _ _ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\na₁ a₂ : α\nh₂₃ : List α\nv : List β\nhuv : Forall₂ r (a₁ :: a₂ :: h₂₃) v\n⊢ (Forall₂ r ∘r Perm) (a₂ :: a₁ :: h₂₃) v\n[PROOFSTEP]\ncases' huv with _ b₁ _ l₂ h₁ hr₂₃\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\na₁ a₂ : α\nh₂₃ : List α\nb₁ : β\nl₂ : List β\nh₁ : r a₁ b₁\nhr₂₃ : Forall₂ r (a₂ :: h₂₃) l₂\n⊢ (Forall₂ r ∘r Perm) (a₂ :: a₁ :: h₂₃) (b₁ :: l₂)\n[PROOFSTEP]\ncases' hr₂₃ with _ b₂ _ l₂ h₂ h₁₂\n[GOAL]\ncase cons.cons\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u : List α\na₁ a₂ : α\nh₂₃ : List α\nb₁ : β\nh₁ : r a₁ b₁\nb₂ : β\nl₂ : List β\nh₂ : r a₂ b₂\nh₁₂ : Forall₂ r h₂₃ l₂\n⊢ (Forall₂ r ∘r Perm) (a₂ :: a₁ :: h₂₃) (b₁ :: b₂ :: l₂)\n[PROOFSTEP]\nexact ⟨b₂ :: b₁ :: l₂, Forall₂.cons h₂ (Forall₂.cons h₁ h₁₂), Perm.swap _ _ _⟩\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ {v : List β}, Forall₂ r l₂✝ v → (Forall₂ r ∘r Perm) l₁✝ v\na_ih✝ : ∀ {v : List β}, Forall₂ r l₃✝ v → (Forall₂ r ∘r Perm) l₂✝ v\nv : List β\nhuv : Forall₂ r l₃✝ v\n⊢ (Forall₂ r ∘r Perm) l₁✝ v\n[PROOFSTEP]\ncase trans la₁ la₂ la₃ _ _ ih₁ ih₂ =>\n  rcases ih₂ huv with ⟨lb₂, hab₂, h₂₃⟩\n  rcases ih₁ hab₂ with ⟨lb₁, hab₁, h₁₂⟩\n  exact ⟨lb₁, hab₁, Perm.trans h₁₂ h₂₃⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u la₁ la₂ la₃ : List α\na✝¹ : la₁ ~ la₂\na✝ : la₂ ~ la₃\nih₁ : ∀ {v : List β}, Forall₂ r la₂ v → (Forall₂ r ∘r Perm) la₁ v\nih₂ : ∀ {v : List β}, Forall₂ r la₃ v → (Forall₂ r ∘r Perm) la₂ v\nv : List β\nhuv : Forall₂ r la₃ v\n⊢ (Forall₂ r ∘r Perm) la₁ v\n[PROOFSTEP]\ncase trans la₁ la₂ la₃ _ _ ih₁ ih₂ =>\n  rcases ih₂ huv with ⟨lb₂, hab₂, h₂₃⟩\n  rcases ih₁ hab₂ with ⟨lb₁, hab₁, h₁₂⟩\n  exact ⟨lb₁, hab₁, Perm.trans h₁₂ h₂₃⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u la₁ la₂ la₃ : List α\na✝¹ : la₁ ~ la₂\na✝ : la₂ ~ la₃\nih₁ : ∀ {v : List β}, Forall₂ r la₂ v → (Forall₂ r ∘r Perm) la₁ v\nih₂ : ∀ {v : List β}, Forall₂ r la₃ v → (Forall₂ r ∘r Perm) la₂ v\nv : List β\nhuv : Forall₂ r la₃ v\n⊢ (Forall₂ r ∘r Perm) la₁ v\n[PROOFSTEP]\nrcases ih₂ huv with ⟨lb₂, hab₂, h₂₃⟩\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u la₁ la₂ la₃ : List α\na✝¹ : la₁ ~ la₂\na✝ : la₂ ~ la₃\nih₁ : ∀ {v : List β}, Forall₂ r la₂ v → (Forall₂ r ∘r Perm) la₁ v\nih₂ : ∀ {v : List β}, Forall₂ r la₃ v → (Forall₂ r ∘r Perm) la₂ v\nv : List β\nhuv : Forall₂ r la₃ v\nlb₂ : List β\nhab₂ : Forall₂ r la₂ lb₂\nh₂₃ : lb₂ ~ v\n⊢ (Forall₂ r ∘r Perm) la₁ v\n[PROOFSTEP]\nrcases ih₁ hab₂ with ⟨lb₁, hab₁, h₁₂⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl u la₁ la₂ la₃ : List α\na✝¹ : la₁ ~ la₂\na✝ : la₂ ~ la₃\nih₁ : ∀ {v : List β}, Forall₂ r la₂ v → (Forall₂ r ∘r Perm) la₁ v\nih₂ : ∀ {v : List β}, Forall₂ r la₃ v → (Forall₂ r ∘r Perm) la₂ v\nv : List β\nhuv : Forall₂ r la₃ v\nlb₂ : List β\nhab₂ : Forall₂ r la₂ lb₂\nh₂₃ : lb₂ ~ v\nlb₁ : List β\nhab₁ : Forall₂ r la₁ lb₁\nh₁₂ : lb₁ ~ lb₂\n⊢ (Forall₂ r ∘r Perm) la₁ v\n[PROOFSTEP]\nexact ⟨lb₁, hab₁, Perm.trans h₁₂ h₂₃⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\n⊢ Forall₂ r ∘r Perm = Perm ∘r Forall₂ r\n[PROOFSTEP]\nfunext l₁ l₃\n[GOAL]\ncase h.h\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ : List β\n⊢ (Forall₂ r ∘r Perm) l₁ l₃ = (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\napply propext\n[GOAL]\ncase h.h.a\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ : List β\n⊢ (Forall₂ r ∘r Perm) l₁ l₃ ↔ (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h.a.mp\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ : List β\n⊢ (Forall₂ r ∘r Perm) l₁ l₃ → (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.h.a.mp\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ : List β\nh : (Forall₂ r ∘r Perm) l₁ l₃\n⊢ (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nrcases h with ⟨l₂, h₁₂, h₂₃⟩\n[GOAL]\ncase h.h.a.mp.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ l₂ : List β\nh₁₂ : Forall₂ r l₁ l₂\nh₂₃ : l₂ ~ l₃\n⊢ (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nhave : Forall₂ (flip r) l₂ l₁ := h₁₂.flip\n[GOAL]\ncase h.h.a.mp.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ l₂ : List β\nh₁₂ : Forall₂ r l₁ l₂\nh₂₃ : l₂ ~ l₃\nthis : Forall₂ (flip r) l₂ l₁\n⊢ (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nrcases perm_comp_forall₂ h₂₃.symm this with ⟨l', h₁, h₂⟩\n[GOAL]\ncase h.h.a.mp.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ l₂ : List β\nh₁₂ : Forall₂ r l₁ l₂\nh₂₃ : l₂ ~ l₃\nthis : Forall₂ (flip r) l₂ l₁\nl' : List α\nh₁ : Forall₂ (flip r) l₃ l'\nh₂ : l' ~ l₁\n⊢ (Perm ∘r Forall₂ r) l₁ l₃\n[PROOFSTEP]\nexact ⟨l', h₂.symm, h₁.flip⟩\n[GOAL]\ncase h.h.a.mpr\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nl₁ : List α\nl₃ : List β\n⊢ (Perm ∘r Forall₂ r) l₁ l₃ → (Forall₂ r ∘r Perm) l₁ l₃\n[PROOFSTEP]\nexact fun ⟨l₂, h₁₂, h₂₃⟩ => perm_comp_forall₂ h₁₂ h₂₃\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nγ : Type u_1\nδ : Type u_2\nr : α → β → Prop\np : γ → δ → Prop\nhr : RightUnique r\na : List α\nb : List β\nh₁ : Forall₂ r a b\nc : List α\nd : List β\nh₂ : Forall₂ r c d\nh : a ~ c\nthis : (flip (Forall₂ r) ∘r Perm ∘r Forall₂ r) b d\n⊢ ((flip (Forall₂ r) ∘r Forall₂ r) ∘r Perm) b d\n[PROOFSTEP]\nrwa [← forall₂_comp_perm_eq_perm_comp_forall₂, ← Relation.comp_assoc] at this \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\n⊢ [] <+ l\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nl l' : List α\nh : l <+~ l'\n⊢ List.filter p l <+~ List.filter p l'\n[PROOFSTEP]\nobtain ⟨xs, hp, h⟩ := h\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : α → Bool\nl l' xs : List α\nhp : xs ~ l\nh : xs <+ l'\n⊢ List.filter p l <+~ List.filter p l'\n[PROOFSTEP]\nexact ⟨_, hp.filter p, h.filter p⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Bool\nl₁ l₂ : List α\ns : l₁ ~ l₂\n⊢ countp p l₁ = countp p l₂\n[PROOFSTEP]\nrw [countp_eq_length_filter, countp_eq_length_filter]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\np : α → Bool\nl₁ l₂ : List α\ns : l₁ ~ l₂\n⊢ length (List.filter p l₁) = length (List.filter p l₂)\n[PROOFSTEP]\nexact (s.filter _).length_eq\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ns : l₁ ~ l₂\np p' : α → Bool\nhp : ∀ (x : α), x ∈ l₁ → p x = p' x\n⊢ countp p l₁ = countp p' l₂\n[PROOFSTEP]\nrw [← s.countp_eq p']\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ns : l₁ ~ l₂\np p' : α → Bool\nhp : ∀ (x : α), x ∈ l₁ → p x = p' x\n⊢ countp p l₁ = countp p' l₁\n[PROOFSTEP]\nclear s\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np p' : α → Bool\nhp : ∀ (x : α), x ∈ l₁ → p x = p' x\n⊢ countp p l₁ = countp p' l₁\n[PROOFSTEP]\ninduction' l₁ with y s hs\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np p' : α → Bool\nhp✝ : ∀ (x : α), x ∈ l₁ → p x = p' x\nhp : ∀ (x : α), x ∈ [] → p x = p' x\n⊢ countp p [] = countp p' []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np p' : α → Bool\nhp✝ : ∀ (x : α), x ∈ l₁ → p x = p' x\ny : α\ns : List α\nhs : (∀ (x : α), x ∈ s → p x = p' x) → countp p s = countp p' s\nhp : ∀ (x : α), x ∈ y :: s → p x = p' x\n⊢ countp p (y :: s) = countp p' (y :: s)\n[PROOFSTEP]\nsimp only [mem_cons, forall_eq_or_imp] at hp \n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np p' : α → Bool\nhp✝ : ∀ (x : α), x ∈ l₁ → p x = p' x\ny : α\ns : List α\nhs : (∀ (x : α), x ∈ s → p x = p' x) → countp p s = countp p' s\nhp : p y = p' y ∧ ∀ (a : α), a ∈ s → p a = p' a\n⊢ countp p (y :: s) = countp p' (y :: s)\n[PROOFSTEP]\nsimp only [countp_cons, hs hp.2, hp.1]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\np q : α → Bool\n⊢ countp p l = countp p (filter q l) + countp p (filter (fun a => decide ¬q a = true) l)\n[PROOFSTEP]\nrw [← countp_append]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\np q : α → Bool\n⊢ countp p l = countp p (filter q l ++ filter (fun a => decide ¬q a = true) l)\n[PROOFSTEP]\nexact Perm.countp_eq _ (filter_append_perm _ _).symm\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : β → α → β\nl₁ l₂ : List α\np : l₁ ~ l₂\nx y : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr :\n  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →\n    ∀ (b : β), foldl f b t₁ = foldl f b t₂\nH : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1\nb : β\n⊢ foldl f b (y :: x :: t₁) = foldl f b (x :: y :: t₂)\n[PROOFSTEP]\nsimp only [foldl]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : β → α → β\nl₁ l₂ : List α\np : l₁ ~ l₂\nx y : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr :\n  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →\n    ∀ (b : β), foldl f b t₁ = foldl f b t₂\nH : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1\nb : β\n⊢ foldl f (f (f b y) x) t₁ = foldl f (f (f b x) y) t₂\n[PROOFSTEP]\nrw [H x (.tail _ <| .head _) y (.head _)]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : β → α → β\nl₁ l₂ : List α\np : l₁ ~ l₂\nx y : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr :\n  (∀ (x : α), x ∈ t₁ → ∀ (y : α), y ∈ t₁ → ∀ (z : β), f (f z x) y = f (f z y) x) →\n    ∀ (b : β), foldl f b t₁ = foldl f b t₂\nH : ∀ (x_1 : α), x_1 ∈ y :: x :: t₁ → ∀ (y_1 : α), y_1 ∈ y :: x :: t₁ → ∀ (z : β), f (f z x_1) y_1 = f (f z y_1) x_1\nb : β\n⊢ foldl f (f (f b y) x) t₁ = foldl f (f (f b y) x) t₂\n[PROOFSTEP]\nexact r (fun x hx y hy => H _ (.tail _ <| .tail _ hx) _ (.tail _ <| .tail _ hy)) _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → β → β\nl₁ l₂ : List α\nlcomm : LeftCommutative f\np : l₁ ~ l₂\nx : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr : ∀ (b : β), foldr f b t₁ = foldr f b t₂\nb : β\n⊢ foldr f b (x :: t₁) = foldr f b (x :: t₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → β → β\nl₁ l₂ : List α\nlcomm : LeftCommutative f\np : l₁ ~ l₂\nx : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr : ∀ (b : β), foldr f b t₁ = foldr f b t₂\nb : β\n⊢ f x (foldr f b t₁) = f x (foldr f b t₂)\n[PROOFSTEP]\nrw [r b]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → β → β\nl₁ l₂ : List α\nlcomm : LeftCommutative f\np : l₁ ~ l₂\nx y : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr : ∀ (b : β), foldr f b t₁ = foldr f b t₂\nb : β\n⊢ foldr f b (y :: x :: t₁) = foldr f b (x :: y :: t₂)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → β → β\nl₁ l₂ : List α\nlcomm : LeftCommutative f\np : l₁ ~ l₂\nx y : α\nt₁ t₂ : List α\n_p : t₁ ~ t₂\nr : ∀ (b : β), foldr f b t₁ = foldr f b t₂\nb : β\n⊢ f y (f x (foldr f b t₁)) = f x (f y (foldr f b t₂))\n[PROOFSTEP]\nrw [lcomm, r b]\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nhl : l ~ l'\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\n⊢ HEq (List.rec b f l) (List.rec b f l')\n[PROOFSTEP]\ninduction hl\n[GOAL]\ncase nil\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\n⊢ HEq (List.rec b f []) (List.rec b f [])\ncase cons\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\n⊢ HEq (List.rec b f (x✝ :: l₁✝)) (List.rec b f (x✝ :: l₂✝))\ncase swap\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nx✝ y✝ : α\nl✝ : List α\n⊢ HEq (List.rec b f (y✝ :: x✝ :: l✝)) (List.rec b f (x✝ :: y✝ :: l✝))\ncase trans\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\na_ih✝ : HEq (List.rec b f l₂✝) (List.rec b f l₃✝)\n⊢ HEq (List.rec b f l₁✝) (List.rec b f l₃✝)\n[PROOFSTEP]\ncase nil => rfl\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\n⊢ HEq (List.rec b f []) (List.rec b f [])\n[PROOFSTEP]\ncase nil => rfl\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\n⊢ HEq (List.rec b f []) (List.rec b f [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\n⊢ HEq (List.rec b f (x✝ :: l₁✝)) (List.rec b f (x✝ :: l₂✝))\ncase swap\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nx✝ y✝ : α\nl✝ : List α\n⊢ HEq (List.rec b f (y✝ :: x✝ :: l✝)) (List.rec b f (x✝ :: y✝ :: l✝))\ncase trans\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\na_ih✝ : HEq (List.rec b f l₂✝) (List.rec b f l₃✝)\n⊢ HEq (List.rec b f l₁✝) (List.rec b f l₃✝)\n[PROOFSTEP]\ncase cons a l l' h ih => exact f_congr h ih\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl✝ l'✝ : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\na : α\nl l' : List α\nh : l ~ l'\nih : HEq (List.rec b f l) (List.rec b f l')\n⊢ HEq (List.rec b f (a :: l)) (List.rec b f (a :: l'))\n[PROOFSTEP]\ncase cons a l l' h ih => exact f_congr h ih\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl✝ l'✝ : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\na : α\nl l' : List α\nh : l ~ l'\nih : HEq (List.rec b f l) (List.rec b f l')\n⊢ HEq (List.rec b f (a :: l)) (List.rec b f (a :: l'))\n[PROOFSTEP]\nexact f_congr h ih\n[GOAL]\ncase swap\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nx✝ y✝ : α\nl✝ : List α\n⊢ HEq (List.rec b f (y✝ :: x✝ :: l✝)) (List.rec b f (x✝ :: y✝ :: l✝))\ncase trans\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\na_ih✝ : HEq (List.rec b f l₂✝) (List.rec b f l₃✝)\n⊢ HEq (List.rec b f l₁✝) (List.rec b f l₃✝)\n[PROOFSTEP]\ncase swap a a' l => exact f_swap\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl✝ l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\na a' : α\nl : List α\n⊢ HEq (List.rec b f (a' :: a :: l)) (List.rec b f (a :: a' :: l))\n[PROOFSTEP]\ncase swap a a' l => exact f_swap\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl✝ l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\na a' : α\nl : List α\n⊢ HEq (List.rec b f (a' :: a :: l)) (List.rec b f (a :: a' :: l))\n[PROOFSTEP]\nexact f_swap\n[GOAL]\ncase trans\nα : Type uu\nβ✝ : Type vv\nl₁ l₂ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : HEq (List.rec b f l₁✝) (List.rec b f l₂✝)\na_ih✝ : HEq (List.rec b f l₂✝) (List.rec b f l₃✝)\n⊢ HEq (List.rec b f l₁✝) (List.rec b f l₃✝)\n[PROOFSTEP]\ncase trans l₁ l₂ l₃ _h₁ _h₂ ih₁ ih₂ => exact HEq.trans ih₁ ih₂\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁✝ l₂✝ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁ l₂ l₃ : List α\n_h₁ : l₁ ~ l₂\n_h₂ : l₂ ~ l₃\nih₁ : HEq (List.rec b f l₁) (List.rec b f l₂)\nih₂ : HEq (List.rec b f l₂) (List.rec b f l₃)\n⊢ HEq (List.rec b f l₁) (List.rec b f l₃)\n[PROOFSTEP]\ncase trans l₁ l₂ l₃ _h₁ _h₂ ih₁ ih₂ => exact HEq.trans ih₁ ih₂\n[GOAL]\nα : Type uu\nβ✝ : Type vv\nl₁✝ l₂✝ : List α\nβ : List α → Sort u_1\nf : (a : α) → (l : List α) → β l → β (a :: l)\nb : β []\nl l' : List α\nf_congr : ∀ {a : α} {l l' : List α} {b : β l} {b' : β l'}, l ~ l' → HEq b b' → HEq (f a l b) (f a l' b')\nf_swap : ∀ {a a' : α} {l : List α} {b : β l}, HEq (f a (a' :: l) (f a' l b)) (f a' (a :: l) (f a l b))\nl₁ l₂ l₃ : List α\n_h₁ : l₁ ~ l₂\n_h₂ : l₂ ~ l₃\nih₁ : HEq (List.rec b f l₁) (List.rec b f l₂)\nih₂ : HEq (List.rec b f l₂) (List.rec b f l₃)\n⊢ HEq (List.rec b f l₁) (List.rec b f l₃)\n[PROOFSTEP]\nexact HEq.trans ih₁ ih₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ prod l₁ = prod l₂\n[PROOFSTEP]\nrefine h.foldl_eq' ?_ _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ ∀ (x : α), x ∈ l₁ → ∀ (y : α), y ∈ l₁ → ∀ (z : α), z * x * y = z * y * x\n[PROOFSTEP]\napply Pairwise.forall_of_forall\n[GOAL]\ncase H\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ Symmetric fun x y => ∀ (z : α), z * x * y = z * y * x\n[PROOFSTEP]\nintro x y h z\n[GOAL]\ncase H\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh✝ : l₁ ~ l₂\nhc : Pairwise Commute l₁\nx y : α\nh : ∀ (z : α), z * x * y = z * y * x\nz : α\n⊢ z * y * x = z * x * y\n[PROOFSTEP]\nexact (h z).symm\n[GOAL]\ncase H₁\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ ∀ (x : α), x ∈ l₁ → ∀ (z : α), z * x * x = z * x * x\n[PROOFSTEP]\nintros\n[GOAL]\ncase H₁\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\nx✝ : α\na✝ : x✝ ∈ l₁\nz✝ : α\n⊢ z✝ * x✝ * x✝ = z✝ * x✝ * x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ Pairwise (fun x y => ∀ (z : α), z * x * y = z * y * x) l₁\n[PROOFSTEP]\napply hc.imp\n[GOAL]\ncase H₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh : l₁ ~ l₂\nhc : Pairwise Commute l₁\n⊢ ∀ {a b : α}, Commute a b → ∀ (z : α), z * a * b = z * b * a\n[PROOFSTEP]\nintro a b h z\n[GOAL]\ncase H₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nM : Monoid α\nl₁ l₂ : List α\nh✝ : l₁ ~ l₂\nhc : Pairwise Commute l₁\na b : α\nh : Commute a b\nz : α\n⊢ z * a * b = z * b * a\n[PROOFSTEP]\nrw [mul_assoc z, mul_assoc z, h]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ r₁ r₂ : List α\n⊢ l₁ ++ a :: r₁ ~ l₂ ++ a :: r₂ → l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\ngeneralize e₁ : l₁ ++ a :: r₁ = s₁\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ r₁ r₂ s₁ : List α\ne₁ : l₁ ++ a :: r₁ = s₁\n⊢ s₁ ~ l₂ ++ a :: r₂ → l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\ngeneralize e₂ : l₂ ++ a :: r₂ = s₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ r₁ r₂ s₁ : List α\ne₁ : l₁ ++ a :: r₁ = s₁\ns₂ : List α\ne₂ : l₂ ++ a :: r₂ = s₂\n⊢ s₁ ~ s₂ → l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nintro p\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ r₁ r₂ s₁ : List α\ne₁ : l₁ ++ a :: r₁ = s₁\ns₂ : List α\ne₂ : l₂ ++ a :: r₂ = s₂\np : s₁ ~ s₂\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrevert l₁ l₂ r₁ r₂ e₁ e₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\n⊢ ∀ {l₁ l₂ r₁ r₂ : List α}, l₁ ++ a :: r₁ = s₁ → l₂ ++ a :: r₂ = s₂ → l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nclear l₁ l₂ β\n[GOAL]\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\n⊢ ∀ {l₁ l₂ r₁ r₂ : List α}, l₁ ++ a :: r₁ = s₁ → l₂ ++ a :: r₂ = s₂ → l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nshow ∀ _ _ _ _, _\n[GOAL]\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\n⊢ ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = s₁ → x_1 ++ a :: x_3 = s₂ → x ++ x_2 ~ x_1 ++ x_3\n[PROOFSTEP]\nrefine perm_induction_on p ?_ (fun x t₁ t₂ p IH => ?_) (fun x y t₁ t₂ p IH => ?_) fun t₁ t₂ t₃ p₁ p₂ IH₁ IH₂ => ?_\n[GOAL]\ncase refine_1\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\n⊢ ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = [] → x_1 ++ a :: x_3 = [] → x ++ x_2 ~ x_1 ++ x_3\n[PROOFSTEP]\nintro l₁ l₂ r₁ r₂ e₁ e₂\n[GOAL]\ncase refine_2\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ ∀ (x_1 x_2 x_3 x_4 : List α), x_1 ++ a :: x_3 = x :: t₁ → x_2 ++ a :: x_4 = x :: t₂ → x_1 ++ x_3 ~ x_2 ++ x_4\n[PROOFSTEP]\nintro l₁ l₂ r₁ r₂ e₁ e₂\n[GOAL]\ncase refine_3\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ ∀ (x_1 x_2 x_3 x_4 : List α),\n    x_1 ++ a :: x_3 = y :: x :: t₁ → x_2 ++ a :: x_4 = x :: y :: t₂ → x_1 ++ x_3 ~ x_2 ++ x_4\n[PROOFSTEP]\nintro l₁ l₂ r₁ r₂ e₁ e₂\n[GOAL]\ncase refine_4\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₁ t₂ t₃ : List α\np₁ : t₁ ~ t₂\np₂ : t₂ ~ t₃\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = t₃ → x ++ x_2 ~ x_1 ++ x_3\n⊢ ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₃ → x ++ x_2 ~ x_1 ++ x_3\n[PROOFSTEP]\nintro l₁ l₂ r₁ r₂ e₁ e₂\n[GOAL]\ncase refine_1\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = []\ne₂ : l₂ ++ a :: r₂ = []\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\napply (not_mem_nil a).elim\n[GOAL]\ncase refine_1\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = []\ne₂ : l₂ ++ a :: r₂ = []\n⊢ a ∈ []\n[PROOFSTEP]\nrw [← e₁]\n[GOAL]\ncase refine_1\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = []\ne₂ : l₂ ++ a :: r₂ = []\n⊢ a ∈ l₁ ++ a :: r₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = x :: t₁\ne₂ : l₂ ++ a :: r₂ = x :: t₂\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\ncases' l₁ with y l₁\n[GOAL]\ncase refine_2.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₂ r₁ r₂ : List α\ne₂ : l₂ ++ a :: r₂ = x :: t₂\ne₁ : [] ++ a :: r₁ = x :: t₁\n⊢ [] ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\ncases' l₂ with z l₂\n[GOAL]\ncase refine_2.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₂ r₁ r₂ : List α\ne₂ : l₂ ++ a :: r₂ = x :: t₂\ny : α\nl₁ : List α\ne₁ : y :: l₁ ++ a :: r₁ = x :: t₁\n⊢ y :: l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\ncases' l₂ with z l₂\n[GOAL]\ncase refine_2.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : [] ++ a :: r₁ = x :: t₁\ne₂ : [] ++ a :: r₂ = x :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_2.nil.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : [] ++ a :: r₁ = x :: t₁\nz : α\nl₂ : List α\ne₂ : z :: l₂ ++ a :: r₂ = x :: t₂\n⊢ [] ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_2.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\ne₁ : y :: l₁ ++ a :: r₁ = x :: t₁\ne₂ : [] ++ a :: r₂ = x :: t₂\n⊢ y :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_2.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\ne₁ : y :: l₁ ++ a :: r₁ = x :: t₁\nz : α\nl₂ : List α\ne₂ : z :: l₂ ++ a :: r₂ = x :: t₂\n⊢ y :: l₁ ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_2.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : a :: r₁ = x :: t₁\ne₂ : a :: r₂ = x :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_2.nil.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : a :: r₁ = x :: t₁\nz : α\nl₂ : List α\ne₂ : z :: (l₂ ++ a :: r₂) = x :: t₂\n⊢ [] ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_2.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\ne₁ : y :: (l₁ ++ a :: r₁) = x :: t₁\ne₂ : a :: r₂ = x :: t₂\n⊢ y :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_2.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\ne₁ : y :: (l₁ ++ a :: r₁) = x :: t₁\nz : α\nl₂ : List α\ne₂ : z :: (l₂ ++ a :: r₂) = x :: t₂\n⊢ y :: l₁ ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_2.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nhead_eq✝¹ : a = x\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝ : a = x\ntail_eq✝ : r₂ = t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase refine_2.nil.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nz : α\nl₂ : List α\nhead_eq✝¹ : a = x\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝ : z = x\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\n⊢ [] ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase refine_2.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\nhead_eq✝¹ : y = x\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝ : a = x\ntail_eq✝ : r₂ = t₂\n⊢ y :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase refine_2.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\nz : α\nl₂ : List α\nhead_eq✝¹ : y = x\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝ : z = x\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\n⊢ y :: l₁ ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase refine_2.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ntail_eq✝¹ : r₁ = t₁\ntail_eq✝ : r₂ = t₂\nhead_eq✝ : a = a\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts t₁ t₂\n[GOAL]\ncase refine_2.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nr₁ r₂ : List α\nhead_eq✝ : a = a\np : r₁ ~ r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = r₁ → x_1 ++ a :: x_3 = r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nexact p\n[GOAL]\ncase refine_2.nil.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nz : α\nl₂ : List α\ntail_eq✝¹ : r₁ = t₁\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\nhead_eq✝ : z = a\n⊢ [] ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts z t₁ t₂\n[GOAL]\ncase refine_2.nil.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nr₁ r₂ l₂ : List α\np : r₁ ~ l₂ ++ a :: r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = r₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [] ++ r₁ ~ a :: l₂ ++ r₂\n[PROOFSTEP]\nexact p.trans perm_middle\n[GOAL]\ncase refine_2.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\ntail_eq✝ : r₂ = t₂\nhead_eq✝ : a = y\n⊢ y :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts y t₁ t₂\n[GOAL]\ncase refine_2.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nr₁ r₂ l₁ : List α\np : l₁ ++ a :: r₁ ~ r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ a :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nexact perm_middle.symm.trans p\n[GOAL]\ncase refine_2.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nl₁ : List α\nz : α\nl₂ : List α\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\nhead_eq✝ : z = y\n⊢ y :: l₁ ++ r₁ ~ z :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts z t₁ t₂\n[GOAL]\ncase refine_2.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nr₁ r₂ : List α\ny : α\nl₁ l₂ : List α\np : l₁ ++ a :: r₁ ~ l₂ ++ a :: r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ y :: l₁ ++ r₁ ~ y :: l₂ ++ r₂\n[PROOFSTEP]\nexact (IH _ _ _ _ rfl rfl).cons y\n[GOAL]\ncase refine_3\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = y :: x :: t₁\ne₂ : l₂ ++ a :: r₂ = x :: y :: t₂\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrcases l₁ with (_ | ⟨y, _ | ⟨z, l₁⟩⟩)\n[GOAL]\ncase refine_3.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₂ r₁ r₂ : List α\ne₂ : l₂ ++ a :: r₂ = x :: y :: t₂\ne₁ : [] ++ a :: r₁ = y :: x :: t₁\n⊢ [] ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrcases l₂ with (_ | ⟨u, _ | ⟨v, l₂⟩⟩)\n[GOAL]\ncase refine_3.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₂ r₁ r₂ : List α\ne₂ : l₂ ++ a :: r₂ = x :: y✝ :: t₂\ny : α\ne₁ : [y] ++ a :: r₁ = y✝ :: x :: t₁\n⊢ [y] ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrcases l₂ with (_ | ⟨u, _ | ⟨v, l₂⟩⟩)\n[GOAL]\ncase refine_3.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nl₂ r₁ r₂ : List α\ne₂ : l₂ ++ a :: r₂ = x :: y✝ :: t₂\ny z : α\nl₁ : List α\ne₁ : y :: z :: l₁ ++ a :: r₁ = y✝ :: x :: t₁\n⊢ y :: z :: l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrcases l₂ with (_ | ⟨u, _ | ⟨v, l₂⟩⟩)\n[GOAL]\ncase refine_3.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : [] ++ a :: r₁ = y :: x :: t₁\ne₂ : [] ++ a :: r₂ = x :: y :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : [] ++ a :: r₁ = y :: x :: t₁\nu : α\ne₂ : [u] ++ a :: r₂ = x :: y :: t₂\n⊢ [] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : [] ++ a :: r₁ = y :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: l₂ ++ a :: r₂ = x :: y :: t₂\n⊢ [] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : [y] ++ a :: r₁ = y✝ :: x :: t₁\ne₂ : [] ++ a :: r₂ = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : [y] ++ a :: r₁ = y✝ :: x :: t₁\nu : α\ne₂ : [u] ++ a :: r₂ = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : [y] ++ a :: r₁ = y✝ :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: l₂ ++ a :: r₂ = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: l₁ ++ a :: r₁ = y✝ :: x :: t₁\ne₂ : [] ++ a :: r₂ = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: l₁ ++ a :: r₁ = y✝ :: x :: t₁\nu : α\ne₂ : [u] ++ a :: r₂ = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.cons.cons.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: l₁ ++ a :: r₁ = y✝ :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: l₂ ++ a :: r₂ = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ndsimp at e₁ e₂ \n[GOAL]\ncase refine_3.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : a :: r₁ = y :: x :: t₁\ne₂ : a :: r₂ = x :: y :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : a :: r₁ = y :: x :: t₁\nu : α\ne₂ : u :: a :: r₂ = x :: y :: t₂\n⊢ [] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ne₁ : a :: r₁ = y :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: (l₂ ++ a :: r₂) = x :: y :: t₂\n⊢ [] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : y :: a :: r₁ = y✝ :: x :: t₁\ne₂ : a :: r₂ = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : y :: a :: r₁ = y✝ :: x :: t₁\nu : α\ne₂ : u :: a :: r₂ = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\ne₁ : y :: a :: r₁ = y✝ :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: (l₂ ++ a :: r₂) = x :: y✝ :: t₂\n⊢ [y] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: (l₁ ++ a :: r₁) = y✝ :: x :: t₁\ne₂ : a :: r₂ = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: (l₁ ++ a :: r₁) = y✝ :: x :: t₁\nu : α\ne₂ : u :: a :: r₂ = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.cons.cons.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\ne₁ : y :: z :: (l₁ ++ a :: r₁) = y✝ :: x :: t₁\nu v : α\nl₂ : List α\ne₂ : u :: v :: (l₂ ++ a :: r₂) = x :: y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\ninjections\n[GOAL]\ncase refine_3.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nhead_eq✝¹ : a = y\ntail_eq✝¹ : r₁ = x :: t₁\nhead_eq✝ : a = x\ntail_eq✝ : r₂ = y :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu : α\nhead_eq✝² : a = y\ntail_eq✝¹ : r₁ = x :: t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : a = y\ntail_eq✝ : r₂ = t₂\n⊢ [] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu v : α\nl₂ : List α\nhead_eq✝² : a = y\ntail_eq✝¹ : r₁ = x :: t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : v = y\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\n⊢ [] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny : α\nhead_eq✝² : y = y✝\nhead_eq✝¹ : a = x\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝ : a = x\ntail_eq✝ : r₂ = y✝ :: t₂\n⊢ [y] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny u : α\nhead_eq✝³ : y = y✝\nhead_eq✝² : a = x\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : a = y✝\ntail_eq✝ : r₂ = t₂\n⊢ [y] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny u v : α\nl₂ : List α\nhead_eq✝³ : y = y✝\nhead_eq✝² : a = x\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : v = y✝\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\n⊢ [y] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\nhead_eq✝² : y = y✝\nhead_eq✝¹ : z = x\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝ : a = x\ntail_eq✝ : r₂ = y✝ :: t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\nu : α\nhead_eq✝³ : y = y✝\nhead_eq✝² : z = x\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : a = y✝\ntail_eq✝ : r₂ = t₂\n⊢ y :: z :: l₁ ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.cons.cons.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nx y✝ : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ny z : α\nl₁ : List α\nu v : α\nl₂ : List α\nhead_eq✝³ : y = y✝\nhead_eq✝² : z = x\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝¹ : u = x\nhead_eq✝ : v = y✝\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\n⊢ y :: z :: l₁ ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts x y\n[GOAL]\ncase refine_3.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ntail_eq✝¹ : r₁ = a :: t₁\ntail_eq✝ : r₂ = a :: t₂\n⊢ [] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts r₁ r₂\n[GOAL]\ncase refine_3.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [] ++ a :: t₁ ~ [] ++ a :: t₂\n[PROOFSTEP]\nexact p.cons a\n[GOAL]\ncase refine_3.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu : α\ntail_eq✝¹ : r₂ = t₂\ntail_eq✝ : r₁ = u :: t₁\nhead_eq✝ : a = a\n⊢ [] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts r₁ r₂\n[GOAL]\ncase refine_3.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nu : α\nhead_eq✝ : a = a\n⊢ [] ++ u :: t₁ ~ [u] ++ t₂\n[PROOFSTEP]\nexact p.cons u\n[GOAL]\ncase refine_3.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu v : α\nl₂ : List α\ntail_eq✝¹ : l₂ ++ a :: r₂ = t₂\ntail_eq✝ : r₁ = u :: t₁\nhead_eq✝ : v = a\n⊢ [] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts r₁ v t₂\n[GOAL]\ncase refine_3.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ r₂ : List α\nu : α\nl₂ : List α\np : t₁ ~ l₂ ++ a :: r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [] ++ u :: t₁ ~ u :: a :: l₂ ++ r₂\n[PROOFSTEP]\nexact (p.trans perm_middle).cons u\n[GOAL]\ncase refine_3.cons.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\ntail_eq✝¹ : r₁ = t₁\ntail_eq✝ : r₂ = y :: t₂\nhead_eq✝ : a = a\n⊢ [y] ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts r₁ r₂\n[GOAL]\ncase refine_3.cons.nil.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nhead_eq✝ : a = a\n⊢ [y] ++ t₁ ~ [] ++ y :: t₂\n[PROOFSTEP]\nexact p.cons y\n[GOAL]\ncase refine_3.cons.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu : α\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝¹ : a = y\ntail_eq✝ : r₂ = t₂\nhead_eq✝ : u = a\n⊢ [y] ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts r₁ r₂ y u\n[GOAL]\ncase refine_3.cons.nil.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [a] ++ t₁ ~ [a] ++ t₂\n[PROOFSTEP]\nexact p.cons a\n[GOAL]\ncase refine_3.cons.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nu v : α\nl₂ : List α\ntail_eq✝¹ : r₁ = t₁\nhead_eq✝¹ : v = y\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\nhead_eq✝ : u = a\n⊢ [y] ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts r₁ u v t₂\n[GOAL]\ncase refine_3.cons.nil.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ r₂ l₂ : List α\np : t₁ ~ l₂ ++ a :: r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ [y] ++ t₁ ~ a :: y :: l₂ ++ r₂\n[PROOFSTEP]\nexact ((p.trans perm_middle).cons y).trans (swap _ _ _)\n[GOAL]\ncase refine_3.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nz : α\nl₁ : List α\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\ntail_eq✝ : r₂ = y :: t₂\nhead_eq✝ : a = z\n⊢ y :: z :: l₁ ++ r₁ ~ [] ++ r₂\n[PROOFSTEP]\nsubsts r₂ z t₁\n[GOAL]\ncase refine_3.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₂ r₁ l₁ : List α\np : l₁ ++ a :: r₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ y :: a :: l₁ ++ r₁ ~ [] ++ y :: t₂\n[PROOFSTEP]\nexact (perm_middle.symm.trans p).cons y\n[GOAL]\ncase refine_3.cons.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nz : α\nl₁ : List α\nu : α\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝¹ : a = y\ntail_eq✝ : r₂ = t₂\nhead_eq✝ : u = z\n⊢ y :: z :: l₁ ++ r₁ ~ [u] ++ r₂\n[PROOFSTEP]\nsubsts r₂ y z t₁\n[GOAL]\ncase refine_3.cons.cons.cons.nil\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\nt₂ r₁ l₁ : List α\nu : α\np : l₁ ++ a :: r₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ a :: u :: l₁ ++ r₁ ~ [u] ++ t₂\n[PROOFSTEP]\nexact (swap _ _ _).trans ((perm_middle.symm.trans p).cons u)\n[GOAL]\ncase refine_3.cons.cons.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nt₁ t₂ : List α\np : t₁ ~ t₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nr₁ r₂ : List α\nz : α\nl₁ : List α\nu v : α\nl₂ : List α\ntail_eq✝¹ : l₁ ++ a :: r₁ = t₁\nhead_eq✝¹ : v = y\ntail_eq✝ : l₂ ++ a :: r₂ = t₂\nhead_eq✝ : u = z\n⊢ y :: z :: l₁ ++ r₁ ~ u :: v :: l₂ ++ r₂\n[PROOFSTEP]\nsubsts u v t₁ t₂\n[GOAL]\ncase refine_3.cons.cons.cons.cons\nα : Type uu\na : α\ns₁ s₂ : List α\np✝ : s₁ ~ s₂\ny : α\nr₁ r₂ : List α\nz : α\nl₁ l₂ : List α\np : l₁ ++ a :: r₁ ~ l₂ ++ a :: r₂\nIH : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ y :: z :: l₁ ++ r₁ ~ z :: y :: l₂ ++ r₂\n[PROOFSTEP]\nexact (IH _ _ _ _ rfl rfl).swap' _ _\n[GOAL]\ncase refine_4\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₁ t₂ t₃ : List α\np₁ : t₁ ~ t₂\np₂ : t₂ ~ t₃\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = t₃ → x ++ x_2 ~ x_1 ++ x_3\nl₁ l₂ r₁ r₂ : List α\ne₁ : l₁ ++ a :: r₁ = t₁\ne₂ : l₂ ++ a :: r₂ = t₃\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nsubsts t₁ t₃\n[GOAL]\ncase refine_4\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₂ l₁ l₂ r₁ r₂ : List α\np₁ : l₁ ++ a :: r₁ ~ t₂\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\np₂ : t₂ ~ l₂ ++ a :: r₂\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nhave : a ∈ t₂ := p₁.subset (by simp)\n[GOAL]\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₂ l₁ l₂ r₁ r₂ : List α\np₁ : l₁ ++ a :: r₁ ~ t₂\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\np₂ : t₂ ~ l₂ ++ a :: r₂\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\n⊢ a ∈ l₁ ++ a :: r₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_4\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₂ l₁ l₂ r₁ r₂ : List α\np₁ : l₁ ++ a :: r₁ ~ t₂\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\np₂ : t₂ ~ l₂ ++ a :: r₂\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\nthis : a ∈ t₂\n⊢ l₁ ++ r₁ ~ l₂ ++ r₂\n[PROOFSTEP]\nrcases mem_split this with ⟨l₂, r₂, e₂⟩\n[GOAL]\ncase refine_4.intro.intro\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nt₂ l₁ l₂✝ r₁ r₂✝ : List α\np₁ : l₁ ++ a :: r₁ ~ t₂\nIH₁ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = t₂ → x ++ x_2 ~ x_1 ++ x_3\np₂ : t₂ ~ l₂✝ ++ a :: r₂✝\nIH₂ : ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = t₂ → x_1 ++ a :: x_3 = l₂✝ ++ a :: r₂✝ → x ++ x_2 ~ x_1 ++ x_3\nthis : a ∈ t₂\nl₂ r₂ : List α\ne₂ : t₂ = l₂ ++ a :: r₂\n⊢ l₁ ++ r₁ ~ l₂✝ ++ r₂✝\n[PROOFSTEP]\nsubst t₂\n[GOAL]\ncase refine_4.intro.intro\nα : Type uu\na : α\ns₁ s₂ : List α\np : s₁ ~ s₂\nl₁ l₂✝ r₁ r₂✝ l₂ r₂ : List α\np₁ : l₁ ++ a :: r₁ ~ l₂ ++ a :: r₂\nIH₁ :\n  ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₁ ++ a :: r₁ → x_1 ++ a :: x_3 = l₂ ++ a :: r₂ → x ++ x_2 ~ x_1 ++ x_3\np₂ : l₂ ++ a :: r₂ ~ l₂✝ ++ a :: r₂✝\nIH₂ :\n  ∀ (x x_1 x_2 x_3 : List α), x ++ a :: x_2 = l₂ ++ a :: r₂ → x_1 ++ a :: x_3 = l₂✝ ++ a :: r₂✝ → x ++ x_2 ~ x_1 ++ x_3\nthis : a ∈ l₂ ++ a :: r₂\n⊢ l₁ ++ r₁ ~ l₂✝ ++ r₂✝\n[PROOFSTEP]\nexact (IH₁ _ _ _ _ rfl rfl).trans (IH₂ _ _ _ _ rfl rfl)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\no₁ o₂ : Option α\n⊢ Option.toList o₁ ~ Option.toList o₂ ↔ o₁ = o₂\n[PROOFSTEP]\nrefine' ⟨fun p => _, fun e => e ▸ Perm.refl _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\no₁ o₂ : Option α\np : Option.toList o₁ ~ Option.toList o₂\n⊢ o₁ = o₂\n[PROOFSTEP]\ncases' o₁ with a\n[GOAL]\ncase none\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\no₂ : Option α\np : Option.toList none ~ Option.toList o₂\n⊢ none = o₂\n[PROOFSTEP]\ncases' o₂ with b\n[GOAL]\ncase some\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\no₂ : Option α\na : α\np : Option.toList (some a) ~ Option.toList o₂\n⊢ some a = o₂\n[PROOFSTEP]\ncases' o₂ with b\n[GOAL]\ncase none.none\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\np : Option.toList none ~ Option.toList none\n⊢ none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase none.some\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nb : α\np : Option.toList none ~ Option.toList (some b)\n⊢ none = some b\n[PROOFSTEP]\ncases p.length_eq\n[GOAL]\ncase some.none\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na : α\np : Option.toList (some a) ~ Option.toList none\n⊢ some a = none\n[PROOFSTEP]\ncases p.length_eq\n[GOAL]\ncase some.some\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b : α\np : Option.toList (some a) ~ Option.toList (some b)\n⊢ some a = some b\n[PROOFSTEP]\nexact Option.mem_toList.1 (p.symm.subset <| by simp)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b : α\np : Option.toList (some a) ~ Option.toList (some b)\n⊢ b ∈ Option.toList (some b)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nx✝ : a :: l₁ <+~ a :: l₂\nl : List α\np : l ~ a :: l₁\ns : l <+ a :: l₂\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\ncases' s with _ _ _ s' u _ _ s'\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nx✝ : a :: l₁ <+~ a :: l₂\nl : List α\np : l ~ a :: l₁\ns' : l <+ l₂\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\nexact (p.subperm_left.2 <| (sublist_cons _ _).subperm).trans s'.subperm\n[GOAL]\ncase cons₂\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nx✝ : a :: l₁ <+~ a :: l₂\nu : List α\np : a :: u ~ a :: l₁\ns' : u <+ l₂\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\nexact ⟨u, p.cons_inv, s'⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ l₂\ns : l₁ <+~ l₂\n⊢ a :: l₁ <+~ l₂\n[PROOFSTEP]\nrcases s with ⟨l, p, s⟩\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₁ l₂ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ l₂\nl : List α\np : l ~ l₁\ns : l <+ l₂\n⊢ a :: l₁ <+~ l₂\n[PROOFSTEP]\ninduction s generalizing l₁\n[GOAL]\ncase intro.intro.slnil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l l₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ []\np : [] ~ l₁\n⊢ a :: l₁ <+~ []\ncase intro.intro.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\na : α\nl₂ l l₁✝ l₂✝ : List α\na✝¹ : α\na✝ : l₁✝ <+ l₂✝\na_ih✝ : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ l₂✝ → l₁✝ ~ l₁ → a :: l₁ <+~ l₂✝\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ a✝¹ :: l₂✝\np : l₁✝ ~ l₁\n⊢ a :: l₁ <+~ a✝¹ :: l₂✝\ncase intro.intro.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\na : α\nl₂ l l₁✝ l₂✝ : List α\na✝¹ : α\na✝ : l₁✝ <+ l₂✝\na_ih✝ : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ l₂✝ → l₁✝ ~ l₁ → a :: l₁ <+~ l₂✝\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ a✝¹ :: l₂✝\np : a✝¹ :: l₁✝ ~ l₁\n⊢ a :: l₁ <+~ a✝¹ :: l₂✝\n[PROOFSTEP]\ncase slnil => cases h₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l l₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ []\np : [] ~ l₁\n⊢ a :: l₁ <+~ []\n[PROOFSTEP]\ncase slnil => cases h₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l l₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ []\np : [] ~ l₁\n⊢ a :: l₁ <+~ []\n[PROOFSTEP]\ncases h₂\n[GOAL]\ncase intro.intro.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\na : α\nl₂ l l₁✝ l₂✝ : List α\na✝¹ : α\na✝ : l₁✝ <+ l₂✝\na_ih✝ : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ l₂✝ → l₁✝ ~ l₁ → a :: l₁ <+~ l₂✝\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ a✝¹ :: l₂✝\np : l₁✝ ~ l₁\n⊢ a :: l₁ <+~ a✝¹ :: l₂✝\ncase intro.intro.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\na : α\nl₂ l l₁✝ l₂✝ : List α\na✝¹ : α\na✝ : l₁✝ <+ l₂✝\na_ih✝ : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ l₂✝ → l₁✝ ~ l₁ → a :: l₁ <+~ l₂✝\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ a✝¹ :: l₂✝\np : a✝¹ :: l₁✝ ~ l₁\n⊢ a :: l₁ <+~ a✝¹ :: l₂✝\n[PROOFSTEP]\ncase cons r₁ r₂ b s' ih =>\n  simp at h₂ \n  cases' h₂ with e m\n  · subst b\n    exact ⟨a :: r₁, p.cons a, s'.cons₂ _⟩\n  · rcases ih d₁ h₁ m p with ⟨t, p', s'⟩\n    exact ⟨t, p', s'.cons _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : r₁ ~ l₁\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\ncase cons r₁ r₂ b s' ih =>\n  simp at h₂ \n  cases' h₂ with e m\n  · subst b\n    exact ⟨a :: r₁, p.cons a, s'.cons₂ _⟩\n  · rcases ih d₁ h₁ m p with ⟨t, p', s'⟩\n    exact ⟨t, p', s'.cons _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : r₁ ~ l₁\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nsimp at h₂ \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : r₁ ~ l₁\nh₂ : a = b ∨ a ∈ r₂\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\ncases' h₂ with e m\n[GOAL]\ncase inl\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : r₁ ~ l₁\ne : a = b\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase inl\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : r₁ ~ l₁\n⊢ a :: l₁ <+~ a :: r₂\n[PROOFSTEP]\nexact ⟨a :: r₁, p.cons a, s'.cons₂ _⟩\n[GOAL]\ncase inr\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns' : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : r₁ ~ l₁\nm : a ∈ r₂\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nrcases ih d₁ h₁ m p with ⟨t, p', s'⟩\n[GOAL]\ncase inr.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\ns'✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : r₁ ~ l₁\nm : a ∈ r₂\nt : List α\np' : t ~ a :: l₁\ns' : t <+ r₂\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nexact ⟨t, p', s'.cons _⟩\n[GOAL]\ncase intro.intro.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\na : α\nl₂ l l₁✝ l₂✝ : List α\na✝¹ : α\na✝ : l₁✝ <+ l₂✝\na_ih✝ : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ l₂✝ → l₁✝ ~ l₁ → a :: l₁ <+~ l₂✝\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ a✝¹ :: l₂✝\np : a✝¹ :: l₁✝ ~ l₁\n⊢ a :: l₁ <+~ a✝¹ :: l₂✝\n[PROOFSTEP]\ncase cons₂ r₁ r₂ b _ ih =>\n  have bm : b ∈ l₁ := p.subset <| mem_cons_self _ _\n  have am : a ∈ r₂ := by\n    simp only [find?, mem_cons] at h₂ \n    exact h₂.resolve_left fun e => h₁ <| e.symm ▸ bm\n  rcases mem_split bm with ⟨t₁, t₂, rfl⟩\n  have st : t₁ ++ t₂ <+ t₁ ++ b :: t₂ := by simp\n  rcases ih (d₁.sublist st) (mt (fun x => st.subset x) h₁) am (Perm.cons_inv <| p.trans perm_middle) with ⟨t, p', s'⟩\n  exact ⟨b :: t, (p'.cons b).trans <| (swap _ _ _).trans (perm_middle.symm.cons a), s'.cons₂ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : b :: r₁ ~ l₁\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\ncase cons₂ r₁ r₂ b _ ih =>\n  have bm : b ∈ l₁ := p.subset <| mem_cons_self _ _\n  have am : a ∈ r₂ := by\n    simp only [find?, mem_cons] at h₂ \n    exact h₂.resolve_left fun e => h₁ <| e.symm ▸ bm\n  rcases mem_split bm with ⟨t₁, t₂, rfl⟩\n  have st : t₁ ++ t₂ <+ t₁ ++ b :: t₂ := by simp\n  rcases ih (d₁.sublist st) (mt (fun x => st.subset x) h₁) am (Perm.cons_inv <| p.trans perm_middle) with ⟨t, p', s'⟩\n  exact ⟨b :: t, (p'.cons b).trans <| (swap _ _ _).trans (perm_middle.symm.cons a), s'.cons₂ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : b :: r₁ ~ l₁\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nhave bm : b ∈ l₁ := p.subset <| mem_cons_self _ _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : b :: r₁ ~ l₁\nbm : b ∈ l₁\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nhave am : a ∈ r₂ := by\n  simp only [find?, mem_cons] at h₂ \n  exact h₂.resolve_left fun e => h₁ <| e.symm ▸ bm\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : b :: r₁ ~ l₁\nbm : b ∈ l₁\n⊢ a ∈ r₂\n[PROOFSTEP]\nsimp only [find?, mem_cons] at h₂ \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\np : b :: r₁ ~ l₁\nbm : b ∈ l₁\nh₂ : a = b ∨ a ∈ r₂\n⊢ a ∈ r₂\n[PROOFSTEP]\nexact h₂.resolve_left fun e => h₁ <| e.symm ▸ bm\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nl₁ : List α\nd₁ : Nodup l₁\nh₁ : ¬a ∈ l₁\nh₂ : a ∈ b :: r₂\np : b :: r₁ ~ l₁\nbm : b ∈ l₁\nam : a ∈ r₂\n⊢ a :: l₁ <+~ b :: r₂\n[PROOFSTEP]\nrcases mem_split bm with ⟨t₁, t₂, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nh₂ : a ∈ b :: r₂\nam : a ∈ r₂\nt₁ t₂ : List α\nd₁ : Nodup (t₁ ++ b :: t₂)\nh₁ : ¬a ∈ t₁ ++ b :: t₂\np : b :: r₁ ~ t₁ ++ b :: t₂\nbm : b ∈ t₁ ++ b :: t₂\n⊢ a :: (t₁ ++ b :: t₂) <+~ b :: r₂\n[PROOFSTEP]\nhave st : t₁ ++ t₂ <+ t₁ ++ b :: t₂ := by simp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nh₂ : a ∈ b :: r₂\nam : a ∈ r₂\nt₁ t₂ : List α\nd₁ : Nodup (t₁ ++ b :: t₂)\nh₁ : ¬a ∈ t₁ ++ b :: t₂\np : b :: r₁ ~ t₁ ++ b :: t₂\nbm : b ∈ t₁ ++ b :: t₂\n⊢ t₁ ++ t₂ <+ t₁ ++ b :: t₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nh₂ : a ∈ b :: r₂\nam : a ∈ r₂\nt₁ t₂ : List α\nd₁ : Nodup (t₁ ++ b :: t₂)\nh₁ : ¬a ∈ t₁ ++ b :: t₂\np : b :: r₁ ~ t₁ ++ b :: t₂\nbm : b ∈ t₁ ++ b :: t₂\nst : t₁ ++ t₂ <+ t₁ ++ b :: t₂\n⊢ a :: (t₁ ++ b :: t₂) <+~ b :: r₂\n[PROOFSTEP]\nrcases ih (d₁.sublist st) (mt (fun x => st.subset x) h₁) am (Perm.cons_inv <| p.trans perm_middle) with ⟨t, p', s'⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\na : α\nl₂ l r₁ r₂ : List α\nb : α\na✝ : r₁ <+ r₂\nih : ∀ {l₁ : List α}, Nodup l₁ → ¬a ∈ l₁ → a ∈ r₂ → r₁ ~ l₁ → a :: l₁ <+~ r₂\nh₂ : a ∈ b :: r₂\nam : a ∈ r₂\nt₁ t₂ : List α\nd₁ : Nodup (t₁ ++ b :: t₂)\nh₁ : ¬a ∈ t₁ ++ b :: t₂\np : b :: r₁ ~ t₁ ++ b :: t₂\nbm : b ∈ t₁ ++ b :: t₂\nst : t₁ ++ t₂ <+ t₁ ++ b :: t₂\nt : List α\np' : t ~ a :: (t₁ ++ t₂)\ns' : t <+ r₂\n⊢ a :: (t₁ ++ b :: t₂) <+~ b :: r₂\n[PROOFSTEP]\nexact ⟨b :: t, (p'.cons b).trans <| (swap _ _ _).trans (perm_middle.symm.cons a), s'.cons₂ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l : List α\np : l ~ l₁\ns : l <+ l₂\nh : length l₁ < length l₂\n⊢ ∃ a, a :: l₁ <+~ l₂\n[PROOFSTEP]\nsuffices length l < length l₂ → ∃ a : α, a :: l <+~ l₂ from\n  (this <| p.symm.length_eq ▸ h).imp fun a => (p.cons a).subperm_right.1\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l : List α\np : l ~ l₁\ns : l <+ l₂\nh : length l₁ < length l₂\n⊢ length l < length l₂ → ∃ a, a :: l <+~ l₂\n[PROOFSTEP]\nclear h p l₁\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂✝ l₂ l : List α\ns : l <+ l₂\n⊢ length l < length l₂ → ∃ a, a :: l <+~ l₂\n[PROOFSTEP]\ninduction' s with l₁ l₂ a s IH _ _ b _ IH\n[GOAL]\ncase slnil\nα : Type uu\nβ : Type vv\nl₁ l₂✝ l₂ l : List α\n⊢ length [] < length [] → ∃ a, [a] <+~ []\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂\n⊢ length l₁ < length (a :: l₂) → ∃ a_2, a_2 :: l₁ <+~ a :: l₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase cons₂\nα : Type uu\nβ : Type vv\nl₁ l₂✝¹ l₂ l l₁✝ l₂✝ : List α\nb : α\na✝ : l₁✝ <+ l₂✝\nIH : length l₁✝ < length l₂✝ → ∃ a, a :: l₁✝ <+~ l₂✝\n⊢ length (b :: l₁✝) < length (b :: l₂✝) → ∃ a, a :: b :: l₁✝ <+~ b :: l₂✝\n[PROOFSTEP]\nintro h\n[GOAL]\ncase slnil\nα : Type uu\nβ : Type vv\nl₁ l₂✝ l₂ l : List α\nh : length [] < length []\n⊢ ∃ a, [a] <+~ []\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂\nh : length l₁ < length (a :: l₂)\n⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂\n[PROOFSTEP]\ncases' lt_or_eq_of_le (Nat.le_of_lt_succ h : length l₁ ≤ length l₂) with h h\n[GOAL]\ncase cons.inl\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂\nh✝ : length l₁ < length (a :: l₂)\nh : length l₁ < length l₂\n⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂\n[PROOFSTEP]\nexact (IH h).imp fun a s => s.trans (sublist_cons _ _).subperm\n[GOAL]\ncase cons.inr\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ l₂✝ l l₁ l₂ : List α\na : α\ns : l₁ <+ l₂\nIH : length l₁ < length l₂ → ∃ a, a :: l₁ <+~ l₂\nh✝ : length l₁ < length (a :: l₂)\nh : length l₁ = length l₂\n⊢ ∃ a_1, a_1 :: l₁ <+~ a :: l₂\n[PROOFSTEP]\nexact ⟨a, s.eq_of_length h ▸ Subperm.refl _⟩\n[GOAL]\ncase cons₂\nα : Type uu\nβ : Type vv\nl₁ l₂✝¹ l₂ l l₁✝ l₂✝ : List α\nb : α\na✝ : l₁✝ <+ l₂✝\nIH : length l₁✝ < length l₂✝ → ∃ a, a :: l₁✝ <+~ l₂✝\nh : length (b :: l₁✝) < length (b :: l₂✝)\n⊢ ∃ a, a :: b :: l₁✝ <+~ b :: l₂✝\n[PROOFSTEP]\nexact (IH <| Nat.lt_of_succ_lt_succ h).imp fun a s => (swap _ _ _).subperm_right.1 <| (subperm_cons _).2 s\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nd : Nodup l₁\nH : l₁ ⊆ l₂\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\ninduction' d with a l₁' h d IH\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nH✝ : l₁ ⊆ l₂\nH : [] ⊆ l₂\n⊢ [] <+~ l₂\n[PROOFSTEP]\nexact ⟨nil, Perm.nil, nil_sublist _⟩\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nH✝ : l₁ ⊆ l₂\na : α\nl₁' : List α\nh : ∀ (a' : α), a' ∈ l₁' → a ≠ a'\nd : Pairwise (fun x x_1 => x ≠ x_1) l₁'\nIH : l₁' ⊆ l₂ → l₁' <+~ l₂\nH : a :: l₁' ⊆ l₂\n⊢ a :: l₁' <+~ l₂\n[PROOFSTEP]\ncases' forall_mem_cons.1 H with H₁ H₂\n[GOAL]\ncase cons.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nH✝ : l₁ ⊆ l₂\na : α\nl₁' : List α\nh : ∀ (a' : α), a' ∈ l₁' → a ≠ a'\nd : Pairwise (fun x x_1 => x ≠ x_1) l₁'\nIH : l₁' ⊆ l₂ → l₁' <+~ l₂\nH : a :: l₁' ⊆ l₂\nH₁ : a ∈ l₂\nH₂ : ∀ (x : α), x ∈ l₁' → x ∈ l₂\n⊢ a :: l₁' <+~ l₂\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase cons.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nH✝ : l₁ ⊆ l₂\na : α\nl₁' : List α\nd : Pairwise (fun x x_1 => x ≠ x_1) l₁'\nIH : l₁' ⊆ l₂ → l₁' <+~ l₂\nH : a :: l₁' ⊆ l₂\nH₁ : a ∈ l₂\nH₂ : ∀ (x : α), x ∈ l₁' → x ∈ l₂\nh : ¬a ∈ l₁'\n⊢ a :: l₁' <+~ l₂\n[PROOFSTEP]\nexact cons_subperm_of_mem d h H₁ (IH H₂)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l : List α\nd : Nodup l\ns₁ : l₁ <+ l\ns₂ : l₂ <+ l\nh : l₁ ~ l₂\n⊢ l₁ = l₂\n[PROOFSTEP]\ninduction' s₂ with l₂ l a s₂ IH l₂ l a _ IH generalizing l₁\n[GOAL]\ncase slnil\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝ l₁✝ l₂ l : List α\nd✝ : Nodup l\ns₁✝ : l₁✝ <+ l\nh✝ : l₁✝ ~ l₂\nl₁ : List α\nd : Nodup []\ns₁ : l₁ <+ []\nh : l₁ ~ []\n⊢ l₁ = []\n[PROOFSTEP]\nexact h.eq_nil\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\ns₂ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\nd : Nodup (a :: l)\ns₁ : l₁ <+ a :: l\nh : l₁ ~ l₂\n⊢ l₁ = l₂\n[PROOFSTEP]\nsimp at d \n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\ns₂ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\ns₁ : l₁ <+ a :: l\nh : l₁ ~ l₂\nd : ¬a ∈ l ∧ Nodup l\n⊢ l₁ = l₂\n[PROOFSTEP]\ncases' s₁ with _ _ _ s₁ l₁ _ _ s₁\n[GOAL]\ncase cons.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\ns₂ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\nh : l₁ ~ l₂\nd : ¬a ∈ l ∧ Nodup l\ns₁ : l₁ <+ l\n⊢ l₁ = l₂\n[PROOFSTEP]\nexact IH d.2 s₁ h\n[GOAL]\ncase cons.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\ns₂ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nd : ¬a ∈ l ∧ Nodup l\nl₁ : List α\nh : a :: l₁ ~ l₂\ns₁ : l₁ <+ l\n⊢ a :: l₁ = l₂\n[PROOFSTEP]\napply d.1.elim\n[GOAL]\ncase cons.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\ns₂ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nd : ¬a ∈ l ∧ Nodup l\nl₁ : List α\nh : a :: l₁ ~ l₂\ns₁ : l₁ <+ l\n⊢ a ∈ l\n[PROOFSTEP]\nexact Subperm.subset ⟨_, h.symm, s₂⟩ (mem_cons_self _ _)\n[GOAL]\ncase cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\na✝ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\nd : Nodup (a :: l)\ns₁ : l₁ <+ a :: l\nh : l₁ ~ a :: l₂\n⊢ l₁ = a :: l₂\n[PROOFSTEP]\nsimp at d \n[GOAL]\ncase cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\na✝ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\ns₁ : l₁ <+ a :: l\nh : l₁ ~ a :: l₂\nd : ¬a ∈ l ∧ Nodup l\n⊢ l₁ = a :: l₂\n[PROOFSTEP]\ncases' s₁ with _ _ _ s₁ l₁ _ _ s₁\n[GOAL]\ncase cons₂.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\na✝ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\nh : l₁ ~ a :: l₂\nd : ¬a ∈ l ∧ Nodup l\ns₁ : l₁ <+ l\n⊢ l₁ = a :: l₂\n[PROOFSTEP]\napply d.1.elim\n[GOAL]\ncase cons₂.cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\na✝ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nl₁ : List α\nh : l₁ ~ a :: l₂\nd : ¬a ∈ l ∧ Nodup l\ns₁ : l₁ <+ l\n⊢ a ∈ l\n[PROOFSTEP]\nexact Subperm.subset ⟨_, h, s₁⟩ (mem_cons_self _ _)\n[GOAL]\ncase cons₂.cons₂\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ l✝ : List α\nd✝ : Nodup l✝\ns₁✝ : l₁✝ <+ l✝\nh✝ : l₁✝ ~ l₂✝\nl₂ l : List α\na : α\na✝ : l₂ <+ l\nIH : ∀ {l₁ : List α}, Nodup l → l₁ <+ l → l₁ ~ l₂ → l₁ = l₂\nd : ¬a ∈ l ∧ Nodup l\nl₁ : List α\nh : a :: l₁ ~ a :: l₂\ns₁ : l₁ <+ l\n⊢ a :: l₁ = a :: l₂\n[PROOFSTEP]\nrw [IH d.2 s₁ h.cons_inv]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ l₁ l₂ l : List α\nd : Nodup l\ns₁ : l₁ <+ l\ns₂ : l₂ <+ l\nh : l₁ = l₂\n⊢ l₁ ~ l₂\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nh₁ : ¬a ∈ l₁\n⊢ List.erase l₁ a ~ List.erase l₂ a\n[PROOFSTEP]\nhave h₂ : a ∉ l₂ := mt p.mem_iff.2 h₁\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nh₁ : ¬a ∈ l₁\nh₂ : ¬a ∈ l₂\n⊢ List.erase l₁ a ~ List.erase l₂ a\n[PROOFSTEP]\nrw [erase_of_not_mem h₁, erase_of_not_mem h₂]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nh₁ : ¬a ∈ l₁\nh₂ : ¬a ∈ l₂\n⊢ l₁ ~ l₂\n[PROOFSTEP]\nexact p\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ l <+~ a :: List.erase l a\n[PROOFSTEP]\nby_cases h : a ∈ l\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\nh : a ∈ l\n⊢ l <+~ a :: List.erase l a\n[PROOFSTEP]\nexact (perm_cons_erase h).subperm\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\nh : ¬a ∈ l\n⊢ l <+~ a :: List.erase l a\n[PROOFSTEP]\nrw [erase_of_not_mem h]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\nh : ¬a ∈ l\n⊢ l <+~ a :: l\n[PROOFSTEP]\nexact (sublist_cons _ _).subperm\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t : List α\nh : l₁ ~ l₂\n⊢ List.diff l₁ t ~ List.diff l₂ t\n[PROOFSTEP]\ninduction t generalizing l₁ l₂ h\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : l₁ ~ l₂\n⊢ List.diff l₁ [] ~ List.diff l₂ []\n[PROOFSTEP]\nsimp [*, Perm.erase]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {l₁ l₂ : List α}, l₁ ~ l₂ → List.diff l₁ tail✝ ~ List.diff l₂ tail✝\nl₁ l₂ : List α\nh : l₁ ~ l₂\n⊢ List.diff l₁ (head✝ :: tail✝) ~ List.diff l₂ (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*, Perm.erase]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl t₁ t₂ : List α\nh : t₁ ~ t₂\n⊢ List.diff l t₁ = List.diff l t₂\n[PROOFSTEP]\ninduction h generalizing l\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ l : List α\n⊢ List.diff l [] = List.diff l []\n[PROOFSTEP]\nfirst\n| simp [*, Perm.erase, erase_comm]\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ l : List α\n⊢ List.diff l [] = List.diff l []\n[PROOFSTEP]\nsimp [*, Perm.erase, erase_comm]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (l : List α), List.diff l l₁✝ = List.diff l l₂✝\nl : List α\n⊢ List.diff l (x✝ :: l₁✝) = List.diff l (x✝ :: l₂✝)\n[PROOFSTEP]\nfirst\n| simp [*, Perm.erase, erase_comm]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nx✝ : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (l : List α), List.diff l l₁✝ = List.diff l l₂✝\nl : List α\n⊢ List.diff l (x✝ :: l₁✝) = List.diff l (x✝ :: l₂✝)\n[PROOFSTEP]\nsimp [*, Perm.erase, erase_comm]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nx✝ y✝ : α\nl✝ l : List α\n⊢ List.diff l (y✝ :: x✝ :: l✝) = List.diff l (x✝ :: y✝ :: l✝)\n[PROOFSTEP]\nfirst\n| simp [*, Perm.erase, erase_comm]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nx✝ y✝ : α\nl✝ l : List α\n⊢ List.diff l (y✝ :: x✝ :: l✝) = List.diff l (x✝ :: y✝ :: l✝)\n[PROOFSTEP]\nsimp [*, Perm.erase, erase_comm]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ (l : List α), List.diff l l₁✝ = List.diff l l₂✝\na_ih✝ : ∀ (l : List α), List.diff l l₂✝ = List.diff l l₃✝\nl : List α\n⊢ List.diff l l₁✝ = List.diff l l₃✝\n[PROOFSTEP]\nfirst\n| simp [*, Perm.erase, erase_comm]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : ∀ (l : List α), List.diff l l₁✝ = List.diff l l₂✝\na_ih✝ : ∀ (l : List α), List.diff l l₂✝ = List.diff l l₃✝\nl : List α\n⊢ List.diff l l₁✝ = List.diff l l₃✝\n[PROOFSTEP]\nsimp [*, Perm.erase, erase_comm]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : l₁ <+~ l₂\nt : List α\n⊢ List.diff l₁ t <+~ List.diff l₂ t\n[PROOFSTEP]\ninduction t generalizing l₁ l₂ h\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : l₁ <+~ l₂\n⊢ List.diff l₁ [] <+~ List.diff l₂ []\n[PROOFSTEP]\nsimp [*, Subperm.erase]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ {l₁ l₂ : List α}, l₁ <+~ l₂ → List.diff l₁ tail✝ <+~ List.diff l₂ tail✝\nl₁ l₂ : List α\nh : l₁ <+~ l₂\n⊢ List.diff l₁ (head✝ :: tail✝) <+~ List.diff l₂ (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*, Subperm.erase]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\n⊢ List.erase (a :: l) b <+~ a :: List.erase l b\n[PROOFSTEP]\nby_cases h : a = b\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : a = b\n⊢ List.erase (a :: l) b <+~ a :: List.erase l b\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ List.erase (a :: l) a <+~ a :: List.erase l a\n[PROOFSTEP]\nrw [erase_cons_head]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ l <+~ a :: List.erase l a\n[PROOFSTEP]\napply subperm_cons_erase\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\na b : α\nl : List α\nh : ¬a = b\n⊢ List.erase (a :: l) b <+~ a :: List.erase l b\n[PROOFSTEP]\nrw [erase_cons_tail _ h]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\ninst✝ : DecidableEq α\na : α\nl₁ : List α\n⊢ ∃ x, a :: l₁ <+ a :: List.diff l₁ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ : List α\nb : α\nl₂ : List α\n⊢ List.diff (a :: l₁) (b :: l₂) <+~ a :: List.diff l₁ (b :: l₂)\n[PROOFSTEP]\nsimp only [diff_cons]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ : List α\nb : α\nl₂ : List α\n⊢ List.diff (List.erase (a :: l₁) b) l₂ <+~ a :: List.diff (List.erase l₁ b) l₂\n[PROOFSTEP]\nrefine' ((erase_cons_subperm_cons_erase a b l₁).diff_right l₂).trans _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ : List α\nb : α\nl₂ : List α\n⊢ List.diff (a :: List.erase l₁ b) l₂ <+~ a :: List.diff (List.erase l₁ b) l₂\n[PROOFSTEP]\napply subperm_cons_diff\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t : List α\nh : l₁ ~ l₂\n⊢ List.bagInter l₁ t ~ List.bagInter l₂ t\n[PROOFSTEP]\ninduction' h with x _ _ _ _ x y _ _ _ _ _ _ ih_1 ih_2 generalizing t\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ t : List α\n⊢ List.bagInter [] t ~ List.bagInter [] t\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (t : List α), List.bagInter l₁✝ t ~ List.bagInter l₂✝ t\nt : List α\n⊢ List.bagInter (x :: l₁✝) t ~ List.bagInter (x :: l₂✝) t\n[PROOFSTEP]\nby_cases x ∈ t\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (t : List α), List.bagInter l₁✝ t ~ List.bagInter l₂✝ t\nt : List α\n⊢ List.bagInter (x :: l₁✝) t ~ List.bagInter (x :: l₂✝) t\n[PROOFSTEP]\nby_cases x ∈ t\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (t : List α), List.bagInter l₁✝ t ~ List.bagInter l₂✝ t\nt : List α\nh : x ∈ t\n⊢ List.bagInter (x :: l₁✝) t ~ List.bagInter (x :: l₂✝) t\n[PROOFSTEP]\nsimp [*, Perm.cons]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\na_ih✝ : ∀ (t : List α), List.bagInter l₁✝ t ~ List.bagInter l₂✝ t\nt : List α\nh : ¬x ∈ t\n⊢ List.bagInter (x :: l₁✝) t ~ List.bagInter (x :: l₂✝) t\n[PROOFSTEP]\nsimp [*, Perm.cons]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nby_cases h : x = y\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : x = y\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nby_cases xt : x ∈ t\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : x ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nby_cases yt : y ∈ t\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : ¬x ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nby_cases yt : y ∈ t\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : x ∈ t\nyt : y ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nsimp [xt, yt, mem_erase_of_ne h, mem_erase_of_ne (Ne.symm h), erase_comm, swap]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : x ∈ t\nyt : ¬y ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nsimp [xt, yt, mt mem_of_mem_erase, Perm.cons]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : ¬x ∈ t\nyt : y ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nsimp [xt, yt, mt mem_of_mem_erase, Perm.cons]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ : List α\nx y : α\nl✝ t : List α\nh : ¬x = y\nxt : ¬x ∈ t\nyt : ¬y ∈ t\n⊢ List.bagInter (y :: x :: l✝) t ~ List.bagInter (x :: y :: l✝) t\n[PROOFSTEP]\nsimp [xt, yt]\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t✝ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih_1 : ∀ (t : List α), List.bagInter l₁✝ t ~ List.bagInter l₂✝ t\nih_2 : ∀ (t : List α), List.bagInter l₂✝ t ~ List.bagInter l₃✝ t\nt : List α\n⊢ List.bagInter l₁✝ t ~ List.bagInter l₃✝ t\n[PROOFSTEP]\nexact (ih_1 _).trans (ih_2 _)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl t₁ t₂ : List α\np : t₁ ~ t₂\n⊢ List.bagInter l t₁ = List.bagInter l t₂\n[PROOFSTEP]\ninduction' l with a l IH generalizing t₁ t₂ p\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁✝ t₂✝ : List α\np✝ : t₁✝ ~ t₂✝\nt₁ t₂ : List α\np : t₁ ~ t₂\n⊢ List.bagInter [] t₁ = List.bagInter [] t₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁✝ t₂✝ : List α\np✝ : t₁✝ ~ t₂✝\na : α\nl : List α\nIH : ∀ {t₁ t₂ : List α}, t₁ ~ t₂ → List.bagInter l t₁ = List.bagInter l t₂\nt₁ t₂ : List α\np : t₁ ~ t₂\n⊢ List.bagInter (a :: l) t₁ = List.bagInter (a :: l) t₂\n[PROOFSTEP]\nby_cases h : a ∈ t₁\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁✝ t₂✝ : List α\np✝ : t₁✝ ~ t₂✝\na : α\nl : List α\nIH : ∀ {t₁ t₂ : List α}, t₁ ~ t₂ → List.bagInter l t₁ = List.bagInter l t₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nh : a ∈ t₁\n⊢ List.bagInter (a :: l) t₁ = List.bagInter (a :: l) t₂\n[PROOFSTEP]\nsimp [h, p.subset h, IH (p.erase _)]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁✝ t₂✝ : List α\np✝ : t₁✝ ~ t₂✝\na : α\nl : List α\nIH : ∀ {t₁ t₂ : List α}, t₁ ~ t₂ → List.bagInter l t₁ = List.bagInter l t₂\nt₁ t₂ : List α\np : t₁ ~ t₂\nh : ¬a ∈ t₁\n⊢ List.bagInter (a :: l) t₁ = List.bagInter (a :: l) t₂\n[PROOFSTEP]\nsimp [h, mt p.mem_iff.2 h, IH p]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nH : ∀ (a : α), count a l₁ = count a l₂\n⊢ l₁ ~ l₂\n[PROOFSTEP]\ninduction' l₁ with a l₁ IH generalizing l₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁ = count a l₂✝\nl₂ : List α\nH : ∀ (a : α), count a [] = count a l₂\n⊢ [] ~ l₂\n[PROOFSTEP]\ncases' l₂ with b l₂\n[GOAL]\ncase nil.nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nH✝ : ∀ (a : α), count a l₁ = count a l₂\nH : ∀ (a : α), count a [] = count a []\n⊢ [] ~ []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁ = count a l₂✝\nb : α\nl₂ : List α\nH : ∀ (a : α), count a [] = count a (b :: l₂)\n⊢ [] ~ b :: l₂\n[PROOFSTEP]\nspecialize H b\n[GOAL]\ncase nil.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁ = count a l₂✝\nb : α\nl₂ : List α\nH : count b [] = count b (b :: l₂)\n⊢ [] ~ b :: l₂\n[PROOFSTEP]\nsimp at H \n[GOAL]\ncase nil.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁ = count a l₂✝\nb : α\nl₂ : List α\nH : 0 = count b l₂ + 1\n⊢ [] ~ b :: l₂\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nH : ∀ (a_1 : α), count a_1 (a :: l₁) = count a_1 l₂\n⊢ a :: l₁ ~ l₂\n[PROOFSTEP]\nhave : a ∈ l₂ := count_pos.1 (by rw [← H]; simp)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nH : ∀ (a_1 : α), count a_1 (a :: l₁) = count a_1 l₂\n⊢ 0 < count a l₂\n[PROOFSTEP]\nrw [← H]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nH : ∀ (a_1 : α), count a_1 (a :: l₁) = count a_1 l₂\n⊢ 0 < count a (a :: l₁)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nH : ∀ (a_1 : α), count a_1 (a :: l₁) = count a_1 l₂\nthis : a ∈ l₂\n⊢ a :: l₁ ~ l₂\n[PROOFSTEP]\nrefine' ((IH fun b => _).cons a).trans (perm_cons_erase this).symm\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nH : ∀ (a_1 : α), count a_1 (a :: l₁) = count a_1 l₂\nthis : a ∈ l₂\nb : α\n⊢ count b l₁ = count b (List.erase l₂ a)\n[PROOFSTEP]\nspecialize H b\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nthis : a ∈ l₂\nb : α\nH : count b (a :: l₁) = count b l₂\n⊢ count b l₁ = count b (List.erase l₂ a)\n[PROOFSTEP]\nrw [(perm_cons_erase this).count_eq] at H \n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nthis : a ∈ l₂\nb : α\nH : count b (a :: l₁) = count b (a :: List.erase l₂ a)\n⊢ count b l₁ = count b (List.erase l₂ a)\n[PROOFSTEP]\nby_cases h : b = a\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nthis : a ∈ l₂\nb : α\nH : count b (a :: l₁) = count b (a :: List.erase l₂ a)\nh : b = a\n⊢ count b l₁ = count b (List.erase l₂ a)\n[PROOFSTEP]\nsimpa [h] using H\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁✝ l₂✝ : List α\nH✝ : ∀ (a : α), count a l₁✝ = count a l₂✝\na : α\nl₁ : List α\nIH : ∀ {l₂ : List α}, (∀ (a : α), count a l₁ = count a l₂) → l₁ ~ l₂\nl₂ : List α\nthis : a ∈ l₂\nb : α\nH : count b (a :: l₁) = count b (a :: List.erase l₂ a)\nh : ¬b = a\n⊢ count b l₁ = count b (List.erase l₂ a)\n[PROOFSTEP]\nsimpa [h] using H\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\n⊢ l ~ replicate m a ++ replicate n b ↔ count a l = m ∧ count b l = n ∧ l ⊆ [a, b]\n[PROOFSTEP]\nrw [perm_iff_count, ← Decidable.and_forall_ne a, ← Decidable.and_forall_ne b]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\n⊢ (count a l = count a (replicate m a ++ replicate n b) ∧\n      (b ≠ a → count b l = count b (replicate m a ++ replicate n b)) ∧\n        ∀ (b_1 : α), b_1 ≠ b → b_1 ≠ a → count b_1 l = count b_1 (replicate m a ++ replicate n b)) ↔\n    count a l = m ∧ count b l = n ∧ l ⊆ [a, b]\n[PROOFSTEP]\nsuffices : l ⊆ [a, b] ↔ ∀ c, c ≠ b → c ≠ a → c ∉ l\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\nthis : l ⊆ [a, b] ↔ ∀ (c : α), c ≠ b → c ≠ a → ¬c ∈ l\n⊢ (count a l = count a (replicate m a ++ replicate n b) ∧\n      (b ≠ a → count b l = count b (replicate m a ++ replicate n b)) ∧\n        ∀ (b_1 : α), b_1 ≠ b → b_1 ≠ a → count b_1 l = count b_1 (replicate m a ++ replicate n b)) ↔\n    count a l = m ∧ count b l = n ∧ l ⊆ [a, b]\ncase this\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\n⊢ l ⊆ [a, b] ↔ ∀ (c : α), c ≠ b → c ≠ a → ¬c ∈ l\n[PROOFSTEP]\n{simp (config := { contextual := true }) [count_replicate, h, h.symm, this]\n}\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\nthis : l ⊆ [a, b] ↔ ∀ (c : α), c ≠ b → c ≠ a → ¬c ∈ l\n⊢ (count a l = count a (replicate m a ++ replicate n b) ∧\n      (b ≠ a → count b l = count b (replicate m a ++ replicate n b)) ∧\n        ∀ (b_1 : α), b_1 ≠ b → b_1 ≠ a → count b_1 l = count b_1 (replicate m a ++ replicate n b)) ↔\n    count a l = m ∧ count b l = n ∧ l ⊆ [a, b]\n[PROOFSTEP]\nsimp (config := { contextual := true }) [count_replicate, h, h.symm, this]\n[GOAL]\ncase this\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\na b : α\nm n : ℕ\nh : a ≠ b\n⊢ l ⊆ [a, b] ↔ ∀ (c : α), c ≠ b → c ≠ a → ¬c ∈ l\n[PROOFSTEP]\nsimp_rw [Ne.def, ← and_imp, ← not_or, Decidable.not_imp_not, subset_def, mem_cons, not_mem_nil, or_false, or_comm]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\n⊢ l₁ ++ List.diff l₂ l₁ ~ l₂\n[PROOFSTEP]\ninduction' l₁ with hd tl IH generalizing l₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nl₂ : List α\nh : ∀ (x : α), x ∈ [] → count x [] ≤ count x l₂\n⊢ [] ++ List.diff l₂ [] ~ l₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\n⊢ hd :: tl ++ List.diff l₂ (hd :: tl) ~ l₂\n[PROOFSTEP]\nhave : hd ∈ l₂ := by\n  rw [← count_pos]\n  exact lt_of_lt_of_le (count_pos.mpr (mem_cons_self _ _)) (h hd (mem_cons_self _ _))\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\n⊢ hd ∈ l₂\n[PROOFSTEP]\nrw [← count_pos]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\n⊢ 0 < count hd l₂\n[PROOFSTEP]\nexact lt_of_lt_of_le (count_pos.mpr (mem_cons_self _ _)) (h hd (mem_cons_self _ _))\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\nthis : hd ∈ l₂\n⊢ hd :: tl ++ List.diff l₂ (hd :: tl) ~ l₂\n[PROOFSTEP]\nreplace := perm_cons_erase this\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\nthis : l₂ ~ hd :: List.erase l₂ hd\n⊢ hd :: tl ++ List.diff l₂ (hd :: tl) ~ l₂\n[PROOFSTEP]\nrefine' Perm.trans _ this.symm\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\nthis : l₂ ~ hd :: List.erase l₂ hd\n⊢ hd :: tl ++ List.diff l₂ (hd :: tl) ~ hd :: List.erase l₂ hd\n[PROOFSTEP]\nrw [cons_append, diff_cons, perm_cons]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\nthis : l₂ ~ hd :: List.erase l₂ hd\n⊢ tl ++ List.diff (List.erase l₂ hd) tl ~ List.erase l₂ hd\n[PROOFSTEP]\nrefine' IH fun x hx => _\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nh : ∀ (x : α), x ∈ hd :: tl → count x (hd :: tl) ≤ count x l₂\nthis : l₂ ~ hd :: List.erase l₂ hd\nx : α\nhx : x ∈ tl\n⊢ count x tl ≤ count x (List.erase l₂ hd)\n[PROOFSTEP]\nspecialize h x (mem_cons_of_mem _ hx)\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nthis : l₂ ~ hd :: List.erase l₂ hd\nx : α\nhx : x ∈ tl\nh : count x (hd :: tl) ≤ count x l₂\n⊢ count x tl ≤ count x (List.erase l₂ hd)\n[PROOFSTEP]\nrw [perm_iff_count.mp this] at h \n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nthis : l₂ ~ hd :: List.erase l₂ hd\nx : α\nhx : x ∈ tl\nh : count x (hd :: tl) ≤ count x (hd :: List.erase l₂ hd)\n⊢ count x tl ≤ count x (List.erase l₂ hd)\n[PROOFSTEP]\nby_cases hx : x = hd\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nthis : l₂ ~ hd :: List.erase l₂ hd\nx : α\nhx✝ : x ∈ tl\nh : count x (hd :: tl) ≤ count x (hd :: List.erase l₂ hd)\nhx : x = hd\n⊢ count x tl ≤ count x (List.erase l₂ hd)\n[PROOFSTEP]\nsubst hd\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nx : α\nhx : x ∈ tl\nthis : l₂ ~ x :: List.erase l₂ x\nh : count x (x :: tl) ≤ count x (x :: List.erase l₂ x)\n⊢ count x tl ≤ count x (List.erase l₂ x)\n[PROOFSTEP]\nsimpa [Nat.succ_le_succ_iff] using h\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂✝ : List α\nh✝ : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂✝\nhd : α\ntl : List α\nIH : ∀ {l₂ : List α}, (∀ (x : α), x ∈ tl → count x tl ≤ count x l₂) → tl ++ List.diff l₂ tl ~ l₂\nl₂ : List α\nthis : l₂ ~ hd :: List.erase l₂ hd\nx : α\nhx✝ : x ∈ tl\nh : count x (hd :: tl) ≤ count x (hd :: List.erase l₂ hd)\nhx : ¬x = hd\n⊢ count x tl ≤ count x (List.erase l₂ hd)\n[PROOFSTEP]\nsimpa [hx] using h\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\n⊢ l₁ <+~ l₂ ↔ ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\n[PROOFSTEP]\nrefine' ⟨fun h x _ => Subperm.count_le h x, fun h => _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\nsuffices l₁ <+~ l₂.diff l₁ ++ l₁ by\n  refine' this.trans (Perm.subperm _)\n  exact perm_append_comm.trans (subperm_append_diff_self_of_count_le h)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nthis : l₁ <+~ List.diff l₂ l₁ ++ l₁\n⊢ l₁ <+~ l₂\n[PROOFSTEP]\nrefine' this.trans (Perm.subperm _)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nthis : l₁ <+~ List.diff l₂ l₁ ++ l₁\n⊢ List.diff l₂ l₁ ++ l₁ ~ l₂\n[PROOFSTEP]\nexact perm_append_comm.trans (subperm_append_diff_self_of_count_le h)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\n⊢ l₁ <+~ List.diff l₂ l₁ ++ l₁\n[PROOFSTEP]\nexact (subperm_append_right l₁).mpr nil_subperm\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nl : List α\na : α\nx✝ : [a] <+~ l\ns : List α\nhla : s ~ [a]\nh : s <+ l\n⊢ a ∈ l\n[PROOFSTEP]\nrwa [perm_singleton.mp hla, singleton_sublist] at h \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh : l₁ <+~ l₂\nx : α\nhx : count x l₁ < count x l₂\n⊢ x :: l₁ <+~ l₂\n[PROOFSTEP]\nrw [subperm_ext_iff] at h ⊢\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\n⊢ ∀ (x_1 : α), x_1 ∈ x :: l₁ → count x_1 (x :: l₁) ≤ count x_1 l₂\n[PROOFSTEP]\nintro y hy\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\ny : α\nhy : y ∈ x :: l₁\n⊢ count y (x :: l₁) ≤ count y l₂\n[PROOFSTEP]\nby_cases hy' : y = x\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\ny : α\nhy : y ∈ x :: l₁\nhy' : y = x\n⊢ count y (x :: l₁) ≤ count y l₂\n[PROOFSTEP]\nsubst x\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\ny : α\nhx : count y l₁ < count y l₂\nhy : y ∈ y :: l₁\n⊢ count y (y :: l₁) ≤ count y l₂\n[PROOFSTEP]\nsimpa using Nat.succ_le_of_lt hx\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\ny : α\nhy : y ∈ x :: l₁\nhy' : ¬y = x\n⊢ count y (x :: l₁) ≤ count y l₂\n[PROOFSTEP]\nrw [count_cons_of_ne hy']\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\ny : α\nhy : y ∈ x :: l₁\nhy' : ¬y = x\n⊢ count y l₁ ≤ count y l₂\n[PROOFSTEP]\nrefine' h y _\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\nh✝ : l₁ <+~ l₂\nh : ∀ (x : α), x ∈ l₁ → count x l₁ ≤ count x l₂\nx : α\nhx : count x l₁ < count x l₂\ny : α\nhy : y ∈ x :: l₁\nhy' : ¬y = x\n⊢ y ∈ l₁\n[PROOFSTEP]\nsimpa [hy'] using hy\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\ninst✝ : DecidableEq α\nb : α\nl₂ : List α\nh : [] ~ b :: l₂\n⊢ False\n[PROOFSTEP]\nhave := h.nil_eq\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂✝ : List α\ninst✝ : DecidableEq α\nb : α\nl₂ : List α\nh : [] ~ b :: l₂\nthis : [] = b :: l₂\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\np : l₁ ~ l₂\na : α\nh : a ∈ l₁\n⊢ count a (List.dedup l₁) = count a (List.dedup l₂)\n[PROOFSTEP]\nsimp [nodup_dedup, h, p.subset h]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ : List α\np : l₁ ~ l₂\na : α\nh : ¬a ∈ l₁\n⊢ count a (List.dedup l₁) = count a (List.dedup l₂)\n[PROOFSTEP]\nsimp [h, mt p.mem_iff.2 h]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nh : a ∈ l₁\n⊢ List.insert a l₁ ~ List.insert a l₂\n[PROOFSTEP]\nsimpa [h, p.subset h] using p\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nh : ¬a ∈ l₁\n⊢ List.insert a l₁ ~ List.insert a l₂\n[PROOFSTEP]\nsimpa [h, mt p.mem_iff.2 h] using p.cons a\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nby_cases xl : x ∈ l\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : x ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nby_cases yl : y ∈ l\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nby_cases yl : y ∈ l\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : x ∈ l\nyl : y ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nsimp [xl, yl]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : x ∈ l\nyl : ¬y ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nsimp [xl, yl]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : y ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nsimp [xl, yl]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : ¬y ∈ l\n⊢ List.insert x (List.insert y l) ~ List.insert y (List.insert x l)\n[PROOFSTEP]\nsimp [xl, yl]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : ¬y ∈ l\n⊢ List.insert x (y :: l) ~ List.insert y (x :: l)\n[PROOFSTEP]\nby_cases xy : x = y\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : ¬y ∈ l\nxy : x = y\n⊢ List.insert x (y :: l) ~ List.insert y (x :: l)\n[PROOFSTEP]\nsimp [xy]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : ¬y ∈ l\nxy : ¬x = y\n⊢ List.insert x (y :: l) ~ List.insert y (x :: l)\n[PROOFSTEP]\nsimp [List.insert, xl, yl, xy, Ne.symm xy]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx y : α\nl : List α\nxl : ¬x ∈ l\nyl : ¬y ∈ l\nxy : ¬x = y\n⊢ x :: y :: l ~ y :: x :: l\n[PROOFSTEP]\nconstructor\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh : n ≤ length l\n⊢ insertNth n x l ~ x :: l\n[PROOFSTEP]\ninduction' l with _ _ l_ih generalizing n\n[GOAL]\ncase nil\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length l\nn : ℕ\nh : n ≤ length []\n⊢ insertNth n x [] ~ [x]\n[PROOFSTEP]\ncases n\n[GOAL]\ncase nil.zero\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nh : zero ≤ length []\n⊢ insertNth zero x [] ~ [x]\ncase nil.succ\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nn✝ : ℕ\nh : succ n✝ ≤ length []\n⊢ insertNth (succ n✝) x [] ~ [x]\n[PROOFSTEP]\nrfl\n[GOAL]\ncase nil.succ\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nn✝ : ℕ\nh : succ n✝ ≤ length []\n⊢ insertNth (succ n✝) x [] ~ [x]\n[PROOFSTEP]\ncases h\n[GOAL]\ncase cons\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn✝ : ℕ\nh✝ : n✝ ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nn : ℕ\nh : n ≤ length (head✝ :: tail✝)\n⊢ insertNth n x (head✝ :: tail✝) ~ x :: head✝ :: tail✝\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nh : zero ≤ length (head✝ :: tail✝)\n⊢ insertNth zero x (head✝ :: tail✝) ~ x :: head✝ :: tail✝\n[PROOFSTEP]\nsimp [insertNth]\n[GOAL]\ncase cons.succ\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nn✝ : ℕ\nh : succ n✝ ≤ length (head✝ :: tail✝)\n⊢ insertNth (succ n✝) x (head✝ :: tail✝) ~ x :: head✝ :: tail✝\n[PROOFSTEP]\nsimp only [insertNth, modifyNthTail]\n[GOAL]\ncase cons.succ\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nn✝ : ℕ\nh : succ n✝ ≤ length (head✝ :: tail✝)\n⊢ head✝ :: modifyNthTail (cons x) n✝ tail✝ ~ x :: head✝ :: tail✝\n[PROOFSTEP]\nrefine' Perm.trans (Perm.cons _ (l_ih _)) _\n[GOAL]\ncase cons.succ.refine'_1\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nn✝ : ℕ\nh : succ n✝ ≤ length (head✝ :: tail✝)\n⊢ n✝ ≤ length tail✝\n[PROOFSTEP]\napply Nat.le_of_succ_le_succ h\n[GOAL]\ncase cons.succ.refine'_2\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\ninst✝ : DecidableEq α✝\nα : Type u_1\nx : α\nl : List α\nn : ℕ\nh✝ : n ≤ length l\nhead✝ : α\ntail✝ : List α\nl_ih : ∀ {n : ℕ}, n ≤ length tail✝ → insertNth n x tail✝ ~ x :: tail✝\nn✝ : ℕ\nh : succ n✝ ≤ length (head✝ :: tail✝)\n⊢ head✝ :: x :: tail✝ ~ x :: head✝ :: tail✝\n[PROOFSTEP]\napply Perm.swap\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\nh : l₁ ~ l₂\n⊢ l₁ ∪ t₁ ~ l₂ ∪ t₁\n[PROOFSTEP]\ninduction' h with a _ _ _ ih _ _ _ _ _ _ _ _ ih_1 ih_2\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\n⊢ [] ∪ t₁ ~ [] ∪ t₁\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\n⊢ [] ∪ t₁ ~ [] ∪ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\na : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nih : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\n⊢ a :: l₁✝ ∪ t₁ ~ a :: l₂✝ ∪ t₁\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\na : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nih : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\n⊢ a :: l₁✝ ∪ t₁ ~ a :: l₂✝ ∪ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\nx✝ y✝ : α\nl✝ : List α\n⊢ y✝ :: x✝ :: l✝ ∪ t₁ ~ x✝ :: y✝ :: l✝ ∪ t₁\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\nx✝ y✝ : α\nl✝ : List α\n⊢ y✝ :: x✝ :: l✝ ∪ t₁ ~ x✝ :: y✝ :: l✝ ∪ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih_1 : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\nih_2 : l₂✝ ∪ t₁ ~ l₃✝ ∪ t₁\n⊢ l₁✝ ∪ t₁ ~ l₃✝ ∪ t₁\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih_1 : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\nih_2 : l₂✝ ∪ t₁ ~ l₃✝ ∪ t₁\n⊢ l₁✝ ∪ t₁ ~ l₃✝ ∪ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\na : α\nl₁✝ l₂✝ : List α\na✝ : l₁✝ ~ l₂✝\nih : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\n⊢ List.insert a (l₁✝ ∪ t₁) ~ List.insert a (l₂✝ ∪ t₁)\n[PROOFSTEP]\nexact ih.insert a\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ : List α\nx✝ y✝ : α\nl✝ : List α\n⊢ List.insert y✝ (List.insert x✝ (l✝ ∪ t₁)) ~ List.insert x✝ (List.insert y✝ (l✝ ∪ t₁))\n[PROOFSTEP]\napply perm_insert_swap\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\ninst✝ : DecidableEq α\nl₁ l₂ t₁ l₁✝ l₂✝ l₃✝ : List α\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\nih_1 : l₁✝ ∪ t₁ ~ l₂✝ ∪ t₁\nih_2 : l₂✝ ∪ t₁ ~ l₃✝ ∪ t₁\n⊢ l₁✝ ∪ t₁ ~ l₃✝ ∪ t₁\n[PROOFSTEP]\nexact ih_1.trans ih_2\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl t₁ t₂ : List α\nh : t₁ ~ t₂\n⊢ l ∪ t₁ ~ l ∪ t₂\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : t₁ ~ t₂\n⊢ [] ∪ t₁ ~ [] ∪ t₂\n[PROOFSTEP]\nsimp [*, Perm.insert]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : t₁ ~ t₂\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ∪ t₁ ~ tail✝ ∪ t₂\n⊢ head✝ :: tail✝ ∪ t₁ ~ head✝ :: tail✝ ∪ t₂\n[PROOFSTEP]\nsimp [*, Perm.insert]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl t₁ t₂ : List α\np : t₁ ~ t₂\na : α\nx✝ : a ∈ l\n⊢ decide (a ∈ t₁) = true ↔ decide (a ∈ t₂) = true\n[PROOFSTEP]\nsimpa using p.mem_iff\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl t₁ t₂ : List α\nh : Disjoint t₁ t₂\n⊢ l ∩ (t₁ ++ t₂) ~ l ∩ t₁ ++ l ∩ t₂\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\n⊢ [] ∩ (t₁ ++ t₂) ~ [] ∩ t₁ ++ [] ∩ t₂\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ∩ (t₁ ++ t₂) ~ tail✝ ∩ t₁ ++ tail✝ ∩ t₂\n⊢ (head✝ :: tail✝) ∩ (t₁ ++ t₂) ~ (head✝ :: tail✝) ∩ t₁ ++ (head✝ :: tail✝) ∩ t₂\n[PROOFSTEP]\ncase nil => simp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\n⊢ [] ∩ (t₁ ++ t₂) ~ [] ∩ t₁ ++ [] ∩ t₂\n[PROOFSTEP]\ncase nil => simp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\n⊢ [] ∩ (t₁ ++ t₂) ~ [] ∩ t₁ ++ [] ∩ t₂\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : tail✝ ∩ (t₁ ++ t₂) ~ tail✝ ∩ t₁ ++ tail✝ ∩ t₂\n⊢ (head✝ :: tail✝) ∩ (t₁ ++ t₂) ~ (head✝ :: tail✝) ∩ t₁ ++ (head✝ :: tail✝) ∩ t₂\n[PROOFSTEP]\ncase cons x xs l_ih =>\n  by_cases h₁ : x ∈ t₁\n  · have h₂ : x ∉ t₂ := h h₁\n    simp [*]\n  by_cases h₂ : x ∈ t₂\n  · simp only [*, inter_cons_of_not_mem, false_or_iff, mem_append, inter_cons_of_mem, not_false_iff]\n    refine' Perm.trans (Perm.cons _ l_ih) _\n    change [x] ++ xs ∩ t₁ ++ xs ∩ t₂ ~ xs ∩ t₁ ++ ([x] ++ xs ∩ t₂)\n    rw [← List.append_assoc]\n    solve_by_elim [Perm.append_right, perm_append_comm]\n  · simp [*]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\ncase cons x xs l_ih =>\n  by_cases h₁ : x ∈ t₁\n  · have h₂ : x ∉ t₂ := h h₁\n    simp [*]\n  by_cases h₂ : x ∈ t₂\n  · simp only [*, inter_cons_of_not_mem, false_or_iff, mem_append, inter_cons_of_mem, not_false_iff]\n    refine' Perm.trans (Perm.cons _ l_ih) _\n    change [x] ++ xs ∩ t₁ ++ xs ∩ t₂ ~ xs ∩ t₁ ++ ([x] ++ xs ∩ t₂)\n    rw [← List.append_assoc]\n    solve_by_elim [Perm.append_right, perm_append_comm]\n  · simp [*]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nby_cases h₁ : x ∈ t₁\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : x ∈ t₁\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nhave h₂ : x ∉ t₂ := h h₁\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : x ∈ t₁\nh₂ : ¬x ∈ t₂\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nby_cases h₂ : x ∈ t₂\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : x ∈ t₂\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nsimp only [*, inter_cons_of_not_mem, false_or_iff, mem_append, inter_cons_of_mem, not_false_iff]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : x ∈ t₂\n⊢ x :: xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ x :: xs ∩ t₂\n[PROOFSTEP]\nrefine' Perm.trans (Perm.cons _ l_ih) _\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : x ∈ t₂\n⊢ x :: (xs ∩ t₁ ++ xs ∩ t₂) ~ xs ∩ t₁ ++ x :: xs ∩ t₂\n[PROOFSTEP]\nchange [x] ++ xs ∩ t₁ ++ xs ∩ t₂ ~ xs ∩ t₁ ++ ([x] ++ xs ∩ t₂)\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : x ∈ t₂\n⊢ [x] ++ xs ∩ t₁ ++ xs ∩ t₂ ~ xs ∩ t₁ ++ ([x] ++ xs ∩ t₂)\n[PROOFSTEP]\nrw [← List.append_assoc]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : x ∈ t₂\n⊢ [x] ++ xs ∩ t₁ ++ xs ∩ t₂ ~ xs ∩ t₁ ++ [x] ++ xs ∩ t₂\n[PROOFSTEP]\nsolve_by_elim [Perm.append_right, perm_append_comm]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nt₁ t₂ : List α\nh : Disjoint t₁ t₂\nx : α\nxs : List α\nl_ih : xs ∩ (t₁ ++ t₂) ~ xs ∩ t₁ ++ xs ∩ t₂\nh₁ : ¬x ∈ t₁\nh₂ : ¬x ∈ t₂\n⊢ (x :: xs) ∩ (t₁ ++ t₂) ~ (x :: xs) ∩ t₁ ++ (x :: xs) ∩ t₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝ l₂✝ l₁ l₂ : List α\np : l₁ ~ l₂\nd : Pairwise R l₁\n⊢ Pairwise R l₂\n[PROOFSTEP]\ninduction' d with a l₁ h _ IH generalizing l₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝² : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝ l₂✝¹ l₁ l₂✝ : List α\np✝ : l₁ ~ l₂✝\nl₂ : List α\np : [] ~ l₂\n⊢ Pairwise R l₂\n[PROOFSTEP]\nrw [← p.nil_eq]\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝² : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝ l₂✝¹ l₁ l₂✝ : List α\np✝ : l₁ ~ l₂✝\nl₂ : List α\np : [] ~ l₂\n⊢ Pairwise R []\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝² l₂✝² : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α\np✝ : l₁✝ ~ l₂✝\na : α\nl₁ : List α\nh : ∀ (a' : α), a' ∈ l₁ → R a a'\na✝ : Pairwise R l₁\nIH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂\nl₂ : List α\np : a :: l₁ ~ l₂\n⊢ Pairwise R l₂\n[PROOFSTEP]\nhave : a ∈ l₂ := p.subset (mem_cons_self _ _)\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝² l₂✝² : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝¹ l₂✝¹ l₁✝ l₂✝ : List α\np✝ : l₁✝ ~ l₂✝\na : α\nl₁ : List α\nh : ∀ (a' : α), a' ∈ l₁ → R a a'\na✝ : Pairwise R l₁\nIH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂\nl₂ : List α\np : a :: l₁ ~ l₂\nthis : a ∈ l₂\n⊢ Pairwise R l₂\n[PROOFSTEP]\nrcases mem_split this with ⟨s₂, t₂, rfl⟩\n[GOAL]\ncase cons.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝² l₂✝¹ : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝¹ l₂✝ l₁✝ l₂ : List α\np✝ : l₁✝ ~ l₂\na : α\nl₁ : List α\nh : ∀ (a' : α), a' ∈ l₁ → R a a'\na✝ : Pairwise R l₁\nIH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂\ns₂ t₂ : List α\np : a :: l₁ ~ s₂ ++ a :: t₂\nthis : a ∈ s₂ ++ a :: t₂\n⊢ Pairwise R (s₂ ++ a :: t₂)\n[PROOFSTEP]\nhave p' := (p.trans perm_middle).cons_inv\n[GOAL]\ncase cons.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝² l₂✝¹ : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝¹ l₂✝ l₁✝ l₂ : List α\np✝ : l₁✝ ~ l₂\na : α\nl₁ : List α\nh : ∀ (a' : α), a' ∈ l₁ → R a a'\na✝ : Pairwise R l₁\nIH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂\ns₂ t₂ : List α\np : a :: l₁ ~ s₂ ++ a :: t₂\nthis : a ∈ s₂ ++ a :: t₂\np' : l₁ ~ s₂ ++ t₂\n⊢ Pairwise R (s₂ ++ a :: t₂)\n[PROOFSTEP]\nrefine' (pairwise_middle S).2 (pairwise_cons.2 ⟨fun b m => _, IH _ p'⟩)\n[GOAL]\ncase cons.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝² l₂✝¹ : List α\nR : α → α → Prop\nS : Symmetric R\nl₁✝¹ l₂✝ l₁✝ l₂ : List α\np✝ : l₁✝ ~ l₂\na : α\nl₁ : List α\nh : ∀ (a' : α), a' ∈ l₁ → R a a'\na✝ : Pairwise R l₁\nIH : ∀ (l₂ : List α), l₁ ~ l₂ → Pairwise R l₂\ns₂ t₂ : List α\np : a :: l₁ ~ s₂ ++ a :: t₂\nthis : a ∈ s₂ ++ a :: t₂\np' : l₁ ~ s₂ ++ t₂\nb : α\nm : b ∈ s₂ ++ t₂\n⊢ R a b\n[PROOFSTEP]\nexact h _ (p'.symm.subset m)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nl₁ l₂ : List (List α)\nh : l₁ ~ l₂\nx₁ x₂ : List α\nxs : List (List α)\n⊢ List.join (x₂ :: x₁ :: xs) ~ List.join (x₁ :: x₂ :: xs)\n[PROOFSTEP]\nsimpa only [join, append_assoc] using perm_append_comm.append_right _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\nf g : α → List β\nh : ∀ (a : α), a ∈ l → f a ~ g a\n⊢ Forall₂ (fun x x_1 => x ~ x_1) (List.map f l) (List.map g l)\n[PROOFSTEP]\nrwa [List.forall₂_map_right_iff, List.forall₂_map_left_iff, List.forall₂_same]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\nf g : α → List β\n⊢ List.bind l f ++ List.bind l g ~ List.bind l fun x => f x ++ g x\n[PROOFSTEP]\ninduction' l with a l IH\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nf g : α → List β\n⊢ List.bind [] f ++ List.bind [] g ~ List.bind [] fun x => f x ++ g x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nf g : α → List β\na : α\nl : List α\nIH : List.bind l f ++ List.bind l g ~ List.bind l fun x => f x ++ g x\n⊢ List.bind (a :: l) f ++ List.bind (a :: l) g ~ List.bind (a :: l) fun x => f x ++ g x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nf g : α → List β\na : α\nl : List α\nIH : List.bind l f ++ List.bind l g ~ List.bind l fun x => f x ++ g x\n⊢ f a ++ (List.bind l f ++ (g a ++ List.bind l g)) ~ f a ++ (g a ++ List.bind l fun x => f x ++ g x)\n[PROOFSTEP]\nrefine' (Perm.trans _ (IH.append_left _)).append_left _\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nf g : α → List β\na : α\nl : List α\nIH : List.bind l f ++ List.bind l g ~ List.bind l fun x => f x ++ g x\n⊢ List.bind l f ++ (g a ++ List.bind l g) ~ g a ++ (List.bind l f ++ List.bind l g)\n[PROOFSTEP]\nrw [← append_assoc, ← append_assoc]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nf g : α → List β\na : α\nl : List α\nIH : List.bind l f ++ List.bind l g ~ List.bind l fun x => f x ++ g x\n⊢ List.bind l f ++ g a ++ List.bind l g ~ g a ++ List.bind l f ++ List.bind l g\n[PROOFSTEP]\nexact perm_append_comm.append_right _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ l : List α\nf : α → β\ng : α → List β\n⊢ map f l ++ List.bind l g ~ List.bind l fun x => f x :: g x\n[PROOFSTEP]\nsimpa [← map_eq_bind] using bind_append_perm l (fun x => [f x]) g\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\np : l₁ ~ l₂\n⊢ lookmap f l₁ ~ lookmap f l₂\n[PROOFSTEP]\ninduction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ p₁ _ IH₁ IH₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) []\n⊢ lookmap f [] ~ lookmap f []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (a :: l₁)\n⊢ lookmap f (a :: l₁) ~ lookmap f (a :: l₂)\n[PROOFSTEP]\ncases h : f a\n[GOAL]\ncase cons.none\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (a :: l₁)\nh : f a = none\n⊢ lookmap f (a :: l₁) ~ lookmap f (a :: l₂)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase cons.none\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (a :: l₁)\nh : f a = none\n⊢ lookmap f l₁ ~ lookmap f l₂\n[PROOFSTEP]\nexact IH (pairwise_cons.1 H).2\n[GOAL]\ncase cons.some\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (a :: l₁)\nval✝ : α\nh : f a = some val✝\n⊢ lookmap f (a :: l₁) ~ lookmap f (a :: l₂)\n[PROOFSTEP]\nsimp [lookmap_cons_some _ _ h, p]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\ncases' h₁ : f a with c\n[GOAL]\ncase swap.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nh₁ : f a = none\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\ncases' h₂ : f b with d\n[GOAL]\ncase swap.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nc : α\nh₁ : f a = some c\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\ncases' h₂ : f b with d\n[GOAL]\ncase swap.none.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nh₁ : f a = none\nh₂ : f b = none\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase swap.none.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nh₁ : f a = none\nh₂ : f b = none\n⊢ b :: a :: lookmap f l ~ a :: b :: lookmap f l\n[PROOFSTEP]\napply swap\n[GOAL]\ncase swap.none.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nh₁ : f a = none\nd : α\nh₂ : f b = some d\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, lookmap_cons_some _ _ h₂]\n[GOAL]\ncase swap.none.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nh₁ : f a = none\nd : α\nh₂ : f b = some d\n⊢ d :: a :: l ~ a :: d :: l\n[PROOFSTEP]\napply swap\n[GOAL]\ncase swap.some.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nc : α\nh₁ : f a = some c\nh₂ : f b = none\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\nsimp [lookmap_cons_some _ _ h₁, h₂]\n[GOAL]\ncase swap.some.none\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nc : α\nh₁ : f a = some c\nh₂ : f b = none\n⊢ b :: c :: l ~ c :: b :: l\n[PROOFSTEP]\napply swap\n[GOAL]\ncase swap.some.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nc : α\nh₁ : f a = some c\nd : α\nh₂ : f b = some d\n⊢ lookmap f (b :: a :: l) ~ lookmap f (a :: b :: l)\n[PROOFSTEP]\nsimp [lookmap_cons_some _ _ h₁, lookmap_cons_some _ _ h₂]\n[GOAL]\ncase swap.some.some\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: a :: l)\nc : α\nh₁ : f a = some c\nd : α\nh₂ : f b = some d\n⊢ d :: a :: l ~ c :: b :: l\n[PROOFSTEP]\nrcases(pairwise_cons.1 H).1 _ (mem_cons.2 (Or.inl rfl)) _ h₂ _ h₁ with ⟨rfl, rfl⟩\n[GOAL]\ncase swap.some.some.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Option α\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\nb : α\nl : List α\nd : α\nh₂ : f b = some d\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) (b :: b :: l)\nh₁ : f b = some d\n⊢ d :: b :: l ~ d :: b :: l\n[PROOFSTEP]\nexact Perm.refl _\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\nl₁ l₂ l₃ : List α\np₁ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nIH₂ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₂ → lookmap f l₂ ~ lookmap f l₃\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\n⊢ lookmap f l₁ ~ lookmap f l₃\n[PROOFSTEP]\nrefine' (IH₁ H).trans (IH₂ ((p₁.pairwise_iff _).1 H))\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Option α\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁✝\nl₁ l₂ l₃ : List α\np₁ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁ → lookmap f l₁ ~ lookmap f l₂\nIH₂ : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₂ → lookmap f l₂ ~ lookmap f l₃\nH : Pairwise (fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d) l₁\n⊢ Symmetric fun a b => ∀ (c : α), c ∈ f a → ∀ (d : α), d ∈ f b → a = b ∧ c = d\n[PROOFSTEP]\nexact fun a b h c h₁ d h₂ => (h d h₂ c h₁).imp Eq.symm Eq.symm\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH : Pairwise (fun a b => f a → f b → False) l₁\np : l₁ ~ l₂\n⊢ eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\n[PROOFSTEP]\ninduction' p with a l₁ l₂ p IH a b l l₁ l₂ l₃ p₁ _ IH₁ IH₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\nH : Pairwise (fun a b => f a → f b → False) []\n⊢ eraseP (fun b => decide (f b)) [] ~ eraseP (fun b => decide (f b)) []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nH : Pairwise (fun a b => f a → f b → False) (a :: l₁)\n⊢ eraseP (fun b => decide (f b)) (a :: l₁) ~ eraseP (fun b => decide (f b)) (a :: l₂)\n[PROOFSTEP]\nby_cases h : f a\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nH : Pairwise (fun a b => f a → f b → False) (a :: l₁)\nh : f a\n⊢ eraseP (fun b => decide (f b)) (a :: l₁) ~ eraseP (fun b => decide (f b)) (a :: l₂)\n[PROOFSTEP]\nsimp [h, p]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nH : Pairwise (fun a b => f a → f b → False) (a :: l₁)\nh : ¬f a\n⊢ eraseP (fun b => decide (f b)) (a :: l₁) ~ eraseP (fun b => decide (f b)) (a :: l₂)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\na : α\nl₁ l₂ : List α\np : l₁ ~ l₂\nIH : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nH : Pairwise (fun a b => f a → f b → False) (a :: l₁)\nh : ¬f a\n⊢ eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\n[PROOFSTEP]\nexact IH (pairwise_cons.1 H).2\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nby_cases h₁ : f a\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : f a\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nby_cases h₂ : f b\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : ¬f a\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nby_cases h₂ : f b\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : f a\nh₂ : f b\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : f a\nh₂ : ¬f b\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : ¬f a\nh₂ : f b\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : ¬f a\nh₂ : ¬f b\n⊢ eraseP (fun b => decide (f b)) (b :: a :: l) ~ eraseP (fun b => decide (f b)) (a :: b :: l)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : f a\nh₂ : f b\n⊢ a :: l ~ b :: l\n[PROOFSTEP]\ncases (pairwise_cons.1 H).1 _ (mem_cons.2 (Or.inl rfl)) h₂ h₁\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁ l₂ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁\na b : α\nl : List α\nH : Pairwise (fun a b => f a → f b → False) (b :: a :: l)\nh₁ : ¬f a\nh₂ : ¬f b\n⊢ b :: a :: eraseP (fun b => decide (f b)) l ~ a :: b :: eraseP (fun b => decide (f b)) l\n[PROOFSTEP]\napply swap\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\nl₁ l₂ l₃ : List α\np₁ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nIH₂ : Pairwise (fun a b => f a → f b → False) l₂ → eraseP (fun b => decide (f b)) l₂ ~ eraseP (fun b => decide (f b)) l₃\nH : Pairwise (fun a b => f a → f b → False) l₁\n⊢ eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₃\n[PROOFSTEP]\nrefine' (IH₁ H).trans (IH₂ ((p₁.pairwise_iff _).1 H))\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁✝¹ l₂✝¹ : List α\nf : α → Prop\ninst✝ : DecidablePred f\nl₁✝ l₂✝ : List α\nH✝ : Pairwise (fun a b => f a → f b → False) l₁✝\nl₁ l₂ l₃ : List α\np₁ : l₁ ~ l₂\na✝ : l₂ ~ l₃\nIH₁ : Pairwise (fun a b => f a → f b → False) l₁ → eraseP (fun b => decide (f b)) l₁ ~ eraseP (fun b => decide (f b)) l₂\nIH₂ : Pairwise (fun a b => f a → f b → False) l₂ → eraseP (fun b => decide (f b)) l₂ ~ eraseP (fun b => decide (f b)) l₃\nH : Pairwise (fun a b => f a → f b → False) l₁\n⊢ Symmetric fun a b => f a → f b → False\n[PROOFSTEP]\nexact fun a b h h₁ h₂ => h h₂ h₁\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ take n xs ~ List.inter ys (take n xs)\n[PROOFSTEP]\nsimp only [List.inter]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ take n xs ~ List.filter (fun x => decide (x ∈ take n xs)) ys\n[PROOFSTEP]\nexact\n  Perm.trans\n    (show xs.take n ~ xs.filter (· ∈ xs.take n) by conv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')])\n    (Perm.filter _ h)\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ take n xs ~ List.filter (fun x => decide (x ∈ take n xs)) xs\n[PROOFSTEP]\nconv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n| take n xs\n[PROOFSTEP]\nrw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n| take n xs\n[PROOFSTEP]\nrw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n| take n xs\n[PROOFSTEP]\nrw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nby_cases h'' : n ≤ xs.length\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nlet n' := xs.length - n\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nhave h₀ : n = xs.length - n' := by rwa [tsub_tsub_cancel_of_le]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\n⊢ n = length xs - n'\n[PROOFSTEP]\nrwa [tsub_tsub_cancel_of_le]\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nhave h₁ : n' ≤ xs.length := by apply tsub_le_self\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\n⊢ n' ≤ length xs\n[PROOFSTEP]\napply tsub_le_self\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nhave h₂ : xs.drop n = (xs.reverse.take n').reverse := by rw [reverse_take _ h₁, h₀, reverse_reverse]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\n⊢ drop n xs = reverse (take n' (reverse xs))\n[PROOFSTEP]\nrw [reverse_take _ h₁, h₀, reverse_reverse]\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ reverse (take n' (reverse xs)) ~ List.inter ys (reverse (take n' (reverse xs)))\n[PROOFSTEP]\napply (reverse_perm _).trans\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ take n' (reverse xs) ~ List.inter ys (reverse (take n' (reverse xs)))\n[PROOFSTEP]\nrw [inter_reverse]\n[GOAL]\ncase pos\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ take n' (reverse xs) ~ List.inter ys (take n' (reverse xs))\n[PROOFSTEP]\napply Perm.take_inter _ _ h'\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ reverse xs ~ ys\n[PROOFSTEP]\napply (reverse_perm _).trans\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : n ≤ length xs\nn' : ℕ := length xs - n\nh₀ : n = length xs - n'\nh₁ : n' ≤ length xs\nh₂ : drop n xs = reverse (take n' (reverse xs))\n⊢ xs ~ ys\n[PROOFSTEP]\nassumption\n[GOAL]\ncase neg\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : ¬n ≤ length xs\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nhave : drop n xs = [] := by\n  apply eq_nil_of_length_eq_zero\n  rw [length_drop, tsub_eq_zero_iff_le]\n  apply le_of_not_ge h''\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : ¬n ≤ length xs\n⊢ drop n xs = []\n[PROOFSTEP]\napply eq_nil_of_length_eq_zero\n[GOAL]\ncase x\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : ¬n ≤ length xs\n⊢ length (drop n xs) = 0\n[PROOFSTEP]\nrw [length_drop, tsub_eq_zero_iff_le]\n[GOAL]\ncase x\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : ¬n ≤ length xs\n⊢ length xs ≤ n\n[PROOFSTEP]\napply le_of_not_ge h''\n[GOAL]\ncase neg\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn : ℕ\nh : xs ~ ys\nh' : Nodup ys\nh'' : ¬n ≤ length xs\nthis : drop n xs = []\n⊢ drop n xs ~ List.inter ys (drop n xs)\n[PROOFSTEP]\nsimp [this, List.inter]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ dropSlice n m xs ~ ys ∩ dropSlice n m xs\n[PROOFSTEP]\nsimp only [dropSlice_eq]\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\n⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)\n[PROOFSTEP]\nhave : n ≤ n + m := Nat.le_add_right _ _\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\nthis : n ≤ n + m\n⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)\n[PROOFSTEP]\nhave h₂ := h.nodup_iff.2 h'\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\nthis : n ≤ n + m\nh₂ : Nodup xs\n⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)\n[PROOFSTEP]\napply Perm.trans _ (Perm.inter_append _).symm\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\nthis : n ≤ n + m\nh₂ : Nodup xs\n⊢ take n xs ++ drop (n + m) xs ~ ys ∩ take n xs ++ ys ∩ drop (n + m) xs\n[PROOFSTEP]\nexact Perm.append (Perm.take_inter _ h h') (Perm.drop_inter _ h h')\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nxs ys : List α\nn m : ℕ\nh : xs ~ ys\nh' : Nodup ys\nthis : n ≤ n + m\nh₂ : Nodup xs\n⊢ Disjoint (take n xs) (drop (n + m) xs)\n[PROOFSTEP]\nexact disjoint_take_drop h₂ this\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ {ts is l : List α}, l ∈ permutationsAux ts is → l ~ ts ++ is\n[PROOFSTEP]\nshow ∀ (ts is l : List α), l ∈ permutationsAux ts is → l ~ ts ++ is\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (ts is l : List α), l ∈ permutationsAux ts is → l ~ ts ++ is\n[PROOFSTEP]\nrefine' permutationsAux.rec (by simp) _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (is l : List α), l ∈ permutationsAux [] is → l ~ [] ++ is\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (t : α) (ts is : List α),\n    (∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is) →\n      (∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []) →\n        ∀ (l : List α), l ∈ permutationsAux (t :: ts) is → l ~ t :: ts ++ is\n[PROOFSTEP]\nintrov IH1 IH2 m\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl : List α\nm : l ∈ permutationsAux (t :: ts) is\n⊢ l ~ t :: ts ++ is\n[PROOFSTEP]\nrw [permutationsAux_cons, permutations, mem_foldr_permutationsAux2] at m \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl : List α\nm :\n  l ∈ permutationsAux ts (t :: is) ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ is :: permutationsAux is [] ∧ l₂ ≠ [] ∧ l = l₁ ++ t :: l₂ ++ ts\n⊢ l ~ t :: ts ++ is\n[PROOFSTEP]\nrcases m with (m | ⟨l₁, l₂, m, _, e⟩)\n[GOAL]\ncase inl\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl : List α\nm : l ∈ permutationsAux ts (t :: is)\n⊢ l ~ t :: ts ++ is\n[PROOFSTEP]\nexact (IH1 _ m).trans perm_middle\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl l₁ l₂ : List α\nm : l₁ ++ l₂ ∈ is :: permutationsAux is []\nleft✝ : l₂ ≠ []\ne : l = l₁ ++ t :: l₂ ++ ts\n⊢ l ~ t :: ts ++ is\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nm : l₁ ++ l₂ ∈ is :: permutationsAux is []\nleft✝ : l₂ ≠ []\n⊢ l₁ ++ t :: l₂ ++ ts ~ t :: ts ++ is\n[PROOFSTEP]\nhave p : l₁ ++ l₂ ~ is := by\n  simp [permutations] at m \n  cases' m with e m\n  · simp [e]\n  exact is.append_nil ▸ IH2 _ m\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nm : l₁ ++ l₂ ∈ is :: permutationsAux is []\nleft✝ : l₂ ≠ []\n⊢ l₁ ++ l₂ ~ is\n[PROOFSTEP]\nsimp [permutations] at m \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nleft✝ : l₂ ≠ []\nm : l₁ ++ l₂ = is ∨ l₁ ++ l₂ ∈ permutationsAux is []\n⊢ l₁ ++ l₂ ~ is\n[PROOFSTEP]\ncases' m with e m\n[GOAL]\ncase inl\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nleft✝ : l₂ ≠ []\ne : l₁ ++ l₂ = is\n⊢ l₁ ++ l₂ ~ is\n[PROOFSTEP]\nsimp [e]\n[GOAL]\ncase inr\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nleft✝ : l₂ ≠ []\nm : l₁ ++ l₂ ∈ permutationsAux is []\n⊢ l₁ ++ l₂ ~ is\n[PROOFSTEP]\nexact is.append_nil ▸ IH2 _ m\n[GOAL]\ncase inr.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ∈ permutationsAux ts (t :: is) → l ~ ts ++ t :: is\nIH2 : ∀ (l : List α), l ∈ permutationsAux is [] → l ~ is ++ []\nl₁ l₂ : List α\nm : l₁ ++ l₂ ∈ is :: permutationsAux is []\nleft✝ : l₂ ≠ []\np : l₁ ++ l₂ ~ is\n⊢ l₁ ++ t :: l₂ ++ ts ~ t :: ts ++ is\n[PROOFSTEP]\nexact ((perm_middle.trans (p.cons _)).append_right _).trans (perm_append_comm.cons _)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (ts is : List α), length (permutationsAux ts is) + (length is)! = (length ts + length is)!\n[PROOFSTEP]\nrefine' permutationsAux.rec (by simp) _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (is : List α), length (permutationsAux [] is) + (length is)! = (length [] + length is)!\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (t : α) (ts is : List α),\n    length (permutationsAux ts (t :: is)) + (length (t :: is))! = (length ts + length (t :: is))! →\n      length (permutationsAux is []) + (length [])! = (length is + length [])! →\n        length (permutationsAux (t :: ts) is) + (length is)! = (length (t :: ts) + length is)!\n[PROOFSTEP]\nintro t ts is IH1 IH2\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : length (permutationsAux ts (t :: is)) + (length (t :: is))! = (length ts + length (t :: is))!\nIH2 : length (permutationsAux is []) + (length [])! = (length is + length [])!\n⊢ length (permutationsAux (t :: ts) is) + (length is)! = (length (t :: ts) + length is)!\n[PROOFSTEP]\nhave IH2 : length (permutationsAux is nil) + 1 = is.length ! := by simpa using IH2\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : length (permutationsAux ts (t :: is)) + (length (t :: is))! = (length ts + length (t :: is))!\nIH2 : length (permutationsAux is []) + (length [])! = (length is + length [])!\n⊢ length (permutationsAux is []) + 1 = (length is)!\n[PROOFSTEP]\nsimpa using IH2\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : length (permutationsAux ts (t :: is)) + (length (t :: is))! = (length ts + length (t :: is))!\nIH2✝ : length (permutationsAux is []) + (length [])! = (length is + length [])!\nIH2 : length (permutationsAux is []) + 1 = (length is)!\n⊢ length (permutationsAux (t :: ts) is) + (length is)! = (length (t :: ts) + length is)!\n[PROOFSTEP]\nsimp [Nat.factorial, Nat.add_succ, mul_comm] at IH1 \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH2✝ : length (permutationsAux is []) + (length [])! = (length is + length [])!\nIH2 : length (permutationsAux is []) + 1 = (length is)!\nIH1 :\n  length (permutationsAux ts (t :: is)) + (length is)! * succ (length is) =\n    (length ts + length is)! * succ (length ts + length is)\n⊢ length (permutationsAux (t :: ts) is) + (length is)! = (length (t :: ts) + length is)!\n[PROOFSTEP]\nrw [permutationsAux_cons, length_foldr_permutationsAux2' _ _ _ _ _ fun l m => (perm_of_mem_permutations m).length_eq,\n  permutations, length, length, IH2, Nat.succ_add, Nat.factorial_succ, mul_comm (_ + 1), ← Nat.succ_eq_add_one, ← IH1,\n  add_comm (_ * _), add_assoc, Nat.mul_succ, mul_comm]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ is l : List α\nH : l ~ [] ++ is → (∃ ts' x, l = ts' ++ is) ∨ l ∈ permutationsAux is []\n⊢ l ~ is → l ∈ permutations is\n[PROOFSTEP]\nsimpa [permutations, perm_nil] using H\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ {ts is l : List α}, l ~ is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts is\n[PROOFSTEP]\nshow ∀ (ts is l : List α), l ~ is ++ ts → (∃ (is' : _) (_ : is' ~ is), l = is' ++ ts) ∨ l ∈ permutationsAux ts is\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (ts is l : List α), l ~ is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts is\n[PROOFSTEP]\nrefine' permutationsAux.rec (by simp) _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (is l : List α), l ~ is ++ [] → (∃ is' x, l = is' ++ []) ∨ l ∈ permutationsAux [] is\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\n⊢ ∀ (t : α) (ts is : List α),\n    (∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)) →\n      (∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []) →\n        ∀ (l : List α), l ~ is ++ t :: ts → (∃ is' x, l = is' ++ t :: ts) ∨ l ∈ permutationsAux (t :: ts) is\n[PROOFSTEP]\nintro t ts is IH1 IH2 l p\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl : List α\np : l ~ is ++ t :: ts\n⊢ (∃ is' x, l = is' ++ t :: ts) ∨ l ∈ permutationsAux (t :: ts) is\n[PROOFSTEP]\nrw [permutationsAux_cons, mem_foldr_permutationsAux2]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl : List α\np : l ~ is ++ t :: ts\n⊢ (∃ is' x, l = is' ++ t :: ts) ∨\n    l ∈ permutationsAux ts (t :: is) ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrcases IH1 _ (p.trans perm_middle) with (⟨is', p', e⟩ | m)\n[GOAL]\ncase inl.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl : List α\np : l ~ is ++ t :: ts\nis' : List α\np' : is' ~ t :: is\ne : l = is' ++ ts\n⊢ (∃ is' x, l = is' ++ t :: ts) ∨\n    l ∈ permutationsAux ts (t :: is) ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nclear p\n[GOAL]\ncase inl.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl is' : List α\np' : is' ~ t :: is\ne : l = is' ++ ts\n⊢ (∃ is' x, l = is' ++ t :: ts) ∨\n    l ∈ permutationsAux ts (t :: is) ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsubst e\n[GOAL]\ncase inl.intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nis' : List α\np' : is' ~ t :: is\n⊢ (∃ is'_1 x, is' ++ ts = is'_1 ++ t :: ts) ∨\n    is' ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ is' ++ ts = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrcases mem_split (p'.symm.subset (mem_cons_self _ _)) with ⟨l₁, l₂, e⟩\n[GOAL]\ncase inl.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nis' : List α\np' : is' ~ t :: is\nl₁ l₂ : List α\ne : is' = l₁ ++ t :: l₂\n⊢ (∃ is'_1 x, is' ++ ts = is'_1 ++ t :: ts) ∨\n    is' ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ is' ++ ts = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsubst is'\n[GOAL]\ncase inl.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ l₂ : List α\np' : l₁ ++ t :: l₂ ~ t :: is\n⊢ (∃ is' x, l₁ ++ t :: l₂ ++ ts = is' ++ t :: ts) ∨\n    l₁ ++ t :: l₂ ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁_1 l₂_1, l₁_1 ++ l₂_1 ∈ permutations is ∧ l₂_1 ≠ [] ∧ l₁ ++ t :: l₂ ++ ts = l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nhave p := (perm_middle.symm.trans p').cons_inv\n[GOAL]\ncase inl.intro.intro.intro.intro\nα : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ l₂ : List α\np' : l₁ ++ t :: l₂ ~ t :: is\np : l₁ ++ l₂ ~ is\n⊢ (∃ is' x, l₁ ++ t :: l₂ ++ ts = is' ++ t :: ts) ∨\n    l₁ ++ t :: l₂ ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁_1 l₂_1, l₁_1 ++ l₂_1 ∈ permutations is ∧ l₂_1 ≠ [] ∧ l₁ ++ t :: l₂ ++ ts = l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\ncases' l₂ with a l₂'\n[GOAL]\ncase inl.intro.intro.intro.intro.nil\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ : List α\np' : l₁ ++ [t] ~ t :: is\np : l₁ ++ [] ~ is\n⊢ (∃ is' x, l₁ ++ [t] ++ ts = is' ++ t :: ts) ∨\n    l₁ ++ [t] ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁_1 l₂, l₁_1 ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l₁ ++ [t] ++ ts = l₁_1 ++ t :: l₂ ++ ts\n[PROOFSTEP]\nexact Or.inl ⟨l₁, by simpa using p⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ : List α\np' : l₁ ++ [t] ~ t :: is\np : l₁ ++ [] ~ is\n⊢ ∃ x, l₁ ++ [t] ++ ts = l₁ ++ t :: ts\n[PROOFSTEP]\nsimpa using p\n[GOAL]\ncase inl.intro.intro.intro.intro.cons\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ : List α\na : α\nl₂' : List α\np' : l₁ ++ t :: a :: l₂' ~ t :: is\np : l₁ ++ a :: l₂' ~ is\n⊢ (∃ is' x, l₁ ++ t :: a :: l₂' ++ ts = is' ++ t :: ts) ∨\n    l₁ ++ t :: a :: l₂' ++ ts ∈ permutationsAux ts (t :: is) ∨\n      ∃ l₁_1 l₂, l₁_1 ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l₁ ++ t :: a :: l₂' ++ ts = l₁_1 ++ t :: l₂ ++ ts\n[PROOFSTEP]\nexact Or.inr (Or.inr ⟨l₁, a :: l₂', mem_permutations_of_perm_lemma (IH2 _) p, by simp⟩)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁✝ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl₁ : List α\na : α\nl₂' : List α\np' : l₁ ++ t :: a :: l₂' ~ t :: is\np : l₁ ++ a :: l₂' ~ is\n⊢ a :: l₂' ≠ [] ∧ l₁ ++ t :: a :: l₂' ++ ts = l₁ ++ t :: a :: l₂' ++ ts\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nt : α\nts is : List α\nIH1 : ∀ (l : List α), l ~ t :: is ++ ts → (∃ is' x, l = is' ++ ts) ∨ l ∈ permutationsAux ts (t :: is)\nIH2 : ∀ (l : List α), l ~ [] ++ is → (∃ is' x, l = is' ++ is) ∨ l ∈ permutationsAux is []\nl : List α\np : l ~ is ++ t :: ts\nm : l ∈ permutationsAux ts (t :: is)\n⊢ (∃ is' x, l = is' ++ t :: ts) ∨\n    l ∈ permutationsAux ts (t :: is) ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ permutations is ∧ l₂ ≠ [] ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nexact Or.inr (Or.inl m)\n[GOAL]\nα✝ : Type uu\nβ : Type vv\nl₁ l₂ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\n⊢ List.beq = fun a b => decide (a = b)\n[PROOFSTEP]\nfunext l₁ l₂\n[GOAL]\ncase h.h\nα✝ : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : List α\n⊢ List.beq l₁ l₂ = decide (l₁ = l₂)\n[PROOFSTEP]\nshow (l₁ == l₂) = _\n[GOAL]\ncase h.h\nα✝ : Type uu\nβ : Type vv\nl₁✝ l₂✝ : List α✝\nα : Type u_1\ninst✝ : DecidableEq α\nl₁ l₂ : List α\n⊢ (l₁ == l₂) = decide (l₁ = l₂)\n[PROOFSTEP]\nrw [Bool.eq_iff_eq_true_iff, @beq_iff_eq _ (_), decide_eq_true_iff]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b : α\nl : List α\n⊢ List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\n[PROOFSTEP]\ninduction' l with c l ih\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b : α\n⊢ List.bind (permutations'Aux a []) (permutations'Aux b) ~ List.bind (permutations'Aux b []) (permutations'Aux a)\n[PROOFSTEP]\nsimp [swap]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\n⊢ List.bind (permutations'Aux a (c :: l)) (permutations'Aux b) ~\n    List.bind (permutations'Aux b (c :: l)) (permutations'Aux a)\n[PROOFSTEP]\nsimp [permutations'Aux]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\n⊢ (b :: a :: c :: l) ::\n      (a :: b :: c :: l) ::\n        (map (cons a ∘ cons c) (permutations'Aux b l) ++\n          List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b)) ~\n    (a :: b :: c :: l) ::\n      (b :: a :: c :: l) ::\n        (map (cons b ∘ cons c) (permutations'Aux a l) ++\n          List.bind (map (cons c) (permutations'Aux b l)) (permutations'Aux a))\n[PROOFSTEP]\napply Perm.swap'\n[GOAL]\ncase cons.p\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\n⊢ map (cons a ∘ cons c) (permutations'Aux b l) ++ List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n    map (cons b ∘ cons c) (permutations'Aux a l) ++ List.bind (map (cons c) (permutations'Aux b l)) (permutations'Aux a)\n[PROOFSTEP]\nhave :\n  ∀ a b,\n    (map (cons c) (permutations'Aux a l)).bind (permutations'Aux b) ~\n      map (cons b ∘ cons c) (permutations'Aux a l) ++ map (cons c) ((permutations'Aux a l).bind (permutations'Aux b)) :=\n  by\n  intros a' b'\n  simp only [map_bind, permutations'Aux]\n  show List.bind (permutations'Aux _ l) (fun a => ([b' :: c :: a] ++ map (cons c) (permutations'Aux _ a))) ~ _\n  refine' (bind_append_perm _ (fun x => [b' :: c :: x]) _).symm.trans _\n  rw [← map_eq_bind, ← bind_map]\n  exact Perm.refl _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\n⊢ ∀ (a b : α),\n    List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n      map (cons b ∘ cons c) (permutations'Aux a l) ++\n        map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b))\n[PROOFSTEP]\nintros a' b'\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\na' b' : α\n⊢ List.bind (map (cons c) (permutations'Aux a' l)) (permutations'Aux b') ~\n    map (cons b' ∘ cons c) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) (permutations'Aux b'))\n[PROOFSTEP]\nsimp only [map_bind, permutations'Aux]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\na' b' : α\n⊢ (List.bind (permutations'Aux a' l) fun a => (b' :: c :: a) :: map (cons c) (permutations'Aux b' a)) ~\n    map (cons b' ∘ cons c) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) (permutations'Aux b'))\n[PROOFSTEP]\nshow List.bind (permutations'Aux _ l) (fun a => ([b' :: c :: a] ++ map (cons c) (permutations'Aux _ a))) ~ _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\na' b' : α\n⊢ (List.bind (permutations'Aux a' l) fun a => [b' :: c :: a] ++ map (cons c) (permutations'Aux b' a)) ~\n    map (cons b' ∘ cons c) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) (permutations'Aux b'))\n[PROOFSTEP]\nrefine' (bind_append_perm _ (fun x => [b' :: c :: x]) _).symm.trans _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\na' b' : α\n⊢ ((List.bind (permutations'Aux a' l) fun x => [b' :: c :: x]) ++\n      List.bind (permutations'Aux a' l) fun a => map (cons c) (permutations'Aux b' a)) ~\n    map (cons b' ∘ cons c) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) (permutations'Aux b'))\n[PROOFSTEP]\nrw [← map_eq_bind, ← bind_map]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\na' b' : α\n⊢ map (fun x => b' :: c :: x) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) fun a => permutations'Aux b' a) ~\n    map (cons b' ∘ cons c) (permutations'Aux a' l) ++\n      map (cons c) (List.bind (permutations'Aux a' l) (permutations'Aux b'))\n[PROOFSTEP]\nexact Perm.refl _\n[GOAL]\ncase cons.p\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\nthis :\n  ∀ (a b : α),\n    List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n      map (cons b ∘ cons c) (permutations'Aux a l) ++\n        map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b))\n⊢ map (cons a ∘ cons c) (permutations'Aux b l) ++ List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n    map (cons b ∘ cons c) (permutations'Aux a l) ++ List.bind (map (cons c) (permutations'Aux b l)) (permutations'Aux a)\n[PROOFSTEP]\nrefine' (((this _ _).append_left _).trans _).trans ((this _ _).append_left _).symm\n[GOAL]\ncase cons.p\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\nthis :\n  ∀ (a b : α),\n    List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n      map (cons b ∘ cons c) (permutations'Aux a l) ++\n        map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b))\n⊢ map (cons a ∘ cons c) (permutations'Aux b l) ++\n      (map (cons b ∘ cons c) (permutations'Aux a l) ++\n        map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b))) ~\n    map (cons b ∘ cons c) (permutations'Aux a l) ++\n      (map (cons a ∘ cons c) (permutations'Aux b l) ++\n        map (cons c) (List.bind (permutations'Aux b l) (permutations'Aux a)))\n[PROOFSTEP]\nrw [← append_assoc, ← append_assoc]\n[GOAL]\ncase cons.p\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\na b c : α\nl : List α\nih : List.bind (permutations'Aux a l) (permutations'Aux b) ~ List.bind (permutations'Aux b l) (permutations'Aux a)\nthis :\n  ∀ (a b : α),\n    List.bind (map (cons c) (permutations'Aux a l)) (permutations'Aux b) ~\n      map (cons b ∘ cons c) (permutations'Aux a l) ++\n        map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b))\n⊢ map (cons a ∘ cons c) (permutations'Aux b l) ++ map (cons b ∘ cons c) (permutations'Aux a l) ++\n      map (cons c) (List.bind (permutations'Aux a l) (permutations'Aux b)) ~\n    map (cons b ∘ cons c) (permutations'Aux a l) ++ map (cons a ∘ cons c) (permutations'Aux b l) ++\n      map (cons c) (List.bind (permutations'Aux b l) (permutations'Aux a))\n[PROOFSTEP]\nexact perm_append_comm.append (ih.map _)\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\np : s ~ t\n⊢ List.permutations' s ~ List.permutations' t\n[PROOFSTEP]\ninduction' p with a s t _ IH a b l s t u _ _ IH₁ IH₂\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\n⊢ List.permutations' [] ~ List.permutations' []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ t✝ : List α\na : α\ns t : List α\na✝ : s ~ t\nIH : List.permutations' s ~ List.permutations' t\n⊢ List.permutations' (a :: s) ~ List.permutations' (a :: t)\n[PROOFSTEP]\nexact IH.bind_right _\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\na b : α\nl : List α\n⊢ List.permutations' (b :: a :: l) ~ List.permutations' (a :: b :: l)\n[PROOFSTEP]\ndsimp [permutations']\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\na b : α\nl : List α\n⊢ List.bind (List.bind (List.permutations' l) (permutations'Aux a)) (permutations'Aux b) ~\n    List.bind (List.bind (List.permutations' l) (permutations'Aux b)) (permutations'Aux a)\n[PROOFSTEP]\nrw [bind_assoc, bind_assoc]\n[GOAL]\ncase swap\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\na b : α\nl : List α\n⊢ (List.bind (List.permutations' l) fun x => List.bind (permutations'Aux a x) (permutations'Aux b)) ~\n    List.bind (List.permutations' l) fun x => List.bind (permutations'Aux b x) (permutations'Aux a)\n[PROOFSTEP]\napply Perm.bind_left\n[GOAL]\ncase swap.h\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\na b : α\nl : List α\n⊢ ∀ (a_1 : List α),\n    a_1 ∈ List.permutations' l →\n      List.bind (permutations'Aux a a_1) (permutations'Aux b) ~ List.bind (permutations'Aux b a_1) (permutations'Aux a)\n[PROOFSTEP]\nintro l' _\n[GOAL]\ncase swap.h\nα : Type uu\nβ : Type vv\nl₁ l₂ s t : List α\na b : α\nl l' : List α\na✝ : l' ∈ List.permutations' l\n⊢ List.bind (permutations'Aux a l') (permutations'Aux b) ~ List.bind (permutations'Aux b l') (permutations'Aux a)\n[PROOFSTEP]\napply perm_permutations'Aux_comm\n[GOAL]\ncase trans\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ t✝ s t u : List α\na✝¹ : s ~ t\na✝ : t ~ u\nIH₁ : List.permutations' s ~ List.permutations' t\nIH₂ : List.permutations' t ~ List.permutations' u\n⊢ List.permutations' s ~ List.permutations' u\n[PROOFSTEP]\nexact IH₁.trans IH₂\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ ts : List α\n⊢ permutations ts ~ permutations' ts\n[PROOFSTEP]\nobtain ⟨n, h⟩ : ∃ n, length ts < n := ⟨_, Nat.lt_succ_self _⟩\n[GOAL]\ncase intro\nα : Type uu\nβ : Type vv\nl₁ l₂ ts : List α\nn : ℕ\nh : length ts < n\n⊢ permutations ts ~ permutations' ts\n[PROOFSTEP]\ninduction' n with n IH generalizing ts\n[GOAL]\ncase intro.zero\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝ : List α\nn : ℕ\nh✝ : length ts✝ < n\nts : List α\nh : length ts < zero\n⊢ permutations ts ~ permutations' ts\n[PROOFSTEP]\ncases h\n[GOAL]\ncase intro.succ\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝ : List α\nn✝ : ℕ\nh✝ : length ts✝ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts : List α\nh : length ts < succ n\n⊢ permutations ts ~ permutations' ts\n[PROOFSTEP]\nrefine' List.reverseRecOn ts (fun _ => _) (fun ts t _ h => _) h\n[GOAL]\ncase intro.succ.refine'_1\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝ : List α\nn✝ : ℕ\nh✝ : length ts✝ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts : List α\nh : length ts < succ n\nx✝ : length [] < succ n\n⊢ permutations [] ~ permutations' []\n[PROOFSTEP]\nsimp [permutations]\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length (ts ++ [t]) < succ n\n⊢ permutations (ts ++ [t]) ~ permutations' (ts ++ [t])\n[PROOFSTEP]\nrw [← concat_eq_append, length_concat, Nat.succ_lt_succ_iff] at h \n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\n⊢ permutations (ts ++ [t]) ~ permutations' (ts ++ [t])\n[PROOFSTEP]\nhave IH₂ := (IH ts.reverse (by rwa [length_reverse])).trans (reverse_perm _).permutations'\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\n⊢ length (reverse ts) < n\n[PROOFSTEP]\nrwa [length_reverse]\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ permutations (ts ++ [t]) ~ permutations' (ts ++ [t])\n[PROOFSTEP]\nsimp only [permutations_append, foldr_permutationsAux2, permutationsAux_nil, permutationsAux_cons, append_nil]\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ (map (fun x => x ++ [t]) (permutations ts) ++\n      List.bind (permutations (reverse ts)) fun y => (permutationsAux2 t [] [] y id).snd) ~\n    permutations' (ts ++ [t])\n[PROOFSTEP]\nrefine'\n  (perm_append_comm.trans ((IH₂.bind_right _).append ((IH _ h).map _))).trans\n    (Perm.trans _ perm_append_comm.permutations')\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ (List.bind (permutations' ts) fun y => (permutationsAux2 t [] [] y id).snd) ++\n      map (fun x => x ++ [t]) (permutations' ts) ~\n    permutations' ([t] ++ ts)\n[PROOFSTEP]\nrw [map_eq_bind, singleton_append, permutations']\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ ((List.bind (permutations' ts) fun y => (permutationsAux2 t [] [] y id).snd) ++\n      List.bind (permutations' ts) fun x => [x ++ [t]]) ~\n    List.bind (permutations' ts) (permutations'Aux t)\n[PROOFSTEP]\nrefine' (bind_append_perm _ _ _).trans _\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ (List.bind (permutations' ts) fun x => (permutationsAux2 t [] [] x id).snd ++ [x ++ [t]]) ~\n    List.bind (permutations' ts) (permutations'Aux t)\n[PROOFSTEP]\nrefine' Perm.of_eq _\n[GOAL]\ncase intro.succ.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ (List.bind (permutations' ts) fun x => (permutationsAux2 t [] [] x id).snd ++ [x ++ [t]]) =\n    List.bind (permutations' ts) (permutations'Aux t)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.succ.refine'_2.e_b\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\n⊢ (fun x => (permutationsAux2 t [] [] x id).snd ++ [x ++ [t]]) = permutations'Aux t\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase intro.succ.refine'_2.e_b.h\nα : Type uu\nβ : Type vv\nl₁ l₂ ts✝¹ : List α\nn✝ : ℕ\nh✝¹ : length ts✝¹ < n✝\nn : ℕ\nIH : ∀ (ts : List α), length ts < n → permutations ts ~ permutations' ts\nts✝ : List α\nh✝ : length ts✝ < succ n\nts : List α\nt : α\nx✝¹ : length ts < succ n → permutations ts ~ permutations' ts\nh : length ts < n\nIH₂ : permutations (reverse ts) ~ permutations' ts\nx✝ : List α\n⊢ (permutationsAux2 t [] [] x✝ id).snd ++ [x✝ ++ [t]] = permutations'Aux t x✝\n[PROOFSTEP]\nrw [permutations'Aux_eq_permutationsAux2, permutationsAux2_append]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nn : ℕ\nhn : n < length (permutations'Aux x s)\n⊢ nthLe (permutations'Aux x s) n hn = insertNth n x s\n[PROOFSTEP]\ninduction' s with y s IH generalizing n\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nn✝ : ℕ\nhn✝ : n✝ < length (permutations'Aux x s)\nn : ℕ\nhn : n < length (permutations'Aux x [])\n⊢ nthLe (permutations'Aux x []) n hn = insertNth n x []\n[PROOFSTEP]\nsimp only [length, zero_add, lt_one_iff] at hn \n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nn✝ : ℕ\nhn✝¹ : n✝ < length (permutations'Aux x s)\nn : ℕ\nhn✝ : n < length (permutations'Aux x [])\nhn : n = 0\n⊢ nthLe (permutations'Aux x []) n hn✝ = insertNth n x []\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nn✝ : ℕ\nhn✝ : n✝ < length (permutations'Aux x s✝)\ny : α\ns : List α\nIH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s\nn : ℕ\nhn : n < length (permutations'Aux x (y :: s))\n⊢ nthLe (permutations'Aux x (y :: s)) n hn = insertNth n x (y :: s)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase cons.zero\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nn : ℕ\nhn✝ : n < length (permutations'Aux x s✝)\ny : α\ns : List α\nIH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s\nhn : zero < length (permutations'Aux x (y :: s))\n⊢ nthLe (permutations'Aux x (y :: s)) zero hn = insertNth zero x (y :: s)\n[PROOFSTEP]\nsimp [nthLe]\n[GOAL]\ncase cons.succ\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nn : ℕ\nhn✝ : n < length (permutations'Aux x s✝)\ny : α\ns : List α\nIH : ∀ (n : ℕ) (hn : n < length (permutations'Aux x s)), nthLe (permutations'Aux x s) n hn = insertNth n x s\nn✝ : ℕ\nhn : succ n✝ < length (permutations'Aux x (y :: s))\n⊢ nthLe (permutations'Aux x (y :: s)) (succ n✝) hn = insertNth (succ n✝) x (y :: s)\n[PROOFSTEP]\nsimpa [nthLe] using IH _ _\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nl : List α\nx : α\n⊢ count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\n[PROOFSTEP]\ninduction' l with y l IH generalizing x\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ x : α\n⊢ count [x] (permutations'Aux x []) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) []) + 1\n[PROOFSTEP]\nsimp [takeWhile, count]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ y : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\n⊢ count (x :: y :: l) (permutations'Aux x (y :: l)) =\n    length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) (y :: l)) + 1\n[PROOFSTEP]\nrw [permutations'Aux, DecEq_eq, count_cons_self]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ y : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\n⊢ count (x :: y :: l) (map (cons y) (permutations'Aux x l)) + 1 =\n    length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) (y :: l)) + 1\n[PROOFSTEP]\nby_cases hx : x = y\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ y : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\nhx : x = y\n⊢ count (x :: y :: l) (map (cons y) (permutations'Aux x l)) + 1 =\n    length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) (y :: l)) + 1\n[PROOFSTEP]\nsubst hx\n[GOAL]\ncase pos\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\n⊢ count (x :: x :: l) (map (cons x) (permutations'Aux x l)) + 1 =\n    length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) (x :: l)) + 1\n[PROOFSTEP]\nsimpa [takeWhile, Nat.succ_inj', DecEq_eq] using IH _\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ y : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\nhx : ¬x = y\n⊢ count (x :: y :: l) (map (cons y) (permutations'Aux x l)) + 1 =\n    length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) (y :: l)) + 1\n[PROOFSTEP]\nrw [takeWhile]\n[GOAL]\ncase neg\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\ninst✝ : DecidableEq α\nx✝ y : α\nl : List α\nIH :\n  ∀ (x : α),\n    count (x :: l) (permutations'Aux x l) = length (takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l) + 1\nx : α\nhx : ¬x = y\n⊢ count (x :: y :: l) (map (cons y) (permutations'Aux x l)) + 1 =\n    length\n        (match decide ((fun x x_1 => x = x_1) x y) with\n        | true => y :: takeWhile (fun b => decide ((fun x x_1 => x = x_1) x b)) l\n        | false => []) +\n      1\n[PROOFSTEP]\nsimp only [mem_map, cons.injEq, Ne.symm hx, false_and, and_false, exists_false, not_false_iff, count_eq_zero_of_not_mem,\n  zero_add, hx, decide_False, length_nil]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\n⊢ length (permutations'Aux x s) = length s + 1\n[PROOFSTEP]\ninduction' s with y s IH\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\n⊢ length (permutations'Aux x []) = length [] + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx y : α\ns : List α\nIH : length (permutations'Aux x s) = length s + 1\n⊢ length (permutations'Aux x (y :: s)) = length (y :: s) + 1\n[PROOFSTEP]\nsimpa using IH\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\n⊢ 0 < length (permutations'Aux x s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\n⊢ Function.Injective (permutations'Aux x)\n[PROOFSTEP]\nintro s t h\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\n⊢ s = t\n[PROOFSTEP]\napply insertNth_injective s.length x\n[GOAL]\ncase a\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\n⊢ insertNth (length s) x s = insertNth (length s) x t\n[PROOFSTEP]\nhave hl : s.length = t.length := by simpa using congr_arg length h\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\n⊢ length s = length t\n[PROOFSTEP]\nsimpa using congr_arg length h\n[GOAL]\ncase a\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\nhl : length s = length t\n⊢ insertNth (length s) x s = insertNth (length s) x t\n[PROOFSTEP]\nrw [← nthLe_permutations'Aux s x s.length (by simp), ← nthLe_permutations'Aux t x s.length (by simp [hl])]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\nhl : length s = length t\n⊢ length s < length (permutations'Aux x s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\nhl : length s = length t\n⊢ length s < length (permutations'Aux x t)\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\ncase a\nα : Type uu\nβ : Type vv\nl₁ l₂ : List α\nx : α\ns t : List α\nh : permutations'Aux x s = permutations'Aux x t\nhl : length s = length t\n⊢ nthLe (permutations'Aux x s) (length s) (_ : length s < length (permutations'Aux x s)) =\n    nthLe (permutations'Aux x t) (length s) (_ : length s < length (permutations'Aux x t))\n[PROOFSTEP]\nsimp [h, hl]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nhx : ¬x ∈ s\n⊢ Nodup (permutations'Aux x s)\n[PROOFSTEP]\ninduction' s with y s IH\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nhx✝ : ¬x ∈ s\nhx : ¬x ∈ []\n⊢ Nodup (permutations'Aux x [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x ∈ y :: s\n⊢ Nodup (permutations'Aux x (y :: s))\n[PROOFSTEP]\nsimp only [not_or, mem_cons] at hx \n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x = y ∧ ¬x ∈ s\n⊢ Nodup (permutations'Aux x (y :: s))\n[PROOFSTEP]\nsimp only [permutations'Aux, nodup_cons, mem_map, cons.injEq, exists_eq_right_right, not_and]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x = y ∧ ¬x ∈ s\n⊢ (y :: s ∈ permutations'Aux x s → ¬y = x) ∧ Nodup (map (cons y) (permutations'Aux x s))\n[PROOFSTEP]\nrefine' ⟨fun _ => Ne.symm hx.left, _⟩\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x = y ∧ ¬x ∈ s\n⊢ Nodup (map (cons y) (permutations'Aux x s))\n[PROOFSTEP]\nrw [nodup_map_iff]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x = y ∧ ¬x ∈ s\n⊢ Nodup (permutations'Aux x s)\n[PROOFSTEP]\nexact IH hx.right\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s✝ : List α\nx : α\nhx✝ : ¬x ∈ s✝\ny : α\ns : List α\nIH : ¬x ∈ s → Nodup (permutations'Aux x s)\nhx : ¬x = y ∧ ¬x ∈ s\n⊢ Function.Injective (cons y)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\n⊢ Nodup (permutations'Aux x s) ↔ ¬x ∈ s\n[PROOFSTEP]\nrefine' ⟨fun h => _, nodup_permutations'Aux_of_not_mem _ _⟩\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh : Nodup (permutations'Aux x s)\n⊢ ¬x ∈ s\n[PROOFSTEP]\nintro H\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh : Nodup (permutations'Aux x s)\nH : x ∈ s\n⊢ False\n[PROOFSTEP]\nobtain ⟨k, hk, hk'⟩ := nthLe_of_mem H\n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh : Nodup (permutations'Aux x s)\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ False\n[PROOFSTEP]\nrw [nodup_iff_nthLe_inj] at h \n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ False\n[PROOFSTEP]\nsuffices k = k + 1 by simp at this \n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nthis : k = k + 1\n⊢ False\n[PROOFSTEP]\nsimp at this \n[GOAL]\ncase intro.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ k = k + 1\n[PROOFSTEP]\nrefine' h k (k + 1) _ _ _\n[GOAL]\ncase intro.intro.refine'_1\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ k < length (permutations'Aux x s)\n[PROOFSTEP]\nsimpa [Nat.lt_succ_iff] using hk.le\n[GOAL]\ncase intro.intro.refine'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ k + 1 < length (permutations'Aux x s)\n[PROOFSTEP]\nsimpa using hk\n[GOAL]\ncase intro.intro.refine'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ nthLe (permutations'Aux x s) k (_ : k < length (permutations'Aux x s)) =\n    nthLe (permutations'Aux x s) (k + 1) (_ : k + 1 < length (permutations'Aux x s))\n[PROOFSTEP]\nrw [nthLe_permutations'Aux, nthLe_permutations'Aux]\n[GOAL]\ncase intro.intro.refine'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ insertNth k x s = insertNth (k + 1) x s\n[PROOFSTEP]\nhave hl : length (insertNth k x s) = length (insertNth (k + 1) x s) := by\n  rw [length_insertNth _ _ hk.le, length_insertNth _ _ (Nat.succ_le_of_lt hk)]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\n⊢ length (insertNth k x s) = length (insertNth (k + 1) x s)\n[PROOFSTEP]\nrw [length_insertNth _ _ hk.le, length_insertNth _ _ (Nat.succ_le_of_lt hk)]\n[GOAL]\ncase intro.intro.refine'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\n⊢ insertNth k x s = insertNth (k + 1) x s\n[PROOFSTEP]\nrefine' ext_nthLe hl fun n hn hn' => _\n[GOAL]\ncase intro.intro.refine'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nn : ℕ\nhn : n < length (insertNth k x s)\nhn' : n < length (insertNth (k + 1) x s)\n⊢ nthLe (insertNth k x s) n hn = nthLe (insertNth (k + 1) x s) n hn'\n[PROOFSTEP]\nrcases lt_trichotomy n k with (H | rfl | H)\n[GOAL]\ncase intro.intro.refine'_3.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nn : ℕ\nhn : n < length (insertNth k x s)\nhn' : n < length (insertNth (k + 1) x s)\nH : n < k\n⊢ nthLe (insertNth k x s) n hn = nthLe (insertNth (k + 1) x s) n hn'\n[PROOFSTEP]\nrw [nthLe_insertNth_of_lt _ _ _ _ H (H.trans hk), nthLe_insertNth_of_lt _ _ _ _ (H.trans (Nat.lt_succ_self _))]\n[GOAL]\ncase intro.intro.refine'_3.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH : x ∈ s\nn : ℕ\nhk : n < length s\nhk' : nthLe s n hk = x\nhl : length (insertNth n x s) = length (insertNth (n + 1) x s)\nhn : n < length (insertNth n x s)\nhn' : n < length (insertNth (n + 1) x s)\n⊢ nthLe (insertNth n x s) n hn = nthLe (insertNth (n + 1) x s) n hn'\n[PROOFSTEP]\nrw [nthLe_insertNth_self _ _ _ hk.le, nthLe_insertNth_of_lt _ _ _ _ (Nat.lt_succ_self _) hk, hk']\n[GOAL]\ncase intro.intro.refine'_3.inr.inr\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nn : ℕ\nhn : n < length (insertNth k x s)\nhn' : n < length (insertNth (k + 1) x s)\nH : k < n\n⊢ nthLe (insertNth k x s) n hn = nthLe (insertNth (k + 1) x s) n hn'\n[PROOFSTEP]\nrcases(Nat.succ_le_of_lt H).eq_or_lt with (rfl | H')\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nhn : succ k < length (insertNth k x s)\nhn' : succ k < length (insertNth (k + 1) x s)\nH : k < succ k\n⊢ nthLe (insertNth k x s) (succ k) hn = nthLe (insertNth (k + 1) x s) (succ k) hn'\n[PROOFSTEP]\nrw [nthLe_insertNth_self _ _ _ (Nat.succ_le_of_lt hk)]\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nhn : succ k < length (insertNth k x s)\nhn' : succ k < length (insertNth (k + 1) x s)\nH : k < succ k\n⊢ nthLe (insertNth k x s) (succ k) hn = x\n[PROOFSTEP]\nconvert hk' using 1\n[GOAL]\ncase h.e'_2\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nhn : succ k < length (insertNth k x s)\nhn' : succ k < length (insertNth (k + 1) x s)\nH : k < succ k\n⊢ nthLe (insertNth k x s) (succ k) hn = nthLe s k hk\n[PROOFSTEP]\nexact nthLe_insertNth_add_succ _ _ _ 0 _\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inr\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nn : ℕ\nhn : n < length (insertNth k x s)\nhn' : n < length (insertNth (k + 1) x s)\nH : k < n\nH' : succ k < n\n⊢ nthLe (insertNth k x s) n hn = nthLe (insertNth (k + 1) x s) n hn'\n[PROOFSTEP]\nobtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_lt H'\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inr.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn : succ k + m + 1 < length (insertNth k x s)\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ nthLe (insertNth k x s) (succ k + m + 1) hn = nthLe (insertNth (k + 1) x s) (succ k + m + 1) hn'\n[PROOFSTEP]\nerw [length_insertNth _ _ hk.le, Nat.succ_lt_succ_iff, Nat.succ_add] at hn \n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inr.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ nthLe (insertNth k x s) (succ k + m + 1) hn✝ = nthLe (insertNth (k + 1) x s) (succ k + m + 1) hn'\n[PROOFSTEP]\nrw [nthLe_insertNth_add_succ]\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inr.intro\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ nthLe (insertNth k x s) (succ k + m + 1) hn✝ = nthLe s (k + 1 + m) ?intro.intro.refine'_3.inr.inr.inr.intro.hk'\ncase intro.intro.refine'_3.inr.inr.inr.intro.hk'\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ k + 1 + m < length s\n[PROOFSTEP]\nconvert nthLe_insertNth_add_succ s x k m.succ (by simpa using hn) using 2\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ k + succ m < length s\n[PROOFSTEP]\nsimpa using hn\n[GOAL]\ncase h.e'_2.h.e'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ succ k + m + 1 = k + succ m + 1\n[PROOFSTEP]\nsimp [Nat.add_succ, Nat.succ_add]\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ k + 1 + m = k + succ m\n[PROOFSTEP]\nsimp [add_left_comm, add_comm]\n[GOAL]\ncase intro.intro.refine'_3.inr.inr.inr.intro.hk'\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nh :\n  ∀ (i j : ℕ) (h₁ : i < length (permutations'Aux x s)) (h₂ : j < length (permutations'Aux x s)),\n    nthLe (permutations'Aux x s) i h₁ = nthLe (permutations'Aux x s) j h₂ → i = j\nH✝ : x ∈ s\nk : ℕ\nhk : k < length s\nhk' : nthLe s k hk = x\nhl : length (insertNth k x s) = length (insertNth (k + 1) x s)\nm : ℕ\nhn✝ : succ k + m + 1 < length (insertNth k x s)\nhn : succ (k + m) < length s\nhn' : succ k + m + 1 < length (insertNth (k + 1) x s)\nH : k < succ k + m + 1\nH' : succ k < succ k + m + 1\n⊢ k + 1 + m < length s\n[PROOFSTEP]\nsimpa [Nat.succ_add] using hn\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nhs : Nodup s\n⊢ Nodup (permutations s)\n[PROOFSTEP]\nrw [(permutations_perm_permutations' s).nodup_iff]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nhs : Nodup s\n⊢ Nodup (permutations' s)\n[PROOFSTEP]\ninduction' hs with x l h h' IH\n[GOAL]\ncase nil\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\n⊢ Nodup (permutations' [])\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\n⊢ Nodup (permutations' (x :: l))\n[PROOFSTEP]\nrw [permutations']\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\n⊢ Nodup (List.bind (permutations' l) (permutations'Aux x))\n[PROOFSTEP]\nrw [nodup_bind]\n[GOAL]\ncase cons\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\n⊢ (∀ (x_1 : List α), x_1 ∈ permutations' l → Nodup (permutations'Aux x x_1)) ∧\n    Pairwise (fun a b => Disjoint (permutations'Aux x a) (permutations'Aux x b)) (permutations' l)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.left\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\n⊢ ∀ (x_1 : List α), x_1 ∈ permutations' l → Nodup (permutations'Aux x x_1)\n[PROOFSTEP]\nintro ys hy\n[GOAL]\ncase cons.left\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nys : List α\nhy : ys ∈ permutations' l\n⊢ Nodup (permutations'Aux x ys)\n[PROOFSTEP]\nrw [mem_permutations'] at hy \n[GOAL]\ncase cons.left\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nys : List α\nhy : ys ~ l\n⊢ Nodup (permutations'Aux x ys)\n[PROOFSTEP]\nrw [nodup_permutations'Aux_iff, hy.mem_iff]\n[GOAL]\ncase cons.left\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nys : List α\nhy : ys ~ l\n⊢ ¬x ∈ l\n[PROOFSTEP]\nexact fun H => h x H rfl\n[GOAL]\ncase cons.right\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\n⊢ Pairwise (fun a b => Disjoint (permutations'Aux x a) (permutations'Aux x b)) (permutations' l)\n[PROOFSTEP]\nrefine' IH.pairwise_of_forall_ne fun as ha bs hb H => _\n[GOAL]\ncase cons.right\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ∈ permutations' l\nbs : List α\nhb : bs ∈ permutations' l\nH : as ≠ bs\n⊢ Disjoint (permutations'Aux x as) (permutations'Aux x bs)\n[PROOFSTEP]\nrw [disjoint_iff_ne]\n[GOAL]\ncase cons.right\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ∈ permutations' l\nbs : List α\nhb : bs ∈ permutations' l\nH : as ≠ bs\n⊢ ∀ (a : List α), a ∈ permutations'Aux x as → ∀ (b : List α), b ∈ permutations'Aux x bs → a ≠ b\n[PROOFSTEP]\nrintro a ha' b hb' rfl\n[GOAL]\ncase cons.right\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ∈ permutations' l\nbs : List α\nhb : bs ∈ permutations' l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨n, hn⟩, hn'⟩ := get_of_mem ha'\n[GOAL]\ncase cons.right.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ∈ permutations' l\nbs : List α\nhb : bs ∈ permutations' l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn : n < length (permutations'Aux x as)\nhn' : get (permutations'Aux x as) { val := n, isLt := hn } = a\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨m, hm⟩, hm'⟩ := get_of_mem hb'\n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ∈ permutations' l\nbs : List α\nhb : bs ∈ permutations' l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn : n < length (permutations'Aux x as)\nhn' : get (permutations'Aux x as) { val := n, isLt := hn } = a\nm : ℕ\nhm : m < length (permutations'Aux x bs)\nhm' : get (permutations'Aux x bs) { val := m, isLt := hm } = a\n⊢ False\n[PROOFSTEP]\nrw [mem_permutations'] at ha hb \n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn : n < length (permutations'Aux x as)\nhn' : get (permutations'Aux x as) { val := n, isLt := hn } = a\nm : ℕ\nhm : m < length (permutations'Aux x bs)\nhm' : get (permutations'Aux x bs) { val := m, isLt := hm } = a\n⊢ False\n[PROOFSTEP]\nhave hl : as.length = bs.length := (ha.trans hb.symm).length_eq\n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn : n < length (permutations'Aux x as)\nhn' : get (permutations'Aux x as) { val := n, isLt := hn } = a\nm : ℕ\nhm : m < length (permutations'Aux x bs)\nhm' : get (permutations'Aux x bs) { val := m, isLt := hm } = a\nhl : length as = length bs\n⊢ False\n[PROOFSTEP]\nsimp only [Nat.lt_succ_iff, length_permutations'Aux] at hn hm \n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : get (permutations'Aux x as) { val := n, isLt := hn✝ } = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : get (permutations'Aux x bs) { val := m, isLt := hm✝ } = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\n⊢ False\n[PROOFSTEP]\nrw [← nthLe, nthLe_permutations'Aux] at hn' hm' \n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\n⊢ False\n[PROOFSTEP]\nhave hx : nthLe (insertNth n x as) m (by rwa [length_insertNth _ _ hn, Nat.lt_succ_iff, hl]) = x := by\n  simp [hn', ← hm', hm]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\n⊢ m < length (insertNth n x as)\n[PROOFSTEP]\nrwa [length_insertNth _ _ hn, Nat.lt_succ_iff, hl]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\n⊢ nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\n[PROOFSTEP]\nsimp [hn', ← hm', hm]\n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\n⊢ False\n[PROOFSTEP]\nhave hx' : nthLe (insertNth m x bs) n (by rwa [length_insertNth _ _ hm, Nat.lt_succ_iff, ← hl]) = x := by\n  simp [hm', ← hn', hn]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\n⊢ n < length (insertNth m x bs)\n[PROOFSTEP]\nrwa [length_insertNth _ _ hm, Nat.lt_succ_iff, ← hl]\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\n⊢ nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\n[PROOFSTEP]\nsimp [hm', ← hn', hn]\n[GOAL]\ncase cons.right.intro.mk.intro.mk\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\n⊢ False\n[PROOFSTEP]\nrcases lt_trichotomy n m with (ht | ht | ht)\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n < m\n⊢ False\n[PROOFSTEP]\nsuffices x ∈ bs by exact h x (hb.subset this) rfl\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n < m\nthis : x ∈ bs\n⊢ False\n[PROOFSTEP]\nexact h x (hb.subset this) rfl\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n < m\n⊢ x ∈ bs\n[PROOFSTEP]\nrw [← hx', nthLe_insertNth_of_lt _ _ _ _ ht (ht.trans_le hm)]\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n < m\n⊢ nthLe bs n (_ : n < length bs) ∈ bs\n[PROOFSTEP]\nexact nthLe_mem _ _ _\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n = m\n⊢ False\n[PROOFSTEP]\nsimp only [ht] at hm' hn' \n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n = m\nhn' : insertNth m x as = a\n⊢ False\n[PROOFSTEP]\nrw [← hm'] at hn' \n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inl\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : n = m\nhn' : insertNth m x as = insertNth m x bs\n⊢ False\n[PROOFSTEP]\nexact H (insertNth_injective _ _ hn')\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inr\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : m < n\n⊢ False\n[PROOFSTEP]\nsuffices x ∈ as by exact h x (ha.subset this) rfl\n[GOAL]\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : m < n\nthis : x ∈ as\n⊢ False\n[PROOFSTEP]\nexact h x (ha.subset this) rfl\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inr\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : m < n\n⊢ x ∈ as\n[PROOFSTEP]\nrw [← hx, nthLe_insertNth_of_lt _ _ _ _ ht (ht.trans_le hn)]\n[GOAL]\ncase cons.right.intro.mk.intro.mk.inr.inr\nα : Type uu\nβ : Type vv\nl₁ l₂ s : List α\nx : α\nl : List α\nh : ∀ (a' : α), a' ∈ l → x ≠ a'\nh' : Pairwise (fun x x_1 => x ≠ x_1) l\nIH : Nodup (permutations' l)\nas : List α\nha : as ~ l\nbs : List α\nhb : bs ~ l\nH : as ≠ bs\na : List α\nha' : a ∈ permutations'Aux x as\nhb' : a ∈ permutations'Aux x bs\nn : ℕ\nhn✝ : n < length (permutations'Aux x as)\nhn' : insertNth n x as = a\nm : ℕ\nhm✝ : m < length (permutations'Aux x bs)\nhm' : insertNth m x bs = a\nhl : length as = length bs\nhn : n ≤ length as\nhm : m ≤ length bs\nhx : nthLe (insertNth n x as) m (_ : m < length (insertNth n x as)) = x\nhx' : nthLe (insertNth m x bs) n (_ : n < length (insertNth m x bs)) = x\nht : m < n\n⊢ nthLe as m (_ : m < length as) ∈ as\n[PROOFSTEP]\nexact nthLe_mem _ _ _\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Perm", "llama_tokens": 136597, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5195213219520929, "lm_q2_score": 0.5621765008857982, "lm_q1q2_score": 0.2920626789105918}}
{"text": "[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q f : R[X]\n⊢ { toFinsupp := f.toFinsupp } = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := { toFinsupp := toFinsupp✝ }.toFinsupp } = { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na b : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a + b } = Polynomial.add { toFinsupp := a } { toFinsupp := b }\n[PROOFSTEP]\nrw [add_def]\n[GOAL]\nR✝ : Type u\na✝ b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := -a } = Polynomial.neg { toFinsupp := a }\n[PROOFSTEP]\nrw [neg_def]\n[GOAL]\nR✝ : Type u\na✝ b✝ : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na b : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a - b } = { toFinsupp := a } - { toFinsupp := b }\n[PROOFSTEP]\nrw [sub_eq_add_neg, ofFinsupp_add, ofFinsupp_neg]\n[GOAL]\nR✝ : Type u\na✝ b✝ : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na b : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a } + -{ toFinsupp := b } = { toFinsupp := a } - { toFinsupp := b }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na b : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a * b } = Polynomial.mul { toFinsupp := a } { toFinsupp := b }\n[PROOFSTEP]\nrw [mul_def]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\nn : ℕ\n⊢ { toFinsupp := a ^ n } = { toFinsupp := a } ^ n\n[PROOFSTEP]\nchange _ = npowRec n _\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\nn : ℕ\n⊢ { toFinsupp := a ^ n } = npowRec n { toFinsupp := a }\n[PROOFSTEP]\ninduction n with\n| zero => simp [npowRec]\n| succ n n_ih => simp [npowRec, n_ih, pow_succ]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\nn : ℕ\n⊢ { toFinsupp := a ^ n } = npowRec n { toFinsupp := a }\n[PROOFSTEP]\ninduction n with\n| zero => simp [npowRec]\n| succ n n_ih => simp [npowRec, n_ih, pow_succ]\n[GOAL]\ncase zero\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a ^ Nat.zero } = npowRec Nat.zero { toFinsupp := a }\n[PROOFSTEP]\n\n| zero => simp [npowRec]\n[GOAL]\ncase zero\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a ^ Nat.zero } = npowRec Nat.zero { toFinsupp := a }\n[PROOFSTEP]\nsimp [npowRec]\n[GOAL]\ncase succ\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\nn : ℕ\nn_ih : { toFinsupp := a ^ n } = npowRec n { toFinsupp := a }\n⊢ { toFinsupp := a ^ Nat.succ n } = npowRec (Nat.succ n) { toFinsupp := a }\n[PROOFSTEP]\n\n| succ n n_ih => simp [npowRec, n_ih, pow_succ]\n[GOAL]\ncase succ\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\nn : ℕ\nn_ih : { toFinsupp := a ^ n } = npowRec n { toFinsupp := a }\n⊢ { toFinsupp := a ^ Nat.succ n } = npowRec (Nat.succ n) { toFinsupp := a }\n[PROOFSTEP]\nsimp [npowRec, n_ih, pow_succ]\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q a b : R[X]\n⊢ (a + b).toFinsupp = a.toFinsupp + b.toFinsupp\n[PROOFSTEP]\ncases a\n[GOAL]\ncase ofFinsupp\nR : Type u\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q b : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝ } + b).toFinsupp = { toFinsupp := toFinsupp✝ }.toFinsupp + b.toFinsupp\n[PROOFSTEP]\ncases b\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }).toFinsupp =\n    { toFinsupp := toFinsupp✝¹ }.toFinsupp + { toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nrw [← ofFinsupp_add]\n[GOAL]\nR✝ : Type u\na✝ b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na : R[X]\n⊢ (-a).toFinsupp = -a.toFinsupp\n[PROOFSTEP]\ncases a\n[GOAL]\ncase ofFinsupp\nR✝ : Type u\na b : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (-{ toFinsupp := toFinsupp✝ }).toFinsupp = -{ toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nrw [← ofFinsupp_neg]\n[GOAL]\nR✝ : Type u\na✝ b✝ : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na b : R[X]\n⊢ (a - b).toFinsupp = a.toFinsupp - b.toFinsupp\n[PROOFSTEP]\nrw [sub_eq_add_neg, ← toFinsupp_neg, ← toFinsupp_add]\n[GOAL]\nR✝ : Type u\na✝ b✝ : R✝\nm n : ℕ\ninst✝¹ : Semiring R✝\np q : R✝[X]\nR : Type u\ninst✝ : Ring R\na b : R[X]\n⊢ (a - b).toFinsupp = (a + -b).toFinsupp\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q a b : R[X]\n⊢ (a * b).toFinsupp = a.toFinsupp * b.toFinsupp\n[PROOFSTEP]\ncases a\n[GOAL]\ncase ofFinsupp\nR : Type u\na b✝ : R\nm n : ℕ\ninst✝ : Semiring R\np q b : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝ } * b).toFinsupp = { toFinsupp := toFinsupp✝ }.toFinsupp * b.toFinsupp\n[PROOFSTEP]\ncases b\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝¹ } * { toFinsupp := toFinsupp✝ }).toFinsupp =\n    { toFinsupp := toFinsupp✝¹ }.toFinsupp * { toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nrw [← ofFinsupp_mul]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q a : R[X]\nn : ℕ\n⊢ (a ^ n).toFinsupp = a.toFinsupp ^ n\n[PROOFSTEP]\ncases a\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝ } ^ n).toFinsupp = { toFinsupp := toFinsupp✝ }.toFinsupp ^ n\n[PROOFSTEP]\nrw [← ofFinsupp_pow]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q a : R[X]\n⊢ a.toFinsupp = 0 ↔ a = 0\n[PROOFSTEP]\nrw [← toFinsupp_zero, toFinsupp_inj]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q a : R[X]\n⊢ a.toFinsupp = 1 ↔ a = 1\n[PROOFSTEP]\nrw [← toFinsupp_one, toFinsupp_inj]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a } = 0 ↔ a = 0\n[PROOFSTEP]\nrw [← ofFinsupp_zero, ofFinsupp_inj]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := a } = 1 ↔ a = 1\n[PROOFSTEP]\nrw [← ofFinsupp_one, ofFinsupp_inj]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np q : R[X]\nS₁ : Type ?u.114071\nS₂ : Type ?u.114238\ninst✝² : SMulZeroClass S₁ R\ninst✝¹ : SMulZeroClass S₂ R\ninst✝ : SMulCommClass S₁ S₂ R\n⊢ ∀ (m : S₁) (n : S₂) (a : R[X]), m • n • a = n • m • a\n[PROOFSTEP]\nrintro m n ⟨f⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm✝ n✝ : ℕ\ninst✝³ : Semiring R\np q : R[X]\nS₁ : Type ?u.114071\nS₂ : Type ?u.114238\ninst✝² : SMulZeroClass S₁ R\ninst✝¹ : SMulZeroClass S₂ R\ninst✝ : SMulCommClass S₁ S₂ R\nm : S₁\nn : S₂\nf : AddMonoidAlgebra R ℕ\n⊢ m • n • { toFinsupp := f } = n • m • { toFinsupp := f }\n[PROOFSTEP]\nsimp_rw [← ofFinsupp_smul, smul_comm m n f]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝⁴ : Semiring R\np q : R[X]\nS₁ : Type ?u.117123\nS₂ : Type ?u.117122\ninst✝³ : SMul S₁ S₂\ninst✝² : SMulZeroClass S₁ R\ninst✝¹ : SMulZeroClass S₂ R\ninst✝ : IsScalarTower S₁ S₂ R\n⊢ ∀ (x : S₁) (y : S₂) (z : R[X]), (x • y) • z = x • y • z\n[PROOFSTEP]\nrintro _ _ ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝⁴ : Semiring R\np q : R[X]\nS₁ : Type ?u.117123\nS₂ : Type ?u.117122\ninst✝³ : SMul S₁ S₂\ninst✝² : SMulZeroClass S₁ R\ninst✝¹ : SMulZeroClass S₂ R\ninst✝ : IsScalarTower S₁ S₂ R\nx✝ : S₁\ny✝ : S₂\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (x✝ • y✝) • { toFinsupp := toFinsupp✝ } = x✝ • y✝ • { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nsimp_rw [← ofFinsupp_smul, smul_assoc]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np q : R[X]\nα : Type u_1\nK : Type u_2\ninst✝² : Semiring K\ninst✝¹ : DistribSMul α K\ninst✝ : IsScalarTower α K K\n⊢ ∀ (x : α) (y z : K[X]), (x • y) • z = x • y • z\n[PROOFSTEP]\nrintro _ ⟨⟩ ⟨⟩\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np q : R[X]\nα : Type u_1\nK : Type u_2\ninst✝² : Semiring K\ninst✝¹ : DistribSMul α K\ninst✝ : IsScalarTower α K K\nx✝ : α\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra K ℕ\n⊢ (x✝ • { toFinsupp := toFinsupp✝¹ }) • { toFinsupp := toFinsupp✝ } =\n    x✝ • { toFinsupp := toFinsupp✝¹ } • { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nsimp_rw [smul_eq_mul, ← ofFinsupp_smul, ← ofFinsupp_mul, ← ofFinsupp_smul, smul_mul_assoc]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np q : R[X]\nS : Type ?u.129006\ninst✝² : SMulZeroClass S R\ninst✝¹ : SMulZeroClass Sᵐᵒᵖ R\ninst✝ : IsCentralScalar S R\n⊢ ∀ (m : S) (a : R[X]), MulOpposite.op m • a = m • a\n[PROOFSTEP]\nrintro _ ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝³ : Semiring R\np q : R[X]\nS : Type ?u.129006\ninst✝² : SMulZeroClass S R\ninst✝¹ : SMulZeroClass Sᵐᵒᵖ R\ninst✝ : IsCentralScalar S R\nm✝ : S\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ MulOpposite.op m✝ • { toFinsupp := toFinsupp✝ } = m✝ • { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nsimp_rw [← ofFinsupp_smul, op_smul_eq_smul]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\ninst✝ : Subsingleton R\nsrc✝ : Inhabited R[X] := inhabited\n⊢ ∀ (a : R[X]), a = default\n[PROOFSTEP]\nrintro ⟨x⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\ninst✝ : Subsingleton R\nsrc✝ : Inhabited R[X] := inhabited\nx : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := x } = default\n[PROOFSTEP]\nrefine' congr_arg ofFinsupp _\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\ninst✝ : Subsingleton R\nsrc✝ : Inhabited R[X] := inhabited\nx : AddMonoidAlgebra R ℕ\n⊢ x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\np : AddMonoidAlgebra R ℕ\n⊢ support { toFinsupp := p } = p.support\n[PROOFSTEP]\nrw [support]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\n⊢ p.toFinsupp.support = support p\n[PROOFSTEP]\nrw [support]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ support p = ∅ ↔ p = 0\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support { toFinsupp := toFinsupp✝ } = ∅ ↔ { toFinsupp := toFinsupp✝ } = 0\n[PROOFSTEP]\nsimp [support]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ Finset.card (support p) = 0 ↔ p = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nx y : R\n⊢ (fun t => { toFinsupp := Finsupp.single n t }) (x + y) =\n    (fun t => { toFinsupp := Finsupp.single n t }) x + (fun t => { toFinsupp := Finsupp.single n t }) y\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nx y : R\n⊢ { toFinsupp := Finsupp.single n x + Finsupp.single n y } =\n    { toFinsupp := Finsupp.single n x } + { toFinsupp := Finsupp.single n y }\n[PROOFSTEP]\nrw [ofFinsupp_add]\n  -- Porting note: Was `simp [← ofFinsupp_smul]`.\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr x : R\n⊢ AddHom.toFun\n      { toFun := fun t => { toFinsupp := Finsupp.single n t },\n        map_add' :=\n          (_ :\n            ∀ (x y : R),\n              (fun t => { toFinsupp := Finsupp.single n t }) (x + y) =\n                (fun t => { toFinsupp := Finsupp.single n t }) x + (fun t => { toFinsupp := Finsupp.single n t }) y) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun t => { toFinsupp := Finsupp.single n t },\n          map_add' :=\n            (_ :\n              ∀ (x y : R),\n                (fun t => { toFinsupp := Finsupp.single n t }) (x + y) =\n                  (fun t => { toFinsupp := Finsupp.single n t }) x + (fun t => { toFinsupp := Finsupp.single n t }) y) }\n        x\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr x : R\n⊢ { toFinsupp := Finsupp.single n (r * x) } = r • { toFinsupp := Finsupp.single n x }\n[PROOFSTEP]\nrw [← ofFinsupp_smul, smul_single']\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ (↑(monomial n) r).toFinsupp = Finsupp.single n r\n[PROOFSTEP]\nsimp [monomial]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ { toFinsupp := Finsupp.single n r } = ↑(monomial n) r\n[PROOFSTEP]\nsimp [monomial]\n[GOAL]\nR : Type u\na b : R\nm✝ n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn m : ℕ\nr s : R\n⊢ (↑(monomial n) r * ↑(monomial m) s).toFinsupp = (↑(monomial (n + m)) (r * s)).toFinsupp\n[PROOFSTEP]\nsimp only [toFinsupp_monomial, toFinsupp_mul, AddMonoidAlgebra.single_mul_single]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\nk : ℕ\n⊢ ↑(monomial n) r ^ k = ↑(monomial (n * k)) (r ^ k)\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ ↑(monomial n) r ^ Nat.zero = ↑(monomial (n * Nat.zero)) (r ^ Nat.zero)\n[PROOFSTEP]\nsimp [pow_zero, monomial_zero_one]\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\nk : ℕ\nih : ↑(monomial n) r ^ k = ↑(monomial (n * k)) (r ^ k)\n⊢ ↑(monomial n) r ^ Nat.succ k = ↑(monomial (n * Nat.succ k)) (r ^ Nat.succ k)\n[PROOFSTEP]\nsimp [pow_succ, ih, monomial_mul_monomial, Nat.succ_eq_add_one, mul_add, add_comm]\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nS : Type u_1\ninst✝ : SMulZeroClass S R\na : S\nn : ℕ\nb : R\n⊢ (a • ↑(monomial n) b).toFinsupp = (↑(monomial n) (a • b)).toFinsupp\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na✝ b✝ : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nS : Type u_1\ninst✝ : SMulZeroClass S R\na : S\nn : ℕ\nb : R\n⊢ a • Finsupp.single n b = Finsupp.single n (a • b)\n[PROOFSTEP]\nrw [smul_single]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ support (p + q) ⊆ support p ∪ support q\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support ({ toFinsupp := toFinsupp✝ } + q) ⊆ support { toFinsupp := toFinsupp✝ } ∪ support q\n[PROOFSTEP]\nrcases q with ⟨⟩\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support ({ toFinsupp := toFinsupp✝¹ } + { toFinsupp := toFinsupp✝ }) ⊆\n    support { toFinsupp := toFinsupp✝¹ } ∪ support { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nsimp only [← ofFinsupp_add, support]\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (toFinsupp✝¹ + toFinsupp✝).support ⊆ toFinsupp✝¹.support ∪ toFinsupp✝.support\n[PROOFSTEP]\nexact support_add\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nsrc✝ : R →ₗ[R] R[X] := monomial 0\n⊢ AddHom.toFun src✝.toAddHom 1 = 1\n[PROOFSTEP]\nsimp [monomial_zero_one]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nsrc✝ : R →ₗ[R] R[X] := monomial 0\n⊢ ∀ (x y : R),\n    OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : 1 = 1) } x *\n        OneHom.toFun { toFun := src✝.toFun, map_one' := (_ : 1 = 1) } y\n[PROOFSTEP]\nsimp [monomial_mul_monomial]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nsrc✝ : R →ₗ[R] R[X] := monomial 0\n⊢ OneHom.toFun\n      (↑{ toOneHom := { toFun := src✝.toFun, map_one' := (_ : 1 = 1) },\n          map_mul' := (_ : ∀ (a a_1 : R), ↑(monomial 0) (a * a_1) = ↑(monomial 0) a * ↑(monomial 0) a_1) })\n      0 =\n    0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑C 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑C (bit1 a) = bit1 (↑C a)\n[PROOFSTEP]\nsimp [bit1, C_bit0]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑C a * ↑(monomial n) b = ↑(monomial n) (a * b)\n[PROOFSTEP]\nsimp only [← monomial_zero_left, monomial_mul_monomial, zero_add]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑(monomial n) a * ↑C b = ↑(monomial n) (a * b)\n[PROOFSTEP]\nsimp only [← monomial_zero_left, monomial_mul_monomial, add_zero]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ ↑(monomial n) 1 = X ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑(monomial Nat.zero) 1 = X ^ Nat.zero\n[PROOFSTEP]\nsimp [monomial_zero_one]\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : ↑(monomial n) 1 = X ^ n\n⊢ ↑(monomial (Nat.succ n)) 1 = X ^ Nat.succ n\n[PROOFSTEP]\nrw [pow_succ, ← ih, ← monomial_one_one_eq_X, monomial_mul_monomial, add_comm, one_mul]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ X * p = p * X\n[PROOFSTEP]\nrcases p with\n  ⟨⟩\n    -- Porting note: `ofFinsupp.injEq` is required.\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ X * { toFinsupp := toFinsupp✝ } = { toFinsupp := toFinsupp✝ } * X\n[PROOFSTEP]\nsimp only [X, ← ofFinsupp_single, ← ofFinsupp_mul, LinearMap.coe_mk, ofFinsupp.injEq]\n  -- Porting note: Was `ext`.\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ Finsupp.single 1 1 * toFinsupp✝ = toFinsupp✝ * Finsupp.single 1 1\n[PROOFSTEP]\nrefine Finsupp.ext fun _ => ?_\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\nx✝ : ℕ\n⊢ ↑(Finsupp.single 1 1 * toFinsupp✝) x✝ = ↑(toFinsupp✝ * Finsupp.single 1 1) x✝\n[PROOFSTEP]\nsimp [AddMonoidAlgebra.mul_apply, AddMonoidAlgebra.sum_single_index, add_comm]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ X ^ n * p = p * X ^ n\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ X ^ Nat.zero * p = p * X ^ Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : X ^ n * p = p * X ^ n\n⊢ X ^ Nat.succ n * p = p * X ^ Nat.succ n\n[PROOFSTEP]\nconv_lhs => rw [pow_succ']\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : X ^ n * p = p * X ^ n\n| X ^ Nat.succ n * p\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : X ^ n * p = p * X ^ n\n| X ^ Nat.succ n * p\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : X ^ n * p = p * X ^ n\n| X ^ Nat.succ n * p\n[PROOFSTEP]\nrw [pow_succ']\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nih : X ^ n * p = p * X ^ n\n⊢ X ^ n * X * p = p * X ^ Nat.succ n\n[PROOFSTEP]\nrw [mul_assoc, X_mul, ← mul_assoc, ih, mul_assoc, ← pow_succ']\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ p * X ^ n * q = p * q * X ^ n\n[PROOFSTEP]\nrw [mul_assoc, X_pow_mul, ← mul_assoc]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ ↑(monomial n) r * X = ↑(monomial (n + 1)) r\n[PROOFSTEP]\nerw [monomial_mul_monomial, mul_one]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\nk : ℕ\n⊢ ↑(monomial n) r * X ^ k = ↑(monomial (n + k)) r\n[PROOFSTEP]\ninduction' k with k ih\n[GOAL]\ncase zero\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ ↑(monomial n) r * X ^ Nat.zero = ↑(monomial (n + Nat.zero)) r\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\nk : ℕ\nih : ↑(monomial n) r * X ^ k = ↑(monomial (n + k)) r\n⊢ ↑(monomial n) r * X ^ Nat.succ k = ↑(monomial (n + Nat.succ k)) r\n[PROOFSTEP]\nsimp [ih, pow_succ', ← mul_assoc, add_assoc]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nr : R\n⊢ X * ↑(monomial n) r = ↑(monomial (n + 1)) r\n[PROOFSTEP]\nrw [X_mul, monomial_mul_X]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nk n : ℕ\nr : R\n⊢ X ^ k * ↑(monomial n) r = ↑(monomial (n + k)) r\n[PROOFSTEP]\nrw [X_pow_mul, monomial_mul_X_pow]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\np : AddMonoidAlgebra R ℕ\n⊢ coeff { toFinsupp := p } = ↑p\n[PROOFSTEP]\nrw [coeff]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ Injective coeff\n[PROOFSTEP]\nrintro ⟨p⟩\n  ⟨q⟩\n      -- Porting note: `ofFinsupp.injEq` is required.\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ : R[X]\np q : AddMonoidAlgebra R ℕ\n⊢ coeff { toFinsupp := p } = coeff { toFinsupp := q } → { toFinsupp := p } = { toFinsupp := q }\n[PROOFSTEP]\nsimp only [coeff, FunLike.coe_fn_eq, imp_self, ofFinsupp.injEq]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q f : R[X]\ni : ℕ\n⊢ ↑f.toFinsupp i = coeff f i\n[PROOFSTEP]\ncases f\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ni : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ↑{ toFinsupp := toFinsupp✝ }.toFinsupp i = coeff { toFinsupp := toFinsupp✝ } i\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff (↑(monomial n) a) m = if n = m then a else 0\n[PROOFSTEP]\nrw [← ofFinsupp_single]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff { toFinsupp := Finsupp.single n a } m = if n = m then a else 0\n[PROOFSTEP]\nsimp only [coeff, LinearMap.coe_mk]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑(Finsupp.single n a) m = if n = m then a else 0\n[PROOFSTEP]\nrw [Finsupp.single_apply]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff 1 0 = 1\n[PROOFSTEP]\nrw [← monomial_zero_one, coeff_monomial]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (if 0 = 0 then 1 else 0) = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff (↑(monomial (n + 1)) a) 0 = 0\n[PROOFSTEP]\nsimp [coeff_monomial]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nhn : n ≠ 1\n⊢ coeff X n = 0\n[PROOFSTEP]\nrw [coeff_X, if_neg hn.symm]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ n ∈ support p ↔ coeff p n ≠ 0\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ n ∈ support { toFinsupp := toFinsupp✝ } ↔ coeff { toFinsupp := toFinsupp✝ } n ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ¬n ∈ support p ↔ coeff p n = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff (↑C a) n = if n = 0 then a else 0\n[PROOFSTEP]\nconvert coeff_monomial (a := a) (m := n) (n := 0) using 2\n[GOAL]\ncase h.e'_3.h₁.a\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ n = 0 ↔ 0 = n\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nh : n ≠ 0\n⊢ coeff (↑C a) n = 0\n[PROOFSTEP]\nrw [coeff_C, if_neg h]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nr : R\nn : ℕ\n⊢ coeff (↑C r) (n + 1) = 0\n[PROOFSTEP]\nsimp [coeff_C]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ coeff (↑m) n = ↑(if n = 0 then m else 0)\n[PROOFSTEP]\nsimp only [← C_eq_nat_cast, coeff_C, Nat.cast_ite, Nat.cast_zero]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ ↑C a * X ^ (n + 1) = ↑(monomial (n + 1)) a\n[PROOFSTEP]\nrw [pow_succ', ← mul_assoc, C_mul_X_pow_eq_monomial, X, monomial_mul_monomial, mul_one]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\na : R\nn : ℕ\n⊢ (↑C a * X ^ n).toFinsupp = Finsupp.single n a\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, toFinsupp_monomial]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ↑C a * X = ↑(monomial 1) a\n[PROOFSTEP]\nrw [← C_mul_X_pow_eq_monomial, pow_one]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : R\n⊢ (↑C a * X).toFinsupp = Finsupp.single 1 a\n[PROOFSTEP]\nrw [C_mul_X_eq_monomial, toFinsupp_monomial]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ Subsingleton R → Subsingleton R[X]\n[PROOFSTEP]\nintro\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na✝ : Subsingleton R\n⊢ Subsingleton R[X]\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (∀ (f g : R[X]), f = g) ↔ ∀ (a b : R), a = b\n[PROOFSTEP]\nsimpa only [← subsingleton_iff] using subsingleton_iff_subsingleton\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q✝ p q : R[X]\n⊢ p = q ↔ ∀ (n : ℕ), coeff p n = coeff q n\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q✝ q : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := toFinsupp✝ } = q ↔ ∀ (n : ℕ), coeff { toFinsupp := toFinsupp✝ } n = coeff q n\n[PROOFSTEP]\nrcases q with\n  ⟨⟩\n    -- Porting note: Was `simp [coeff, FunLike.ext_iff]`\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ { toFinsupp := toFinsupp✝¹ } = { toFinsupp := toFinsupp✝ } ↔\n    ∀ (n : ℕ), coeff { toFinsupp := toFinsupp✝¹ } n = coeff { toFinsupp := toFinsupp✝ } n\n[PROOFSTEP]\nsimp [coeff]\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ toFinsupp✝¹ = toFinsupp✝ ↔ ∀ (n : ℕ), ↑toFinsupp✝¹ n = ↑toFinsupp✝ n\n[PROOFSTEP]\nexact FunLike.ext_iff (F := ℕ →₀ R)\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ AddSubmonoid.closure {p | ∃ n a, p = ↑(monomial n) a} = ⊤\n[PROOFSTEP]\napply top_unique\n[GOAL]\ncase h\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ ⊤ ≤ AddSubmonoid.closure {p | ∃ n a, p = ↑(monomial n) a}\n[PROOFSTEP]\nrw [← AddSubmonoid.map_equiv_top (toFinsuppIso R).symm.toAddEquiv, ← Finsupp.add_closure_setOf_eq_single,\n  AddMonoidHom.map_mclosure]\n[GOAL]\ncase h\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ AddSubmonoid.closure\n      (↑(AddEquiv.toAddMonoidHom (RingEquiv.toAddEquiv (RingEquiv.symm (toFinsuppIso R)))) ''\n        {f | ∃ a b, f = Finsupp.single a b}) ≤\n    AddSubmonoid.closure {p | ∃ n a, p = ↑(monomial n) a}\n[PROOFSTEP]\nrefine' AddSubmonoid.closure_mono (Set.image_subset_iff.2 _)\n[GOAL]\ncase h\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ {f | ∃ a b, f = Finsupp.single a b} ⊆\n    ↑(AddEquiv.toAddMonoidHom (RingEquiv.toAddEquiv (RingEquiv.symm (toFinsuppIso R)))) ⁻¹'\n      {p | ∃ n a, p = ↑(monomial n) a}\n[PROOFSTEP]\nrintro _ ⟨n, a, rfl⟩\n[GOAL]\ncase h.intro.intro\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\n⊢ Finsupp.single n a ∈\n    ↑(AddEquiv.toAddMonoidHom (RingEquiv.toAddEquiv (RingEquiv.symm (toFinsuppIso R)))) ⁻¹'\n      {p | ∃ n a, p = ↑(monomial n) a}\n[PROOFSTEP]\nexact ⟨n, a, Polynomial.ofFinsupp_single _ _⟩\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nM : Type u_1\ninst✝ : AddMonoid M\nf g : R[X] →+ M\nh : ∀ (n : ℕ) (a : R), ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)\n⊢ Set.EqOn ↑f ↑g {p | ∃ n a, p = ↑(monomial n) a}\n[PROOFSTEP]\nrintro p ⟨n, a, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nM : Type u_1\ninst✝ : AddMonoid M\nf g : R[X] →+ M\nh : ∀ (n : ℕ) (a : R), ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)\nn : ℕ\na : R\n⊢ ↑f (↑(monomial n) a) = ↑g (↑(monomial n) a)\n[PROOFSTEP]\nexact h n a\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\nh : 0 = 1\np : R[X]\n⊢ p = 0\n[PROOFSTEP]\nrw [← one_smul R p, ← h, zero_smul]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\nH : a ≠ 0\n⊢ support (↑(monomial n) a) = {n}\n[PROOFSTEP]\nrw [← ofFinsupp_single, support]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\nH : a ≠ 0\n⊢ (match { toFinsupp := Finsupp.single n a } with\n    | { toFinsupp := p } => p.support) =\n    {n}\n[PROOFSTEP]\nexact Finsupp.support_single_ne_zero _ H\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\n⊢ support (↑(monomial n) a) ⊆ {n}\n[PROOFSTEP]\nrw [← ofFinsupp_single, support]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\n⊢ (match { toFinsupp := Finsupp.single n a } with\n    | { toFinsupp := p } => p.support) ⊆\n    {n}\n[PROOFSTEP]\nexact Finsupp.support_single_subset\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nc : R\nh : c ≠ 0\n⊢ support (↑C c * X) = {1}\n[PROOFSTEP]\nrw [C_mul_X_eq_monomial, support_monomial 1 h]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nc : R\n⊢ support (↑C c * X) ⊆ {1}\n[PROOFSTEP]\nsimpa only [C_mul_X_eq_monomial] using support_monomial' 1 c\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nc : R\nh : c ≠ 0\n⊢ support (↑C c * X ^ n) = {n}\n[PROOFSTEP]\nrw [C_mul_X_pow_eq_monomial, support_monomial n h]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nc : R\n⊢ support (↑C c * X ^ n) ⊆ {n}\n[PROOFSTEP]\nsimpa only [C_mul_X_pow_eq_monomial] using support_monomial' n c\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ X ^ n = ↑(monomial n) 1\n[PROOFSTEP]\ninduction' n with n hn\n[GOAL]\ncase zero\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ X ^ Nat.zero = ↑(monomial Nat.zero) 1\n[PROOFSTEP]\nrw [pow_zero, monomial_zero_one]\n[GOAL]\ncase succ\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nhn : X ^ n = ↑(monomial n) 1\n⊢ X ^ Nat.succ n = ↑(monomial (Nat.succ n)) 1\n[PROOFSTEP]\nrw [pow_succ', hn, X, monomial_mul_monomial, one_mul]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ (X ^ n).toFinsupp = Finsupp.single n 1\n[PROOFSTEP]\nrw [X_pow_eq_monomial, toFinsupp_monomial]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ a • X ^ n = ↑(monomial n) a\n[PROOFSTEP]\nrw [X_pow_eq_monomial, smul_monomial, smul_eq_mul, mul_one]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nH : ¬1 = 0\nn : ℕ\n⊢ support (X ^ n) = {n}\n[PROOFSTEP]\nconvert support_monomial n H\n[GOAL]\ncase h.e'_2.h.e'_3\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nH : ¬1 = 0\nn : ℕ\n⊢ X ^ n = ↑(monomial n) 1\n[PROOFSTEP]\nexact X_pow_eq_monomial n\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nH : 1 = 0\n⊢ support X = ∅\n[PROOFSTEP]\nrw [X, H, monomial_zero_right, support_zero]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\nH : ¬1 = 0\n⊢ support X = {1}\n[PROOFSTEP]\nrw [← pow_one X, support_X_pow H 1]\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\na : R\nha : a ≠ 0\ni j : ℕ\n⊢ ↑(monomial i) a = ↑(monomial j) a ↔ i = j\n[PROOFSTEP]\nrw [← ofFinsupp_single, ← ofFinsupp_single, ofFinsupp.injEq, Finsupp.single_left_inj ha]\n[GOAL]\nR : Type u\na b : R\nm✝ n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nk l m n : ℕ\nu v : R\nhu : u ≠ 0\nhv : v ≠ 0\n⊢ ↑C u * X ^ k + ↑C v * X ^ l = ↑C u * X ^ m + ↑C v * X ^ n ↔\n    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n\n[PROOFSTEP]\nsimp_rw [C_mul_X_pow_eq_monomial, ← toFinsupp_inj, toFinsupp_add, toFinsupp_monomial]\n[GOAL]\nR : Type u\na b : R\nm✝ n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nk l m n : ℕ\nu v : R\nhu : u ≠ 0\nhv : v ≠ 0\n⊢ Finsupp.single k u + Finsupp.single l v = Finsupp.single m u + Finsupp.single n v ↔\n    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n\n[PROOFSTEP]\nexact Finsupp.single_add_single_eq_single_add_single hu hv\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ p * q = ∑ i in support p, sum q fun j a => ↑(monomial (i + j)) (coeff p i * a)\n[PROOFSTEP]\napply toFinsupp_injective\n[GOAL]\ncase a\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np q : R[X]\n⊢ (p * q).toFinsupp = (∑ i in support p, sum q fun j a => ↑(monomial (i + j)) (coeff p i * a)).toFinsupp\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase a.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\nq : R[X]\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝ } * q).toFinsupp =\n    (∑ i in support { toFinsupp := toFinsupp✝ },\n        sum q fun j a => ↑(monomial (i + j)) (coeff { toFinsupp := toFinsupp✝ } i * a)).toFinsupp\n[PROOFSTEP]\nrcases q with ⟨⟩\n[GOAL]\ncase a.ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ({ toFinsupp := toFinsupp✝¹ } * { toFinsupp := toFinsupp✝ }).toFinsupp =\n    (∑ i in support { toFinsupp := toFinsupp✝¹ },\n        sum { toFinsupp := toFinsupp✝ } fun j a =>\n          ↑(monomial (i + j)) (coeff { toFinsupp := toFinsupp✝¹ } i * a)).toFinsupp\n[PROOFSTEP]\nsimp [support, sum, coeff, toFinsupp_sum]\n[GOAL]\ncase a.ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ toFinsupp✝¹ * toFinsupp✝ =\n    ∑ x in toFinsupp✝¹.support, ∑ x_1 in toFinsupp✝.support, Finsupp.single (x + x_1) (↑toFinsupp✝¹ x * ↑toFinsupp✝ x_1)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nS : Type u_1\ninst✝ : AddCommMonoid S\nf : ℕ → R → S\n⊢ sum 0 f = 0\n[PROOFSTEP]\nsimp [sum]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ : R[X]\nS : Type u_1\ninst✝ : AddCommMonoid S\np q : R[X]\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nh_add : ∀ (a : ℕ) (b₁ b₂ : R), f a (b₁ + b₂) = f a b₁ + f a b₂\n⊢ sum (p + q) f = sum p f + sum q f\n[PROOFSTEP]\nrw [show p + q = ⟨p.toFinsupp + q.toFinsupp⟩ from add_def p q]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q✝ : R[X]\nS : Type u_1\ninst✝ : AddCommMonoid S\np q : R[X]\nf : ℕ → R → S\nhf : ∀ (i : ℕ), f i 0 = 0\nh_add : ∀ (a : ℕ) (b₁ b₂ : R), f a (b₁ + b₂) = f a b₁ + f a b₂\n⊢ sum { toFinsupp := p.toFinsupp + q.toFinsupp } f = sum p f + sum q f\n[PROOFSTEP]\nexact Finsupp.sum_add_index (fun i _ ↦ hf i) (fun a _ b₁ b₂ ↦ h_add a b₁ b₂)\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\np✝ q : R[X]\nS : Type u_1\ninst✝ : AddCommMonoid S\np : R[X]\nf g : ℕ → R → S\n⊢ sum p (f + g) = sum p f + sum p g\n[PROOFSTEP]\nsimp [sum_def, Finset.sum_add_distrib]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\n⊢ (sum p fun n a => ↑C a * X ^ n) = p\n[PROOFSTEP]\nsimp_rw [C_mul_X_pow_eq_monomial, sum_monomial_eq]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ (erase n p).toFinsupp = Finsupp.erase n p.toFinsupp\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (erase n { toFinsupp := toFinsupp✝ }).toFinsupp = Finsupp.erase n { toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nsimp only [erase_def]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q : R[X]\np : AddMonoidAlgebra R ℕ\nn : ℕ\n⊢ { toFinsupp := Finsupp.erase n p } = erase n { toFinsupp := p }\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase mk\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\nsupport✝ : Finset ℕ\ntoFun✝ : ℕ → R\nmem_support_toFun✝ : ∀ (a : ℕ), a ∈ support✝ ↔ toFun✝ a ≠ 0\n⊢ { toFinsupp := Finsupp.erase n { support := support✝, toFun := toFun✝, mem_support_toFun := mem_support_toFun✝ } } =\n    erase n { toFinsupp := { support := support✝, toFun := toFun✝, mem_support_toFun := mem_support_toFun✝ } }\n[PROOFSTEP]\nsimp only [erase_def]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ support (erase n p) = Finset.erase (support p) n\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support (erase n { toFinsupp := toFinsupp✝ }) = Finset.erase (support { toFinsupp := toFinsupp✝ }) n\n[PROOFSTEP]\nsimp only [support, erase_def, Finsupp.support_erase]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ (↑(monomial n) (coeff p n) + erase n p).toFinsupp = p.toFinsupp\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (↑(monomial n) (coeff { toFinsupp := toFinsupp✝ } n) + erase n { toFinsupp := toFinsupp✝ }).toFinsupp =\n    { toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nrw [toFinsupp_add, toFinsupp_monomial, toFinsupp_erase, coeff]\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ Finsupp.single n\n        ((match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with\n          | { toFinsupp := p } => ↑p)\n          n) +\n      Finsupp.erase n { toFinsupp := toFinsupp✝ }.toFinsupp =\n    { toFinsupp := toFinsupp✝ }.toFinsupp\n[PROOFSTEP]\nexact Finsupp.single_add_erase _ _\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn i : ℕ\n⊢ coeff (erase n p) i = if i = n then 0 else coeff p i\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn i : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ coeff (erase n { toFinsupp := toFinsupp✝ }) i = if i = n then 0 else coeff { toFinsupp := toFinsupp✝ } i\n[PROOFSTEP]\nsimp only [erase_def, coeff]\n  -- Porting note: Was `convert rfl`.\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn i : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ ↑(Finsupp.erase n toFinsupp✝) i = if i = n then 0 else ↑toFinsupp✝ i\n[PROOFSTEP]\nexact ite_congr rfl (fun _ => rfl) (fun _ => rfl)\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\n⊢ (erase n 0).toFinsupp = 0.toFinsupp\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\n⊢ (erase n (↑(monomial n) a)).toFinsupp = 0.toFinsupp\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ coeff (erase n p) n = 0\n[PROOFSTEP]\nsimp [coeff_erase]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn i : ℕ\nh : i ≠ n\n⊢ coeff (erase n p) i = coeff p i\n[PROOFSTEP]\nsimp [coeff_erase, h]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\n⊢ coeff (update p n a) = Function.update (coeff p) n a\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\nx✝ : ℕ\n⊢ coeff (update p n a) x✝ = Function.update (coeff p) n a x✝\n[PROOFSTEP]\ncases p\n[GOAL]\ncase h.ofFinsupp\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np q : R[X]\nn : ℕ\na : R\nx✝ : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ coeff (update { toFinsupp := toFinsupp✝ } n a) x✝ = Function.update (coeff { toFinsupp := toFinsupp✝ }) n a x✝\n[PROOFSTEP]\nsimp only [coeff, update, Function.update_apply, coe_update]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\ni : ℕ\n⊢ coeff (update p n a) i = if i = n then a else coeff p i\n[PROOFSTEP]\nrw [coeff_update, Function.update_apply]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\n⊢ coeff (update p n a) n = a\n[PROOFSTEP]\nrw [p.coeff_update_apply, if_pos rfl]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\ni : ℕ\nh : i ≠ n\n⊢ coeff (update p n a) i = coeff p i\n[PROOFSTEP]\nrw [p.coeff_update_apply, if_neg h]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ update p n 0 = erase n p\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\na b : R\nm n✝¹ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn n✝ : ℕ\n⊢ coeff (update p n 0) n✝ = coeff (erase n p) n✝\n[PROOFSTEP]\nrw [coeff_update_apply, coeff_erase]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\ninst✝ : Decidable (a = 0)\n⊢ support (update p n a) = if a = 0 then Finset.erase (support p) n else insert n (support p)\n[PROOFSTEP]\nclassical\ncases p\nsimp only [support, update, Finsupp.support_update]\ncongr\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\ninst✝ : Decidable (a = 0)\n⊢ support (update p n a) = if a = 0 then Finset.erase (support p) n else insert n (support p)\n[PROOFSTEP]\ncases p\n[GOAL]\ncase ofFinsupp\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nn : ℕ\na : R\ninst✝ : Decidable (a = 0)\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support (update { toFinsupp := toFinsupp✝ } n a) =\n    if a = 0 then Finset.erase (support { toFinsupp := toFinsupp✝ }) n\n    else insert n (support { toFinsupp := toFinsupp✝ })\n[PROOFSTEP]\nsimp only [support, update, Finsupp.support_update]\n[GOAL]\ncase ofFinsupp\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝¹ : Semiring R\np q : R[X]\nn : ℕ\na : R\ninst✝ : Decidable (a = 0)\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (if a = 0 then Finset.erase toFinsupp✝.support n else insert n toFinsupp✝.support) =\n    if a = 0 then Finset.erase toFinsupp✝.support n else insert n toFinsupp✝.support\n[PROOFSTEP]\ncongr\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\n⊢ support (update p n 0) = Finset.erase (support p) n\n[PROOFSTEP]\nrw [update_zero_eq_erase, support_erase]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\nha : a ≠ 0\n⊢ support (update p n a) = insert n (support p)\n[PROOFSTEP]\nclassical rw [support_update, if_neg ha]\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Semiring R\np✝ q p : R[X]\nn : ℕ\na : R\nha : a ≠ 0\n⊢ support (update p n a) = insert n (support p)\n[PROOFSTEP]\nrw [support_update, if_neg ha]\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\np : R[X]\nn : ℕ\n⊢ coeff (-p) n = -coeff p n\n[PROOFSTEP]\nrcases p with\n  ⟨⟩\n    -- Porting note: The last rule should be `apply`ed.\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ coeff (-{ toFinsupp := toFinsupp✝ }) n = -coeff { toFinsupp := toFinsupp✝ } n\n[PROOFSTEP]\nrw [← ofFinsupp_neg, coeff, coeff]\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := -toFinsupp✝ } with\n      | { toFinsupp := p } => ↑p)\n      n =\n    -(match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with\n        | { toFinsupp := p } => ↑p)\n        n\n[PROOFSTEP]\napply Finsupp.neg_apply\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\np q : R[X]\nn : ℕ\n⊢ coeff (p - q) n = coeff p n - coeff q n\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nq : R[X]\nn : ℕ\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ coeff ({ toFinsupp := toFinsupp✝ } - q) n = coeff { toFinsupp := toFinsupp✝ } n - coeff q n\n[PROOFSTEP]\nrcases q with\n  ⟨⟩\n    -- Porting note: The last rule should be `apply`ed.\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℕ\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ coeff ({ toFinsupp := toFinsupp✝¹ } - { toFinsupp := toFinsupp✝ }) n =\n    coeff { toFinsupp := toFinsupp✝¹ } n - coeff { toFinsupp := toFinsupp✝ } n\n[PROOFSTEP]\nrw [← ofFinsupp_sub, coeff, coeff, coeff]\n[GOAL]\ncase ofFinsupp.ofFinsupp\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℕ\ntoFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝¹ - toFinsupp✝ } with\n      | { toFinsupp := p } => ↑p)\n      n =\n    (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝¹ } with\n        | { toFinsupp := p } => ↑p)\n        n -\n      (match (motive := R[X] → ℕ → R) { toFinsupp := toFinsupp✝ } with\n        | { toFinsupp := p } => ↑p)\n        n\n[PROOFSTEP]\napply Finsupp.sub_apply\n[GOAL]\nR : Type u\na✝ b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℕ\na : R\n⊢ ↑(monomial n) (-a) = -↑(monomial n) a\n[PROOFSTEP]\nrw [eq_neg_iff_add_eq_zero, ← monomial_add, neg_add_self, monomial_zero_right]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Ring R\np : R[X]\n⊢ support (-p) = support p\n[PROOFSTEP]\nrcases p with\n  ⟨⟩\n    -- Porting note: The last rule should be `apply`ed.\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Ring R\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ support (-{ toFinsupp := toFinsupp✝ }) = support { toFinsupp := toFinsupp✝ }\n[PROOFSTEP]\nrw [← ofFinsupp_neg, support, support]\n[GOAL]\ncase ofFinsupp\nR : Type u\na b : R\nm n : ℕ\ninst✝ : Ring R\ntoFinsupp✝ : AddMonoidAlgebra R ℕ\n⊢ (match { toFinsupp := -toFinsupp✝ } with\n    | { toFinsupp := p } => p.support) =\n    match { toFinsupp := toFinsupp✝ } with\n    | { toFinsupp := p } => p.support\n[PROOFSTEP]\napply Finsupp.support_neg\n[GOAL]\nR : Type u\na b : R\nm n✝ : ℕ\ninst✝ : Ring R\nn : ℤ\n⊢ ↑C ↑n = ↑n\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\n⊢ Nontrivial R[X]\n[PROOFSTEP]\nhave h : Nontrivial (AddMonoidAlgebra R ℕ) := by infer_instance\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\n⊢ Nontrivial (AddMonoidAlgebra R ℕ)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\nh : Nontrivial (AddMonoidAlgebra R ℕ)\n⊢ Nontrivial R[X]\n[PROOFSTEP]\nrcases h.exists_pair_ne with ⟨x, y, hxy⟩\n[GOAL]\ncase intro.intro\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\nh : Nontrivial (AddMonoidAlgebra R ℕ)\nx y : AddMonoidAlgebra R ℕ\nhxy : x ≠ y\n⊢ Nontrivial R[X]\n[PROOFSTEP]\nrefine' ⟨⟨⟨x⟩, ⟨y⟩, _⟩⟩\n[GOAL]\ncase intro.intro\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\nh : Nontrivial (AddMonoidAlgebra R ℕ)\nx y : AddMonoidAlgebra R ℕ\nhxy : x ≠ y\n⊢ { toFinsupp := x } ≠ { toFinsupp := y }\n[PROOFSTEP]\nsimp [hxy]\n[GOAL]\nR : Type u\na b : R\nm n : ℕ\ninst✝¹ : Semiring R\ninst✝ : Nontrivial R\n⊢ ¬coeff X 1 = coeff 0 1\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\na✝ b : R\nm n : ℕ\ninst✝ : DivisionRing R\na : ℚ\nf : R[X]\n⊢ a • f = ↑C ↑a * f\n[PROOFSTEP]\nrw [← Rat.smul_one_eq_coe, ← Polynomial.smul_C, C_1, smul_one_mul]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Basic", "llama_tokens": 24363, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5660185351961015, "lm_q2_score": 0.5156199157230157, "lm_q1q2_score": 0.2918504294154786}}
{"text": "[GOAL]\nM : Type u_1\ninst✝ : Monoid M\n⊢ SMulCommClass { x // x ∈ center M } { x // x ∈ center M } M\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.Submonoid.Center", "llama_tokens": 58, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.29170346893537613}}
{"text": "[GOAL]\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh : IsAdmissible abv\n⊢ ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(↑abv (A i₁ % b - A i₀ % b)) < ↑abv b • ε\n[PROOFSTEP]\nlet e := Fintype.equivFin ι\n[GOAL]\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh : IsAdmissible abv\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\n⊢ ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(↑abv (A i₁ % b - A i₀ % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := h.exists_partition' (Fintype.card ι) hε hb (A ∘ e.symm)\n[GOAL]\ncase intro\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh : IsAdmissible abv\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\nt : Fin (Fintype.card ι) → Fin (IsAdmissible.card h ε)\nht : ∀ (i₀ i₁ : Fin (Fintype.card ι)), t i₀ = t i₁ → ↑(↑abv ((A ∘ ↑e.symm) i₁ % b - (A ∘ ↑e.symm) i₀ % b)) < ↑abv b • ε\n⊢ ∃ t, ∀ (i₀ i₁ : ι), t i₀ = t i₁ → ↑(↑abv (A i₁ % b - A i₀ % b)) < ↑abv b • ε\n[PROOFSTEP]\nrefine' ⟨t ∘ e, fun i₀ i₁ h ↦ _⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh✝ : IsAdmissible abv\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\nt : Fin (Fintype.card ι) → Fin (IsAdmissible.card h✝ ε)\nht : ∀ (i₀ i₁ : Fin (Fintype.card ι)), t i₀ = t i₁ → ↑(↑abv ((A ∘ ↑e.symm) i₁ % b - (A ∘ ↑e.symm) i₀ % b)) < ↑abv b • ε\ni₀ i₁ : ι\nh : (t ∘ ↑e) i₀ = (t ∘ ↑e) i₁\n⊢ ↑(↑abv (A i₁ % b - A i₀ % b)) < ↑abv b • ε\n[PROOFSTEP]\nconvert (config := { transparency := .default }) ht (e i₀) (e i₁) h\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_6.h.e'_5.h.e'_5.h.e'_1\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh✝ : IsAdmissible abv\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\nt : Fin (Fintype.card ι) → Fin (IsAdmissible.card h✝ ε)\nht : ∀ (i₀ i₁ : Fin (Fintype.card ι)), t i₀ = t i₁ → ↑(↑abv ((A ∘ ↑e.symm) i₁ % b - (A ∘ ↑e.symm) i₀ % b)) < ↑abv b • ε\ni₀ i₁ : ι\nh : (t ∘ ↑e) i₀ = (t ∘ ↑e) i₁\n⊢ i₁ = ↑e.symm (↑e i₁)\n[PROOFSTEP]\nsimp only [e.symm_apply_apply]\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_6.h.e'_6.h.e'_5.h.e'_1\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : ι → R\nh✝ : IsAdmissible abv\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\nt : Fin (Fintype.card ι) → Fin (IsAdmissible.card h✝ ε)\nht : ∀ (i₀ i₁ : Fin (Fintype.card ι)), t i₀ = t i₁ → ↑(↑abv ((A ∘ ↑e.symm) i₁ % b - (A ∘ ↑e.symm) i₀ % b)) < ↑abv b • ε\ni₀ i₁ : ι\nh : (t ∘ ↑e) i₀ = (t ∘ ↑e) i₁\n⊢ i₀ = ↑e.symm (↑e i₀)\n[PROOFSTEP]\nsimp only [e.symm_apply_apply]\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nn : ℕ\nh : IsAdmissible abv\n⊢ ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nhaveI := Classical.decEq R\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nn : ℕ\nh : IsAdmissible abv\nthis : DecidableEq R\n⊢ ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\n⊢ ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.zero)) → Fin Nat.zero → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin Nat.zero), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nintro ε _hε b _hb A\n[GOAL]\ncase zero\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nε : ℝ\n_hε : 0 < ε\nb : R\n_hb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.zero)) → Fin Nat.zero → R\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin Nat.zero), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nrefine' ⟨0, 1, _, _⟩\n[GOAL]\ncase zero.refine'_1\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nε : ℝ\n_hε : 0 < ε\nb : R\n_hb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.zero)) → Fin Nat.zero → R\n⊢ 0 ≠ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase zero.refine'_2\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nε : ℝ\n_hε : 0 < ε\nb : R\n_hb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.zero)) → Fin Nat.zero → R\n⊢ ∀ (k : Fin Nat.zero), ↑(↑abv (A 1 k % b - A 0 k % b)) < ↑abv b • ε\n[PROOFSTEP]\nrintro ⟨i, ⟨⟩⟩\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n⊢ ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin (Nat.succ n)), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nintro ε hε b hb A\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin (Nat.succ n)), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nlet M := h.card ε\n[GOAL]\ncase succ\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin (Nat.succ n)), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨s, s_inj, hs⟩ :\n  ∃ s : Fin (M ^ n).succ → Fin (M ^ n.succ).succ,\n    Function.Injective s ∧ ∀ i₀ i₁, (abv (A (s i₁) 0 % b - A (s i₀) 0 % b) : ℝ) < abv b • ε :=\n  by\n  -- We can partition the `A`s into `M` subsets where\n      -- the first components lie close together:\n  obtain ⟨t, ht⟩ :\n    ∃ t : Fin (M ^ n.succ).succ → Fin M, ∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ 0 % b - A i₀ 0 % b) : ℝ) < abv b • ε :=\n    h.exists_partition hε hb fun x ↦\n      A x\n        0\n          -- Since the `M` subsets contain more than `M * M^n` elements total,\n              -- there must be a subset that contains more than `M^n` elements.\n  obtain ⟨s, hs⟩ :=\n    @Fintype.exists_lt_card_fiber_of_mul_lt_card _ _ _ _ _ t (M ^ n)\n      (by simpa only [Fintype.card_fin, pow_succ] using Nat.lt_succ_self (M ^ n.succ))\n  refine' ⟨fun i ↦ (Finset.univ.filter fun x ↦ t x = s).toList.nthLe i _, _, fun i₀ i₁ ↦ ht _ _ _⟩\n  · refine' i.2.trans_le _\n    rwa [Finset.length_toList]\n  · intro i j h\n    ext\n    exact Fin.mk.inj_iff.mp (List.nodup_iff_injective_get.mp (Finset.nodup_toList _) h)\n  have : ∀ i h, (Finset.univ.filter fun x ↦ t x = s).toList.nthLe i h ∈ Finset.univ.filter fun x ↦ t x = s :=\n    by\n    intro i h\n    exact Finset.mem_toList.mp (List.get_mem _ i h)\n  obtain ⟨_, h₀⟩ := Finset.mem_filter.mp (this i₀ _)\n  obtain ⟨_, h₁⟩ := Finset.mem_filter.mp (this i₁ _)\n  exact h₀.trans h₁.symm\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\n⊢ ∃ s, Function.Injective s ∧ ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨t, ht⟩ :\n  ∃ t : Fin (M ^ n.succ).succ → Fin M, ∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ 0 % b - A i₀ 0 % b) : ℝ) < abv b • ε :=\n  h.exists_partition hε hb fun x ↦\n    A x\n      0\n        -- Since the `M` subsets contain more than `M * M^n` elements total,\n            -- there must be a subset that contains more than `M^n` elements.\n[GOAL]\ncase intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\n⊢ ∃ s, Function.Injective s ∧ ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨s, hs⟩ :=\n  @Fintype.exists_lt_card_fiber_of_mul_lt_card _ _ _ _ _ t (M ^ n)\n    (by simpa only [Fintype.card_fin, pow_succ] using Nat.lt_succ_self (M ^ n.succ))\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\n⊢ Fintype.card (Fin M) * M ^ n < Fintype.card (Fin (Nat.succ (M ^ Nat.succ n)))\n[PROOFSTEP]\nsimpa only [Fintype.card_fin, pow_succ] using Nat.lt_succ_self (M ^ n.succ)\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\n⊢ ∃ s, Function.Injective s ∧ ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\n[PROOFSTEP]\nrefine' ⟨fun i ↦ (Finset.univ.filter fun x ↦ t x = s).toList.nthLe i _, _, fun i₀ i₁ ↦ ht _ _ _⟩\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni : Fin (Nat.succ (M ^ n))\n⊢ ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))\n[PROOFSTEP]\nrefine' i.2.trans_le _\n[GOAL]\ncase intro.intro.refine'_1\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni : Fin (Nat.succ (M ^ n))\n⊢ Nat.succ (M ^ n) ≤ List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))\n[PROOFSTEP]\nrwa [Finset.length_toList]\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\n⊢ Function.Injective fun i =>\n    List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n      (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)))\n[PROOFSTEP]\nintro i j h\n[GOAL]\ncase intro.intro.refine'_2\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni j : Fin (Nat.succ (M ^ n))\nh :\n  (fun i =>\n        List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n          (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n      i =\n    (fun i =>\n        List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n          (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n      j\n⊢ i = j\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.refine'_2.h\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni j : Fin (Nat.succ (M ^ n))\nh :\n  (fun i =>\n        List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n          (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n      i =\n    (fun i =>\n        List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n          (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n      j\n⊢ ↑i = ↑j\n[PROOFSTEP]\nexact Fin.mk.inj_iff.mp (List.nodup_iff_injective_get.mp (Finset.nodup_toList _) h)\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\n⊢ t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₀) =\n    t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₁)\n[PROOFSTEP]\nhave : ∀ i h, (Finset.univ.filter fun x ↦ t x = s).toList.nthLe i h ∈ Finset.univ.filter fun x ↦ t x = s :=\n  by\n  intro i h\n  exact Finset.mem_toList.mp (List.get_mem _ i h)\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\n⊢ ∀ (i : ℕ) (h : i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))),\n    List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) i h ∈\n      Finset.filter (fun x => t x = s) Finset.univ\n[PROOFSTEP]\nintro i h\n[GOAL]\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\ni : ℕ\nh : i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))\n⊢ List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) i h ∈\n    Finset.filter (fun x => t x = s) Finset.univ\n[PROOFSTEP]\nexact Finset.mem_toList.mp (List.get_mem _ i h)\n[GOAL]\ncase intro.intro.refine'_3\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis✝ : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\nthis :\n  ∀ (i : ℕ) (h : i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))),\n    List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) i h ∈\n      Finset.filter (fun x => t x = s) Finset.univ\n⊢ t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₀) =\n    t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₁)\n[PROOFSTEP]\nobtain ⟨_, h₀⟩ := Finset.mem_filter.mp (this i₀ _)\n[GOAL]\ncase intro.intro.refine'_3.intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis✝ : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\nthis :\n  ∀ (i : ℕ) (h : i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))),\n    List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) i h ∈\n      Finset.filter (fun x => t x = s) Finset.univ\nleft✝ : List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₀ ?m.22999 ∈ Finset.univ\nh₀ : t (List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₀ ?m.22999) = s\n⊢ t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₀) =\n    t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₁)\n[PROOFSTEP]\nobtain ⟨_, h₁⟩ := Finset.mem_filter.mp (this i₁ _)\n[GOAL]\ncase intro.intro.refine'_3.intro.intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis✝ : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\nt : Fin (Nat.succ (M ^ Nat.succ n)) → Fin M\nht : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ Nat.succ n))), t i₀ = t i₁ → ↑(↑abv (A i₁ 0 % b - A i₀ 0 % b)) < ↑abv b • ε\ns : Fin M\nhs : M ^ n < Finset.card (Finset.filter (fun x => t x = s) Finset.univ)\ni₀ i₁ : Fin (Nat.succ (M ^ n))\nthis :\n  ∀ (i : ℕ) (h : i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))),\n    List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) i h ∈\n      Finset.filter (fun x => t x = s) Finset.univ\nleft✝¹ : List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₀ ?m.22999 ∈ Finset.univ\nh₀ : t (List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₀ ?m.22999) = s\nleft✝ : List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₁ ?m.23393 ∈ Finset.univ\nh₁ : t (List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i₁ ?m.23393) = s\n⊢ t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₀) =\n    t\n      ((fun i =>\n          List.nthLe (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ)) ↑i\n            (_ : ↑i < List.length (Finset.toList (Finset.filter (fun x => t x = s) Finset.univ))))\n        i₁)\n[PROOFSTEP]\nexact h₀.trans h₁.symm\n[GOAL]\ncase succ.intro.intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h ε\ns : Fin (Nat.succ (M ^ n)) → Fin (Nat.succ (M ^ Nat.succ n))\ns_inj : Function.Injective s\nhs : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin (Nat.succ n)), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨k₀, k₁, hk, h⟩ := ih hε hb fun x ↦ Fin.tail (A (s x))\n[GOAL]\ncase succ.intro.intro.intro.intro.intro\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\ns : Fin (Nat.succ (M ^ n)) → Fin (Nat.succ (M ^ Nat.succ n))\ns_inj : Function.Injective s\nhs : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\nk₀ k₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n))\nhk : k₀ ≠ k₁\nh : ∀ (k : Fin n), ↑(↑abv (Fin.tail (A (s k₁)) k % b - Fin.tail (A (s k₀)) k % b)) < ↑abv b • ε\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin (Nat.succ n)), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nrefine' ⟨s k₀, s k₁, fun h ↦ hk (s_inj h), fun i ↦ Fin.cases _ (fun i ↦ _) i⟩\n[GOAL]\ncase succ.intro.intro.intro.intro.intro.refine'_1\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\ns : Fin (Nat.succ (M ^ n)) → Fin (Nat.succ (M ^ Nat.succ n))\ns_inj : Function.Injective s\nhs : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\nk₀ k₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n))\nhk : k₀ ≠ k₁\nh : ∀ (k : Fin n), ↑(↑abv (Fin.tail (A (s k₁)) k % b - Fin.tail (A (s k₀)) k % b)) < ↑abv b • ε\ni : Fin (Nat.succ n)\n⊢ ↑(↑abv (A (s k₁) 0 % b - A (s k₀) 0 % b)) < ↑abv b • ε\n[PROOFSTEP]\nexact hs k₀ k₁\n[GOAL]\ncase succ.intro.intro.intro.intro.intro.refine'_2\nR : Type u_1\ninst✝ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nh✝ : IsAdmissible abv\nthis : DecidableEq R\nn : ℕ\nih :\n  ∀ {ε : ℝ},\n    0 < ε →\n      ∀ {b : R},\n        b ≠ 0 →\n          ∀ (A : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n)) → Fin n → R),\n            ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : Fin n), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Nat.succ n)) → Fin (Nat.succ n) → R\nM : ℕ := IsAdmissible.card h✝ ε\ns : Fin (Nat.succ (M ^ n)) → Fin (Nat.succ (M ^ Nat.succ n))\ns_inj : Function.Injective s\nhs : ∀ (i₀ i₁ : Fin (Nat.succ (M ^ n))), ↑(↑abv (A (s i₁) 0 % b - A (s i₀) 0 % b)) < ↑abv b • ε\nk₀ k₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ n))\nhk : k₀ ≠ k₁\nh : ∀ (k : Fin n), ↑(↑abv (Fin.tail (A (s k₁)) k % b - Fin.tail (A (s k₀)) k % b)) < ↑abv b • ε\ni✝ : Fin (Nat.succ n)\ni : Fin n\n⊢ ↑(↑abv (A (s k₁) (Fin.succ i) % b - A (s k₀) (Fin.succ i) % b)) < ↑abv b • ε\n[PROOFSTEP]\nexact h i\n[GOAL]\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Fintype.card ι)) → ι → R\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nlet e := Fintype.equivFin ι\n[GOAL]\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h ε ^ Fintype.card ι)) → ι → R\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nobtain ⟨i₀, i₁, ne, h⟩ := h.exists_approx_aux (Fintype.card ι) hε hb fun x y ↦ A x (e.symm y)\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh✝ : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\ni₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))\nne : i₀ ≠ i₁\nh : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε\n⊢ ∃ i₀ i₁, i₀ ≠ i₁ ∧ ∀ (k : ι), ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nrefine' ⟨i₀, i₁, ne, fun k ↦ _⟩\n[GOAL]\ncase intro.intro.intro\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh✝ : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\ni₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))\nne : i₀ ≠ i₁\nh : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε\nk : ι\n⊢ ↑(↑abv (A i₁ k % b - A i₀ k % b)) < ↑abv b • ε\n[PROOFSTEP]\nconvert h (e k)\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_6.h.e'_5.h.e'_5.h.e'_2\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh✝ : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\ni₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))\nne : i₀ ≠ i₁\nh : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε\nk : ι\n⊢ k = ↑e.symm (↑e k)\n[PROOFSTEP]\nsimp only [e.symm_apply_apply]\n[GOAL]\ncase h.e'_3.h.e'_3.h.e'_6.h.e'_6.h.e'_5.h.e'_2\nR : Type u_1\ninst✝¹ : EuclideanDomain R\nabv : AbsoluteValue R ℤ\nι : Type u_2\ninst✝ : Fintype ι\nε : ℝ\nhε : 0 < ε\nb : R\nhb : b ≠ 0\nh✝ : IsAdmissible abv\nA : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι)) → ι → R\ne : ι ≃ Fin (Fintype.card ι) := Fintype.equivFin ι\ni₀ i₁ : Fin (Nat.succ (IsAdmissible.card h✝ ε ^ Fintype.card ι))\nne : i₀ ≠ i₁\nh : ∀ (k : Fin (Fintype.card ι)), ↑(↑abv (A i₁ (↑e.symm k) % b - A i₀ (↑e.symm k) % b)) < ↑abv b • ε\nk : ι\n⊢ k = ↑e.symm (↑e k)\n[PROOFSTEP]\nsimp only [e.symm_apply_apply]\n", "meta": {"mathlib_filename": "Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue", "llama_tokens": 17136, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5698526660244838, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.2916030714396655}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : LT α\na : α\n⊢ ¬IsSuccLimit a ↔ ∃ b, b ⋖ a\n[PROOFSTEP]\nsimp [IsSuccLimit]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : SuccOrder α\nh : IsSuccLimit (succ a)\n⊢ IsMax a\n[PROOFSTEP]\nby_contra H\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : SuccOrder α\nh : IsSuccLimit (succ a)\nH : ¬IsMax a\n⊢ False\n[PROOFSTEP]\nexact h a (covby_succ_of_not_isMax H)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : SuccOrder α\nha : ¬IsMax a\n⊢ ¬IsSuccLimit (succ a)\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : SuccOrder α\nha : IsSuccLimit (succ a)\n⊢ IsMax a\n[PROOFSTEP]\nexact ha.isMax\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\na : α\ninst✝¹ : SuccOrder α\ninst✝ : NoMaxOrder α\nh : IsSuccLimit a\nb : α\n⊢ succ b ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : SuccOrder α\ninst✝ : NoMaxOrder α\nb : α\nh : IsSuccLimit (succ b)\n⊢ False\n[PROOFSTEP]\nexact not_isMax _ h.isMax\n[GOAL]\nα : Type u_1\ninst✝³ : Preorder α\na : α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : NoMaxOrder α\nh : IsSuccLimit a\nb : α\nhb : b ≤ a\n⊢ a ≤ b\n[PROOFSTEP]\nrcases hb.exists_succ_iterate with ⟨_ | n, rfl⟩\n[GOAL]\ncase intro.zero\nα : Type u_1\ninst✝³ : Preorder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : NoMaxOrder α\nb : α\nh : IsSuccLimit (succ^[Nat.zero] b)\nhb : b ≤ succ^[Nat.zero] b\n⊢ succ^[Nat.zero] b ≤ b\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\ncase intro.succ\nα : Type u_1\ninst✝³ : Preorder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : NoMaxOrder α\nb : α\nn : ℕ\nh : IsSuccLimit (succ^[Nat.succ n] b)\nhb : b ≤ succ^[Nat.succ n] b\n⊢ succ^[Nat.succ n] b ≤ b\n[PROOFSTEP]\nrw [iterate_succ_apply'] at h \n[GOAL]\ncase intro.succ\nα : Type u_1\ninst✝³ : Preorder α\ninst✝² : SuccOrder α\ninst✝¹ : IsSuccArchimedean α\ninst✝ : NoMaxOrder α\nb : α\nn : ℕ\nh : IsSuccLimit (succ (succ^[n] b))\nhb : b ≤ succ^[Nat.succ n] b\n⊢ succ^[Nat.succ n] b ≤ b\n[PROOFSTEP]\nexact (not_isSuccLimit_succ _ h).elim\n[GOAL]\nα : Type u_1\ninst✝⁴ : Preorder α\na : α\ninst✝³ : SuccOrder α\ninst✝² : IsSuccArchimedean α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\n⊢ ¬IsSuccLimit a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\n⊢ ¬IsSuccLimit a ↔ ∃ b, ¬IsMax b ∧ succ b = a\n[PROOFSTEP]\nrw [not_isSuccLimit_iff_exists_covby]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\n⊢ (∃ b, b ⋖ a) ↔ ∃ b, ¬IsMax b ∧ succ b = a\n[PROOFSTEP]\nrefine' exists_congr fun b => ⟨fun hba => ⟨hba.lt.not_isMax, (Covby.succ_eq hba)⟩, _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\n⊢ ¬IsMax b ∧ succ b = a → b ⋖ a\n[PROOFSTEP]\nrintro ⟨h, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\nb✝ : α\nC : α → Sort u_2\nb : α\nh : ¬IsMax b\n⊢ b ⋖ succ b\n[PROOFSTEP]\nexact covby_succ_of_not_isMax h\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nh : ¬IsSuccLimit a\n⊢ a ∈ range succ\n[PROOFSTEP]\ncases' not_isSuccLimit_iff.1 h with b hb\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nh : ¬IsSuccLimit a\nb : α\nhb : ¬IsMax b ∧ succ b = a\n⊢ a ∈ range succ\n[PROOFSTEP]\nexact ⟨b, hb.2⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhb : IsSuccLimit b\nha : a < b\n⊢ succ a < b\n[PROOFSTEP]\nby_cases h : IsMax a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhb : IsSuccLimit b\nha : a < b\nh : IsMax a\n⊢ succ a < b\n[PROOFSTEP]\nrwa [h.succ_eq]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhb : IsSuccLimit b\nha : a < b\nh : ¬IsMax a\n⊢ succ a < b\n[PROOFSTEP]\nrw [lt_iff_le_and_ne, succ_le_iff_of_not_isMax h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhb : IsSuccLimit b\nha : a < b\nh : ¬IsMax a\n⊢ a < b ∧ succ a ≠ b\n[PROOFSTEP]\nrefine' ⟨ha, fun hab => _⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhb : IsSuccLimit b\nha : a < b\nh : ¬IsMax a\nhab : succ a = b\n⊢ False\n[PROOFSTEP]\nsubst hab\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na : α\nC : α → Sort u_2\nh : ¬IsMax a\nhb : IsSuccLimit (succ a)\nha : a < succ a\n⊢ False\n[PROOFSTEP]\nexact (h hb.isMax).elim\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\n⊢ C b\n[PROOFSTEP]\nby_cases hb : IsSuccLimit b\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : IsSuccLimit b\n⊢ C b\n[PROOFSTEP]\nexact hl b hb\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : ¬IsSuccLimit b\n⊢ C b\n[PROOFSTEP]\nhave H := Classical.choose_spec (not_isSuccLimit_iff.1 hb)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : ¬IsSuccLimit b\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = b)) = b\n⊢ C b\n[PROOFSTEP]\nrw [← H.2]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nb : α\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : ¬IsSuccLimit b\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = b)) = b\n⊢ C (succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = b)))\n[PROOFSTEP]\nexact hs _ H.1\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : IsSuccLimit b\n⊢ isSuccLimitRecOn b hs hl = hl b hb\n[PROOFSTEP]\nclassical exact dif_pos hb\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nhb : IsSuccLimit b\n⊢ isSuccLimitRecOn b hs hl = hl b hb\n[PROOFSTEP]\nexact dif_pos hb\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\n⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb\n[PROOFSTEP]\nhave hb' := not_isSuccLimit_succ_of_not_isMax hb\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\n⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb\n[PROOFSTEP]\nhave H := Classical.choose_spec (not_isSuccLimit_iff.1 hb')\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ isSuccLimitRecOn (succ b) hs hl = hs b hb\n[PROOFSTEP]\nrw [isSuccLimitRecOn]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ (if hb : IsSuccLimit (succ b) then hl (succ b) hb\n    else\n      let_fun H :=\n        (_ :\n          ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n            succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b);\n      Eq.mpr (_ : C (succ b) = C (succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))\n        (hs (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))\n          (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))) =\n    hs b hb\n[PROOFSTEP]\nsimp only [cast_eq_iff_heq, hb', not_false_iff, eq_mpr_eq_cast, dif_neg]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ HEq\n    (hs (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))\n      (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))))\n    (hs b hb)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_1\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b) = b\n[PROOFSTEP]\nfirst\n| exact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right\n| exact proof_irrel_heq H.left hb\n[GOAL]\ncase e_1\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b) = b\n[PROOFSTEP]\nexact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right\n[GOAL]\ncase e_2\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ HEq (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))) hb\n[PROOFSTEP]\nfirst\n| exact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right\n| exact proof_irrel_heq H.left hb\n[GOAL]\ncase e_2\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ HEq (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))) hb\n[PROOFSTEP]\nexact (succ_eq_succ_iff_of_not_isMax H.left hb).mp H.right\n[GOAL]\ncase e_2\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\nhs : (a : α) → ¬IsMax a → C (succ a)\nhl : (a : α) → IsSuccLimit a → C a\nb : α\nhb : ¬IsMax b\nhb' : ¬IsSuccLimit (succ b)\nH :\n  ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) ∧\n    succ (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b)) = succ b\n⊢ HEq (_ : ¬IsMax (Classical.choose (_ : ∃ b_1, ¬IsMax b_1 ∧ succ b_1 = succ b))) hb\n[PROOFSTEP]\nexact proof_irrel_heq H.left hb\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b : α\nC : α → Sort u_2\ninst✝ : NoMaxOrder α\n⊢ ¬IsSuccLimit a ↔ a ∈ range succ\n[PROOFSTEP]\nsimp_rw [isSuccLimit_iff_succ_ne, not_forall, not_ne_iff]\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b : α\nC : α → Sort u_2\ninst✝ : NoMaxOrder α\n⊢ (∃ x, succ x = a) ↔ a ∈ range succ\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\ninst✝ : IsSuccArchimedean α\nh : IsSuccLimit a\nb : α\nhb : b ≤ a\n⊢ a ≤ b\n[PROOFSTEP]\nrevert h\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\ninst✝ : IsSuccArchimedean α\nb : α\nhb : b ≤ a\n⊢ IsSuccLimit a → a ≤ b\n[PROOFSTEP]\nrefine' Succ.rec (fun _ => le_rfl) (fun c _ H hc => _) hb\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\ninst✝ : IsSuccArchimedean α\nb : α\nhb : b ≤ a\nc : α\nx✝ : b ≤ c\nH : IsSuccLimit c → c ≤ b\nhc : IsSuccLimit (succ c)\n⊢ succ c ≤ b\n[PROOFSTEP]\nhave := hc.isMax.succ_eq\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\ninst✝ : IsSuccArchimedean α\nb : α\nhb : b ≤ a\nc : α\nx✝ : b ≤ c\nH : IsSuccLimit c → c ≤ b\nhc : IsSuccLimit (succ c)\nthis : succ c = c\n⊢ succ c ≤ b\n[PROOFSTEP]\nrw [this] at hc ⊢\n[GOAL]\nα : Type u_1\ninst✝² : PartialOrder α\ninst✝¹ : SuccOrder α\na b✝ : α\nC : α → Sort u_2\ninst✝ : IsSuccArchimedean α\nb : α\nhb : b ≤ a\nc : α\nx✝ : b ≤ c\nH : IsSuccLimit c → c ≤ b\nhc : IsSuccLimit c\nthis : succ c = c\n⊢ c ≤ b\n[PROOFSTEP]\nexact H hc\n[GOAL]\nα : Type u_1\ninst✝³ : PartialOrder α\ninst✝² : SuccOrder α\na b : α\nC : α → Sort u_2\ninst✝¹ : IsSuccArchimedean α\ninst✝ : NoMinOrder α\n⊢ ¬IsSuccLimit a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : LT α\na✝ a : α\n⊢ ¬IsPredLimit a ↔ ∃ b, a ⋖ b\n[PROOFSTEP]\nsimp [IsPredLimit]\n[GOAL]\nα : Type u_1\ninst✝ : LT α\na : α\n⊢ IsSuccLimit (↑toDual a) ↔ IsPredLimit a\n[PROOFSTEP]\nsimp [IsSuccLimit, IsPredLimit]\n[GOAL]\nα : Type u_1\ninst✝ : LT α\na : α\n⊢ IsPredLimit (↑toDual a) ↔ IsSuccLimit a\n[PROOFSTEP]\nsimp [IsSuccLimit, IsPredLimit]\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : PredOrder α\nh : IsPredLimit (pred a)\n⊢ IsMin a\n[PROOFSTEP]\nby_contra H\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : PredOrder α\nh : IsPredLimit (pred a)\nH : ¬IsMin a\n⊢ False\n[PROOFSTEP]\nexact h a (pred_covby_of_not_isMin H)\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : PredOrder α\nha : ¬IsMin a\n⊢ ¬IsPredLimit (pred a)\n[PROOFSTEP]\ncontrapose! ha\n[GOAL]\nα : Type u_1\ninst✝¹ : Preorder α\na : α\ninst✝ : PredOrder α\nha : IsPredLimit (pred a)\n⊢ IsMin a\n[PROOFSTEP]\nexact ha.isMin\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\na : α\ninst✝¹ : PredOrder α\ninst✝ : NoMinOrder α\nh : IsPredLimit a\nb : α\n⊢ pred b ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : Preorder α\ninst✝¹ : PredOrder α\ninst✝ : NoMinOrder α\nb : α\nh : IsPredLimit (pred b)\n⊢ False\n[PROOFSTEP]\nexact not_isMin _ h.isMin\n[GOAL]\nα : Type u_1\ninst✝⁴ : Preorder α\na : α\ninst✝³ : PredOrder α\ninst✝² : IsPredArchimedean α\ninst✝¹ : NoMinOrder α\ninst✝ : NoMaxOrder α\n⊢ ¬IsPredLimit a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nC : α → Sort u_2\n⊢ ¬IsPredLimit a ↔ ∃ b, ¬IsMin b ∧ pred b = a\n[PROOFSTEP]\nrw [← isSuccLimit_toDual_iff]\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nC : α → Sort u_2\n⊢ ¬IsSuccLimit (↑toDual a) ↔ ∃ b, ¬IsMin b ∧ pred b = a\n[PROOFSTEP]\nexact not_isSuccLimit_iff\n[GOAL]\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b : α\nC : α → Sort u_2\nh : ¬IsPredLimit a\n⊢ a ∈ range pred\n[PROOFSTEP]\ncases' not_isPredLimit_iff.1 h with b hb\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : PartialOrder α\ninst✝ : PredOrder α\na b✝ : α\nC : α → Sort u_2\nh : ¬IsPredLimit a\nb : α\nhb : ¬IsMin b ∧ pred b = a\n⊢ a ∈ range pred\n[PROOFSTEP]\nexact ⟨b, hb.2⟩\n[GOAL]\nα : Type u_1\ninst✝³ : PartialOrder α\ninst✝² : PredOrder α\na b : α\nC : α → Sort u_2\ninst✝¹ : IsPredArchimedean α\ninst✝ : NoMaxOrder α\n⊢ ¬IsPredLimit a\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Order.SuccPred.Limit", "llama_tokens": 8241, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5698526368038304, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.291603056486972}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasLimits C\nJ : Type v\ninst✝ : Category.{v, v} J\nF : J ⥤ SheafedSpace C\nX Y : SheafedSpace C\nf g : X ⟶ Y\n⊢ Epi (coequalizer.π f g).base\n[PROOFSTEP]\nerw [← show _ = (coequalizer.π f g).base from ι_comp_coequalizerComparison f g (SheafedSpace.forget C)]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasLimits C\nJ : Type v\ninst✝ : Category.{v, v} J\nF : J ⥤ SheafedSpace C\nX Y : SheafedSpace C\nf g : X ⟶ Y\n⊢ Epi (coequalizer.π ((forget C).map f) ((forget C).map g) ≫ coequalizerComparison f g (forget C))\n[PROOFSTEP]\nrw [← PreservesCoequalizer.iso_hom]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasLimits C\nJ : Type v\ninst✝ : Category.{v, v} J\nF : J ⥤ SheafedSpace C\nX Y : SheafedSpace C\nf g : X ⟶ Y\n⊢ Epi (coequalizer.π ((forget C).map f) ((forget C).map g) ≫ (PreservesCoequalizer.iso (forget C) f g).hom)\n[PROOFSTEP]\napply epi_comp\n[GOAL]\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\nx : ↑↑(colimit (F ⋙ forgetToSheafedSpace)).toPresheafedSpace\n⊢ LocalRing ↑(TopCat.Presheaf.stalk (colimit (F ⋙ forgetToSheafedSpace)).toPresheafedSpace.presheaf x)\n[PROOFSTEP]\nobtain ⟨i, y, ⟨⟩⟩ := SheafedSpace.colimit_exists_rep (F ⋙ forgetToSheafedSpace) x\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\n⊢ LocalRing\n    ↑(TopCat.Presheaf.stalk (colimit (F ⋙ forgetToSheafedSpace)).toPresheafedSpace.presheaf\n        (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y))\n[PROOFSTEP]\nhaveI : LocalRing (((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace.stalk y) := (F.obj i).localRing _\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\nthis : LocalRing ↑(PresheafedSpace.stalk ((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace y)\n⊢ LocalRing\n    ↑(TopCat.Presheaf.stalk (colimit (F ⋙ forgetToSheafedSpace)).toPresheafedSpace.presheaf\n        (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y))\n[PROOFSTEP]\nexact\n  (asIso\n      (PresheafedSpace.stalkMap\n        (colimit.ι (C := SheafedSpace.{u + 1, u, u} CommRingCatMax.{u, u}) (F ⋙ forgetToSheafedSpace) i : _)\n        y)).symm.commRingCatIsoToRingEquiv.localRing\n[GOAL]\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\nx✝² x✝¹ : Discrete ι\nj j' : ι\nx✝ : { as := j } ⟶ { as := j' }\nf : j = j'\n⊢ F.map { down := { down := f } } ≫\n      (fun j =>\n          { val := colimit.ι (F ⋙ forgetToSheafedSpace) j,\n            prop :=\n              (_ :\n                ∀ (x : ↑↑(F.obj j).toPresheafedSpace),\n                  IsLocalRingHom (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) j) x)) })\n        { as := j' } =\n    (fun j =>\n          { val := colimit.ι (F ⋙ forgetToSheafedSpace) j,\n            prop :=\n              (_ :\n                ∀ (x : ↑↑(F.obj j).toPresheafedSpace),\n                  IsLocalRingHom (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) j) x)) })\n        { as := j } ≫\n      ((Functor.const (Discrete ι)).obj (coproduct F)).map { down := { down := f } }\n[PROOFSTEP]\nsubst f\n[GOAL]\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\nx✝² x✝¹ : Discrete ι\nj : ι\nx✝ : { as := j } ⟶ { as := j }\n⊢ F.map { down := { down := (_ : j = j) } } ≫\n      (fun j =>\n          { val := colimit.ι (F ⋙ forgetToSheafedSpace) j,\n            prop :=\n              (_ :\n                ∀ (x : ↑↑(F.obj j).toPresheafedSpace),\n                  IsLocalRingHom (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) j) x)) })\n        { as := j } =\n    (fun j =>\n          { val := colimit.ι (F ⋙ forgetToSheafedSpace) j,\n            prop :=\n              (_ :\n                ∀ (x : ↑↑(F.obj j).toPresheafedSpace),\n                  IsLocalRingHom (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) j) x)) })\n        { as := j } ≫\n      ((Functor.const (Discrete ι)).obj (coproduct F)).map { down := { down := (_ : j = j) } }\n[PROOFSTEP]\naesop\n[GOAL]\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\n⊢ ∀ (x : ↑↑(coproductCofan F).pt.toPresheafedSpace),\n    IsLocalRingHom\n      (PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s)) x)\n[PROOFSTEP]\nintro x\n[GOAL]\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\nx : ↑↑(coproductCofan F).pt.toPresheafedSpace\n⊢ IsLocalRingHom\n    (PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s)) x)\n[PROOFSTEP]\nobtain ⟨i, y, ⟨⟩⟩ := SheafedSpace.colimit_exists_rep (F ⋙ forgetToSheafedSpace) x\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\n⊢ IsLocalRingHom\n    (PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y))\n[PROOFSTEP]\nhave :=\n  PresheafedSpace.stalkMap.comp\n    (colimit.ι (C := SheafedSpace.{u + 1, u, u} CommRingCatMax.{u, u}) (F ⋙ forgetToSheafedSpace) i)\n    (colimit.desc (C := SheafedSpace.{u + 1, u, u} CommRingCatMax.{u, u}) (F ⋙ forgetToSheafedSpace)\n      (forgetToSheafedSpace.mapCocone s))\n    y\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\nthis :\n  PresheafedSpace.stalkMap\n      (colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n        colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      y =\n    PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n        (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y) ≫\n      PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y\n⊢ IsLocalRingHom\n    (PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y))\n[PROOFSTEP]\nrw [← IsIso.comp_inv_eq] at this \n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\nthis :\n  PresheafedSpace.stalkMap\n        (colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n          colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n        y ≫\n      inv (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y) =\n    PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y)\n⊢ IsLocalRingHom\n    (PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y))\n[PROOFSTEP]\nerw [← this,\n  PresheafedSpace.stalkMap.congr_hom _ _\n    (colimit.ι_desc (C := SheafedSpace.{u + 1, u, u} CommRingCatMax.{u, u}) (forgetToSheafedSpace.mapCocone s) i : _)]\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\nthis :\n  PresheafedSpace.stalkMap\n        (colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n          colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n        y ≫\n      inv (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y) =\n    PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y)\n⊢ IsLocalRingHom\n    ((eqToHom\n          (_ :\n            PresheafedSpace.stalk (forgetToSheafedSpace.mapCocone s).pt.toPresheafedSpace\n                (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n                        colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s)).base\n                  y) =\n              PresheafedSpace.stalk (forgetToSheafedSpace.mapCocone s).pt.toPresheafedSpace\n                (↑(NatTrans.app (forgetToSheafedSpace.mapCocone s).ι i).base y)) ≫\n        PresheafedSpace.stalkMap (NatTrans.app (forgetToSheafedSpace.mapCocone s).ι i) y) ≫\n      inv (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y))\n[PROOFSTEP]\nhaveI : IsLocalRingHom (PresheafedSpace.stalkMap ((forgetToSheafedSpace.mapCocone s).ι.app i) y) := (s.ι.app i).2 y\n[GOAL]\ncase intro.intro.refl\nι : Type u\nF : Discrete ι ⥤ LocallyRingedSpace\ns : Cocone F\ni : Discrete ι\ny : ↑↑((F ⋙ forgetToSheafedSpace).obj i).toPresheafedSpace\nthis✝ :\n  PresheafedSpace.stalkMap\n        (colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n          colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n        y ≫\n      inv (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y) =\n    PresheafedSpace.stalkMap (colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s))\n      (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i).base y)\nthis : IsLocalRingHom (PresheafedSpace.stalkMap (NatTrans.app (forgetToSheafedSpace.mapCocone s).ι i) y)\n⊢ IsLocalRingHom\n    ((eqToHom\n          (_ :\n            PresheafedSpace.stalk (forgetToSheafedSpace.mapCocone s).pt.toPresheafedSpace\n                (↑(colimit.ι (F ⋙ forgetToSheafedSpace) i ≫\n                        colimit.desc (F ⋙ forgetToSheafedSpace) (forgetToSheafedSpace.mapCocone s)).base\n                  y) =\n              PresheafedSpace.stalk (forgetToSheafedSpace.mapCocone s).pt.toPresheafedSpace\n                (↑(NatTrans.app (forgetToSheafedSpace.mapCocone s).ι i).base y)) ≫\n        PresheafedSpace.stalkMap (NatTrans.app (forgetToSheafedSpace.mapCocone s).ι i) y) ≫\n      inv (PresheafedSpace.stalkMap (colimit.ι (F ⋙ forgetToSheafedSpace) i) y))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\n⊢ IsLocalRingHom (NatTrans.app (coequalizer.π f.val g.val).c (op U))\n[PROOFSTEP]\nhave := ι_comp_coequalizerComparison f.1 g.1 SheafedSpace.forgetToPresheafedSpace\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nthis :\n  coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n      coequalizerComparison f.val g.val SheafedSpace.forgetToPresheafedSpace =\n    SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)\n⊢ IsLocalRingHom (NatTrans.app (coequalizer.π f.val g.val).c (op U))\n[PROOFSTEP]\nrw [← PreservesCoequalizer.iso_hom] at this \n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nthis :\n  coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n      (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom =\n    SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)\n⊢ IsLocalRingHom (NatTrans.app (coequalizer.π f.val g.val).c (op U))\n[PROOFSTEP]\nerw [SheafedSpace.congr_app this.symm (op U)]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nthis :\n  coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n      (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom =\n    SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)\n⊢ IsLocalRingHom\n    (NatTrans.app\n        (coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val)\n              (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n            (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).c\n        (op U) ≫\n      Y.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                            (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n                          (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).base).op.obj\n                (op U) =\n              (Opens.map (SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)).base).op.obj (op U))))\n[PROOFSTEP]\nrw [PresheafedSpace.comp_c_app, ← PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit_hom_π]\n  -- Porting note : this instance has to be manually added\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nthis :\n  coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n      (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom =\n    SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)\n⊢ IsLocalRingHom\n    ((NatTrans.app (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c (op U) ≫\n        (PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit\n              (parallelPair (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                (SheafedSpace.forgetToPresheafedSpace.map g.val))\n              ((Opens.map (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.base).obj\n                (op U).unop)).hom ≫\n          limit.π\n            (PresheafedSpace.componentwiseDiagram\n              (parallelPair (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                (SheafedSpace.forgetToPresheafedSpace.map g.val))\n              ((Opens.map (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.base).obj\n                (op U).unop))\n            (op WalkingParallelPair.one)) ≫\n      Y.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                            (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n                          (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).base).op.obj\n                (op U) =\n              (Opens.map (SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)).base).op.obj (op U))))\n[PROOFSTEP]\nhaveI : IsIso (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c :=\n  PresheafedSpace.c_isIso_of_iso _\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nthis✝ :\n  coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val) (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n      (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom =\n    SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)\nthis : IsIso (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c\n⊢ IsLocalRingHom\n    ((NatTrans.app (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.c (op U) ≫\n        (PresheafedSpace.colimitPresheafObjIsoComponentwiseLimit\n              (parallelPair (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                (SheafedSpace.forgetToPresheafedSpace.map g.val))\n              ((Opens.map (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.base).obj\n                (op U).unop)).hom ≫\n          limit.π\n            (PresheafedSpace.componentwiseDiagram\n              (parallelPair (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                (SheafedSpace.forgetToPresheafedSpace.map g.val))\n              ((Opens.map (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom.base).obj\n                (op U).unop))\n            (op WalkingParallelPair.one)) ≫\n      Y.presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (coequalizer.π (SheafedSpace.forgetToPresheafedSpace.map f.val)\n                            (SheafedSpace.forgetToPresheafedSpace.map g.val) ≫\n                          (PreservesCoequalizer.iso SheafedSpace.forgetToPresheafedSpace f.val g.val).hom).base).op.obj\n                (op U) =\n              (Opens.map (SheafedSpace.forgetToPresheafedSpace.map (coequalizer.π f.val g.val)).base).op.obj (op U))))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier) =\n    (imageBasicOpen f g U s).carrier\n[PROOFSTEP]\nfapply\n  Types.coequalizer_preimage_image_eq_of_preimage_eq (f.1.base : X.carrier.1 ⟶ Y.carrier.1)\n    (g.1.base : X.carrier.1 ⟶ Y.carrier.1)\n[GOAL]\ncase e\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑f.val.base ≫ ↑(coequalizer.π f.val g.val).base = ↑g.val.base ≫ ↑(coequalizer.π f.val g.val).base\n[PROOFSTEP]\next\n[GOAL]\ncase e.h\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\na✝ : (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ (↑f.val.base ≫ ↑(coequalizer.π f.val g.val).base) a✝ = (↑g.val.base ≫ ↑(coequalizer.π f.val g.val).base) a✝\n[PROOFSTEP]\nsimp_rw [types_comp_apply, ← TopCat.comp_app, ← PresheafedSpace.comp_base]\n[GOAL]\ncase e.h\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\na✝ : (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ ↑(f.val ≫ coequalizer.π f.val g.val).base a✝ = ↑(g.val ≫ coequalizer.π f.val g.val).base a✝\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase e.h.e_a.e_self\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\na✝ : (forget TopCat).obj ↑X.toPresheafedSpace\n⊢ f.val ≫ coequalizer.π f.val g.val = g.val ≫ coequalizer.π f.val g.val\n[PROOFSTEP]\nexact coequalizer.condition f.1 g.1\n[GOAL]\ncase h\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsColimit\n    (Cofork.ofπ ↑(coequalizer.π f.val g.val).base\n      (_ : ↑f.val.base ≫ ↑(coequalizer.π f.val g.val).base = ↑g.val.base ≫ ↑(coequalizer.π f.val g.val).base))\n[PROOFSTEP]\napply isColimitCoforkMapOfIsColimit (forget TopCat)\n[GOAL]\ncase h.l\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsColimit (Cofork.ofπ (coequalizer.π f.val g.val).base ?h.w)\ncase h.w\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ f.val.base ≫ (coequalizer.π f.val g.val).base = g.val.base ≫ (coequalizer.π f.val g.val).base\n[PROOFSTEP]\napply isColimitCoforkMapOfIsColimit (SheafedSpace.forget _)\n[GOAL]\ncase h.l.l\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsColimit (Cofork.ofπ (coequalizer.π f.val g.val) ?h.l.w)\ncase h.l.w\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ f.val ≫ coequalizer.π f.val g.val = g.val ≫ coequalizer.π f.val g.val\n[PROOFSTEP]\nexact coequalizerIsCoequalizer f.1 g.1\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ ↑f.val.base ⁻¹' (imageBasicOpen f g U s).carrier = ↑g.val.base ⁻¹' (imageBasicOpen f g U s).carrier\n[PROOFSTEP]\nsuffices\n  (TopologicalSpace.Opens.map f.1.base).obj (imageBasicOpen f g U s) =\n    (TopologicalSpace.Opens.map g.1.base).obj (imageBasicOpen f g U s)\n  by injection this\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nthis : (Opens.map f.val.base).obj (imageBasicOpen f g U s) = (Opens.map g.val.base).obj (imageBasicOpen f g U s)\n⊢ ↑f.val.base ⁻¹' (imageBasicOpen f g U s).carrier = ↑g.val.base ⁻¹' (imageBasicOpen f g U s).carrier\n[PROOFSTEP]\ninjection this\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ (Opens.map f.val.base).obj (imageBasicOpen f g U s) = (Opens.map g.val.base).obj (imageBasicOpen f g U s)\n[PROOFSTEP]\ndelta imageBasicOpen\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ (Opens.map f.val.base).obj\n      (RingedSpace.basicOpen (toRingedSpace Y)\n        (let_fun this := ↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s;\n        this)) =\n    (Opens.map g.val.base).obj\n      (RingedSpace.basicOpen (toRingedSpace Y)\n        (let_fun this := ↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s;\n        this))\n[PROOFSTEP]\nrw [preimage_basicOpen f, preimage_basicOpen g]\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ RingedSpace.basicOpen (toRingedSpace X)\n      (↑(NatTrans.app f.val.c\n            (op\n              {\n                  unop :=\n                    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop,\n                      is_open' := (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop)) } }.unop))\n        (let_fun this := ↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s;\n        this)) =\n    RingedSpace.basicOpen (toRingedSpace X)\n      (↑(NatTrans.app g.val.c\n            (op\n              {\n                  unop :=\n                    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop,\n                      is_open' := (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop)) } }.unop))\n        (let_fun this := ↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s;\n        this))\n[PROOFSTEP]\ndsimp only [Functor.op, unop_op]\n  -- Porting note : change `rw` to `erw`\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ RingedSpace.basicOpen (toRingedSpace X)\n      (↑(NatTrans.app f.val.c\n            (op\n              { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' ↑U,\n                is_open' := (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop)) }))\n        (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s)) =\n    RingedSpace.basicOpen (toRingedSpace X)\n      (↑(NatTrans.app g.val.c\n            (op\n              { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' ↑U,\n                is_open' := (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' ↑(op U).unop)) }))\n        (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\n[PROOFSTEP]\nerw [← comp_apply, ← SheafedSpace.comp_c_app', ← comp_apply, ← SheafedSpace.comp_c_app',\n  SheafedSpace.congr_app (coequalizer.condition f.1 g.1), comp_apply, X.toRingedSpace.basicOpen_res]\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ ((Opens.map (f.val ≫ coequalizer.π f.val g.val).base).op.obj (op U)).unop ⊓\n      RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app (g.val ≫ coequalizer.π f.val g.val).c (op U)) s) =\n    RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app (g.val ≫ coequalizer.π f.val g.val).c (op U)) s)\n[PROOFSTEP]\napply inf_eq_right.mpr\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ RingedSpace.basicOpen (toRingedSpace X) (↑(NatTrans.app (g.val ≫ coequalizer.π f.val g.val).c (op U)) s) ≤\n    ((Opens.map (f.val ≫ coequalizer.π f.val g.val).base).op.obj (op U)).unop\n[PROOFSTEP]\nrefine' (RingedSpace.basicOpen_le _ _).trans _\n[GOAL]\ncase H\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ ((Opens.map (g.val ≫ coequalizer.π f.val g.val).base).op.obj (op U)).unop ≤\n    ((Opens.map (f.val ≫ coequalizer.π f.val g.val).base).op.obj (op U)).unop\n[PROOFSTEP]\nrw [coequalizer.condition f.1 g.1]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier)\n[PROOFSTEP]\nrw [← (TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget _) f.1 g.1)).isOpen_preimage,\n  TopCat.coequalizer_isOpen_iff, ← Set.preimage_comp]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen\n    (↑(TopCat.homeoOfIso (PreservesCoequalizer.iso (SheafedSpace.forget CommRingCat) f.val g.val)) ∘\n        ↑(colimit.ι\n            (parallelPair ((SheafedSpace.forget CommRingCat).map f.val) ((SheafedSpace.forget CommRingCat).map g.val))\n            WalkingParallelPair.one) ⁻¹'\n      (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier))\n[PROOFSTEP]\nerw [← coe_comp]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen\n    (↑(colimit.ι\n            (parallelPair ((SheafedSpace.forget CommRingCat).map f.val) ((SheafedSpace.forget CommRingCat).map g.val))\n            WalkingParallelPair.one ≫\n          (PreservesCoequalizer.iso (SheafedSpace.forget CommRingCat) f.val g.val).hom) ⁻¹'\n      (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier))\n[PROOFSTEP]\nrw [PreservesCoequalizer.iso_hom, ι_comp_coequalizerComparison]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen\n    (↑((SheafedSpace.forget CommRingCat).map (coequalizer.π f.val g.val)) ⁻¹'\n      (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier))\n[PROOFSTEP]\ndsimp only [SheafedSpace.forget]\n  -- Porting note : change `rw` to `erw`\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' (imageBasicOpen f g U s).carrier))\n[PROOFSTEP]\nerw [imageBasicOpen_image_preimage]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\n⊢ IsOpen (imageBasicOpen f g U s).carrier\n[PROOFSTEP]\nexact (imageBasicOpen f g U s).2\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nx : ↑(toTopCat Y)\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.π f.val g.val) x)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase map_nonunit\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nx : ↑(toTopCat Y)\n⊢ ∀ (a : ↑(PresheafedSpace.stalk (coequalizer f.val g.val).toPresheafedSpace (↑(coequalizer.π f.val g.val).base x))),\n    IsUnit (↑(PresheafedSpace.stalkMap (coequalizer.π f.val g.val) x) a) → IsUnit a\n[PROOFSTEP]\nrintro a ha\n[GOAL]\ncase map_nonunit\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nx : ↑(toTopCat Y)\na : ↑(PresheafedSpace.stalk (coequalizer f.val g.val).toPresheafedSpace (↑(coequalizer.π f.val g.val).base x))\nha : IsUnit (↑(PresheafedSpace.stalkMap (coequalizer.π f.val g.val) x) a)\n⊢ IsUnit a\n[PROOFSTEP]\nrcases TopCat.Presheaf.germ_exist _ _ a with ⟨U, hU, s, rfl⟩\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(PresheafedSpace.stalkMap (coequalizer.π f.val g.val) x)\n      (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n            { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n        s))\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nerw [PresheafedSpace.stalkMap_germ_apply (coequalizer.π f.1 g.1 : _) U ⟨_, hU⟩] at ha \n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nlet V := imageBasicOpen f g U s\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nhave hV : (coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1) = V.1 :=\n  imageBasicOpen_image_preimage f g U s\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nhave hV' : V = ⟨(coequalizer.π f.1 g.1).base ⁻¹' ((coequalizer.π f.1 g.1).base '' V.1), hV.symm ▸ V.2⟩ :=\n  SetLike.ext' hV.symm\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nhave V_open : IsOpen ((coequalizer.π f.val g.val).base '' V.1) := imageBasicOpen_image_open f g U s\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nhave VleU : (⟨(coequalizer.π f.val g.val).base '' V.1, V_open⟩ : TopologicalSpace.Opens _) ≤ U :=\n  Set.image_subset_iff.mpr (Y.toRingedSpace.basicOpen_le _)\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nhave hxV : x ∈ V := ⟨⟨_, hU⟩, ha, rfl⟩\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\nhxV : x ∈ V\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x, property := hU })\n      s)\n[PROOFSTEP]\nerw [←\n  (coequalizer f.val g.val).presheaf.germ_res_apply (homOfLE VleU)\n    ⟨_, @Set.mem_image_of_mem _ _ (coequalizer.π f.val g.val).base x V.1 hxV⟩ s]\n[GOAL]\ncase map_nonunit.intro.intro.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\nhxV : x ∈ V\n⊢ IsUnit\n    (↑(TopCat.Presheaf.germ (coequalizer f.val g.val).toPresheafedSpace.presheaf\n          { val := ↑(coequalizer.π f.val g.val).base x,\n            property := (_ : ↑(coequalizer.π f.val g.val).base x ∈ ↑(coequalizer.π f.val g.val).base '' V.carrier) })\n      (↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.map (homOfLE VleU).op) s))\n[PROOFSTEP]\napply RingHom.isUnit_map\n[GOAL]\ncase map_nonunit.intro.intro.intro.a\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\nhxV : x ∈ V\n⊢ IsUnit (↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.map (homOfLE VleU).op) s)\n[PROOFSTEP]\nrw [← isUnit_map_iff ((coequalizer.π f.val g.val : _).c.app _), ← comp_apply, NatTrans.naturality, comp_apply,\n  TopCat.Presheaf.pushforwardObj_map, ← isUnit_map_iff (Y.presheaf.map (eqToHom hV').op)]\n  -- Porting note : change `rw` to `erw`\n[GOAL]\ncase map_nonunit.intro.intro.intro.a\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\nhxV : x ∈ V\n⊢ IsUnit\n    (↑(Y.presheaf.map (eqToHom hV').op)\n      (↑(Y.presheaf.map ((Opens.map (coequalizer.π f.val g.val).base).op.map (homOfLE VleU).op))\n        (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s)))\n[PROOFSTEP]\nerw [← comp_apply, ← comp_apply, Category.assoc, ← Y.presheaf.map_comp]\n[GOAL]\ncase map_nonunit.intro.intro.intro.a\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nU✝ : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\ns✝ : ↑((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U✝))\nx : ↑(toTopCat Y)\nU : Opens ↑↑(coequalizer f.val g.val).toPresheafedSpace\nhU : ↑(coequalizer.π f.val g.val).base x ∈ U\ns : (forget CommRingCat).obj ((coequalizer f.val g.val).toPresheafedSpace.presheaf.obj (op U))\nha :\n  IsUnit\n    (↑(TopCat.Presheaf.germ Y.presheaf { val := x, property := hU })\n      (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U)) s))\nV : Opens ↑(toTopCat Y) := imageBasicOpen f g U s\nhV : ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier) = V.carrier\nhV' :\n  V =\n    { carrier := ↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier),\n      is_open' :=\n        (_ : IsOpen (↑(coequalizer.π f.val g.val).base ⁻¹' (↑(coequalizer.π f.val g.val).base '' V.carrier))) }\nV_open : IsOpen (↑(coequalizer.π f.val g.val).base '' V.carrier)\nVleU : { carrier := ↑(coequalizer.π f.val g.val).base '' V.carrier, is_open' := V_open } ≤ U\nhxV : x ∈ V\n⊢ IsUnit\n    (↑(NatTrans.app (coequalizer.π f.val g.val).c (op U) ≫\n          Y.presheaf.map ((Opens.map (coequalizer.π f.val g.val).base).op.map (homOfLE VleU).op ≫ (eqToHom hV').op))\n      s)\n[PROOFSTEP]\nconvert @RingedSpace.isUnit_res_basicOpen Y.toRingedSpace (unop _) (((coequalizer.π f.val g.val).c.app (op U)) s)\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nx : ↑↑(Limits.coequalizer f.val g.val).toPresheafedSpace\n⊢ LocalRing ↑(TopCat.Presheaf.stalk (Limits.coequalizer f.val g.val).toPresheafedSpace.presheaf x)\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := (TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x\n[GOAL]\ncase intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ LocalRing\n    ↑(TopCat.Presheaf.stalk (Limits.coequalizer f.val g.val).toPresheafedSpace.presheaf\n        (↑(coequalizer.π f.val g.val).base y))\n[PROOFSTEP]\nexact (PresheafedSpace.stalkMap (coequalizer.π f.val g.val : _) y).domain_localRing\n[GOAL]\nX✝ Y✝ : LocallyRingedSpace\nf✝ g✝ : X✝ ⟶ Y✝\nX Y : RingedSpace\nf g : X ⟶ Y\nH : f = g\nx : ↑↑X.toPresheafedSpace\nh : IsLocalRingHom (PresheafedSpace.stalkMap f x)\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap g x)\n[PROOFSTEP]\nrw [PresheafedSpace.stalkMap.congr_hom _ _ H.symm x]\n[GOAL]\nX✝ Y✝ : LocallyRingedSpace\nf✝ g✝ : X✝ ⟶ Y✝\nX Y : RingedSpace\nf g : X ⟶ Y\nH : f = g\nx : ↑↑X.toPresheafedSpace\nh : IsLocalRingHom (PresheafedSpace.stalkMap f x)\n⊢ IsLocalRingHom\n    (eqToHom\n        (_ :\n          PresheafedSpace.stalk Y.toPresheafedSpace (↑g.base x) =\n            PresheafedSpace.stalk Y.toPresheafedSpace (↑f.base x)) ≫\n      PresheafedSpace.stalkMap f x)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\n⊢ IsColimit (coequalizerCofork f g)\n[PROOFSTEP]\napply Cofork.IsColimit.mk'\n[GOAL]\ncase create\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\n⊢ (s : Cofork f g) →\n    { l //\n      Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧\n        ∀\n          {m :\n            ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n              ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n          Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nintro s\n[GOAL]\ncase create\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\n⊢ { l //\n    Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nhave e : f.val ≫ s.π.val = g.val ≫ s.π.val := by injection s.condition\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\n⊢ f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n[PROOFSTEP]\ninjection s.condition\n[GOAL]\ncase create\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n⊢ { l //\n    Cofork.π (coequalizerCofork f g) ≫ l = Cofork.π s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n            ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n        Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s → m = l }\n[PROOFSTEP]\nrefine ⟨⟨coequalizer.desc s.π.1 e, ?_⟩, ?_⟩\n[GOAL]\ncase create.refine_1\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n⊢ ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n    IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase create.refine_1\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nx : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)\n[PROOFSTEP]\nrcases(TopCat.epi_iff_surjective (coequalizer.π f.val g.val).base).mp inferInstance x with\n  ⟨y, rfl⟩\n    -- Porting note : was `apply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap ...)`, this\n        -- used to allow you to provide the proof that `... ≫ ...` is a local ring homomorphism later,\n        -- but this is no longer possible\n[GOAL]\ncase create.refine_1.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y))\n[PROOFSTEP]\nset h := _\n[GOAL]\ncase create.refine_1.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ?m.154167 := ?m.154168\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y))\n[PROOFSTEP]\nchange IsLocalRingHom h\n[GOAL]\ncase create.refine_1.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\n⊢ IsLocalRingHom h\n[PROOFSTEP]\nsuffices : IsLocalRingHom ((PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _).comp h)\n[GOAL]\ncase create.refine_1.intro\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\nthis : IsLocalRingHom (RingHom.comp (PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y) h)\n⊢ IsLocalRingHom h\n[PROOFSTEP]\napply isLocalRingHom_of_comp _ (PresheafedSpace.stalkMap (coequalizerCofork f g).π.1 _)\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\n⊢ IsLocalRingHom (RingHom.comp (PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y) h)\n[PROOFSTEP]\nchange IsLocalRingHom (_ ≫ PresheafedSpace.stalkMap (coequalizerCofork f g).π.val y)\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\n⊢ IsLocalRingHom (h ≫ PresheafedSpace.stalkMap (Cofork.π (coequalizerCofork f g)).val y)\n[PROOFSTEP]\nerw [← PresheafedSpace.stalkMap.comp]\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.π f.val g.val ≫ coequalizer.desc (Cofork.π s).val e) y)\n[PROOFSTEP]\napply isLocalRingHom_stalkMap_congr _ _ (coequalizer.π_desc s.π.1 e).symm y\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\ny : (forget TopCat).obj ↑Y.toPresheafedSpace\nh : ↑(PresheafedSpace.stalk s.pt.toPresheafedSpace\n      (↑(coequalizer.desc (Cofork.π s).val e).base (↑(coequalizer.π f.val g.val).base y))) →+*\n  ↑(PresheafedSpace.stalk (coequalizerCofork f g).pt.toPresheafedSpace (↑(coequalizer.π f.val g.val).base y)) :=\n  PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) (↑(coequalizer.π f.val g.val).base y)\n⊢ IsLocalRingHom (PresheafedSpace.stalkMap (Cofork.π s).val y)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase create.refine_2\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n⊢ Cofork.π (coequalizerCofork f g) ≫\n        { val := coequalizer.desc (Cofork.π s).val e,\n          prop :=\n            (_ :\n              ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n                IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) } =\n      Cofork.π s ∧\n    ∀\n      {m :\n        ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n      Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s →\n        m =\n          { val := coequalizer.desc (Cofork.π s).val e,\n            prop :=\n              (_ :\n                ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n                  IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase create.refine_2.left\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n⊢ Cofork.π (coequalizerCofork f g) ≫\n      { val := coequalizer.desc (Cofork.π s).val e,\n        prop :=\n          (_ :\n            ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n              IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) } =\n    Cofork.π s\n[PROOFSTEP]\nexact LocallyRingedSpace.Hom.ext _ _ (coequalizer.π_desc _ _)\n[GOAL]\ncase create.refine_2.right\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n        ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n    Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s →\n      m =\n        { val := coequalizer.desc (Cofork.π s).val e,\n          prop :=\n            (_ :\n              ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n                IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }\n[PROOFSTEP]\nintro m h\n[GOAL]\ncase create.refine_2.right\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s\n⊢ m =\n    { val := coequalizer.desc (Cofork.π s).val e,\n      prop :=\n        (_ :\n          ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n            IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }\n[PROOFSTEP]\nreplace h : (coequalizerCofork f g).π.1 ≫ m.1 = s.π.1 := by rw [← h]; rfl\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s\n⊢ (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : Cofork.π (coequalizerCofork f g) ≫ m = Cofork.π s\n⊢ (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π (coequalizerCofork f g) ≫ m).val\n[PROOFSTEP]\nrfl\n[GOAL]\ncase create.refine_2.right\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ m =\n    { val := coequalizer.desc (Cofork.π s).val e,\n      prop :=\n        (_ :\n          ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n            IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }\n[PROOFSTEP]\napply LocallyRingedSpace.Hom.ext\n[GOAL]\ncase create.refine_2.right.val\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ m.val =\n    { val := coequalizer.desc (Cofork.π s).val e,\n        prop :=\n          (_ :\n            ∀ (x : ↑↑(coequalizerCofork f g).pt.toPresheafedSpace),\n              IsLocalRingHom (PresheafedSpace.stalkMap (coequalizer.desc (Cofork.π s).val e) x)) }.val\n[PROOFSTEP]\napply (colimit.isColimit (parallelPair f.1 g.1)).uniq (Cofork.ofπ s.π.1 e) m.1\n[GOAL]\ncase create.refine_2.right.val\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ ∀ (j : WalkingParallelPair),\n    NatTrans.app (colimit.cocone (parallelPair f.val g.val)).ι j ≫ m.val =\n      NatTrans.app (Cofork.ofπ (Cofork.π s).val e).ι j\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase create.refine_2.right.val.zero\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ NatTrans.app (colimit.cocone (parallelPair f.val g.val)).ι WalkingParallelPair.zero ≫ m.val =\n    NatTrans.app (Cofork.ofπ (Cofork.π s).val e).ι WalkingParallelPair.zero\n[PROOFSTEP]\nrw [← (colimit.cocone (parallelPair f.val g.val)).w WalkingParallelPairHom.left, Category.assoc]\n[GOAL]\ncase create.refine_2.right.val.zero\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ (parallelPair f.val g.val).map WalkingParallelPairHom.left ≫\n      NatTrans.app (colimit.cocone (parallelPair f.val g.val)).ι WalkingParallelPair.one ≫ m.val =\n    NatTrans.app (Cofork.ofπ (Cofork.π s).val e).ι WalkingParallelPair.zero\n[PROOFSTEP]\nchange _ ≫ _ ≫ _ = _ ≫ _\n[GOAL]\ncase create.refine_2.right.val.zero\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ (parallelPair f.val g.val).map WalkingParallelPairHom.left ≫\n      NatTrans.app (colimit.cocone (parallelPair f.val g.val)).ι WalkingParallelPair.one ≫ m.val =\n    f.val ≫ (Cofork.π s).val\n[PROOFSTEP]\ncongr\n[GOAL]\ncase create.refine_2.right.val.one\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\ns : Cofork f g\ne : f.val ≫ (Cofork.π s).val = g.val ≫ (Cofork.π s).val\nm :\n  ((Functor.const WalkingParallelPair).obj (coequalizerCofork f g).pt).obj WalkingParallelPair.one ⟶\n    ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nh : (Cofork.π (coequalizerCofork f g)).val ≫ m.val = (Cofork.π s).val\n⊢ NatTrans.app (colimit.cocone (parallelPair f.val g.val)).ι WalkingParallelPair.one ≫ m.val =\n    NatTrans.app (Cofork.ofπ (Cofork.π s).val e).ι WalkingParallelPair.one\n[PROOFSTEP]\nexact h\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\n⊢ PreservesColimit F forgetToSheafedSpace\n[PROOFSTEP]\nsuffices :\n  PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left) (F.map WalkingParallelPairHom.right))\n    forgetToSheafedSpace\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\nthis :\n  PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left) (F.map WalkingParallelPairHom.right))\n    forgetToSheafedSpace\n⊢ PreservesColimit F forgetToSheafedSpace\n[PROOFSTEP]\napply preservesColimitOfIsoDiagram _ (diagramIsoParallelPair F).symm\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\n⊢ PreservesColimit (parallelPair (F.map WalkingParallelPairHom.left) (F.map WalkingParallelPairHom.right))\n    forgetToSheafedSpace\n[PROOFSTEP]\napply preservesColimitOfPreservesColimitCocone (coequalizerCoforkIsColimit _ _)\n[GOAL]\ncase this\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\n⊢ IsColimit\n    (forgetToSheafedSpace.mapCocone\n      (coequalizerCofork (F.map WalkingParallelPairHom.left) (F.map WalkingParallelPairHom.right)))\n[PROOFSTEP]\napply (isColimitMapCoconeCoforkEquiv _ _).symm _\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\n⊢ IsColimit\n    (Cofork.ofπ\n      (forgetToSheafedSpace.map\n        { val := coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val,\n          prop :=\n            (_ :\n              ∀ (x : ↑(toTopCat (F.obj WalkingParallelPair.one))),\n                IsLocalRingHom\n                  (PresheafedSpace.stalkMap\n                    (coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val)\n                    x)) })\n      (_ :\n        forgetToSheafedSpace.map (F.map WalkingParallelPairHom.left) ≫\n            forgetToSheafedSpace.map\n              { val := coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val,\n                prop :=\n                  (_ :\n                    ∀ (x : ↑(toTopCat (F.obj WalkingParallelPair.one))),\n                      IsLocalRingHom\n                        (PresheafedSpace.stalkMap\n                          (coequalizer.π (F.map WalkingParallelPairHom.left).val\n                            (F.map WalkingParallelPairHom.right).val)\n                          x)) } =\n          forgetToSheafedSpace.map (F.map WalkingParallelPairHom.right) ≫\n            forgetToSheafedSpace.map\n              { val := coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val,\n                prop :=\n                  (_ :\n                    ∀ (x : ↑(toTopCat (F.obj WalkingParallelPair.one))),\n                      IsLocalRingHom\n                        (PresheafedSpace.stalkMap\n                          (coequalizer.π (F.map WalkingParallelPairHom.left).val\n                            (F.map WalkingParallelPairHom.right).val)\n                          x)) }))\n[PROOFSTEP]\ndsimp only [forgetToSheafedSpace]\n[GOAL]\nX Y : LocallyRingedSpace\nf g : X ⟶ Y\nF : WalkingParallelPair ⥤ LocallyRingedSpace\n⊢ IsColimit\n    (Cofork.ofπ (coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val)\n      (_ :\n        (F.map WalkingParallelPairHom.left).val ≫\n            coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val =\n          (F.map WalkingParallelPairHom.right).val ≫\n            coequalizer.π (F.map WalkingParallelPairHom.left).val (F.map WalkingParallelPairHom.right).val))\n[PROOFSTEP]\nexact coequalizerIsCoequalizer _ _\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.LocallyRingedSpace.HasColimits", "llama_tokens": 28174, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6477982179521105, "lm_q2_score": 0.4493926344647597, "lm_q1q2_score": 0.2911157477670755}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA : Mon_ C\nM : Mod_ A\n⊢ (𝟙 A.X ⊗ M.act) ≫ M.act = (α_ A.X A.X M.X).inv ≫ (A.mul ⊗ 𝟙 M.X) ≫ M.act\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA : Mon_ C\nM✝ M : Mod_ A\n⊢ (𝟙 M).hom = 𝟙 M.X\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.one ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act = (λ_ M.X).hom\n[PROOFSTEP]\nslice_lhs 1 2 => rw [← comp_tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (A.one ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (A.one ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (A.one ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.one ≫ f.hom ⊗ 𝟙 M.X) ≫ M.act = (λ_ M.X).hom\n[PROOFSTEP]\nrw [f.one_hom, one_act]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫ (𝟙 A.X ⊗ (f.hom ⊗ 𝟙 M.X) ≫ M.act) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act\n[PROOFSTEP]\nslice_rhs 2 3 => rw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 A.X ⊗ (f.hom ⊗ 𝟙 M.X) ≫ M.act) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 A.X ⊗ (f.hom ⊗ 𝟙 M.X) ≫ M.act) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 A.X ⊗ (f.hom ⊗ 𝟙 M.X) ≫ M.act) ≫ (f.hom ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫ ((f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (𝟙 B.X ⊗ (f.hom ⊗ 𝟙 M.X) ≫ M.act)) ≫ M.act\n[PROOFSTEP]\nrw [id_tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫ ((f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X) ≫ (𝟙 B.X ⊗ M.act)) ≫ M.act\n[PROOFSTEP]\nslice_rhs 4 5 => rw [Mod_.assoc_flip]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ M.act) ≫ M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| 𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X\n[PROOFSTEP]\nrw [Mod_.assoc_flip]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ M.act) ≫ M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| 𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X\n[PROOFSTEP]\nrw [Mod_.assoc_flip]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ M.act) ≫ M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| 𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X\n[PROOFSTEP]\nrw [Mod_.assoc_flip]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫\n      (f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X) ≫ (α_ B.X B.X M.X).inv ≫ (B.mul ⊗ 𝟙 M.X) ≫ M.act\n[PROOFSTEP]\nslice_rhs 3 4 => rw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X) ≫ (α_ B.X B.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X) ≫ (α_ B.X B.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom ⊗ 𝟙 M.X) ≫ (α_ B.X B.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| f.hom ⊗ 𝟙 (A.X ⊗ M.X)\n[PROOFSTEP]\nrw [associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫\n      (f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (((α_ B.X A.X M.X).inv ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)) ≫ (B.mul ⊗ 𝟙 M.X)) ≫ M.act\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (α_ B.X A.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (α_ B.X A.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (f.hom ⊗ 𝟙 (A.X ⊗ M.X)) ≫ (α_ B.X A.X M.X).inv\ncase a.a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom\n[PROOFSTEP]\nrw [← tensor_id, associator_inv_naturality]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    (α_ A.X A.X M.X).hom ≫\n      ((((α_ A.X A.X M.X).inv ≫ ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X)) ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)) ≫ (B.mul ⊗ 𝟙 M.X)) ≫ M.act\n[PROOFSTEP]\nslice_rhs 1 3 => rw [Iso.hom_inv_id_assoc]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom ≫ (α_ A.X A.X M.X).inv ≫ ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [Iso.hom_inv_id_assoc]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom ≫ (α_ A.X A.X M.X).inv ≫ ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [Iso.hom_inv_id_assoc]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (α_ A.X A.X M.X).hom ≫ (α_ A.X A.X M.X).inv ≫ ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X)\ncase a.a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| (𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act =\n    ((((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X) ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)) ≫ (B.mul ⊗ 𝟙 M.X)) ≫ M.act\n[PROOFSTEP]\nslice_rhs 1 2 => rw [← comp_tensor_id, tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X) ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X) ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, tensor_id_comp_id_tensor]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ 𝟙 A.X) ⊗ 𝟙 M.X) ≫ ((𝟙 B.X ⊗ f.hom) ⊗ 𝟙 M.X)\ncase a.a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| B.mul ⊗ 𝟙 M.X\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act = (((f.hom ⊗ f.hom) ⊗ 𝟙 M.X) ≫ (B.mul ⊗ 𝟙 M.X)) ≫ M.act\n[PROOFSTEP]\nslice_rhs 1 2 => rw [← comp_tensor_id, ← f.mul_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ f.hom) ⊗ 𝟙 M.X) ≫ (B.mul ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, ← f.mul_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ f.hom) ⊗ 𝟙 M.X) ≫ (B.mul ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, ← f.mul_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| ((f.hom ⊗ f.hom) ⊗ 𝟙 M.X) ≫ (B.mul ⊗ 𝟙 M.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n| M.act\n[PROOFSTEP]\nrw [← comp_tensor_id, ← f.mul_hom]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM✝ : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nM : Mod_ B\n⊢ (A.mul ⊗ 𝟙 M.X) ≫ (f.hom ⊗ 𝟙 M.X) ≫ M.act = (A.mul ≫ f.hom ⊗ 𝟙 M.X) ≫ M.act\n[PROOFSTEP]\nrw [comp_tensor_id, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n⊢ ((fun M => mk M.X ((f.hom ⊗ 𝟙 M.X) ≫ M.act)) X✝).act ≫ g.hom =\n    (𝟙 A.X ⊗ g.hom) ≫ ((fun M => mk M.X ((f.hom ⊗ 𝟙 M.X) ≫ M.act)) Y✝).act\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n⊢ ((f.hom ⊗ 𝟙 X✝.X) ≫ X✝.act) ≫ g.hom = (𝟙 A.X ⊗ g.hom) ≫ (f.hom ⊗ 𝟙 Y✝.X) ≫ Y✝.act\n[PROOFSTEP]\nslice_rhs 1 2 => rw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 A.X ⊗ g.hom) ≫ (f.hom ⊗ 𝟙 Y✝.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| Y✝.act\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 A.X ⊗ g.hom) ≫ (f.hom ⊗ 𝟙 Y✝.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| Y✝.act\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 A.X ⊗ g.hom) ≫ (f.hom ⊗ 𝟙 Y✝.X)\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| Y✝.act\n[PROOFSTEP]\nrw [id_tensor_comp_tensor_id, ← tensor_id_comp_id_tensor]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n⊢ ((f.hom ⊗ 𝟙 X✝.X) ≫ X✝.act) ≫ g.hom = ((f.hom ⊗ 𝟙 X✝.X) ≫ (𝟙 B.X ⊗ g.hom)) ≫ Y✝.act\n[PROOFSTEP]\nslice_rhs 2 3 => rw [← g.act_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 B.X ⊗ g.hom) ≫ Y✝.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| f.hom ⊗ 𝟙 X✝.X\n[PROOFSTEP]\nrw [← g.act_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 B.X ⊗ g.hom) ≫ Y✝.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| f.hom ⊗ 𝟙 X✝.X\n[PROOFSTEP]\nrw [← g.act_hom]\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| (𝟙 B.X ⊗ g.hom) ≫ Y✝.act\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n| f.hom ⊗ 𝟙 X✝.X\n[PROOFSTEP]\nrw [← g.act_hom]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : MonoidalCategory C\nA✝ : Mon_ C\nM : Mod_ A✝\nA B : Mon_ C\nf : A ⟶ B\nX✝ Y✝ : Mod_ B\ng : X✝ ⟶ Y✝\n⊢ ((f.hom ⊗ 𝟙 X✝.X) ≫ X✝.act) ≫ g.hom = (f.hom ⊗ 𝟙 X✝.X) ≫ X✝.act ≫ g.hom\n[PROOFSTEP]\nrw [Category.assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Mod_", "llama_tokens": 14196, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.626124191181315, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.29108612035508524}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\ns : ℕ → Set (NullMeasurableSpace α)\nhs : ∀ (i : ℕ), (fun s => ∃ t, MeasurableSet t ∧ s =ᵐ[μ] t) (s i)\n⊢ (fun s => ∃ t, MeasurableSet t ∧ s =ᵐ[μ] t) (⋃ (i : ℕ), s i)\n[PROOFSTEP]\nchoose t htm hts using hs\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t✝ : Set α\ns : ℕ → Set (NullMeasurableSpace α)\nt : ℕ → Set α\nhtm : ∀ (i : ℕ), MeasurableSet (t i)\nhts : ∀ (i : ℕ), s i =ᵐ[μ] t i\n⊢ ∃ t, MeasurableSet t ∧ ⋃ (i : ℕ), s i =ᵐ[μ] t\n[PROOFSTEP]\nexact ⟨⋃ i, t i, MeasurableSet.iUnion htm, EventuallyEq.countable_iUnion hts⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\ns : Set (Set α)\nhs : Set.Countable s\nh : ∀ (t : Set α), t ∈ s → NullMeasurableSet t\n⊢ NullMeasurableSet (⋃₀ s)\n[PROOFSTEP]\nrw [sUnion_eq_biUnion]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\ns : Set (Set α)\nhs : Set.Countable s\nh : ∀ (t : Set α), t ∈ s → NullMeasurableSet t\n⊢ NullMeasurableSet (⋃ (i : Set α) (_ : i ∈ s), i)\n[PROOFSTEP]\nexact MeasurableSet.biUnion hs h\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nh : NullMeasurableSet s\n⊢ ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n[PROOFSTEP]\nrcases h with ⟨t, htm, hst⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ t : Set α\nhtm : MeasurableSet t\nhst : s =ᵐ[μ] t\n⊢ ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n[PROOFSTEP]\nrefine' ⟨t ∪ toMeasurable μ (s \\ t), _, htm.union (measurableSet_toMeasurable _ _), _⟩\n[GOAL]\ncase intro.intro.refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ t : Set α\nhtm : MeasurableSet t\nhst : s =ᵐ[μ] t\n⊢ t ∪ toMeasurable μ (s \\ t) ⊇ s\n[PROOFSTEP]\nexact diff_subset_iff.1 (subset_toMeasurable _ _)\n[GOAL]\ncase intro.intro.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ t : Set α\nhtm : MeasurableSet t\nhst : s =ᵐ[μ] t\n⊢ t ∪ toMeasurable μ (s \\ t) =ᵐ[μ] s\n[PROOFSTEP]\nhave : toMeasurable μ (s \\ t) =ᵐ[μ] (∅ : Set α) := by simp [ae_le_set.1 hst.le]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ t : Set α\nhtm : MeasurableSet t\nhst : s =ᵐ[μ] t\n⊢ toMeasurable μ (s \\ t) =ᵐ[μ] ∅\n[PROOFSTEP]\nsimp [ae_le_set.1 hst.le]\n[GOAL]\ncase intro.intro.refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ t : Set α\nhtm : MeasurableSet t\nhst : s =ᵐ[μ] t\nthis : toMeasurable μ (s \\ t) =ᵐ[μ] ∅\n⊢ t ∪ toMeasurable μ (s \\ t) =ᵐ[μ] s\n[PROOFSTEP]\nsimpa only [union_empty] using hst.symm.union this\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nh : NullMeasurableSet s\n⊢ toMeasurable μ s =ᵐ[μ] s\n[PROOFSTEP]\nrw [toMeasurable_def, dif_pos]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nh : NullMeasurableSet s\n⊢ Exists.choose ?hc =ᵐ[μ] s\ncase hc\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nh : NullMeasurableSet s\n⊢ ∃ t x, MeasurableSet t ∧ t =ᵐ[μ] s\n[PROOFSTEP]\nexact (exists_measurable_superset_ae_eq h).choose_spec.snd.2\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\ninst✝ : Countable ι\ns : ι → Set α\nh : ∀ (i : ι), NullMeasurableSet (s i)\nhd : Pairwise (AEDisjoint μ on s)\n⊢ ∃ t, (∀ (i : ι), t i ⊆ s i) ∧ (∀ (i : ι), s i =ᵐ[μ] t i) ∧ (∀ (i : ι), MeasurableSet (t i)) ∧ Pairwise (Disjoint on t)\n[PROOFSTEP]\nchoose t ht_sub htm ht_eq using fun i => exists_measurable_subset_ae_eq (h i)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t✝ : Set α\ninst✝ : Countable ι\ns : ι → Set α\nh : ∀ (i : ι), NullMeasurableSet (s i)\nhd : Pairwise (AEDisjoint μ on s)\nt : ι → Set α\nht_sub : ∀ (i : ι), t i ⊆ s i\nhtm : ∀ (i : ι), MeasurableSet (t i)\nht_eq : ∀ (i : ι), t i =ᵐ[μ] s i\n⊢ ∃ t, (∀ (i : ι), t i ⊆ s i) ∧ (∀ (i : ι), s i =ᵐ[μ] t i) ∧ (∀ (i : ι), MeasurableSet (t i)) ∧ Pairwise (Disjoint on t)\n[PROOFSTEP]\nrcases exists_null_pairwise_disjoint_diff hd with ⟨u, hum, hu₀, hud⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t✝ : Set α\ninst✝ : Countable ι\ns : ι → Set α\nh : ∀ (i : ι), NullMeasurableSet (s i)\nhd : Pairwise (AEDisjoint μ on s)\nt : ι → Set α\nht_sub : ∀ (i : ι), t i ⊆ s i\nhtm : ∀ (i : ι), MeasurableSet (t i)\nht_eq : ∀ (i : ι), t i =ᵐ[μ] s i\nu : ι → Set α\nhum : ∀ (i : ι), MeasurableSet (u i)\nhu₀ : ∀ (i : ι), ↑↑μ (u i) = 0\nhud : Pairwise (Disjoint on fun i => s i \\ u i)\n⊢ ∃ t, (∀ (i : ι), t i ⊆ s i) ∧ (∀ (i : ι), s i =ᵐ[μ] t i) ∧ (∀ (i : ι), MeasurableSet (t i)) ∧ Pairwise (Disjoint on t)\n[PROOFSTEP]\nexact\n  ⟨fun i => t i \\ u i, fun i => (diff_subset _ _).trans (ht_sub _), fun i =>\n    (ht_eq _).symm.trans (diff_null_ae_eq_self (hu₀ i)).symm, fun i => (htm i).diff (hum i),\n    hud.mono fun i j h => h.mono (diff_subset_diff_left (ht_sub i)) (diff_subset_diff_left (ht_sub j))⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0✝ : MeasurableSpace α\nμ✝ : Measure α\ns t : Set α\nm0 : MeasurableSpace α\nμ : Measure α\ninst✝ : Countable ι\nf : ι → Set α\nhn : Pairwise (Disjoint on f)\nh : ∀ (i : ι), MeasurableSet (f i)\n⊢ ↑↑μ (⋃ (i : ι), f i) = ∑' (i : ι), ↑↑μ (f i)\n[PROOFSTEP]\nrw [measure_eq_extend (MeasurableSet.iUnion h), extend_iUnion MeasurableSet.empty _ MeasurableSet.iUnion _ hn h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0✝ : MeasurableSpace α\nμ✝ : Measure α\ns t : Set α\nm0 : MeasurableSpace α\nμ : Measure α\ninst✝ : Countable ι\nf : ι → Set α\nhn : Pairwise (Disjoint on f)\nh : ∀ (i : ι), MeasurableSet (f i)\n⊢ ∑' (i : ι), extend (fun t _ht => ↑↑μ t) (f i) = ∑' (i : ι), ↑↑μ (f i)\n[PROOFSTEP]\nsimp [measure_eq_extend, h]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0✝ : MeasurableSpace α\nμ✝ : Measure α\ns t : Set α\nm0 : MeasurableSpace α\nμ : Measure α\ninst✝ : Countable ι\nf : ι → Set α\nhn : Pairwise (Disjoint on f)\nh : ∀ (i : ι), MeasurableSet (f i)\n⊢ ↑↑μ ∅ = 0\n[PROOFSTEP]\nexact μ.empty\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0✝ : MeasurableSpace α\nμ✝ : Measure α\ns t : Set α\nm0 : MeasurableSpace α\nμ : Measure α\ninst✝ : Countable ι\nf : ι → Set α\nhn : Pairwise (Disjoint on f)\nh : ∀ (i : ι), MeasurableSet (f i)\n⊢ ∀ ⦃f : ℕ → Set α⦄,\n    (∀ (i : ℕ), MeasurableSet (f i)) → Pairwise (Disjoint on f) → ↑↑μ (⋃ (i : ℕ), f i) = ∑' (i : ℕ), ↑↑μ (f i)\n[PROOFSTEP]\nexact μ.m_iUnion\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\ninst✝ : Countable ι\nf : ι → Set α\nhd : Pairwise (AEDisjoint μ on f)\nh : ∀ (i : ι), NullMeasurableSet (f i)\n⊢ ↑↑μ (⋃ (i : ι), f i) = ∑' (i : ι), ↑↑μ (f i)\n[PROOFSTEP]\nrcases exists_subordinate_pairwise_disjoint h hd with ⟨t, _ht_sub, ht_eq, htm, htd⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\ninst✝ : Countable ι\nf : ι → Set α\nhd : Pairwise (AEDisjoint μ on f)\nh : ∀ (i : ι), NullMeasurableSet (f i)\nt : ι → Set α\n_ht_sub : ∀ (i : ι), t i ⊆ f i\nht_eq : ∀ (i : ι), f i =ᵐ[μ] t i\nhtm : ∀ (i : ι), MeasurableSet (t i)\nhtd : Pairwise (Disjoint on t)\n⊢ ↑↑μ (⋃ (i : ι), f i) = ∑' (i : ι), ↑↑μ (f i)\n[PROOFSTEP]\ncalc\n  μ (⋃ i, f i) = μ (⋃ i, t i) := measure_congr (EventuallyEq.countable_iUnion ht_eq)\n  _ = ∑' i, μ (t i) := (measure_iUnion htd htm)\n  _ = ∑' i, μ (f i) := tsum_congr fun i => measure_congr (ht_eq _).symm\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhs : NullMeasurableSet s\nht : NullMeasurableSet t\nhd : AEDisjoint μ s t\n⊢ ↑↑μ (s ∪ t) = ↑↑μ s + ↑↑μ t\n[PROOFSTEP]\nrw [union_eq_iUnion, measure_iUnion₀, tsum_fintype, Fintype.sum_bool, cond, cond]\n[GOAL]\ncase hd\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhs : NullMeasurableSet s\nht : NullMeasurableSet t\nhd : AEDisjoint μ s t\n⊢ Pairwise (AEDisjoint μ on fun b => bif b then s else t)\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhs : NullMeasurableSet s\nht : NullMeasurableSet t\nhd : AEDisjoint μ s t\n⊢ ∀ (i : Bool), NullMeasurableSet (bif i then s else t)\n[PROOFSTEP]\nexacts [(pairwise_on_bool AEDisjoint.symmetric).2 hd, fun b => Bool.casesOn b ht hs]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\n⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \\ t) = ↑↑μ s\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\n⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \\ t) ≤ ↑↑μ s\n[PROOFSTEP]\nrcases exists_measurable_superset μ s with ⟨s', hsub, hs'm, hs'⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\ns' : Set α\nhsub : s ⊆ s'\nhs'm : MeasurableSet s'\nhs' : ↑↑μ s' = ↑↑μ s\n⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \\ t) ≤ ↑↑μ s\n[PROOFSTEP]\nreplace hs'm : NullMeasurableSet s' μ := hs'm.nullMeasurableSet\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\ns' : Set α\nhsub : s ⊆ s'\nhs' : ↑↑μ s' = ↑↑μ s\nhs'm : NullMeasurableSet s'\n⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \\ t) ≤ ↑↑μ s\n[PROOFSTEP]\ncalc\n  μ (s ∩ t) + μ (s \\ t) ≤ μ (s' ∩ t) + μ (s' \\ t) :=\n    add_le_add (measure_mono <| inter_subset_inter_left _ hsub) (measure_mono <| diff_subset_diff_left hsub)\n  _ = μ (s' ∩ t ∪ s' \\ t) :=\n    (measure_union₀_aux (hs'm.inter ht) (hs'm.diff ht) <| (@disjoint_inf_sdiff _ s' t _).aedisjoint).symm\n  _ = μ s' := (congr_arg μ (inter_union_diff _ _))\n  _ = μ s := hs'\n[GOAL]\ncase refine'_2\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\n⊢ ↑↑μ s ≤ ↑↑μ (s ∩ t) + ↑↑μ (s \\ t)\n[PROOFSTEP]\ncalc\n  μ s = μ (s ∩ t ∪ s \\ t) := by rw [inter_union_diff]\n  _ ≤ μ (s ∩ t) + μ (s \\ t) := measure_union_le _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\n⊢ ↑↑μ s = ↑↑μ (s ∩ t ∪ s \\ t)\n[PROOFSTEP]\nrw [inter_union_diff]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nht : NullMeasurableSet t\n⊢ ↑↑μ (s ∪ t) + ↑↑μ (s ∩ t) = ↑↑μ s + ↑↑μ t\n[PROOFSTEP]\nrw [← measure_inter_add_diff₀ (s ∪ t) ht, union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff₀ s ht,\n  add_comm, ← add_assoc, add_right_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t✝ : Set α\nhs : NullMeasurableSet s\nt : Set α\n⊢ ↑↑μ (s ∪ t) + ↑↑μ (s ∩ t) = ↑↑μ s + ↑↑μ t\n[PROOFSTEP]\nrw [union_comm, inter_comm, measure_union_add_inter₀ t hs, add_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nht : NullMeasurableSet t\nhd : AEDisjoint μ s t\n⊢ ↑↑μ (s ∪ t) = ↑↑μ s + ↑↑μ t\n[PROOFSTEP]\nrw [← measure_union_add_inter₀ s ht, hd, add_zero]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns t : Set α\nhs : NullMeasurableSet s\nhd : AEDisjoint μ s t\n⊢ ↑↑μ (s ∪ t) = ↑↑μ s + ↑↑μ t\n[PROOFSTEP]\nrw [union_comm, measure_union₀ hs (AEDisjoint.symm hd), add_comm]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t s : Set α\nhs : NullMeasurableSet s\n⊢ ↑↑μ s + ↑↑μ sᶜ = ↑↑μ univ\n[PROOFSTEP]\nrw [← measure_union₀' hs aedisjoint_compl_right, union_compl_self]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ : Measure α\ns✝ t : Set α\ninst✝ : MeasurableSingletonClass (NullMeasurableSpace α)\ns : Finset α\n⊢ NullMeasurableSet ↑s\n[PROOFSTEP]\napply Finset.measurableSet\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\ninst✝² : MeasurableSpace α\ninst✝¹ : MeasurableSpace β\ninst✝ : MeasurableSpace γ\nf : α → β\nμ : Measure α\ng : α → β\nhf : NullMeasurable f\nhg : f =ᵐ[μ] g\ns : Set β\nhs : MeasurableSet s\nx : α\nhx : f x = g x\n⊢ x ∈ f ⁻¹' s ↔ x ∈ g ⁻¹' s\n[PROOFSTEP]\nrw [mem_preimage, mem_preimage, hx]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\n⊢ OuterMeasure.trim ↑μ = ↑μ\n[PROOFSTEP]\nrefine' le_antisymm (fun s => _) (@OuterMeasure.le_trim (NullMeasurableSpace α μ) _ _)\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\n⊢ ↑(OuterMeasure.trim ↑μ) s ≤ ↑↑μ s\n[PROOFSTEP]\nrw [@OuterMeasure.trim_eq_iInf (NullMeasurableSpace α μ) _]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\n⊢ ⨅ (t : Set (NullMeasurableSpace α)) (_ : s ⊆ t) (_ : MeasurableSet t), ↑↑μ t ≤ ↑↑μ s\n[PROOFSTEP]\nhave : ∀ s, μ.toOuterMeasure s = μ s := by simp only [forall_const]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\n⊢ ∀ (s : Set α), ↑↑μ s = ↑↑μ s\n[PROOFSTEP]\nsimp only [forall_const]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\nthis : ∀ (s : Set α), ↑↑μ s = ↑↑μ s\n⊢ ⨅ (t : Set (NullMeasurableSpace α)) (_ : s ⊆ t) (_ : MeasurableSet t), ↑↑μ t ≤ ↑↑μ s\n[PROOFSTEP]\nrw [this, measure_eq_iInf]\n[GOAL]\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\nthis : ∀ (s : Set α), ↑↑μ s = ↑↑μ s\n⊢ ⨅ (t : Set (NullMeasurableSpace α)) (_ : s ⊆ t) (_ : MeasurableSet t), ↑↑μ t ≤\n    ⨅ (t : Set α) (_ : s ⊆ t) (_ : MeasurableSet t), ↑↑μ t\n[PROOFSTEP]\napply iInf₂_mono\n[GOAL]\ncase h\nι : Type u_1\nα : Type u_2\nβ : Type u_3\nγ : Type u_4\nm0 : MeasurableSpace α\nμ✝ : Measure α\ns✝ t : Set α\nx✝ : MeasurableSpace α\nμ : Measure α\ns : Set (NullMeasurableSpace α)\nthis : ∀ (s : Set α), ↑↑μ s = ↑↑μ s\n⊢ ∀ (i : Set (NullMeasurableSpace α)), s ⊆ i → ⨅ (_ : MeasurableSet i), ↑↑μ i ≤ ⨅ (_ : MeasurableSet i), ↑↑μ i\n[PROOFSTEP]\nexact fun t _ht => iInf_mono' fun h => ⟨MeasurableSet.nullMeasurableSet h, le_rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.NullMeasurable", "llama_tokens": 7692, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6261241632752915, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.2910861073815311}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : BoundedOrder α\ninst✝¹ : IsSimpleOrder α\ninst✝ : DecidableEq α\n⊢ Finset.univ = {⊤, ⊥}\n[PROOFSTEP]\nchange Finset.map _ (Finset.univ : Finset Bool) = _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : BoundedOrder α\ninst✝¹ : IsSimpleOrder α\ninst✝ : DecidableEq α\n⊢ Finset.map { toFun := ↑IsSimpleOrder.equivBool.symm, inj' := (_ : Function.Injective ↑IsSimpleOrder.equivBool.symm) }\n      Finset.univ =\n    {⊤, ⊥}\n[PROOFSTEP]\nrw [Fintype.univ_bool]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : BoundedOrder α\ninst✝¹ : IsSimpleOrder α\ninst✝ : DecidableEq α\n⊢ Finset.map { toFun := ↑IsSimpleOrder.equivBool.symm, inj' := (_ : Function.Injective ↑IsSimpleOrder.equivBool.symm) }\n      {true, false} =\n    {⊤, ⊥}\n[PROOFSTEP]\nsimp only [Finset.map_insert, Function.Embedding.coeFn_mk, Finset.map_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝³ : PartialOrder α\ninst✝² : BoundedOrder α\ninst✝¹ : IsSimpleOrder α\ninst✝ : DecidableEq α\n⊢ {↑IsSimpleOrder.equivBool.symm true, ↑IsSimpleOrder.equivBool.symm false} = {⊤, ⊥}\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na : Bool\n⊢ a = ⊥ ∨ a = ⊤\n[PROOFSTEP]\nrw [← Finset.mem_singleton, Or.comm, ← Finset.mem_insert, top_eq_true, bot_eq_false, ← Fintype.univ_bool]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na : Bool\n⊢ a ∈ Finset.univ\n[PROOFSTEP]\napply Finset.mem_univ\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\n⊢ IsCoatomic α\n[PROOFSTEP]\nrefine' IsCoatomic.mk fun b => or_iff_not_imp_left.2 fun ht => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\nb : α\nht : ¬b = ⊤\n⊢ ∃ a, IsCoatom a ∧ b ≤ a\n[PROOFSTEP]\nobtain ⟨c, hc, hmax⟩ := Set.Finite.exists_maximal_wrt id {x : α | b ≤ x ∧ x ≠ ⊤} (Set.toFinite _) ⟨b, le_rfl, ht⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\nb : α\nht : ¬b = ⊤\nc : α\nhc : c ∈ {x | b ≤ x ∧ x ≠ ⊤}\nhmax : ∀ (a' : α), a' ∈ {x | b ≤ x ∧ x ≠ ⊤} → id c ≤ id a' → id c = id a'\n⊢ ∃ a, IsCoatom a ∧ b ≤ a\n[PROOFSTEP]\nrefine' ⟨c, ⟨hc.2, fun y hcy => _⟩, hc.1⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\nb : α\nht : ¬b = ⊤\nc : α\nhc : c ∈ {x | b ≤ x ∧ x ≠ ⊤}\nhmax : ∀ (a' : α), a' ∈ {x | b ≤ x ∧ x ≠ ⊤} → id c ≤ id a' → id c = id a'\ny : α\nhcy : c < y\n⊢ y = ⊤\n[PROOFSTEP]\nby_contra hyt\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\nb : α\nht : ¬b = ⊤\nc : α\nhc : c ∈ {x | b ≤ x ∧ x ≠ ⊤}\nhmax : ∀ (a' : α), a' ∈ {x | b ≤ x ∧ x ≠ ⊤} → id c ≤ id a' → id c = id a'\ny : α\nhcy : c < y\nhyt : ¬y = ⊤\n⊢ False\n[PROOFSTEP]\nobtain rfl : c = y := hmax y ⟨hc.1.trans hcy.le, hyt⟩ hcy.le\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝² : PartialOrder α\ninst✝¹ : OrderTop α\ninst✝ : Finite α\nb : α\nht : ¬b = ⊤\nc : α\nhc : c ∈ {x | b ≤ x ∧ x ≠ ⊤}\nhmax : ∀ (a' : α), a' ∈ {x | b ≤ x ∧ x ≠ ⊤} → id c ≤ id a' → id c = id a'\nhcy : c < c\nhyt : ¬c = ⊤\n⊢ False\n[PROOFSTEP]\nexact (lt_self_iff_false _).mp hcy\n", "meta": {"mathlib_filename": "Mathlib.Order.Atoms.Finite", "llama_tokens": 1636, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5774953651858117, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.2910034779690752}}
{"text": "[GOAL]\nJ : Type w\nX✝ Y✝ Z✝ : WidePullbackShape J\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ X✝ ⟶ Z✝\n[PROOFSTEP]\ncases f\n[GOAL]\ncase id\nJ : Type w\nX✝ Z✝ : WidePullbackShape J\ng : X✝ ⟶ Z✝\n⊢ X✝ ⟶ Z✝\ncase term J : Type w Z✝ : WidePullbackShape J j✝ : J g : none ⟶ Z✝ ⊢ some j✝ ⟶ Z✝\n[PROOFSTEP]\nexact g\n[GOAL]\ncase term\nJ : Type w\nZ✝ : WidePullbackShape J\nj✝ : J\ng : none ⟶ Z✝\n⊢ some j✝ ⟶ Z✝\n[PROOFSTEP]\ncases g\n[GOAL]\ncase term.id\nJ : Type w\nj✝ : J\n⊢ some j✝ ⟶ none\n[PROOFSTEP]\napply Hom.term _\n[GOAL]\nJ : Type w\nx✝¹ x✝ : WidePullbackShape J\n⊢ Subsingleton (x✝¹ ⟶ x✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nJ : Type w\nx✝¹ x✝ : WidePullbackShape J\n⊢ ∀ (a b : x✝¹ ⟶ x✝), a = b\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase allEq\nJ : Type w\nx✝¹ x✝ : WidePullbackShape J\na b : x✝¹ ⟶ x✝\n⊢ a = b\n[PROOFSTEP]\ncasesm*WidePullbackShape _, (_ : WidePullbackShape _) ⟶ (_ : WidePullbackShape _)\n[GOAL]\ncase allEq.none.none.id.id\nJ : Type w\n⊢ Hom.id none = Hom.id none\ncase allEq.some.none.term.term\nJ : Type w\nval✝ : J\n⊢ Hom.term val✝ = Hom.term val✝\ncase allEq.some.some.id.id J : Type w val✝ : J ⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase allEq.some.none.term.term\nJ : Type w\nval✝ : J\n⊢ Hom.term val✝ = Hom.term val✝\ncase allEq.some.some.id.id J : Type w val✝ : J ⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase allEq.some.some.id.id\nJ : Type w\nval✝ : J\n⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → objs j ⟶ B\nX✝ Y✝ : WidePullbackShape J\nf : X✝ ⟶ Y✝\n⊢ (fun j => Option.casesOn j B objs) X✝ ⟶ (fun j => Option.casesOn j B objs) Y✝\n[PROOFSTEP]\ncases' f with _ j\n[GOAL]\ncase id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → objs j ⟶ B\nX✝ : WidePullbackShape J\n⊢ (fun j => Option.casesOn j B objs) X✝ ⟶ (fun j => Option.casesOn j B objs) X✝\n[PROOFSTEP]\napply 𝟙 _\n[GOAL]\ncase term\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → objs j ⟶ B\nj : J\n⊢ (fun j => Option.casesOn j B objs) (some j) ⟶ (fun j => Option.casesOn j B objs) none\n[PROOFSTEP]\nexact arrows j\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nj : WidePullbackShape J\n⊢ F.obj j = (wideCospan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.term j)).obj j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nj j' : WidePullbackShape J\nf : j ⟶ j'\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        j ≫\n      F.map f\n[PROOFSTEP]\ncases j\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nj' : WidePullbackShape J\nf : none ⟶ j'\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        none ≫\n      F.map f\n[PROOFSTEP]\ncases j'\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nj' : WidePullbackShape J\nval✝ : J\nf : some val✝ ⟶ j'\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        (some val✝) ≫\n      F.map f\n[PROOFSTEP]\ncases j'\n[GOAL]\ncase none.none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nf : none ⟶ none\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        none ≫\n      F.map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nval✝ : J\nf : none ⟶ some val✝\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        none ≫\n      F.map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nval✝ : J\nf : some val✝ ⟶ none\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        (some val✝) ≫\n      F.map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf✝ : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f✝\nval✝¹ val✝ : J\nf : some val✝¹ ⟶ some val✝\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => π j)\n        (some val✝¹) ≫\n      F.map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.id none) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none ≫\n      F.map (Hom.id none)\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase some.none.term\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.term val✝) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) ≫\n      F.map (Hom.term val✝)\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.id (some val✝)) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) ≫\n      F.map (Hom.id (some val✝))\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.id none) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none ≫\n      F.map (Hom.id none)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.none.term\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.term val✝) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) ≫\n      F.map (Hom.term val✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ ((Functor.const (WidePullbackShape J)).obj X).map (Hom.id (some val✝)) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => π j)\n        (some val✝) ≫\n      F.map (Hom.id (some val✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\n⊢ 𝟙 X ≫ f = f ≫ F.map (𝟙 none)\n[PROOFSTEP]\nsimp [w]\n[GOAL]\ncase some.none.term\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ 𝟙 X ≫ f = π val✝ ≫ F.map (Hom.term val✝)\n[PROOFSTEP]\nsimp [w]\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePullbackShape J ⥤ C\nX : C\nf : X ⟶ F.obj none\nπ : (j : J) → X ⟶ F.obj (some j)\nw : ∀ (j : J), π j ≫ F.map (Hom.term j) = f\nval✝ : J\n⊢ 𝟙 X ≫ π val✝ = π val✝ ≫ F.map (𝟙 (some val✝))\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nj : WidePullbackShape J\n⊢ (𝟭 (WidePullbackShape J)).obj j ≅\n    ((wideCospan none (fun j => some (↑h j)) fun j => Hom.term (↑h j)) ⋙\n          wideCospan none (fun j => some (Equiv.invFun h j)) fun j => Hom.term (Equiv.invFun h j)).obj\n      j\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nval✝ : J\n⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nX✝ Y✝ : WidePullbackShape J\nf : X✝ ⟶ Y✝\n⊢ (𝟭 (WidePullbackShape J)).map f ≫\n      ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (some val ≅\n                        Option.rec none (fun val => some (↑h.symm val))\n                          (Option.rec none (fun val => some (↑h val)) (some val))) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          Y✝).hom =\n    ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (some val ≅\n                        Option.rec none (fun val => some (↑h.symm val))\n                          (Option.rec none (fun val => some (↑h val)) (some val))) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          X✝).hom ≫\n      ((wideCospan none (fun j => some (↑h j)) fun j => Hom.term (↑h j)) ⋙\n            wideCospan none (fun j => some (Equiv.invFun h j)) fun j => Hom.term (Equiv.invFun h j)).map\n        f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nj : WidePullbackShape J'\n⊢ ((wideCospan none (fun j => some (Equiv.invFun h j)) fun j => Hom.term (Equiv.invFun h j)) ⋙\n          wideCospan none (fun j => some (↑h j)) fun j => Hom.term (↑h j)).obj\n      j ≅\n    (𝟭 (WidePullbackShape J')).obj j\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J' ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J' ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nval✝ : J'\n⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nX✝ Y✝ : WidePullbackShape J'\nf : X✝ ⟶ Y✝\n⊢ ((wideCospan none (fun j => some (Equiv.invFun h j)) fun j => Hom.term (Equiv.invFun h j)) ⋙\n            wideCospan none (fun j => some (↑h j)) fun j => Hom.term (↑h j)).map\n        f ≫\n      ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (Option.rec none (fun val => some (↑h val))\n                          (Option.rec none (fun val => some (↑h.symm val)) (some val)) ≅\n                        some val) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          Y✝).hom =\n    ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (Option.rec none (fun val => some (↑h val))\n                          (Option.rec none (fun val => some (↑h.symm val)) (some val)) ≅\n                        some val) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          X✝).hom ≫\n      (𝟭 (WidePullbackShape J')).map f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nJ : Type w\nX✝ Y✝ Z✝ : WidePushoutShape J\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ X✝ ⟶ Z✝\n[PROOFSTEP]\ncases f\n[GOAL]\ncase id\nJ : Type w\nX✝ Z✝ : WidePushoutShape J\ng : X✝ ⟶ Z✝\n⊢ X✝ ⟶ Z✝\ncase init J : Type w Z✝ : WidePushoutShape J j✝ : J g : some j✝ ⟶ Z✝ ⊢ none ⟶ Z✝\n[PROOFSTEP]\nexact g\n[GOAL]\ncase init\nJ : Type w\nZ✝ : WidePushoutShape J\nj✝ : J\ng : some j✝ ⟶ Z✝\n⊢ none ⟶ Z✝\n[PROOFSTEP]\ncases g\n[GOAL]\ncase init.id\nJ : Type w\nj✝ : J\n⊢ none ⟶ some j✝\n[PROOFSTEP]\napply Hom.init _\n[GOAL]\nJ : Type w\nx✝¹ x✝ : WidePushoutShape J\n⊢ Subsingleton (x✝¹ ⟶ x✝)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase allEq\nJ : Type w\nx✝¹ x✝ : WidePushoutShape J\n⊢ ∀ (a b : x✝¹ ⟶ x✝), a = b\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase allEq\nJ : Type w\nx✝¹ x✝ : WidePushoutShape J\na b : x✝¹ ⟶ x✝\n⊢ a = b\n[PROOFSTEP]\ncasesm*WidePushoutShape _, (_ : WidePushoutShape _) ⟶ (_ : WidePushoutShape _)\n[GOAL]\ncase allEq.none.none.id.id\nJ : Type w\n⊢ Hom.id none = Hom.id none\ncase allEq.none.some.init.init\nJ : Type w\nval✝ : J\n⊢ Hom.init val✝ = Hom.init val✝\ncase allEq.some.some.id.id J : Type w val✝ : J ⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase allEq.none.none.id.id\nJ : Type w\n⊢ Hom.id none = Hom.id none\ncase allEq.none.some.init.init\nJ : Type w\nval✝ : J\n⊢ Hom.init val✝ = Hom.init val✝\ncase allEq.some.some.id.id J : Type w val✝ : J ⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase allEq.none.some.init.init\nJ : Type w\nval✝ : J\n⊢ Hom.init val✝ = Hom.init val✝\ncase allEq.some.some.id.id J : Type w val✝ : J ⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase allEq.some.some.id.id\nJ : Type w\nval✝ : J\n⊢ Hom.id (some val✝) = Hom.id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nX✝ Y✝ : WidePushoutShape J\nf : X✝ ⟶ Y✝\n⊢ (fun j => Option.casesOn j B objs) X✝ ⟶ (fun j => Option.casesOn j B objs) Y✝\n[PROOFSTEP]\ncases' f with _ j\n[GOAL]\ncase id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nX✝ : WidePushoutShape J\n⊢ (fun j => Option.casesOn j B objs) X✝ ⟶ (fun j => Option.casesOn j B objs) X✝\n[PROOFSTEP]\napply 𝟙 _\n[GOAL]\ncase init\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nj : J\n⊢ (fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) (some j)\n[PROOFSTEP]\nexact arrows j\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nX✝ Y✝ Z✝ : WidePushoutShape J\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun j => Option.casesOn j B objs,\n          map := fun {X Y} f =>\n            Hom.casesOn (motive := fun a a_1 t =>\n              X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n              f\n              (fun X_1 h =>\n                Eq.ndrec (motive := fun X_2 =>\n                  Y = X_2 →\n                    HEq f (Hom.id X_2) → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : X ⟶ Y) →\n                        HEq f (Hom.id X) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                  h)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = some j →\n                      HEq f (Hom.init j) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : none ⟶ Y) →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                  (_ : none = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (f ≫ g) =\n    { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        f ≫\n      { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nX✝ Z✝ : WidePushoutShape J\ng : X✝ ⟶ Z✝\n⊢ { obj := fun j => Option.casesOn j B objs,\n          map := fun {X Y} f =>\n            Hom.casesOn (motive := fun a a_1 t =>\n              X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n              f\n              (fun X_1 h =>\n                Eq.ndrec (motive := fun X_2 =>\n                  Y = X_2 →\n                    HEq f (Hom.id X_2) → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : X ⟶ Y) →\n                        HEq f (Hom.id X) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                  h)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = some j →\n                      HEq f (Hom.init j) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : none ⟶ Y) →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                  (_ : none = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (Hom.id X✝ ≫ g) =\n    { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (Hom.id X✝) ≫\n      { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\nsimp only [Eq.ndrec, hom_id, eq_rec_constant, Category.id_comp]\n[GOAL]\ncase id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nX✝ Z✝ : WidePushoutShape J\ng : X✝ ⟶ Z✝\n⊢ Hom.rec (motive := fun a a_1 t =>\n      X✝ = a →\n        Z✝ = a_1 → HEq (𝟙 X✝ ≫ g) t → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) Z✝))\n      (fun X h =>\n        Eq.rec (motive := fun x x_1 =>\n          Z✝ = x →\n            HEq (𝟙 X✝ ≫ g) (𝟙 x) → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) Z✝))\n          (fun h =>\n            Eq.rec (motive := fun x x_1 =>\n              (f : X✝ ⟶ x) →\n                HEq f (𝟙 X✝) → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) x))\n              (fun f h => 𝟙 (Option.rec B (fun val => objs val) X✝)) (_ : X✝ = Z✝) (𝟙 X✝ ≫ g))\n          h)\n      (fun j h =>\n        Eq.rec (motive := fun x x_1 =>\n          (f : x ⟶ Z✝) →\n            Z✝ = some j →\n              HEq f (Hom.init j) → (Option.rec B (fun val => objs val) x ⟶ Option.rec B (fun val => objs val) Z✝))\n          (fun f h =>\n            Eq.rec (motive := fun x x_1 =>\n              (f : none ⟶ x) → HEq f (Hom.init j) → (B ⟶ Option.rec B (fun val => objs val) x)) (fun f h => arrows j)\n              (_ : some j = Z✝) f)\n          (_ : none = X✝) (𝟙 X✝ ≫ g))\n      (𝟙 X✝ ≫ g) (_ : X✝ = X✝) (_ : Z✝ = Z✝) (_ : HEq (Hom.id X✝ ≫ g) (Hom.id X✝ ≫ g)) =\n    Hom.rec (motive := fun a a_1 t =>\n      X✝ = a → Z✝ = a_1 → HEq g t → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) Z✝))\n      (fun X h =>\n        Eq.rec (motive := fun x x_1 =>\n          Z✝ = x → HEq g (𝟙 x) → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) Z✝))\n          (fun h =>\n            Eq.rec (motive := fun x x_1 =>\n              (f : X✝ ⟶ x) →\n                HEq f (𝟙 X✝) → (Option.rec B (fun val => objs val) X✝ ⟶ Option.rec B (fun val => objs val) x))\n              (fun f h => 𝟙 (Option.rec B (fun val => objs val) X✝)) (_ : X✝ = Z✝) g)\n          h)\n      (fun j h =>\n        Eq.rec (motive := fun x x_1 =>\n          (f : x ⟶ Z✝) →\n            Z✝ = some j →\n              HEq f (Hom.init j) → (Option.rec B (fun val => objs val) x ⟶ Option.rec B (fun val => objs val) Z✝))\n          (fun f h =>\n            Eq.rec (motive := fun x x_1 =>\n              (f : none ⟶ x) → HEq f (Hom.init j) → (B ⟶ Option.rec B (fun val => objs val) x)) (fun f h => arrows j)\n              (_ : some j = Z✝) f)\n          (_ : none = X✝) g)\n      g (_ : X✝ = X✝) (_ : Z✝ = Z✝) (_ : HEq g g)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase init\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nZ✝ : WidePushoutShape J\nj✝ : J\ng : some j✝ ⟶ Z✝\n⊢ { obj := fun j => Option.casesOn j B objs,\n          map := fun {X Y} f =>\n            Hom.casesOn (motive := fun a a_1 t =>\n              X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n              f\n              (fun X_1 h =>\n                Eq.ndrec (motive := fun X_2 =>\n                  Y = X_2 →\n                    HEq f (Hom.id X_2) → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : X ⟶ Y) →\n                        HEq f (Hom.id X) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                  h)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = some j →\n                      HEq f (Hom.init j) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : none ⟶ Y) →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                  (_ : none = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (Hom.init j✝ ≫ g) =\n    { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (Hom.init j✝) ≫\n      { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase init.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nj✝ : J\n⊢ { obj := fun j => Option.casesOn j B objs,\n          map := fun {X Y} f =>\n            Hom.casesOn (motive := fun a a_1 t =>\n              X = a → Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n              f\n              (fun X_1 h =>\n                Eq.ndrec (motive := fun X_2 =>\n                  Y = X_2 →\n                    HEq f (Hom.id X_2) → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : X ⟶ Y) →\n                        HEq f (Hom.id X) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                  h)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = some j →\n                      HEq f (Hom.init j) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : none ⟶ Y) →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                      (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                  (_ : none = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (Hom.init j✝ ≫ Hom.id (some j✝)) =\n    { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (Hom.init j✝) ≫\n      { obj := fun j => Option.casesOn j B objs,\n            map := fun {X Y} f =>\n              Hom.casesOn (motive := fun a a_1 t =>\n                X = a →\n                  Y = a_1 → HEq f t → ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                f\n                (fun X_1 h =>\n                  Eq.ndrec (motive := fun X_2 =>\n                    Y = X_2 →\n                      HEq f (Hom.id X_2) →\n                        ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : X ⟶ Y) →\n                          HEq f (Hom.id X) →\n                            ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.id X = f) ▸ 𝟙 ((fun j => Option.casesOn j B objs) X)) (_ : X = Y) f)\n                    h)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = some j →\n                        HEq f (Hom.init j) →\n                          ((fun j => Option.casesOn j B objs) X ⟶ (fun j => Option.casesOn j B objs) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : none ⟶ Y) →\n                          HEq f (Hom.init j) →\n                            ((fun j => Option.casesOn j B objs) none ⟶ (fun j => Option.casesOn j B objs) Y))\n                        (fun f h => (_ : Hom.init j = f) ▸ arrows j) (_ : some j = Y) f)\n                    (_ : none = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (Hom.id (some j✝))\n[PROOFSTEP]\nsimp only [Eq.ndrec, hom_id, eq_rec_constant, Category.comp_id]\n[GOAL]\ncase init.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nB : C\nobjs : J → C\narrows : (j : J) → B ⟶ objs j\nj✝ : J\n⊢ Hom.rec (motive := fun a a_1 t => none = a → some j✝ = a_1 → HEq (Hom.init j✝ ≫ 𝟙 (some j✝)) t → (B ⟶ objs j✝))\n      (fun X h =>\n        Eq.rec (motive := fun x x_1 => some j✝ = x → HEq (Hom.init j✝ ≫ 𝟙 (some j✝)) (𝟙 x) → (B ⟶ objs j✝))\n          (fun h =>\n            Eq.rec (motive := fun x x_1 => (f : none ⟶ x) → HEq f (𝟙 none) → (B ⟶ Option.rec B (fun val => objs val) x))\n              (fun f h => 𝟙 B) (_ : none = some j✝) (Hom.init j✝ ≫ 𝟙 (some j✝)))\n          h)\n      (fun j h h =>\n        Eq.rec (motive := fun x x_1 => (f : none ⟶ x) → HEq f (Hom.init j) → (B ⟶ Option.rec B (fun val => objs val) x))\n          (fun f h => arrows j) (_ : some j = some j✝) (Hom.init j✝ ≫ 𝟙 (some j✝)))\n      (Hom.init j✝ ≫ 𝟙 (some j✝)) (_ : none = none) (_ : some j✝ = some j✝)\n      (_ : HEq (Hom.init j✝ ≫ Hom.id (some j✝)) (Hom.init j✝ ≫ Hom.id (some j✝))) =\n    arrows j✝\n[PROOFSTEP]\ncongr\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nj : WidePushoutShape J\n⊢ F.obj j = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\n⊢ F.obj none = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj none\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nval✝ : J\n⊢ F.obj (some val✝) = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj (some val✝)\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\n⊢ F.obj none = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj none\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nval✝ : J\n⊢ F.obj (some val✝) = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nval✝ : J\n⊢ F.obj (some val✝) = (wideSpan (F.obj none) (fun j => F.obj (some j)) fun j => F.map (Hom.init j)).obj (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nj j' : WidePushoutShape J\nf : j ⟶ j'\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        j ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases j\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nj' : WidePushoutShape J\nf : none ⟶ j'\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases j'\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nj' : WidePushoutShape J\nval✝ : J\nf : some val✝ ⟶ j'\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        j' =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        (some val✝) ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases j'\n[GOAL]\ncase none.none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nf : none ⟶ none\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        none =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nval✝ : J\nf : none ⟶ some val✝\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.none\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nval✝ : J\nf : some val✝ ⟶ none\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        none =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        (some val✝) ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase some.some\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf✝ : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f✝\nval✝¹ val✝ : J\nf : some val✝¹ ⟶ some val✝\n⊢ F.map f ≫\n      (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f✝\n          | some j => ι j)\n        (some val✝¹) ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\n⊢ F.map (Hom.id none) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.id none)\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase none.some.init\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (Hom.init val✝) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.init val✝)\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (Hom.id (some val✝)) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.id (some val✝))\n[PROOFSTEP]\nrefine id _\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\n⊢ F.map (Hom.id none) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.id none)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none.some.init\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (Hom.init val✝) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        none ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.init val✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (Hom.id (some val✝)) ≫\n      (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) =\n    (fun j =>\n          match j with\n          | none => f\n          | some j => ι j)\n        (some val✝) ≫\n      ((Functor.const (WidePushoutShape J)).obj X).map (Hom.id (some val✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase none.none.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\n⊢ F.map (𝟙 none) ≫ f = f ≫ 𝟙 X\n[PROOFSTEP]\nsimp [w]\n[GOAL]\ncase none.some.init\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (Hom.init val✝) ≫ ι val✝ = f ≫ 𝟙 X\n[PROOFSTEP]\nsimp [w]\n[GOAL]\ncase some.some.id\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nF : WidePushoutShape J ⥤ C\nX : C\nf : F.obj none ⟶ X\nι : (j : J) → F.obj (some j) ⟶ X\nw : ∀ (j : J), F.map (Hom.init j) ≫ ι j = f\nval✝ : J\n⊢ F.map (𝟙 (some val✝)) ≫ ι val✝ = ι val✝ ≫ 𝟙 X\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nj : WidePushoutShape J\n⊢ (𝟭 (WidePushoutShape J)).obj j ≅\n    ((wideSpan none (fun j => some (↑h j)) fun j => Hom.init (↑h j)) ⋙\n          wideSpan none (fun j => some (Equiv.invFun h j)) fun j => Hom.init (Equiv.invFun h j)).obj\n      j\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nval✝ : J\n⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nX✝ Y✝ : WidePushoutShape J\nf : X✝ ⟶ Y✝\n⊢ (𝟭 (WidePushoutShape J)).map f ≫\n      ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (some val ≅\n                        Option.rec none (fun val => some (↑h.symm val))\n                          (Option.rec none (fun val => some (↑h val)) (some val))) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          Y✝).hom =\n    ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (some val ≅\n                        Option.rec none (fun val => some (↑h.symm val))\n                          (Option.rec none (fun val => some (↑h val)) (some val))) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          X✝).hom ≫\n      ((wideSpan none (fun j => some (↑h j)) fun j => Hom.init (↑h j)) ⋙\n            wideSpan none (fun j => some (Equiv.invFun h j)) fun j => Hom.init (Equiv.invFun h j)).map\n        f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nj : WidePushoutShape J'\n⊢ ((wideSpan none (fun j => some (Equiv.invFun h j)) fun j => Hom.init (Equiv.invFun h j)) ⋙\n          wideSpan none (fun j => some (↑h j)) fun j => Hom.init (↑h j)).obj\n      j ≅\n    (𝟭 (WidePushoutShape J')).obj j\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J' ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrepeat rfl\n[GOAL]\ncase none\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\n⊢ none ≅ none\ncase some J : Type w C : Type u inst : Category.{v, u} C J' : Type w' h : J ≃ J' val✝ : J' ⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nJ : Type w\nC : Type u\ninst : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nval✝ : J'\n⊢ some val✝ ≅ some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\n\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝ : Category.{v, u} C\nJ' : Type w'\nh : J ≃ J'\nX✝ Y✝ : WidePushoutShape J'\nf : X✝ ⟶ Y✝\n⊢ ((wideSpan none (fun j => some (Equiv.invFun h j)) fun j => Hom.init (Equiv.invFun h j)) ⋙\n            wideSpan none (fun j => some (↑h j)) fun j => Hom.init (↑h j)).map\n        f ≫\n      ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (Option.rec none (fun val => some (↑h val))\n                          (Option.rec none (fun val => some (↑h.symm val)) (some val)) ≅\n                        some val) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          Y✝).hom =\n    ((fun j =>\n            id\n              (Option.casesOn j (id (Iso.refl none)) fun val =>\n                Eq.mpr\n                  (_ :\n                    (Option.rec none (fun val => some (↑h val))\n                          (Option.rec none (fun val => some (↑h.symm val)) (some val)) ≅\n                        some val) =\n                      (some val ≅ some val))\n                  (Iso.refl (some val))))\n          X✝).hom ≫\n      (𝟭 (WidePushoutShape J')).map f\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nj : J\n⊢ π arrows j ≫ arrows j = base arrows\n[PROOFSTEP]\napply limit.w (WidePullbackShape.wideCospan _ _ _) (WidePullbackShape.Hom.term j)\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\nj : J\n⊢ lift f fs w ≫ π arrows j = fs j\n[PROOFSTEP]\nsimp only [limit.lift_π, WidePullbackShape.mkCone_pt, WidePullbackShape.mkCone_π_app]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\n⊢ lift f fs w ≫ base arrows = f\n[PROOFSTEP]\nsimp only [limit.lift_π, WidePullbackShape.mkCone_pt, WidePullbackShape.mkCone_π_app]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ (∀ (j : J), g ≫ π arrows j = fs j) → g ≫ base arrows = f → g = lift f fs w\n[PROOFSTEP]\nintro h1 h2\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g ≫ π arrows j = fs j\nh2 : g ≫ base arrows = f\n⊢ g = lift f fs w\n[PROOFSTEP]\napply (limit.isLimit (WidePullbackShape.wideCospan B objs arrows)).uniq (WidePullbackShape.mkCone f fs <| w)\n[GOAL]\ncase x\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g ≫ π arrows j = fs j\nh2 : g ≫ base arrows = f\n⊢ ∀ (j : WidePullbackShape J),\n    g ≫ NatTrans.app (limit.cone (WidePullbackShape.wideCospan B objs arrows)).π j =\n      NatTrans.app (WidePullbackShape.mkCone f fs w).π j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase x.none\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g ≫ π arrows j = fs j\nh2 : g ≫ base arrows = f\n⊢ g ≫ NatTrans.app (limit.cone (WidePullbackShape.wideCospan B objs arrows)).π none =\n    NatTrans.app (WidePullbackShape.mkCone f fs w).π none\n[PROOFSTEP]\napply h2\n[GOAL]\ncase x.some\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g ≫ π arrows j = fs j\nh2 : g ≫ base arrows = f\nval✝ : J\n⊢ g ≫ NatTrans.app (limit.cone (WidePullbackShape.wideCospan B objs arrows)).π (some val✝) =\n    NatTrans.app (WidePullbackShape.mkCone f fs w).π (some val✝)\n[PROOFSTEP]\napply h1\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type ?u.192408\ninst✝¹ : Category.{v₂, ?u.192408} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ ∀ (j : J), (fun j => g ≫ π arrows j) j ≫ arrows j = g ≫ base arrows\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ g = lift (g ≫ base arrows) (fun j => g ≫ π arrows j) (_ : ∀ (j : J), (g ≫ π arrows j) ≫ arrows j = g ≫ base arrows)\n[PROOFSTEP]\napply eq_lift_of_comp_eq\n[GOAL]\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ ∀ (j : J), g ≫ π arrows j = g ≫ π arrows j\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ g ≫ base arrows = g ≫ base arrows\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ g ≫ base arrows = g ≫ base arrows\n[PROOFSTEP]\nrfl\n  -- Porting note: quite a few missing refl's in aesop_cat now\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng1 g2 : X ⟶ widePullback B (fun j => objs j) arrows\n⊢ (∀ (j : J), g1 ≫ π arrows j = g2 ≫ π arrows j) → g1 ≫ base arrows = g2 ≫ base arrows → g1 = g2\n[PROOFSTEP]\nintro h1 h2\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng1 g2 : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g1 ≫ π arrows j = g2 ≫ π arrows j\nh2 : g1 ≫ base arrows = g2 ≫ base arrows\n⊢ g1 = g2\n[PROOFSTEP]\napply limit.hom_ext\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng1 g2 : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g1 ≫ π arrows j = g2 ≫ π arrows j\nh2 : g1 ≫ base arrows = g2 ≫ base arrows\n⊢ ∀ (j : WidePullbackShape J),\n    g1 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) j =\n      g2 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase w.none\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng1 g2 : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g1 ≫ π arrows j = g2 ≫ π arrows j\nh2 : g1 ≫ base arrows = g2 ≫ base arrows\n⊢ g1 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) none =\n    g2 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) none\n[PROOFSTEP]\napply h2\n[GOAL]\ncase w.some\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → objs j ⟶ B\ninst✝ : HasWidePullback B objs arrows\nX : D\nf : X ⟶ B\nfs : (j : J) → X ⟶ objs j\nw : ∀ (j : J), fs j ≫ arrows j = f\ng1 g2 : X ⟶ widePullback B (fun j => objs j) arrows\nh1 : ∀ (j : J), g1 ≫ π arrows j = g2 ≫ π arrows j\nh2 : g1 ≫ base arrows = g2 ≫ base arrows\nval✝ : J\n⊢ g1 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) (some val✝) =\n    g2 ≫ limit.π (WidePullbackShape.wideCospan B (fun j => objs j) arrows) (some val✝)\n[PROOFSTEP]\napply h1\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nj : J\n⊢ arrows j ≫ ι arrows j = head arrows\n[PROOFSTEP]\napply colimit.w (WidePushoutShape.wideSpan _ _ _) (WidePushoutShape.Hom.init j)\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\nj : J\n⊢ ι arrows j ≫ desc f fs w = fs j\n[PROOFSTEP]\nsimp only [colimit.ι_desc, WidePushoutShape.mkCocone_pt, WidePushoutShape.mkCocone_ι_app]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\n⊢ head arrows ≫ desc f fs w = f\n[PROOFSTEP]\nsimp only [colimit.ι_desc, WidePushoutShape.mkCocone_pt, WidePushoutShape.mkCocone_ι_app]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ (∀ (j : J), ι arrows j ≫ g = fs j) → head arrows ≫ g = f → g = desc f fs w\n[PROOFSTEP]\nintro h1 h2\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g = fs j\nh2 : head arrows ≫ g = f\n⊢ g = desc f fs w\n[PROOFSTEP]\napply (colimit.isColimit (WidePushoutShape.wideSpan B objs arrows)).uniq (WidePushoutShape.mkCocone f fs <| w)\n[GOAL]\ncase x\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g = fs j\nh2 : head arrows ≫ g = f\n⊢ ∀ (j : WidePushoutShape J),\n    NatTrans.app (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι j ≫ g =\n      NatTrans.app (WidePushoutShape.mkCocone f fs w).ι j\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase x.none\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g = fs j\nh2 : head arrows ≫ g = f\n⊢ NatTrans.app (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι none ≫ g =\n    NatTrans.app (WidePushoutShape.mkCocone f fs w).ι none\n[PROOFSTEP]\napply h2\n[GOAL]\ncase x.some\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g = fs j\nh2 : head arrows ≫ g = f\nval✝ : J\n⊢ NatTrans.app (colimit.cocone (WidePushoutShape.wideSpan B objs arrows)).ι (some val✝) ≫ g =\n    NatTrans.app (WidePushoutShape.mkCocone f fs w).ι (some val✝)\n[PROOFSTEP]\napply h1\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type ?u.203710\ninst✝¹ : Category.{v₂, ?u.203710} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nj : J\n⊢ arrows j ≫ (fun j => ι arrows j ≫ g) j = head arrows ≫ g\n[PROOFSTEP]\nrw [← Category.assoc]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type ?u.203710\ninst✝¹ : Category.{v₂, ?u.203710} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\nj : J\n⊢ (arrows j ≫ ι arrows j) ≫ g = head arrows ≫ g\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ g =\n    desc (head arrows ≫ g) (fun j => ι arrows j ≫ g)\n      (_ : ∀ (j : J), arrows j ≫ (fun j => ι arrows j ≫ g) j = head arrows ≫ g)\n[PROOFSTEP]\napply eq_desc_of_comp_eq\n[GOAL]\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ ∀ (j : J), ι arrows j ≫ g = ι arrows j ≫ g\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ head arrows ≫ g = head arrows ≫ g\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ head arrows ≫ g = head arrows ≫ g\n[PROOFSTEP]\nrfl\n  -- Porting note: another missing rfl\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng1 g2 : widePushout B (fun j => objs j) arrows ⟶ X\n⊢ (∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2) → head arrows ≫ g1 = head arrows ≫ g2 → g1 = g2\n[PROOFSTEP]\nintro h1 h2\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng1 g2 : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2\nh2 : head arrows ≫ g1 = head arrows ≫ g2\n⊢ g1 = g2\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng1 g2 : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2\nh2 : head arrows ≫ g1 = head arrows ≫ g2\n⊢ ∀ (j : WidePushoutShape J),\n    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) j ≫ g1 =\n      colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) j ≫ g2\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase w.none\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng1 g2 : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2\nh2 : head arrows ≫ g1 = head arrows ≫ g2\n⊢ colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) none ≫ g1 =\n    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) none ≫ g2\n[PROOFSTEP]\napply h2\n[GOAL]\ncase w.some\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u_1\ninst✝¹ : Category.{v₂, u_1} D\nB : D\nobjs : J → D\narrows : (j : J) → B ⟶ objs j\ninst✝ : HasWidePushout B objs arrows\nX : D\nf : B ⟶ X\nfs : (j : J) → objs j ⟶ X\nw : ∀ (j : J), arrows j ≫ fs j = f\ng1 g2 : widePushout B (fun j => objs j) arrows ⟶ X\nh1 : ∀ (j : J), ι arrows j ≫ g1 = ι arrows j ≫ g2\nh2 : head arrows ≫ g1 = head arrows ≫ g2\nval✝ : J\n⊢ colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) (some val✝) ≫ g1 =\n    colimit.ι (WidePushoutShape.wideSpan B (fun j => objs j) arrows) (some val✝) ≫ g2\n[PROOFSTEP]\napply h1\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.WidePullbacks", "llama_tokens": 31988, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6001883449573376, "lm_q2_score": 0.4843800842769843, "lm_q1q2_score": 0.29071928111249895}}
{"text": "[GOAL]\nR : Type u_1\ninst✝³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommRing P\na : R\nb : S\nhb : IsInteger R b\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nrcases hb with ⟨b', hb⟩\n[GOAL]\ncase intro\nR : Type u_1\ninst✝³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommRing P\na : R\nb : S\nb' : R\nhb : ↑(algebraMap R S) b' = b\n⊢ IsInteger R (a • b)\n[PROOFSTEP]\nuse a * b'\n[GOAL]\ncase h\nR : Type u_1\ninst✝³ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝² : CommRing S\ninst✝¹ : Algebra R S\nP : Type u_3\ninst✝ : CommRing P\na : R\nb : S\nb' : R\nhb : ↑(algebraMap R S) b' = b\n⊢ ↑(algebraMap R S) (a * b') = a • b\n[PROOFSTEP]\nrw [← hb, (algebraMap R S).map_mul, Algebra.smul_def]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\na : S\n⊢ ∃ b, IsInteger R (↑b • a)\n[PROOFSTEP]\nsimp_rw [Algebra.smul_def, mul_comm _ a]\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\na : S\n⊢ ∃ b, IsInteger R (a * ↑(algebraMap R S) ↑b)\n[PROOFSTEP]\napply exists_integer_multiple'\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\n⊢ ∃ b, ∀ (i : ι), i ∈ s → IsInteger R (↑b • f i)\n[PROOFSTEP]\nhaveI := Classical.propDecidable\n[GOAL]\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\n⊢ ∃ b, ∀ (i : ι), i ∈ s → IsInteger R (↑b • f i)\n[PROOFSTEP]\nrefine' ⟨∏ i in s, (sec M (f i)).2, fun i hi => ⟨_, _⟩⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ R\n[PROOFSTEP]\nexact (∏ j in s.erase i, (sec M (f j)).2) * (sec M (f i)).1\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ ↑(algebraMap R S) (↑(∏ j in Finset.erase s i, (sec M (f j)).snd) * (sec M (f i)).fst) =\n    ↑(∏ i in s, (sec M (f i)).snd) • f i\n[PROOFSTEP]\nrw [RingHom.map_mul, sec_spec', ← mul_assoc, ← (algebraMap R S).map_mul, ← Algebra.smul_def]\n[GOAL]\ncase refine'_2\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ (↑(∏ j in Finset.erase s i, (sec M (f j)).snd) * ↑(sec M (f i)).snd) • f i = ↑(∏ i in s, (sec M (f i)).snd) • f i\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase refine'_2.e_a\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ ↑(∏ j in Finset.erase s i, (sec M (f j)).snd) * ↑(sec M (f i)).snd = ↑(∏ i in s, (sec M (f i)).snd)\n[PROOFSTEP]\nrefine' _root_.trans _ ((Submonoid.subtype M).map_prod _ _).symm\n[GOAL]\ncase refine'_2.e_a\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ ↑(∏ j in Finset.erase s i, (sec M (f j)).snd) * ↑(sec M (f i)).snd =\n    ∏ x in s, ↑(Submonoid.subtype M) (sec M (f x)).snd\n[PROOFSTEP]\nrw [mul_comm, Submonoid.coe_finset_prod,\n  -- Porting note: explicitly supplied `f`←\n  Finset.prod_insert (f := fun i => ((sec M (f i)).snd : R)) (s.not_mem_erase i), Finset.insert_erase hi]\n[GOAL]\ncase refine'_2.e_a\nR : Type u_1\ninst✝⁴ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝³ : CommRing S\ninst✝² : Algebra R S\nP : Type u_3\ninst✝¹ : CommRing P\ninst✝ : IsLocalization M S\nι : Type u_4\ns : Finset ι\nf : ι → S\nthis : (a : Prop) → Decidable a\ni : ι\nhi : i ∈ s\n⊢ ∏ x in s, ↑(sec M (f x)).snd = ∏ x in s, ↑(Submonoid.subtype M) (sec M (f x)).snd\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\nι : Type u_4\ninst✝ : Finite ι\nf : ι → S\n⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\nι : Type u_4\ninst✝ : Finite ι\nf : ι → S\nval✝ : Fintype ι\n⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := exist_integer_multiples M Finset.univ f\n[GOAL]\ncase intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\nι : Type u_4\ninst✝ : Finite ι\nf : ι → S\nval✝ : Fintype ι\nb : { x // x ∈ M }\nhb : ∀ (i : ι), i ∈ Finset.univ → IsInteger R (↑b • f i)\n⊢ ∃ b, ∀ (i : ι), IsInteger R (↑b • f i)\n[PROOFSTEP]\nexact ⟨b, fun i => hb i (Finset.mem_univ _)⟩\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\n⊢ ↑(algebraMap R S) '' ↑(finsetIntegerMultiple M s) = commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\ndelta finsetIntegerMultiple commonDenom\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\n⊢ ↑(algebraMap R S) '' ↑(Finset.image (fun t => integerMultiple M s id t) (Finset.attach s)) =\n    commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\nrw [Finset.coe_image]\n[GOAL]\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\n⊢ ↑(algebraMap R S) '' ((fun t => integerMultiple M s id t) '' ↑(Finset.attach s)) = commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx✝ : S\n⊢ x✝ ∈ ↑(algebraMap R S) '' ((fun t => integerMultiple M s id t) '' ↑(Finset.attach s)) ↔\n    x✝ ∈ commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx✝ : S\n⊢ x✝ ∈ ↑(algebraMap R S) '' ((fun t => integerMultiple M s id t) '' ↑(Finset.attach s)) →\n    x✝ ∈ commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\nrintro ⟨_, ⟨x, -, rfl⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx : { x // x ∈ s }\n⊢ ↑(algebraMap R S) ((fun t => integerMultiple M s id t) x) ∈ commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\nrw [map_integerMultiple]\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx : { x // x ∈ s }\n⊢ commonDenom M s id • id ↑x ∈ commonDenomOfFinset M s • ↑s\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ x.prop\n[GOAL]\ncase h.mpr\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx✝ : S\n⊢ x✝ ∈ commonDenomOfFinset M s • ↑s →\n    x✝ ∈ ↑(algebraMap R S) '' ((fun t => integerMultiple M s id t) '' ↑(Finset.attach s))\n[PROOFSTEP]\nrintro ⟨x, hx, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nR : Type u_1\ninst✝⁵ : CommRing R\nM : Submonoid R\nS : Type u_2\ninst✝⁴ : CommRing S\ninst✝³ : Algebra R S\nP : Type u_3\ninst✝² : CommRing P\ninst✝¹ : IsLocalization M S\ninst✝ : DecidableEq R\ns : Finset S\nx : S\nhx : x ∈ ↑s\n⊢ (fun x => ↑(Submonoid.subtype M) (commonDenomOfFinset M s) • x) x ∈\n    ↑(algebraMap R S) '' ((fun t => integerMultiple M s id t) '' ↑(Finset.attach s))\n[PROOFSTEP]\nexact ⟨_, ⟨⟨x, hx⟩, s.mem_attach _, rfl⟩, map_integerMultiple M s id _⟩\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Localization.Integer", "llama_tokens": 4704, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6001883449573376, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.29071928111249895}}
{"text": "[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nB : Bicone F\nj : J\n⊢ Bicone.ι B j ≫ Bicone.π B j = 𝟙 (F j)\n[PROOFSTEP]\nsimpa using B.ι_π j j\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nB : Bicone F\nj j' : J\nh : j ≠ j'\n⊢ Bicone.ι B j ≫ Bicone.π B j' = 0\n[PROOFSTEP]\nsimpa [h] using B.ι_π j j'\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nB : Bicone F\n⊢ ∀ ⦃X Y : Discrete J⦄ (f : X ⟶ Y),\n    (Discrete.functor F).map f ≫ (fun j => ι B j.as) Y = (fun j => ι B j.as) X ≫ ((const (Discrete J)).obj B.pt).map f\n[PROOFSTEP]\nintro ⟨j⟩ ⟨j'⟩ ⟨⟨f⟩⟩\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nB : Bicone F\nj j' : J\nf : { as := j }.as = { as := j' }.as\n⊢ (Discrete.functor F).map { down := { down := f } } ≫ (fun j => ι B j.as) { as := j' } =\n    (fun j => ι B j.as) { as := j } ≫ ((const (Discrete J)).obj B.pt).map { down := { down := f } }\n[PROOFSTEP]\ncases f\n[GOAL]\ncase refl\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nB : Bicone F\nj : J\n⊢ (Discrete.functor F).map { down := { down := (_ : { as := j }.as = { as := j }.as) } } ≫\n      (fun j => ι B j.as) { as := j } =\n    (fun j => ι B j.as) { as := j } ≫\n      ((const (Discrete J)).obj B.pt).map { down := { down := (_ : { as := j }.as = { as := j }.as) } }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Cone (Discrete.functor f)\nht : IsLimit t\nj j' : J\n⊢ (fun j => IsLimit.lift ht (Fan.mk (f j) fun j' => if h : j = j' then eqToHom (_ : f j = f j') else 0)) j ≫\n      (fun j => NatTrans.app t.π { as := j }) j' =\n    if h : j = j' then eqToHom (_ : f j = f j') else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Bicone f\nht : IsLimit (toCone t)\nj : J\nj' : Discrete J\n⊢ ι t j ≫ NatTrans.app (toCone t).π j' =\n    IsLimit.lift ht (Fan.mk (f j) fun j' => if h : j = j' then eqToHom (_ : f j = f j') else 0) ≫\n      NatTrans.app (toCone t).π j'\n[PROOFSTEP]\nrw [ht.fac]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Bicone f\nht : IsLimit (toCone t)\nj : J\nj' : Discrete J\n⊢ ι t j ≫ NatTrans.app (toCone t).π j' =\n    NatTrans.app (Fan.mk (f j) fun j' => if h : j = j' then eqToHom (_ : f j = f j') else 0).π j'\n[PROOFSTEP]\nsimp [t.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Cocone (Discrete.functor f)\nht : IsColimit t\nj j' : J\n⊢ (fun j => NatTrans.app t.ι { as := j }) j ≫\n      (fun j => IsColimit.desc ht (Cofan.mk (f j) fun j' => if h : j' = j then eqToHom (_ : f j' = f j) else 0)) j' =\n    if h : j = j' then eqToHom (_ : f j = f j') else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Bicone f\nht : IsColimit (toCocone t)\nj : J\nj' : Discrete J\n⊢ NatTrans.app (toCocone t).ι j' ≫ π t j =\n    NatTrans.app (toCocone t).ι j' ≫\n      IsColimit.desc ht (Cofan.mk (f j) fun j' => if h : j' = j then eqToHom (_ : f j' = f j) else 0)\n[PROOFSTEP]\nrw [ht.fac]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF f : J → C\nt : Bicone f\nht : IsColimit (toCocone t)\nj : J\nj' : Discrete J\n⊢ NatTrans.app (toCocone t).ι j' ≫ π t j =\n    NatTrans.app (Cofan.mk (f j) fun j' => if h : j' = j then eqToHom (_ : f j' = f j) else 0).ι j'\n[PROOFSTEP]\nsimp [t.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\n⊢ (fun k => ι c (↑g k)) k ≫ (fun k => π c (↑g k)) k' = if h : k = k' then eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k') else 0\n[PROOFSTEP]\nsimp only [c.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\n⊢ (if h : ↑g k = ↑g k' then eqToHom (_ : f (↑g k) = f (↑g k')) else 0) =\n    if h : k = k' then eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k') else 0\n[PROOFSTEP]\nsplit_ifs with h h' h'\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh : ↑g k = ↑g k'\nh' : k = k'\n⊢ eqToHom (_ : f (↑g k) = f (↑g k')) = eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k')\n[PROOFSTEP]\nsimp [Equiv.apply_eq_iff_eq g] at h h' \n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh : ↑g k = ↑g k'\nh' : ¬k = k'\n⊢ eqToHom (_ : f (↑g k) = f (↑g k')) = 0\n[PROOFSTEP]\nsimp [Equiv.apply_eq_iff_eq g] at h h' \n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh : ¬↑g k = ↑g k'\nh' : k = k'\n⊢ 0 = eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k')\n[PROOFSTEP]\nsimp [Equiv.apply_eq_iff_eq g] at h h' \n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh : ¬↑g k = ↑g k'\nh' : ¬k = k'\n⊢ 0 = 0\n[PROOFSTEP]\nsimp [Equiv.apply_eq_iff_eq g] at h h' \n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh✝ : ↑g k = ↑g k'\nh' h : k = k'\n⊢ eqToHom (_ : f (↑g k) = f (↑g k')) = eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k')\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh✝ : ↑g k = ↑g k'\nh' : ¬k = k'\nh : k = k'\n⊢ eqToHom (_ : f (↑g k) = f (↑g k')) = 0\n[PROOFSTEP]\ntauto\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh' : k = k'\nh : ¬k = k'\n⊢ 0 = eqToHom (_ : (f ∘ ↑g) k = (f ∘ ↑g) k')\n[PROOFSTEP]\ntauto\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nk k' : K\nh' h : ¬k = k'\n⊢ 0 = 0\n[PROOFSTEP]\ntauto\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\n⊢ ∀ (j : Discrete K),\n    NatTrans.app (toCone (whisker c g)).π j =\n      (Iso.refl (toCone (whisker c g)).pt).hom ≫\n        NatTrans.app\n          ((Cones.postcompose (Discrete.functorComp f ↑g).inv).obj\n              (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c))).π\n          j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\n⊢ ∀ (j : Discrete K),\n    NatTrans.app (toCocone (whisker c g)).ι j ≫ (Iso.refl (toCocone (whisker c g)).pt).hom =\n      NatTrans.app\n        ((Cocones.precompose (Discrete.functorComp f ↑g).hom).obj\n            (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c))).ι\n        j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\n⊢ IsBilimit (whisker c g) ≃ IsBilimit c\n[PROOFSTEP]\nrefine' equivOfSubsingletonOfSubsingleton (fun hc => ⟨_, _⟩) fun hc => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\n⊢ IsLimit (toCone c)\n[PROOFSTEP]\nlet this := IsLimit.ofIsoLimit hc.isLimit (Bicone.whiskerToCone c g)\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\nthis : IsLimit\n  ((Cones.postcompose (Discrete.functorComp f ↑g).inv).obj\n    (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c))) :=\n  IsLimit.ofIsoLimit hc.isLimit (whiskerToCone c g)\n⊢ IsLimit (toCone c)\n[PROOFSTEP]\nlet this := (IsLimit.postcomposeHomEquiv (Discrete.functorComp f g).symm _) this\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\nthis✝ : IsLimit\n  ((Cones.postcompose (Discrete.functorComp f ↑g).inv).obj\n    (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c))) :=\n  IsLimit.ofIsoLimit hc.isLimit (whiskerToCone c g)\nthis : (fun x => IsLimit (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c))) this✝ :=\n  ↑(IsLimit.postcomposeHomEquiv (Discrete.functorComp f ↑g).symm\n        (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c)))\n    this✝\n⊢ IsLimit (toCone c)\n[PROOFSTEP]\nexact IsLimit.ofWhiskerEquivalence (Discrete.equivalence g) this\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\n⊢ IsColimit (toCocone c)\n[PROOFSTEP]\nlet this := IsColimit.ofIsoColimit hc.isColimit (Bicone.whiskerToCocone c g)\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\nthis : IsColimit\n  ((Cocones.precompose (Discrete.functorComp f ↑g).hom).obj\n    (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c))) :=\n  IsColimit.ofIsoColimit hc.isColimit (whiskerToCocone c g)\n⊢ IsColimit (toCocone c)\n[PROOFSTEP]\nlet this := (IsColimit.precomposeHomEquiv (Discrete.functorComp f g) _) this\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit (whisker c g)\nthis✝ : IsColimit\n  ((Cocones.precompose (Discrete.functorComp f ↑g).hom).obj\n    (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c))) :=\n  IsColimit.ofIsoColimit hc.isColimit (whiskerToCocone c g)\nthis : (fun x => IsColimit (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c))) this✝ :=\n  ↑(IsColimit.precomposeHomEquiv (Discrete.functorComp f ↑g)\n        (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c)))\n    this✝\n⊢ IsColimit (toCocone c)\n[PROOFSTEP]\nexact IsColimit.ofWhiskerEquivalence (Discrete.equivalence g) this\n[GOAL]\ncase refine'_3\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsLimit (toCone (whisker c g))\n[PROOFSTEP]\napply IsLimit.ofIsoLimit _ (Bicone.whiskerToCone c g).symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsLimit\n    ((Cones.postcompose (Discrete.functorComp f ↑g).inv).obj\n      (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c)))\n[PROOFSTEP]\napply (IsLimit.postcomposeHomEquiv (Discrete.functorComp f g).symm _).symm _\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsLimit (Cone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCone c))\n[PROOFSTEP]\nexact IsLimit.whiskerEquivalence hc.isLimit (Discrete.equivalence g)\n[GOAL]\ncase refine'_4\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsColimit (toCocone (whisker c g))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit _ (Bicone.whiskerToCocone c g).symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsColimit\n    ((Cocones.precompose (Discrete.functorComp f ↑g).hom).obj\n      (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c)))\n[PROOFSTEP]\napply (IsColimit.precomposeHomEquiv (Discrete.functorComp f g) _).symm _\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nF : J → C\nK : Type w'\nf : J → C\nc : Bicone f\ng : K ≃ J\nhc : IsBilimit c\n⊢ IsColimit (Cocone.whisker (Discrete.functor (Discrete.mk ∘ ↑g)) (toCocone c))\n[PROOFSTEP]\nexact IsColimit.whiskerEquivalence hc.isColimit (Discrete.equivalence g)\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nF✝ : J → C\nK : Type w'\ninst✝ : HasBiproductsOfShape K C\ne : J ≃ K\nF : J → C\nh : LimitBicone (F ∘ ↑e.symm)\nc : Bicone (F ∘ ↑e.symm)\nhc : Bicone.IsBilimit c\n⊢ LimitBicone F\n[PROOFSTEP]\nsimpa only [(· ∘ ·), e.symm_apply_apply] using LimitBicone.mk (c.whisker e) ((c.whiskerIsBilimitIff _).2 hc)\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nF : J → C\ninst✝¹ : HasFiniteBiproducts C\ninst✝ : Finite J\n⊢ HasBiproductsOfShape J C\n[PROOFSTEP]\nrcases Finite.exists_equiv_fin J with ⟨n, ⟨e⟩⟩\n[GOAL]\ncase intro.intro\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nF : J → C\ninst✝¹ : HasFiniteBiproducts C\ninst✝ : Finite J\nn : ℕ\ne : J ≃ Fin n\n⊢ HasBiproductsOfShape J C\n[PROOFSTEP]\nhaveI : HasBiproductsOfShape (Fin n) C := HasFiniteBiproducts.out n\n[GOAL]\ncase intro.intro\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nF : J → C\ninst✝¹ : HasFiniteBiproducts C\ninst✝ : Finite J\nn : ℕ\ne : J ≃ Fin n\nthis : HasBiproductsOfShape (Fin n) C\n⊢ HasBiproductsOfShape J C\n[PROOFSTEP]\nexact hasBiproductsOfShape_of_equiv C e\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : DecidableEq J\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\n⊢ ι f j ≫ π f j' = if h : j = j' then eqToHom (_ : f j = f j') else 0\n[PROOFSTEP]\nconvert (biproduct.bicone f).ι_π j j'\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : J\n⊢ ι f j ≫ π f j = 𝟙 (f j)\n[PROOFSTEP]\nsimp [biproduct.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\nh : j ≠ j'\n⊢ ι f j ≫ π f j' = 0\n[PROOFSTEP]\nsimp [biproduct.ι_π, h]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\nw : j = j'\n⊢ f j = f j'\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\nw : j = j'\n⊢ eqToHom (_ : f j = f j') ≫ ι f j' = ι f j\n[PROOFSTEP]\ncases w\n[GOAL]\ncase refl\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : J\n⊢ eqToHom (_ : f j = f j) ≫ ι f j = ι f j\n[PROOFSTEP]\nsimp\n  -- The `simpNF` linter incorrectly identifies these as simp lemmas that could never apply.\n  -- https://github.com/leanprover-community/mathlib4/issues/5049\n  -- They are used by `simp` in `biproduct.whisker_equiv` below.\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\nw : j = j'\n⊢ f j = f j'\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj j' : J\nw : j = j'\n⊢ π f j ≫ eqToHom (_ : f j = f j') = π f j'\n[PROOFSTEP]\ncases w\n[GOAL]\ncase refl\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : J\n⊢ π f j ≫ eqToHom (_ : f j = f j) = π f j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : Discrete J\n⊢ (isoProduct f).hom ≫ limit.π (Discrete.functor f) j = Pi.lift (π f) ≫ limit.π (Discrete.functor f) j\n[PROOFSTEP]\nsimp [biproduct.isoProduct]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : J\n⊢ (isoProduct f).inv ≫ π f j = lift (Pi.π f) ≫ π f j\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : Discrete J\n⊢ colimit.ι (Discrete.functor f) j ≫ (isoCoproduct f).inv = colimit.ι (Discrete.functor f) j ≫ Sigma.desc (ι f)\n[PROOFSTEP]\nsimp [biproduct.isoCoproduct]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nj : J\n⊢ ι f j ≫ (isoCoproduct f).hom = ι f j ≫ desc (Sigma.ι f)\n[PROOFSTEP]\nsimp [← Iso.eq_comp_inv]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\n⊢ map p = map' p\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\n⊢ ι (fun b => f b) j✝ ≫ map p ≫ π (fun b => g b) j✝¹ = ι (fun b => f b) j✝ ≫ map' p ≫ π (fun b => g b) j✝¹\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\n⊢ ι (fun b => f b) j✝ ≫ map p ≫ π (fun b => g b) j✝¹ = ι (fun b => f b) j✝ ≫ map' p ≫ π (fun b => g b) j✝¹\n[PROOFSTEP]\nsimp only [Discrete.natTrans_app, Limits.IsColimit.ι_map_assoc, Limits.IsLimit.map_π, Category.assoc, ←\n  Bicone.toCone_π_app_mk, ← biproduct.bicone_π, ← Bicone.toCocone_ι_app_mk, ← biproduct.bicone_ι]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\n⊢ NatTrans.app (Bicone.toCocone (bicone fun b => f b)).ι { as := j✝ } ≫\n      NatTrans.app (Bicone.toCone (bicone fun b => f b)).π { as := j✝¹ } ≫ p j✝¹ =\n    p j✝ ≫\n      NatTrans.app (Bicone.toCocone (bicone fun b => g b)).ι { as := j✝ } ≫\n        NatTrans.app (Bicone.toCone (bicone fun b => g b)).π { as := j✝¹ }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\n⊢ ι (fun b => f b) j✝ ≫ π (fun b => f b) j✝¹ ≫ p j✝¹ = p j✝ ≫ ι (fun b => g b) j✝ ≫ π (fun b => g b) j✝¹\n[PROOFSTEP]\nrw [biproduct.ι_π_assoc, biproduct.ι_π]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\n⊢ (if h : j✝ = j✝¹ then eqToHom (_ : f j✝ = f j✝¹) else 0) ≫ p j✝¹ =\n    p j✝ ≫ if h : j✝ = j✝¹ then eqToHom (_ : g j✝ = g j✝¹) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\nh : j✝ = j✝¹\n⊢ eqToHom (_ : f j✝ = f j✝¹) ≫ p j✝¹ = p j✝ ≫ eqToHom (_ : g j✝ = g j✝¹)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝ : J\n⊢ eqToHom (_ : f j✝ = f j✝) ≫ p j✝ = p j✝ ≫ eqToHom (_ : g j✝ = g j✝)\n[PROOFSTEP]\nrw [eqToHom_refl, Category.id_comp]\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝ : J\n⊢ p j✝ = p j✝ ≫ eqToHom (_ : g j✝ = g j✝)\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (b : J) → f b ⟶ g b\nj✝¹ j✝ : J\nh : ¬j✝ = j✝¹\n⊢ 0 ≫ p j✝¹ = p j✝ ≫ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (j : J) → f j ⟶ g j\nj : J\n⊢ ι f j ≫ map p = p j ≫ ι g j\n[PROOFSTEP]\nrw [biproduct.map_eq_map']\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (j : J) → f j ⟶ g j\nj : J\n⊢ ι f j ≫ map' p = p j ≫ ι g j\n[PROOFSTEP]\napply\n  Limits.IsColimit.ι_map (biproduct.isColimit f) (biproduct.bicone g).toCocone (Discrete.natTrans fun j => p j.as)\n    (Discrete.mk j)\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (j : J) → f j ⟶ g j\nP : C\nk : (j : J) → g j ⟶ P\n⊢ map p ≫ desc k = desc fun j => p j ≫ k j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\np : (j : J) → f j ⟶ g j\nP : C\nk : (j : J) → g j ⟶ P\nj✝ : J\n⊢ ι (fun b => f b) j✝ ≫ map p ≫ desc k = ι (fun b => f b) j✝ ≫ desc fun j => p j ≫ k j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nP : C\nk : (j : J) → P ⟶ f j\np : (j : J) → f j ⟶ g j\n⊢ lift k ≫ map p = lift fun j => k j ≫ p j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf g : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nP : C\nk : (j : J) → P ⟶ f j\np : (j : J) → f j ⟶ g j\nj✝ : J\n⊢ (lift k ≫ map p) ≫ π (fun b => g b) j✝ = (lift fun j => k j ≫ p j) ≫ π (fun b => g b) j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type ?u.108203\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\n⊢ g k = g (↑e (↑e.symm k))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type ?u.124125\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\n⊢ g (↑e (↑e.symm k)) = g k\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\n⊢ (whisker_equiv e w).hom = lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)\n[PROOFSTEP]\nsimp only [whisker_equiv_hom]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\n⊢ (desc fun j => (w j).inv ≫ ι g (↑e j)) =\n    lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)\n[PROOFSTEP]\next k j\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\n⊢ ι (fun j => f j) j ≫ (desc fun j => (w j).inv ≫ ι g (↑e j)) ≫ π g k =\n    ι (fun j => f j) j ≫\n      (lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)) ≫ π g k\n[PROOFSTEP]\nby_cases h : k = e j\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : k = ↑e j\n⊢ ι (fun j => f j) j ≫ (desc fun j => (w j).inv ≫ ι g (↑e j)) ≫ π g k =\n    ι (fun j => f j) j ≫\n      (lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)) ≫ π g k\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\n⊢ ι (fun j => f j) j ≫ (desc fun j => (w j).inv ≫ ι g (↑e j)) ≫ π g (↑e j) =\n    ι (fun j => f j) j ≫\n      (lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)) ≫ π g (↑e j)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : ¬k = ↑e j\n⊢ ι (fun j => f j) j ≫ (desc fun j => (w j).inv ≫ ι g (↑e j)) ≫ π g k =\n    ι (fun j => f j) j ≫\n      (lift fun k => π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)) ≫ π g k\n[PROOFSTEP]\nsimp only [ι_desc_assoc, Category.assoc, ne_eq, lift_π]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : ¬k = ↑e j\n⊢ (w j).inv ≫ ι g (↑e j) ≫ π g k =\n    ι (fun j => f j) j ≫ π f (↑e.symm k) ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)\n[PROOFSTEP]\nrw [biproduct.ι_π_ne, biproduct.ι_π_ne_assoc]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : ¬k = ↑e j\n⊢ (w j).inv ≫ 0 = 0 ≫ (w (↑e.symm k)).inv ≫ eqToHom (_ : g (↑e (↑e.symm k)) = g k)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : ¬k = ↑e j\n⊢ j ≠ ↑e.symm k\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nh : ¬k = ↑e (↑e.symm k)\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nj : J\nh : ¬k = ↑e j\n⊢ ↑e j ≠ k\n[PROOFSTEP]\nexact Ne.symm h\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\n⊢ (whisker_equiv e w).inv = lift fun j => π g (↑e j) ≫ (w j).hom\n[PROOFSTEP]\nsimp only [whisker_equiv_inv]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\n⊢ (desc fun k => eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k)) =\n    lift fun j => π g (↑e j) ≫ (w j).hom\n[PROOFSTEP]\next j k\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\n⊢ ι g k ≫\n      (desc fun k => eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k)) ≫\n        π (fun j => f j) j =\n    ι g k ≫ (lift fun j => π g (↑e j) ≫ (w j).hom) ≫ π (fun j => f j) j\n[PROOFSTEP]\nby_cases h : k = e j\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : k = ↑e j\n⊢ ι g k ≫\n      (desc fun k => eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k)) ≫\n        π (fun j => f j) j =\n    ι g k ≫ (lift fun j => π g (↑e j) ≫ (w j).hom) ≫ π (fun j => f j) j\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\n⊢ ι g (↑e j) ≫\n      (desc fun k => eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k)) ≫\n        π (fun j => f j) j =\n    ι g (↑e j) ≫ (lift fun j => π g (↑e j) ≫ (w j).hom) ≫ π (fun j => f j) j\n[PROOFSTEP]\nsimp only [ι_desc_assoc, ← eqToHom_iso_hom_naturality_assoc w (e.symm_apply_apply j).symm, Equiv.symm_apply_apply,\n  eqToHom_comp_ι, Category.assoc, bicone_ι_π_self, Category.comp_id, lift_π, bicone_ι_π_self_assoc]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : ¬k = ↑e j\n⊢ ι g k ≫\n      (desc fun k => eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k)) ≫\n        π (fun j => f j) j =\n    ι g k ≫ (lift fun j => π g (↑e j) ≫ (w j).hom) ≫ π (fun j => f j) j\n[PROOFSTEP]\nsimp only [ι_desc_assoc, Category.assoc, ne_eq, lift_π]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : ¬k = ↑e j\n⊢ eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ ι (fun j => f j) (↑e.symm k) ≫ π (fun j => f j) j =\n    ι g k ≫ π g (↑e j) ≫ (w j).hom\n[PROOFSTEP]\nrw [biproduct.ι_π_ne, biproduct.ι_π_ne_assoc]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : ¬k = ↑e j\n⊢ eqToHom (_ : g k = g (↑e (↑e.symm k))) ≫ (w (↑e.symm k)).hom ≫ 0 = 0 ≫ (w j).hom\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : ¬k = ↑e j\n⊢ k ≠ ↑e j\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nj : J\nk : K\nh : ¬k = ↑e j\n⊢ ↑e.symm k ≠ j\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase neg.h\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type u_1\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct g\nk : K\nh : ¬k = ↑e (↑e.symm k)\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    if h : { fst := j, snd := x } = { fst := j', snd := y } then\n      eqToHom\n        (_ :\n          g { fst := j, snd := x }.fst { fst := j, snd := x }.snd =\n            g { fst := j', snd := y }.fst { fst := j', snd := y }.snd)\n    else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\nh : { fst := j, snd := x } = { fst := j', snd := y }\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    eqToHom\n      (_ :\n        g { fst := j, snd := x }.fst { fst := j, snd := x }.snd =\n          g { fst := j', snd := y }.fst { fst := j', snd := y }.snd)\n[PROOFSTEP]\nobtain ⟨rfl, rfl⟩ := h\n[GOAL]\ncase pos.refl\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j, snd := x } =\n    eqToHom\n      (_ :\n        g { fst := j, snd := x }.fst { fst := j, snd := x }.snd =\n          g { fst := j, snd := x }.fst { fst := j, snd := x }.snd)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\nh : ¬{ fst := j, snd := x } = { fst := j', snd := y }\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    0\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\nh : j = j' → ¬HEq x y\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    0\n[PROOFSTEP]\nby_cases w : j = j'\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\nh : j = j' → ¬HEq x y\nw : j = j'\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    0\n[PROOFSTEP]\ncases w\n[GOAL]\ncase pos.refl\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx y : f j\nh : j = j → ¬HEq x y\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j, snd := y } =\n    0\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase pos.refl\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx y : f j\nh : ¬x = y\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j, snd := y } =\n    0\n[PROOFSTEP]\nsimp [biproduct.ι_π_ne _ h]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nι : Type ?u.135486\nf : ι → Type u_1\ng : (i : ι) → f i → C\ninst✝¹ : ∀ (i : ι), HasBiproduct (g i)\ninst✝ : HasBiproduct fun i => ⨁ g i\nx✝¹ x✝ : (i : ι) × f i\nj : ι\nx : f j\nj' : ι\ny : f j'\nh : j = j' → ¬HEq x y\nw : ¬j = j'\n⊢ (fun X => biproduct.ι (g X.fst) X.snd ≫ biproduct.ι (fun i => ⨁ g i) X.fst) { fst := j, snd := x } ≫\n      (fun X => biproduct.π (fun i => ⨁ g i) X.fst ≫ biproduct.π (g X.fst) X.snd) { fst := j', snd := y } =\n    0\n[PROOFSTEP]\nsimp [biproduct.ι_π_ne_assoc _ w]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\n⊢ fromSubtype f p ≫ π f j = if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\next i\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\n⊢ ι (Subtype.restrict p f) i ≫ fromSubtype f p ≫ π f j =\n    ι (Subtype.restrict p f) i ≫ if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\n⊢ ι (Subtype.restrict p f) i ≫ fromSubtype f p ≫ π f j =\n    ι (Subtype.restrict p f) i ≫ if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\nrw [biproduct.fromSubtype, biproduct.ι_desc_assoc, biproduct.ι_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\n⊢ (if h : ↑i = j then eqToHom (_ : f ↑i = f j) else 0) =\n    ι (Subtype.restrict p f) i ≫ if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\nby_cases h : p j\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\n⊢ (if h : ↑i = j then eqToHom (_ : f ↑i = f j) else 0) =\n    ι (Subtype.restrict p f) i ≫ if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\nrw [dif_pos h, biproduct.ι_π]\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\n⊢ (if h : ↑i = j then eqToHom (_ : f ↑i = f j) else 0) =\n    if h_1 : i = { val := j, property := h } then\n      eqToHom (_ : Subtype.restrict p f i = Subtype.restrict p f { val := j, property := h })\n    else 0\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ↑i = j\nh₂ : i = { val := j, property := h }\n⊢ eqToHom (_ : f ↑i = f j) = eqToHom (_ : Subtype.restrict p f i = Subtype.restrict p f { val := j, property := h })\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ↑i = j\nh₂ : ¬i = { val := j, property := h }\n⊢ eqToHom (_ : f ↑i = f j) = 0\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ¬↑i = j\nh₂ : i = { val := j, property := h }\n⊢ 0 = eqToHom (_ : Subtype.restrict p f i = Subtype.restrict p f { val := j, property := h })\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ¬↑i = j\nh₂ : ¬i = { val := j, property := h }\n⊢ 0 = 0\n[PROOFSTEP]\nexacts [rfl, False.elim (h₂ (Subtype.ext h₁)), False.elim (h₁ (congr_arg Subtype.val h₂)), rfl]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : ¬p j\n⊢ (if h : ↑i = j then eqToHom (_ : f ↑i = f j) else 0) =\n    ι (Subtype.restrict p f) i ≫ if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\nrw [dif_neg h, dif_neg (show (i : J) ≠ j from fun h₂ => h (h₂ ▸ i.2)), comp_zero]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\n⊢ ∀ (j : J),\n    fromSubtype f p ≫ π f j =\n      (lift fun j => if h : p j then π (Subtype.restrict p f) { val := j, property := h } else 0) ≫ π f j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj : Subtype p\n⊢ fromSubtype f p ≫ π f ↑j = π (Subtype.restrict p f) j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\n⊢ ι (Subtype.restrict p f) j✝ ≫ fromSubtype f p ≫ π f ↑j = ι (Subtype.restrict p f) j✝ ≫ π (Subtype.restrict p f) j\n[PROOFSTEP]\nrw [biproduct.fromSubtype, biproduct.ι_desc_assoc, biproduct.ι_π, biproduct.ι_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\n⊢ (if h : ↑j✝ = ↑j then eqToHom (_ : f ↑j✝ = f ↑j) else 0) =\n    if h : j✝ = j then eqToHom (_ : Subtype.restrict p f j✝ = Subtype.restrict p f j) else 0\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ↑j✝ = ↑j\nh₂ : j✝ = j\n⊢ eqToHom (_ : f ↑j✝ = f ↑j) = eqToHom (_ : Subtype.restrict p f j✝ = Subtype.restrict p f j)\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ↑j✝ = ↑j\nh₂ : ¬j✝ = j\n⊢ eqToHom (_ : f ↑j✝ = f ↑j) = 0\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ¬↑j✝ = ↑j\nh₂ : j✝ = j\n⊢ 0 = eqToHom (_ : Subtype.restrict p f j✝ = Subtype.restrict p f j)\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ¬↑j✝ = ↑j\nh₂ : ¬j✝ = j\n⊢ 0 = 0\n[PROOFSTEP]\nexacts [rfl, False.elim (h₂ (Subtype.ext h₁)), False.elim (h₁ (congr_arg Subtype.val h₂)), rfl]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\n⊢ ι f j ≫ toSubtype f p = if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\next i\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\n⊢ (ι f j ≫ toSubtype f p) ≫ π (Subtype.restrict p f) i =\n    (if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0) ≫ π (Subtype.restrict p f) i\n[PROOFSTEP]\nrw [biproduct.toSubtype, Category.assoc, biproduct.lift_π, biproduct.ι_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\n⊢ (if h : j = ↑i then eqToHom (_ : f j = f ↑i) else 0) =\n    (if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0) ≫ π (Subtype.restrict p f) i\n[PROOFSTEP]\nby_cases h : p j\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\n⊢ (if h : j = ↑i then eqToHom (_ : f j = f ↑i) else 0) =\n    (if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0) ≫ π (Subtype.restrict p f) i\n[PROOFSTEP]\nrw [dif_pos h, biproduct.ι_π]\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\n⊢ (if h : j = ↑i then eqToHom (_ : f j = f ↑i) else 0) =\n    if h_1 : { val := j, property := h } = i then\n      eqToHom (_ : Subtype.restrict p f { val := j, property := h } = Subtype.restrict p f i)\n    else 0\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : j = ↑i\nh₂ : { val := j, property := h } = i\n⊢ eqToHom (_ : f j = f ↑i) = eqToHom (_ : Subtype.restrict p f { val := j, property := h } = Subtype.restrict p f i)\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : j = ↑i\nh₂ : ¬{ val := j, property := h } = i\n⊢ eqToHom (_ : f j = f ↑i) = 0\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ¬j = ↑i\nh₂ : { val := j, property := h } = i\n⊢ 0 = eqToHom (_ : Subtype.restrict p f { val := j, property := h } = Subtype.restrict p f i)\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : p j\nh₁ : ¬j = ↑i\nh₂ : ¬{ val := j, property := h } = i\n⊢ 0 = 0\n[PROOFSTEP]\nexacts [rfl, False.elim (h₂ (Subtype.ext h₁)), False.elim (h₁ (congr_arg Subtype.val h₂)), rfl]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\nj : J\ni : Subtype p\nh : ¬p j\n⊢ (if h : j = ↑i then eqToHom (_ : f j = f ↑i) else 0) =\n    (if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0) ≫ π (Subtype.restrict p f) i\n[PROOFSTEP]\nrw [dif_neg h, dif_neg (show j ≠ i from fun h₂ => h (h₂.symm ▸ i.2)), zero_comp]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\n⊢ ∀ (j : J),\n    ι f j ≫ toSubtype f p =\n      ι f j ≫ desc fun j => if h : p j then ι (Subtype.restrict p f) { val := j, property := h } else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj : Subtype p\n⊢ ι f ↑j ≫ toSubtype f p = ι (Subtype.restrict p f) j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\n⊢ (ι f ↑j ≫ toSubtype f p) ≫ π (Subtype.restrict p f) j✝ = ι (Subtype.restrict p f) j ≫ π (Subtype.restrict p f) j✝\n[PROOFSTEP]\nrw [biproduct.toSubtype, Category.assoc, biproduct.lift_π, biproduct.ι_π, biproduct.ι_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\n⊢ (if h : ↑j = ↑j✝ then eqToHom (_ : f ↑j = f ↑j✝) else 0) =\n    if h : j = j✝ then eqToHom (_ : Subtype.restrict p f j = Subtype.restrict p f j✝) else 0\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ↑j = ↑j✝\nh₂ : j = j✝\n⊢ eqToHom (_ : f ↑j = f ↑j✝) = eqToHom (_ : Subtype.restrict p f j = Subtype.restrict p f j✝)\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ↑j = ↑j✝\nh₂ : ¬j = j✝\n⊢ eqToHom (_ : f ↑j = f ↑j✝) = 0\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ¬↑j = ↑j✝\nh₂ : j = j✝\n⊢ 0 = eqToHom (_ : Subtype.restrict p f j = Subtype.restrict p f j✝)\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj j✝ : Subtype p\nh₁ : ¬↑j = ↑j✝\nh₂ : ¬j = j✝\n⊢ 0 = 0\n[PROOFSTEP]\nexacts [rfl, False.elim (h₂ (Subtype.ext h₁)), False.elim (h₁ (congr_arg Subtype.val h₂)), rfl]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\n⊢ fromSubtype f p ≫ toSubtype f p = 𝟙 (⨁ Subtype.restrict p f)\n[PROOFSTEP]\nrefine' biproduct.hom_ext _ _ fun j => _\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ninst✝¹ : HasBiproduct f\np : J → Prop\ninst✝ : HasBiproduct (Subtype.restrict p f)\nj : Subtype p\n⊢ (fromSubtype f p ≫ toSubtype f p) ≫ π (Subtype.restrict p f) j =\n    𝟙 (⨁ Subtype.restrict p f) ≫ π (Subtype.restrict p f) j\n[PROOFSTEP]\nrw [Category.assoc, biproduct.toSubtype_π, biproduct.fromSubtype_π_subtype, Category.id_comp]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\n⊢ toSubtype f p ≫ fromSubtype f p = map fun j => if p j then 𝟙 (f j) else 0\n[PROOFSTEP]\next1 i\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\ni : J\n⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i\n[PROOFSTEP]\nby_cases h : p i\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\ni : J\nh : p i\n⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\nf : J → C\ninst✝² : HasBiproduct f\np : J → Prop\ninst✝¹ : HasBiproduct (Subtype.restrict p f)\ninst✝ : DecidablePred p\ni : J\nh : ¬p i\n⊢ (toSubtype f p ≫ fromSubtype f p) ≫ π f i = (map fun j => if p j then 𝟙 (f j) else 0) ≫ π f i\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\n⊢ (fromSubtype f fun j => j ≠ i) ≫ π f i = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\n⊢ (Fork.ι s ≫ toSubtype f fun j => j ≠ i) ≫\n      Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)) =\n    Fork.ι s\n[PROOFSTEP]\napply biproduct.hom_ext\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\n⊢ ∀ (j : J),\n    ((Fork.ι s ≫ toSubtype f fun j => j ≠ i) ≫\n          Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0))) ≫\n        π f j =\n      Fork.ι s ≫ π f j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\nj : J\n⊢ ((Fork.ι s ≫ toSubtype f fun j => j ≠ i) ≫\n        Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0))) ≫\n      π f j =\n    Fork.ι s ≫ π f j\n[PROOFSTEP]\nrw [KernelFork.ι_ofι, Category.assoc, Category.assoc, biproduct.toSubtype_fromSubtype_assoc, biproduct.map_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\nj : J\n⊢ (Fork.ι s ≫ π (fun j => f j) j ≫ if j ≠ i then 𝟙 (f j) else 0) = Fork.ι s ≫ π f j\n[PROOFSTEP]\nrcases Classical.em (i = j) with (rfl | h)\n[GOAL]\ncase w.inl\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\n⊢ (Fork.ι s ≫ π (fun j => f j) i ≫ if i ≠ i then 𝟙 (f i) else 0) = Fork.ι s ≫ π f i\n[PROOFSTEP]\nrw [if_neg (Classical.not_not.2 rfl), comp_zero, comp_zero, KernelFork.condition]\n[GOAL]\ncase w.inr\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\nj : J\nh : ¬i = j\n⊢ (Fork.ι s ≫ π (fun j => f j) j ≫ if j ≠ i then 𝟙 (f j) else 0) = Fork.ι s ≫ π f j\n[PROOFSTEP]\nrw [if_pos (Ne.symm h), Category.comp_id]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\n⊢ ∀\n    {m :\n      ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n        ((const WalkingParallelPair).obj\n              (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)).pt).obj\n          WalkingParallelPair.zero},\n    m ≫ Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)) =\n        Fork.ι s →\n      m = Fork.ι s ≫ toSubtype f fun j => j ≠ i\n[PROOFSTEP]\nintro m hm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\nm :\n  ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((const WalkingParallelPair).obj\n          (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)).pt).obj\n      WalkingParallelPair.zero\nhm :\n  m ≫ Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)) =\n    Fork.ι s\n⊢ m = Fork.ι s ≫ toSubtype f fun j => j ≠ i\n[PROOFSTEP]\nrw [← hm, KernelFork.ι_ofι, Category.assoc, biproduct.fromSubtype_toSubtype]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Fork (π f i) 0\nm :\n  ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((const WalkingParallelPair).obj\n          (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)).pt).obj\n      WalkingParallelPair.zero\nhm :\n  m ≫ Fork.ι (KernelFork.ofι (fromSubtype f fun j => j ≠ i) (_ : (fromSubtype f fun j => ¬j = i) ≫ π f i = 0)) =\n    Fork.ι s\n⊢ m = m ≫ 𝟙 (⨁ Subtype.restrict (fun j => j ≠ i) f)\n[PROOFSTEP]\nexact (Category.comp_id _).symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\n⊢ (ι f i ≫ toSubtype f fun j => j ≠ i) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\n⊢ Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫\n      (fromSubtype f fun j => j ≠ i) ≫ Cofork.π s =\n    Cofork.π s\n[PROOFSTEP]\napply biproduct.hom_ext'\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\n⊢ ∀ (j : J),\n    ι f j ≫\n        Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫\n          (fromSubtype f fun j => j ≠ i) ≫ Cofork.π s =\n      ι f j ≫ Cofork.π s\n[PROOFSTEP]\nintro j\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\nj : J\n⊢ ι f j ≫\n      Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫\n        (fromSubtype f fun j => j ≠ i) ≫ Cofork.π s =\n    ι f j ≫ Cofork.π s\n[PROOFSTEP]\nrw [CokernelCofork.π_ofπ, biproduct.toSubtype_fromSubtype_assoc, biproduct.ι_map_assoc]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\nj : J\n⊢ (if j ≠ i then 𝟙 (f j) else 0) ≫ ι (fun j => f j) j ≫ Cofork.π s = ι f j ≫ Cofork.π s\n[PROOFSTEP]\nrcases Classical.em (i = j) with (rfl | h)\n[GOAL]\ncase w.inl\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\n⊢ (if i ≠ i then 𝟙 (f i) else 0) ≫ ι (fun j => f j) i ≫ Cofork.π s = ι f i ≫ Cofork.π s\n[PROOFSTEP]\nrw [if_neg (Classical.not_not.2 rfl), zero_comp, CokernelCofork.condition]\n[GOAL]\ncase w.inr\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\nj : J\nh : ¬i = j\n⊢ (if j ≠ i then 𝟙 (f j) else 0) ≫ ι (fun j => f j) j ≫ Cofork.π s = ι f j ≫ Cofork.π s\n[PROOFSTEP]\nrw [if_pos (Ne.symm h), Category.id_comp]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\n⊢ ∀\n    {m :\n      ((const WalkingParallelPair).obj\n              (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)).pt).obj\n          WalkingParallelPair.one ⟶\n        ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one},\n    Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫ m =\n        Cofork.π s →\n      m = (fromSubtype f fun j => j ≠ i) ≫ Cofork.π s\n[PROOFSTEP]\nintro m hm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\nm :\n  ((const WalkingParallelPair).obj\n          (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm :\n  Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫ m =\n    Cofork.π s\n⊢ m = (fromSubtype f fun j => j ≠ i) ≫ Cofork.π s\n[PROOFSTEP]\nrw [← hm, CokernelCofork.π_ofπ, ← Category.assoc, biproduct.fromSubtype_toSubtype]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nf : J → C\ni : J\ninst✝¹ : HasBiproduct f\ninst✝ : HasBiproduct (Subtype.restrict (fun j => j ≠ i) f)\ns : Cofork (ι f i) 0\nm :\n  ((const WalkingParallelPair).obj\n          (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)).pt).obj\n      WalkingParallelPair.one ⟶\n    ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm :\n  Cofork.π (CokernelCofork.ofπ (toSubtype f fun j => j ≠ i) (_ : (ι f i ≫ toSubtype f fun j => ¬j = i) = 0)) ≫ m =\n    Cofork.π s\n⊢ m = 𝟙 (⨁ Subtype.restrict (fun j => j ≠ i) f) ≫ m\n[PROOFSTEP]\nexact (Category.id_comp _).symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ biproduct.fromSubtype f pᶜ ≫ biproduct.toSubtype f p = 0\n[PROOFSTEP]\next j k\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype p\nk : Subtype pᶜ\n⊢ biproduct.ι (Subtype.restrict pᶜ f) k ≫\n      (biproduct.fromSubtype f pᶜ ≫ biproduct.toSubtype f p) ≫ biproduct.π (Subtype.restrict p f) j =\n    biproduct.ι (Subtype.restrict pᶜ f) k ≫ 0 ≫ biproduct.π (Subtype.restrict p f) j\n[PROOFSTEP]\nsimp only [Category.assoc, biproduct.ι_fromSubtype_assoc, biproduct.ι_toSubtype_assoc, comp_zero, zero_comp]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype p\nk : Subtype pᶜ\n⊢ (if h : p ↑k then biproduct.ι (Subtype.restrict p f) { val := ↑k, property := h } else 0) ≫\n      biproduct.π (Subtype.restrict p f) j =\n    0\n[PROOFSTEP]\nerw [dif_neg k.2]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype p\nk : Subtype pᶜ\n⊢ 0 ≫ biproduct.π (Subtype.restrict p f) j = 0\n[PROOFSTEP]\nsimp only [zero_comp]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ ∀ {W' : C} (g' : W' ⟶ ⨁ f) (eq' : g' ≫ biproduct.toSubtype f p = 0),\n    (fun {W} g x => g ≫ biproduct.toSubtype f pᶜ) g' eq' ≫ biproduct.fromSubtype f pᶜ = g'\n[PROOFSTEP]\nintro W' g' w\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nw : g' ≫ biproduct.toSubtype f p = 0\n⊢ (fun {W} g x => g ≫ biproduct.toSubtype f pᶜ) g' w ≫ biproduct.fromSubtype f pᶜ = g'\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nw : g' ≫ biproduct.toSubtype f p = 0\nj : K\n⊢ ((fun {W} g x => g ≫ biproduct.toSubtype f pᶜ) g' w ≫ biproduct.fromSubtype f pᶜ) ≫ biproduct.π f j =\n    g' ≫ biproduct.π f j\n[PROOFSTEP]\nsimp only [Category.assoc, biproduct.toSubtype_fromSubtype, Pi.compl_apply, biproduct.map_π]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nw : g' ≫ biproduct.toSubtype f p = 0\nj : K\n⊢ (g' ≫ biproduct.π (fun b => f b) j ≫ if (p j)ᶜ then 𝟙 (f j) else 0) = g' ≫ biproduct.π f j\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nw : g' ≫ biproduct.toSubtype f p = 0\nj : K\nh : (p j)ᶜ\n⊢ g' ≫ biproduct.π (fun b => f b) j ≫ 𝟙 (f j) = g' ≫ biproduct.π f j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nw : g' ≫ biproduct.toSubtype f p = 0\nj : K\nh : ¬(p j)ᶜ\n⊢ g' ≫ biproduct.π (fun b => f b) j ≫ 0 = g' ≫ biproduct.π f j\n[PROOFSTEP]\nreplace w := w =≫ biproduct.π _ ⟨j, not_not.mp h⟩\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW' : C\ng' : W' ⟶ ⨁ f\nj : K\nh : ¬(p j)ᶜ\nw :\n  (g' ≫ biproduct.toSubtype f p) ≫ biproduct.π (Subtype.restrict p f) { val := j, property := (_ : p j) } =\n    0 ≫ biproduct.π (Subtype.restrict p f) { val := j, property := (_ : p j) }\n⊢ g' ≫ biproduct.π (fun b => f b) j ≫ 0 = g' ≫ biproduct.π f j\n[PROOFSTEP]\nsimpa using w.symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ ∀ {W' : C} (g' : W' ⟶ ⨁ f) (eq' : g' ≫ biproduct.toSubtype f p = 0) (m : W' ⟶ ⨁ Subtype.restrict pᶜ f),\n    m ≫ biproduct.fromSubtype f pᶜ = g' → m = (fun {W} g x => g ≫ biproduct.toSubtype f pᶜ) g' eq'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ biproduct.fromSubtype f p ≫ biproduct.toSubtype f pᶜ = 0\n[PROOFSTEP]\next j k\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype pᶜ\nk : Subtype p\n⊢ biproduct.ι (Subtype.restrict p f) k ≫\n      (biproduct.fromSubtype f p ≫ biproduct.toSubtype f pᶜ) ≫ biproduct.π (Subtype.restrict pᶜ f) j =\n    biproduct.ι (Subtype.restrict p f) k ≫ 0 ≫ biproduct.π (Subtype.restrict pᶜ f) j\n[PROOFSTEP]\nsimp only [Category.assoc, Pi.compl_apply, biproduct.ι_fromSubtype_assoc, biproduct.ι_toSubtype_assoc, comp_zero,\n  zero_comp]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype pᶜ\nk : Subtype p\n⊢ (if h : (p ↑k)ᶜ then biproduct.ι (Subtype.restrict pᶜ f) { val := ↑k, property := (_ : (p ↑k)ᶜ) } else 0) ≫\n      biproduct.π (Subtype.restrict pᶜ f) j =\n    0\n[PROOFSTEP]\nrw [dif_neg]\n[GOAL]\ncase w.w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype pᶜ\nk : Subtype p\n⊢ 0 ≫ biproduct.π (Subtype.restrict pᶜ f) j = 0\ncase w.w.hnc\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype pᶜ\nk : Subtype p\n⊢ ¬(p ↑k)ᶜ\n[PROOFSTEP]\nsimp only [zero_comp]\n[GOAL]\ncase w.w.hnc\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nj : Subtype pᶜ\nk : Subtype p\n⊢ ¬(p ↑k)ᶜ\n[PROOFSTEP]\nexact not_not.mpr k.2\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ ∀ {Z' : C} (g' : ⨁ f ⟶ Z') (eq' : biproduct.fromSubtype f p ≫ g' = 0),\n    biproduct.toSubtype f pᶜ ≫ (fun {W} g x => biproduct.fromSubtype f pᶜ ≫ g) g' eq' = g'\n[PROOFSTEP]\nintro W g' w\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nw : biproduct.fromSubtype f p ≫ g' = 0\n⊢ biproduct.toSubtype f pᶜ ≫ (fun {W} g x => biproduct.fromSubtype f pᶜ ≫ g) g' w = g'\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nw : biproduct.fromSubtype f p ≫ g' = 0\nj : K\n⊢ biproduct.ι f j ≫ biproduct.toSubtype f pᶜ ≫ (fun {W} g x => biproduct.fromSubtype f pᶜ ≫ g) g' w =\n    biproduct.ι f j ≫ g'\n[PROOFSTEP]\nsimp only [biproduct.toSubtype_fromSubtype_assoc, Pi.compl_apply, biproduct.ι_map_assoc]\n[GOAL]\ncase w\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nw : biproduct.fromSubtype f p ≫ g' = 0\nj : K\n⊢ (if (p j)ᶜ then 𝟙 (f j) else 0) ≫ biproduct.ι (fun b => f b) j ≫ g' = biproduct.ι f j ≫ g'\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nw : biproduct.fromSubtype f p ≫ g' = 0\nj : K\nh : (p j)ᶜ\n⊢ 𝟙 (f j) ≫ biproduct.ι (fun b => f b) j ≫ g' = biproduct.ι f j ≫ g'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nw : biproduct.fromSubtype f p ≫ g' = 0\nj : K\nh : ¬(p j)ᶜ\n⊢ 0 ≫ biproduct.ι (fun b => f b) j ≫ g' = biproduct.ι f j ≫ g'\n[PROOFSTEP]\nreplace w := biproduct.ι _ (⟨j, not_not.mp h⟩ : p) ≫= w\n[GOAL]\ncase neg\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\nW : C\ng' : ⨁ f ⟶ W\nj : K\nh : ¬(p j)ᶜ\nw :\n  biproduct.ι (Subtype.restrict p f) { val := j, property := (_ : j ∈ p) } ≫ biproduct.fromSubtype f p ≫ g' =\n    biproduct.ι (Subtype.restrict p f) { val := j, property := (_ : j ∈ p) } ≫ 0\n⊢ 0 ≫ biproduct.ι (fun b => f b) j ≫ g' = biproduct.ι f j ≫ g'\n[PROOFSTEP]\nsimpa using w.symm\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nK : Type\ninst✝¹ : Fintype K\ninst✝ : HasFiniteBiproducts C\nf : K → C\np : Set K\n⊢ ∀ {Z' : C} (g' : ⨁ f ⟶ Z') (eq' : biproduct.fromSubtype f p ≫ g' = 0) (m : ⨁ Subtype.restrict pᶜ f ⟶ Z'),\n    biproduct.toSubtype f pᶜ ≫ m = g' → m = (fun {W} g x => biproduct.fromSubtype f pᶜ ≫ g) g' eq'\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nk : K\n⊢ matrix m ≫ π g k = desc fun j => m j k\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nk : K\nj✝ : J\n⊢ ι (fun j => f j) j✝ ≫ matrix m ≫ π g k = ι (fun j => f j) j✝ ≫ desc fun j => m j k\n[PROOFSTEP]\nsimp [biproduct.matrix]\n[GOAL]\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nj : J\n⊢ ι f j ≫ matrix m = lift fun k => m j k\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nj : J\nj✝ : K\n⊢ (ι f j ≫ matrix m) ≫ π (fun k => g k) j✝ = (lift fun k => m j k) ≫ π (fun k => g k) j✝\n[PROOFSTEP]\nsimp [biproduct.matrix]\n[GOAL]\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nj : J\nk : K\n⊢ components (matrix m) j k = m j k\n[PROOFSTEP]\nsimp [biproduct.components]\n[GOAL]\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : ⨁ f ⟶ ⨁ g\n⊢ (matrix fun j k => components m j k) = m\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : ⨁ f ⟶ ⨁ g\nj✝¹ : K\nj✝ : J\n⊢ ι (fun j => f j) j✝ ≫ (matrix fun j k => components m j k) ≫ π (fun k => g k) j✝¹ =\n    ι (fun j => f j) j✝ ≫ m ≫ π (fun k => g k) j✝¹\n[PROOFSTEP]\nsimp [biproduct.components]\n[GOAL]\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\n⊢ components (matrix m) = m\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nJ : Type\ninst✝⁴ : Fintype J\nK : Type\ninst✝³ : Fintype K\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nf : J → C\ng : K → C\nm : (j : J) → (k : K) → f j ⟶ g k\nx✝¹ : J\nx✝ : K\n⊢ components (matrix m) x✝¹ x✝ = m x✝¹ x✝\n[PROOFSTEP]\napply biproduct.matrix_components\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nb : Bicone f\nhb : Bicone.IsBilimit b\n⊢ (IsLimit.conePointUniqueUpToIso hb.isLimit (isLimit f)).inv = desc b.ι\n[PROOFSTEP]\nrefine' biproduct.hom_ext' _ _ fun j => hb.isLimit.hom_ext fun j' => _\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nb : Bicone f\nhb : Bicone.IsBilimit b\nj : J\nj' : Discrete J\n⊢ (ι f j ≫ (IsLimit.conePointUniqueUpToIso hb.isLimit (isLimit f)).inv) ≫ NatTrans.app (Bicone.toCone b).π j' =\n    (ι f j ≫ desc b.ι) ≫ NatTrans.app (Bicone.toCone b).π j'\n[PROOFSTEP]\nrw [Category.assoc, IsLimit.conePointUniqueUpToIso_inv_comp, Bicone.toCone_π_app, biproduct.bicone_π, biproduct.ι_desc,\n  biproduct.ι_π, b.toCone_π_app, b.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nb : Bicone f\nhb : Bicone.IsBilimit b\n⊢ lift b.π ≫ desc b.ι = 𝟙 b.pt\n[PROOFSTEP]\nrw [← biproduct.conePointUniqueUpToIso_hom f hb, ← biproduct.conePointUniqueUpToIso_inv f hb, Iso.hom_inv_id]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nf : J → C\ninst✝ : HasBiproduct f\nb : Bicone f\nhb : Bicone.IsBilimit b\n⊢ desc b.ι ≫ lift b.π = 𝟙 (⨁ f)\n[PROOFSTEP]\nrw [← biproduct.conePointUniqueUpToIso_hom f hb, ← biproduct.conePointUniqueUpToIso_inv f hb, Iso.inv_hom_id]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\n⊢ HasZeroObject C\n[PROOFSTEP]\nrefine' ⟨⟨biproduct Empty.elim, fun X => ⟨⟨⟨0⟩, _⟩⟩, fun X => ⟨⟨⟨0⟩, _⟩⟩⟩⟩\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\n⊢ ∀ (a : ⨁ Empty.elim ⟶ X), a = default\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\na : ⨁ Empty.elim ⟶ X\n⊢ a = default\n[PROOFSTEP]\napply biproduct.hom_ext'\n[GOAL]\ncase refine'_1.w\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\na : ⨁ Empty.elim ⟶ X\n⊢ ∀ (j : Empty), biproduct.ι Empty.elim j ≫ a = biproduct.ι Empty.elim j ≫ default\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\n⊢ ∀ (a : X ⟶ ⨁ Empty.elim), a = default\n[PROOFSTEP]\nintro a\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\na : X ⟶ ⨁ Empty.elim\n⊢ a = default\n[PROOFSTEP]\napply biproduct.hom_ext\n[GOAL]\ncase refine'_2.w\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : HasFiniteBiproducts C\nX : C\na : X ⟶ ⨁ Empty.elim\n⊢ ∀ (j : Empty), a ≫ biproduct.π Empty.elim j = default ≫ biproduct.π Empty.elim j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : Unique J\nf : J → C\nj : J\n⊢ f default = f j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : Unique J\nf : J → C\nj : J\n⊢ default = j\n[PROOFSTEP]\nrw [← Unique.uniq]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : Unique J\nf : J → C\nj : J\n⊢ f j = f default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\ninst✝ : Unique J\nf : J → C\nj : J\n⊢ j = default\n[PROOFSTEP]\nrw [← Unique.uniq]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nj j' : WalkingPair\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) j ≫ (fun j => WalkingPair.casesOn j b.fst b.snd) j' =\n    if h : j = j' then eqToHom (_ : pairFunction X Y j = pairFunction X Y j') else 0\n[PROOFSTEP]\nrcases j with ⟨⟩\n[GOAL]\ncase left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nj' : WalkingPair\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.left ≫ (fun j => WalkingPair.casesOn j b.fst b.snd) j' =\n    if h : WalkingPair.left = j' then eqToHom (_ : pairFunction X Y WalkingPair.left = pairFunction X Y j') else 0\n[PROOFSTEP]\nrcases j' with ⟨⟩\n[GOAL]\ncase right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nj' : WalkingPair\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.right ≫ (fun j => WalkingPair.casesOn j b.fst b.snd) j' =\n    if h : WalkingPair.right = j' then eqToHom (_ : pairFunction X Y WalkingPair.right = pairFunction X Y j') else 0\n[PROOFSTEP]\nrcases j' with ⟨⟩\n[GOAL]\ncase left.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.left ≫\n      (fun j => WalkingPair.casesOn j b.fst b.snd) WalkingPair.left =\n    if h : WalkingPair.left = WalkingPair.left then\n      eqToHom (_ : pairFunction X Y WalkingPair.left = pairFunction X Y WalkingPair.left)\n    else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.left ≫\n      (fun j => WalkingPair.casesOn j b.fst b.snd) WalkingPair.right =\n    if h : WalkingPair.left = WalkingPair.right then\n      eqToHom (_ : pairFunction X Y WalkingPair.left = pairFunction X Y WalkingPair.right)\n    else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.right ≫\n      (fun j => WalkingPair.casesOn j b.fst b.snd) WalkingPair.left =\n    if h : WalkingPair.right = WalkingPair.left then\n      eqToHom (_ : pairFunction X Y WalkingPair.right = pairFunction X Y WalkingPair.left)\n    else 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ (fun j => WalkingPair.casesOn j b.inl b.inr) WalkingPair.right ≫\n      (fun j => WalkingPair.casesOn j b.fst b.snd) WalkingPair.right =\n    if h : WalkingPair.right = WalkingPair.right then\n      eqToHom (_ : pairFunction X Y WalkingPair.right = pairFunction X Y WalkingPair.right)\n    else 0\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nj : Discrete WalkingPair\n⊢ NatTrans.app (Bicone.toCone (toBicone b)).π j =\n    (Iso.refl (Bicone.toCone (toBicone b)).pt).hom ≫ NatTrans.app (toCone b).π j\n[PROOFSTEP]\ncases' j with as\n[GOAL]\ncase mk\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nas : WalkingPair\n⊢ NatTrans.app (Bicone.toCone (toBicone b)).π { as := as } =\n    (Iso.refl (Bicone.toCone (toBicone b)).pt).hom ≫ NatTrans.app (toCone b).π { as := as }\n[PROOFSTEP]\ncases as\n[GOAL]\ncase mk.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ NatTrans.app (Bicone.toCone (toBicone b)).π { as := WalkingPair.left } =\n    (Iso.refl (Bicone.toCone (toBicone b)).pt).hom ≫ NatTrans.app (toCone b).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ NatTrans.app (Bicone.toCone (toBicone b)).π { as := WalkingPair.right } =\n    (Iso.refl (Bicone.toCone (toBicone b)).pt).hom ≫ NatTrans.app (toCone b).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nj : Discrete WalkingPair\n⊢ NatTrans.app (Bicone.toCocone (toBicone b)).ι j ≫ (Iso.refl (Bicone.toCocone (toBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι j\n[PROOFSTEP]\ncases' j with as\n[GOAL]\ncase mk\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\nas : WalkingPair\n⊢ NatTrans.app (Bicone.toCocone (toBicone b)).ι { as := as } ≫ (Iso.refl (Bicone.toCocone (toBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι { as := as }\n[PROOFSTEP]\ncases as\n[GOAL]\ncase mk.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ NatTrans.app (Bicone.toCocone (toBicone b)).ι { as := WalkingPair.left } ≫\n      (Iso.refl (Bicone.toCocone (toBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nb : BinaryBicone X Y\n⊢ NatTrans.app (Bicone.toCocone (toBicone b)).ι { as := WalkingPair.right } ≫\n      (Iso.refl (Bicone.toCocone (toBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ ι b WalkingPair.left ≫ π b WalkingPair.left = 𝟙 X\n[PROOFSTEP]\nsimp [Bicone.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ ι b WalkingPair.left ≫ π b WalkingPair.right = 0\n[PROOFSTEP]\nsimp [Bicone.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ ι b WalkingPair.right ≫ π b WalkingPair.left = 0\n[PROOFSTEP]\nsimp [Bicone.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ ι b WalkingPair.right ≫ π b WalkingPair.right = 𝟙 Y\n[PROOFSTEP]\nsimp [Bicone.ι_π]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nj : Discrete WalkingPair\n⊢ NatTrans.app (BinaryBicone.toCone (toBinaryBicone b)).π j =\n    (Iso.refl (BinaryBicone.toCone (toBinaryBicone b)).pt).hom ≫ NatTrans.app (toCone b).π j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ NatTrans.app (BinaryBicone.toCone (toBinaryBicone b)).π { as := WalkingPair.left } =\n    (Iso.refl (BinaryBicone.toCone (toBinaryBicone b)).pt).hom ≫ NatTrans.app (toCone b).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ NatTrans.app (BinaryBicone.toCone (toBinaryBicone b)).π { as := WalkingPair.right } =\n    (Iso.refl (BinaryBicone.toCone (toBinaryBicone b)).pt).hom ≫ NatTrans.app (toCone b).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nj : Discrete WalkingPair\n⊢ NatTrans.app (BinaryBicone.toCocone (toBinaryBicone b)).ι j ≫\n      (Iso.refl (BinaryBicone.toCocone (toBinaryBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ NatTrans.app (BinaryBicone.toCocone (toBinaryBicone b)).ι { as := WalkingPair.left } ≫\n      (Iso.refl (BinaryBicone.toCocone (toBinaryBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\n⊢ NatTrans.app (BinaryBicone.toCocone (toBinaryBicone b)).ι { as := WalkingPair.right } ≫\n      (Iso.refl (BinaryBicone.toCocone (toBinaryBicone b)).pt).hom =\n    NatTrans.app (toCocone b).ι { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : BinaryBicone X Y\nx✝ : Bicone.IsBilimit (toBicone b)\nh : IsLimit (Bicone.toCone (toBicone b))\nh' : IsColimit (Bicone.toCocone (toBicone b))\n⊢ (fun h => { isLimit := ↑(toBiconeIsLimit b).symm h.isLimit, isColimit := ↑(toBiconeIsColimit b).symm h.isColimit })\n      ((fun h => { isLimit := ↑(toBiconeIsLimit b) h.isLimit, isColimit := ↑(toBiconeIsColimit b) h.isColimit })\n        { isLimit := h, isColimit := h' }) =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : BinaryBicone X Y\nx✝ : Bicone.IsBilimit (toBicone b)\nh : IsLimit (Bicone.toCone (toBicone b))\nh' : IsColimit (Bicone.toCocone (toBicone b))\n⊢ { isLimit := ↑(toBiconeIsLimit b).symm (↑(toBiconeIsLimit b) h),\n      isColimit := ↑(toBiconeIsColimit b).symm (↑(toBiconeIsColimit b) h') } =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : BinaryBicone X Y\nx✝ : IsBilimit b\nh : IsLimit (toCone b)\nh' : IsColimit (toCocone b)\n⊢ (fun h => { isLimit := ↑(toBiconeIsLimit b) h.isLimit, isColimit := ↑(toBiconeIsColimit b) h.isColimit })\n      ((fun h =>\n          { isLimit := ↑(toBiconeIsLimit b).symm h.isLimit, isColimit := ↑(toBiconeIsColimit b).symm h.isColimit })\n        { isLimit := h, isColimit := h' }) =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : BinaryBicone X Y\nx✝ : IsBilimit b\nh : IsLimit (toCone b)\nh' : IsColimit (toCocone b)\n⊢ { isLimit := ↑(toBiconeIsLimit b) (↑(toBiconeIsLimit b).symm h),\n      isColimit := ↑(toBiconeIsColimit b) (↑(toBiconeIsColimit b).symm h') } =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nx✝ : BinaryBicone.IsBilimit (toBinaryBicone b)\nh : IsLimit (BinaryBicone.toCone (toBinaryBicone b))\nh' : IsColimit (BinaryBicone.toCocone (toBinaryBicone b))\n⊢ (fun h =>\n        { isLimit := ↑(toBinaryBiconeIsLimit b).symm h.isLimit,\n          isColimit := ↑(toBinaryBiconeIsColimit b).symm h.isColimit })\n      ((fun h =>\n          { isLimit := ↑(toBinaryBiconeIsLimit b) h.isLimit, isColimit := ↑(toBinaryBiconeIsColimit b) h.isColimit })\n        { isLimit := h, isColimit := h' }) =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nx✝ : BinaryBicone.IsBilimit (toBinaryBicone b)\nh : IsLimit (BinaryBicone.toCone (toBinaryBicone b))\nh' : IsColimit (BinaryBicone.toCocone (toBinaryBicone b))\n⊢ { isLimit := ↑(toBinaryBiconeIsLimit b).symm (↑(toBinaryBiconeIsLimit b) h),\n      isColimit := ↑(toBinaryBiconeIsColimit b).symm (↑(toBinaryBiconeIsColimit b) h') } =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nx✝ : IsBilimit b\nh : IsLimit (toCone b)\nh' : IsColimit (toCocone b)\n⊢ (fun h => { isLimit := ↑(toBinaryBiconeIsLimit b) h.isLimit, isColimit := ↑(toBinaryBiconeIsColimit b) h.isColimit })\n      ((fun h =>\n          { isLimit := ↑(toBinaryBiconeIsLimit b).symm h.isLimit,\n            isColimit := ↑(toBinaryBiconeIsColimit b).symm h.isColimit })\n        { isLimit := h, isColimit := h' }) =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nX Y : C\nb : Bicone (pairFunction X Y)\nx✝ : IsBilimit b\nh : IsLimit (toCone b)\nh' : IsColimit (toCocone b)\n⊢ { isLimit := ↑(toBinaryBiconeIsLimit b) (↑(toBinaryBiconeIsLimit b).symm h),\n      isColimit := ↑(toBinaryBiconeIsColimit b) (↑(toBinaryBiconeIsColimit b).symm h') } =\n    { isLimit := h, isColimit := h' }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (isoProd X Y).hom = prod.lift fst snd\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ inl ≫ (isoProd X Y).hom ≫ prod.fst = inl ≫ prod.lift fst snd ≫ prod.fst\n[PROOFSTEP]\nsimp [biprod.isoProd]\n[GOAL]\ncase h₁.h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ inr ≫ (isoProd X Y).hom ≫ prod.fst = inr ≫ prod.lift fst snd ≫ prod.fst\n[PROOFSTEP]\nsimp [biprod.isoProd]\n[GOAL]\ncase h₂.h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ inl ≫ (isoProd X Y).hom ≫ prod.snd = inl ≫ prod.lift fst snd ≫ prod.snd\n[PROOFSTEP]\nsimp [biprod.isoProd]\n[GOAL]\ncase h₂.h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ inr ≫ (isoProd X Y).hom ≫ prod.snd = inr ≫ prod.lift fst snd ≫ prod.snd\n[PROOFSTEP]\nsimp [biprod.isoProd]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (isoProd X Y).inv = lift prod.fst prod.snd\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (isoProd X Y).inv ≫ fst = lift prod.fst prod.snd ≫ fst\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (isoProd X Y).inv ≫ snd = lift prod.fst prod.snd ≫ snd\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (isoCoprod X Y).inv = coprod.desc inl inr\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (coprod.inl ≫ (isoCoprod X Y).inv) ≫ fst = (coprod.inl ≫ coprod.desc inl inr) ≫ fst\n[PROOFSTEP]\nsimp [biprod.isoCoprod]\n[GOAL]\ncase h₁.h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (coprod.inl ≫ (isoCoprod X Y).inv) ≫ snd = (coprod.inl ≫ coprod.desc inl inr) ≫ snd\n[PROOFSTEP]\nsimp [biprod.isoCoprod]\n[GOAL]\ncase h₂.h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (coprod.inr ≫ (isoCoprod X Y).inv) ≫ fst = (coprod.inr ≫ coprod.desc inl inr) ≫ fst\n[PROOFSTEP]\nsimp [biprod.isoCoprod]\n[GOAL]\ncase h₂.h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (coprod.inr ≫ (isoCoprod X Y).inv) ≫ snd = (coprod.inr ≫ coprod.desc inl inr) ≫ snd\n[PROOFSTEP]\nsimp [biprod.isoCoprod]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ (biprod.isoCoprod X Y).hom = biprod.desc coprod.inl coprod.inr\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ biprod.inl ≫ (biprod.isoCoprod X Y).hom = biprod.inl ≫ biprod.desc coprod.inl coprod.inr\n[PROOFSTEP]\nsimp [← Iso.eq_comp_inv]\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ biprod.inr ≫ (biprod.isoCoprod X Y).hom = biprod.inr ≫ biprod.desc coprod.inl coprod.inr\n[PROOFSTEP]\nsimp [← Iso.eq_comp_inv]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ map f g = map' f g\n[PROOFSTEP]\next\n[GOAL]\ncase h₀.h₀\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ (inl ≫ map f g) ≫ fst = (inl ≫ map' f g) ≫ fst\n[PROOFSTEP]\nsimp only [mapPair_left, IsColimit.ι_map, IsLimit.map_π, biprod.inl_fst_assoc, Category.assoc, ←\n  BinaryBicone.toCone_π_app_left, ← BinaryBiproduct.bicone_fst, ← BinaryBicone.toCocone_ι_app_left, ←\n  BinaryBiproduct.bicone_inl]\n[GOAL]\ncase h₀.h₀\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone W X)).ι { as := WalkingPair.left } ≫\n      NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone W X)).π { as := WalkingPair.left } ≫ f =\n    f ≫\n      NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone Y Z)).ι { as := WalkingPair.left } ≫\n        NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone Y Z)).π { as := WalkingPair.left }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₀.h₀\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ inl ≫ fst ≫ f = f ≫ inl ≫ fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₀.h₁\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ (inl ≫ map f g) ≫ snd = (inl ≫ map' f g) ≫ snd\n[PROOFSTEP]\nsimp only [mapPair_left, IsColimit.ι_map, IsLimit.map_π, zero_comp, biprod.inl_snd_assoc, Category.assoc, ←\n  BinaryBicone.toCone_π_app_right, ← BinaryBiproduct.bicone_snd, ← BinaryBicone.toCocone_ι_app_left, ←\n  BinaryBiproduct.bicone_inl]\n[GOAL]\ncase h₀.h₁\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone W X)).ι { as := WalkingPair.left } ≫\n      NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone W X)).π { as := WalkingPair.right } ≫\n        NatTrans.app (mapPair f g) { as := WalkingPair.right } =\n    f ≫\n      NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone Y Z)).ι { as := WalkingPair.left } ≫\n        NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone Y Z)).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁.h₀\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ (inr ≫ map f g) ≫ fst = (inr ≫ map' f g) ≫ fst\n[PROOFSTEP]\nsimp only [mapPair_right, biprod.inr_fst_assoc, IsColimit.ι_map, IsLimit.map_π, zero_comp, Category.assoc, ←\n  BinaryBicone.toCone_π_app_left, ← BinaryBiproduct.bicone_fst, ← BinaryBicone.toCocone_ι_app_right, ←\n  BinaryBiproduct.bicone_inr]\n[GOAL]\ncase h₁.h₀\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone W X)).ι { as := WalkingPair.right } ≫\n      NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone W X)).π { as := WalkingPair.left } ≫\n        NatTrans.app (mapPair f g) { as := WalkingPair.left } =\n    g ≫\n      NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone Y Z)).ι { as := WalkingPair.right } ≫\n        NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone Y Z)).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁.h₁\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ (inr ≫ map f g) ≫ snd = (inr ≫ map' f g) ≫ snd\n[PROOFSTEP]\nsimp only [mapPair_right, IsColimit.ι_map, IsLimit.map_π, biprod.inr_snd_assoc, Category.assoc, ←\n  BinaryBicone.toCone_π_app_right, ← BinaryBiproduct.bicone_snd, ← BinaryBicone.toCocone_ι_app_right, ←\n  BinaryBiproduct.bicone_inr]\n[GOAL]\ncase h₁.h₁\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone W X)).ι { as := WalkingPair.right } ≫\n      NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone W X)).π { as := WalkingPair.right } ≫ g =\n    g ≫\n      NatTrans.app (BinaryBicone.toCocone (BinaryBiproduct.bicone Y Z)).ι { as := WalkingPair.right } ≫\n        NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone Y Z)).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ inl ≫ map f g = f ≫ inl\n[PROOFSTEP]\nrw [biprod.map_eq_map']\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ inl ≫ map' f g = f ≫ inl\n[PROOFSTEP]\nexact IsColimit.ι_map (BinaryBiproduct.isColimit W X) _ _ ⟨WalkingPair.left⟩\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ inr ≫ map f g = g ≫ inr\n[PROOFSTEP]\nrw [biprod.map_eq_map']\n[GOAL]\nJ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\nP Q W X Y Z : C\ninst✝¹ : HasBinaryBiproduct W X\ninst✝ : HasBinaryBiproduct Y Z\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ inr ≫ map' f g = g ≫ inr\n[PROOFSTEP]\nexact IsColimit.ι_map (BinaryBiproduct.isColimit W X) _ _ ⟨WalkingPair.right⟩\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ (IsLimit.conePointUniqueUpToIso hb.isLimit (BinaryBiproduct.isLimit X Y)).inv = desc b.inl b.inr\n[PROOFSTEP]\nrefine' biprod.hom_ext' _ _ (hb.isLimit.hom_ext fun j => _) (hb.isLimit.hom_ext fun j => _)\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ (inl ≫ (IsLimit.conePointUniqueUpToIso hb.isLimit (BinaryBiproduct.isLimit X Y)).inv) ≫\n      NatTrans.app (BinaryBicone.toCone b).π j =\n    (inl ≫ desc b.inl b.inr) ≫ NatTrans.app (BinaryBicone.toCone b).π j\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ (inr ≫ (IsLimit.conePointUniqueUpToIso hb.isLimit (BinaryBiproduct.isLimit X Y)).inv) ≫\n      NatTrans.app (BinaryBicone.toCone b).π j =\n    (inr ≫ desc b.inl b.inr) ≫ NatTrans.app (BinaryBicone.toCone b).π j\n[PROOFSTEP]\nall_goals\n  simp only [Category.assoc, IsLimit.conePointUniqueUpToIso_inv_comp]\n  rcases j with ⟨⟨⟩⟩\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ (inl ≫ (IsLimit.conePointUniqueUpToIso hb.isLimit (BinaryBiproduct.isLimit X Y)).inv) ≫\n      NatTrans.app (BinaryBicone.toCone b).π j =\n    (inl ≫ desc b.inl b.inr) ≫ NatTrans.app (BinaryBicone.toCone b).π j\n[PROOFSTEP]\nsimp only [Category.assoc, IsLimit.conePointUniqueUpToIso_inv_comp]\n[GOAL]\ncase refine'_1\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ inl ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π j =\n    inl ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ (inr ≫ (IsLimit.conePointUniqueUpToIso hb.isLimit (BinaryBiproduct.isLimit X Y)).inv) ≫\n      NatTrans.app (BinaryBicone.toCone b).π j =\n    (inr ≫ desc b.inl b.inr) ≫ NatTrans.app (BinaryBicone.toCone b).π j\n[PROOFSTEP]\nsimp only [Category.assoc, IsLimit.conePointUniqueUpToIso_inv_comp]\n[GOAL]\ncase refine'_2\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ inr ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π j =\n    inr ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase refine'_1.mk.left\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inl ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.left } =\n    inl ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.left }\ncase refine'_1.mk.right\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inl ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.right } =\n    inl ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.right }\ncase refine'_2.mk.left\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inr ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.left } =\n    inr ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.left }\ncase refine'_2.mk.right\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inr ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.right } =\n    inr ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.right }\n[PROOFSTEP]\nall_goals simp\n[GOAL]\ncase refine'_1.mk.left\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inl ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.left } =\n    inl ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.mk.right\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inl ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.right } =\n    inl ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.mk.left\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inr ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.left } =\n    inr ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.mk.right\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ inr ≫ NatTrans.app (BinaryBicone.toCone (BinaryBiproduct.bicone X Y)).π { as := WalkingPair.right } =\n    inr ≫ desc b.inl b.inr ≫ NatTrans.app (BinaryBicone.toCone b).π { as := WalkingPair.right }\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ lift b.fst b.snd ≫ desc b.inl b.inr = 𝟙 b.pt\n[PROOFSTEP]\nrw [← biprod.conePointUniqueUpToIso_hom X Y hb, ← biprod.conePointUniqueUpToIso_inv X Y hb, Iso.hom_inv_id]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ desc b.inl b.inr ≫ lift b.fst b.snd = 𝟙 (X ⊞ Y)\n[PROOFSTEP]\nrw [← biprod.conePointUniqueUpToIso_hom X Y hb, ← biprod.conePointUniqueUpToIso_inv X Y hb, Iso.inv_hom_id]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ IsIso inl ↔ 𝟙 (X ⊞ Y) = fst ≫ inl\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ IsIso inl → 𝟙 (X ⊞ Y) = fst ≫ inl\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nh : IsIso inl\n⊢ 𝟙 (X ⊞ Y) = fst ≫ inl\n[PROOFSTEP]\nhave := (cancel_epi (inv biprod.inl : X ⊞ Y ⟶ X)).2 <| @biprod.inl_fst _ _ _ X Y _\n[GOAL]\ncase mp\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nh : IsIso inl\nthis : inv inl ≫ inl ≫ fst = inv inl ≫ 𝟙 X\n⊢ 𝟙 (X ⊞ Y) = fst ≫ inl\n[PROOFSTEP]\nrw [IsIso.inv_hom_id_assoc, Category.comp_id] at this \n[GOAL]\ncase mp\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nh : IsIso inl\nthis : fst = inv inl\n⊢ 𝟙 (X ⊞ Y) = fst ≫ inl\n[PROOFSTEP]\nrw [this, IsIso.inv_hom_id]\n[GOAL]\ncase mpr\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\n⊢ 𝟙 (X ⊞ Y) = fst ≫ inl → IsIso inl\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nh : 𝟙 (X ⊞ Y) = fst ≫ inl\n⊢ IsIso inl\n[PROOFSTEP]\nexact ⟨⟨biprod.fst, biprod.inl_fst, h.symm⟩⟩\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.fst 0\n⊢ (Fork.ι s ≫ c.snd) ≫ Fork.ι (fstKernelFork c) = Fork.ι s\n[PROOFSTEP]\napply BinaryFan.IsLimit.hom_ext i\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.fst 0\n⊢ ((Fork.ι s ≫ c.snd) ≫ Fork.ι (fstKernelFork c)) ≫ BinaryFan.fst (toCone c) = Fork.ι s ≫ BinaryFan.fst (toCone c)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.fst 0\n⊢ ((Fork.ι s ≫ c.snd) ≫ Fork.ι (fstKernelFork c)) ≫ BinaryFan.snd (toCone c) = Fork.ι s ≫ BinaryFan.snd (toCone c)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.fst 0\nm✝ :\n  ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((const WalkingParallelPair).obj (fstKernelFork c).pt).obj WalkingParallelPair.zero\nhm : m✝ ≫ Fork.ι (fstKernelFork c) = Fork.ι s\n⊢ m✝ = Fork.ι s ≫ c.snd\n[PROOFSTEP]\nsimp [← hm]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.snd 0\n⊢ (Fork.ι s ≫ c.fst) ≫ Fork.ι (sndKernelFork c) = Fork.ι s\n[PROOFSTEP]\napply BinaryFan.IsLimit.hom_ext i\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.snd 0\n⊢ ((Fork.ι s ≫ c.fst) ≫ Fork.ι (sndKernelFork c)) ≫ BinaryFan.fst (toCone c) = Fork.ι s ≫ BinaryFan.fst (toCone c)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.snd 0\n⊢ ((Fork.ι s ≫ c.fst) ≫ Fork.ι (sndKernelFork c)) ≫ BinaryFan.snd (toCone c) = Fork.ι s ≫ BinaryFan.snd (toCone c)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsLimit (toCone c)\ns : Fork c.snd 0\nm✝ :\n  ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((const WalkingParallelPair).obj (sndKernelFork c).pt).obj WalkingParallelPair.zero\nhm : m✝ ≫ Fork.ι (sndKernelFork c) = Fork.ι s\n⊢ m✝ = Fork.ι s ≫ c.fst\n[PROOFSTEP]\nsimp [← hm]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inl 0\n⊢ Cofork.π (inlCokernelCofork c) ≫ c.inr ≫ Cofork.π s = Cofork.π s\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext i\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inl 0\n⊢ BinaryCofan.inl (toCocone c) ≫ Cofork.π (inlCokernelCofork c) ≫ c.inr ≫ Cofork.π s =\n    BinaryCofan.inl (toCocone c) ≫ Cofork.π s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inl 0\n⊢ BinaryCofan.inr (toCocone c) ≫ Cofork.π (inlCokernelCofork c) ≫ c.inr ≫ Cofork.π s =\n    BinaryCofan.inr (toCocone c) ≫ Cofork.π s\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inl 0\nm✝ :\n  ((const WalkingParallelPair).obj (inlCokernelCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (inlCokernelCofork c) ≫ m✝ = Cofork.π s\n⊢ m✝ = c.inr ≫ Cofork.π s\n[PROOFSTEP]\nsimp [← hm]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inr 0\n⊢ Cofork.π (inrCokernelCofork c) ≫ c.inl ≫ Cofork.π s = Cofork.π s\n[PROOFSTEP]\napply BinaryCofan.IsColimit.hom_ext i\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inr 0\n⊢ BinaryCofan.inl (toCocone c) ≫ Cofork.π (inrCokernelCofork c) ≫ c.inl ≫ Cofork.π s =\n    BinaryCofan.inl (toCocone c) ≫ Cofork.π s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₂\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inr 0\n⊢ BinaryCofan.inr (toCocone c) ≫ Cofork.π (inrCokernelCofork c) ≫ c.inl ≫ Cofork.π s =\n    BinaryCofan.inr (toCocone c) ≫ Cofork.π s\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasZeroMorphisms C\nP Q X Y : C\nc : BinaryBicone X Y\ni : IsColimit (toCocone c)\ns : Cofork c.inr 0\nm✝ :\n  ((const WalkingParallelPair).obj (inrCokernelCofork c).pt).obj WalkingParallelPair.one ⟶\n    ((const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.one\nhm : Cofork.π (inrCokernelCofork c) ≫ m✝ = Cofork.π s\n⊢ m✝ = c.inl ≫ Cofork.π s\n[PROOFSTEP]\nsimp [← hm]\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero Y\n⊢ biprod.fst ≫ biprod.inl = 𝟙 (X ⊞ Y)\n[PROOFSTEP]\napply CategoryTheory.Limits.biprod.hom_ext\n[GOAL]\ncase h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero Y\n⊢ (biprod.fst ≫ biprod.inl) ≫ biprod.fst = 𝟙 (X ⊞ Y) ≫ biprod.fst\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.inl_fst, Category.comp_id, Category.id_comp, biprod.inl_snd, comp_zero]\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero Y\n⊢ (biprod.fst ≫ biprod.inl) ≫ biprod.snd = 𝟙 (X ⊞ Y) ≫ biprod.snd\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.inl_fst, Category.comp_id, Category.id_comp, biprod.inl_snd, comp_zero]\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero Y\n⊢ 0 = biprod.snd\n[PROOFSTEP]\napply hY.eq_of_tgt\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero X\n⊢ biprod.snd ≫ biprod.inr = 𝟙 (X ⊞ Y)\n[PROOFSTEP]\napply CategoryTheory.Limits.biprod.hom_ext\n[GOAL]\ncase h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero X\n⊢ (biprod.snd ≫ biprod.inr) ≫ biprod.fst = 𝟙 (X ⊞ Y) ≫ biprod.fst\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.inr_snd, Category.comp_id, Category.id_comp, biprod.inr_fst, comp_zero]\n[GOAL]\ncase h₁\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero X\n⊢ (biprod.snd ≫ biprod.inr) ≫ biprod.snd = 𝟙 (X ⊞ Y) ≫ biprod.snd\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.inr_snd, Category.comp_id, Category.id_comp, biprod.inr_fst, comp_zero]\n[GOAL]\ncase h₀\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q X Y : C\ninst✝ : HasBinaryBiproduct X Y\nhY : IsZero X\n⊢ 0 = biprod.fst\n[PROOFSTEP]\napply hY.eq_of_tgt\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP✝ Q✝ : C\ninst✝ : HasBinaryBiproducts C\nP Q : C\n⊢ braiding' P Q = braiding P Q\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q : C\ninst✝ : HasBinaryBiproducts C\nW X Y Z : C\nf : X ⟶ Y\ng : Z ⟶ W\n⊢ map f g ≫ (braiding Y W).hom = (braiding X Z).hom ≫ map g f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP Q : C\ninst✝ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\n⊢ (braiding X W).hom ≫ map f g ≫ (braiding Y Z).hom = map g f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP✝ Q✝ : C\ninst✝ : HasBinaryBiproducts C\nP Q : C\n⊢ lift snd fst ≫ lift snd fst = 𝟙 (P ⊞ Q)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nJ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroMorphisms C\nP✝ Q✝ : C\ninst✝ : HasBinaryBiproducts C\nP Q : C\n⊢ (braiding P Q).hom ≫ (braiding Q P).hom = 𝟙 (P ⊞ Q)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\n⊢ f ≫ biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst = 𝟙 W\n[PROOFSTEP]\nhave t := congrArg (fun p : W ⊞ X ⟶ W ⊞ X => biprod.inl ≫ p ≫ biprod.fst) (IsIso.hom_inv_id (biprod.map f g))\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\nt :\n  (fun p => biprod.inl ≫ p ≫ biprod.fst) (biprod.map f g ≫ inv (biprod.map f g)) =\n    (fun p => biprod.inl ≫ p ≫ biprod.fst) (𝟙 (W ⊞ X))\n⊢ f ≫ biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst = 𝟙 W\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.assoc, biprod.inl_map_assoc] at t \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\nt : f ≫ biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst = biprod.inl ≫ biprod.fst\n⊢ f ≫ biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst = 𝟙 W\n[PROOFSTEP]\nsimp [t]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\n⊢ (biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst) ≫ f = 𝟙 Y\n[PROOFSTEP]\nhave t := congrArg (fun p : Y ⊞ Z ⟶ Y ⊞ Z => biprod.inl ≫ p ≫ biprod.fst) (IsIso.inv_hom_id (biprod.map f g))\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\nt :\n  (fun p => biprod.inl ≫ p ≫ biprod.fst) (inv (biprod.map f g) ≫ biprod.map f g) =\n    (fun p => biprod.inl ≫ p ≫ biprod.fst) (𝟙 (Y ⊞ Z))\n⊢ (biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst) ≫ f = 𝟙 Y\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.assoc, biprod.map_fst] at t \n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\nt : biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst ≫ f = biprod.inl ≫ biprod.fst\n⊢ (biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst) ≫ f = 𝟙 Y\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\nt : biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst ≫ f = biprod.inl ≫ biprod.fst\n⊢ biprod.inl ≫ inv (biprod.map f g) ≫ biprod.fst ≫ f = 𝟙 Y\n[PROOFSTEP]\nsimp [t]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\n⊢ IsIso (biprod.map g f)\n[PROOFSTEP]\nrw [← biprod.braiding_map_braiding]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBinaryBiproducts C\nW X Y Z : C\nf : W ⟶ Y\ng : X ⟶ Z\ninst✝ : IsIso (biprod.map f g)\n⊢ IsIso ((biprod.braiding X W).hom ≫ biprod.map f g ≫ (biprod.braiding Y Z).hom)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Biproducts", "llama_tokens": 61692, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5506073655352404, "lm_q2_score": 0.5273165233795672, "lm_q1q2_score": 0.2903443617412255}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl : List α\nH : Nodup l\ni : Fin (length l)\n⊢ (fun x => { val := indexOf (↑x) l, isLt := (_ : indexOf (↑x) l < length l) })\n      ((fun i => { val := get l i, property := (_ : get l { val := ↑i, isLt := (_ : ↑i < length l) } ∈ l) }) i) =\n    i\n[PROOFSTEP]\nsimp only [List.get_indexOf, eq_self_iff_true, Fin.eta, Subtype.coe_mk, H]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl : List α\nH : Nodup l\nx : { x // x ∈ l }\n⊢ (fun i => { val := get l i, property := (_ : get l { val := ↑i, isLt := (_ : ↑i < length l) } ∈ l) })\n      ((fun x => { val := indexOf (↑x) l, isLt := (_ : indexOf (↑x) l < length l) }) x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl : List α\nnd : Nodup l\nh : ∀ (x : α), x ∈ l\ni : Fin (length l)\n⊢ (fun a => { val := indexOf a l, isLt := (_ : indexOf a l < length l) }) ((fun i => get l i) i) = i\n[PROOFSTEP]\nsimp [List.get_indexOf, nd]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nl : List α\nnd : Nodup l\nh : ∀ (x : α), x ∈ l\na : α\n⊢ (fun i => get l i) ((fun a => { val := indexOf a l, isLt := (_ : indexOf a l < length l) }) a) = a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n⊢ l <+ l'\n[PROOFSTEP]\ninduction' l with hd tl IH generalizing l' f\n[GOAL]\ncase nil\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? [] ix = get? l' (↑f ix)\n⊢ [] <+ l'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nhave : some hd = _ := hf 0\n[GOAL]\ncase cons\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nthis : some hd = get? l' (↑f 0)\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nrw [eq_comm, List.get?_eq_some] at this \n[GOAL]\ncase cons\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nthis : ∃ h, get l' { val := ↑f 0, isLt := h } = hd\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nobtain ⟨w, h⟩ := this\n[GOAL]\ncase cons.intro\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nlet f' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => f (i + 1) - (f 0 + 1)) fun a b =>\n    by\n    dsimp only\n    rw [tsub_le_tsub_iff_right, OrderEmbedding.le_iff_le, Nat.succ_le_succ_iff]\n    rw [Nat.succ_le_iff, OrderEmbedding.lt_iff_lt]\n    exact b.succ_pos\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\na b : ℕ\n⊢ (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\na b : ℕ\n⊢ ↑f (a + 1) - (↑f 0 + 1) ≤ ↑f (b + 1) - (↑f 0 + 1) ↔ a ≤ b\n[PROOFSTEP]\nrw [tsub_le_tsub_iff_right, OrderEmbedding.le_iff_le, Nat.succ_le_succ_iff]\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\na b : ℕ\n⊢ ↑f 0 + 1 ≤ ↑f (b + 1)\n[PROOFSTEP]\nrw [Nat.succ_le_iff, OrderEmbedding.lt_iff_lt]\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\na b : ℕ\n⊢ 0 < b + 1\n[PROOFSTEP]\nexact b.succ_pos\n[GOAL]\ncase cons.intro\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nhave : ∀ ix, tl.get? ix = (l'.drop (f 0 + 1)).get? (f' ix) :=\n  by\n  intro ix\n  rw [List.get?_drop, OrderEmbedding.coe_ofMapLEIff, add_tsub_cancel_of_le, ← hf, List.get?]\n  rw [Nat.succ_le_iff, OrderEmbedding.lt_iff_lt]\n  exact ix.succ_pos\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\n⊢ ∀ (ix : ℕ), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n[PROOFSTEP]\nintro ix\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nix : ℕ\n⊢ get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n[PROOFSTEP]\nrw [List.get?_drop, OrderEmbedding.coe_ofMapLEIff, add_tsub_cancel_of_le, ← hf, List.get?]\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nix : ℕ\n⊢ ↑f 0 + 1 ≤ ↑f (ix + 1)\n[PROOFSTEP]\nrw [Nat.succ_le_iff, OrderEmbedding.lt_iff_lt]\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nix : ℕ\n⊢ 0 < ix + 1\n[PROOFSTEP]\nexact ix.succ_pos\n[GOAL]\ncase cons.intro\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nthis : ∀ (ix : ℕ), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n⊢ hd :: tl <+ l'\n[PROOFSTEP]\nrw [← List.take_append_drop (f 0 + 1) l', ← List.singleton_append]\n[GOAL]\ncase cons.intro\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nthis : ∀ (ix : ℕ), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n⊢ [hd] ++ tl <+ take (↑f 0 + 1) l' ++ drop (↑f 0 + 1) l'\n[PROOFSTEP]\napply List.Sublist.append _ (IH _ this)\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nthis : ∀ (ix : ℕ), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n⊢ [hd] <+ take (↑f 0 + 1) l'\n[PROOFSTEP]\nrw [List.singleton_sublist, ← h, l'.get_take _ (Nat.lt_succ_self _)]\n[GOAL]\nα : Type u_1\nl l'✝ : List α\nf✝ : ℕ ↪o ℕ\nhf✝ : ∀ (ix : ℕ), get? l ix = get? l'✝ (↑f✝ ix)\nhd : α\ntl : List α\nIH : ∀ {l' : List α} (f : ℕ ↪o ℕ), (∀ (ix : ℕ), get? tl ix = get? l' (↑f ix)) → tl <+ l'\nl' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? (hd :: tl) ix = get? l' (↑f ix)\nw : ↑f 0 < length l'\nh : get l' { val := ↑f 0, isLt := w } = hd\nf' : ℕ ↪o ℕ :=\n  OrderEmbedding.ofMapLEIff (fun i => ↑f (i + 1) - (↑f 0 + 1))\n    (_ : ∀ (a b : ℕ), (fun i => ↑f (i + 1) - (↑f 0 + 1)) a ≤ (fun i => ↑f (i + 1) - (↑f 0 + 1)) b ↔ a ≤ b)\nthis : ∀ (ix : ℕ), get? tl ix = get? (drop (↑f 0 + 1) l') (↑f' ix)\n⊢ get (take (Nat.succ (↑f 0)) l') { val := ↑f 0, isLt := (_ : ↑f 0 < length (take (Nat.succ (↑f 0)) l')) } ∈\n    take (↑f 0 + 1) l'\n[PROOFSTEP]\napply List.get_mem\n[GOAL]\nα : Type u_1\nl l' : List α\n⊢ l <+ l' ↔ ∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nl l' : List α\n⊢ l <+ l' → ∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nα : Type u_1\nl l' : List α\nH : l <+ l'\n⊢ ∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n[PROOFSTEP]\ninduction' H with xs ys y _H IH xs ys x _H IH\n[GOAL]\ncase mp.slnil\nα : Type u_1\nl l' : List α\n⊢ ∃ f, ∀ (ix : ℕ), get? [] ix = get? [] (↑f ix)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.cons\nα : Type u_1\nl l' xs ys : List α\ny : α\n_H : xs <+ ys\nIH : ∃ f, ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∃ f, ∀ (ix : ℕ), get? xs ix = get? (y :: ys) (↑f ix)\n[PROOFSTEP]\nobtain ⟨f, hf⟩ := IH\n[GOAL]\ncase mp.cons.intro\nα : Type u_1\nl l' xs ys : List α\ny : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∃ f, ∀ (ix : ℕ), get? xs ix = get? (y :: ys) (↑f ix)\n[PROOFSTEP]\nrefine' ⟨f.trans (OrderEmbedding.ofStrictMono (· + 1) fun _ => by simp), _⟩\n[GOAL]\nα : Type u_1\nl l' xs ys : List α\ny : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\nx✝ : ℕ\n⊢ ∀ ⦃b : ℕ⦄, x✝ < b → (fun x => x + 1) x✝ < (fun x => x + 1) b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.cons.intro\nα : Type u_1\nl l' xs ys : List α\ny : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∀ (ix : ℕ),\n    get? xs ix =\n      get? (y :: ys)\n        (↑(RelEmbedding.trans f (OrderEmbedding.ofStrictMono (fun x => x + 1) (_ : ∀ (x a : ℕ), x < a → x + 1 < a + 1)))\n          ix)\n[PROOFSTEP]\nsimpa using hf\n[GOAL]\ncase mp.cons₂\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nIH : ∃ f, ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∃ f, ∀ (ix : ℕ), get? (x :: xs) ix = get? (x :: ys) (↑f ix)\n[PROOFSTEP]\nobtain ⟨f, hf⟩ := IH\n[GOAL]\ncase mp.cons₂.intro\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∃ f, ∀ (ix : ℕ), get? (x :: xs) ix = get? (x :: ys) (↑f ix)\n[PROOFSTEP]\nrefine' ⟨OrderEmbedding.ofMapLEIff (fun ix : ℕ => if ix = 0 then 0 else (f ix.pred).succ) _, _⟩\n[GOAL]\ncase mp.cons₂.intro.refine'_1\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∀ (a b : ℕ),\n    (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) a ≤\n        (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) b ↔\n      a ≤ b\n[PROOFSTEP]\nrintro ⟨_ | a⟩ ⟨_ | b⟩\n[GOAL]\ncase mp.cons₂.intro.refine'_1.zero.zero\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≤\n      (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔\n    Nat.zero ≤ Nat.zero\n[PROOFSTEP]\nsimp [Nat.succ_le_succ_iff]\n[GOAL]\ncase mp.cons₂.intro.refine'_1.zero.succ\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\nn✝ : ℕ\n⊢ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ≤\n      (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔\n    Nat.zero ≤ Nat.succ n✝\n[PROOFSTEP]\nsimp [Nat.succ_le_succ_iff]\n[GOAL]\ncase mp.cons₂.intro.refine'_1.succ.zero\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\nn✝ : ℕ\n⊢ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ≤\n      (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) Nat.zero ↔\n    Nat.succ n✝ ≤ Nat.zero\n[PROOFSTEP]\nsimp [Nat.succ_le_succ_iff]\n[GOAL]\ncase mp.cons₂.intro.refine'_1.succ.succ\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\nn✝¹ n✝ : ℕ\n⊢ (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝¹) ≤\n      (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) (Nat.succ n✝) ↔\n    Nat.succ n✝¹ ≤ Nat.succ n✝\n[PROOFSTEP]\nsimp [Nat.succ_le_succ_iff]\n[GOAL]\ncase mp.cons₂.intro.refine'_2\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ ∀ (ix : ℕ),\n    get? (x :: xs) ix =\n      get? (x :: ys)\n        (↑(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix)))\n              (_ :\n                ∀ (a b : ℕ),\n                  (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) a ≤\n                      (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) b ↔\n                    a ≤ b))\n          ix)\n[PROOFSTEP]\nrintro ⟨_ | i⟩\n[GOAL]\ncase mp.cons₂.intro.refine'_2.zero\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\n⊢ get? (x :: xs) Nat.zero =\n    get? (x :: ys)\n      (↑(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix)))\n            (_ :\n              ∀ (a b : ℕ),\n                (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) a ≤\n                    (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) b ↔\n                  a ≤ b))\n        Nat.zero)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.cons₂.intro.refine'_2.succ\nα : Type u_1\nl l' xs ys : List α\nx : α\n_H : xs <+ ys\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? xs ix = get? ys (↑f ix)\nn✝ : ℕ\n⊢ get? (x :: xs) (Nat.succ n✝) =\n    get? (x :: ys)\n      (↑(OrderEmbedding.ofMapLEIff (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix)))\n            (_ :\n              ∀ (a b : ℕ),\n                (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) a ≤\n                    (fun ix => if ix = 0 then 0 else Nat.succ (↑f (Nat.pred ix))) b ↔\n                  a ≤ b))\n        (Nat.succ n✝))\n[PROOFSTEP]\nsimpa using hf _\n[GOAL]\ncase mpr\nα : Type u_1\nl l' : List α\n⊢ (∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)) → l <+ l'\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n⊢ l <+ l'\n[PROOFSTEP]\nexact sublist_of_orderEmbedding_get?_eq f hf\n[GOAL]\nα : Type u_1\nl l' : List α\n⊢ l <+ l' ↔ ∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n[PROOFSTEP]\nrw [sublist_iff_exists_orderEmbedding_get?_eq]\n[GOAL]\nα : Type u_1\nl l' : List α\n⊢ (∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)) ↔ ∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nl l' : List α\n⊢ (∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)) → ∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n⊢ ∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n[PROOFSTEP]\nhave h : ∀ {i : ℕ} (_ : i < l.length), f i < l'.length :=\n  by\n  intro i hi\n  specialize hf i\n  rw [get?_eq_get hi, eq_comm, get?_eq_some] at hf \n  obtain ⟨h, -⟩ := hf\n  exact h\n[GOAL]\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n⊢ ∀ {i : ℕ}, i < length l → ↑f i < length l'\n[PROOFSTEP]\nintro i hi\n[GOAL]\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\ni : ℕ\nhi : i < length l\n⊢ ↑f i < length l'\n[PROOFSTEP]\nspecialize hf i\n[GOAL]\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\ni : ℕ\nhi : i < length l\nhf : get? l i = get? l' (↑f i)\n⊢ ↑f i < length l'\n[PROOFSTEP]\nrw [get?_eq_get hi, eq_comm, get?_eq_some] at hf \n[GOAL]\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\ni : ℕ\nhi : i < length l\nhf : ∃ h, get l' { val := ↑f i, isLt := h } = get l { val := i, isLt := hi }\n⊢ ↑f i < length l'\n[PROOFSTEP]\nobtain ⟨h, -⟩ := hf\n[GOAL]\ncase intro\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\ni : ℕ\nhi : i < length l\nh : ↑f i < length l'\n⊢ ↑f i < length l'\n[PROOFSTEP]\nexact h\n[GOAL]\ncase mp.intro\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\nh : ∀ {i : ℕ}, i < length l → ↑f i < length l'\n⊢ ∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n[PROOFSTEP]\nrefine' ⟨OrderEmbedding.ofMapLEIff (fun ix => ⟨f ix, h ix.is_lt⟩) _, _⟩\n[GOAL]\ncase mp.intro.refine'_1\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\nh : ∀ {i : ℕ}, i < length l → ↑f i < length l'\n⊢ ∀ (a b : Fin (length l)),\n    (fun ix => { val := ↑f ↑ix, isLt := (_ : ↑f ↑ix < length l') }) a ≤\n        (fun ix => { val := ↑f ↑ix, isLt := (_ : ↑f ↑ix < length l') }) b ↔\n      a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro.refine'_2\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\nh : ∀ {i : ℕ}, i < length l → ↑f i < length l'\n⊢ ∀ (ix : Fin (length l)),\n    get l ix =\n      get l'\n        (↑(OrderEmbedding.ofMapLEIff (fun ix => { val := ↑f ↑ix, isLt := (_ : ↑f ↑ix < length l') })\n              (_ :\n                ∀ (a a_1 : Fin (length l)),\n                  { val := ↑f ↑a, isLt := (_ : ↑f ↑a < length l') } ≤\n                      { val := ↑f ↑a_1, isLt := (_ : ↑f ↑a_1 < length l') } ↔\n                    a ≤ a_1))\n          ix)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mp.intro.refine'_2\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\nh : ∀ {i : ℕ}, i < length l → ↑f i < length l'\ni : Fin (length l)\n⊢ get l i =\n    get l'\n      (↑(OrderEmbedding.ofMapLEIff (fun ix => { val := ↑f ↑ix, isLt := (_ : ↑f ↑ix < length l') })\n            (_ :\n              ∀ (a a_1 : Fin (length l)),\n                { val := ↑f ↑a, isLt := (_ : ↑f ↑a < length l') } ≤\n                    { val := ↑f ↑a_1, isLt := (_ : ↑f ↑a_1 < length l') } ↔\n                  a ≤ a_1))\n        i)\n[PROOFSTEP]\napply Option.some_injective\n[GOAL]\ncase mp.intro.refine'_2.a\nα : Type u_1\nl l' : List α\nf : ℕ ↪o ℕ\nhf : ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\nh : ∀ {i : ℕ}, i < length l → ↑f i < length l'\ni : Fin (length l)\n⊢ some (get l i) =\n    some\n      (get l'\n        (↑(OrderEmbedding.ofMapLEIff (fun ix => { val := ↑f ↑ix, isLt := (_ : ↑f ↑ix < length l') })\n              (_ :\n                ∀ (a a_1 : Fin (length l)),\n                  { val := ↑f ↑a, isLt := (_ : ↑f ↑a < length l') } ≤\n                      { val := ↑f ↑a_1, isLt := (_ : ↑f ↑a_1 < length l') } ↔\n                    a ≤ a_1))\n          i))\n[PROOFSTEP]\nsimpa [get?_eq_get i.2, get?_eq_get (h i.2)] using hf i\n[GOAL]\ncase mpr\nα : Type u_1\nl l' : List α\n⊢ (∃ f, ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)) → ∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n⊢ ∃ f, ∀ (ix : ℕ), get? l ix = get? l' (↑f ix)\n[PROOFSTEP]\nrefine' ⟨OrderEmbedding.ofStrictMono (fun i => if hi : i < l.length then f ⟨i, hi⟩ else i + l'.length) _, _⟩\n[GOAL]\ncase mpr.intro.refine'_1\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n⊢ StrictMono fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l'\n[PROOFSTEP]\nintro i j h\n[GOAL]\ncase mpr.intro.refine'_1\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\n⊢ (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') i <\n    (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') j\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mpr.intro.refine'_1\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\n⊢ (if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') <\n    if hi : j < length l then ↑(↑f { val := j, isLt := hi }) else j + length l'\n[PROOFSTEP]\nsplit_ifs with hi hj hj\n[GOAL]\ncase pos\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\nhi : i < length l\nhj : j < length l\n⊢ ↑(↑f { val := i, isLt := hi }) < ↑(↑f { val := j, isLt := hj })\n[PROOFSTEP]\nrwa [Fin.val_fin_lt, f.lt_iff_lt]\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\nhi : i < length l\nhj : ¬j < length l\n⊢ ↑(↑f { val := i, isLt := hi }) < j + length l'\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\nhi : i < length l\nhj : ¬j < length l\n⊢ ↑(↑f { val := i, isLt := hi }) < length l' + j\n[PROOFSTEP]\nexact lt_add_of_lt_of_pos (Fin.is_lt _) (i.zero_le.trans_lt h)\n[GOAL]\ncase pos\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\nhi : ¬i < length l\nhj : j < length l\n⊢ i + length l' < ↑(↑f { val := j, isLt := hj })\n[PROOFSTEP]\nexact absurd (h.trans hj) hi\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni j : ℕ\nh : i < j\nhi : ¬i < length l\nhj : ¬j < length l\n⊢ i + length l' < j + length l'\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mpr.intro.refine'_2\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\n⊢ ∀ (ix : ℕ),\n    get? l ix =\n      get? l'\n        (↑(OrderEmbedding.ofStrictMono\n              (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l')\n              (_ :\n                ∀ ⦃i j : ℕ⦄,\n                  i < j →\n                    (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') i <\n                      (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') j))\n          ix)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr.intro.refine'_2\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\n⊢ get? l i =\n    get? l'\n      (↑(OrderEmbedding.ofStrictMono\n            (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l')\n            (_ :\n              ∀ ⦃i j : ℕ⦄,\n                i < j →\n                  (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') i <\n                    (fun i => if hi : i < length l then ↑(↑f { val := i, isLt := hi }) else i + length l') j))\n        i)\n[PROOFSTEP]\nsimp only [OrderEmbedding.coe_ofStrictMono]\n[GOAL]\ncase mpr.intro.refine'_2\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\n⊢ get? l i = get? l' (if h : i < length l then ↑(↑f { val := i, isLt := (_ : i < length l) }) else i + length l')\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\nhi : i < length l\n⊢ get? l i = get? l' ↑(↑f { val := i, isLt := (_ : i < length l) })\n[PROOFSTEP]\nrw [get?_eq_get hi, get?_eq_get, ← hf]\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\nhi : ¬i < length l\n⊢ get? l i = get? l' (i + length l')\n[PROOFSTEP]\nrw [get?_eq_none.mpr, get?_eq_none.mpr]\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\nhi : ¬i < length l\n⊢ length l' ≤ i + length l'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nl l' : List α\nf : Fin (length l) ↪o Fin (length l')\nhf : ∀ (ix : Fin (length l)), get l ix = get l' (↑f ix)\ni : ℕ\nhi : ¬i < length l\n⊢ length l ≤ i\n[PROOFSTEP]\nsimpa using hi\n[GOAL]\nα : Type u_1\nl : List α\nx : α\n⊢ Duplicate x l ↔ ∃ n m x_1, x = get l n ∧ x = get l m\n[PROOFSTEP]\nclassical\nrw [duplicate_iff_two_le_count, le_count_iff_replicate_sublist, sublist_iff_exists_fin_orderEmbedding_get_eq]\nconstructor\n· rintro ⟨f, hf⟩\n  refine' ⟨f ⟨0, by simp⟩, f ⟨1, by simp⟩, f.lt_iff_lt.2 (show (0 : ℕ) < 1 from zero_lt_one), _⟩\n  · rw [← hf, ← hf]; simp\n· rintro ⟨n, m, hnm, h, h'⟩\n  refine' ⟨OrderEmbedding.ofStrictMono (fun i => if (i : ℕ) = 0 then n else m) _, _⟩\n  · rintro ⟨⟨_ | i⟩, hi⟩ ⟨⟨_ | j⟩, hj⟩\n    · simp\n    · simp [hnm]\n    · simp\n    · simp only [Nat.lt_succ_iff, Nat.succ_le_succ_iff, replicate, length, nonpos_iff_eq_zero] at hi hj \n      simp [hi, hj]\n  · rintro ⟨⟨_ | i⟩, hi⟩\n    · simpa using h\n    · simpa using h'\n[GOAL]\nα : Type u_1\nl : List α\nx : α\n⊢ Duplicate x l ↔ ∃ n m x_1, x = get l n ∧ x = get l m\n[PROOFSTEP]\nrw [duplicate_iff_two_le_count, le_count_iff_replicate_sublist, sublist_iff_exists_fin_orderEmbedding_get_eq]\n[GOAL]\nα : Type u_1\nl : List α\nx : α\n⊢ (∃ f, ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)) ↔\n    ∃ n m x_1, x = get l n ∧ x = get l m\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nl : List α\nx : α\n⊢ (∃ f, ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)) →\n    ∃ n m x_1, x = get l n ∧ x = get l m\n[PROOFSTEP]\nrintro ⟨f, hf⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nl : List α\nx : α\nf : Fin (length (replicate 2 x)) ↪o Fin (length l)\nhf : ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n⊢ ∃ n m x_1, x = get l n ∧ x = get l m\n[PROOFSTEP]\nrefine' ⟨f ⟨0, by simp⟩, f ⟨1, by simp⟩, f.lt_iff_lt.2 (show (0 : ℕ) < 1 from zero_lt_one), _⟩\n[GOAL]\nα : Type u_1\nl : List α\nx : α\nf : Fin (length (replicate 2 x)) ↪o Fin (length l)\nhf : ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n⊢ 0 < length (replicate 2 x)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nl : List α\nx : α\nf : Fin (length (replicate 2 x)) ↪o Fin (length l)\nhf : ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n⊢ 1 < length (replicate 2 x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro\nα : Type u_1\nl : List α\nx : α\nf : Fin (length (replicate 2 x)) ↪o Fin (length l)\nhf : ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n⊢ x = get l (↑f { val := 0, isLt := (_ : 0 < Nat.succ 1) }) ∧ x = get l (↑f { val := 1, isLt := (_ : 1 < Nat.succ 1) })\n[PROOFSTEP]\nrw [← hf, ← hf]\n[GOAL]\ncase mp.intro\nα : Type u_1\nl : List α\nx : α\nf : Fin (length (replicate 2 x)) ↪o Fin (length l)\nhf : ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n⊢ x = get (replicate 2 x) { val := 0, isLt := (_ : 0 < Nat.succ 1) } ∧\n    x = get (replicate 2 x) { val := 1, isLt := (_ : 1 < Nat.succ 1) }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u_1\nl : List α\nx : α\n⊢ (∃ n m x_1, x = get l n ∧ x = get l m) →\n    ∃ f, ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n[PROOFSTEP]\nrintro ⟨n, m, hnm, h, h'⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\n⊢ ∃ f, ∀ (ix : Fin (length (replicate 2 x))), get (replicate 2 x) ix = get l (↑f ix)\n[PROOFSTEP]\nrefine' ⟨OrderEmbedding.ofStrictMono (fun i => if (i : ℕ) = 0 then n else m) _, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\n⊢ StrictMono fun i => if ↑i = 0 then n else m\n[PROOFSTEP]\nrintro ⟨⟨_ | i⟩, hi⟩ ⟨⟨_ | j⟩, hj⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1.mk.zero.mk.zero\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nhi hj : Nat.zero < length (replicate 2 x)\n⊢ { val := Nat.zero, isLt := hi } < { val := Nat.zero, isLt := hj } →\n    (fun i => if ↑i = 0 then n else m) { val := Nat.zero, isLt := hi } <\n      (fun i => if ↑i = 0 then n else m) { val := Nat.zero, isLt := hj }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1.mk.zero.mk.succ\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nhi : Nat.zero < length (replicate 2 x)\nn✝ : ℕ\nhj : Nat.succ n✝ < length (replicate 2 x)\n⊢ { val := Nat.zero, isLt := hi } < { val := Nat.succ n✝, isLt := hj } →\n    (fun i => if ↑i = 0 then n else m) { val := Nat.zero, isLt := hi } <\n      (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝, isLt := hj }\n[PROOFSTEP]\nsimp [hnm]\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1.mk.succ.mk.zero\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nn✝ : ℕ\nhi : Nat.succ n✝ < length (replicate 2 x)\nhj : Nat.zero < length (replicate 2 x)\n⊢ { val := Nat.succ n✝, isLt := hi } < { val := Nat.zero, isLt := hj } →\n    (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝, isLt := hi } <\n      (fun i => if ↑i = 0 then n else m) { val := Nat.zero, isLt := hj }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1.mk.succ.mk.succ\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nn✝¹ : ℕ\nhi : Nat.succ n✝¹ < length (replicate 2 x)\nn✝ : ℕ\nhj : Nat.succ n✝ < length (replicate 2 x)\n⊢ { val := Nat.succ n✝¹, isLt := hi } < { val := Nat.succ n✝, isLt := hj } →\n    (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝¹, isLt := hi } <\n      (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝, isLt := hj }\n[PROOFSTEP]\nsimp only [Nat.lt_succ_iff, Nat.succ_le_succ_iff, replicate, length, nonpos_iff_eq_zero] at hi hj \n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_1.mk.succ.mk.succ\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nn✝¹ : ℕ\nhi✝ : Nat.succ n✝¹ < length (replicate 2 x)\nn✝ : ℕ\nhj✝ : Nat.succ n✝ < length (replicate 2 x)\nhi : n✝¹ = 0\nhj : n✝ = 0\n⊢ { val := Nat.succ n✝¹, isLt := hi✝ } < { val := Nat.succ n✝, isLt := hj✝ } →\n    (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝¹, isLt := hi✝ } <\n      (fun i => if ↑i = 0 then n else m) { val := Nat.succ n✝, isLt := hj✝ }\n[PROOFSTEP]\nsimp [hi, hj]\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_2\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\n⊢ ∀ (ix : Fin (length (replicate 2 x))),\n    get (replicate 2 x) ix =\n      get l\n        (↑(OrderEmbedding.ofStrictMono (fun i => if ↑i = 0 then n else m)\n              (_ :\n                ∀ ⦃a b : Fin (length (replicate 2 x))⦄,\n                  a < b → (fun i => if ↑i = 0 then n else m) a < (fun i => if ↑i = 0 then n else m) b))\n          ix)\n[PROOFSTEP]\nrintro ⟨⟨_ | i⟩, hi⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_2.mk.zero\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nhi : Nat.zero < length (replicate 2 x)\n⊢ get (replicate 2 x) { val := Nat.zero, isLt := hi } =\n    get l\n      (↑(OrderEmbedding.ofStrictMono (fun i => if ↑i = 0 then n else m)\n            (_ :\n              ∀ ⦃a b : Fin (length (replicate 2 x))⦄,\n                a < b → (fun i => if ↑i = 0 then n else m) a < (fun i => if ↑i = 0 then n else m) b))\n        { val := Nat.zero, isLt := hi })\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mpr.intro.intro.intro.intro.refine'_2.mk.succ\nα : Type u_1\nl : List α\nx : α\nn m : Fin (length l)\nhnm : n < m\nh : x = get l n\nh' : x = get l m\nn✝ : ℕ\nhi : Nat.succ n✝ < length (replicate 2 x)\n⊢ get (replicate 2 x) { val := Nat.succ n✝, isLt := hi } =\n    get l\n      (↑(OrderEmbedding.ofStrictMono (fun i => if ↑i = 0 then n else m)\n            (_ :\n              ∀ ⦃a b : Fin (length (replicate 2 x))⦄,\n                a < b → (fun i => if ↑i = 0 then n else m) a < (fun i => if ↑i = 0 then n else m) b))\n        { val := Nat.succ n✝, isLt := hi })\n[PROOFSTEP]\nsimpa using h'\n", "meta": {"mathlib_filename": "Mathlib.Data.List.NodupEquivFin", "llama_tokens": 18850, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011542032312, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.2902650722165359}}
{"text": "[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ E →ₗ[ℝ] E →ₗ[ℝ] ℝ\n[PROOFSTEP]\nlet z : AlternatingMap ℝ E ℝ (Fin 0) ≃ₗ[ℝ] ℝ := AlternatingMap.constLinearEquivOfIsEmpty.symm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz : AlternatingMap ℝ E ℝ (Fin 0) ≃ₗ[ℝ] ℝ := LinearEquiv.symm AlternatingMap.constLinearEquivOfIsEmpty\n⊢ E →ₗ[ℝ] E →ₗ[ℝ] ℝ\n[PROOFSTEP]\nlet y : AlternatingMap ℝ E ℝ (Fin 1) →ₗ[ℝ] E →ₗ[ℝ] ℝ :=\n  LinearMap.llcomp ℝ E (AlternatingMap ℝ E ℝ (Fin 0)) ℝ z ∘ₗ AlternatingMap.curryLeftLinearMap\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz : AlternatingMap ℝ E ℝ (Fin 0) ≃ₗ[ℝ] ℝ := LinearEquiv.symm AlternatingMap.constLinearEquivOfIsEmpty\ny : AlternatingMap ℝ E ℝ (Fin 1) →ₗ[ℝ] E →ₗ[ℝ] ℝ :=\n  LinearMap.comp (↑(LinearMap.llcomp ℝ E (AlternatingMap ℝ E ℝ (Fin 0)) ℝ) ↑z) AlternatingMap.curryLeftLinearMap\n⊢ E →ₗ[ℝ] E →ₗ[ℝ] ℝ\n[PROOFSTEP]\nexact y ∘ₗ AlternatingMap.curryLeftLinearMap (R' := ℝ) o.volumeForm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) x) y = ↑(volumeForm o) ![x, y]\n[PROOFSTEP]\nsimp [areaForm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(↑(areaForm o) x) x = 0\n[PROOFSTEP]\nrw [areaForm_to_volumeForm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(volumeForm o) ![x, x] = 0\n[PROOFSTEP]\nrefine' o.volumeForm.map_eq_zero_of_eq ![x, x] _ (_ : (0 : Fin 2) ≠ 1)\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ Matrix.vecCons x ![x] 0 = Matrix.vecCons x ![x] 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ 0 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) x) y = -↑(↑(areaForm o) y) x\n[PROOFSTEP]\nsimp only [areaForm_to_volumeForm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(volumeForm o) ![x, y] = -↑(volumeForm o) ![y, x]\n[PROOFSTEP]\nconvert o.volumeForm.map_swap ![y, x] (_ : (0 : Fin 2) ≠ 1)\n[GOAL]\ncase h.e'_2.h.e'_6\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ![x, y] = ![y, x] ∘ ↑(Equiv.swap 0 1)\n[PROOFSTEP]\next i\n[GOAL]\ncase h.e'_2.h.e'_6.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\ni : Fin (Nat.succ 1)\n⊢ Matrix.vecCons x ![y] i = (![y, x] ∘ ↑(Equiv.swap 0 1)) i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.e'_2.h.e'_6.h.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < Nat.succ 1) } =\n    (![y, x] ∘ ↑(Equiv.swap 0 1)) { val := 0, isLt := (_ : 0 < Nat.succ 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_2.h.e'_6.h.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < Nat.succ 1) 1) } =\n    (![y, x] ∘ ↑(Equiv.swap 0 1)) { val := 1, isLt := (_ : (fun a => a < Nat.succ 1) 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ 0 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ areaForm (-o) = -areaForm o\n[PROOFSTEP]\next x y\n[GOAL]\ncase h.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm (-o)) x) y = ↑(↑(-areaForm o) x) y\n[PROOFSTEP]\nsimp [areaForm_to_volumeForm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ |↑(↑(areaForm o) x) y| ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimpa [areaForm_to_volumeForm, Fin.prod_univ_succ] using o.abs_volumeForm_apply_le ![x, y]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) x) y ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimpa [areaForm_to_volumeForm, Fin.prod_univ_succ] using o.volumeForm_apply_le ![x, y]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\n⊢ |↑(↑(areaForm o) x) y| = ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [o.areaForm_to_volumeForm, o.abs_volumeForm_apply_of_pairwise_orthogonal]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\n⊢ (Finset.prod Finset.univ fun i => ‖Matrix.vecCons x ![y] i‖) = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimp [Fin.prod_univ_succ]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\n⊢ Pairwise fun i j => inner (Matrix.vecCons x ![y] i) (Matrix.vecCons x ![y] j) = 0\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\ni j : Fin 2\nhij : i ≠ j\n⊢ inner (Matrix.vecCons x ![y] i) (Matrix.vecCons x ![y] j) = 0\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nj : Fin 2\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ j\n⊢ inner (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) }) (Matrix.vecCons x ![y] j) = 0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nj : Fin 2\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ j\n⊢ inner (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) }) (Matrix.vecCons x ![y] j) = 0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase head.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ { val := 0, isLt := (_ : 0 < 2) }\n⊢ inner (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) })\n      (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase head.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n⊢ inner (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) })\n      (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase tail.head.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ { val := 0, isLt := (_ : 0 < 2) }\n⊢ inner (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (Matrix.vecCons x ![y] { val := 0, isLt := (_ : 0 < 2) }) =\n    0\n[PROOFSTEP]\nsimpa [real_inner_comm] using h\n[GOAL]\ncase tail.head.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nh : inner x y = 0\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n⊢ inner (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (Matrix.vecCons x ![y] { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ ↑(↑(areaForm (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    ↑(↑(areaForm o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y)\n[PROOFSTEP]\nhave : φ.symm ∘ ![x, y] = ![φ.symm x, φ.symm y] := by\n  ext i\n  fin_cases i <;> rfl\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ ↑(LinearIsometryEquiv.symm φ) ∘ ![x, y] = ![↑(LinearIsometryEquiv.symm φ) x, ↑(LinearIsometryEquiv.symm φ) y]\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\ni : Fin (Nat.succ (Nat.succ 0))\n⊢ (↑(LinearIsometryEquiv.symm φ) ∘ ![x, y]) i =\n    Matrix.vecCons (↑(LinearIsometryEquiv.symm φ) x) ![↑(LinearIsometryEquiv.symm φ) y] i\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase h.head\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ (↑(LinearIsometryEquiv.symm φ) ∘ ![x, y]) { val := 0, isLt := (_ : 0 < Nat.succ (Nat.succ 0)) } =\n    Matrix.vecCons (↑(LinearIsometryEquiv.symm φ) x) ![↑(LinearIsometryEquiv.symm φ) y]\n      { val := 0, isLt := (_ : 0 < Nat.succ (Nat.succ 0)) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.tail.head\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ (↑(LinearIsometryEquiv.symm φ) ∘ ![x, y]) { val := 1, isLt := (_ : (fun a => a < Nat.succ (Nat.succ 0)) 1) } =\n    Matrix.vecCons (↑(LinearIsometryEquiv.symm φ) x) ![↑(LinearIsometryEquiv.symm φ) y]\n      { val := 1, isLt := (_ : (fun a => a < Nat.succ (Nat.succ 0)) 1) }\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\nthis : ↑(LinearIsometryEquiv.symm φ) ∘ ![x, y] = ![↑(LinearIsometryEquiv.symm φ) x, ↑(LinearIsometryEquiv.symm φ) y]\n⊢ ↑(↑(areaForm (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    ↑(↑(areaForm o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y)\n[PROOFSTEP]\nsimp [areaForm_to_volumeForm, volumeForm_map, this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ ↑(↑(areaForm o) (↑φ x)) (↑φ y) = ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nconvert o.areaForm_map φ (φ x) (φ y)\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ o = ↑(map (Fin 2) φ.toLinearEquiv) o\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ ↑(map (Fin 2) φ.toLinearEquiv) o = o\n[PROOFSTEP]\nrwa [← o.map_eq_iff_det_pos φ.toLinearEquiv] at hφ \n[GOAL]\ncase h.e'_2.h.e'_5.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ Fintype.card (Fin 2) = finrank ℝ E\n[PROOFSTEP]\nrw [@Fact.out (finrank ℝ E = 2), Fintype.card_fin]\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_6\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ x = ↑(LinearIsometryEquiv.symm φ) (↑φ x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_6\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ y = ↑(LinearIsometryEquiv.symm φ) (↑φ y)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner (↑(rightAngleRotationAux₁ o) x) y = ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nsimp only [rightAngleRotationAux₁, LinearEquiv.trans_symm, LinearIsometryEquiv.toLinearEquiv_symm, LinearMap.coe_comp,\n  LinearEquiv.coe_coe, Function.comp_apply, LinearEquiv.trans_apply, LinearIsometryEquiv.coe_toLinearEquiv]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner\n      (↑(LinearIsometryEquiv.symm (InnerProductSpace.toDual ℝ E))\n        (↑(LinearEquiv.symm (LinearEquiv.symm LinearMap.toContinuousLinearMap)) (↑(areaForm o) x)))\n      y =\n    ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nrw [InnerProductSpace.toDual_symm_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(LinearEquiv.symm (LinearEquiv.symm LinearMap.toContinuousLinearMap)) (↑(areaForm o) x)) y = ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner x (↑(rightAngleRotationAux₁ o) y) = -↑(↑(areaForm o) x) y\n[PROOFSTEP]\nrw [real_inner_comm]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner (↑(rightAngleRotationAux₁ o) y) x = -↑(↑(areaForm o) x) y\n[PROOFSTEP]\nsimp [o.areaForm_swap y x]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\n⊢ ‖↑{ toAddHom := src✝.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : ℝ) (x : E),\n                  AddHom.toFun src✝.toAddHom (r • x) = ↑(RingHom.id ℝ) r • AddHom.toFun src✝.toAddHom x) }\n        x‖ =\n    ‖x‖\n[PROOFSTEP]\ndsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\n⊢ ‖↑(rightAngleRotationAux₁ o) x‖ = ‖x‖\n[PROOFSTEP]\nrefine' le_antisymm _ _\n[GOAL]\ncase refine'_1\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\n⊢ ‖↑(rightAngleRotationAux₁ o) x‖ ≤ ‖x‖\n[PROOFSTEP]\ncases' eq_or_lt_of_le (norm_nonneg (o.rightAngleRotationAux₁ x)) with h h\n[GOAL]\ncase refine'_1.inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nh : 0 = ‖↑(rightAngleRotationAux₁ o) x‖\n⊢ ‖↑(rightAngleRotationAux₁ o) x‖ ≤ ‖x‖\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase refine'_1.inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nh : 0 = ‖↑(rightAngleRotationAux₁ o) x‖\n⊢ 0 ≤ ‖x‖\n[PROOFSTEP]\npositivity\n[GOAL]\ncase refine'_1.inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nh : 0 < ‖↑(rightAngleRotationAux₁ o) x‖\n⊢ ‖↑(rightAngleRotationAux₁ o) x‖ ≤ ‖x‖\n[PROOFSTEP]\nrefine' le_of_mul_le_mul_right _ h\n[GOAL]\ncase refine'_1.inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nh : 0 < ‖↑(rightAngleRotationAux₁ o) x‖\n⊢ ‖↑(rightAngleRotationAux₁ o) x‖ * ‖↑(rightAngleRotationAux₁ o) x‖ ≤ ‖x‖ * ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nrw [← real_inner_self_eq_norm_mul_norm, o.inner_rightAngleRotationAux₁_left]\n[GOAL]\ncase refine'_1.inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nh : 0 < ‖↑(rightAngleRotationAux₁ o) x‖\n⊢ ↑(↑(areaForm o) x) (↑(rightAngleRotationAux₁ o) x) ≤ ‖x‖ * ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nexact o.areaForm_le x (o.rightAngleRotationAux₁ x)\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nlet K : Submodule ℝ E := ℝ ∙ x\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nhave : Nontrivial Kᗮ := by\n  apply @FiniteDimensional.nontrivial_of_finrank_pos ℝ\n  have : finrank ℝ K ≤ Finset.card { x } := by\n    rw [← Set.toFinset_singleton]\n    exact finrank_span_le_card ({ x } : Set E)\n  have : Finset.card { x } = 1 := Finset.card_singleton x\n  have : finrank ℝ K + finrank ℝ Kᗮ = finrank ℝ E := K.finrank_add_finrank_orthogonal\n  have : finrank ℝ E = 2 := Fact.out\n  linarith\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\n⊢ Nontrivial { x // x ∈ Kᗮ }\n[PROOFSTEP]\napply @FiniteDimensional.nontrivial_of_finrank_pos ℝ\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\n⊢ 0 < finrank ℝ { x // x ∈ Kᗮ }\n[PROOFSTEP]\nhave : finrank ℝ K ≤ Finset.card { x } := by\n  rw [← Set.toFinset_singleton]\n  exact finrank_span_le_card ({ x } : Set E)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\n⊢ finrank ℝ { x // x ∈ K } ≤ Finset.card {x}\n[PROOFSTEP]\nrw [← Set.toFinset_singleton]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\n⊢ finrank ℝ { x // x ∈ K } ≤ Finset.card (Set.toFinset {x})\n[PROOFSTEP]\nexact finrank_span_le_card ({ x } : Set E)\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : finrank ℝ { x // x ∈ K } ≤ Finset.card {x}\n⊢ 0 < finrank ℝ { x // x ∈ Kᗮ }\n[PROOFSTEP]\nhave : Finset.card { x } = 1 := Finset.card_singleton x\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis✝ : finrank ℝ { x // x ∈ K } ≤ Finset.card {x}\nthis : Finset.card {x} = 1\n⊢ 0 < finrank ℝ { x // x ∈ Kᗮ }\n[PROOFSTEP]\nhave : finrank ℝ K + finrank ℝ Kᗮ = finrank ℝ E := K.finrank_add_finrank_orthogonal\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis✝¹ : finrank ℝ { x // x ∈ K } ≤ Finset.card {x}\nthis✝ : Finset.card {x} = 1\nthis : finrank ℝ { x // x ∈ K } + finrank ℝ { x // x ∈ Kᗮ } = finrank ℝ E\n⊢ 0 < finrank ℝ { x // x ∈ Kᗮ }\n[PROOFSTEP]\nhave : finrank ℝ E = 2 := Fact.out\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis✝² : finrank ℝ { x // x ∈ K } ≤ Finset.card {x}\nthis✝¹ : Finset.card {x} = 1\nthis✝ : finrank ℝ { x // x ∈ K } + finrank ℝ { x // x ∈ Kᗮ } = finrank ℝ E\nthis : finrank ℝ E = 2\n⊢ 0 < finrank ℝ { x // x ∈ Kᗮ }\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase refine'_2\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nobtain ⟨w, hw₀⟩ : ∃ w : Kᗮ, w ≠ 0 := exists_ne 0\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nhave hw' : ⟪x, (w : E)⟫ = 0 := Submodule.mem_orthogonal_singleton_iff_inner_right.mp w.2\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nhave hw : (w : E) ≠ 0 := fun h => hw₀ (Submodule.coe_eq_zero.mp h)\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\nhw : ↑w ≠ 0\n⊢ ‖x‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖\n[PROOFSTEP]\nrefine' le_of_mul_le_mul_right _ (by rwa [norm_pos_iff] : 0 < ‖(w : E)‖)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\nhw : ↑w ≠ 0\n⊢ 0 < ‖↑w‖\n[PROOFSTEP]\nrwa [norm_pos_iff]\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\nhw : ↑w ≠ 0\n⊢ ‖x‖ * ‖↑w‖ ≤ ‖↑(rightAngleRotationAux₁ o) x‖ * ‖↑w‖\n[PROOFSTEP]\nrw [← o.abs_areaForm_of_orthogonal hw']\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\nhw : ↑w ≠ 0\n⊢ |↑(↑(areaForm o) x) ↑w| ≤ ‖↑(rightAngleRotationAux₁ o) x‖ * ‖↑w‖\n[PROOFSTEP]\nrw [← o.inner_rightAngleRotationAux₁_left x w]\n[GOAL]\ncase refine'_2.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nsrc✝ : E →ₗ[ℝ] E := rightAngleRotationAux₁ o\nx : E\nK : Submodule ℝ E := Submodule.span ℝ {x}\nthis : Nontrivial { x // x ∈ Kᗮ }\nw : { x // x ∈ Kᗮ }\nhw₀ : w ≠ 0\nhw' : inner x ↑w = 0\nhw : ↑w ≠ 0\n⊢ |inner (↑(rightAngleRotationAux₁ o) x) ↑w| ≤ ‖↑(rightAngleRotationAux₁ o) x‖ * ‖↑w‖\n[PROOFSTEP]\nexact abs_real_inner_le_norm (o.rightAngleRotationAux₁ x) w\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(rightAngleRotationAux₁ o) (↑(rightAngleRotationAux₁ o) x) = -x\n[PROOFSTEP]\napply ext_inner_left ℝ\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ∀ (v : (fun x => E) (↑(rightAngleRotationAux₁ o) x)),\n    inner v (↑(rightAngleRotationAux₁ o) (↑(rightAngleRotationAux₁ o) x)) = inner v (-x)\n[PROOFSTEP]\nintro y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\ny : (fun x => E) (↑(rightAngleRotationAux₁ o) x)\n⊢ inner y (↑(rightAngleRotationAux₁ o) (↑(rightAngleRotationAux₁ o) x)) = inner y (-x)\n[PROOFSTEP]\nhave : ⟪o.rightAngleRotationAux₁ y, o.rightAngleRotationAux₁ x⟫ = ⟪y, x⟫ :=\n  LinearIsometry.inner_map_map o.rightAngleRotationAux₂ y x\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\ny : (fun x => E) (↑(rightAngleRotationAux₁ o) x)\nthis : inner (↑(rightAngleRotationAux₁ o) y) (↑(rightAngleRotationAux₁ o) x) = inner y x\n⊢ inner y (↑(rightAngleRotationAux₁ o) (↑(rightAngleRotationAux₁ o) x)) = inner y (-x)\n[PROOFSTEP]\nrw [o.inner_rightAngleRotationAux₁_right, ← o.inner_rightAngleRotationAux₁_left, this, inner_neg_right]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx✝ : E\n⊢ ↑(LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o)) x✝ = ↑LinearMap.id x✝\n[PROOFSTEP]\nsimp [rightAngleRotationAux₂]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx✝ : E\n⊢ ↑(LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap) x✝ = ↑LinearMap.id x✝\n[PROOFSTEP]\nsimp [rightAngleRotationAux₂]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner (↑(rightAngleRotation o) x) y = ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nrw [rightAngleRotation]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner\n      (↑(LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n            (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n            (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id))\n        x)\n      y =\n    ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nexact o.inner_rightAngleRotationAux₁_left x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner x (↑(rightAngleRotation o) y) = -↑(↑(areaForm o) x) y\n[PROOFSTEP]\nrw [rightAngleRotation]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner x\n      (↑(LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n            (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n            (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id))\n        y) =\n    -↑(↑(areaForm o) x) y\n[PROOFSTEP]\nexact o.inner_rightAngleRotationAux₁_right x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(rightAngleRotation o) (↑(rightAngleRotation o) x) = -x\n[PROOFSTEP]\nrw [rightAngleRotation]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n          (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n          (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id))\n      (↑(LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n            (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n            (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id))\n        x) =\n    -x\n[PROOFSTEP]\nexact o.rightAngleRotationAux₁_rightAngleRotationAux₁ x\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ LinearIsometryEquiv.symm (rightAngleRotation o) =\n    LinearIsometryEquiv.trans (rightAngleRotation o) (LinearIsometryEquiv.neg ℝ)\n[PROOFSTEP]\nrw [rightAngleRotation]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ LinearIsometryEquiv.symm\n      (LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n        (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n        (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id)) =\n    LinearIsometryEquiv.trans\n      (LinearIsometryEquiv.ofLinearIsometry (rightAngleRotationAux₂ o) (-rightAngleRotationAux₁ o)\n        (_ : LinearMap.comp (rightAngleRotationAux₂ o).toLinearMap (-rightAngleRotationAux₁ o) = LinearMap.id)\n        (_ : LinearMap.comp (-rightAngleRotationAux₁ o) (rightAngleRotationAux₂ o).toLinearMap = LinearMap.id))\n      (LinearIsometryEquiv.neg ℝ)\n[PROOFSTEP]\nexact LinearIsometryEquiv.toLinearIsometry_injective rfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ inner (↑(rightAngleRotation o) x) x = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner x (↑(rightAngleRotation o) y) = -inner (↑(rightAngleRotation o) x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner (↑(rightAngleRotation o) x) y = -inner x (↑(rightAngleRotation o) y)\n[PROOFSTEP]\nsimp [o.inner_rightAngleRotation_swap x y]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) (↑(rightAngleRotation o) x)) y = -inner x y\n[PROOFSTEP]\nrw [← o.inner_comp_rightAngleRotation, o.inner_rightAngleRotation_right, neg_neg]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) x) (↑(rightAngleRotation o) y) = inner x y\n[PROOFSTEP]\nrw [← o.inner_rightAngleRotation_left, o.inner_comp_rightAngleRotation]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm o) (↑(rightAngleRotation o) x)) (↑(rightAngleRotation o) y) = ↑(↑(areaForm o) x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\n⊢ LinearIsometryEquiv.trans (rightAngleRotation o) (rightAngleRotation o) = LinearIsometryEquiv.neg ℝ\n[PROOFSTEP]\next\n[GOAL]\ncase h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx✝ : E\n⊢ ↑(LinearIsometryEquiv.trans (rightAngleRotation o) (rightAngleRotation o)) x✝ = ↑(LinearIsometryEquiv.neg ℝ) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(rightAngleRotation (-o)) x = -↑(rightAngleRotation o) x\n[PROOFSTEP]\napply ext_inner_right ℝ\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ∀ (v : E), inner (↑(rightAngleRotation (-o)) x) v = inner (-↑(rightAngleRotation o) x) v\n[PROOFSTEP]\nintro y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ inner (↑(rightAngleRotation (-o)) x) y = inner (-↑(rightAngleRotation o) x) y\n[PROOFSTEP]\nrw [inner_rightAngleRotation_left]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(areaForm (-o)) x) y = inner (-↑(rightAngleRotation o) x) y\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx : F\n⊢ ↑(rightAngleRotation (↑(map (Fin 2) φ.toLinearEquiv) o)) x =\n    ↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))\n[PROOFSTEP]\napply ext_inner_right ℝ\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx : F\n⊢ ∀ (v : F),\n    inner (↑(rightAngleRotation (↑(map (Fin 2) φ.toLinearEquiv) o)) x) v =\n      inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) v\n[PROOFSTEP]\nintro y\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ inner (↑(rightAngleRotation (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) y\n[PROOFSTEP]\nrw [inner_rightAngleRotation_left]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ ↑(↑(areaForm (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) y\n[PROOFSTEP]\ntrans ⟪J (φ.symm x), φ.symm y⟫\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ ↑(↑(areaForm (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    inner (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y)\n[PROOFSTEP]\nsimp [o.areaForm_map]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ inner (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y) =\n    inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) y\n[PROOFSTEP]\ntrans ⟪φ (J (φ.symm x)), φ (φ.symm y)⟫\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ inner (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y) =\n    inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) (↑φ (↑(LinearIsometryEquiv.symm φ) y))\n[PROOFSTEP]\nrw [φ.inner_map_map]\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) (↑φ (↑(LinearIsometryEquiv.symm φ) y)) =\n    inner (↑φ (↑(rightAngleRotation o) (↑(LinearIsometryEquiv.symm φ) x))) y\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx : E\n⊢ ↑φ (↑(rightAngleRotation o) x) = ↑(rightAngleRotation o) (↑φ x)\n[PROOFSTEP]\nconvert (o.rightAngleRotation_map φ (φ x)).symm\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_6\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx : E\n⊢ x = ↑(LinearIsometryEquiv.symm φ) (↑φ x)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx : E\n⊢ o = ↑(map (Fin 2) φ.toLinearEquiv) o\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx : E\n⊢ ↑(map (Fin 2) φ.toLinearEquiv) o = o\n[PROOFSTEP]\nrwa [← o.map_eq_iff_det_pos φ.toLinearEquiv] at hφ \n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_5\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx : E\n⊢ Fintype.card (Fin 2) = finrank ℝ E\n[PROOFSTEP]\nrw [@Fact.out (finrank ℝ E = 2), Fintype.card_fin]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\ni : Fin 2\n⊢ Matrix.vecCons x ![↑(rightAngleRotation o) x] i ≠ 0\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\n⊢ Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) } ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\n⊢ Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\n⊢ ∀ (i j : Fin 2),\n    i ≠ j →\n      inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] i) (Matrix.vecCons x ![↑(rightAngleRotation o) x] j) = 0\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\ni j : Fin 2\nhij : i ≠ j\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] i) (Matrix.vecCons x ![↑(rightAngleRotation o) x] j) = 0\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nj : Fin 2\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ j\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] j) =\n    0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nj : Fin 2\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ j\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] j) =\n    0\n[PROOFSTEP]\nfin_cases j\n[GOAL]\ncase head.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ { val := 0, isLt := (_ : 0 < 2) }\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase head.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nhij : { val := 0, isLt := (_ : 0 < 2) } ≠ { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase tail.head.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ { val := 0, isLt := (_ : 0 < 2) }\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 0, isLt := (_ : 0 < 2) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase tail.head.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : x ≠ 0\nhij : { val := 1, isLt := (_ : (fun a => a < 2) 1) } ≠ { val := 1, isLt := (_ : (fun a => a < 2) 1) }\n⊢ inner (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n      (Matrix.vecCons x ![↑(rightAngleRotation o) x] { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\n⊢ inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a = ‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : a = 0\n⊢ inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a = ‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a = ‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x\n[PROOFSTEP]\napply (o.basisRightAngleRotation a ha).ext\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ∀ (i : Fin 2),\n    ↑(inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a) (↑(basisRightAngleRotation o a ha) i) =\n      ↑(‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x) (↑(basisRightAngleRotation o a ha) i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\ni : Fin 2\n⊢ ↑(inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a) (↑(basisRightAngleRotation o a ha) i) =\n    ↑(‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x) (↑(basisRightAngleRotation o a ha) i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase neg.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a)\n      (↑(basisRightAngleRotation o a ha) { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑(‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x) (↑(basisRightAngleRotation o a ha) { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nsimp only [Fin.mk_zero, coe_basisRightAngleRotation, Matrix.cons_val_zero, LinearMap.add_apply, LinearMap.smul_apply,\n  innerₛₗ_apply, real_inner_self_eq_norm_sq, smul_eq_mul, areaForm_apply_self, mul_zero, add_zero, Real.rpow_two,\n  real_inner_comm]\n[GOAL]\ncase neg.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ inner a x * ‖a‖ ^ 2 = ‖a‖ ^ 2 * inner a x\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(inner a x • ↑(innerₛₗ ℝ) a + ↑(↑(areaForm o) a) x • ↑(areaForm o) a)\n      (↑(basisRightAngleRotation o a ha) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑(‖a‖ ^ 2 • ↑(innerₛₗ ℝ) x) (↑(basisRightAngleRotation o a ha) { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nsimp only [Fin.mk_one, coe_basisRightAngleRotation, Matrix.cons_val_one, Matrix.head_cons, LinearMap.add_apply,\n  LinearMap.smul_apply, innerₛₗ_apply, inner_rightAngleRotation_right, areaForm_apply_self, neg_zero, smul_eq_mul,\n  mul_zero, areaForm_rightAngleRotation_right, real_inner_self_eq_norm_sq, zero_add, Real.rpow_two, mul_neg]\n[GOAL]\ncase neg.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(↑(areaForm o) a) x * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * ↑(↑(areaForm o) x) a)\n[PROOFSTEP]\nrw [o.areaForm_swap]\n[GOAL]\ncase neg.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ -↑(↑(areaForm o) x) a * ‖a‖ ^ 2 = -(‖a‖ ^ 2 * ↑(↑(areaForm o) x) a)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na b : E\n⊢ inner a b ^ 2 + ↑(↑(areaForm o) a) b ^ 2 = ‖a‖ ^ 2 * ‖b‖ ^ 2\n[PROOFSTEP]\nsimpa [sq, real_inner_self_eq_norm_sq] using o.inner_mul_inner_add_areaForm_mul_areaForm a b b\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\n⊢ inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a = ‖a‖ ^ 2 • ↑(areaForm o) x\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : a = 0\n⊢ inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a = ‖a‖ ^ 2 • ↑(areaForm o) x\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a = ‖a‖ ^ 2 • ↑(areaForm o) x\n[PROOFSTEP]\napply (o.basisRightAngleRotation a ha).ext\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ∀ (i : Fin 2),\n    ↑(inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a) (↑(basisRightAngleRotation o a ha) i) =\n      ↑(‖a‖ ^ 2 • ↑(areaForm o) x) (↑(basisRightAngleRotation o a ha) i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\ni : Fin 2\n⊢ ↑(inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a) (↑(basisRightAngleRotation o a ha) i) =\n    ↑(‖a‖ ^ 2 • ↑(areaForm o) x) (↑(basisRightAngleRotation o a ha) i)\n[PROOFSTEP]\nfin_cases i\n[GOAL]\ncase neg.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a)\n      (↑(basisRightAngleRotation o a ha) { val := 0, isLt := (_ : 0 < 2) }) =\n    ↑(‖a‖ ^ 2 • ↑(areaForm o) x) (↑(basisRightAngleRotation o a ha) { val := 0, isLt := (_ : 0 < 2) })\n[PROOFSTEP]\nsimp only [o.areaForm_swap a x, neg_smul, sub_neg_eq_add, Fin.mk_zero, coe_basisRightAngleRotation,\n  Matrix.cons_val_zero, LinearMap.add_apply, LinearMap.smul_apply, areaForm_apply_self, smul_eq_mul, mul_zero,\n  innerₛₗ_apply, real_inner_self_eq_norm_sq, zero_add, Real.rpow_two]\n[GOAL]\ncase neg.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(↑(areaForm o) x) a * ‖a‖ ^ 2 = ‖a‖ ^ 2 * ↑(↑(areaForm o) x) a\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ ↑(inner a x • ↑(areaForm o) a - ↑(↑(areaForm o) a) x • ↑(innerₛₗ ℝ) a)\n      (↑(basisRightAngleRotation o a ha) { val := 1, isLt := (_ : (fun a => a < 2) 1) }) =\n    ↑(‖a‖ ^ 2 • ↑(areaForm o) x) (↑(basisRightAngleRotation o a ha) { val := 1, isLt := (_ : (fun a => a < 2) 1) })\n[PROOFSTEP]\nsimp only [Fin.mk_one, coe_basisRightAngleRotation, Matrix.cons_val_one, Matrix.head_cons, LinearMap.sub_apply,\n  LinearMap.smul_apply, areaForm_rightAngleRotation_right, real_inner_self_eq_norm_sq, smul_eq_mul, innerₛₗ_apply,\n  inner_rightAngleRotation_right, areaForm_apply_self, neg_zero, mul_zero, sub_zero, Real.rpow_two, real_inner_comm]\n[GOAL]\ncase neg.tail.head\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x : E\nha : ¬a = 0\n⊢ inner a x * ‖a‖ ^ 2 = ‖a‖ ^ 2 * inner a x\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 ↔ SameRay ℝ x y\n[PROOFSTEP]\nby_cases hx : x = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : x = 0\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 ↔ SameRay ℝ x y\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 ↔ SameRay ℝ x y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase neg.mp\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 → SameRay ℝ x y\n[PROOFSTEP]\nlet a : ℝ := (o.basisRightAngleRotation x hx).repr y 0\n[GOAL]\ncase neg.mp\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 → SameRay ℝ x y\n[PROOFSTEP]\nlet b : ℝ := (o.basisRightAngleRotation x hx).repr y 1\n[GOAL]\ncase neg.mp\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 → SameRay ℝ x y\n[PROOFSTEP]\nsuffices ↑0 ≤ a * ‖x‖ ^ 2 ∧ b * ‖x‖ ^ 2 = 0 → SameRay ℝ x (a • x + b • J x)\n  by\n  rw [← (o.basisRightAngleRotation x hx).sum_repr y]\n  simp only [Fin.sum_univ_succ, coe_basisRightAngleRotation, Matrix.cons_val_zero, Fin.succ_zero_eq_one',\n    Fintype.univ_of_isEmpty, Finset.sum_empty, areaForm_apply_self, map_smul, map_add, real_inner_smul_right,\n    inner_add_right, Matrix.cons_val_one, Matrix.head_cons, Algebra.id.smul_eq_mul, areaForm_rightAngleRotation_right,\n    mul_zero, add_zero, zero_add, neg_zero, inner_rightAngleRotation_right, real_inner_self_eq_norm_sq]\n  exact this\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nthis : 0 ≤ a * ‖x‖ ^ 2 ∧ b * ‖x‖ ^ 2 = 0 → SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0 → SameRay ℝ x y\n[PROOFSTEP]\nrw [← (o.basisRightAngleRotation x hx).sum_repr y]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nthis : 0 ≤ a * ‖x‖ ^ 2 ∧ b * ‖x‖ ^ 2 = 0 → SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n⊢ 0 ≤\n        inner x\n          (Finset.sum Finset.univ fun i =>\n            ↑(↑(basisRightAngleRotation o x hx).repr y) i • ↑(basisRightAngleRotation o x hx) i) ∧\n      ↑(↑(areaForm o) x)\n          (Finset.sum Finset.univ fun i =>\n            ↑(↑(basisRightAngleRotation o x hx).repr y) i • ↑(basisRightAngleRotation o x hx) i) =\n        0 →\n    SameRay ℝ x\n      (Finset.sum Finset.univ fun i =>\n        ↑(↑(basisRightAngleRotation o x hx).repr y) i • ↑(basisRightAngleRotation o x hx) i)\n[PROOFSTEP]\nsimp only [Fin.sum_univ_succ, coe_basisRightAngleRotation, Matrix.cons_val_zero, Fin.succ_zero_eq_one',\n  Fintype.univ_of_isEmpty, Finset.sum_empty, areaForm_apply_self, map_smul, map_add, real_inner_smul_right,\n  inner_add_right, Matrix.cons_val_one, Matrix.head_cons, Algebra.id.smul_eq_mul, areaForm_rightAngleRotation_right,\n  mul_zero, add_zero, zero_add, neg_zero, inner_rightAngleRotation_right, real_inner_self_eq_norm_sq]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nthis : 0 ≤ a * ‖x‖ ^ 2 ∧ b * ‖x‖ ^ 2 = 0 → SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n⊢ 0 ≤ ↑(↑(basisRightAngleRotation o x hx).repr y) 0 * ‖x‖ ^ 2 ∧\n      ↑(↑(basisRightAngleRotation o x hx).repr y) 1 * ‖x‖ ^ 2 = 0 →\n    SameRay ℝ x\n      (↑(↑(basisRightAngleRotation o x hx).repr y) 0 • x +\n        ↑(↑(basisRightAngleRotation o x hx).repr y) 1 • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nexact this\n[GOAL]\ncase neg.mp\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\n⊢ 0 ≤ a * ‖x‖ ^ 2 ∧ b * ‖x‖ ^ 2 = 0 → SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nrintro ⟨ha, hb⟩\n[GOAL]\ncase neg.mp.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\n⊢ SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nhave hx' : 0 < ‖x‖ := by simpa using hx\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\n⊢ 0 < ‖x‖\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\ncase neg.mp.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\nhx' : 0 < ‖x‖\n⊢ SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nhave ha' : 0 ≤ a := nonneg_of_mul_nonneg_left ha (by positivity)\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\nhx' : 0 < ‖x‖\n⊢ 0 < ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\ncase neg.mp.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\nhx' : 0 < ‖x‖\nha' : 0 ≤ a\n⊢ SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nhave hb' : b = 0 := eq_zero_of_ne_zero_of_mul_right_eq_zero (pow_ne_zero 2 hx'.ne') hb\n[GOAL]\ncase neg.mp.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\na : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 0\nb : ℝ := ↑(↑(basisRightAngleRotation o x hx).repr y) 1\nha : 0 ≤ a * ‖x‖ ^ 2\nhb : b * ‖x‖ ^ 2 = 0\nhx' : 0 < ‖x‖\nha' : 0 ≤ a\nhb' : b = 0\n⊢ SameRay ℝ x (a • x + b • ↑(rightAngleRotation o) x)\n[PROOFSTEP]\nsimpa [hb'] using SameRay.sameRay_nonneg_smul_right x ha'\n[GOAL]\ncase neg.mpr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\n⊢ SameRay ℝ x y → 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase neg.mpr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ¬x = 0\nh : SameRay ℝ x y\n⊢ 0 ≤ inner x y ∧ ↑(↑(areaForm o) x) y = 0\n[PROOFSTEP]\nobtain ⟨r, hr, rfl⟩ := h.exists_nonneg_left hx\n[GOAL]\ncase neg.mpr.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : ¬x = 0\nr : ℝ\nhr : 0 ≤ r\nh : SameRay ℝ x (r • x)\n⊢ 0 ≤ inner x (r • x) ∧ ↑(↑(areaForm o) x) (r • x) = 0\n[PROOFSTEP]\nsimp only [inner_smul_right, real_inner_self_eq_norm_sq, LinearMap.map_smulₛₗ, areaForm_apply_self,\n  Algebra.id.smul_eq_mul, mul_zero, eq_self_iff_true, and_true_iff]\n[GOAL]\ncase neg.mpr.intro.intro\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\nhx : ¬x = 0\nr : ℝ\nhr : 0 ≤ r\nh : SameRay ℝ x (r • x)\n⊢ 0 ≤ r * ‖x‖ ^ 2\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) x) y = ↑(starRingEnd ((fun x => ℂ) x)) (↑(↑(kahler o) y) x)\n[PROOFSTEP]\nhave : ∀ r : ℝ, Complex.ofReal' r = @IsROrC.ofReal ℂ _ r := fun r => rfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nthis : ∀ (r : ℝ), ↑r = ↑r\n⊢ ↑(↑(kahler o) x) y = ↑(starRingEnd ((fun x => ℂ) x)) (↑(↑(kahler o) y) x)\n[PROOFSTEP]\nsimp only [kahler_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nthis : ∀ (r : ℝ), ↑r = ↑r\n⊢ ↑(inner x y) + ↑(↑(areaForm o) x) y • Complex.I = ↑(starRingEnd ℂ) (↑(inner y x) + ↑(↑(areaForm o) y) x • Complex.I)\n[PROOFSTEP]\nrw [real_inner_comm, areaForm_swap]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nthis : ∀ (r : ℝ), ↑r = ↑r\n⊢ ↑(inner y x) + -↑(↑(areaForm o) y) x • Complex.I = ↑(starRingEnd ℂ) (↑(inner y x) + ↑(↑(areaForm o) y) x • Complex.I)\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(↑(kahler o) x) x = ↑(‖x‖ ^ 2)\n[PROOFSTEP]\nsimp [kahler_apply_apply, real_inner_self_eq_norm_sq]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) (↑(rightAngleRotation o) x)) y = -Complex.I * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [o.areaForm_rightAngleRotation_left, o.inner_rightAngleRotation_left, o.kahler_apply_apply,\n  Complex.ofReal_neg, Complex.real_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(↑(areaForm o) x) y) + -↑(inner x y) * Complex.I =\n    -Complex.I * (↑(inner x y) + ↑(↑(↑(areaForm o) x) y) * Complex.I)\n[PROOFSTEP]\nlinear_combination ω x y * Complex.I_sq\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) x) (↑(rightAngleRotation o) y) = Complex.I * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [o.areaForm_rightAngleRotation_right, o.inner_rightAngleRotation_right, o.kahler_apply_apply,\n  Complex.ofReal_neg, Complex.real_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ -↑(↑(↑(areaForm o) x) y) + ↑(inner x y) * Complex.I = Complex.I * (↑(inner x y) + ↑(↑(↑(areaForm o) x) y) * Complex.I)\n[PROOFSTEP]\nlinear_combination -ω x y * Complex.I_sq\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) (↑(rightAngleRotation o) x)) (↑(rightAngleRotation o) y) = ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp only [kahler_rightAngleRotation_left, kahler_rightAngleRotation_right]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ Complex.I * (-Complex.I * ↑(↑(kahler o) x) y) = ↑(↑(kahler o) x) y\n[PROOFSTEP]\nlinear_combination -o.kahler x y * Complex.I_sq\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ -(Complex.I * (Complex.I * ↑(↑(kahler o) x) y)) = ↑(↑(kahler o) x) y\n[PROOFSTEP]\nlinear_combination -o.kahler x y * Complex.I_sq\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler (-o)) x) y = ↑(starRingEnd ((fun x => ℂ) y)) (↑(↑(kahler o) x) y)\n[PROOFSTEP]\nhave : ∀ r : ℝ, Complex.ofReal' r = @IsROrC.ofReal ℂ _ r := fun r => rfl\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nthis : ∀ (r : ℝ), ↑r = ↑r\n⊢ ↑(↑(kahler (-o)) x) y = ↑(starRingEnd ((fun x => ℂ) y)) (↑(↑(kahler o) x) y)\n[PROOFSTEP]\nsimp [kahler_apply_apply, this]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ ↑(↑(kahler o) x) a * ↑(↑(kahler o) a) y = ↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\ntrans (↑(‖a‖ ^ 2) : ℂ) * o.kahler x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ ↑(↑(kahler o) x) a * ↑(↑(kahler o) a) y = ↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\next\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (↑(↑(kahler o) x) a * ↑(↑(kahler o) a) y).re = (↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y).re\n[PROOFSTEP]\nsimp only [o.kahler_apply_apply, Complex.add_im, Complex.add_re, Complex.I_im, Complex.I_re, Complex.mul_im,\n  Complex.mul_re, Complex.ofReal_im, Complex.ofReal_re, Complex.real_smul]\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (inner x a + (↑(↑(areaForm o) x) a * 0 - 0 * 1)) * (inner a y + (↑(↑(areaForm o) a) y * 0 - 0 * 1)) -\n      (0 + (↑(↑(areaForm o) x) a * 1 + 0 * 0)) * (0 + (↑(↑(areaForm o) a) y * 1 + 0 * 0)) =\n    ‖a‖ ^ 2 * (inner x y + (↑(↑(areaForm o) x) y * 0 - 0 * 1)) - 0 * (0 + (↑(↑(areaForm o) x) y * 1 + 0 * 0))\n[PROOFSTEP]\nrw [real_inner_comm a x, o.areaForm_swap x a]\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (inner a x + (-↑(↑(areaForm o) a) x * 0 - 0 * 1)) * (inner a y + (↑(↑(areaForm o) a) y * 0 - 0 * 1)) -\n      (0 + (-↑(↑(areaForm o) a) x * 1 + 0 * 0)) * (0 + (↑(↑(areaForm o) a) y * 1 + 0 * 0)) =\n    ‖a‖ ^ 2 * (inner x y + (↑(↑(areaForm o) x) y * 0 - 0 * 1)) - 0 * (0 + (↑(↑(areaForm o) x) y * 1 + 0 * 0))\n[PROOFSTEP]\nlinear_combination o.inner_mul_inner_add_areaForm_mul_areaForm a x y\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (↑(↑(kahler o) x) a * ↑(↑(kahler o) a) y).im = (↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y).im\n[PROOFSTEP]\nsimp only [o.kahler_apply_apply, Complex.add_im, Complex.add_re, Complex.I_im, Complex.I_re, Complex.mul_im,\n  Complex.mul_re, Complex.ofReal_im, Complex.ofReal_re, Complex.real_smul]\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (inner x a + (↑(↑(areaForm o) x) a * 0 - 0 * 1)) * (0 + (↑(↑(areaForm o) a) y * 1 + 0 * 0)) +\n      (0 + (↑(↑(areaForm o) x) a * 1 + 0 * 0)) * (inner a y + (↑(↑(areaForm o) a) y * 0 - 0 * 1)) =\n    ‖a‖ ^ 2 * (0 + (↑(↑(areaForm o) x) y * 1 + 0 * 0)) + 0 * (inner x y + (↑(↑(areaForm o) x) y * 0 - 0 * 1))\n[PROOFSTEP]\nrw [real_inner_comm a x, o.areaForm_swap x a]\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ (inner a x + (-↑(↑(areaForm o) a) x * 0 - 0 * 1)) * (0 + (↑(↑(areaForm o) a) y * 1 + 0 * 0)) +\n      (0 + (-↑(↑(areaForm o) a) x * 1 + 0 * 0)) * (inner a y + (↑(↑(areaForm o) a) y * 0 - 0 * 1)) =\n    ‖a‖ ^ 2 * (0 + (↑(↑(areaForm o) x) y * 1 + 0 * 0)) + 0 * (inner x y + (↑(↑(areaForm o) x) y * 0 - 0 * 1))\n[PROOFSTEP]\nlinear_combination o.inner_mul_areaForm_sub a x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\na x y : E\n⊢ ↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y = ↑(‖a‖ ^ 2) * ↑(↑(kahler o) x) y\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑Complex.normSq (↑(↑(kahler o) x) y) = ‖x‖ ^ 2 * ‖y‖ ^ 2\n[PROOFSTEP]\nsimpa [kahler_apply_apply, Complex.normSq, sq] using o.inner_sq_add_areaForm_sq x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑Complex.abs (↑(↑(kahler o) x) y) = ‖x‖ * ‖y‖\n[PROOFSTEP]\nrw [← sq_eq_sq, Complex.sq_abs]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑Complex.normSq (↑(↑(kahler o) x) y) = (‖x‖ * ‖y‖) ^ 2\n[PROOFSTEP]\nlinear_combination o.normSq_kahler x y\n[GOAL]\ncase ha\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ 0 ≤ ↑Complex.abs (↑(↑(kahler o) x) y)\n[PROOFSTEP]\npositivity\n[GOAL]\ncase hb\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ 0 ≤ ‖x‖ * ‖y‖\n[PROOFSTEP]\npositivity\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ‖↑(↑(kahler o) x) y‖ = ‖x‖ * ‖y‖\n[PROOFSTEP]\nsimpa using o.abs_kahler x y\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nhave : ‖x‖ * ‖y‖ = 0 := by simpa [hx] using (o.norm_kahler x y).symm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\n⊢ ‖x‖ * ‖y‖ = 0\n[PROOFSTEP]\nsimpa [hx] using (o.norm_kahler x y).symm\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\nthis : ‖x‖ * ‖y‖ = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\ncases' eq_zero_or_eq_zero_of_mul_eq_zero this with h h\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\nthis : ‖x‖ * ‖y‖ = 0\nh : ‖x‖ = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\nthis : ‖x‖ * ‖y‖ = 0\nh : ‖x‖ = 0\n⊢ x = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\nthis : ‖x‖ * ‖y‖ = 0\nh : ‖y‖ = 0\n⊢ x = 0 ∨ y = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : ↑(↑(kahler o) x) y = 0\nthis : ‖x‖ * ‖y‖ = 0\nh : ‖y‖ = 0\n⊢ y = 0\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) x) y = 0 ↔ x = 0 ∨ y = 0\n[PROOFSTEP]\nrefine' ⟨o.eq_zero_or_eq_zero_of_kahler_eq_zero, _⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ x = 0 ∨ y = 0 → ↑(↑(kahler o) x) y = 0\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\ny : E\n⊢ ↑(↑(kahler o) 0) y = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(↑(kahler o) x) 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ↑(↑(kahler o) x) y ≠ 0\n[PROOFSTEP]\napply mt o.eq_zero_or_eq_zero_of_kahler_eq_zero\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\nhx : x ≠ 0\nhy : y ≠ 0\n⊢ ¬(x = 0 ∨ y = 0)\n[PROOFSTEP]\ntauto\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) x) y ≠ 0 ↔ x ≠ 0 ∧ y ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, fun h => o.kahler_ne_zero h.1 h.2⟩\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ↑(↑(kahler o) x) y ≠ 0 → x ≠ 0 ∧ y ≠ 0\n[PROOFSTEP]\ncontrapose\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ ¬(x ≠ 0 ∧ y ≠ 0) → ¬↑(↑(kahler o) x) y ≠ 0\n[PROOFSTEP]\nsimp only [not_and_or, Classical.not_not, kahler_apply_apply, Complex.real_smul]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx y : E\n⊢ x = 0 ∨ y = 0 → ↑(inner x y) + ↑(↑(↑(areaForm o) x) y) * Complex.I = 0\n[PROOFSTEP]\nrintro (rfl | rfl)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\ny : E\n⊢ ↑(inner 0 y) + ↑(↑(↑(areaForm o) 0) y) * Complex.I = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nx : E\n⊢ ↑(inner x 0) + ↑(↑(↑(areaForm o) x) 0) * Complex.I = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁴ : NormedAddCommGroup E\ninst✝³ : InnerProductSpace ℝ E\ninst✝² : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nF : Type u_2\ninst✝¹ : NormedAddCommGroup F\ninst✝ : InnerProductSpace ℝ F\nhF : Fact (finrank ℝ F = 2)\nφ : E ≃ₗᵢ[ℝ] F\nx y : F\n⊢ ↑(↑(kahler (↑(map (Fin 2) φ.toLinearEquiv) o)) x) y =\n    ↑(↑(kahler o) (↑(LinearIsometryEquiv.symm φ) x)) (↑(LinearIsometryEquiv.symm φ) y)\n[PROOFSTEP]\nsimp [kahler_apply_apply, areaForm_map]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nφ : E ≃ₗᵢ[ℝ] E\nhφ : 0 < ↑LinearMap.det ↑φ.toLinearEquiv\nx y : E\n⊢ ↑(↑(kahler o) (↑φ x)) (↑φ y) = ↑(↑(kahler o) x) y\n[PROOFSTEP]\nsimp [kahler_apply_apply, o.areaForm_comp_linearIsometryEquiv φ hφ]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nw z : ℂ\n⊢ ↑(↑(Orientation.areaForm Complex.orientation) w) z = (↑(starRingEnd ℂ) w * z).im\n[PROOFSTEP]\nlet o := Complex.orientation\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no✝ : Orientation ℝ E (Fin 2)\nw z : ℂ\no : Orientation ℝ ℂ (Fin 2) := Complex.orientation\n⊢ ↑(↑(Orientation.areaForm Complex.orientation) w) z = (↑(starRingEnd ℂ) w * z).im\n[PROOFSTEP]\nsimp only [o.areaForm_to_volumeForm, o.volumeForm_robust Complex.orthonormalBasisOneI rfl, (Basis.det_apply),\n  Matrix.det_fin_two, (Basis.toMatrix_apply), toBasis_orthonormalBasisOneI, Matrix.cons_val_zero, coe_basisOneI_repr,\n  Matrix.cons_val_one, Matrix.head_cons, mul_im, conj_re, conj_im]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no✝ : Orientation ℝ E (Fin 2)\nw z : ℂ\no : Orientation ℝ ℂ (Fin 2) := Complex.orientation\n⊢ w.re * z.im - z.re * w.im = w.re * z.im + -w.im * z.re\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz : ℂ\n⊢ ↑(Orientation.rightAngleRotation Complex.orientation) z = I * z\n[PROOFSTEP]\napply ext_inner_right ℝ\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz : ℂ\n⊢ ∀ (v : ℂ), inner (↑(Orientation.rightAngleRotation Complex.orientation) z) v = inner (I * z) v\n[PROOFSTEP]\nintro w\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz w : ℂ\n⊢ inner (↑(Orientation.rightAngleRotation Complex.orientation) z) w = inner (I * z) w\n[PROOFSTEP]\nrw [Orientation.inner_rightAngleRotation_left]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz w : ℂ\n⊢ ↑(↑(Orientation.areaForm Complex.orientation) z) w = inner (I * z) w\n[PROOFSTEP]\nsimp only [Complex.areaForm, Complex.inner, mul_re, mul_im, conj_re, conj_im, map_mul, conj_I, neg_re, neg_im, I_re,\n  I_im]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nz w : ℂ\n⊢ z.re * w.im + -z.im * w.re = (-0 * z.re - -1 * -z.im) * w.re - (-0 * -z.im + -1 * z.re) * w.im\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nw z : ℂ\n⊢ ↑(↑(Orientation.kahler Complex.orientation) w) z = ↑(starRingEnd ℂ) w * z\n[PROOFSTEP]\nrw [Orientation.kahler_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nw z : ℂ\n⊢ ↑(inner w z) + ↑(↑(Orientation.areaForm Complex.orientation) w) z • I = ↑(starRingEnd ℂ) w * z\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nw z : ℂ\n⊢ (↑(inner w z) + ↑(↑(Orientation.areaForm Complex.orientation) w) z • I).re = (↑(starRingEnd ℂ) w * z).re\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nw z : ℂ\n⊢ (↑(inner w z) + ↑(↑(Orientation.areaForm Complex.orientation) w) z • I).im = (↑(starRingEnd ℂ) w * z).im\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(areaForm o) x) y = (↑(starRingEnd ℂ) (↑f x) * ↑f y).im\n[PROOFSTEP]\nrw [← Complex.areaForm, ← hf, areaForm_map (hF := _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(areaForm o) x) y = ↑(↑(areaForm o) (↑(LinearIsometryEquiv.symm f) (↑f x))) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\niterate 2 rw [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(areaForm o) x) y = ↑(↑(areaForm o) (↑(LinearIsometryEquiv.symm f) (↑f x))) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(areaForm o) x) y = ↑(↑(areaForm o) x) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx : E\n⊢ ↑f (↑(rightAngleRotation o) x) = I * ↑f x\n[PROOFSTEP]\nrw [← Complex.rightAngleRotation, ← hf, rightAngleRotation_map (hF := _), LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(kahler o) x) y = ↑(starRingEnd ℂ) (↑f x) * ↑f y\n[PROOFSTEP]\nrw [← Complex.kahler, ← hf, kahler_map (hF := _)]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(kahler o) x) y = ↑(↑(kahler o) (↑(LinearIsometryEquiv.symm f) (↑f x))) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\niterate 2 rw [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(kahler o) x) y = ↑(↑(kahler o) (↑(LinearIsometryEquiv.symm f) (↑f x))) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝² : NormedAddCommGroup E\ninst✝¹ : InnerProductSpace ℝ E\ninst✝ : Fact (finrank ℝ E = 2)\no : Orientation ℝ E (Fin 2)\nf : E ≃ₗᵢ[ℝ] ℂ\nhf : ↑(map (Fin 2) f.toLinearEquiv) o = Complex.orientation\nx y : E\n⊢ ↑(↑(kahler o) x) y = ↑(↑(kahler o) x) (↑(LinearIsometryEquiv.symm f) (↑f y))\n[PROOFSTEP]\nrw [LinearIsometryEquiv.symm_apply_apply]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.InnerProductSpace.TwoDim", "llama_tokens": 41954, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5544704649604273, "lm_q2_score": 0.523420348936324, "lm_q1q2_score": 0.2902211242444727}}
{"text": "[GOAL]\nX : Type u_1\nx : X\n⊢ AddMonoidHom.comp toFreeAbelianGroup (singleAddHom x) =\n    ↑(AddMonoidHom.flip (smulAddHom ℤ (FreeAbelianGroup X))) (of x)\n[PROOFSTEP]\next\n[GOAL]\ncase h1\nX : Type u_1\nx : X\n⊢ ↑(AddMonoidHom.comp toFreeAbelianGroup (singleAddHom x)) 1 =\n    ↑(↑(AddMonoidHom.flip (smulAddHom ℤ (FreeAbelianGroup X))) (of x)) 1\n[PROOFSTEP]\nsimp only [AddMonoidHom.coe_comp, Finsupp.singleAddHom_apply, Function.comp_apply, one_smul, toFreeAbelianGroup,\n  Finsupp.liftAddHom_apply_single]\n[GOAL]\nX : Type u_1\n⊢ AddMonoidHom.comp toFinsupp toFreeAbelianGroup = AddMonoidHom.id (X →₀ ℤ)\n[PROOFSTEP]\next x y\n[GOAL]\ncase H.h1.h\nX : Type u_1\nx y : X\n⊢ ↑(↑(AddMonoidHom.comp (AddMonoidHom.comp toFinsupp toFreeAbelianGroup) (singleAddHom x)) 1) y =\n    ↑(↑(AddMonoidHom.comp (AddMonoidHom.id (X →₀ ℤ)) (singleAddHom x)) 1) y\n[PROOFSTEP]\nsimp only [AddMonoidHom.id_comp]\n[GOAL]\ncase H.h1.h\nX : Type u_1\nx y : X\n⊢ ↑(↑(AddMonoidHom.comp (AddMonoidHom.comp toFinsupp toFreeAbelianGroup) (singleAddHom x)) 1) y =\n    ↑(↑(singleAddHom x) 1) y\n[PROOFSTEP]\nrw [AddMonoidHom.comp_assoc, Finsupp.toFreeAbelianGroup_comp_singleAddHom]\n[GOAL]\ncase H.h1.h\nX : Type u_1\nx y : X\n⊢ ↑(↑(AddMonoidHom.comp toFinsupp (↑(AddMonoidHom.flip (smulAddHom ℤ (FreeAbelianGroup X))) (of x))) 1) y =\n    ↑(↑(singleAddHom x) 1) y\n[PROOFSTEP]\nsimp only [toFinsupp, AddMonoidHom.coe_comp, Finsupp.singleAddHom_apply, Function.comp_apply, one_smul, lift.of,\n  AddMonoidHom.flip_apply, smulAddHom_apply, AddMonoidHom.id_apply]\n[GOAL]\nX : Type u_1\n⊢ AddMonoidHom.comp toFreeAbelianGroup toFinsupp = AddMonoidHom.id (FreeAbelianGroup X)\n[PROOFSTEP]\next\n[GOAL]\ncase H\nX : Type u_1\nx✝ : X\n⊢ ↑(AddMonoidHom.comp toFreeAbelianGroup toFinsupp) (of x✝) = ↑(AddMonoidHom.id (FreeAbelianGroup X)) (of x✝)\n[PROOFSTEP]\nrw [toFreeAbelianGroup, toFinsupp, AddMonoidHom.comp_apply, lift.of, liftAddHom_apply_single, AddMonoidHom.flip_apply,\n  smulAddHom_apply, one_smul, AddMonoidHom.id_apply]\n[GOAL]\nX✝ : Type u_1\nX : Type u_2\nx : FreeAbelianGroup X\n⊢ ↑toFreeAbelianGroup (↑toFinsupp x) = x\n[PROOFSTEP]\nrw [← AddMonoidHom.comp_apply, Finsupp.toFreeAbelianGroup_comp_toFinsupp, AddMonoidHom.id_apply]\n[GOAL]\nX : Type u_1\nx : X\n⊢ ↑toFinsupp (of x) = single x 1\n[PROOFSTEP]\nsimp only [toFinsupp, lift.of]\n[GOAL]\nX : Type u_1\nf : X →₀ ℤ\n⊢ ↑toFinsupp (↑toFreeAbelianGroup f) = f\n[PROOFSTEP]\nrw [← AddMonoidHom.comp_apply, toFinsupp_comp_toFreeAbelianGroup, AddMonoidHom.id_apply]\n[GOAL]\nX : Type u_1\nx : X\na : FreeAbelianGroup X\n⊢ x ∈ support a ↔ ↑(coeff x) a ≠ 0\n[PROOFSTEP]\nrw [support, Finsupp.mem_support_iff]\n[GOAL]\nX : Type u_1\nx : X\na : FreeAbelianGroup X\n⊢ ↑(↑toFinsupp a) x ≠ 0 ↔ ↑(coeff x) a ≠ 0\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nX : Type u_1\nx : X\na : FreeAbelianGroup X\n⊢ ¬x ∈ support a ↔ ↑(coeff x) a = 0\n[PROOFSTEP]\nrw [support, Finsupp.not_mem_support_iff]\n[GOAL]\nX : Type u_1\nx : X\na : FreeAbelianGroup X\n⊢ ↑(↑toFinsupp a) x = 0 ↔ ↑(coeff x) a = 0\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\nX : Type u_1\n⊢ support 0 = ∅\n[PROOFSTEP]\nsimp only [support, Finsupp.support_zero, AddMonoidHom.map_zero]\n[GOAL]\nX : Type u_1\nx : X\n⊢ support (of x) = {x}\n[PROOFSTEP]\nrw [support, toFinsupp_of, Finsupp.support_single_ne_zero _ one_ne_zero]\n[GOAL]\nX : Type u_1\na : FreeAbelianGroup X\n⊢ support (-a) = support a\n[PROOFSTEP]\nsimp only [support, AddMonoidHom.map_neg, Finsupp.support_neg]\n[GOAL]\nX : Type u_1\nk : ℤ\nh : k ≠ 0\na : FreeAbelianGroup X\n⊢ support (k • a) = support a\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nX : Type u_1\nk : ℤ\nh : k ≠ 0\na : FreeAbelianGroup X\nx : X\n⊢ x ∈ support (k • a) ↔ x ∈ support a\n[PROOFSTEP]\nsimp only [mem_support_iff, AddMonoidHom.map_zsmul]\n[GOAL]\ncase a\nX : Type u_1\nk : ℤ\nh : k ≠ 0\na : FreeAbelianGroup X\nx : X\n⊢ k • ↑(coeff x) a ≠ 0 ↔ ↑(coeff x) a ≠ 0\n[PROOFSTEP]\nsimp only [h, zsmul_int_int, false_or_iff, Ne.def, mul_eq_zero]\n[GOAL]\nX : Type u_1\nk : ℕ\nh : k ≠ 0\na : FreeAbelianGroup X\n⊢ support (k • a) = support a\n[PROOFSTEP]\napply support_zsmul k _ a\n[GOAL]\nX : Type u_1\nk : ℕ\nh : k ≠ 0\na : FreeAbelianGroup X\n⊢ ↑k ≠ 0\n[PROOFSTEP]\nexact_mod_cast h\n[GOAL]\nX : Type u_1\na b : FreeAbelianGroup X\n⊢ support (a + b) ⊆ support a ∪ support b\n[PROOFSTEP]\nsimp only [support, AddMonoidHom.map_add]\n[GOAL]\nX : Type u_1\na b : FreeAbelianGroup X\n⊢ (↑toFinsupp a + ↑toFinsupp b).support ⊆ (↑toFinsupp a).support ∪ (↑toFinsupp b).support\n[PROOFSTEP]\napply Finsupp.support_add\n", "meta": {"mathlib_filename": "Mathlib.GroupTheory.FreeAbelianGroupFinsupp", "llama_tokens": 2091, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.519521321952093, "lm_q2_score": 0.5583269943353745, "lm_q1q2_score": 0.2900627781786525}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj j' : J\n⊢ (fun j => F.map (Bicone.ι b j)) j ≫ (fun j => F.map (Bicone.π b j)) j' =\n    if h : j = j' then eqToHom (_ : (F.obj ∘ f) j = (F.obj ∘ f) j') else 0\n[PROOFSTEP]\nrw [← F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj j' : J\n⊢ F.map (Bicone.ι b j ≫ Bicone.π b j') = if h : j = j' then eqToHom (_ : (F.obj ∘ f) j = (F.obj ∘ f) j') else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj j' : J\nh : j = j'\n⊢ F.map (Bicone.ι b j ≫ Bicone.π b j') = eqToHom (_ : (F.obj ∘ f) j = (F.obj ∘ f) j')\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj : J\n⊢ F.map (Bicone.ι b j ≫ Bicone.π b j) = eqToHom (_ : (F.obj ∘ f) j = (F.obj ∘ f) j)\n[PROOFSTEP]\nsimp only [bicone_ι_π_self, CategoryTheory.Functor.map_id, eqToHom_refl]\n[GOAL]\ncase pos\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj : J\n⊢ 𝟙 (F.obj (f j)) = 𝟙 ((F.obj ∘ f) j)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase neg\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\nb : Bicone f\nj j' : J\nh : ¬j = j'\n⊢ F.map (Bicone.ι b j ≫ Bicone.π b j') = 0\n[PROOFSTEP]\nrw [bicone_ι_π_ne _ h, F.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nX Y : C\nb : BinaryBicone X Y\n⊢ F.map b.inl ≫ F.map b.fst = 𝟙 (F.obj X)\n[PROOFSTEP]\nrw [← F.map_comp, b.inl_fst, F.map_id]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nX Y : C\nb : BinaryBicone X Y\n⊢ F.map b.inl ≫ F.map b.snd = 0\n[PROOFSTEP]\nrw [← F.map_comp, b.inl_snd, F.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nX Y : C\nb : BinaryBicone X Y\n⊢ F.map b.inr ≫ F.map b.fst = 0\n[PROOFSTEP]\nrw [← F.map_comp, b.inr_fst, F.map_zero]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝ : PreservesZeroMorphisms F\nX Y : C\nb : BinaryBicone X Y\n⊢ F.map b.inr ≫ F.map b.snd = 𝟙 (F.obj Y)\n[PROOFSTEP]\nrw [← F.map_comp, b.inr_snd, F.map_id]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : PreservesBiproducts F\nJ : Type\nx✝ : Fintype J\n⊢ PreservesBiproductsOfShape J F\n[PROOFSTEP]\nletI := preservesBiproductsShrink.{0} F\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\ninst✝ : PreservesBiproducts F\nJ : Type\nx✝ : Fintype J\nthis : PreservesBiproducts F := preservesBiproductsShrink F\n⊢ PreservesBiproductsOfShape J F\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n          (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).π\n      j =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n              (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom ≫\n      NatTrans.app (BinaryBicone.toCone (mapBinaryBicone F b)).π j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n          (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).π\n      { as := WalkingPair.left } =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n              (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom ≫\n      NatTrans.app (BinaryBicone.toCone (mapBinaryBicone F b)).π { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ NatTrans.app\n      ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n          (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).π\n      { as := WalkingPair.right } =\n    (Iso.refl\n          ((Cones.postcompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).hom).obj\n              (Bicone.toCone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom ≫\n      NatTrans.app (BinaryBicone.toCone (mapBinaryBicone F b)).π { as := WalkingPair.right }\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✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\nj : Discrete WalkingPair\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n            (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).ι\n        j ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n              (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom =\n    NatTrans.app (BinaryBicone.toCocone (mapBinaryBicone F b)).ι j\n[PROOFSTEP]\nrcases j with ⟨⟨⟩⟩\n[GOAL]\ncase mk.left\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n            (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).ι\n        { as := WalkingPair.left } ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n              (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom =\n    NatTrans.app (BinaryBicone.toCocone (mapBinaryBicone F b)).ι { as := WalkingPair.left }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.right\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasZeroMorphisms D\nF : C ⥤ D\ninst✝¹ : PreservesZeroMorphisms F\nX Y : C\ninst✝ : PreservesBiproduct (pairFunction X Y) F\nb : BinaryBicone X Y\nhb : BinaryBicone.IsBilimit b\n⊢ NatTrans.app\n        ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n            (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).ι\n        { as := WalkingPair.right } ≫\n      (Iso.refl\n          ((Cocones.precompose (diagramIsoPair (Discrete.functor (F.obj ∘ pairFunction X Y))).inv).obj\n              (Bicone.toCocone (mapBicone F (BinaryBicone.toBicone b)))).pt).hom =\n    NatTrans.app (BinaryBicone.toCocone (mapBinaryBicone F b)).ι { as := WalkingPair.right }\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✝³ : HasZeroMorphisms D\nJ : Type w₁\nF : C ⥤ D\nf : J → C\ninst✝² : HasBiproduct f\ninst✝¹ : HasBiproduct (F.obj ∘ f)\ninst✝ : PreservesZeroMorphisms F\n⊢ biproductComparison' F f ≫ biproductComparison F f = 𝟙 (⨁ F.obj ∘ f)\n[PROOFSTEP]\nclassical\next\nsimp [biproduct.ι_π, ← Functor.map_comp, eqToHom_map]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nJ : Type w₁\nF : C ⥤ D\nf : J → C\ninst✝² : HasBiproduct f\ninst✝¹ : HasBiproduct (F.obj ∘ f)\ninst✝ : PreservesZeroMorphisms F\n⊢ biproductComparison' F f ≫ biproductComparison F f = 𝟙 (⨁ F.obj ∘ f)\n[PROOFSTEP]\next\n[GOAL]\ncase w.w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nJ : Type w₁\nF : C ⥤ D\nf : J → C\ninst✝² : HasBiproduct f\ninst✝¹ : HasBiproduct (F.obj ∘ f)\ninst✝ : PreservesZeroMorphisms F\nj✝¹ j✝ : J\n⊢ biproduct.ι (F.obj ∘ f) j✝ ≫ (biproductComparison' F f ≫ biproductComparison F f) ≫ biproduct.π (F.obj ∘ f) j✝¹ =\n    biproduct.ι (F.obj ∘ f) j✝ ≫ 𝟙 (⨁ F.obj ∘ f) ≫ biproduct.π (F.obj ∘ f) j✝¹\n[PROOFSTEP]\nsimp [biproduct.ι_π, ← Functor.map_comp, eqToHom_map]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nJ : Type w₁\nF : C ⥤ D\nf : J → C\ninst✝² : HasBiproduct f\ninst✝¹ : HasBiproduct (F.obj ∘ f)\ninst✝ : PreservesZeroMorphisms F\n⊢ biproductComparison' F f ≫ biproductComparison F f = 𝟙 (⨁ F.obj ∘ f)\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nJ : Type w₁\nF : C ⥤ D\nf : J → C\ninst✝² : HasBiproduct f\ninst✝¹ : HasBiproduct (F.obj ∘ f)\ninst✝ : PreservesZeroMorphisms F\n⊢ biproductComparison' F f ≫ biproductComparison F f = 𝟙 (⨁ F.obj ∘ f)\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ biprodComparison' F X Y ≫ biprodComparison F X Y = 𝟙 (F.obj X ⊞ F.obj Y)\n[PROOFSTEP]\next\n[GOAL]\ncase h₀.h₀\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ (biprod.inl ≫ biprodComparison' F X Y ≫ biprodComparison F X Y) ≫ biprod.fst =\n    (biprod.inl ≫ 𝟙 (F.obj X ⊞ F.obj Y)) ≫ biprod.fst\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\ncase h₀.h₁\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ (biprod.inl ≫ biprodComparison' F X Y ≫ biprodComparison F X Y) ≫ biprod.snd =\n    (biprod.inl ≫ 𝟙 (F.obj X ⊞ F.obj Y)) ≫ biprod.snd\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\ncase h₁.h₀\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ (biprod.inr ≫ biprodComparison' F X Y ≫ biprodComparison F X Y) ≫ biprod.fst =\n    (biprod.inr ≫ 𝟙 (F.obj X ⊞ F.obj Y)) ≫ biprod.fst\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\ncase h₁.h₁\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ (biprod.inr ≫ biprodComparison' F X Y ≫ biprodComparison F X Y) ≫ biprod.snd =\n    (biprod.inr ≫ 𝟙 (F.obj X ⊞ F.obj Y)) ≫ biprod.snd\n[PROOFSTEP]\nsimp [← Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ biprodComparison' F X Y ≫ biprodComparison F X Y = 𝟙 (F.obj X ⊞ F.obj Y)\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\nX Y : C\ninst✝² : HasBinaryBiproduct X Y\ninst✝¹ : HasBinaryBiproduct (F.obj X) (F.obj Y)\ninst✝ : PreservesZeroMorphisms F\n⊢ biprodComparison' F X Y ≫ biprodComparison F X Y = 𝟙 (F.obj X ⊞ F.obj Y)\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → W ⟶ f j\n⊢ F.map (lift g) ≫ (mapBiproduct F f).hom = lift fun j => F.map (g j)\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → W ⟶ f j\nj : J\n⊢ (F.map (lift g) ≫ (mapBiproduct F f).hom) ≫ π (F.obj ∘ f) j = (lift fun j => F.map (g j)) ≫ π (F.obj ∘ f) j\n[PROOFSTEP]\ndsimp only [Function.comp]\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → W ⟶ f j\nj : J\n⊢ (F.map (lift g) ≫ (mapBiproduct F f).hom) ≫ π (fun x => F.obj (f x)) j =\n    (lift fun j => F.map (g j)) ≫ π (fun x => F.obj (f x)) j\n[PROOFSTEP]\nhaveI : HasBiproduct fun j => F.obj (f j) := hasBiproduct_of_preserves F f\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → W ⟶ f j\nj : J\nthis : HasBiproduct fun j => F.obj (f j)\n⊢ (F.map (lift g) ≫ (mapBiproduct F f).hom) ≫ π (fun x => F.obj (f x)) j =\n    (lift fun j => F.map (g j)) ≫ π (fun x => F.obj (f x)) j\n[PROOFSTEP]\nsimp only [mapBiproduct_hom, Category.assoc, biproduct.lift_π, ← F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → f j ⟶ W\n⊢ (mapBiproduct F f).inv ≫ F.map (desc g) = desc fun j => F.map (g j)\n[PROOFSTEP]\next j\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → f j ⟶ W\nj : J\n⊢ ι (F.obj ∘ f) j ≫ (mapBiproduct F f).inv ≫ F.map (desc g) = ι (F.obj ∘ f) j ≫ desc fun j => F.map (g j)\n[PROOFSTEP]\ndsimp only [Function.comp]\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → f j ⟶ W\nj : J\n⊢ ι (fun x => F.obj (f x)) j ≫ (mapBiproduct F f).inv ≫ F.map (desc g) =\n    ι (fun x => F.obj (f x)) j ≫ desc fun j => F.map (g j)\n[PROOFSTEP]\nhaveI : HasBiproduct fun j => F.obj (f j) := hasBiproduct_of_preserves F f\n[GOAL]\ncase w\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → f j ⟶ W\nj : J\nthis : HasBiproduct fun j => F.obj (f j)\n⊢ ι (fun x => F.obj (f x)) j ≫ (mapBiproduct F f).inv ≫ F.map (desc g) =\n    ι (fun x => F.obj (f x)) j ≫ desc fun j => F.map (g j)\n[PROOFSTEP]\nsimp only [mapBiproduct_inv, ← Category.assoc, biproduct.ι_desc, ← F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nJ : Type w₁\nf : J → C\ninst✝¹ : HasBiproduct f\ninst✝ : PreservesBiproduct f F\nW : C\ng : (j : J) → f j ⟶ W\n⊢ ((mapBiproduct F f).hom ≫ desc fun j => F.map (g j)) = F.map (desc g)\n[PROOFSTEP]\nrw [← biproduct.mapBiproduct_inv_map_desc, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : W ⟶ X\ng : W ⟶ Y\n⊢ F.map (lift f g) ≫ (mapBiprod F X Y).hom = lift (F.map f) (F.map g)\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : W ⟶ X\ng : W ⟶ Y\n⊢ (F.map (lift f g) ≫ (mapBiprod F X Y).hom) ≫ fst = lift (F.map f) (F.map g) ≫ fst\n[PROOFSTEP]\nsimp [mapBiprod, ← F.map_comp]\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : W ⟶ X\ng : W ⟶ Y\n⊢ (F.map (lift f g) ≫ (mapBiprod F X Y).hom) ≫ snd = lift (F.map f) (F.map g) ≫ snd\n[PROOFSTEP]\nsimp [mapBiprod, ← F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : W ⟶ X\ng : W ⟶ Y\n⊢ lift (F.map f) (F.map g) ≫ (mapBiprod F X Y).inv = F.map (lift f g)\n[PROOFSTEP]\nrw [← biprod.map_lift_mapBiprod, Category.assoc, Iso.hom_inv_id, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : X ⟶ W\ng : Y ⟶ W\n⊢ (mapBiprod F X Y).inv ≫ F.map (desc f g) = desc (F.map f) (F.map g)\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : X ⟶ W\ng : Y ⟶ W\n⊢ inl ≫ (mapBiprod F X Y).inv ≫ F.map (desc f g) = inl ≫ desc (F.map f) (F.map g)\n[PROOFSTEP]\nsimp [mapBiprod, ← F.map_comp]\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : X ⟶ W\ng : Y ⟶ W\n⊢ inr ≫ (mapBiprod F X Y).inv ≫ F.map (desc f g) = inr ≫ desc (F.map f) (F.map g)\n[PROOFSTEP]\nsimp [mapBiprod, ← F.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\ninst✝⁴ : HasZeroMorphisms C\ninst✝³ : HasZeroMorphisms D\nF : C ⥤ D\ninst✝² : PreservesZeroMorphisms F\nX Y : C\ninst✝¹ : HasBinaryBiproduct X Y\ninst✝ : PreservesBinaryBiproduct X Y F\nW : C\nf : X ⟶ W\ng : Y ⟶ W\n⊢ (mapBiprod F X Y).hom ≫ desc (F.map f) (F.map g) = F.map (desc f g)\n[PROOFSTEP]\nrw [← biprod.mapBiprod_inv_map_desc, Iso.hom_inv_id_assoc]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Shapes.Biproducts", "llama_tokens": 10936, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6859494550081925, "lm_q2_score": 0.42250463481418826, "lm_q1q2_score": 0.2898168239892278}}
{"text": "[GOAL]\nJ : Type u₁\ninst✝ : Fintype J\nj : Bicone J\n⊢ j ∈ List.toFinset [Bicone.left, Bicone.right] ∪ Finset.image Bicone.diagram Fintype.elems\n[PROOFSTEP]\ncases j\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Fintype J\n⊢ Bicone.left ∈ List.toFinset [Bicone.left, Bicone.right] ∪ Finset.image Bicone.diagram Fintype.elems\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Fintype J\n⊢ Bicone.right ∈ List.toFinset [Bicone.left, Bicone.right] ∪ Finset.image Bicone.diagram Fintype.elems\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Fintype J\nval✝ : J\n⊢ Bicone.diagram val✝ ∈ List.toFinset [Bicone.left, Bicone.right] ∪ Finset.image Bicone.diagram Fintype.elems\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Fintype J\nval✝ : J\n⊢ val✝ ∈ Fintype.elems\n[PROOFSTEP]\napply Fintype.complete\n[GOAL]\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj k : Bicone J\nf g : BiconeHom J j k\n⊢ Decidable (f = g)\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\ng : BiconeHom J Bicone.left Bicone.left\n⊢ Decidable (left_id = g)\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\ng : BiconeHom J Bicone.right Bicone.right\n⊢ Decidable (right_id = g)\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\ng : BiconeHom J Bicone.left (Bicone.diagram j✝)\n⊢ Decidable (left j✝ = g)\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\ng : BiconeHom J Bicone.right (Bicone.diagram j✝)\n⊢ Decidable (right j✝ = g)\n[PROOFSTEP]\ncases g\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\ng : BiconeHom J (Bicone.diagram j✝) (Bicone.diagram k✝)\n⊢ Decidable (diagram f✝ = g)\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left_id.left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ Decidable (left_id = left_id)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id.right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ Decidable (right_id = right_id)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ Decidable (left j✝ = left j✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ Decidable (right j✝ = right j✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝¹ f✝ : j✝ ⟶ k✝\n⊢ Decidable (diagram f✝¹ = diagram f✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left_id.left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase right_id.right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase left.left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase right.right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ Decidable True\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝¹ f✝ : j✝ ⟶ k✝\n⊢ Decidable (f✝¹ = f✝)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nX✝ Y✝ Z✝ : Bicone J\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ X✝ ⟶ Z✝\n[PROOFSTEP]\nrcases f with (_ | _ | _ | _ | f)\n[GOAL]\ncase left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\ng : Bicone.left ⟶ Z✝\n⊢ Bicone.left ⟶ Z✝\n[PROOFSTEP]\nexact g\n[GOAL]\ncase right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\ng : Bicone.right ⟶ Z✝\n⊢ Bicone.right ⟶ Z✝\n[PROOFSTEP]\nexact g\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Z✝\n⊢ Bicone.left ⟶ Z✝\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ Bicone.left ⟶ Bicone.diagram k✝\n[PROOFSTEP]\napply BiconeHom.left\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Z✝\n⊢ Bicone.right ⟶ Z✝\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ Bicone.right ⟶ Bicone.diagram k✝\n[PROOFSTEP]\napply BiconeHom.right\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ k✝ : J\nf : j✝ ⟶ k✝\ng : Bicone.diagram k✝ ⟶ Z✝\n⊢ Bicone.diagram j✝ ⟶ Z✝\n[PROOFSTEP]\nrcases g with (_ | _ | _ | _ | g)\n[GOAL]\ncase diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝¹ : J\nf : j✝ ⟶ k✝¹\nk✝ : J\ng : k✝¹ ⟶ k✝\n⊢ Bicone.diagram j✝ ⟶ Bicone.diagram k✝\n[PROOFSTEP]\nexact BiconeHom.diagram (f ≫ g)\n[GOAL]\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nX✝ Y✝ : Bicone J\nf : X✝ ⟶ Y✝\n⊢ 𝟙 X✝ ≫ f = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ 𝟙 Bicone.left ≫ BiconeHom.left_id = BiconeHom.left_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ 𝟙 Bicone.right ≫ BiconeHom.right_id = BiconeHom.right_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ 𝟙 Bicone.left ≫ BiconeHom.left j✝ = BiconeHom.left j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ 𝟙 Bicone.right ≫ BiconeHom.right j✝ = BiconeHom.right j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ 𝟙 (Bicone.diagram j✝) ≫ BiconeHom.diagram f✝ = BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nX✝ Y✝ : Bicone J\nf : X✝ ⟶ Y✝\n⊢ f ≫ 𝟙 Y✝ = f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ BiconeHom.left_id ≫ 𝟙 Bicone.left = BiconeHom.left_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ BiconeHom.right_id ≫ 𝟙 Bicone.right = BiconeHom.right_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ BiconeHom.left j✝ ≫ 𝟙 (Bicone.diagram j✝) = BiconeHom.left j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ BiconeHom.right j✝ ≫ 𝟙 (Bicone.diagram j✝) = BiconeHom.right j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ BiconeHom.diagram f✝ ≫ 𝟙 (Bicone.diagram k✝) = BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nW✝ X✝ Y✝ Z✝ : Bicone J\nf : W✝ ⟶ X✝\ng : X✝ ⟶ Y✝\nh : Y✝ ⟶ Z✝\n⊢ (f ≫ g) ≫ h = f ≫ g ≫ h\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nY✝ Z✝ : Bicone J\nh : Y✝ ⟶ Z✝\ng : Bicone.left ⟶ Y✝\n⊢ (BiconeHom.left_id ≫ g) ≫ h = BiconeHom.left_id ≫ g ≫ h\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nY✝ Z✝ : Bicone J\nh : Y✝ ⟶ Z✝\ng : Bicone.right ⟶ Y✝\n⊢ (BiconeHom.right_id ≫ g) ≫ h = BiconeHom.right_id ≫ g ≫ h\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nY✝ Z✝ : Bicone J\nh : Y✝ ⟶ Z✝\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Y✝\n⊢ (BiconeHom.left j✝ ≫ g) ≫ h = BiconeHom.left j✝ ≫ g ≫ h\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nY✝ Z✝ : Bicone J\nh : Y✝ ⟶ Z✝\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Y✝\n⊢ (BiconeHom.right j✝ ≫ g) ≫ h = BiconeHom.right j✝ ≫ g ≫ h\n[PROOFSTEP]\ncases g\n[GOAL]\ncase diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nY✝ Z✝ : Bicone J\nh : Y✝ ⟶ Z✝\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\ng : Bicone.diagram k✝ ⟶ Y✝\n⊢ (BiconeHom.diagram f✝ ≫ g) ≫ h = BiconeHom.diagram f✝ ≫ g ≫ h\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left_id.left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nh : Bicone.left ⟶ Z✝\n⊢ (BiconeHom.left_id ≫ BiconeHom.left_id) ≫ h = BiconeHom.left_id ≫ BiconeHom.left_id ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase left_id.left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ : J\nh : Bicone.diagram j✝ ⟶ Z✝\n⊢ (BiconeHom.left_id ≫ BiconeHom.left j✝) ≫ h = BiconeHom.left_id ≫ BiconeHom.left j✝ ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase right_id.right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nh : Bicone.right ⟶ Z✝\n⊢ (BiconeHom.right_id ≫ BiconeHom.right_id) ≫ h = BiconeHom.right_id ≫ BiconeHom.right_id ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase right_id.right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ : J\nh : Bicone.diagram j✝ ⟶ Z✝\n⊢ (BiconeHom.right_id ≫ BiconeHom.right j✝) ≫ h = BiconeHom.right_id ≫ BiconeHom.right j✝ ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase left.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\nh : Bicone.diagram k✝ ⟶ Z✝\n⊢ (BiconeHom.left j✝ ≫ BiconeHom.diagram f✝) ≫ h = BiconeHom.left j✝ ≫ BiconeHom.diagram f✝ ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase right.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\nh : Bicone.diagram k✝ ⟶ Z✝\n⊢ (BiconeHom.right j✝ ≫ BiconeHom.diagram f✝) ≫ h = BiconeHom.right j✝ ≫ BiconeHom.diagram f✝ ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nZ✝ : Bicone J\nj✝ k✝¹ : J\nf✝¹ : j✝ ⟶ k✝¹\nk✝ : J\nf✝ : k✝¹ ⟶ k✝\nh : Bicone.diagram k✝ ⟶ Z✝\n⊢ (BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝) ≫ h = BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝ ≫ h\n[PROOFSTEP]\ncases h\n[GOAL]\ncase left_id.left_id.left_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ (BiconeHom.left_id ≫ BiconeHom.left_id) ≫ BiconeHom.left_id =\n    BiconeHom.left_id ≫ BiconeHom.left_id ≫ BiconeHom.left_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left_id.left_id.left\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ (BiconeHom.left_id ≫ BiconeHom.left_id) ≫ BiconeHom.left j✝ =\n    BiconeHom.left_id ≫ BiconeHom.left_id ≫ BiconeHom.left j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left_id.left.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ (BiconeHom.left_id ≫ BiconeHom.left j✝) ≫ BiconeHom.diagram f✝ =\n    BiconeHom.left_id ≫ BiconeHom.left j✝ ≫ BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id.right_id.right_id\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\n⊢ (BiconeHom.right_id ≫ BiconeHom.right_id) ≫ BiconeHom.right_id =\n    BiconeHom.right_id ≫ BiconeHom.right_id ≫ BiconeHom.right_id\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id.right_id.right\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ : J\n⊢ (BiconeHom.right_id ≫ BiconeHom.right_id) ≫ BiconeHom.right j✝ =\n    BiconeHom.right_id ≫ BiconeHom.right_id ≫ BiconeHom.right j✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right_id.right.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ (BiconeHom.right_id ≫ BiconeHom.right j✝) ≫ BiconeHom.diagram f✝ =\n    BiconeHom.right_id ≫ BiconeHom.right j✝ ≫ BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝¹ : J\nf✝¹ : j✝ ⟶ k✝¹\nk✝ : J\nf✝ : k✝¹ ⟶ k✝\n⊢ (BiconeHom.left j✝ ≫ BiconeHom.diagram f✝¹) ≫ BiconeHom.diagram f✝ =\n    BiconeHom.left j✝ ≫ BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝¹ : J\nf✝¹ : j✝ ⟶ k✝¹\nk✝ : J\nf✝ : k✝¹ ⟶ k✝\n⊢ (BiconeHom.right j✝ ≫ BiconeHom.diagram f✝¹) ≫ BiconeHom.diagram f✝ =\n    BiconeHom.right j✝ ≫ BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram.diagram.diagram\nJ : Type u₁\ninst✝ : Category.{v₁, u₁} J\nj✝ k✝² : J\nf✝² : j✝ ⟶ k✝²\nk✝¹ : J\nf✝¹ : k✝² ⟶ k✝¹\nk✝ : J\nf✝ : k✝¹ ⟶ k✝\n⊢ (BiconeHom.diagram f✝² ≫ BiconeHom.diagram f✝¹) ≫ BiconeHom.diagram f✝ =\n    BiconeHom.diagram f✝² ≫ BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nX✝ Y✝ : Bicone J\nf : X✝ ⟶ Y✝\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X✝ ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y✝\n[PROOFSTEP]\nrcases f with (_ | _ | _ | _ | f)\n[GOAL]\ncase left_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase right_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right\n[PROOFSTEP]\nexact 𝟙 _\n[GOAL]\ncase left\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ : J\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j✝)\n[PROOFSTEP]\nexact c₁.π.app _\n[GOAL]\ncase right\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ : J\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j✝)\n[PROOFSTEP]\nexact c₂.π.app _\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ k✝ : J\nf : j✝ ⟶ k✝\n⊢ (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j✝) ⟶\n    (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram k✝)\n[PROOFSTEP]\nexact F.map f\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nX : Bicone J\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (𝟙 X) =\n    𝟙\n      ({ obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.obj\n        X)\n[PROOFSTEP]\ncases X\n[GOAL]\ncase left\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (𝟙 Bicone.left) =\n    𝟙\n      ({ obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.obj\n        Bicone.left)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (𝟙 Bicone.right) =\n    𝟙\n      ({ obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.obj\n        Bicone.right)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nval✝ : J\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (𝟙 (Bicone.diagram val✝)) =\n    𝟙\n      ({ obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.obj\n        (Bicone.diagram val✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nX✝ Y✝ Z✝ : Bicone J\nf : X✝ ⟶ Y✝\ng : Y✝ ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (f ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        f ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\nrcases f with (_ | _ | _ | _ | _)\n[GOAL]\ncase left_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nZ✝ : Bicone J\ng : Bicone.left ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.left_id ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        BiconeHom.left_id ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\nexact (Category.id_comp _).symm\n[GOAL]\ncase right_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nZ✝ : Bicone J\ng : Bicone.right ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.right_id ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        BiconeHom.right_id ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\nexact (Category.id_comp _).symm\n[GOAL]\ncase left\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nZ✝ : Bicone J\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.left j✝ ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.left j✝) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase left.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.left j✝ ≫ BiconeHom.diagram f✝) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.left j✝) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.diagram f✝)\n[PROOFSTEP]\nexact (Category.id_comp _).symm.trans (c₁.π.naturality _)\n[GOAL]\ncase right\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nZ✝ : Bicone J\nj✝ : J\ng : Bicone.diagram j✝ ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.right j✝ ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.right j✝) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase right.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.right j✝ ≫ BiconeHom.diagram f✝) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.right j✝) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.diagram f✝)\n[PROOFSTEP]\nexact (Category.id_comp _).symm.trans (c₂.π.naturality _)\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nZ✝ : Bicone J\nj✝ k✝ : J\nf✝ : j✝ ⟶ k✝\ng : Bicone.diagram k✝ ⟶ Z✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.diagram f✝ ≫ g) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.diagram f✝) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase diagram.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : J ⥤ C\nc₁ c₂ : Cone F\nj✝ k✝¹ : J\nf✝¹ : j✝ ⟶ k✝¹\nk✝ : J\nf✝ : k✝¹ ⟶ k✝\n⊢ { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n          map := fun {X Y} f =>\n            BiconeHom.casesOn (motive := fun a a_1 x =>\n              X = a →\n                Y = a_1 →\n                  HEq f x →\n                    ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                      (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n              f\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.left →\n                      HEq f BiconeHom.left_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.left_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                      (_ : Bicone.left = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.right →\n                      HEq f BiconeHom.right_id →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h =>\n                        (_ : BiconeHom.right_id = f) ▸\n                          𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                      (_ : Bicone.right = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.left j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.left ⟶ Y) →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.left = X) f)\n              (fun j h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram j →\n                      HEq f (BiconeHom.right j) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.right ⟶ Y) →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                  (_ : Bicone.right = X) f)\n              (fun {j k} f_1 h =>\n                Eq.ndrec (motive := fun {X} =>\n                  (f : X ⟶ Y) →\n                    Y = Bicone.diagram k →\n                      HEq f (BiconeHom.diagram f_1) →\n                        ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                          (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                  (fun f h =>\n                    Eq.ndrec (motive := fun {Y} =>\n                      (f : Bicone.diagram j ⟶ Y) →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                      (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                  (_ : Bicone.diagram j = X) f)\n              (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n      (BiconeHom.diagram f✝¹ ≫ BiconeHom.diagram f✝) =\n    { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.diagram f✝¹) ≫\n      { obj := fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j,\n            map := fun {X Y} f =>\n              BiconeHom.casesOn (motive := fun a a_1 x =>\n                X = a →\n                  Y = a_1 →\n                    HEq f x →\n                      ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                        (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                f\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.left →\n                        HEq f BiconeHom.left_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f BiconeHom.left_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.left_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left))\n                        (_ : Bicone.left = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.right →\n                        HEq f BiconeHom.right_id →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f BiconeHom.right_id →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h =>\n                          (_ : BiconeHom.right_id = f) ▸\n                            𝟙 ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right))\n                        (_ : Bicone.right = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.left j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.left ⟶ Y) →\n                          HEq f (BiconeHom.left j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.left ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.left j = f) ▸ NatTrans.app c₁.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.left = X) f)\n                (fun j h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram j →\n                        HEq f (BiconeHom.right j) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.right ⟶ Y) →\n                          HEq f (BiconeHom.right j) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Bicone.right ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.right j = f) ▸ NatTrans.app c₂.π j) (_ : Bicone.diagram j = Y) f)\n                    (_ : Bicone.right = X) f)\n                (fun {j k} f_1 h =>\n                  Eq.ndrec (motive := fun {X} =>\n                    (f : X ⟶ Y) →\n                      Y = Bicone.diagram k →\n                        HEq f (BiconeHom.diagram f_1) →\n                          ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) X ⟶\n                            (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                    (fun f h =>\n                      Eq.ndrec (motive := fun {Y} =>\n                        (f : Bicone.diagram j ⟶ Y) →\n                          HEq f (BiconeHom.diagram f_1) →\n                            ((fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) (Bicone.diagram j) ⟶\n                              (fun X => Bicone.casesOn X c₁.pt c₂.pt fun j => F.obj j) Y))\n                        (fun f h => (_ : BiconeHom.diagram f_1 = f) ▸ F.map f_1) (_ : Bicone.diagram k = Y) f)\n                    (_ : Bicone.diagram j = X) f)\n                (_ : X = X) (_ : Y = Y) (_ : HEq f f) }.map\n        (BiconeHom.diagram f✝)\n[PROOFSTEP]\napply F.map_comp\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nj k : Bicone J\n⊢ Fintype (j ⟶ k)\n[PROOFSTEP]\ncases j\n[GOAL]\ncase left\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nk : Bicone J\n⊢ Fintype (Bicone.left ⟶ k)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase right\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nk : Bicone J\n⊢ Fintype (Bicone.right ⟶ k)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nk : Bicone J\nval✝ : J\n⊢ Fintype (Bicone.diagram val✝ ⟶ k)\n[PROOFSTEP]\ncases k\n[GOAL]\ncase left.left\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ Fintype (Bicone.left ⟶ Bicone.left)\n[PROOFSTEP]\nexact\n  { elems := { BiconeHom.left_id }\n    complete := fun f => by cases f; simp }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nf : Bicone.left ⟶ Bicone.left\n⊢ f ∈ {BiconeHom.left_id}\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ BiconeHom.left_id ∈ {BiconeHom.left_id}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase left.right\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ Fintype (Bicone.left ⟶ Bicone.right)\n[PROOFSTEP]\nexact\n  { elems := ∅\n    complete := fun f => by cases f }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nf : Bicone.left ⟶ Bicone.right\n⊢ f ∈ ∅\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ Fintype (Bicone.left ⟶ Bicone.diagram val✝)\n[PROOFSTEP]\nexact\n  { elems := {BiconeHom.left _}\n    complete := fun f => by cases f; simp }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\nf : Bicone.left ⟶ Bicone.diagram val✝\n⊢ f ∈ {BiconeHom.left val✝}\n[PROOFSTEP]\ncases f\n[GOAL]\ncase left\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ BiconeHom.left val✝ ∈ {BiconeHom.left val✝}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.left\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ Fintype (Bicone.right ⟶ Bicone.left)\n[PROOFSTEP]\nexact\n  { elems := ∅\n    complete := fun f => by cases f }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nf : Bicone.right ⟶ Bicone.left\n⊢ f ∈ ∅\n[PROOFSTEP]\ncases f\n[GOAL]\ncase right.right\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ Fintype (Bicone.right ⟶ Bicone.right)\n[PROOFSTEP]\nexact\n  { elems := { BiconeHom.right_id }\n    complete := fun f => by cases f; simp }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nf : Bicone.right ⟶ Bicone.right\n⊢ f ∈ {BiconeHom.right_id}\n[PROOFSTEP]\ncases f\n[GOAL]\ncase right_id\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ BiconeHom.right_id ∈ {BiconeHom.right_id}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ Fintype (Bicone.right ⟶ Bicone.diagram val✝)\n[PROOFSTEP]\nexact\n  { elems := {BiconeHom.right _}\n    complete := fun f => by cases f; simp }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\nf : Bicone.right ⟶ Bicone.diagram val✝\n⊢ f ∈ {BiconeHom.right val✝}\n[PROOFSTEP]\ncases f\n[GOAL]\ncase right\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ BiconeHom.right val✝ ∈ {BiconeHom.right val✝}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase diagram.left\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ Fintype (Bicone.diagram val✝ ⟶ Bicone.left)\n[PROOFSTEP]\nexact\n  { elems := ∅\n    complete := fun f => by cases f }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\nf : Bicone.diagram val✝ ⟶ Bicone.left\n⊢ f ∈ ∅\n[PROOFSTEP]\ncases f\n[GOAL]\ncase diagram.right\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\n⊢ Fintype (Bicone.diagram val✝ ⟶ Bicone.right)\n[PROOFSTEP]\nexact\n  { elems := ∅\n    complete := fun f => by cases f }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝ : J\nf : Bicone.diagram val✝ ⟶ Bicone.right\n⊢ f ∈ ∅\n[PROOFSTEP]\ncases f\n[GOAL]\ncase diagram.diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝¹ val✝ : J\n⊢ Fintype (Bicone.diagram val✝¹ ⟶ Bicone.diagram val✝)\n[PROOFSTEP]\nexact\n  { elems := Finset.image BiconeHom.diagram Fintype.elems\n    complete := fun f => by\n      rcases f with (_ | _ | _ | _ | f)\n      simp only [Finset.mem_image]\n      use f\n      simpa using Fintype.complete _ }\n[GOAL]\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝¹ val✝ : J\nf : Bicone.diagram val✝¹ ⟶ Bicone.diagram val✝\n⊢ f ∈ Finset.image BiconeHom.diagram Fintype.elems\n[PROOFSTEP]\nrcases f with (_ | _ | _ | _ | f)\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝¹ val✝ : J\nf : val✝¹ ⟶ val✝\n⊢ BiconeHom.diagram f ∈ Finset.image BiconeHom.diagram Fintype.elems\n[PROOFSTEP]\nsimp only [Finset.mem_image]\n[GOAL]\ncase diagram\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝¹ val✝ : J\nf : val✝¹ ⟶ val✝\n⊢ ∃ a, a ∈ Fintype.elems ∧ BiconeHom.diagram a = BiconeHom.diagram f\n[PROOFSTEP]\nuse f\n[GOAL]\ncase h\nJ : Type v₁\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\nval✝¹ val✝ : J\nf : val✝¹ ⟶ val✝\n⊢ f ∈ Fintype.elems ∧ BiconeHom.diagram f = BiconeHom.diagram f\n[PROOFSTEP]\nsimpa using Fintype.complete _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Bicones", "llama_tokens": 75860, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5660185205547239, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.28964107553793816}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : Primcodable α\np : α → Prop\n⊢ ∀ (a : α), p a ↔ p (id a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : p a\n⊢ r ((g ∘ f) a)\n[PROOFSTEP]\nerw [← h₂, ← h₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : p a\n⊢ p a\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : r ((g ∘ f) a)\n⊢ p a\n[PROOFSTEP]\nrwa [h₁, h₂]\n[GOAL]\nα : Type u_1\ninst✝ : Primcodable α\np : α → Prop\n⊢ ∀ (a : α), p a ↔ p (id a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\ni₁ : Injective f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\ni₂ : Injective g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : p a\n⊢ r ((g ∘ f) a)\n[PROOFSTEP]\nerw [← h₂, ← h₁]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\ni₁ : Injective f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\ni₂ : Injective g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : p a\n⊢ p a\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → β\nc₁ : Computable f\ni₁ : Injective f\nh₁ : ∀ (a : α), p a ↔ q (f a)\ng : β → γ\nc₂ : Computable g\ni₂ : Injective g\nh₂ : ∀ (a : β), q a ↔ r (g a)\na : α\nh : r ((g ∘ f) a)\n⊢ p a\n[PROOFSTEP]\nrwa [h₁, h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable β\ne : α ≃ β\nq : β → Prop\nh : Computable ↑e.symm\n⊢ q ≤₁ (q ∘ ↑e)\n[PROOFSTEP]\nconvert OneOneReducible.of_equiv _ h\n[GOAL]\ncase h.e'_5\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable β\ne : α ≃ β\nq : β → Prop\nh : Computable ↑e.symm\n⊢ q = (q ∘ ↑e) ∘ ↑e.symm\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Primcodable α\ninst✝ : Primcodable β\ne : α ≃ β\nq : β → Prop\nh : Computable ↑e.symm\nx✝ : β\n⊢ q x✝ = ((q ∘ ↑e) ∘ ↑e.symm) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nq : β → Prop\nh₁ : p ≤₀ q\nh₂ : ComputablePred q\n⊢ ComputablePred p\n[PROOFSTEP]\nrcases h₁ with ⟨f, c, hf⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nq : β → Prop\nh₂ : ComputablePred q\nf : α → β\nc : Computable f\nhf : ∀ (a : α), p a ↔ q (f a)\n⊢ ComputablePred p\n[PROOFSTEP]\nrw [show p = fun a => q (f a) from Set.ext hf]\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nq : β → Prop\nh₂ : ComputablePred q\nf : α → β\nc : Computable f\nhf : ∀ (a : α), p a ↔ q (f a)\n⊢ ComputablePred fun a => q (f a)\n[PROOFSTEP]\nrcases computable_iff.1 h₂ with ⟨g, hg, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nf : α → β\nc : Computable f\ng : β → Bool\nhg : Computable g\nh₂ : ComputablePred fun a => g a = true\nhf : ∀ (a : α), p a ↔ (fun a => g a = true) (f a)\n⊢ ComputablePred fun a => (fun a => g a = true) (f a)\n[PROOFSTEP]\nexact ⟨by infer_instance, by simpa using hg.comp c⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nf : α → β\nc : Computable f\ng : β → Bool\nhg : Computable g\nh₂ : ComputablePred fun a => g a = true\nhf : ∀ (a : α), p a ↔ (fun a => g a = true) (f a)\n⊢ DecidablePred fun a => (fun a => g a = true) (f a)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nσ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable σ\np : α → Prop\nf : α → β\nc : Computable f\ng : β → Bool\nhg : Computable g\nh₂ : ComputablePred fun a => g a = true\nhf : ∀ (a : α), p a ↔ (fun a => g a = true) (f a)\n⊢ Computable fun a => decide ((fun a => (fun a => g a = true) (f a)) a)\n[PROOFSTEP]\nsimpa using hg.comp c\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → γ\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ r (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\nx : α ⊕ β\n⊢ (p ⊕' q) x ↔ r ((f ⊕' g) x)\n[PROOFSTEP]\ncases x <;> [apply h₁; apply h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → γ\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ r (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\nx : α ⊕ β\n⊢ (p ⊕' q) x ↔ r ((f ⊕' g) x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → γ\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ r (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\nval✝ : α\n⊢ (p ⊕' q) (Sum.inl val✝) ↔ r ((f ⊕' g) (Sum.inl val✝))\n[PROOFSTEP]\napply h₁\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝² : Primcodable α\ninst✝¹ : Primcodable β\ninst✝ : Primcodable γ\np : α → Prop\nq : β → Prop\nr : γ → Prop\nf : α → γ\nc₁ : Computable f\nh₁ : ∀ (a : α), p a ↔ r (f a)\ng : β → γ\nc₂ : Computable g\nh₂ : ∀ (a : β), q a ↔ r (g a)\nval✝ : β\n⊢ (p ⊕' q) (Sum.inr val✝) ↔ r ((f ⊕' g) (Sum.inr val✝))\n[PROOFSTEP]\napply h₂\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : Set α\n⊢ ∀ (a : α), p a ↔ toNat p (Encodable.encode a)\n[PROOFSTEP]\nsimp [toNat, setOf]\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : Set α\n⊢ ManyOneEquiv (toNat p) p\n[PROOFSTEP]\nsimp [ManyOneEquiv]\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : Set α\nq : Set β\n⊢ ManyOneEquiv (toNat p) (toNat q) ↔ ManyOneEquiv p q\n[PROOFSTEP]\nsimp [ManyOneEquiv]\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ d₂ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np : Set ℕ\nq₁ q₂ : ℕ → Prop\nhq : ManyOneEquiv q₁ q₂\n⊢ ManyOneEquiv p p\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ d₂ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\n⊢ ∀ (p q : ℕ → Prop),\n    ManyOneEquiv p q →\n      (fun p => ManyOneDegree.liftOn d₂ (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) p =\n        (fun p => ManyOneDegree.liftOn d₂ (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) q\n[PROOFSTEP]\nintro p₁ p₂ hp\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ d₂ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np₁ p₂ : ℕ → Prop\nhp : ManyOneEquiv p₁ p₂\n⊢ (fun p => ManyOneDegree.liftOn d₂ (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) p₁ =\n    (fun p => ManyOneDegree.liftOn d₂ (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) p₂\n[PROOFSTEP]\ninduction d₂ using ManyOneDegree.ind_on\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np₁ p₂ : ℕ → Prop\nhp : ManyOneEquiv p₁ p₂\np✝ : Set ℕ\n⊢ (fun p => ManyOneDegree.liftOn (of p✝) (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) p₁ =\n    (fun p => ManyOneDegree.liftOn (of p✝) (f p) (_ : ∀ (q₁ q₂ : ℕ → Prop), ManyOneEquiv q₁ q₂ → f p q₁ = f p q₂)) p₂\n[PROOFSTEP]\napply h\n[GOAL]\ncase h.a\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np₁ p₂ : ℕ → Prop\nhp : ManyOneEquiv p₁ p₂\np✝ : Set ℕ\n⊢ ManyOneEquiv p₁ p₂\ncase h.a\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np₁ p₂ : ℕ → Prop\nhp : ManyOneEquiv p₁ p₂\np✝ : Set ℕ\n⊢ ManyOneEquiv (toNat p✝) (toNat p✝)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase h.a\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nφ : Sort ?u.72115\nd₁ : ManyOneDegree\nf : Set ℕ → Set ℕ → φ\nh : ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop), ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → f p₁ q₁ = f p₂ q₂\np₁ p₂ : ℕ → Prop\nhp : ManyOneEquiv p₁ p₂\np✝ : Set ℕ\n⊢ ManyOneEquiv (toNat p✝) (toNat p✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : α → Prop\nq : β → Prop\n⊢ of p = of q ↔ ManyOneEquiv p q\n[PROOFSTEP]\nrw [of, of, Quotient.eq'']\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : α → Prop\nq : β → Prop\n⊢ Setoid.r (toNat p) (toNat q) ↔ ManyOneEquiv p q\n[PROOFSTEP]\nunfold Setoid.r\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np : α → Prop\nq : β → Prop\n⊢ { r := ManyOneEquiv, iseqv := proof_1 }.1 (toNat p) (toNat q) ↔ ManyOneEquiv p q\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd : ManyOneDegree\n⊢ d ≤ d\n[PROOFSTEP]\ninduction d using ManyOneDegree.ind_on\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝ : Set ℕ\n⊢ of p✝ ≤ of p✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝ : Set ℕ\n⊢ p✝ ≤₀ p✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\n⊢ d₁ ≤ d₂ → d₂ ≤ d₁ → d₁ = d₂\n[PROOFSTEP]\ninduction d₁ using ManyOneDegree.ind_on\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₂ : ManyOneDegree\np✝ : Set ℕ\n⊢ of p✝ ≤ d₂ → d₂ ≤ of p✝ → of p✝ = d₂\n[PROOFSTEP]\ninduction d₂ using ManyOneDegree.ind_on\n[GOAL]\ncase h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝¹ p✝ : Set ℕ\n⊢ of p✝¹ ≤ of p✝ → of p✝ ≤ of p✝¹ → of p✝¹ = of p✝\n[PROOFSTEP]\nintro hp hq\n[GOAL]\ncase h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝¹ p✝ : Set ℕ\nhp : of p✝¹ ≤ of p✝\nhq : of p✝ ≤ of p✝¹\n⊢ of p✝¹ = of p✝\n[PROOFSTEP]\nsimp_all only [ManyOneEquiv, of_le_of, of_eq_of, true_and_iff]\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ d₃ : ManyOneDegree\n⊢ d₁ ≤ d₂ → d₂ ≤ d₃ → d₁ ≤ d₃\n[PROOFSTEP]\ninduction d₁ using ManyOneDegree.ind_on\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₂ d₃ : ManyOneDegree\np✝ : Set ℕ\n⊢ of p✝ ≤ d₂ → d₂ ≤ d₃ → of p✝ ≤ d₃\n[PROOFSTEP]\ninduction d₂ using ManyOneDegree.ind_on\n[GOAL]\ncase h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₃ : ManyOneDegree\np✝¹ p✝ : Set ℕ\n⊢ of p✝¹ ≤ of p✝ → of p✝ ≤ d₃ → of p✝¹ ≤ d₃\n[PROOFSTEP]\ninduction d₃ using ManyOneDegree.ind_on\n[GOAL]\ncase h.h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝² p✝¹ p✝ : Set ℕ\n⊢ of p✝² ≤ of p✝¹ → of p✝¹ ≤ of p✝ → of p✝² ≤ of p✝\n[PROOFSTEP]\napply ManyOneReducible.trans\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\n⊢ ∀ (p₁ p₂ q₁ q₂ : ℕ → Prop),\n    ManyOneEquiv p₁ p₂ → ManyOneEquiv q₁ q₂ → (fun a b => of (a ⊕' b)) p₁ q₁ = (fun a b => of (a ⊕' b)) p₂ q₂\n[PROOFSTEP]\nrintro a b c d ⟨hl₁, hr₁⟩ ⟨hl₂, hr₂⟩\n[GOAL]\ncase intro.intro\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\na b c d : ℕ → Prop\nhl₁ : a ≤₀ b\nhr₁ : b ≤₀ a\nhl₂ : c ≤₀ d\nhr₂ : d ≤₀ c\n⊢ (fun a b => of (a ⊕' b)) a c = (fun a b => of (a ⊕' b)) b d\n[PROOFSTEP]\nrw [of_eq_of]\n[GOAL]\ncase intro.intro\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\na b c d : ℕ → Prop\nhl₁ : a ≤₀ b\nhr₁ : b ≤₀ a\nhl₂ : c ≤₀ d\nhr₂ : d ≤₀ c\n⊢ ManyOneEquiv (a ⊕' c) (b ⊕' d)\n[PROOFSTEP]\nexact\n  ⟨disjoin_manyOneReducible (hl₁.trans OneOneReducible.disjoin_left.to_many_one)\n      (hl₂.trans OneOneReducible.disjoin_right.to_many_one),\n    disjoin_manyOneReducible (hr₁.trans OneOneReducible.disjoin_left.to_many_one)\n      (hr₂.trans OneOneReducible.disjoin_right.to_many_one)⟩\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ d₃ : ManyOneDegree\n⊢ d₁ + d₂ ≤ d₃ ↔ d₁ ≤ d₃ ∧ d₂ ≤ d₃\n[PROOFSTEP]\ninduction d₁ using ManyOneDegree.ind_on\n[GOAL]\ncase h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₂ d₃ : ManyOneDegree\np✝ : Set ℕ\n⊢ of p✝ + d₂ ≤ d₃ ↔ of p✝ ≤ d₃ ∧ d₂ ≤ d₃\n[PROOFSTEP]\ninduction d₂ using ManyOneDegree.ind_on\n[GOAL]\ncase h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₃ : ManyOneDegree\np✝¹ p✝ : Set ℕ\n⊢ of p✝¹ + of p✝ ≤ d₃ ↔ of p✝¹ ≤ d₃ ∧ of p✝ ≤ d₃\n[PROOFSTEP]\ninduction d₃ using ManyOneDegree.ind_on\n[GOAL]\ncase h.h.h\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\np✝² p✝¹ p✝ : Set ℕ\n⊢ of p✝² + of p✝¹ ≤ of p✝ ↔ of p✝² ≤ of p✝ ∧ of p✝¹ ≤ of p✝\n[PROOFSTEP]\nsimpa only [← add_of, of_le_of] using disjoin_le\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\n⊢ d₁ + ?m.117648 d₁ d₂ ≤ d₁ + d₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\ninst✝⁵ : Primcodable α\ninst✝⁴ : Inhabited α\nβ : Type v\ninst✝³ : Primcodable β\ninst✝² : Inhabited β\nγ : Type w\ninst✝¹ : Primcodable γ\ninst✝ : Inhabited γ\nd₁ d₂ : ManyOneDegree\n⊢ ?m.117829 d₁ d₂ + d₂ ≤ d₁ + d₂\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Computability.Reduce", "llama_tokens": 9456, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6076631556226292, "lm_q2_score": 0.476579651063676, "lm_q1q2_score": 0.28959989467088487}}
{"text": "[GOAL]\nα : Type u_1\nτ : ℝ\ninst✝¹ : Inhabited α\ninst✝ : MetricSpace α\ni : Fin (0 + 1)\nhi : i < last 0\n⊢ (fun x => 1) i ≤ dist (default i) (default (last 0)) ∧ (fun x => 1) (last 0) ≤ τ * (fun x => 1) i\n[PROOFSTEP]\nrw [Subsingleton.elim (α := Fin 1) i (last 0)] at hi \n[GOAL]\nα : Type u_1\nτ : ℝ\ninst✝¹ : Inhabited α\ninst✝ : MetricSpace α\ni : Fin (0 + 1)\nhi : last 0 < last 0\n⊢ (fun x => 1) i ≤ dist (default i) (default (last 0)) ∧ (fun x => 1) (last 0) ≤ τ * (fun x => 1) i\n[PROOFSTEP]\nexact (lt_irrefl _ hi).elim\n[GOAL]\nα : Type u_1\nτ : ℝ\ninst✝¹ : Inhabited α\ninst✝ : MetricSpace α\ni : Fin (0 + 1)\nhi : i < last 0\n⊢ dist (default i) (default (last 0)) ≤ (fun x => 1) i + (fun x => 1) (last 0)\n[PROOFSTEP]\nrw [Subsingleton.elim (α := Fin 1) i (last 0)] at hi \n[GOAL]\nα : Type u_1\nτ : ℝ\ninst✝¹ : Inhabited α\ninst✝ : MetricSpace α\ni : Fin (0 + 1)\nhi : last 0 < last 0\n⊢ dist (default i) (default (last 0)) ≤ (fun x => 1) i + (fun x => 1) (last 0)\n[PROOFSTEP]\nexact (lt_irrefl _ hi).elim\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\n⊢ dist (c a i) (c a (last N)) ≤ r a i + r a (last N)\n[PROOFSTEP]\nrcases lt_or_le i (last N) with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nH : i < last N\n⊢ dist (c a i) (c a (last N)) ≤ r a i + r a (last N)\n[PROOFSTEP]\nexact a.inter i H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nH : last N ≤ i\n⊢ dist (c a i) (c a (last N)) ≤ r a i + r a (last N)\n[PROOFSTEP]\nhave I : i = last N := top_le_iff.1 H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nH : last N ≤ i\nI : i = last N\n⊢ dist (c a i) (c a (last N)) ≤ r a i + r a (last N)\n[PROOFSTEP]\nhave := (a.rpos (last N)).le\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nH : last N ≤ i\nI : i = last N\nthis : 0 ≤ r a (last N)\n⊢ dist (c a i) (c a (last N)) ≤ r a i + r a (last N)\n[PROOFSTEP]\nsimp only [I, add_nonneg this this, dist_self]\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nh : 1 ≤ τ\n⊢ r a (last N) ≤ τ * r a i\n[PROOFSTEP]\nrcases lt_or_le i (last N) with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nh : 1 ≤ τ\nH : i < last N\n⊢ r a (last N) ≤ τ * r a i\n[PROOFSTEP]\nexact (a.hlast i H).2\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nh : 1 ≤ τ\nH : last N ≤ i\n⊢ r a (last N) ≤ τ * r a i\n[PROOFSTEP]\nhave : i = last N := top_le_iff.1 H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nh : 1 ≤ τ\nH : last N ≤ i\nthis : i = last N\n⊢ r a (last N) ≤ τ * r a i\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nN : ℕ\nτ : ℝ\na : SatelliteConfig α N τ\ni : Fin (Nat.succ N)\nh : 1 ≤ τ\nH : last N ≤ i\nthis : i = last N\n⊢ r a (last N) ≤ τ * r a (last N)\n[PROOFSTEP]\nexact le_mul_of_one_le_left (a.rpos _).le h\n[GOAL]\na✝ : Ordinal.{u}\ni : Ordinal.{u} := a✝\nj : { j // j < i }\n⊢ (invImage (fun a => a) Ordinal.wellFoundedRelation).1 (↑j) a✝\n[PROOFSTEP]\nexact j.2\n[GOAL]\na✝ : Ordinal.{u}\ni : Ordinal.{u} := a✝\nj : { j // j < i }\n⊢ (invImage (fun a => a) Ordinal.wellFoundedRelation).1 (↑j) a✝\n[PROOFSTEP]\nexact j.2\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\n⊢ Monotone (iUnionUpTo p)\n[PROOFSTEP]\nintro i j hij\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni j : Ordinal.{u}\nhij : i ≤ j\n⊢ iUnionUpTo p i ≤ iUnionUpTo p j\n[PROOFSTEP]\nsimp only [iUnionUpTo]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni j : Ordinal.{u}\nhij : i ≤ j\n⊢ ⋃ (j : { j // j < i }),\n      ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ≤\n    ⋃ (j_1 : { j_1 // j_1 < j }),\n      ball (BallPackage.c p.toBallPackage (index p ↑j_1)) (BallPackage.r p.toBallPackage (index p ↑j_1))\n[PROOFSTEP]\nexact iUnion_mono' fun r => ⟨⟨r, r.2.trans_le hij⟩, Subset.rfl⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\na✝ : Ordinal.{u}\ni : Ordinal.{u} := a✝\nj : { j // j < i }\nx✝ :\n  Set.Nonempty\n    (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n      closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))\n⊢ (invImage (fun a => a) Ordinal.wellFoundedRelation).1 (↑j) a✝\n[PROOFSTEP]\nexact j.2\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\n⊢ Set.Nonempty\n    {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\n⊢ False\n[PROOFSTEP]\nsuffices H : Function.Injective p.index\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nH : Function.Injective (index p)\n⊢ False\ncase H\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\n⊢ Function.Injective (index p)\n[PROOFSTEP]\nexact not_injective_of_ordinal p.index H\n[GOAL]\ncase H\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\n⊢ Function.Injective (index p)\n[PROOFSTEP]\nintro x y hxy\n[GOAL]\ncase H\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nx y : Ordinal.{u}\nhxy : index p x = index p y\n⊢ x = y\n[PROOFSTEP]\nwlog x_le_y : x ≤ y generalizing x y\n[GOAL]\ncase H.inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nx y : Ordinal.{u}\nhxy : index p x = index p y\nthis : ∀ ⦃x y : Ordinal.{u}⦄, index p x = index p y → x ≤ y → x = y\nx_le_y : ¬x ≤ y\n⊢ x = y\n[PROOFSTEP]\nexact (this hxy.symm (le_of_not_le x_le_y)).symm\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\n⊢ x = y\n[PROOFSTEP]\nrcases eq_or_lt_of_le x_le_y with (rfl | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nx : Ordinal.{u}\nhxy : index p x = index p x\nx_le_y : x ≤ x\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nh :\n  ¬Set.Nonempty\n      {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\n⊢ x = y\n[PROOFSTEP]\nsimp only [nonempty_def, not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] at h \n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh :\n  ∀ (x : Ordinal.{u}),\n    ∃ x_1, ¬BallPackage.c p.toBallPackage x_1 ∈ iUnionUpTo p x ∧ R p x ≤ p.τ * BallPackage.r p.toBallPackage x_1\n⊢ x = y\n[PROOFSTEP]\nspecialize h y\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\n⊢ x = y\n[PROOFSTEP]\nhave A : p.c (p.index y) ∉ p.iUnionUpTo y :=\n  by\n  have : p.index y = Classical.epsilon fun b : β => p.c b ∉ p.iUnionUpTo y ∧ p.R y ≤ p.τ * p.r b := by\n    rw [TauPackage.index]; rfl\n  rw [this]\n  exact (Classical.epsilon_spec h).1\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\n⊢ ¬BallPackage.c p.toBallPackage (index p y) ∈ iUnionUpTo p y\n[PROOFSTEP]\nhave : p.index y = Classical.epsilon fun b : β => p.c b ∉ p.iUnionUpTo y ∧ p.R y ≤ p.τ * p.r b := by\n  rw [TauPackage.index]; rfl\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\n⊢ index p y =\n    Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage b\n[PROOFSTEP]\nrw [TauPackage.index]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\n⊢ (Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈\n            ⋃ (j : { j // j < y }),\n              ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∧\n        ⨆ (b :\n            { b //\n              ¬BallPackage.c p.toBallPackage b ∈\n                  ⋃ (j : { j // j < y }),\n                    ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) }),\n            BallPackage.r p.toBallPackage ↑b ≤\n          p.τ * BallPackage.r p.toBallPackage b) =\n    Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nthis :\n  index p y =\n    Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage b\n⊢ ¬BallPackage.c p.toBallPackage (index p y) ∈ iUnionUpTo p y\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nthis :\n  index p y =\n    Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage b\n⊢ ¬BallPackage.c p.toBallPackage\n        (Classical.epsilon fun b =>\n          ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage b) ∈\n      iUnionUpTo p y\n[PROOFSTEP]\nexact (Classical.epsilon_spec h).1\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nA : ¬BallPackage.c p.toBallPackage (index p y) ∈ iUnionUpTo p y\n⊢ x = y\n[PROOFSTEP]\nsimp only [iUnionUpTo, not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, Subtype.exists,\n  Subtype.coe_mk] at A \n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nA :\n  ∀ (x : Ordinal.{u}),\n    x < y →\n      ¬BallPackage.c p.toBallPackage (index p y) ∈\n          ball (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x))\n⊢ x = y\n[PROOFSTEP]\nspecialize A x H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nA :\n  ¬BallPackage.c p.toBallPackage (index p y) ∈\n      ball (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x))\n⊢ x = y\n[PROOFSTEP]\nsimp [hxy] at A \n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx y : Ordinal.{u}\nhxy : index p x = index p y\nx_le_y : x ≤ y\nH : x < y\nh : ∃ x, ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p y ∧ R p y ≤ p.τ * BallPackage.r p.toBallPackage x\nA : BallPackage.r p.toBallPackage (index p y) ≤ 0\n⊢ x = y\n[PROOFSTEP]\nexact (lt_irrefl _ ((p.rpos (p.index y)).trans_le A)).elim\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\n⊢ BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\n[PROOFSTEP]\nhave A : ∀ z : β, p.c z ∈ p.iUnionUpTo p.lastStep ∨ p.τ * p.r z < p.R p.lastStep :=\n  by\n  have : p.lastStep ∈ {i | ¬∃ b : β, p.c b ∉ p.iUnionUpTo i ∧ p.R i ≤ p.τ * p.r b} := csInf_mem p.lastStep_nonempty\n  simpa only [not_exists, mem_setOf_eq, not_and_or, not_le, not_not_mem]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\n⊢ ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\n[PROOFSTEP]\nhave : p.lastStep ∈ {i | ¬∃ b : β, p.c b ∉ p.iUnionUpTo i ∧ p.R i ≤ p.τ * p.r b} := csInf_mem p.lastStep_nonempty\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nthis :\n  lastStep p ∈\n    {i | ¬∃ b, ¬BallPackage.c p.toBallPackage b ∈ iUnionUpTo p i ∧ R p i ≤ p.τ * BallPackage.r p.toBallPackage b}\n⊢ ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\n[PROOFSTEP]\nsimpa only [not_exists, mem_setOf_eq, not_and_or, not_le, not_not_mem]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\n⊢ BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\n⊢ False\n[PROOFSTEP]\nrcases A x with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\n⊢ False\n[PROOFSTEP]\nexact h H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\n⊢ False\n[PROOFSTEP]\nhave Rpos : 0 < p.R p.lastStep := by apply lt_trans (mul_pos (_root_.zero_lt_one.trans p.one_lt_tau) (p.rpos _)) H\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\n⊢ 0 < R p (lastStep p)\n[PROOFSTEP]\napply lt_trans (mul_pos (_root_.zero_lt_one.trans p.one_lt_tau) (p.rpos _)) H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n⊢ False\n[PROOFSTEP]\nhave B : p.τ⁻¹ * p.R p.lastStep < p.R p.lastStep :=\n  by\n  conv_rhs => rw [← one_mul (p.R p.lastStep)]\n  exact mul_lt_mul (inv_lt_one p.one_lt_tau) le_rfl Rpos zero_le_one\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n⊢ p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\n[PROOFSTEP]\nconv_rhs => rw [← one_mul (p.R p.lastStep)]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n| R p (lastStep p)\n[PROOFSTEP]\nrw [← one_mul (p.R p.lastStep)]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n| R p (lastStep p)\n[PROOFSTEP]\nrw [← one_mul (p.R p.lastStep)]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n| R p (lastStep p)\n[PROOFSTEP]\nrw [← one_mul (p.R p.lastStep)]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\n⊢ p.τ⁻¹ * R p (lastStep p) < 1 * R p (lastStep p)\n[PROOFSTEP]\nexact mul_lt_mul (inv_lt_one p.one_lt_tau) le_rfl Rpos zero_le_one\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\n⊢ False\n[PROOFSTEP]\nobtain ⟨y, hy1, hy2⟩ : ∃ y : β, p.c y ∉ p.iUnionUpTo p.lastStep ∧ p.τ⁻¹ * p.R p.lastStep < p.r y :=\n  by\n  have := exists_lt_of_lt_csSup ?_ B\n  · simpa only [exists_prop, mem_range, exists_exists_and_eq_and, Subtype.exists, Subtype.coe_mk]\n  rw [← image_univ, nonempty_image_iff]\n  exact ⟨⟨_, h⟩, mem_univ _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\n⊢ ∃ y,\n    ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p) ∧\n      p.τ⁻¹ * R p (lastStep p) < BallPackage.r p.toBallPackage y\n[PROOFSTEP]\nhave := exists_lt_of_lt_csSup ?_ B\n[GOAL]\ncase refine_2\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\nthis : ∃ a, (a ∈ range fun b => BallPackage.r p.toBallPackage ↑b) ∧ p.τ⁻¹ * R p (lastStep p) < a\n⊢ ∃ y,\n    ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p) ∧\n      p.τ⁻¹ * R p (lastStep p) < BallPackage.r p.toBallPackage y\n[PROOFSTEP]\nsimpa only [exists_prop, mem_range, exists_exists_and_eq_and, Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\n⊢ Set.Nonempty (range fun b => BallPackage.r p.toBallPackage ↑b)\n[PROOFSTEP]\nrw [← image_univ, nonempty_image_iff]\n[GOAL]\ncase refine_1\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\n⊢ Set.Nonempty univ\n[PROOFSTEP]\nexact ⟨⟨_, h⟩, mem_univ _⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\ny : β\nhy1 : ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\nhy2 : p.τ⁻¹ * R p (lastStep p) < BallPackage.r p.toBallPackage y\n⊢ False\n[PROOFSTEP]\nrcases A y with (Hy | Hy)\n[GOAL]\ncase inr.intro.intro.inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\ny : β\nhy1 : ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\nhy2 : p.τ⁻¹ * R p (lastStep p) < BallPackage.r p.toBallPackage y\nHy : BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\n⊢ False\n[PROOFSTEP]\nexact hy1 Hy\n[GOAL]\ncase inr.intro.intro.inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\ny : β\nhy1 : ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\nhy2 : p.τ⁻¹ * R p (lastStep p) < BallPackage.r p.toBallPackage y\nHy : p.τ * BallPackage.r p.toBallPackage y < R p (lastStep p)\n⊢ False\n[PROOFSTEP]\nrw [← div_eq_inv_mul] at hy2 \n[GOAL]\ncase inr.intro.intro.inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\ny : β\nhy1 : ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\nhy2 : R p (lastStep p) / p.τ < BallPackage.r p.toBallPackage y\nHy : p.τ * BallPackage.r p.toBallPackage y < R p (lastStep p)\n⊢ False\n[PROOFSTEP]\nhave := (div_le_iff' (_root_.zero_lt_one.trans p.one_lt_tau)).1 hy2.le\n[GOAL]\ncase inr.intro.intro.inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\nx : β\nA :\n  ∀ (z : β),\n    BallPackage.c p.toBallPackage z ∈ iUnionUpTo p (lastStep p) ∨\n      p.τ * BallPackage.r p.toBallPackage z < R p (lastStep p)\nh : ¬BallPackage.c p.toBallPackage x ∈ iUnionUpTo p (lastStep p)\nH : p.τ * BallPackage.r p.toBallPackage x < R p (lastStep p)\nRpos : 0 < R p (lastStep p)\nB : p.τ⁻¹ * R p (lastStep p) < R p (lastStep p)\ny : β\nhy1 : ¬BallPackage.c p.toBallPackage y ∈ iUnionUpTo p (lastStep p)\nhy2 : R p (lastStep p) / p.τ < BallPackage.r p.toBallPackage y\nHy : p.τ * BallPackage.r p.toBallPackage y < R p (lastStep p)\nthis : R p (lastStep p) ≤ p.τ * BallPackage.r p.toBallPackage y\n⊢ False\n[PROOFSTEP]\nexact lt_irrefl _ (Hy.trans_le this)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni : Ordinal.{u}\nhi : i < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\n⊢ color p i < N\n[PROOFSTEP]\ninduction' i using Ordinal.induction with i IH\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\n⊢ color p i < N\n[PROOFSTEP]\nlet A : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    (closedBall (p.c (p.index j)) (p.r (p.index j)) ∩ closedBall (p.c (p.index i)) (p.r (p.index i))).Nonempty),\n    {p.color j}\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\n⊢ color p i < N\n[PROOFSTEP]\nhave color_i : p.color i = sInf (univ \\ A) := by rw [color]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\n⊢ color p i = sInf (univ \\ A)\n[PROOFSTEP]\nrw [color]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\n⊢ color p i < N\n[PROOFSTEP]\nrw [color_i]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\n⊢ sInf (univ \\ A) < N\n[PROOFSTEP]\nhave N_mem : N ∈ univ \\ A :=\n  by\n  simp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, not_and, mem_univ,\n    mem_diff, Subtype.exists, Subtype.coe_mk]\n  intro j ji _\n  exact (IH j ji (ji.trans hi)).ne'\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\n⊢ N ∈ univ \\ A\n[PROOFSTEP]\nsimp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, not_and, mem_univ,\n  mem_diff, Subtype.exists, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\n⊢ ∀ (x : Ordinal.{u}),\n    x < i →\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) →\n        ¬N = color p x\n[PROOFSTEP]\nintro j ji _\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nj : Ordinal.{u}\nji : j < i\na✝ :\n  Set.Nonempty\n    (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n      closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))\n⊢ ¬N = color p j\n[PROOFSTEP]\nexact (IH j ji (ji.trans hi)).ne'\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\n⊢ sInf (univ \\ A) < N\n[PROOFSTEP]\nsuffices sInf (univ \\ A) ≠ N\n  by\n  rcases(csInf_le (OrderBot.bddBelow (univ \\ A)) N_mem).lt_or_eq with (H | H)\n  · exact H\n  · exact (this H).elim\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nthis : sInf (univ \\ A) ≠ N\n⊢ sInf (univ \\ A) < N\n[PROOFSTEP]\nrcases(csInf_le (OrderBot.bddBelow (univ \\ A)) N_mem).lt_or_eq with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nthis : sInf (univ \\ A) ≠ N\nH : sInf (univ \\ A) < N\n⊢ sInf (univ \\ A) < N\n[PROOFSTEP]\nexact H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nthis : sInf (univ \\ A) ≠ N\nH : sInf (univ \\ A) = N\n⊢ sInf (univ \\ A) < N\n[PROOFSTEP]\nexact (this H).elim\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\n⊢ sInf (univ \\ A) ≠ N\n[PROOFSTEP]\nintro Inf_eq_N\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\n⊢ False\n[PROOFSTEP]\nhave :\n  ∀ k,\n    k < N →\n      ∃ j,\n        j < i ∧\n          (closedBall (p.c (p.index j)) (p.r (p.index j)) ∩ closedBall (p.c (p.index i)) (p.r (p.index i))).Nonempty ∧\n            k = p.color j :=\n  by\n  intro k hk\n  rw [← Inf_eq_N] at hk \n  have : k ∈ A := by simpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using Nat.not_mem_of_lt_sInf hk\n  simp [and_assoc, -exists_and_left] at this \n  simpa only [exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, Subtype.exists, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\n⊢ ∀ (k : ℕ),\n    k < N →\n      ∃ j,\n        j < i ∧\n          Set.Nonempty\n              (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n                closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n            k = color p j\n[PROOFSTEP]\nintro k hk\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nk : ℕ\nhk : k < N\n⊢ ∃ j,\n    j < i ∧\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n        k = color p j\n[PROOFSTEP]\nrw [← Inf_eq_N] at hk \n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nk : ℕ\nhk : k < sInf (univ \\ A)\n⊢ ∃ j,\n    j < i ∧\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n        k = color p j\n[PROOFSTEP]\nhave : k ∈ A := by simpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using Nat.not_mem_of_lt_sInf hk\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nk : ℕ\nhk : k < sInf (univ \\ A)\n⊢ k ∈ A\n[PROOFSTEP]\nsimpa only [true_and_iff, mem_univ, Classical.not_not, mem_diff] using Nat.not_mem_of_lt_sInf hk\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nk : ℕ\nhk : k < sInf (univ \\ A)\nthis : k ∈ A\n⊢ ∃ j,\n    j < i ∧\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n        k = color p j\n[PROOFSTEP]\nsimp [and_assoc, -exists_and_left] at this \n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nk : ℕ\nhk : k < sInf (univ \\ A)\nthis :\n  ∃ a,\n    a < i ∧\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p a)) (BallPackage.r p.toBallPackage (index p a)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n        k = color p a\n⊢ ∃ j,\n    j < i ∧\n      Set.Nonempty\n          (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n            closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n        k = color p j\n[PROOFSTEP]\nsimpa only [exists_prop, mem_iUnion, mem_singleton_iff, mem_closedBall, Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\nthis :\n  ∀ (k : ℕ),\n    k < N →\n      ∃ j,\n        j < i ∧\n          Set.Nonempty\n              (closedBall (BallPackage.c p.toBallPackage (index p j)) (BallPackage.r p.toBallPackage (index p j)) ∩\n                closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n            k = color p j\n⊢ False\n[PROOFSTEP]\nchoose! g hg using this\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\n⊢ False\n[PROOFSTEP]\nlet G : ℕ → Ordinal := fun n => if n = N then i else g n\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\n⊢ False\n[PROOFSTEP]\nhave color_G : ∀ n, n ≤ N → p.color (G n) = n := by\n  intro n hn\n  rcases hn.eq_or_lt with (rfl | H)\n  · simp only; simp only [color_i, Inf_eq_N, if_true, eq_self_iff_true]\n  · simp only; simp only [H.ne, (hg n H).right.right.symm, if_false]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\n⊢ ∀ (n : ℕ), n ≤ N → color p (G n) = n\n[PROOFSTEP]\nintro n hn\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\nn : ℕ\nhn : n ≤ N\n⊢ color p (G n) = n\n[PROOFSTEP]\nrcases hn.eq_or_lt with (rfl | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\ni : Ordinal.{u}\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\ng : ℕ → Ordinal.{u}\nn : ℕ\nhN : IsEmpty (SatelliteConfig α n p.τ)\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < n\nN_mem : n ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = n\nhg :\n  ∀ (k : ℕ),\n    k < n →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n_1 => if n_1 = n then i else g n_1\nhn : n ≤ n\n⊢ color p (G n) = n\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\ni : Ordinal.{u}\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\ng : ℕ → Ordinal.{u}\nn : ℕ\nhN : IsEmpty (SatelliteConfig α n p.τ)\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < n\nN_mem : n ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = n\nhg :\n  ∀ (k : ℕ),\n    k < n →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n_1 => if n_1 = n then i else g n_1\nhn : n ≤ n\n⊢ color p (if True then i else g n) = n\n[PROOFSTEP]\nsimp only [color_i, Inf_eq_N, if_true, eq_self_iff_true]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\nn : ℕ\nhn : n ≤ N\nH : n < N\n⊢ color p (G n) = n\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\nn : ℕ\nhn : n ≤ N\nH : n < N\n⊢ color p (if n = N then i else g n) = n\n[PROOFSTEP]\nsimp only [H.ne, (hg n H).right.right.symm, if_false]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\n⊢ False\n[PROOFSTEP]\nhave G_lt_last : ∀ n, n ≤ N → G n < p.lastStep := by\n  intro n hn\n  rcases hn.eq_or_lt with (rfl | H)\n  · simp only; simp only [hi, if_true, eq_self_iff_true]\n  · simp only; simp only [H.ne, (hg n H).left.trans hi, if_false]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\n⊢ ∀ (n : ℕ), n ≤ N → G n < lastStep p\n[PROOFSTEP]\nintro n hn\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nn : ℕ\nhn : n ≤ N\n⊢ G n < lastStep p\n[PROOFSTEP]\nrcases hn.eq_or_lt with (rfl | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\ni : Ordinal.{u}\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\ng : ℕ → Ordinal.{u}\nn : ℕ\nhN : IsEmpty (SatelliteConfig α n p.τ)\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < n\nN_mem : n ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = n\nhg :\n  ∀ (k : ℕ),\n    k < n →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n_1 => if n_1 = n then i else g n_1\ncolor_G : ∀ (n_1 : ℕ), n_1 ≤ n → color p (G n_1) = n_1\nhn : n ≤ n\n⊢ G n < lastStep p\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\ni : Ordinal.{u}\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\ng : ℕ → Ordinal.{u}\nn : ℕ\nhN : IsEmpty (SatelliteConfig α n p.τ)\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < n\nN_mem : n ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = n\nhg :\n  ∀ (k : ℕ),\n    k < n →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n_1 => if n_1 = n then i else g n_1\ncolor_G : ∀ (n_1 : ℕ), n_1 ≤ n → color p (G n_1) = n_1\nhn : n ≤ n\n⊢ (if True then i else g n) < lastStep p\n[PROOFSTEP]\nsimp only [hi, if_true, eq_self_iff_true]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nn : ℕ\nhn : n ≤ N\nH : n < N\n⊢ G n < lastStep p\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nn : ℕ\nhn : n ≤ N\nH : n < N\n⊢ (if n = N then i else g n) < lastStep p\n[PROOFSTEP]\nsimp only [H.ne, (hg n H).left.trans hi, if_false]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\n⊢ False\n[PROOFSTEP]\nhave fGn : ∀ n, n ≤ N → p.c (p.index (G n)) ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r (p.index (G n)) :=\n  by\n  intro n hn\n  have : p.index (G n) = Classical.epsilon fun t => p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by\n    rw [index]; rfl\n  rw [this]\n  have : ∃ t, p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by\n    simpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using\n      not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)\n  exact Classical.epsilon_spec this\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\n⊢ ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\n[PROOFSTEP]\nintro n hn\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\n⊢ ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n    R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\n[PROOFSTEP]\nhave : p.index (G n) = Classical.epsilon fun t => p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by rw [index];\n  rfl\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\n⊢ index p (G n) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n[PROOFSTEP]\nrw [index]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\n⊢ (Classical.epsilon fun b =>\n      ¬BallPackage.c p.toBallPackage b ∈\n            ⋃ (j : { j // j < G n }),\n              ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∧\n        ⨆ (b :\n            { b //\n              ¬BallPackage.c p.toBallPackage b ∈\n                  ⋃ (j : { j // j < G n }),\n                    ball (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) }),\n            BallPackage.r p.toBallPackage ↑b ≤\n          p.τ * BallPackage.r p.toBallPackage b) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\nthis :\n  index p (G n) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n⊢ ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n    R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\n[PROOFSTEP]\nrw [this]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\nthis :\n  index p (G n) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n⊢ ¬BallPackage.c p.toBallPackage\n          (Classical.epsilon fun t =>\n            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t) ∈\n        iUnionUpTo p (G n) ∧\n    R p (G n) ≤\n      p.τ *\n        BallPackage.r p.toBallPackage\n          (Classical.epsilon fun t =>\n            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t)\n[PROOFSTEP]\nhave : ∃ t, p.c t ∉ p.iUnionUpTo (G n) ∧ p.R (G n) ≤ p.τ * p.r t := by\n  simpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using\n    not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\nthis :\n  index p (G n) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n⊢ ∃ t, ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n[PROOFSTEP]\nsimpa only [not_exists, exists_prop, not_and, not_lt, not_le, mem_setOf_eq, not_forall] using\n  not_mem_of_lt_csInf (G_lt_last n hn) (OrderBot.bddBelow _)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nn : ℕ\nhn : n ≤ N\nthis✝ :\n  index p (G n) =\n    Classical.epsilon fun t =>\n      ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\nthis : ∃ t, ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t\n⊢ ¬BallPackage.c p.toBallPackage\n          (Classical.epsilon fun t =>\n            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t) ∈\n        iUnionUpTo p (G n) ∧\n    R p (G n) ≤\n      p.τ *\n        BallPackage.r p.toBallPackage\n          (Classical.epsilon fun t =>\n            ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G n) ∧ R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage t)\n[PROOFSTEP]\nexact Classical.epsilon_spec this\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\n⊢ False\n[PROOFSTEP]\nhave Gab :\n  ∀ a b : Fin (Nat.succ N),\n    G a < G b →\n      p.r (p.index (G a)) ≤ dist (p.c (p.index (G a))) (p.c (p.index (G b))) ∧\n        p.r (p.index (G b)) ≤ p.τ * p.r (p.index (G a)) :=\n  by\n  intro a b G_lt\n  have ha : (a : ℕ) ≤ N := Nat.lt_succ_iff.1 a.2\n  have hb : (b : ℕ) ≤ N := Nat.lt_succ_iff.1 b.2\n  constructor\n  · have := (fGn b hb).1\n    simp only [iUnionUpTo, not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, Subtype.exists,\n      Subtype.coe_mk] at this \n    simpa only [dist_comm, mem_ball, not_lt] using this (G a) G_lt\n  · apply le_trans _ (fGn a ha).2\n    have B : p.c (p.index (G b)) ∉ p.iUnionUpTo (G a) := by intro H;\n      exact (fGn b hb).1 (p.monotone_iUnionUpTo G_lt.le H)\n    let b' : { t // p.c t ∉ p.iUnionUpTo (G a) } := ⟨p.index (G b), B⟩\n    apply @le_ciSup _ _ _ (fun t : { t // p.c t ∉ p.iUnionUpTo (G a) } => p.r t) _ b'\n    refine' ⟨p.r_bound, fun t ht => _⟩\n    simp only [exists_prop, mem_range, Subtype.exists, Subtype.coe_mk] at ht \n    rcases ht with ⟨u, hu⟩\n    rw [← hu.2]\n    exact\n      p.r_le\n        _\n          -- therefore, one may use them to construct a satellite configuration with `N+1` points\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\n⊢ ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n[PROOFSTEP]\nintro a b G_lt\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n[PROOFSTEP]\nhave ha : (a : ℕ) ≤ N := Nat.lt_succ_iff.1 a.2\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n[PROOFSTEP]\nhave hb : (b : ℕ) ≤ N := Nat.lt_succ_iff.1 b.2\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n      dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n    BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))\n[PROOFSTEP]\nhave := (fGn b hb).1\n[GOAL]\ncase left\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nthis : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑b)\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))\n[PROOFSTEP]\nsimp only [iUnionUpTo, not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, Subtype.exists,\n  Subtype.coe_mk] at this \n[GOAL]\ncase left\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nthis :\n  ∀ (x : Ordinal.{u}),\n    (x < if ↑b = N then i else g ↑b) →\n      ¬BallPackage.c p.toBallPackage (index p (if ↑b = N then i else g ↑b)) ∈\n          ball (BallPackage.c p.toBallPackage (index p x)) (BallPackage.r p.toBallPackage (index p x))\n⊢ BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n    dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b)))\n[PROOFSTEP]\nsimpa only [dist_comm, mem_ball, not_lt] using this (G a) G_lt\n[GOAL]\ncase right\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\n⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n[PROOFSTEP]\napply le_trans _ (fGn a ha).2\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\n⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)\n[PROOFSTEP]\nhave B : p.c (p.index (G b)) ∉ p.iUnionUpTo (G a) := by intro H; exact (fGn b hb).1 (p.monotone_iUnionUpTo G_lt.le H)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\n⊢ ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\n[PROOFSTEP]\nintro H\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nH : BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\n⊢ False\n[PROOFSTEP]\nexact (fGn b hb).1 (p.monotone_iUnionUpTo G_lt.le H)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\n⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)\n[PROOFSTEP]\nlet b' : { t // p.c t ∉ p.iUnionUpTo (G a) } := ⟨p.index (G b), B⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\n⊢ BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ R p (G ↑a)\n[PROOFSTEP]\napply @le_ciSup _ _ _ (fun t : { t // p.c t ∉ p.iUnionUpTo (G a) } => p.r t) _ b'\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\n⊢ BddAbove (range fun t => BallPackage.r p.toBallPackage ↑t)\n[PROOFSTEP]\nrefine' ⟨p.r_bound, fun t ht => _⟩\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\nt : ℝ\nht : t ∈ range fun t => BallPackage.r p.toBallPackage ↑t\n⊢ t ≤ p.r_bound\n[PROOFSTEP]\nsimp only [exists_prop, mem_range, Subtype.exists, Subtype.coe_mk] at ht \n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\nt : ℝ\nht :\n  ∃ a_1,\n    ¬BallPackage.c p.toBallPackage a_1 ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧\n      BallPackage.r p.toBallPackage a_1 = t\n⊢ t ≤ p.r_bound\n[PROOFSTEP]\nrcases ht with ⟨u, hu⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\nt : ℝ\nu : β\nhu : ¬BallPackage.c p.toBallPackage u ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧ BallPackage.r p.toBallPackage u = t\n⊢ t ≤ p.r_bound\n[PROOFSTEP]\nrw [← hu.2]\n[GOAL]\ncase intro\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\na b : Fin (Nat.succ N)\nG_lt : G ↑a < G ↑b\nha : ↑a ≤ N\nhb : ↑b ≤ N\nB : ¬BallPackage.c p.toBallPackage (index p (G ↑b)) ∈ iUnionUpTo p (G ↑a)\nb' : { t // ¬BallPackage.c p.toBallPackage t ∈ iUnionUpTo p (G ↑a) } := { val := index p (G ↑b), property := B }\nt : ℝ\nu : β\nhu : ¬BallPackage.c p.toBallPackage u ∈ iUnionUpTo p (if ↑a = N then i else g ↑a) ∧ BallPackage.r p.toBallPackage u = t\n⊢ BallPackage.r p.toBallPackage u ≤ p.r_bound\n[PROOFSTEP]\nexact\n  p.r_le\n    _\n      -- therefore, one may use them to construct a satellite configuration with `N+1` points\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n⊢ False\n[PROOFSTEP]\nlet sc : SatelliteConfig α N p.τ :=\n  { c := fun k => p.c (p.index (G k))\n    r := fun k => p.r (p.index (G k))\n    rpos := fun k => p.rpos (p.index (G k))\n    h := by\n      intro a b a_ne_b\n      wlog G_le : G a ≤ G b generalizing a b\n      · exact (this b a a_ne_b.symm (le_of_not_le G_le)).symm\n      have G_lt : G a < G b := by\n        rcases G_le.lt_or_eq with (H | H); · exact H\n        have A : (a : ℕ) ≠ b := Fin.val_injective.ne a_ne_b\n        rw [← color_G a (Nat.lt_succ_iff.1 a.2), ← color_G b (Nat.lt_succ_iff.1 b.2), H] at A \n        exact (A rfl).elim\n      exact Or.inl (Gab a b G_lt)\n    hlast := by\n      intro a ha\n      have I : (a : ℕ) < N := ha\n      have : G a < G (Fin.last N) := by dsimp; simp [I.ne, (hg a I).1]\n      exact Gab _ _ this\n    inter := by\n      intro a ha\n      have I : (a : ℕ) < N := ha\n      have J : G (Fin.last N) = i := by dsimp; simp only [if_true, eq_self_iff_true]\n      have K : G a = g a := by dsimp; simp [I.ne, (hg a I).1]\n      convert dist_le_add_of_nonempty_closedBall_inter_closedBall (hg _ I).2.1 }\n    -- this is a contradiction\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n⊢ ∀ (i j : Fin (Nat.succ N)),\n    i ≠ j →\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤\n            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)\n              ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) j) ∧\n          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j ≤\n            p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ∨\n        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j ≤\n            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) j)\n              ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i) ∧\n          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤\n            p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) j\n[PROOFSTEP]\nintro a b a_ne_b\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b\n[PROOFSTEP]\nwlog G_le : G a ≤ G b generalizing a b\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nthis :\n  ∀ (a b : Fin (Nat.succ N)),\n    a ≠ b →\n      G ↑a ≤ G ↑b →\n        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n              dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n              p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n              dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n              p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b\nG_le : ¬G ↑a ≤ G ↑b\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b\n[PROOFSTEP]\nexact (this b a a_ne_b.symm (le_of_not_le G_le)).symm\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b\n[PROOFSTEP]\nhave G_lt : G a < G b := by\n  rcases G_le.lt_or_eq with (H | H); · exact H\n  have A : (a : ℕ) ≠ b := Fin.val_injective.ne a_ne_b\n  rw [← color_G a (Nat.lt_succ_iff.1 a.2), ← color_G b (Nat.lt_succ_iff.1 b.2), H] at A \n  exact (A rfl).elim\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\n⊢ G ↑a < G ↑b\n[PROOFSTEP]\nrcases G_le.lt_or_eq with (H | H)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\nH : G ↑a < G ↑b\n⊢ G ↑a < G ↑b\n[PROOFSTEP]\nexact H\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\nH : G ↑a = G ↑b\n⊢ G ↑a < G ↑b\n[PROOFSTEP]\nhave A : (a : ℕ) ≠ b := Fin.val_injective.ne a_ne_b\n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA✝ : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A✝)\nN_mem : N ∈ univ \\ A✝\nInf_eq_N : sInf (univ \\ A✝) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\nH : G ↑a = G ↑b\nA : ↑a ≠ ↑b\n⊢ G ↑a < G ↑b\n[PROOFSTEP]\nrw [← color_G a (Nat.lt_succ_iff.1 a.2), ← color_G b (Nat.lt_succ_iff.1 b.2), H] at A \n[GOAL]\ncase inr\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA✝ : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A✝)\nN_mem : N ∈ univ \\ A✝\nInf_eq_N : sInf (univ \\ A✝) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\nH : G ↑a = G ↑b\nA : color p (G ↑b) ≠ color p (G ↑b)\n⊢ G ↑a < G ↑b\n[PROOFSTEP]\nexact (A rfl).elim\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na b : Fin (Nat.succ N)\na_ne_b : a ≠ b\nG_le : G ↑a ≤ G ↑b\nG_lt : G ↑a < G ↑b\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n        dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n        p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b\n[PROOFSTEP]\nexact Or.inl (Gab a b G_lt)\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n⊢ ∀ (i : Fin (N + 1)),\n    i < last N →\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i ≤\n          dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)\n            ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧\n        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤\n          p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤\n      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a\n[PROOFSTEP]\nhave I : (a : ℕ) < N := ha\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤\n      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a\n[PROOFSTEP]\nhave : G a < G (Fin.last N) := by dsimp; simp [I.ne, (hg a I).1]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ G ↑a < G ↑(last N)\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ (if ↑a = N then i else g ↑a) < if N = N then i else g N\n[PROOFSTEP]\nsimp [I.ne, (hg a I).1]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\nthis : G ↑a < G ↑(last N)\n⊢ (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n        ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ∧\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N) ≤\n      p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a\n[PROOFSTEP]\nexact Gab _ _ this\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\n⊢ ∀ (i : Fin (N + 1)),\n    i < last N →\n      dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) i)\n          ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n        (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) i +\n          (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)\n[PROOFSTEP]\nintro a ha\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\n⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)\n[PROOFSTEP]\nhave I : (a : ℕ) < N := ha\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)\n[PROOFSTEP]\nhave J : G (Fin.last N) = i := by dsimp; simp only [if_true, eq_self_iff_true]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ G ↑(last N) = i\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\n⊢ (if N = N then i else g N) = i\n[PROOFSTEP]\nsimp only [if_true, eq_self_iff_true]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\nJ : G ↑(last N) = i\n⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)\n[PROOFSTEP]\nhave K : G a = g a := by dsimp; simp [I.ne, (hg a I).1]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\nJ : G ↑(last N) = i\n⊢ G ↑a = g ↑a\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\nJ : G ↑(last N) = i\n⊢ (if ↑a = N then i else g ↑a) = g ↑a\n[PROOFSTEP]\nsimp [I.ne, (hg a I).1]\n[GOAL]\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\na : Fin (N + 1)\nha : a < last N\nI : ↑a < N\nJ : G ↑(last N) = i\nK : G ↑a = g ↑a\n⊢ dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n      ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n    (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +\n      (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)\n[PROOFSTEP]\nconvert dist_le_add_of_nonempty_closedBall_inter_closedBall (hg _ I).2.1\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹ : MetricSpace α\nβ : Type u\ninst✝ : Nonempty β\np : TauPackage β α\ni✝ : Ordinal.{u}\nhi✝ : i✝ < lastStep p\nN : ℕ\nhN : IsEmpty (SatelliteConfig α N p.τ)\ni : Ordinal.{u}\nIH : ∀ (k : Ordinal.{u}), k < i → k < lastStep p → color p k < N\nhi : i < lastStep p\nA : Set ℕ :=\n  ⋃ (j : { j // j < i }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i)))),\n    {color p ↑j}\ncolor_i : color p i = sInf (univ \\ A)\nN_mem : N ∈ univ \\ A\nInf_eq_N : sInf (univ \\ A) = N\ng : ℕ → Ordinal.{u}\nhg :\n  ∀ (k : ℕ),\n    k < N →\n      g k < i ∧\n        Set.Nonempty\n            (closedBall (BallPackage.c p.toBallPackage (index p (g k)))\n                (BallPackage.r p.toBallPackage (index p (g k))) ∩\n              closedBall (BallPackage.c p.toBallPackage (index p i)) (BallPackage.r p.toBallPackage (index p i))) ∧\n          k = color p (g k)\nG : ℕ → Ordinal.{u} := fun n => if n = N then i else g n\ncolor_G : ∀ (n : ℕ), n ≤ N → color p (G n) = n\nG_lt_last : ∀ (n : ℕ), n ≤ N → G n < lastStep p\nfGn :\n  ∀ (n : ℕ),\n    n ≤ N →\n      ¬BallPackage.c p.toBallPackage (index p (G n)) ∈ iUnionUpTo p (G n) ∧\n        R p (G n) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G n))\nGab :\n  ∀ (a b : Fin (Nat.succ N)),\n    G ↑a < G ↑b →\n      BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n          dist (BallPackage.c p.toBallPackage (index p (G ↑a))) (BallPackage.c p.toBallPackage (index p (G ↑b))) ∧\n        BallPackage.r p.toBallPackage (index p (G ↑b)) ≤ p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))\nsc : SatelliteConfig α N p.τ :=\n  { c := fun k => BallPackage.c p.toBallPackage (index p (G ↑k)),\n    r := fun k => BallPackage.r p.toBallPackage (index p (G ↑k)),\n    rpos := (_ : ∀ (k : Fin (Nat.succ N)), 0 < BallPackage.r p.toBallPackage (index p (G ↑k))),\n    h :=\n      (_ :\n        ∀ (a b : Fin (Nat.succ N)),\n          a ≠ b →\n            (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n                  dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n                    ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b) ∧\n                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n                  p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ∨\n              (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b ≤\n                  dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) b)\n                    ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a) ∧\n                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a ≤\n                  p.τ * (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) b),\n    hlast :=\n      (_ :\n        ∀ (a : Fin (N + 1)),\n          a < last N →\n            BallPackage.r p.toBallPackage (index p (G ↑a)) ≤\n                dist (BallPackage.c p.toBallPackage (index p (G ↑a)))\n                  (BallPackage.c p.toBallPackage (index p (G ↑(last N)))) ∧\n              BallPackage.r p.toBallPackage (index p (G ↑(last N))) ≤\n                p.τ * BallPackage.r p.toBallPackage (index p (G ↑a))),\n    inter :=\n      (_ :\n        ∀ (a : Fin (N + 1)),\n          a < last N →\n            dist ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) a)\n                ((fun k => BallPackage.c p.toBallPackage (index p (G ↑k))) (last N)) ≤\n              (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) a +\n                (fun k => BallPackage.r p.toBallPackage (index p (G ↑k))) (last N)) }\n⊢ False\n[PROOFSTEP]\nexact hN.false sc\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\n⊢ ∃ s,\n    (∀ (i : Fin N), PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) ∧\n      range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\ncases isEmpty_or_nonempty β\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : IsEmpty β\n⊢ ∃ s,\n    (∀ (i : Fin N), PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) ∧\n      range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nrefine' ⟨fun _ => ∅, fun _ => pairwiseDisjoint_empty, _⟩\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : IsEmpty β\n⊢ range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ (fun x => ∅) i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nrw [← image_univ, eq_empty_of_isEmpty (univ : Set β)]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : IsEmpty β\n⊢ q.c '' ∅ ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ (fun x => ∅) i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nsimp\n  -- Now, assume `β` is nonempty.\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\n⊢ ∃ s,\n    (∀ (i : Fin N), PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) ∧\n      range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nlet p : TauPackage β α :=\n  { q with\n    τ\n    one_lt_tau := hτ }\n    -- we use for `s i` the balls of color `i`.\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\n⊢ ∃ s,\n    (∀ (i : Fin N), PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) ∧\n      range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nlet s := fun i : Fin N => ⋃ (k : Ordinal.{u}) (_ : k < p.lastStep) (_ : p.color k = i), ({p.index k} : Set β)\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\n⊢ ∃ s,\n    (∀ (i : Fin N), PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) ∧\n      range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nrefine' ⟨s, fun i => _, _⟩\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\n⊢ PairwiseDisjoint (s i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nintro x hx y hy x_ne_y\n[GOAL]\ncase inr.refine'_1\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\nx : β\nhx : x ∈ s i\ny : β\nhy : y ∈ s i\nx_ne_y : x ≠ y\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) x y\n[PROOFSTEP]\nobtain ⟨jx, jx_lt, jxi, rfl⟩ : ∃ jx : Ordinal, jx < p.lastStep ∧ p.color jx = i ∧ x = p.index jx := by\n  simpa only [exists_prop, mem_iUnion, mem_singleton_iff] using hx\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\nx : β\nhx : x ∈ s i\ny : β\nhy : y ∈ s i\nx_ne_y : x ≠ y\n⊢ ∃ jx, jx < lastStep p ∧ color p jx = ↑i ∧ x = index p jx\n[PROOFSTEP]\nsimpa only [exists_prop, mem_iUnion, mem_singleton_iff] using hx\n[GOAL]\ncase inr.refine'_1.intro.intro.intro\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\ny : β\nhy : y ∈ s i\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\nx_ne_y : index p jx ≠ y\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) y\n[PROOFSTEP]\nobtain ⟨jy, jy_lt, jyi, rfl⟩ : ∃ jy : Ordinal, jy < p.lastStep ∧ p.color jy = i ∧ y = p.index jy := by\n  simpa only [exists_prop, mem_iUnion, mem_singleton_iff] using hy\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\ny : β\nhy : y ∈ s i\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\nx_ne_y : index p jx ≠ y\n⊢ ∃ jy, jy < lastStep p ∧ color p jy = ↑i ∧ y = index p jy\n[PROOFSTEP]\nsimpa only [exists_prop, mem_iUnion, mem_singleton_iff] using hy\n[GOAL]\ncase inr.refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nwlog jxy : jx ≤ jy generalizing jx jy\n[GOAL]\ncase inr.refine'_1.intro.intro.intro.intro.intro.intro.inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\nthis :\n  ∀ (jx : Ordinal.{u}),\n    jx < lastStep p →\n      color p jx = ↑i →\n        index p jx ∈ s i →\n          ∀ (jy : Ordinal.{u}),\n            jy < lastStep p →\n              color p jy = ↑i →\n                index p jy ∈ s i →\n                  index p jx ≠ index p jy →\n                    jx ≤ jy →\n                      (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx)\n                        (index p jy)\njxy : ¬jx ≤ jy\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nexact (this jy jy_lt jyi hy jx jx_lt jxi hx x_ne_y.symm (le_of_not_le jxy)).symm\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx ≤ jy\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nreplace jxy : jx < jy\n[GOAL]\ncase jxy\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx ≤ jy\n⊢ jx < jy\n[PROOFSTEP]\nrcases lt_or_eq_of_le jxy with (H | rfl)\n[GOAL]\ncase jxy.inl\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx ≤ jy\nH : jx < jy\n⊢ jx < jy\n[PROOFSTEP]\n{exact H\n}\n[GOAL]\ncase jxy.inl\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx ≤ jy\nH : jx < jy\n⊢ jx < jy\n[PROOFSTEP]\nexact H\n[GOAL]\ncase jxy.inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy_lt : jx < lastStep p\njyi : color p jx = ↑i\nhy : index p jx ∈ s i\nx_ne_y : index p jx ≠ index p jx\njxy : jx ≤ jx\n⊢ jx < jx\n[PROOFSTEP]\n{exact (x_ne_y rfl).elim\n}\n[GOAL]\ncase jxy.inr\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy_lt : jx < lastStep p\njyi : color p jx = ↑i\nhy : index p jx ∈ s i\nx_ne_y : index p jx ≠ index p jx\njxy : jx ≤ jx\n⊢ jx < jx\n[PROOFSTEP]\nexact (x_ne_y rfl).elim\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nlet A : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    (closedBall (p.c (p.index j)) (p.r (p.index j)) ∩ closedBall (p.c (p.index jy)) (p.r (p.index jy))).Nonempty),\n    {p.color j}\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nhave color_j : p.color jy = sInf (univ \\ A) := by rw [TauPackage.color]\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\n⊢ color p jy = sInf (univ \\ A)\n[PROOFSTEP]\nrw [TauPackage.color]\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nhave h : p.color jy ∈ univ \\ A := by\n  rw [color_j]\n  apply csInf_mem\n  refine' ⟨N, _⟩\n  simp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, not_and, mem_univ, mem_diff,\n    Subtype.exists, Subtype.coe_mk]\n  intro k hk _\n  exact (p.color_lt (hk.trans jy_lt) hN).ne'\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ color p jy ∈ univ \\ A\n[PROOFSTEP]\nrw [color_j]\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ sInf (univ \\ A) ∈ univ \\ A\n[PROOFSTEP]\napply csInf_mem\n[GOAL]\ncase hs\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ Set.Nonempty (univ \\ A)\n[PROOFSTEP]\nrefine' ⟨N, _⟩\n[GOAL]\ncase hs\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ N ∈ univ \\ A\n[PROOFSTEP]\nsimp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, not_and, mem_univ, mem_diff,\n  Subtype.exists, Subtype.coe_mk]\n[GOAL]\ncase hs\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\n⊢ ∀ (x : Ordinal.{u}),\n    x < jy →\n      Set.Nonempty\n          (closedBall\n              (BallPackage.c q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  x))\n              (BallPackage.r q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  x)) ∩\n            closedBall\n              (BallPackage.c q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  jy))\n              (BallPackage.r q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  jy))) →\n        ¬N =\n            color\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              x\n[PROOFSTEP]\nintro k hk _\n[GOAL]\ncase hs\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\nk : Ordinal.{u}\nhk : k < jy\na✝ :\n  Set.Nonempty\n    (closedBall\n        (BallPackage.c q\n          (index\n            {\n              toBallPackage :=\n                { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                  r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n              τ := τ, one_lt_tau := hτ }\n            k))\n        (BallPackage.r q\n          (index\n            {\n              toBallPackage :=\n                { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                  r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n              τ := τ, one_lt_tau := hτ }\n            k)) ∩\n      closedBall\n        (BallPackage.c q\n          (index\n            {\n              toBallPackage :=\n                { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                  r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n              τ := τ, one_lt_tau := hτ }\n            jy))\n        (BallPackage.r q\n          (index\n            {\n              toBallPackage :=\n                { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                  r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n              τ := τ, one_lt_tau := hτ }\n            jy)))\n⊢ ¬N =\n      color\n        {\n          toBallPackage :=\n            { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n              r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n          τ := τ, one_lt_tau := hτ }\n        k\n[PROOFSTEP]\nexact (p.color_lt (hk.trans jy_lt) hN).ne'\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\nh : color p jy ∈ univ \\ A\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nsimp only [not_exists, true_and_iff, exists_prop, mem_iUnion, mem_singleton_iff, not_and, mem_univ, mem_diff,\n  Subtype.exists, Subtype.coe_mk] at h \n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\nh :\n  ∀ (x : Ordinal.{u}),\n    x < jy →\n      Set.Nonempty\n          (closedBall\n              (BallPackage.c q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  x))\n              (BallPackage.r q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  x)) ∩\n            closedBall\n              (BallPackage.c q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  jy))\n              (BallPackage.r q\n                (index\n                  {\n                    toBallPackage :=\n                      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                    τ := τ, one_lt_tau := hτ }\n                  jy))) →\n        ¬color\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jy =\n            color\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              x\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\nspecialize h jx jxy\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\nh :\n  Set.Nonempty\n      (closedBall\n          (BallPackage.c q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jx))\n          (BallPackage.r q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jx)) ∩\n        closedBall\n          (BallPackage.c q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jy))\n          (BallPackage.r q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jy))) →\n    ¬color\n          {\n            toBallPackage :=\n              { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n            τ := τ, one_lt_tau := hτ }\n          jy =\n        color\n          {\n            toBallPackage :=\n              { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n            τ := τ, one_lt_tau := hτ }\n          jx\n⊢ (Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)) (index p jx) (index p jy)\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\ni : Fin N\njx : Ordinal.{u}\njx_lt : jx < lastStep p\njxi : color p jx = ↑i\nhx : index p jx ∈ s i\njy : Ordinal.{u}\njy_lt : jy < lastStep p\njyi : color p jy = ↑i\nhy : index p jy ∈ s i\nx_ne_y : index p jx ≠ index p jy\njxy : jx < jy\nA : Set ℕ :=\n  ⋃ (j : { j // j < jy }) (_ :\n    Set.Nonempty\n      (closedBall (BallPackage.c p.toBallPackage (index p ↑j)) (BallPackage.r p.toBallPackage (index p ↑j)) ∩\n        closedBall (BallPackage.c p.toBallPackage (index p jy)) (BallPackage.r p.toBallPackage (index p jy)))),\n    {color p ↑j}\ncolor_j : color p jy = sInf (univ \\ A)\nh :\n  ¬(Disjoint on fun j => closedBall (BallPackage.c q j) (BallPackage.r q j))\n      (index\n        {\n          toBallPackage :=\n            { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n              r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n          τ := τ, one_lt_tau := hτ }\n        jx)\n      (index\n        {\n          toBallPackage :=\n            { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n              r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n          τ := τ, one_lt_tau := hτ }\n        jy)\n⊢ Set.Nonempty\n      (closedBall\n          (BallPackage.c q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jx))\n          (BallPackage.r q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jx)) ∩\n        closedBall\n          (BallPackage.c q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jy))\n          (BallPackage.r q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              jy))) ∧\n    color\n        {\n          toBallPackage :=\n            { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n              r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n          τ := τ, one_lt_tau := hτ }\n        jy =\n      color\n        {\n          toBallPackage :=\n            { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n              r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n          τ := τ, one_lt_tau := hτ }\n        jx\n[PROOFSTEP]\nsimpa only [jxi, jyi, and_true_iff, eq_self_iff_true, ← not_disjoint_iff_nonempty_inter] using h\n[GOAL]\ncase inr.refine'_2\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\n⊢ range q.c ⊆ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nrefine' range_subset_iff.2 fun b => _\n[GOAL]\ncase inr.refine'_2\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\nb : β\n⊢ BallPackage.c q b ∈ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nobtain ⟨a, ha⟩ : ∃ a : Ordinal, a < p.lastStep ∧ dist (p.c b) (p.c (p.index a)) < p.r (p.index a) := by\n  simpa only [iUnionUpTo, exists_prop, mem_iUnion, mem_ball, Subtype.exists, Subtype.coe_mk] using\n    p.mem_iUnionUpTo_lastStep b\n[GOAL]\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\nb : β\n⊢ ∃ a,\n    a < lastStep p ∧\n      dist (BallPackage.c p.toBallPackage b) (BallPackage.c p.toBallPackage (index p a)) <\n        BallPackage.r p.toBallPackage (index p a)\n[PROOFSTEP]\nsimpa only [iUnionUpTo, exists_prop, mem_iUnion, mem_ball, Subtype.exists, Subtype.coe_mk] using\n  p.mem_iUnionUpTo_lastStep b\n[GOAL]\ncase inr.refine'_2.intro\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\nb : β\na : Ordinal.{u}\nha :\n  a < lastStep p ∧\n    dist (BallPackage.c p.toBallPackage b) (BallPackage.c p.toBallPackage (index p a)) <\n      BallPackage.r p.toBallPackage (index p a)\n⊢ BallPackage.c q b ∈ ⋃ (i : Fin N) (j : β) (_ : j ∈ s i), ball (BallPackage.c q j) (BallPackage.r q j)\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, mem_ball, mem_singleton_iff, biUnion_and', exists_eq_left, iUnion_exists,\n  exists_and_left]\n[GOAL]\ncase inr.refine'_2.intro\nα : Type u_1\ninst✝ : MetricSpace α\nβ : Type u\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nq : BallPackage β α\nh✝ : Nonempty β\np : TauPackage β α :=\n  {\n    toBallPackage :=\n      { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n        r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n    τ := τ, one_lt_tau := hτ }\ns : Fin N → Set β := fun i => ⋃ (k : Ordinal.{u}) (_ : k < lastStep p) (_ : color p k = ↑i), {index p k}\nb : β\na : Ordinal.{u}\nha :\n  a < lastStep p ∧\n    dist (BallPackage.c p.toBallPackage b) (BallPackage.c p.toBallPackage (index p a)) <\n      BallPackage.r p.toBallPackage (index p a)\n⊢ ∃ i i_1,\n    color\n          {\n            toBallPackage :=\n              { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n            τ := τ, one_lt_tau := hτ }\n          i_1 =\n        ↑i ∧\n      i_1 <\n          lastStep\n            {\n              toBallPackage :=\n                { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                  r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n              τ := τ, one_lt_tau := hτ } ∧\n        dist (BallPackage.c q b)\n            (BallPackage.c q\n              (index\n                {\n                  toBallPackage :=\n                    { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                      r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                  τ := τ, one_lt_tau := hτ }\n                i_1)) <\n          BallPackage.r q\n            (index\n              {\n                toBallPackage :=\n                  { c := q.c, r := q.r, rpos := (_ : ∀ (b : β), 0 < BallPackage.r q b), r_bound := q.r_bound,\n                    r_le := (_ : ∀ (b : β), BallPackage.r q b ≤ q.r_bound) },\n                τ := τ, one_lt_tau := hτ }\n              i_1)\n[PROOFSTEP]\nexact ⟨⟨p.color a, p.color_lt ha.1 hN⟩, a, rfl, ha⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nrcases le_or_lt (μ s) 0 with (hμs | hμs)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : ↑↑μ s ≤ 0\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave : μ s = 0 := le_bot_iff.1 hμs\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : ↑↑μ s ≤ 0\nthis : ↑↑μ s = 0\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nrefine' ⟨∅, by simp only [Finset.coe_empty, empty_subset], _, _⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : ↑↑μ s ≤ 0\nthis : ↑↑μ s = 0\n⊢ ↑∅ ⊆ s\n[PROOFSTEP]\nsimp only [Finset.coe_empty, empty_subset]\n[GOAL]\ncase inl.refine'_1\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : ↑↑μ s ≤ 0\nthis : ↑↑μ s = 0\n⊢ ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ ∅), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nsimp only [this, Finset.not_mem_empty, diff_empty, iUnion_false, iUnion_empty, nonpos_iff_eq_zero, mul_zero]\n[GOAL]\ncase inl.refine'_2\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : ↑↑μ s ≤ 0\nthis : ↑↑μ s = 0\n⊢ PairwiseDisjoint ↑∅ fun x => closedBall x (r x)\n[PROOFSTEP]\nsimp only [Finset.coe_empty, pairwiseDisjoint_empty]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\ncases isEmpty_or_nonempty α\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : IsEmpty α\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nsimp only [eq_empty_of_isEmpty s, measure_empty] at hμs \n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nh✝ : IsEmpty α\nhμs : 0 < 0\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nexact (lt_irrefl _ hμs).elim\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave Npos : N ≠ 0 := by\n  rintro rfl\n  inhabit α\n  exact not_isEmpty_of_nonempty _ hN\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\n⊢ N ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nτ : ℝ\nhτ : 1 < τ\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nhN : IsEmpty (SatelliteConfig α 0 τ)\n⊢ False\n[PROOFSTEP]\ninhabit α\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nτ : ℝ\nhτ : 1 < τ\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nhN : IsEmpty (SatelliteConfig α 0 τ)\ninhabited_h : Inhabited α\n⊢ False\n[PROOFSTEP]\nexact not_isEmpty_of_nonempty _ hN\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nobtain ⟨o, so, omeas, μo⟩ : ∃ o : Set α, s ⊆ o ∧ MeasurableSet o ∧ μ o = μ s := exists_measurable_superset μ s\n[GOAL]\ncase inr.inr.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nlet a : BallPackage s α :=\n  { c := fun x => x\n    r := fun x => r x\n    rpos := fun x => rpos x x.2\n    r_bound := 1\n    r_le := fun x => rle x x.2 }\n[GOAL]\ncase inr.inr.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nrcases exist_disjoint_covering_families hτ hN a with ⟨u, hu, hu'⟩\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave u_count : ∀ i, (u i).Countable := by\n  intro i\n  refine' (hu i).countable_of_nonempty_interior fun j _ => _\n  have : (ball (j : α) (r j)).Nonempty := nonempty_ball.2 (a.rpos _)\n  exact this.mono ball_subset_interior_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\n⊢ ∀ (i : Fin N), Set.Countable (u i)\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\ni : Fin N\n⊢ Set.Countable (u i)\n[PROOFSTEP]\nrefine' (hu i).countable_of_nonempty_interior fun j _ => _\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\ni : Fin N\nj : ↑s\nx✝ : j ∈ u i\n⊢ Set.Nonempty (interior (closedBall (BallPackage.c a j) (BallPackage.r a j)))\n[PROOFSTEP]\nhave : (ball (j : α) (r j)).Nonempty := nonempty_ball.2 (a.rpos _)\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\ni : Fin N\nj : ↑s\nx✝ : j ∈ u i\nthis : Set.Nonempty (ball (↑j) (r ↑j))\n⊢ Set.Nonempty (interior (closedBall (BallPackage.c a j) (BallPackage.r a j)))\n[PROOFSTEP]\nexact this.mono ball_subset_interior_closedBall\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nlet v : Fin N → Set α := fun i => ⋃ (x : s) (_ : x ∈ u i), closedBall x (r x)\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave A : s = ⋃ i : Fin N, s ∩ v i :=\n  by\n  refine' Subset.antisymm _ (iUnion_subset fun i => inter_subset_left _ _)\n  intro x hx\n  obtain ⟨i, y, hxy, h'⟩ : ∃ (i : Fin N) (i_1 : ↥s), i_1 ∈ u i ∧ x ∈ ball (↑i_1) (r ↑i_1) :=\n    by\n    have : x ∈ range a.c := by simpa only [Subtype.range_coe_subtype, setOf_mem_eq]\n    simpa only [mem_iUnion, bex_def] using hu' this\n  refine' mem_iUnion.2 ⟨i, ⟨hx, _⟩⟩\n  simp only [exists_prop, mem_iUnion, SetCoe.exists, exists_and_right, Subtype.coe_mk]\n  exact ⟨y, ⟨y.2, by simpa only [Subtype.coe_eta]⟩, ball_subset_closedBall h'⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\n⊢ s = ⋃ (i : Fin N), s ∩ v i\n[PROOFSTEP]\nrefine' Subset.antisymm _ (iUnion_subset fun i => inter_subset_left _ _)\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\n⊢ s ⊆ ⋃ (i : Fin N), s ∩ v i\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\n⊢ x ∈ ⋃ (i : Fin N), s ∩ v i\n[PROOFSTEP]\nobtain ⟨i, y, hxy, h'⟩ : ∃ (i : Fin N) (i_1 : ↥s), i_1 ∈ u i ∧ x ∈ ball (↑i_1) (r ↑i_1) :=\n  by\n  have : x ∈ range a.c := by simpa only [Subtype.range_coe_subtype, setOf_mem_eq]\n  simpa only [mem_iUnion, bex_def] using hu' this\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\n⊢ ∃ i i_1, i_1 ∈ u i ∧ x ∈ ball (↑i_1) (r ↑i_1)\n[PROOFSTEP]\nhave : x ∈ range a.c := by simpa only [Subtype.range_coe_subtype, setOf_mem_eq]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\n⊢ x ∈ range a.c\n[PROOFSTEP]\nsimpa only [Subtype.range_coe_subtype, setOf_mem_eq]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\nthis : x ∈ range a.c\n⊢ ∃ i i_1, i_1 ∈ u i ∧ x ∈ ball (↑i_1) (r ↑i_1)\n[PROOFSTEP]\nsimpa only [mem_iUnion, bex_def] using hu' this\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\ni : Fin N\ny : ↑s\nhxy : y ∈ u i\nh' : x ∈ ball (↑y) (r ↑y)\n⊢ x ∈ ⋃ (i : Fin N), s ∩ v i\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨i, ⟨hx, _⟩⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\ni : Fin N\ny : ↑s\nhxy : y ∈ u i\nh' : x ∈ ball (↑y) (r ↑y)\n⊢ x ∈ v i\n[PROOFSTEP]\nsimp only [exists_prop, mem_iUnion, SetCoe.exists, exists_and_right, Subtype.coe_mk]\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\ni : Fin N\ny : ↑s\nhxy : y ∈ u i\nh' : x ∈ ball (↑y) (r ↑y)\n⊢ ∃ x_1, (∃ x, { val := x_1, property := (_ : x_1 ∈ s) } ∈ u i) ∧ x ∈ closedBall x_1 (r x_1)\n[PROOFSTEP]\nexact ⟨y, ⟨y.2, by simpa only [Subtype.coe_eta]⟩, ball_subset_closedBall h'⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nx : α\nhx : x ∈ s\ni : Fin N\ny : ↑s\nhxy : y ∈ u i\nh' : x ∈ ball (↑y) (r ↑y)\n⊢ { val := ↑y, property := (_ : ↑y ∈ s) } ∈ u i\n[PROOFSTEP]\nsimpa only [Subtype.coe_eta]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave S : ∑ _i : Fin N, μ s / N ≤ ∑ i, μ (s ∩ v i) :=\n  calc\n    ∑ _i : Fin N, μ s / N = μ s :=\n      by\n      simp only [Finset.card_fin, Finset.sum_const, nsmul_eq_mul]\n      rw [ENNReal.mul_div_cancel']\n      · simp only [Npos, Ne.def, Nat.cast_eq_zero, not_false_iff]\n      · exact ENNReal.nat_ne_top _\n    _ ≤ ∑ i, μ (s ∩ v i) := by\n      conv_lhs => rw [A]\n      apply measure_iUnion_fintype_le\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ∑ _i : Fin N, ↑↑μ s / ↑N = ↑↑μ s\n[PROOFSTEP]\nsimp only [Finset.card_fin, Finset.sum_const, nsmul_eq_mul]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ↑N * (↑↑μ s / ↑N) = ↑↑μ s\n[PROOFSTEP]\nrw [ENNReal.mul_div_cancel']\n[GOAL]\ncase h0\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ↑N ≠ 0\n[PROOFSTEP]\nsimp only [Npos, Ne.def, Nat.cast_eq_zero, not_false_iff]\n[GOAL]\ncase hI\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ↑N ≠ ⊤\n[PROOFSTEP]\nexact ENNReal.nat_ne_top _\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ↑↑μ s ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\n[PROOFSTEP]\nconv_lhs => rw [A]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n| ↑↑μ s\n[PROOFSTEP]\nrw [A]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n| ↑↑μ s\n[PROOFSTEP]\nrw [A]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n| ↑↑μ s\n[PROOFSTEP]\nrw [A]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\n⊢ ↑↑μ (⋃ (i : Fin N), s ∩ v i) ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\n[PROOFSTEP]\napply measure_iUnion_fintype_le\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nobtain ⟨i, -, hi⟩ : ∃ (i : Fin N), i ∈ Finset.univ ∧ μ s / N ≤ μ (s ∩ v i) :=\n  by\n  apply ENNReal.exists_le_of_sum_le _ S\n  exact ⟨⟨0, bot_lt_iff_ne_bot.2 Npos⟩, Finset.mem_univ _⟩\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\n⊢ ∃ i, i ∈ Finset.univ ∧ ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n[PROOFSTEP]\napply ENNReal.exists_le_of_sum_le _ S\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\n⊢ Finset.Nonempty Finset.univ\n[PROOFSTEP]\nexact ⟨⟨0, bot_lt_iff_ne_bot.2 Npos⟩, Finset.mem_univ _⟩\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nreplace hi : μ s / (N + 1) < μ (s ∩ v i)\n[GOAL]\ncase hi\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\n[PROOFSTEP]\napply lt_of_lt_of_le _ hi\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ ↑↑μ s / (↑N + 1) < ↑↑μ s / ↑N\n[PROOFSTEP]\napply (ENNReal.mul_lt_mul_left hμs.ne' (measure_lt_top μ s).ne).2\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ (↑N + 1)⁻¹ < (↑N)⁻¹\n[PROOFSTEP]\nrw [ENNReal.inv_lt_inv]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ ↑N < ↑N + 1\n[PROOFSTEP]\nconv_lhs => rw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / ↑N ≤ ↑↑μ (s ∩ v i)\n⊢ ↑N + 0 < ↑N + 1\n[PROOFSTEP]\nexact ENNReal.add_lt_add_left (ENNReal.nat_ne_top N) zero_lt_one\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave B : μ (o ∩ v i) = ∑' x : u i, μ (o ∩ closedBall x (r x)) :=\n  by\n  have : o ∩ v i = ⋃ (x : s) (_ : x ∈ u i), o ∩ closedBall x (r x) := by simp only [inter_iUnion]\n  rw [this, measure_biUnion (u_count i)]\n  · exact (hu i).mono fun k => inter_subset_right _ _\n  · exact fun b _ => omeas.inter measurableSet_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\n⊢ ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nhave : o ∩ v i = ⋃ (x : s) (_ : x ∈ u i), o ∩ closedBall x (r x) := by simp only [inter_iUnion]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\n⊢ o ∩ v i = ⋃ (x : ↑s) (_ : x ∈ u i), o ∩ closedBall (↑x) (r ↑x)\n[PROOFSTEP]\nsimp only [inter_iUnion]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nthis : o ∩ v i = ⋃ (x : ↑s) (_ : x ∈ u i), o ∩ closedBall (↑x) (r ↑x)\n⊢ ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nrw [this, measure_biUnion (u_count i)]\n[GOAL]\ncase hd\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nthis : o ∩ v i = ⋃ (x : ↑s) (_ : x ∈ u i), o ∩ closedBall (↑x) (r ↑x)\n⊢ PairwiseDisjoint (u i) fun x => o ∩ closedBall (↑x) (r ↑x)\n[PROOFSTEP]\nexact (hu i).mono fun k => inter_subset_right _ _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nthis : o ∩ v i = ⋃ (x : ↑s) (_ : x ∈ u i), o ∩ closedBall (↑x) (r ↑x)\n⊢ ∀ (b : ↑s), b ∈ u i → MeasurableSet (o ∩ closedBall (↑b) (r ↑b))\n[PROOFSTEP]\nexact fun b _ => omeas.inter measurableSet_closedBall\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nobtain ⟨w, hw⟩ : ∃ w : Finset (u i), μ s / (N + 1) < ∑ x : u i in w, μ (o ∩ closedBall (x : α) (r (x : α))) :=\n  by\n  have C : HasSum (fun x : u i => μ (o ∩ closedBall x (r x))) (μ (o ∩ v i)) := by rw [B]; exact ENNReal.summable.hasSum\n  have : μ s / (N + 1) < μ (o ∩ v i) := hi.trans_le (measure_mono (inter_subset_inter_left _ so))\n  exact ((tendsto_order.1 C).1 _ this).exists\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ∃ w, ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nhave C : HasSum (fun x : u i => μ (o ∩ closedBall x (r x))) (μ (o ∩ v i)) := by rw [B]; exact ENNReal.summable.hasSum\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ HasSum (fun x => ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))) (↑↑μ (o ∩ v i))\n[PROOFSTEP]\nrw [B]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ HasSum (fun x => ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))) (∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x)))\n[PROOFSTEP]\nexact ENNReal.summable.hasSum\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nC : HasSum (fun x => ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))) (↑↑μ (o ∩ v i))\n⊢ ∃ w, ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nhave : μ s / (N + 1) < μ (o ∩ v i) := hi.trans_le (measure_mono (inter_subset_inter_left _ so))\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nC : HasSum (fun x => ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))) (↑↑μ (o ∩ v i))\nthis : ↑↑μ s / (↑N + 1) < ↑↑μ (o ∩ v i)\n⊢ ∃ w, ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nexact ((tendsto_order.1 C).1 _ this).exists\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ∃ t,\n    ↑t ⊆ s ∧\n      ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s ∧\n        PairwiseDisjoint ↑t fun x => closedBall x (r x)\n[PROOFSTEP]\nrefine'\n  ⟨Finset.image (fun x : u i => x) w, _, _, _⟩\n    -- show that the finset is included in `s`.\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑(Finset.image (fun x => ↑↑x) w) ⊆ s\n[PROOFSTEP]\nsimp only [image_subset_iff, Finset.coe_image]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑w ⊆ (fun x => ↑↑x) ⁻¹' s\n[PROOFSTEP]\nintro y _\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\ny : ↑(u i)\na✝ : y ∈ ↑w\n⊢ y ∈ (fun x => ↑↑x) ⁻¹' s\n[PROOFSTEP]\nsimp only [Subtype.coe_prop, mem_preimage]\n  -- show that it covers a large enough proportion of `s`. For measure computations, we do not\n    -- use `s` (which might not be measurable), but its measurable superset `o`. Since their measures\n    -- are the same, this does not spoil the estimates\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ Finset.image (fun x => ↑↑x) w), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nsuffices H : μ (o \\ ⋃ x ∈ w, closedBall (↑x) (r ↑x)) ≤ N / (N + 1) * μ s\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nH : ↑↑μ (o \\ ⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ Finset.image (fun x => ↑↑x) w), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nrw [Finset.set_biUnion_finset_image]\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nH : ↑↑μ (o \\ ⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (y : ↑(u i)) (_ : y ∈ w), closedBall (↑↑y) (r ↑↑y)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nexact le_trans (measure_mono (diff_subset_diff so (Subset.refl _))) H\n[GOAL]\ncase H\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ (o \\ ⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ≤ ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nrw [← diff_inter_self_eq_diff, measure_diff_le_iff_le_add _ (inter_subset_right _ _) (measure_lt_top μ _).ne]\n[GOAL]\ncase H\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ o ≤ ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o) + ↑N / (↑N + 1) * ↑↑μ s\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ MeasurableSet ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o)\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ MeasurableSet ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o)\n[PROOFSTEP]\napply MeasurableSet.inter _ omeas\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ MeasurableSet (⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nhaveI : Encodable (u i) := (u_count i).toEncodable\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nthis : Encodable ↑(u i)\n⊢ MeasurableSet (⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nexact MeasurableSet.iUnion fun b => MeasurableSet.iUnion fun _ => measurableSet_closedBall\n[GOAL]\ncase H\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ o ≤ ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o) + ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\ncalc\n  μ o = 1 / (N + 1) * μ s + N / (N + 1) * μ s := by\n    rw [μo, ← add_mul, ENNReal.div_add_div_same, add_comm, ENNReal.div_self, one_mul] <;> simp\n  _ ≤ μ ((⋃ x ∈ w, closedBall (↑x) (r ↑x)) ∩ o) + N / (N + 1) * μ s :=\n    by\n    refine' add_le_add _ le_rfl\n    rw [div_eq_mul_inv, one_mul, mul_comm, ← div_eq_mul_inv]\n    apply hw.le.trans (le_of_eq _)\n    rw [← Finset.set_biUnion_coe, inter_comm _ o, inter_iUnion₂, Finset.set_biUnion_coe, measure_biUnion_finset]\n    · have : (w : Set (u i)).PairwiseDisjoint fun b : u i => closedBall (b : α) (r (b : α)) := by intro k _ l _ hkl;\n        exact hu i k.2 l.2 (Subtype.val_injective.ne hkl)\n      exact this.mono fun k => inter_subset_right _ _\n    · intro b _\n      apply omeas.inter measurableSet_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ o = 1 / (↑N + 1) * ↑↑μ s + ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nrw [μo, ← add_mul, ENNReal.div_add_div_same, add_comm, ENNReal.div_self, one_mul]\n[GOAL]\ncase h0\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑N + 1 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hI\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑N + 1 ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ 1 / (↑N + 1) * ↑↑μ s + ↑N / (↑N + 1) * ↑↑μ s ≤\n    ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o) + ↑N / (↑N + 1) * ↑↑μ s\n[PROOFSTEP]\nrefine' add_le_add _ le_rfl\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ 1 / (↑N + 1) * ↑↑μ s ≤ ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o)\n[PROOFSTEP]\nrw [div_eq_mul_inv, one_mul, mul_comm, ← div_eq_mul_inv]\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ↑↑μ s / (↑N + 1) ≤ ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o)\n[PROOFSTEP]\napply hw.le.trans (le_of_eq _)\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x)) = ↑↑μ ((⋃ (x : ↑(u i)) (_ : x ∈ w), closedBall (↑↑x) (r ↑↑x)) ∩ o)\n[PROOFSTEP]\nrw [← Finset.set_biUnion_coe, inter_comm _ o, inter_iUnion₂, Finset.set_biUnion_coe, measure_biUnion_finset]\n[GOAL]\ncase hd\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ PairwiseDisjoint ↑w fun x => o ∩ closedBall (↑↑x) (r ↑↑x)\n[PROOFSTEP]\nhave : (w : Set (u i)).PairwiseDisjoint fun b : u i => closedBall (b : α) (r (b : α)) := by intro k _ l _ hkl;\n  exact hu i k.2 l.2 (Subtype.val_injective.ne hkl)\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ PairwiseDisjoint ↑w fun b => closedBall (↑↑b) (r ↑↑b)\n[PROOFSTEP]\nintro k _ l _ hkl\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk : ↑(u i)\na✝¹ : k ∈ ↑w\nl : ↑(u i)\na✝ : l ∈ ↑w\nhkl : k ≠ l\n⊢ (Disjoint on fun b => closedBall (↑↑b) (r ↑↑b)) k l\n[PROOFSTEP]\nexact hu i k.2 l.2 (Subtype.val_injective.ne hkl)\n[GOAL]\ncase hd\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nthis : PairwiseDisjoint ↑w fun b => closedBall (↑↑b) (r ↑↑b)\n⊢ PairwiseDisjoint ↑w fun x => o ∩ closedBall (↑↑x) (r ↑↑x)\n[PROOFSTEP]\nexact this.mono fun k => inter_subset_right _ _\n[GOAL]\ncase hm\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ ∀ (b : ↑(u i)), b ∈ w → MeasurableSet (o ∩ closedBall (↑↑b) (r ↑↑b))\n[PROOFSTEP]\nintro b _\n[GOAL]\ncase hm\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nb : ↑(u i)\na✝ : b ∈ w\n⊢ MeasurableSet (o ∩ closedBall (↑↑b) (r ↑↑b))\n[PROOFSTEP]\napply omeas.inter measurableSet_closedBall\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\n⊢ PairwiseDisjoint ↑(Finset.image (fun x => ↑↑x) w) fun x => closedBall x (r x)\n[PROOFSTEP]\nintro k hk l hl hkl\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk : α\nhk : k ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl : α\nhl : l ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : k ≠ l\n⊢ (Disjoint on fun x => closedBall x (r x)) k l\n[PROOFSTEP]\nobtain ⟨k', _, rfl⟩ : ∃ k' : u i, k' ∈ w ∧ ↑k' = k := by\n  simpa only [mem_image, Finset.mem_coe, Finset.coe_image] using hk\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk : α\nhk : k ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl : α\nhl : l ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : k ≠ l\n⊢ ∃ k', k' ∈ w ∧ ↑↑k' = k\n[PROOFSTEP]\nsimpa only [mem_image, Finset.mem_coe, Finset.coe_image] using hk\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nl : α\nhl : l ∈ ↑(Finset.image (fun x => ↑↑x) w)\nk' : ↑(u i)\nleft✝ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ l\n⊢ (Disjoint on fun x => closedBall x (r x)) (↑↑k') l\n[PROOFSTEP]\nobtain ⟨l', _, rfl⟩ : ∃ l' : u i, l' ∈ w ∧ ↑l' = l := by\n  simpa only [mem_image, Finset.mem_coe, Finset.coe_image] using hl\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nl : α\nhl : l ∈ ↑(Finset.image (fun x => ↑↑x) w)\nk' : ↑(u i)\nleft✝ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ l\n⊢ ∃ l', l' ∈ w ∧ ↑↑l' = l\n[PROOFSTEP]\nsimpa only [mem_image, Finset.mem_coe, Finset.coe_image] using hl\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk' : ↑(u i)\nleft✝¹ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl' : ↑(u i)\nleft✝ : l' ∈ w\nhl : ↑↑l' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ ↑↑l'\n⊢ (Disjoint on fun x => closedBall x (r x)) ↑↑k' ↑↑l'\n[PROOFSTEP]\nhave k'nel' : (k' : s) ≠ l' := by intro h; rw [h] at hkl ; exact hkl rfl\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk' : ↑(u i)\nleft✝¹ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl' : ↑(u i)\nleft✝ : l' ∈ w\nhl : ↑↑l' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ ↑↑l'\n⊢ ↑k' ≠ ↑l'\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk' : ↑(u i)\nleft✝¹ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl' : ↑(u i)\nleft✝ : l' ∈ w\nhl : ↑↑l' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ ↑↑l'\nh : ↑k' = ↑l'\n⊢ False\n[PROOFSTEP]\nrw [h] at hkl \n[GOAL]\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk' : ↑(u i)\nleft✝¹ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl' : ↑(u i)\nleft✝ : l' ∈ w\nhl : ↑↑l' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑l' ≠ ↑↑l'\nh : ↑k' = ↑l'\n⊢ False\n[PROOFSTEP]\nexact hkl rfl\n[GOAL]\ncase inr.inr.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.intro.intro.intro.intro\nα : Type u_1\ninst✝⁴ : MetricSpace α\nβ : Type u\ninst✝³ : SecondCountableTopology α\ninst✝² : MeasurableSpace α\ninst✝¹ : OpensMeasurableSpace α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\ns : Set α\nr : α → ℝ\nrpos : ∀ (x : α), x ∈ s → 0 < r x\nrle : ∀ (x : α), x ∈ s → r x ≤ 1\nhμs : 0 < ↑↑μ s\nh✝ : Nonempty α\nNpos : N ≠ 0\no : Set α\nso : s ⊆ o\nomeas : MeasurableSet o\nμo : ↑↑μ o = ↑↑μ s\na : BallPackage (↑s) α :=\n  { c := fun x => ↑x, r := fun x => r ↑x, rpos := (_ : ∀ (x : ↑s), 0 < r ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s), r ↑x ≤ 1) }\nu : Fin N → Set ↑s\nhu : ∀ (i : Fin N), PairwiseDisjoint (u i) fun j => closedBall (BallPackage.c a j) (BallPackage.r a j)\nhu' : range a.c ⊆ ⋃ (i : Fin N) (j : ↑s) (_ : j ∈ u i), ball (BallPackage.c a j) (BallPackage.r a j)\nu_count : ∀ (i : Fin N), Set.Countable (u i)\nv : Fin N → Set α := fun i => ⋃ (x : ↑s) (_ : x ∈ u i), closedBall (↑x) (r ↑x)\nA : s = ⋃ (i : Fin N), s ∩ v i\nS : ∑ _i : Fin N, ↑↑μ s / ↑N ≤ ∑ i : Fin N, ↑↑μ (s ∩ v i)\ni : Fin N\nhi : ↑↑μ s / (↑N + 1) < ↑↑μ (s ∩ v i)\nB : ↑↑μ (o ∩ v i) = ∑' (x : ↑(u i)), ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nw : Finset ↑(u i)\nhw : ↑↑μ s / (↑N + 1) < ∑ x in w, ↑↑μ (o ∩ closedBall (↑↑x) (r ↑↑x))\nk' : ↑(u i)\nleft✝¹ : k' ∈ w\nhk : ↑↑k' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nl' : ↑(u i)\nleft✝ : l' ∈ w\nhl : ↑↑l' ∈ ↑(Finset.image (fun x => ↑↑x) w)\nhkl : ↑↑k' ≠ ↑↑l'\nk'nel' : ↑k' ≠ ↑l'\n⊢ (Disjoint on fun x => closedBall x (r x)) ↑↑k' ↑↑l'\n[PROOFSTEP]\nexact hu i k'.2 l'.2 k'nel'\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nrcases HasBesicovitchCovering.no_satelliteConfig (α := α) with\n  ⟨N, τ, hτ, hN⟩\n    /- Introduce a property `P` on finsets saying that we have a nice disjoint covering of a\n          subset of `s` by admissible balls. -/\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nlet P : Finset (α × ℝ) → Prop := fun t =>\n  ((t : Set (α × ℝ)).PairwiseDisjoint fun p => closedBall p.1 p.2) ∧\n    (∀ p : α × ℝ, p ∈ t → p.1 ∈ s) ∧\n      ∀ p : α × ℝ,\n        p ∈ t →\n          p.2 ∈\n            f\n              p.1\n                /- Given a finite good covering of a subset `s`, one can find a larger finite good covering,\n                    covering additionally a proportion at least `1/(N+1)` of leftover points. This follows from\n                    `exist_finset_disjoint_balls_large_measure` applied to balls not intersecting the initial\n                    covering. -/\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nhave :\n  ∀ t : Finset (α × ℝ),\n    P t →\n      ∃ u : Finset (α × ℝ),\n        t ⊆ u ∧\n          P u ∧\n            μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.1 p.2) ≤\n              N / (N + 1) * μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.1 p.2) :=\n  by\n  intro t ht\n  set B := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.1 p.2 with hB\n  have B_closed : IsClosed B := isClosed_biUnion (Finset.finite_toSet _) fun i _ => isClosed_ball\n  set s' := s \\ B\n  have : ∀ x ∈ s', ∃ r ∈ f x ∩ Ioo 0 1, Disjoint B (closedBall x r) :=\n    by\n    intro x hx\n    have xs : x ∈ s := ((mem_diff x).1 hx).1\n    rcases eq_empty_or_nonempty B with (hB | hB)\n    · rcases hf x xs 1 zero_lt_one with ⟨r, hr, h'r⟩\n      exact ⟨r, ⟨hr, h'r⟩, by simp only [hB, empty_disjoint]⟩\n    · let r := infDist x B\n      have : 0 < min r 1 := lt_min ((B_closed.not_mem_iff_infDist_pos hB).1 ((mem_diff x).1 hx).2) zero_lt_one\n      rcases hf x xs _ this with ⟨r, hr, h'r⟩\n      refine' ⟨r, ⟨hr, ⟨h'r.1, h'r.2.trans_le (min_le_right _ _)⟩⟩, _⟩\n      rw [disjoint_comm]\n      exact disjoint_closedBall_of_lt_infDist (h'r.2.trans_le (min_le_left _ _))\n  choose! r hr using this\n  obtain ⟨v, vs', hμv, hv⟩ :\n    ∃ v : Finset α,\n      ↑v ⊆ s' ∧\n        μ (s' \\ ⋃ x ∈ v, closedBall x (r x)) ≤ N / (N + 1) * μ s' ∧\n          (v : Set α).PairwiseDisjoint fun x : α => closedBall x (r x) :=\n    haveI rI : ∀ x ∈ s', r x ∈ Ioo (0 : ℝ) 1 := fun x hx => (hr x hx).1.2\n    exist_finset_disjoint_balls_large_measure μ hτ hN s' r (fun x hx => (rI x hx).1) fun x hx => (rI x hx).2.le\n  refine' ⟨t ∪ Finset.image (fun x => (x, r x)) v, Finset.subset_union_left _ _, ⟨_, _, _⟩, _⟩\n  · simp only [Finset.coe_union, pairwiseDisjoint_union, ht.1, true_and_iff, Finset.coe_image]\n    constructor\n    · intro p hp q hq hpq\n      rcases(mem_image _ _ _).1 hp with ⟨p', p'v, rfl⟩\n      rcases(mem_image _ _ _).1 hq with ⟨q', q'v, rfl⟩\n      refine' hv p'v q'v fun hp'q' => _\n      rw [hp'q'] at hpq \n      exact hpq rfl\n    · intro p hp q hq hpq\n      rcases(mem_image _ _ _).1 hq with ⟨q', q'v, rfl⟩\n      apply disjoint_of_subset_left _ (hr q' (vs' q'v)).2\n      rw [hB, ← Finset.set_biUnion_coe]\n      exact subset_biUnion_of_mem (u := fun x : α × ℝ => closedBall x.1 x.2) hp\n  · intro p hp\n    rcases Finset.mem_union.1 hp with (h'p | h'p)\n    · exact ht.2.1 p h'p\n    · rcases Finset.mem_image.1 h'p with ⟨p', p'v, rfl⟩\n      exact ((mem_diff _).1 (vs' (Finset.mem_coe.2 p'v))).1\n  · intro p hp\n    rcases Finset.mem_union.1 hp with (h'p | h'p)\n    · exact ht.2.2 p h'p\n    · rcases Finset.mem_image.1 h'p with ⟨p', p'v, rfl⟩\n      exact (hr p' (vs' p'v)).1.1\n  · convert hμv using 2\n    rw [Finset.set_biUnion_union, ← diff_diff, Finset.set_biUnion_finset_image]\n      /- Define `F` associating to a finite good covering the above enlarged good covering, covering\n          a proportion `1/(N+1)` of leftover points. Iterating `F`, one will get larger and larger good\n          coverings, missing in the end only a measure-zero set. -/\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\n⊢ ∀ (t : Finset (α × ℝ)),\n    P t →\n      ∃ u,\n        t ⊆ u ∧\n          P u ∧\n            ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤\n              ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\n[PROOFSTEP]\nintro t ht\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\n⊢ ∃ u,\n    t ⊆ u ∧\n      P u ∧\n        ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤\n          ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\n[PROOFSTEP]\nset B := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.1 p.2 with hB\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ (s \\ B)\n[PROOFSTEP]\nhave B_closed : IsClosed B := isClosed_biUnion (Finset.finite_toSet _) fun i _ => isClosed_ball\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ (s \\ B)\n[PROOFSTEP]\nset s' := s \\ B\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ s'\n[PROOFSTEP]\nhave : ∀ x ∈ s', ∃ r ∈ f x ∩ Ioo 0 1, Disjoint B (closedBall x r) :=\n  by\n  intro x hx\n  have xs : x ∈ s := ((mem_diff x).1 hx).1\n  rcases eq_empty_or_nonempty B with (hB | hB)\n  · rcases hf x xs 1 zero_lt_one with ⟨r, hr, h'r⟩\n    exact ⟨r, ⟨hr, h'r⟩, by simp only [hB, empty_disjoint]⟩\n  · let r := infDist x B\n    have : 0 < min r 1 := lt_min ((B_closed.not_mem_iff_infDist_pos hB).1 ((mem_diff x).1 hx).2) zero_lt_one\n    rcases hf x xs _ this with ⟨r, hr, h'r⟩\n    refine' ⟨r, ⟨hr, ⟨h'r.1, h'r.2.trans_le (min_le_right _ _)⟩⟩, _⟩\n    rw [disjoint_comm]\n    exact disjoint_closedBall_of_lt_infDist (h'r.2.trans_le (min_le_left _ _))\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\n⊢ ∀ (x : α), x ∈ s' → ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nhave xs : x ∈ s := ((mem_diff x).1 hx).1\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty B with (hB | hB)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : B = ∅\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nrcases hf x xs 1 zero_lt_one with ⟨r, hr, h'r⟩\n[GOAL]\ncase inl.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : B = ∅\nr : ℝ\nhr : r ∈ f x\nh'r : r ∈ Ioo 0 1\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nexact ⟨r, ⟨hr, h'r⟩, by simp only [hB, empty_disjoint]⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : B = ∅\nr : ℝ\nhr : r ∈ f x\nh'r : r ∈ Ioo 0 1\n⊢ Disjoint B (closedBall x r)\n[PROOFSTEP]\nsimp only [hB, empty_disjoint]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nlet r := infDist x B\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\nr : ℝ := infDist x B\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nhave : 0 < min r 1 := lt_min ((B_closed.not_mem_iff_infDist_pos hB).1 ((mem_diff x).1 hx).2) zero_lt_one\n[GOAL]\ncase inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\nr : ℝ := infDist x B\nthis : 0 < min r 1\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nrcases hf x xs _ this with ⟨r, hr, h'r⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\nr✝ : ℝ := infDist x B\nthis : 0 < min r✝ 1\nr : ℝ\nhr : r ∈ f x\nh'r : r ∈ Ioo 0 (min r✝ 1)\n⊢ ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n[PROOFSTEP]\nrefine' ⟨r, ⟨hr, ⟨h'r.1, h'r.2.trans_le (min_le_right _ _)⟩⟩, _⟩\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\nr✝ : ℝ := infDist x B\nthis : 0 < min r✝ 1\nr : ℝ\nhr : r ∈ f x\nh'r : r ∈ Ioo 0 (min r✝ 1)\n⊢ Disjoint B (closedBall x r)\n[PROOFSTEP]\nrw [disjoint_comm]\n[GOAL]\ncase inr.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB✝ : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nx : α\nhx : x ∈ s'\nxs : x ∈ s\nhB : Set.Nonempty B\nr✝ : ℝ := infDist x B\nthis : 0 < min r✝ 1\nr : ℝ\nhr : r ∈ f x\nh'r : r ∈ Ioo 0 (min r✝ 1)\n⊢ Disjoint (closedBall x r) B\n[PROOFSTEP]\nexact disjoint_closedBall_of_lt_infDist (h'r.2.trans_le (min_le_left _ _))\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nthis : ∀ (x : α), x ∈ s' → ∃ r, r ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x r)\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ s'\n[PROOFSTEP]\nchoose! r hr using this\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ s'\n[PROOFSTEP]\nobtain ⟨v, vs', hμv, hv⟩ :\n  ∃ v : Finset α,\n    ↑v ⊆ s' ∧\n      μ (s' \\ ⋃ x ∈ v, closedBall x (r x)) ≤ N / (N + 1) * μ s' ∧\n        (v : Set α).PairwiseDisjoint fun x : α => closedBall x (r x) :=\n  haveI rI : ∀ x ∈ s', r x ∈ Ioo (0 : ℝ) 1 := fun x hx => (hr x hx).1.2\n  exist_finset_disjoint_balls_large_measure μ hτ hN s' r (fun x hx => (rI x hx).1) fun x hx => (rI x hx).2.le\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ ∃ u, t ⊆ u ∧ P u ∧ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤ ↑N / (↑N + 1) * ↑↑μ s'\n[PROOFSTEP]\nrefine' ⟨t ∪ Finset.image (fun x => (x, r x)) v, Finset.subset_union_left _ _, ⟨_, _, _⟩, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ PairwiseDisjoint ↑(t ∪ Finset.image (fun x => (x, r x)) v) fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nsimp only [Finset.coe_union, pairwiseDisjoint_union, ht.1, true_and_iff, Finset.coe_image]\n[GOAL]\ncase intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ (PairwiseDisjoint ((fun x => (x, r x)) '' ↑v) fun p => closedBall p.fst p.snd) ∧\n    ∀ ⦃i : α × ℝ⦄,\n      i ∈ ↑t →\n        ∀ ⦃j : α × ℝ⦄,\n          j ∈ (fun x => (x, r x)) '' ↑v → i ≠ j → Disjoint (closedBall i.fst i.snd) (closedBall j.fst j.snd)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.refine'_1.left\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ PairwiseDisjoint ((fun x => (x, r x)) '' ↑v) fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nintro p hp q hq hpq\n[GOAL]\ncase intro.intro.intro.refine'_1.left\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ (fun x => (x, r x)) '' ↑v\nq : α × ℝ\nhq : q ∈ (fun x => (x, r x)) '' ↑v\nhpq : p ≠ q\n⊢ (Disjoint on fun p => closedBall p.fst p.snd) p q\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hp with ⟨p', p'v, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_1.left.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\nq : α × ℝ\nhq : q ∈ (fun x => (x, r x)) '' ↑v\np' : α\np'v : p' ∈ ↑v\nhp : (p', r p') ∈ (fun x => (x, r x)) '' ↑v\nhpq : (p', r p') ≠ q\n⊢ (Disjoint on fun p => closedBall p.fst p.snd) (p', r p') q\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hq with ⟨q', q'v, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_1.left.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np' : α\np'v : p' ∈ ↑v\nhp : (p', r p') ∈ (fun x => (x, r x)) '' ↑v\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : (p', r p') ≠ (q', r q')\n⊢ (Disjoint on fun p => closedBall p.fst p.snd) (p', r p') (q', r q')\n[PROOFSTEP]\nrefine' hv p'v q'v fun hp'q' => _\n[GOAL]\ncase intro.intro.intro.refine'_1.left.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np' : α\np'v : p' ∈ ↑v\nhp : (p', r p') ∈ (fun x => (x, r x)) '' ↑v\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : (p', r p') ≠ (q', r q')\nhp'q' : p' = (q', r q').fst\n⊢ False\n[PROOFSTEP]\nrw [hp'q'] at hpq \n[GOAL]\ncase intro.intro.intro.refine'_1.left.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np' : α\np'v : p' ∈ ↑v\nhp : (p', r p') ∈ (fun x => (x, r x)) '' ↑v\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : ((q', r q').fst, r (q', r q').fst) ≠ (q', r q')\nhp'q' : p' = (q', r q').fst\n⊢ False\n[PROOFSTEP]\nexact hpq rfl\n[GOAL]\ncase intro.intro.intro.refine'_1.right\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ ∀ ⦃i : α × ℝ⦄,\n    i ∈ ↑t →\n      ∀ ⦃j : α × ℝ⦄, j ∈ (fun x => (x, r x)) '' ↑v → i ≠ j → Disjoint (closedBall i.fst i.snd) (closedBall j.fst j.snd)\n[PROOFSTEP]\nintro p hp q hq hpq\n[GOAL]\ncase intro.intro.intro.refine'_1.right\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ ↑t\nq : α × ℝ\nhq : q ∈ (fun x => (x, r x)) '' ↑v\nhpq : p ≠ q\n⊢ Disjoint (closedBall p.fst p.snd) (closedBall q.fst q.snd)\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hq with ⟨q', q'v, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_1.right.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ ↑t\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : p ≠ (q', r q')\n⊢ Disjoint (closedBall p.fst p.snd) (closedBall (q', r q').fst (q', r q').snd)\n[PROOFSTEP]\napply disjoint_of_subset_left _ (hr q' (vs' q'v)).2\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ ↑t\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : p ≠ (q', r q')\n⊢ closedBall p.fst p.snd ⊆ B\n[PROOFSTEP]\nrw [hB, ← Finset.set_biUnion_coe]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ ↑t\nq' : α\nq'v : q' ∈ ↑v\nhq : (q', r q') ∈ (fun x => (x, r x)) '' ↑v\nhpq : p ≠ (q', r q')\n⊢ closedBall p.fst p.snd ⊆ ⋃ (x : α × ℝ) (_ : x ∈ ↑t), closedBall x.fst x.snd\n[PROOFSTEP]\nexact subset_biUnion_of_mem (u := fun x : α × ℝ => closedBall x.1 x.2) hp\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ ∀ (p : α × ℝ), p ∈ t ∪ Finset.image (fun x => (x, r x)) v → p.fst ∈ s\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\n⊢ p.fst ∈ s\n[PROOFSTEP]\nrcases Finset.mem_union.1 hp with (h'p | h'p)\n[GOAL]\ncase intro.intro.intro.refine'_2.inl\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : p ∈ t\n⊢ p.fst ∈ s\n[PROOFSTEP]\nexact ht.2.1 p h'p\n[GOAL]\ncase intro.intro.intro.refine'_2.inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : p ∈ Finset.image (fun x => (x, r x)) v\n⊢ p.fst ∈ s\n[PROOFSTEP]\nrcases Finset.mem_image.1 h'p with ⟨p', p'v, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_2.inr.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np' : α\np'v : p' ∈ v\nhp : (p', r p') ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : (p', r p') ∈ Finset.image (fun x => (x, r x)) v\n⊢ (p', r p').fst ∈ s\n[PROOFSTEP]\nexact ((mem_diff _).1 (vs' (Finset.mem_coe.2 p'v))).1\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ ∀ (p : α × ℝ), p ∈ t ∪ Finset.image (fun x => (x, r x)) v → p.snd ∈ f p.fst\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\n⊢ p.snd ∈ f p.fst\n[PROOFSTEP]\nrcases Finset.mem_union.1 hp with (h'p | h'p)\n[GOAL]\ncase intro.intro.intro.refine'_3.inl\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : p ∈ t\n⊢ p.snd ∈ f p.fst\n[PROOFSTEP]\nexact ht.2.2 p h'p\n[GOAL]\ncase intro.intro.intro.refine'_3.inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np : α × ℝ\nhp : p ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : p ∈ Finset.image (fun x => (x, r x)) v\n⊢ p.snd ∈ f p.fst\n[PROOFSTEP]\nrcases Finset.mem_image.1 h'p with ⟨p', p'v, rfl⟩\n[GOAL]\ncase intro.intro.intro.refine'_3.inr.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\np' : α\np'v : p' ∈ v\nhp : (p', r p') ∈ t ∪ Finset.image (fun x => (x, r x)) v\nh'p : (p', r p') ∈ Finset.image (fun x => (x, r x)) v\n⊢ (p', r p').snd ∈ f (p', r p').fst\n[PROOFSTEP]\nexact (hr p' (vs' p'v)).1.1\n[GOAL]\ncase intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t ∪ Finset.image (fun x => (x, r x)) v), closedBall p.fst p.snd) ≤\n    ↑N / (↑N + 1) * ↑↑μ s'\n[PROOFSTEP]\nconvert hμv using 2\n[GOAL]\ncase h.e'_3.h.e'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nt : Finset (α × ℝ)\nht : P t\nB : Set α := ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nhB : B = ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd\nB_closed : IsClosed B\ns' : Set α := s \\ B\nr : α → ℝ\nhr : ∀ (x : α), x ∈ s' → r x ∈ f x ∩ Ioo 0 1 ∧ Disjoint B (closedBall x (r x))\nv : Finset α\nvs' : ↑v ⊆ s'\nhμv : ↑↑μ (s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)) ≤ ↑N / (↑N + 1) * ↑↑μ s'\nhv : PairwiseDisjoint ↑v fun x => closedBall x (r x)\n⊢ s \\ ⋃ (p : α × ℝ) (_ : p ∈ t ∪ Finset.image (fun x => (x, r x)) v), closedBall p.fst p.snd =\n    s' \\ ⋃ (x : α) (_ : x ∈ v), closedBall x (r x)\n[PROOFSTEP]\nrw [Finset.set_biUnion_union, ← diff_diff, Finset.set_biUnion_finset_image]\n  /- Define `F` associating to a finite good covering the above enlarged good covering, covering\n      a proportion `1/(N+1)` of leftover points. Iterating `F`, one will get larger and larger good\n      coverings, missing in the end only a measure-zero set. -/\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nthis :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      ∃ u,\n        t ⊆ u ∧\n          P u ∧\n            ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u), closedBall p.fst p.snd) ≤\n              ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nchoose! F hF using this\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nlet u n := F^[n] ∅\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nhave u_succ : ∀ n : ℕ, u n.succ = F (u n) := fun n => by simp only [Function.comp_apply, Function.iterate_succ']\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nn : ℕ\n⊢ u (Nat.succ n) = F (u n)\n[PROOFSTEP]\nsimp only [Function.comp_apply, Function.iterate_succ']\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nhave Pu : ∀ n, P (u n) := by\n  intro n\n  induction' n with n IH\n  · simp only [Prod.forall, id.def, Function.iterate_zero, Nat.zero_eq]\n    simp only [Finset.not_mem_empty, IsEmpty.forall_iff, Finset.coe_empty, forall₂_true_iff, and_self_iff,\n      pairwiseDisjoint_empty]\n  · rw [u_succ]\n    exact (hF (u n) IH).2.1\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\n⊢ ∀ (n : ℕ), P (u n)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nn : ℕ\n⊢ P (u n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\n⊢ P (u Nat.zero)\n[PROOFSTEP]\nsimp only [Prod.forall, id.def, Function.iterate_zero, Nat.zero_eq]\n[GOAL]\ncase zero\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\n⊢ (PairwiseDisjoint ↑∅ fun p => closedBall p.fst p.snd) ∧\n    (∀ (a : α) (b : ℝ), (a, b) ∈ ∅ → a ∈ s) ∧ ∀ (a : α) (b : ℝ), (a, b) ∈ ∅ → b ∈ f a\n[PROOFSTEP]\nsimp only [Finset.not_mem_empty, IsEmpty.forall_iff, Finset.coe_empty, forall₂_true_iff, and_self_iff,\n  pairwiseDisjoint_empty]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nn : ℕ\nIH : P (u n)\n⊢ P (u (Nat.succ n))\n[PROOFSTEP]\nrw [u_succ]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nn : ℕ\nIH : P (u n)\n⊢ P (F (u n))\n[PROOFSTEP]\nexact (hF (u n) IH).2.1\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nrefine' ⟨⋃ n, u n, countable_iUnion fun n => (u n).countable_toSet, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ ∀ (p : α × ℝ), p ∈ ⋃ (n : ℕ), ↑(u n) → p.fst ∈ s\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\np : α × ℝ\nhp : p ∈ ⋃ (n : ℕ), ↑(u n)\n⊢ p.fst ∈ s\n[PROOFSTEP]\nrcases mem_iUnion.1 hp with ⟨n, hn⟩\n[GOAL]\ncase intro.intro.intro.refine'_1.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\np : α × ℝ\nhp : p ∈ ⋃ (n : ℕ), ↑(u n)\nn : ℕ\nhn : p ∈ ↑(u n)\n⊢ p.fst ∈ s\n[PROOFSTEP]\nexact (Pu n).2.1 p (Finset.mem_coe.1 hn)\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ ∀ (p : α × ℝ), p ∈ ⋃ (n : ℕ), ↑(u n) → p.snd ∈ f p.fst\n[PROOFSTEP]\nintro p hp\n[GOAL]\ncase intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\np : α × ℝ\nhp : p ∈ ⋃ (n : ℕ), ↑(u n)\n⊢ p.snd ∈ f p.fst\n[PROOFSTEP]\nrcases mem_iUnion.1 hp with ⟨n, hn⟩\n[GOAL]\ncase intro.intro.intro.refine'_2.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\np : α × ℝ\nhp : p ∈ ⋃ (n : ℕ), ↑(u n)\nn : ℕ\nhn : p ∈ ↑(u n)\n⊢ p.snd ∈ f p.fst\n[PROOFSTEP]\nexact (Pu n).2.2 p (Finset.mem_coe.1 hn)\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\nhave A :\n  ∀ n,\n    μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ n : ℕ, (u n : Set (α × ℝ))), closedBall p.fst p.snd) ≤\n      μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) :=\n  by\n  intro n\n  apply measure_mono\n  apply diff_subset_diff (Subset.refl _)\n  exact biUnion_subset_biUnion_left (subset_iUnion (fun i => (u i : Set (α × ℝ))) n)\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nn : ℕ\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nn : ℕ\n⊢ s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd ⊆\n    s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd\n[PROOFSTEP]\napply diff_subset_diff (Subset.refl _)\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nn : ℕ\n⊢ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd ⊆\n    ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd\n[PROOFSTEP]\nexact biUnion_subset_biUnion_left (subset_iUnion (fun i => (u i : Set (α × ℝ))) n)\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\nhave B : ∀ n, μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (N / (N + 1) : ℝ≥0∞) ^ n * μ s :=\n  by\n  intro n\n  induction' n with n IH\n  ·\n    simp only [le_refl, diff_empty, one_mul, iUnion_false, iUnion_empty, pow_zero, Nat.zero_eq, Function.iterate_zero,\n      id.def, Finset.not_mem_empty]\n  calc\n    μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n.succ), closedBall p.fst p.snd) ≤\n        N / (N + 1) * μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) :=\n      by rw [u_succ]; exact (hF (u n) (Pu n)).2.2\n    _ ≤ (N / (N + 1) : ℝ≥0∞) ^ n.succ * μ s := by rw [pow_succ, mul_assoc]; exact mul_le_mul_left' IH _\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n⊢ ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n[PROOFSTEP]\nintro n\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u Nat.zero), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ Nat.zero * ↑↑μ s\n[PROOFSTEP]\nsimp only [le_refl, diff_empty, one_mul, iUnion_false, iUnion_empty, pow_zero, Nat.zero_eq, Function.iterate_zero,\n  id.def, Finset.not_mem_empty]\n[GOAL]\ncase succ\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\nIH : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u (Nat.succ n)), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ Nat.succ n * ↑↑μ s\n[PROOFSTEP]\ncalc\n  μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n.succ), closedBall p.fst p.snd) ≤\n      N / (N + 1) * μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) :=\n    by rw [u_succ]; exact (hF (u n) (Pu n)).2.2\n  _ ≤ (N / (N + 1) : ℝ≥0∞) ^ n.succ * μ s := by rw [pow_succ, mul_assoc]; exact mul_le_mul_left' IH _\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\nIH : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u (Nat.succ n)), closedBall p.fst p.snd) ≤\n    ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n[PROOFSTEP]\nrw [u_succ]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\nIH : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F (u n)), closedBall p.fst p.snd) ≤\n    ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\n[PROOFSTEP]\nexact (hF (u n) (Pu n)).2.2\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\nIH : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ Nat.succ n * ↑↑μ s\n[PROOFSTEP]\nrw [pow_succ, mul_assoc]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nn : ℕ\nIH : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤\n    ↑N / (↑N + 1) * ((↑N / (↑N + 1)) ^ n * ↑↑μ s)\n[PROOFSTEP]\nexact mul_le_mul_left' IH _\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\nhave C : Tendsto (fun n : ℕ => ((N : ℝ≥0∞) / (N + 1)) ^ n * μ s) atTop (𝓝 (0 * μ s)) :=\n  by\n  apply ENNReal.Tendsto.mul_const _ (Or.inr (measure_lt_top μ s).ne)\n  apply ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1\n  rw [ENNReal.div_lt_iff, one_mul]\n  · conv_lhs => rw [← add_zero (N : ℝ≥0∞)]\n    exact ENNReal.add_lt_add_left (ENNReal.nat_ne_top N) zero_lt_one\n  · simp only [true_or_iff, add_eq_zero_iff, Ne.def, not_false_iff, one_ne_zero, and_false_iff]\n  · simp only [ENNReal.nat_ne_top, Ne.def, not_false_iff, or_true_iff]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ Tendsto (fun n => (↑N / (↑N + 1)) ^ n * ↑↑μ s) atTop (𝓝 (0 * ↑↑μ s))\n[PROOFSTEP]\napply ENNReal.Tendsto.mul_const _ (Or.inr (measure_lt_top μ s).ne)\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ Tendsto (fun x => (↑N / (↑N + 1)) ^ x) atTop (𝓝 0)\n[PROOFSTEP]\napply ENNReal.tendsto_pow_atTop_nhds_0_of_lt_1\n[GOAL]\ncase hr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N / (↑N + 1) < 1\n[PROOFSTEP]\nrw [ENNReal.div_lt_iff, one_mul]\n[GOAL]\ncase hr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N < ↑N + 1\n[PROOFSTEP]\nconv_lhs => rw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n| ↑N\n[PROOFSTEP]\nrw [← add_zero (N : ℝ≥0∞)]\n[GOAL]\ncase hr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N + 0 < ↑N + 1\n[PROOFSTEP]\nexact ENNReal.add_lt_add_left (ENNReal.nat_ne_top N) zero_lt_one\n[GOAL]\ncase hr.h0\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N + 1 ≠ 0 ∨ ↑N ≠ 0\n[PROOFSTEP]\nsimp only [true_or_iff, add_eq_zero_iff, Ne.def, not_false_iff, one_ne_zero, and_false_iff]\n[GOAL]\ncase hr.ht\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\n⊢ ↑N + 1 ≠ ⊤ ∨ ↑N ≠ ⊤\n[PROOFSTEP]\nsimp only [ENNReal.nat_ne_top, Ne.def, not_false_iff, or_true_iff]\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\nC : Tendsto (fun n => (↑N / (↑N + 1)) ^ n * ↑↑μ s) atTop (𝓝 (0 * ↑↑μ s))\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\nrw [zero_mul] at C \n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\nC : Tendsto (fun n => (↑N / (↑N + 1)) ^ n * ↑↑μ s) atTop (𝓝 0)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\napply le_bot_iff.1\n[GOAL]\ncase intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nA :\n  ∀ (n : ℕ),\n    ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤\n      ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd)\nB : ∀ (n : ℕ), ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ u n), closedBall p.fst p.snd) ≤ (↑N / (↑N + 1)) ^ n * ↑↑μ s\nC : Tendsto (fun n => (↑N / (↑N + 1)) ^ n * ↑↑μ s) atTop (𝓝 0)\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ ⋃ (n : ℕ), ↑(u n)), closedBall p.fst p.snd) ≤ ⊥\n[PROOFSTEP]\nexact le_of_tendsto_of_tendsto' tendsto_const_nhds C fun n => (A n).trans (B n)\n[GOAL]\ncase intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ PairwiseDisjoint (⋃ (n : ℕ), ↑(u n)) fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nrefine' (pairwiseDisjoint_iUnion _).2 fun n => (Pu n).1\n[GOAL]\ncase intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\n⊢ Directed (fun x x_1 => x ⊆ x_1) fun n => ↑(u n)\n[PROOFSTEP]\napply (monotone_nat_of_le_succ fun n => ?_).directed_le\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nn : ℕ\n⊢ ↑(u n) ≤ ↑(u (n + 1))\n[PROOFSTEP]\nrw [← Nat.succ_eq_add_one, u_succ]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : IsFiniteMeasure μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nhN : IsEmpty (SatelliteConfig α N τ)\nP : Finset (α × ℝ) → Prop :=\n  fun t =>\n    (PairwiseDisjoint ↑t fun p => closedBall p.fst p.snd) ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧ ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\nF : Finset (α × ℝ) → Finset (α × ℝ)\nhF :\n  ∀ (t : Finset (α × ℝ)),\n    P t →\n      t ⊆ F t ∧\n        P (F t) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ F t), closedBall p.fst p.snd) ≤\n            ↑N / (↑N + 1) * ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd)\nu : ℕ → Finset (α × ℝ) := fun n => F^[n] ∅\nu_succ : ∀ (n : ℕ), u (Nat.succ n) = F (u n)\nPu : ∀ (n : ℕ), P (u n)\nn : ℕ\n⊢ ↑(u n) ≤ ↑(F (u n))\n[PROOFSTEP]\nexact (hF (u n) (Pu n)).1\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nrcases exists_absolutelyContinuous_isFiniteMeasure μ with ⟨ν, hν, hμν⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nν : Measure α\nhν : IsFiniteMeasure ν\nhμν : μ ≪ ν\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nrcases exists_disjoint_closedBall_covering_ae_of_finiteMeasure_aux ν f s hf with ⟨t, t_count, ts, tr, tν, tdisj⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nν : Measure α\nhν : IsFiniteMeasure ν\nhμν : μ ≪ ν\nt : Set (α × ℝ)\nt_count : Set.Countable t\nts : ∀ (p : α × ℝ), p ∈ t → p.fst ∈ s\ntr : ∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst\ntν : ↑↑ν (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0\ntdisj : PairwiseDisjoint t fun p => closedBall p.fst p.snd\n⊢ ∃ t,\n    Set.Countable t ∧\n      (∀ (p : α × ℝ), p ∈ t → p.fst ∈ s) ∧\n        (∀ (p : α × ℝ), p ∈ t → p.snd ∈ f p.fst) ∧\n          ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ t), closedBall p.fst p.snd) = 0 ∧\n            PairwiseDisjoint t fun p => closedBall p.fst p.snd\n[PROOFSTEP]\nexact ⟨t, t_count, ts, tr, hμν tν, tdisj⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nlet g x := f x ∩ Ioo 0 (R x)\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave hg : ∀ x ∈ s, ∀ δ > 0, (g x ∩ Ioo 0 δ).Nonempty :=\n  by\n  intro x hx δ δpos\n  rcases hf x hx (min δ (R x)) (lt_min δpos (hR x hx)) with ⟨r, hr⟩\n  exact ⟨r, ⟨⟨hr.1, hr.2.1, hr.2.2.trans_le (min_le_right _ _)⟩, ⟨hr.2.1, hr.2.2.trans_le (min_le_left _ _)⟩⟩⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\n⊢ ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nintro x hx δ δpos\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nx : α\nhx : x ∈ s\nδ : ℝ\nδpos : δ > 0\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nrcases hf x hx (min δ (R x)) (lt_min δpos (hR x hx)) with ⟨r, hr⟩\n[GOAL]\ncase intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nx : α\nhx : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nhr : r ∈ f x ∩ Ioo 0 (min δ (R x))\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nexact ⟨r, ⟨⟨hr.1, hr.2.1, hr.2.2.trans_le (min_le_right _ _)⟩, ⟨hr.2.1, hr.2.2.trans_le (min_le_left _ _)⟩⟩⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nrcases exists_disjoint_closedBall_covering_ae_aux μ g s hg with ⟨v, v_count, vs, vg, μv, v_disj⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nlet t := Prod.fst '' v\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave : ∀ x ∈ t, ∃ r : ℝ, (x, r) ∈ v := by\n  intro x hx\n  rcases(mem_image _ _ _).1 hx with ⟨⟨p, q⟩, hp, rfl⟩\n  exact ⟨q, hp⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\n⊢ ∀ (x : α), x ∈ t → ∃ r, (x, r) ∈ v\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nx : α\nhx : x ∈ t\n⊢ ∃ r, (x, r) ∈ v\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hx with ⟨⟨p, q⟩, hp, rfl⟩\n[GOAL]\ncase intro.mk.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\np : α\nq : ℝ\nhp : (p, q) ∈ v\nhx : (p, q).fst ∈ t\n⊢ ∃ r, ((p, q).fst, r) ∈ v\n[PROOFSTEP]\nexact ⟨q, hp⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nthis : ∀ (x : α), x ∈ t → ∃ r, (x, r) ∈ v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nchoose! r hr using this\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave im_t : (fun x => (x, r x)) '' t = v :=\n  by\n  have I : ∀ p : α × ℝ, p ∈ v → 0 ≤ p.2 := fun p hp => (vg p hp).2.1.le\n  apply Subset.antisymm\n  · simp only [image_subset_iff]\n    rintro ⟨x, p⟩ hxp\n    simp only [mem_preimage]\n    exact hr _ (mem_image_of_mem _ hxp)\n  · rintro ⟨x, p⟩ hxp\n    have hxrx : (x, r x) ∈ v := hr _ (mem_image_of_mem _ hxp)\n    have : p = r x := by\n      by_contra h\n      have A : (x, p) ≠ (x, r x) := by simpa only [true_and_iff, Prod.mk.inj_iff, eq_self_iff_true, Ne.def] using h\n      have H := v_disj hxp hxrx A\n      contrapose H\n      rw [not_disjoint_iff_nonempty_inter]\n      refine' ⟨x, by simp (config := { proj := false }) [I _ hxp, I _ hxrx]⟩\n    rw [this]\n    apply mem_image_of_mem\n    exact mem_image_of_mem _ hxp\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\n⊢ (fun x => (x, r x)) '' t = v\n[PROOFSTEP]\nhave I : ∀ p : α × ℝ, p ∈ v → 0 ≤ p.2 := fun p hp => (vg p hp).2.1.le\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\n⊢ (fun x => (x, r x)) '' t = v\n[PROOFSTEP]\napply Subset.antisymm\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\n⊢ (fun x => (x, r x)) '' t ⊆ v\n[PROOFSTEP]\nsimp only [image_subset_iff]\n[GOAL]\ncase h₁\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\n⊢ v ⊆ Prod.fst ⁻¹' ((fun x => (x, r x)) ⁻¹' v)\n[PROOFSTEP]\nrintro ⟨x, p⟩ hxp\n[GOAL]\ncase h₁.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\n⊢ (x, p) ∈ Prod.fst ⁻¹' ((fun x => (x, r x)) ⁻¹' v)\n[PROOFSTEP]\nsimp only [mem_preimage]\n[GOAL]\ncase h₁.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\n⊢ (x, r x) ∈ v\n[PROOFSTEP]\nexact hr _ (mem_image_of_mem _ hxp)\n[GOAL]\ncase h₂\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\n⊢ v ⊆ (fun x => (x, r x)) '' t\n[PROOFSTEP]\nrintro ⟨x, p⟩ hxp\n[GOAL]\ncase h₂.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\n⊢ (x, p) ∈ (fun x => (x, r x)) '' t\n[PROOFSTEP]\nhave hxrx : (x, r x) ∈ v := hr _ (mem_image_of_mem _ hxp)\n[GOAL]\ncase h₂.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\n⊢ (x, p) ∈ (fun x => (x, r x)) '' t\n[PROOFSTEP]\nhave : p = r x := by\n  by_contra h\n  have A : (x, p) ≠ (x, r x) := by simpa only [true_and_iff, Prod.mk.inj_iff, eq_self_iff_true, Ne.def] using h\n  have H := v_disj hxp hxrx A\n  contrapose H\n  rw [not_disjoint_iff_nonempty_inter]\n  refine' ⟨x, by simp (config := { proj := false }) [I _ hxp, I _ hxrx]⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\n⊢ p = r x\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\n⊢ False\n[PROOFSTEP]\nhave A : (x, p) ≠ (x, r x) := by simpa only [true_and_iff, Prod.mk.inj_iff, eq_self_iff_true, Ne.def] using h\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\n⊢ (x, p) ≠ (x, r x)\n[PROOFSTEP]\nsimpa only [true_and_iff, Prod.mk.inj_iff, eq_self_iff_true, Ne.def] using h\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\nA : (x, p) ≠ (x, r x)\n⊢ False\n[PROOFSTEP]\nhave H := v_disj hxp hxrx A\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\nA : (x, p) ≠ (x, r x)\nH : (Disjoint on fun p => closedBall p.fst p.snd) (x, p) (x, r x)\n⊢ False\n[PROOFSTEP]\ncontrapose H\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\nA : (x, p) ≠ (x, r x)\nH : ¬False\n⊢ ¬(Disjoint on fun p => closedBall p.fst p.snd) (x, p) (x, r x)\n[PROOFSTEP]\nrw [not_disjoint_iff_nonempty_inter]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\nA : (x, p) ≠ (x, r x)\nH : ¬False\n⊢ Set.Nonempty ((fun p => closedBall p.fst p.snd) (x, p) ∩ (fun p => closedBall p.fst p.snd) (x, r x))\n[PROOFSTEP]\nrefine' ⟨x, by simp (config := { proj := false }) [I _ hxp, I _ hxrx]⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nh : ¬p = r x\nA : (x, p) ≠ (x, r x)\nH : ¬False\n⊢ x ∈ (fun p => closedBall p.fst p.snd) (x, p) ∩ (fun p => closedBall p.fst p.snd) (x, r x)\n[PROOFSTEP]\nsimp (config := { proj := false }) [I _ hxp, I _ hxrx]\n[GOAL]\ncase h₂.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nthis : p = r x\n⊢ (x, p) ∈ (fun x => (x, r x)) '' t\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h₂.mk\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nthis : p = r x\n⊢ (x, r x) ∈ (fun x => (x, r x)) '' t\n[PROOFSTEP]\napply mem_image_of_mem\n[GOAL]\ncase h₂.mk.h\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nI : ∀ (p : α × ℝ), p ∈ v → 0 ≤ p.snd\nx : α\np : ℝ\nhxp : (x, p) ∈ v\nhxrx : (x, r x) ∈ v\nthis : p = r x\n⊢ x ∈ t\n[PROOFSTEP]\nexact mem_image_of_mem _ hxp\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)) ∧\n          ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0 ∧ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nrefine' ⟨t, r, v_count.image _, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ t ⊆ s\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\nx : α\nhx : x ∈ t\n⊢ x ∈ s\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hx with ⟨⟨p, q⟩, hp, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1.intro.mk.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\np : α\nq : ℝ\nhp : (p, q) ∈ v\nhx : (p, q).fst ∈ t\n⊢ (p, q).fst ∈ s\n[PROOFSTEP]\nexact vs _ hp\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ ∀ (x : α), x ∈ t → r x ∈ f x ∩ Ioo 0 (R x)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\nx : α\nhx : x ∈ t\n⊢ r x ∈ f x ∩ Ioo 0 (R x)\n[PROOFSTEP]\nrcases(mem_image _ _ _).1 hx with ⟨⟨p, q⟩, _, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2.intro.mk.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\np : α\nq : ℝ\nleft✝ : (p, q) ∈ v\nhx : (p, q).fst ∈ t\n⊢ r (p, q).fst ∈ f (p, q).fst ∩ Ioo 0 (R (p, q).fst)\n[PROOFSTEP]\nexact vg _ (hr _ hx)\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\n[PROOFSTEP]\nhave :\n  ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) = ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.1 p.2 := by\n  conv_rhs => rw [biUnion_image]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) = ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n[PROOFSTEP]\nconv_rhs => rw [biUnion_image]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n| ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n[PROOFSTEP]\nrw [biUnion_image]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n| ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n[PROOFSTEP]\nrw [biUnion_image]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n| ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n[PROOFSTEP]\nrw [biUnion_image]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\nthis :\n  ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) = ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n⊢ ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\n[PROOFSTEP]\nrw [this, im_t]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\nthis :\n  ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) = ⋃ (p : α × ℝ) (_ : p ∈ (fun x => (x, r x)) '' t), closedBall p.fst p.snd\n⊢ ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\n[PROOFSTEP]\nexact μv\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nhave A : InjOn (fun x : α => (x, r x)) t := by\n  simp (config := { contextual := true }) only [InjOn, Prod.mk.inj_iff, imp_true_iff, eq_self_iff_true]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\n⊢ InjOn (fun x => (x, r x)) t\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [InjOn, Prod.mk.inj_iff, imp_true_iff, eq_self_iff_true]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → 0 < R x\ng : α → Set ℝ := fun x => f x ∩ Ioo 0 (R x)\nhg : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nv : Set (α × ℝ)\nv_count : Set.Countable v\nvs : ∀ (p : α × ℝ), p ∈ v → p.fst ∈ s\nvg : ∀ (p : α × ℝ), p ∈ v → p.snd ∈ g p.fst\nμv : ↑↑μ (s \\ ⋃ (p : α × ℝ) (_ : p ∈ v), closedBall p.fst p.snd) = 0\nv_disj : PairwiseDisjoint v fun p => closedBall p.fst p.snd\nt : Set α := Prod.fst '' v\nr : α → ℝ\nhr : ∀ (x : α), x ∈ t → (x, r x) ∈ v\nim_t : (fun x => (x, r x)) '' t = v\nA : InjOn (fun x => (x, r x)) t\n⊢ PairwiseDisjoint t fun x => closedBall x (r x)\n[PROOFSTEP]\nrwa [← im_t, A.pairwiseDisjoint_image] at v_disj \n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nobtain ⟨u, su, u_open, μu⟩ : ∃ U, U ⊇ s ∧ IsOpen U ∧ μ U ≤ μ s + ε / 2 :=\n  Set.exists_isOpen_le_add _ _\n    (by simpa only [or_false_iff, Ne.def, ENNReal.div_eq_zero_iff, ENNReal.one_ne_top] using hε)\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\n⊢ ε / 2 ≠ 0\n[PROOFSTEP]\nsimpa only [or_false_iff, Ne.def, ENNReal.div_eq_zero_iff, ENNReal.one_ne_top] using hε\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave : ∀ x ∈ s, ∃ R > 0, ball x R ⊆ u := fun x hx => Metric.mem_nhds_iff.1 (u_open.mem_nhds (su hx))\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nthis : ∀ (x : α), x ∈ s → ∃ R, R > 0 ∧ ball x R ⊆ u\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nchoose! R hR using this\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nobtain ⟨t0, r0, t0_count, t0s, hr0, μt0, t0_disj⟩ :\n  ∃ (t0 : Set α) (r0 : α → ℝ),\n    t0.Countable ∧\n      t0 ⊆ s ∧\n        (∀ x ∈ t0, r0 x ∈ f x ∩ Ioo 0 (R x)) ∧\n          μ (s \\ ⋃ x ∈ t0, closedBall x (r0 x)) = 0 ∧ t0.PairwiseDisjoint fun x => closedBall x (r0 x) :=\n  exists_disjoint_closedBall_covering_ae μ f s hf R fun x hx =>\n    (hR x hx).1\n      -- we have constructed an almost everywhere covering of `s` by disjoint balls. Let `s'` be the\n        -- remaining set.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nlet s' := s \\ ⋃ x ∈ t0, closedBall x (r0 x)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave s's : s' ⊆ s := diff_subset _ _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nobtain ⟨N, τ, hτ, H⟩ : ∃ N τ, 1 < τ ∧ IsEmpty (Besicovitch.SatelliteConfig α N τ) :=\n  HasBesicovitchCovering.no_satelliteConfig\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nobtain ⟨v, s'v, v_open, μv⟩ : ∃ v, v ⊇ s' ∧ IsOpen v ∧ μ v ≤ μ s' + ε / 2 / N :=\n  Set.exists_isOpen_le_add _ _\n    (by\n      simp only [hε, ENNReal.nat_ne_top, WithTop.mul_eq_top_iff, Ne.def, ENNReal.div_eq_zero_iff, ENNReal.one_ne_top,\n        not_false_iff, and_false_iff, false_and_iff, or_self_iff])\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\n⊢ ε / 2 / ↑N ≠ 0\n[PROOFSTEP]\nsimp only [hε, ENNReal.nat_ne_top, WithTop.mul_eq_top_iff, Ne.def, ENNReal.div_eq_zero_iff, ENNReal.one_ne_top,\n  not_false_iff, and_false_iff, false_and_iff, or_self_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave : ∀ x ∈ s', ∃ r1 ∈ f x ∩ Ioo (0 : ℝ) 1, closedBall x r1 ⊆ v :=\n  by\n  intro x hx\n  rcases Metric.mem_nhds_iff.1 (v_open.mem_nhds (s'v hx)) with ⟨r, rpos, hr⟩\n  rcases hf x (s's hx) (min r 1) (lt_min rpos zero_lt_one) with ⟨R', hR'⟩\n  exact\n    ⟨R', ⟨hR'.1, hR'.2.1, hR'.2.2.trans_le (min_le_right _ _)⟩,\n      Subset.trans (closedBall_subset_ball (hR'.2.2.trans_le (min_le_left _ _))) hr⟩\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\n⊢ ∀ (x : α), x ∈ s' → ∃ r1, r1 ∈ f x ∩ Ioo 0 1 ∧ closedBall x r1 ⊆ v\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nx : α\nhx : x ∈ s'\n⊢ ∃ r1, r1 ∈ f x ∩ Ioo 0 1 ∧ closedBall x r1 ⊆ v\n[PROOFSTEP]\nrcases Metric.mem_nhds_iff.1 (v_open.mem_nhds (s'v hx)) with ⟨r, rpos, hr⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nx : α\nhx : x ∈ s'\nr : ℝ\nrpos : r > 0\nhr : ball x r ⊆ v\n⊢ ∃ r1, r1 ∈ f x ∩ Ioo 0 1 ∧ closedBall x r1 ⊆ v\n[PROOFSTEP]\nrcases hf x (s's hx) (min r 1) (lt_min rpos zero_lt_one) with ⟨R', hR'⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nx : α\nhx : x ∈ s'\nr : ℝ\nrpos : r > 0\nhr : ball x r ⊆ v\nR' : ℝ\nhR' : R' ∈ f x ∩ Ioo 0 (min r 1)\n⊢ ∃ r1, r1 ∈ f x ∩ Ioo 0 1 ∧ closedBall x r1 ⊆ v\n[PROOFSTEP]\nexact\n  ⟨R', ⟨hR'.1, hR'.2.1, hR'.2.2.trans_le (min_le_right _ _)⟩,\n    Subset.trans (closedBall_subset_ball (hR'.2.2.trans_le (min_le_left _ _))) hr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nthis : ∀ (x : α), x ∈ s' → ∃ r1, r1 ∈ f x ∩ Ioo 0 1 ∧ closedBall x r1 ⊆ v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nchoose! r1 hr1 using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nlet q : BallPackage s' α :=\n  { c := fun x => x\n    r := fun x => r1 x\n    rpos := fun x => (hr1 x.1 x.2).1.2.1\n    r_bound := 1\n    r_le := fun x => (hr1 x.1 x.2).1.2.2.le }\n    -- by Besicovitch, we cover `s'` with at most `N` families of disjoint balls, all included in\n      -- a suitable neighborhood `v` of `s'`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nobtain ⟨S, S_disj, hS⟩ :\n  ∃ S : Fin N → Set s',\n    (∀ i : Fin N, (S i).PairwiseDisjoint fun j => closedBall (q.c j) (q.r j)) ∧\n      range q.c ⊆ ⋃ i : Fin N, ⋃ j ∈ S i, ball (q.c j) (q.r j) :=\n  exist_disjoint_covering_families hτ H q\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave S_count : ∀ i, (S i).Countable := by\n  intro i\n  apply (S_disj i).countable_of_nonempty_interior fun j _ => ?_\n  have : (ball (j : α) (r1 j)).Nonempty := nonempty_ball.2 (q.rpos _)\n  exact this.mono ball_subset_interior_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\n⊢ ∀ (i : Fin N), Set.Countable (S i)\n[PROOFSTEP]\nintro i\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\ni : Fin N\n⊢ Set.Countable (S i)\n[PROOFSTEP]\napply (S_disj i).countable_of_nonempty_interior fun j _ => ?_\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\ni : Fin N\nj : ↑s'\nx✝ : j ∈ S i\n⊢ Set.Nonempty (interior (closedBall (BallPackage.c q j) (BallPackage.r q j)))\n[PROOFSTEP]\nhave : (ball (j : α) (r1 j)).Nonempty := nonempty_ball.2 (q.rpos _)\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\ni : Fin N\nj : ↑s'\nx✝ : j ∈ S i\nthis : Set.Nonempty (ball (↑j) (r1 ↑j))\n⊢ Set.Nonempty (interior (closedBall (BallPackage.c q j) (BallPackage.r q j)))\n[PROOFSTEP]\nexact this.mono ball_subset_interior_closedBall\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nlet r x := if x ∈ s' then r1 x else r0 x\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave r_t0 : ∀ x ∈ t0, r x = r0 x := by\n  intro x hx\n  have : ¬x ∈ s' :=\n    by\n    simp only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_lt, not_le, mem_diff, not_forall]\n    intro _\n    refine' ⟨x, hx, _⟩\n    rw [dist_self]\n    exact (hr0 x hx).2.1.le\n  simp only [if_neg this]\n    -- the desired covering set is given by the union of the families constructed in the first and\n      -- second steps.\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\n⊢ ∀ (x : α), x ∈ t0 → r x = r0 x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\n⊢ r x = r0 x\n[PROOFSTEP]\nhave : ¬x ∈ s' :=\n  by\n  simp only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_lt, not_le, mem_diff, not_forall]\n  intro _\n  refine' ⟨x, hx, _⟩\n  rw [dist_self]\n  exact (hr0 x hx).2.1.le\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\n⊢ ¬x ∈ s'\n[PROOFSTEP]\nsimp only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_lt, not_le, mem_diff, not_forall]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\n⊢ x ∈ s → ∃ x_1, x_1 ∈ t0 ∧ dist x x_1 ≤ r0 x_1\n[PROOFSTEP]\nintro _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\na✝ : x ∈ s\n⊢ ∃ x_1, x_1 ∈ t0 ∧ dist x x_1 ≤ r0 x_1\n[PROOFSTEP]\nrefine' ⟨x, hx, _⟩\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\na✝ : x ∈ s\n⊢ dist x x ≤ r0 x\n[PROOFSTEP]\nrw [dist_self]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\na✝ : x ∈ s\n⊢ 0 ≤ r0 x\n[PROOFSTEP]\nexact (hr0 x hx).2.1.le\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nx : α\nhx : x ∈ t0\nthis : ¬x ∈ s'\n⊢ r x = r0 x\n[PROOFSTEP]\nsimp only [if_neg this]\n  -- the desired covering set is given by the union of the families constructed in the first and\n    -- second steps.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∃ t r,\n    Set.Countable t ∧\n      t ⊆ s ∧\n        (∀ (x : α), x ∈ t → r x ∈ f x) ∧\n          s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x) ∧ ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nrefine'\n  ⟨t0 ∪ ⋃ i : Fin N, ((↑) : s' → α) '' S i, r, _, _, _, _, _⟩\n    -- it remains to check that they have the desired properties\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ Set.Countable (t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i)\n[PROOFSTEP]\nexact t0_count.union (countable_iUnion fun i => (S_count i).image _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i ⊆ s\n[PROOFSTEP]\nsimp only [t0s, true_and_iff, union_subset_iff, image_subset_iff, iUnion_subset_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∀ (i : Fin N), S i ⊆ (fun a => ↑a) ⁻¹' s\n[PROOFSTEP]\nintro i x _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\ni : Fin N\nx : { x // x ∈ s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x) }\na✝ : x ∈ S i\n⊢ x ∈ (fun a => ↑a) ⁻¹' s\n[PROOFSTEP]\nexact s's x.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∀ (x : α), x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i → r x ∈ f x\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i\n⊢ r x ∈ f x\n[PROOFSTEP]\ncases hx with\n| inl hx =>\n  rw [r_t0 x hx]\n  exact (hr0 _ hx).1\n|\n  inr hx =>\n  have h'x : x ∈ s' := by\n    simp only [mem_iUnion, mem_image] at hx \n    rcases hx with ⟨i, y, _, rfl⟩\n    exact y.2\n  simp only [if_pos h'x, (hr1 x h'x).1.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i\n⊢ r x ∈ f x\n[PROOFSTEP]\ncases hx with\n| inl hx =>\n  rw [r_t0 x hx]\n  exact (hr0 _ hx).1\n|\n  inr hx =>\n  have h'x : x ∈ s' := by\n    simp only [mem_iUnion, mem_image] at hx \n    rcases hx with ⟨i, y, _, rfl⟩\n    exact y.2\n  simp only [if_pos h'x, (hr1 x h'x).1.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inl\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0\n⊢ r x ∈ f x\n[PROOFSTEP]\n\n| inl hx =>\n  rw [r_t0 x hx]\n  exact (hr0 _ hx).1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inl\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0\n⊢ r x ∈ f x\n[PROOFSTEP]\nrw [r_t0 x hx]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inl\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0\n⊢ r0 x ∈ f x\n[PROOFSTEP]\nexact (hr0 _ hx).1\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inr\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ ⋃ (i : Fin N), Subtype.val '' S i\n⊢ r x ∈ f x\n[PROOFSTEP]\n\n|\n  inr hx =>\n  have h'x : x ∈ s' := by\n    simp only [mem_iUnion, mem_image] at hx \n    rcases hx with ⟨i, y, _, rfl⟩\n    exact y.2\n  simp only [if_pos h'x, (hr1 x h'x).1.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inr\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ ⋃ (i : Fin N), Subtype.val '' S i\n⊢ r x ∈ f x\n[PROOFSTEP]\nhave h'x : x ∈ s' := by\n  simp only [mem_iUnion, mem_image] at hx \n  rcases hx with ⟨i, y, _, rfl⟩\n  exact y.2\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ ⋃ (i : Fin N), Subtype.val '' S i\n⊢ x ∈ s'\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_image] at hx \n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : ∃ i x_1, x_1 ∈ S i ∧ ↑x_1 = x\n⊢ x ∈ s'\n[PROOFSTEP]\nrcases hx with ⟨i, y, _, rfl⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\ni : Fin N\ny : { x // x ∈ s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x) }\nleft✝ : y ∈ S i\n⊢ ↑y ∈ s'\n[PROOFSTEP]\nexact y.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_3.inr\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ ⋃ (i : Fin N), Subtype.val '' S i\nh'x : x ∈ s'\n⊢ r x ∈ f x\n[PROOFSTEP]\nsimp only [if_pos h'x, (hr1 x h'x).1.1]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ s ⊆ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\n⊢ x ∈ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nby_cases h'x : x ∈ s'\n[GOAL]\ncase pos\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\n⊢ x ∈ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nobtain ⟨i, y, ySi, xy⟩ : ∃ (i : Fin N) (y : ↥s'), y ∈ S i ∧ x ∈ ball (y : α) (r1 y) :=\n  by\n  have A : x ∈ range q.c := by\n    simpa only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, mem_setOf_eq,\n      Subtype.range_coe_subtype, mem_diff] using h'x\n  simpa only [mem_iUnion, mem_image, bex_def] using hS A\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\n⊢ ∃ i y, y ∈ S i ∧ x ∈ ball (↑y) (r1 ↑y)\n[PROOFSTEP]\nhave A : x ∈ range q.c := by\n  simpa only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, mem_setOf_eq,\n    Subtype.range_coe_subtype, mem_diff] using h'x\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\n⊢ x ∈ range q.c\n[PROOFSTEP]\nsimpa only [not_exists, exists_prop, mem_iUnion, mem_closedBall, not_and, not_le, mem_setOf_eq,\n  Subtype.range_coe_subtype, mem_diff] using h'x\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\nA : x ∈ range q.c\n⊢ ∃ i y, y ∈ S i ∧ x ∈ ball (↑y) (r1 ↑y)\n[PROOFSTEP]\nsimpa only [mem_iUnion, mem_image, bex_def] using hS A\n[GOAL]\ncase pos.intro.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\n⊢ x ∈ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nrefine' mem_iUnion₂.2 ⟨y, Or.inr _, _⟩\n[GOAL]\ncase pos.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\n⊢ ↑y ∈ ⋃ (i : Fin N), Subtype.val '' S i\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_image]\n[GOAL]\ncase pos.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\n⊢ ∃ i x, x ∈ S i ∧ ↑x = ↑y\n[PROOFSTEP]\nexact ⟨i, y, ySi, rfl⟩\n[GOAL]\ncase pos.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\n⊢ x ∈ closedBall (↑y) (r ↑y)\n[PROOFSTEP]\nhave : (y : α) ∈ s' := y.2\n[GOAL]\ncase pos.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\nthis : ↑y ∈ s'\n⊢ x ∈ closedBall (↑y) (r ↑y)\n[PROOFSTEP]\nsimp only [if_pos this]\n[GOAL]\ncase pos.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : x ∈ s'\ni : Fin N\ny : ↑s'\nySi : y ∈ S i\nxy : x ∈ ball (↑y) (r1 ↑y)\nthis : ↑y ∈ s'\n⊢ x ∈ closedBall (↑y) (r1 ↑y)\n[PROOFSTEP]\nexact ball_subset_closedBall xy\n[GOAL]\ncase neg\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : ¬x ∈ s'\n⊢ x ∈ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nobtain ⟨y, yt0, hxy⟩ : ∃ y : α, y ∈ t0 ∧ x ∈ closedBall y (r0 y) := by simpa [hx, -mem_closedBall] using h'x\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : ¬x ∈ s'\n⊢ ∃ y, y ∈ t0 ∧ x ∈ closedBall y (r0 y)\n[PROOFSTEP]\nsimpa [hx, -mem_closedBall] using h'x\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : ¬x ∈ s'\ny : α\nyt0 : y ∈ t0\nhxy : x ∈ closedBall y (r0 y)\n⊢ x ∈ ⋃ (x : α) (_ : x ∈ t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i), closedBall x (r x)\n[PROOFSTEP]\nrefine' mem_iUnion₂.2 ⟨y, Or.inl yt0, _⟩\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ s\nh'x : ¬x ∈ s'\ny : α\nyt0 : y ∈ t0\nhxy : x ∈ closedBall y (r0 y)\n⊢ x ∈ closedBall y (r y)\n[PROOFSTEP]\nrwa [r_t0 _ yt0]\n  -- the only nontrivial property is the measure control, which we check now\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_5\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∑' (x : ↑(t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave A : (∑' x : t0, μ (closedBall x (r x))) ≤ μ s + ε / 2 :=\n  calc\n    (∑' x : t0, μ (closedBall x (r x))) = ∑' x : t0, μ (closedBall x (r0 x)) := by congr 1; ext x; rw [r_t0 x x.2]\n    _ = μ (⋃ x : t0, closedBall x (r0 x)) :=\n      by\n      haveI : Encodable t0 := t0_count.toEncodable\n      rw [measure_iUnion]\n      · exact (pairwise_subtype_iff_pairwise_set _ _).2 t0_disj\n      · exact fun i => measurableSet_closedBall\n    _ ≤ μ u := by\n      apply measure_mono\n      simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n      intro x hx\n      apply Subset.trans (closedBall_subset_ball (hr0 x hx).2.2) (hR x (t0s hx)).2\n    _ ≤ μ s + ε / 2 := μu\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) = ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ (fun x => ↑↑μ (closedBall (↑x) (r ↑x))) = fun x => ↑↑μ (closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\next x\n[GOAL]\ncase e_f.h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : ↑t0\n⊢ ↑↑μ (closedBall (↑x) (r ↑x)) = ↑↑μ (closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\nrw [r_t0 x x.2]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r0 ↑x)) = ↑↑μ (⋃ (x : ↑t0), closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\nhaveI : Encodable t0 := t0_count.toEncodable\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nthis : Encodable ↑t0\n⊢ ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r0 ↑x)) = ↑↑μ (⋃ (x : ↑t0), closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase hn\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nthis : Encodable ↑t0\n⊢ Pairwise (Disjoint on fun x => closedBall (↑x) (r0 ↑x))\n[PROOFSTEP]\nexact (pairwise_subtype_iff_pairwise_set _ _).2 t0_disj\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nthis : Encodable ↑t0\n⊢ ∀ (i : ↑t0), MeasurableSet (closedBall (↑i) (r0 ↑i))\n[PROOFSTEP]\nexact fun i => measurableSet_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ↑↑μ (⋃ (x : ↑t0), closedBall (↑x) (r0 ↑x)) ≤ ↑↑μ u\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ⋃ (x : ↑t0), closedBall (↑x) (r0 ↑x) ⊆ u\n[PROOFSTEP]\nsimp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\n⊢ ∀ (x : α), x ∈ t0 → closedBall x (r0 x) ⊆ u\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nx : α\nhx : x ∈ t0\n⊢ closedBall x (r0 x) ⊆ u\n[PROOFSTEP]\napply Subset.trans (closedBall_subset_ball (hr0 x hx).2.2) (hR x (t0s hx)).2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_5\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\n⊢ ∑' (x : ↑(t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\nhave B : ∀ i : Fin N, (∑' x : ((↑) : s' → α) '' S i, μ (closedBall x (r x))) ≤ ε / 2 / N := fun i =>\n  calc\n    (∑' x : ((↑) : s' → α) '' S i, μ (closedBall x (r x))) = ∑' x : S i, μ (closedBall x (r x)) :=\n      by\n      have : InjOn ((↑) : s' → α) (S i) := Subtype.val_injective.injOn _\n      let F : S i ≃ ((↑) : s' → α) '' S i := this.bijOn_image.equiv _\n      exact (F.tsum_eq fun x => μ (closedBall x (r x))).symm\n    _ = ∑' x : S i, μ (closedBall x (r1 x)) := by congr 1; ext x; have : (x : α) ∈ s' := x.1.2; simp only [if_pos this]\n    _ = μ (⋃ x : S i, closedBall x (r1 x)) :=\n      by\n      haveI : Encodable (S i) := (S_count i).toEncodable\n      rw [measure_iUnion]\n      · exact (pairwise_subtype_iff_pairwise_set _ _).2 (S_disj i)\n      · exact fun i => measurableSet_closedBall\n    _ ≤ μ v := by\n      apply measure_mono\n      simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n      intro x xs' _\n      exact (hr1 x xs').2\n    _ ≤ ε / 2 / N := by have : μ s' = 0 := μt0; rwa [this, zero_add] at μv \n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) = ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nhave : InjOn ((↑) : s' → α) (S i) := Subtype.val_injective.injOn _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : InjOn Subtype.val (S i)\n⊢ ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) = ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nlet F : S i ≃ ((↑) : s' → α) '' S i := this.bijOn_image.equiv _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : InjOn Subtype.val (S i)\nF : ↑(S i) ≃ ↑(Subtype.val '' S i) := BijOn.equiv Subtype.val (_ : BijOn Subtype.val (S i) (Subtype.val '' S i))\n⊢ ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) = ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r ↑↑x))\n[PROOFSTEP]\nexact (F.tsum_eq fun x => μ (closedBall x (r x))).symm\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r ↑↑x)) = ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ (fun x => ↑↑μ (closedBall (↑↑x) (r ↑↑x))) = fun x => ↑↑μ (closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\next x\n[GOAL]\ncase e_f.h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nx : ↑(S i)\n⊢ ↑↑μ (closedBall (↑↑x) (r ↑↑x)) = ↑↑μ (closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\nhave : (x : α) ∈ s' := x.1.2\n[GOAL]\ncase e_f.h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nx : ↑(S i)\nthis : ↑↑x ∈ s'\n⊢ ↑↑μ (closedBall (↑↑x) (r ↑↑x)) = ↑↑μ (closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\nsimp only [if_pos this]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r1 ↑↑x)) = ↑↑μ (⋃ (x : ↑(S i)), closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\nhaveI : Encodable (S i) := (S_count i).toEncodable\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : Encodable ↑(S i)\n⊢ ∑' (x : ↑(S i)), ↑↑μ (closedBall (↑↑x) (r1 ↑↑x)) = ↑↑μ (⋃ (x : ↑(S i)), closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase hn\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : Encodable ↑(S i)\n⊢ Pairwise (Disjoint on fun x => closedBall (↑↑x) (r1 ↑↑x))\n[PROOFSTEP]\nexact (pairwise_subtype_iff_pairwise_set _ _).2 (S_disj i)\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : Encodable ↑(S i)\n⊢ ∀ (i_1 : ↑(S i)), MeasurableSet (closedBall (↑↑i_1) (r1 ↑↑i_1))\n[PROOFSTEP]\nexact fun i => measurableSet_closedBall\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ↑↑μ (⋃ (x : ↑(S i)), closedBall (↑↑x) (r1 ↑↑x)) ≤ ↑↑μ v\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ⋃ (x : ↑(S i)), closedBall (↑↑x) (r1 ↑↑x) ⊆ v\n[PROOFSTEP]\nsimp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ∀ (x : α) (h : x ∈ s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)),\n    { val := x, property := h } ∈ S i → closedBall x (r1 x) ⊆ v\n[PROOFSTEP]\nintro x xs' _\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nx : α\nxs' : x ∈ s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\nh✝ : { val := x, property := xs' } ∈ S i\n⊢ closedBall x (r1 x) ⊆ v\n[PROOFSTEP]\nexact (hr1 x xs').2\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\n⊢ ↑↑μ v ≤ ε / 2 / ↑N\n[PROOFSTEP]\nhave : μ s' = 0 := μt0\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\ni : Fin N\nthis : ↑↑μ s' = 0\n⊢ ↑↑μ v ≤ ε / 2 / ↑N\n[PROOFSTEP]\nrwa [this, zero_add] at μv \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_5\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ∑' (x : ↑(t0 ∪ ⋃ (i : Fin N), Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε\n[PROOFSTEP]\ncalc\n  (∑' x : ↥(t0 ∪ ⋃ i : Fin N, ((↑) : s' → α) '' S i), μ (closedBall x (r x))) ≤\n      (∑' x : t0, μ (closedBall x (r x))) + ∑' x : ⋃ i : Fin N, ((↑) : s' → α) '' S i, μ (closedBall x (r x)) :=\n    ENNReal.tsum_union_le (fun x => μ (closedBall x (r x))) _ _\n  _ ≤ (∑' x : t0, μ (closedBall x (r x))) + ∑ i : Fin N, ∑' x : ((↑) : s' → α) '' S i, μ (closedBall x (r x)) :=\n    (add_le_add le_rfl (ENNReal.tsum_iUnion_le (fun x => μ (closedBall x (r x))) _))\n  _ ≤ μ s + ε / 2 + ∑ i : Fin N, ε / 2 / N := by\n    refine' add_le_add A _\n    refine' Finset.sum_le_sum _\n    intro i _\n    exact B i\n  _ ≤ μ s + ε / 2 + ε / 2 := by\n    refine' add_le_add le_rfl _\n    simp only [Finset.card_fin, Finset.sum_const, nsmul_eq_mul, ENNReal.mul_div_le]\n  _ = μ s + ε := by rw [add_assoc, ENNReal.add_halves]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) +\n      ∑ i : Fin N, ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤\n    ↑↑μ s + ε / 2 + ∑ i : Fin N, ε / 2 / ↑N\n[PROOFSTEP]\nrefine' add_le_add A _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ∑ i : Fin N, ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ∑ i : Fin N, ε / 2 / ↑N\n[PROOFSTEP]\nrefine' Finset.sum_le_sum _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ∀ (i : Fin N), i ∈ Finset.univ → ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n[PROOFSTEP]\nintro i _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\ni : Fin N\na✝ : i ∈ Finset.univ\n⊢ ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n[PROOFSTEP]\nexact B i\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ↑↑μ s + ε / 2 + ∑ i : Fin N, ε / 2 / ↑N ≤ ↑↑μ s + ε / 2 + ε / 2\n[PROOFSTEP]\nrefine' add_le_add le_rfl _\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ∑ i : Fin N, ε / 2 / ↑N ≤ ε / 2\n[PROOFSTEP]\nsimp only [Finset.card_fin, Finset.sum_const, nsmul_eq_mul, ENNReal.mul_div_le]\n[GOAL]\nα : Type u_1\ninst✝⁶ : MetricSpace α\nβ : Type u\ninst✝⁵ : SecondCountableTopology α\ninst✝⁴ : MeasurableSpace α\ninst✝³ : OpensMeasurableSpace α\ninst✝² : HasBesicovitchCovering α\nμ : Measure α\ninst✝¹ : SigmaFinite μ\ninst✝ : Measure.OuterRegular μ\nε : ℝ≥0∞\nhε : ε ≠ 0\nf : α → Set ℝ\ns : Set α\nhf : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (f x ∩ Ioo 0 δ)\nu : Set α\nsu : u ⊇ s\nu_open : IsOpen u\nμu : ↑↑μ u ≤ ↑↑μ s + ε / 2\nR : α → ℝ\nhR : ∀ (x : α), x ∈ s → R x > 0 ∧ ball x (R x) ⊆ u\nt0 : Set α\nr0 : α → ℝ\nt0_count : Set.Countable t0\nt0s : t0 ⊆ s\nhr0 : ∀ (x : α), x ∈ t0 → r0 x ∈ f x ∩ Ioo 0 (R x)\nμt0 : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)) = 0\nt0_disj : PairwiseDisjoint t0 fun x => closedBall x (r0 x)\ns' : Set α := s \\ ⋃ (x : α) (_ : x ∈ t0), closedBall x (r0 x)\ns's : s' ⊆ s\nN : ℕ\nτ : ℝ\nhτ : 1 < τ\nH : IsEmpty (SatelliteConfig α N τ)\nv : Set α\ns'v : v ⊇ s'\nv_open : IsOpen v\nμv : ↑↑μ v ≤ ↑↑μ s' + ε / 2 / ↑N\nr1 : α → ℝ\nhr1 : ∀ (x : α), x ∈ s' → r1 x ∈ f x ∩ Ioo 0 1 ∧ closedBall x (r1 x) ⊆ v\nq : BallPackage (↑s') α :=\n  { c := fun x => ↑x, r := fun x => r1 ↑x, rpos := (_ : ∀ (x : ↑s'), 0 < r1 ↑x), r_bound := 1,\n    r_le := (_ : ∀ (x : ↑s'), r1 ↑x ≤ 1) }\nS : Fin N → Set ↑s'\nS_disj : ∀ (i : Fin N), PairwiseDisjoint (S i) fun j => closedBall (BallPackage.c q j) (BallPackage.r q j)\nhS : range q.c ⊆ ⋃ (i : Fin N) (j : ↑s') (_ : j ∈ S i), ball (BallPackage.c q j) (BallPackage.r q j)\nS_count : ∀ (i : Fin N), Set.Countable (S i)\nr : α → ℝ := fun x => if x ∈ s' then r1 x else r0 x\nr_t0 : ∀ (x : α), x ∈ t0 → r x = r0 x\nA : ∑' (x : ↑t0), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + ε / 2\nB : ∀ (i : Fin N), ∑' (x : ↑(Subtype.val '' S i)), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ε / 2 / ↑N\n⊢ ↑↑μ s + ε / 2 + ε / 2 = ↑↑μ s + ε\n[PROOFSTEP]\nrw [add_assoc, ENNReal.add_halves]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ ∀ (x : α) (a : Set α), a ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x → MeasurableSet a\n[PROOFSTEP]\nintro x y hy\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ny : Set α\nhy : y ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ MeasurableSet y\n[PROOFSTEP]\nobtain ⟨r, _, rfl⟩ : ∃ r : ℝ, 0 < r ∧ closedBall x r = y := by simpa only [mem_image, mem_Ioi] using hy\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ny : Set α\nhy : y ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ ∃ r, 0 < r ∧ closedBall x r = y\n[PROOFSTEP]\nsimpa only [mem_image, mem_Ioi] using hy\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\nr : ℝ\nleft✝ : 0 < r\nhy : closedBall x r ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ MeasurableSet (closedBall x r)\n[PROOFSTEP]\nexact isClosed_ball.measurableSet\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ ∀ (x : α) (y : Set α), y ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x → Set.Nonempty (interior y)\n[PROOFSTEP]\nintro x y hy\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ny : Set α\nhy : y ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ Set.Nonempty (interior y)\n[PROOFSTEP]\nobtain ⟨r, rpos, rfl⟩ : ∃ r : ℝ, 0 < r ∧ closedBall x r = y := by simpa only [mem_image, mem_Ioi] using hy\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ny : Set α\nhy : y ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ ∃ r, 0 < r ∧ closedBall x r = y\n[PROOFSTEP]\nsimpa only [mem_image, mem_Ioi] using hy\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\nr : ℝ\nrpos : 0 < r\nhy : closedBall x r ∈ (fun x => (fun r => closedBall x r) '' Ioi 0) x\n⊢ Set.Nonempty (interior (closedBall x r))\n[PROOFSTEP]\nsimp only [Nonempty.mono ball_subset_interior_closedBall, rpos, nonempty_ball]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\n⊢ ∀ (s : Set α) (f : α → Set (Set α)),\n    (∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x) →\n      (∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε) →\n        ∃ t,\n          (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n            (PairwiseDisjoint t fun p => p.snd) ∧\n              (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nintro s f fsubset ffine\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nlet g : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nhave A : ∀ x ∈ s, ∀ δ > 0, (g x ∩ Ioo 0 δ).Nonempty :=\n  by\n  intro x xs δ δpos\n  obtain ⟨t, tf, ht⟩ : ∃ (t : Set α), t ∈ f x ∧ t ⊆ closedBall x (δ / 2) := ffine x xs (δ / 2) (half_pos δpos)\n  obtain ⟨r, rpos, rfl⟩ : ∃ r : ℝ, 0 < r ∧ closedBall x r = t := by simpa using fsubset x xs tf\n  rcases le_total r (δ / 2) with (H | H)\n  · exact ⟨r, ⟨rpos, tf⟩, ⟨rpos, H.trans_lt (half_lt_self δpos)⟩⟩\n  · have : closedBall x r = closedBall x (δ / 2) := Subset.antisymm ht (closedBall_subset_closedBall H)\n    rw [this] at tf \n    refine' ⟨δ / 2, ⟨half_pos δpos, tf⟩, ⟨half_pos δpos, half_lt_self δpos⟩⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\n⊢ ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nintro x xs δ δpos\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nobtain ⟨t, tf, ht⟩ : ∃ (t : Set α), t ∈ f x ∧ t ⊆ closedBall x (δ / 2) := ffine x xs (δ / 2) (half_pos δpos)\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nt : Set α\ntf : t ∈ f x\nht : t ⊆ closedBall x (δ / 2)\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nobtain ⟨r, rpos, rfl⟩ : ∃ r : ℝ, 0 < r ∧ closedBall x r = t := by simpa using fsubset x xs tf\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nt : Set α\ntf : t ∈ f x\nht : t ⊆ closedBall x (δ / 2)\n⊢ ∃ r, 0 < r ∧ closedBall x r = t\n[PROOFSTEP]\nsimpa using fsubset x xs tf\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nrpos : 0 < r\ntf : closedBall x r ∈ f x\nht : closedBall x r ⊆ closedBall x (δ / 2)\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nrcases le_total r (δ / 2) with (H | H)\n[GOAL]\ncase intro.intro.intro.intro.inl\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nrpos : 0 < r\ntf : closedBall x r ∈ f x\nht : closedBall x r ⊆ closedBall x (δ / 2)\nH : r ≤ δ / 2\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nexact ⟨r, ⟨rpos, tf⟩, ⟨rpos, H.trans_lt (half_lt_self δpos)⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nrpos : 0 < r\ntf : closedBall x r ∈ f x\nht : closedBall x r ⊆ closedBall x (δ / 2)\nH : δ / 2 ≤ r\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nhave : closedBall x r = closedBall x (δ / 2) := Subset.antisymm ht (closedBall_subset_closedBall H)\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nrpos : 0 < r\ntf : closedBall x r ∈ f x\nht : closedBall x r ⊆ closedBall x (δ / 2)\nH : δ / 2 ≤ r\nthis : closedBall x r = closedBall x (δ / 2)\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nrw [this] at tf \n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nx : α\nxs : x ∈ s\nδ : ℝ\nδpos : δ > 0\nr : ℝ\nrpos : 0 < r\ntf : closedBall x (δ / 2) ∈ f x\nht : closedBall x r ⊆ closedBall x (δ / 2)\nH : δ / 2 ≤ r\nthis : closedBall x r = closedBall x (δ / 2)\n⊢ Set.Nonempty (g x ∩ Ioo 0 δ)\n[PROOFSTEP]\nrefine' ⟨δ / 2, ⟨half_pos δpos, tf⟩, ⟨half_pos δpos, half_lt_self δpos⟩⟩\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nobtain ⟨t, r, _, ts, tg, μt, tdisj⟩ :\n  ∃ (t : Set α) (r : α → ℝ),\n    t.Countable ∧\n      t ⊆ s ∧\n        (∀ x ∈ t, r x ∈ g x ∩ Ioo 0 1) ∧\n          μ (s \\ ⋃ x ∈ t, closedBall x (r x)) = 0 ∧ t.PairwiseDisjoint fun x => closedBall x (r x) :=\n  exists_disjoint_closedBall_covering_ae μ g s A (fun _ => 1) fun _ _ => zero_lt_one\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nlet F : α → α × Set α := fun x => (x, closedBall x (r x))\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\n⊢ ∃ t,\n    (∀ (p : α × Set α), p ∈ t → p.fst ∈ s) ∧\n      (PairwiseDisjoint t fun p => p.snd) ∧\n        (∀ (p : α × Set α), p ∈ t → p.snd ∈ f p.fst) ∧ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ t), p.snd) = 0\n[PROOFSTEP]\nrefine' ⟨F '' t, _, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\n⊢ ∀ (p : α × Set α), p ∈ F '' t → p.fst ∈ s\n[PROOFSTEP]\nrintro - ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\nx : α\nhx : x ∈ t\n⊢ (F x).fst ∈ s\n[PROOFSTEP]\nexact ts hx\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\n⊢ PairwiseDisjoint (F '' t) fun p => p.snd\n[PROOFSTEP]\nrintro p ⟨x, hx, rfl⟩ q ⟨y, hy, rfl⟩ hxy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.intro.intro.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\nx : α\nhx : x ∈ t\ny : α\nhy : y ∈ t\nhxy : F x ≠ F y\n⊢ (Disjoint on fun p => p.snd) (F x) (F y)\n[PROOFSTEP]\nexact tdisj hx hy (ne_of_apply_ne F hxy)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\n⊢ ∀ (p : α × Set α), p ∈ F '' t → p.snd ∈ f p.fst\n[PROOFSTEP]\nrintro - ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\nx : α\nhx : x ∈ t\n⊢ (F x).snd ∈ f (F x).fst\n[PROOFSTEP]\nexact (tg x hx).1.2\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_4\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\ns : Set α\nf : α → Set (Set α)\nfsubset : ∀ (x : α), x ∈ s → f x ⊆ (fun x => (fun r => closedBall x r) '' Ioi 0) x\nffine : ∀ (x : α), x ∈ s → ∀ (ε : ℝ), ε > 0 → ∃ a, a ∈ f x ∧ a ⊆ closedBall x ε\ng : α → Set ℝ := fun x => {r | 0 < r ∧ closedBall x r ∈ f x}\nA : ∀ (x : α), x ∈ s → ∀ (δ : ℝ), δ > 0 → Set.Nonempty (g x ∩ Ioo 0 δ)\nt : Set α\nr : α → ℝ\nleft✝ : Set.Countable t\nts : t ⊆ s\ntg : ∀ (x : α), x ∈ t → r x ∈ g x ∩ Ioo 0 1\nμt : ↑↑μ (s \\ ⋃ (x : α) (_ : x ∈ t), closedBall x (r x)) = 0\ntdisj : PairwiseDisjoint t fun x => closedBall x (r x)\nF : α → α × Set α := fun x => (x, closedBall x (r x))\n⊢ ↑↑μ (s \\ ⋃ (p : α × Set α) (_ : p ∈ F '' t), p.snd) = 0\n[PROOFSTEP]\nrwa [biUnion_image]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\n⊢ Tendsto (fun r => closedBall x r) (𝓝[Ioi 0] 0) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\n⊢ s ∈ map (fun r => closedBall x r) (𝓝[Ioi 0] 0)\n[PROOFSTEP]\nsimp only [mem_map]\n[GOAL]\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\n⊢ (fun r => closedBall x r) ⁻¹' s ∈ 𝓝[Ioi 0] 0\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε⟩ :\n  ∃ (ε : ℝ), ε > 0 ∧ ∀ a : Set α, a ∈ (Besicovitch.vitaliFamily μ).setsAt x → a ⊆ closedBall x ε → a ∈ s :=\n  (VitaliFamily.mem_filterAt_iff _).1 hs\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\nε : ℝ\nεpos : ε > 0\nhε : ∀ (a : Set α), a ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x → a ⊆ closedBall x ε → a ∈ s\n⊢ (fun r => closedBall x r) ⁻¹' s ∈ 𝓝[Ioi 0] 0\n[PROOFSTEP]\nhave : Ioc (0 : ℝ) ε ∈ 𝓝[>] (0 : ℝ) := Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, εpos⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\nε : ℝ\nεpos : ε > 0\nhε : ∀ (a : Set α), a ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x → a ⊆ closedBall x ε → a ∈ s\nthis : Ioc 0 ε ∈ 𝓝[Ioi 0] 0\n⊢ (fun r => closedBall x r) ⁻¹' s ∈ 𝓝[Ioi 0] 0\n[PROOFSTEP]\nfilter_upwards [this] with _ hr\n[GOAL]\ncase h\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\nε : ℝ\nεpos : ε > 0\nhε : ∀ (a : Set α), a ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x → a ⊆ closedBall x ε → a ∈ s\nthis : Ioc 0 ε ∈ 𝓝[Ioi 0] 0\na✝ : ℝ\nhr : a✝ ∈ Ioc 0 ε\n⊢ a✝ ∈ (fun r => closedBall x r) ⁻¹' s\n[PROOFSTEP]\napply hε\n[GOAL]\ncase h.a\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\nε : ℝ\nεpos : ε > 0\nhε : ∀ (a : Set α), a ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x → a ⊆ closedBall x ε → a ∈ s\nthis : Ioc 0 ε ∈ 𝓝[Ioi 0] 0\na✝ : ℝ\nhr : a✝ ∈ Ioc 0 ε\n⊢ (fun r => closedBall x r) a✝ ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x\n[PROOFSTEP]\nexact mem_image_of_mem _ hr.1\n[GOAL]\ncase h.a\nα : Type u_1\ninst✝⁵ : MetricSpace α\nβ : Type u\ninst✝⁴ : SecondCountableTopology α\ninst✝³ : MeasurableSpace α\ninst✝² : OpensMeasurableSpace α\ninst✝¹ : HasBesicovitchCovering α\nμ : Measure α\ninst✝ : SigmaFinite μ\nx : α\ns : Set (Set α)\nhs : s ∈ VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x\nε : ℝ\nεpos : ε > 0\nhε : ∀ (a : Set α), a ∈ VitaliFamily.setsAt (Besicovitch.vitaliFamily μ) x → a ⊆ closedBall x ε → a ∈ s\nthis : Ioc 0 ε ∈ 𝓝[Ioi 0] 0\na✝ : ℝ\nhr : a✝ ∈ Ioc 0 ε\n⊢ (fun r => closedBall x r) a✝ ⊆ closedBall x ε\n[PROOFSTEP]\nexact closedBall_subset_closedBall hr.2\n[GOAL]\nα : Type u_1\ninst✝¹¹ : MetricSpace α\nβ : Type u\ninst✝¹⁰ : SecondCountableTopology α\ninst✝⁹ : MeasurableSpace α\ninst✝⁸ : OpensMeasurableSpace α\ninst✝⁷ : HasBesicovitchCovering α\ninst✝⁶ : MetricSpace β\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : SecondCountableTopology β\ninst✝² : HasBesicovitchCovering β\nρ μ : Measure β\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsLocallyFiniteMeasure ρ\n⊢ ∀ᵐ (x : β) ∂μ, Tendsto (fun r => ↑↑ρ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (Measure.rnDeriv ρ μ x))\n[PROOFSTEP]\nfilter_upwards [VitaliFamily.ae_tendsto_rnDeriv (Besicovitch.vitaliFamily μ) ρ] with x hx\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹¹ : MetricSpace α\nβ : Type u\ninst✝¹⁰ : SecondCountableTopology α\ninst✝⁹ : MeasurableSpace α\ninst✝⁸ : OpensMeasurableSpace α\ninst✝⁷ : HasBesicovitchCovering α\ninst✝⁶ : MetricSpace β\ninst✝⁵ : MeasurableSpace β\ninst✝⁴ : BorelSpace β\ninst✝³ : SecondCountableTopology β\ninst✝² : HasBesicovitchCovering β\nρ μ : Measure β\ninst✝¹ : IsLocallyFiniteMeasure μ\ninst✝ : IsLocallyFiniteMeasure ρ\nx : β\nhx : Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x) (𝓝 (Measure.rnDeriv ρ μ x))\n⊢ Tendsto (fun r => ↑↑ρ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (Measure.rnDeriv ρ μ x))\n[PROOFSTEP]\nexact hx.comp (tendsto_filterAt μ x)\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : MetricSpace α\nβ : Type u\ninst✝⁹ : SecondCountableTopology α\ninst✝⁸ : MeasurableSpace α\ninst✝⁷ : OpensMeasurableSpace α\ninst✝⁶ : HasBesicovitchCovering α\ninst✝⁵ : MetricSpace β\ninst✝⁴ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : SecondCountableTopology β\ninst✝¹ : HasBesicovitchCovering β\nμ : Measure β\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set β\nhs : MeasurableSet s\n⊢ ∀ᵐ (x : β) ∂μ, Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (indicator s 1 x))\n[PROOFSTEP]\nfilter_upwards [VitaliFamily.ae_tendsto_measure_inter_div_of_measurableSet (Besicovitch.vitaliFamily μ) hs]\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹⁰ : MetricSpace α\nβ : Type u\ninst✝⁹ : SecondCountableTopology α\ninst✝⁸ : MeasurableSpace α\ninst✝⁷ : OpensMeasurableSpace α\ninst✝⁶ : HasBesicovitchCovering α\ninst✝⁵ : MetricSpace β\ninst✝⁴ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : SecondCountableTopology β\ninst✝¹ : HasBesicovitchCovering β\nμ : Measure β\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set β\nhs : MeasurableSet s\n⊢ ∀ (a : β),\n    Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) a)\n        (𝓝 (indicator s 1 a)) →\n      Tendsto (fun r => ↑↑μ (s ∩ closedBall a r) / ↑↑μ (closedBall a r)) (𝓝[Ioi 0] 0) (𝓝 (indicator s 1 a))\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nα : Type u_1\ninst✝¹⁰ : MetricSpace α\nβ : Type u\ninst✝⁹ : SecondCountableTopology α\ninst✝⁸ : MeasurableSpace α\ninst✝⁷ : OpensMeasurableSpace α\ninst✝⁶ : HasBesicovitchCovering α\ninst✝⁵ : MetricSpace β\ninst✝⁴ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : SecondCountableTopology β\ninst✝¹ : HasBesicovitchCovering β\nμ : Measure β\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set β\nhs : MeasurableSet s\nx : β\nhx : Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x) (𝓝 (indicator s 1 x))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (indicator s 1 x))\n[PROOFSTEP]\nexact hx.comp (tendsto_filterAt μ x)\n[GOAL]\nα : Type u_1\ninst✝¹⁰ : MetricSpace α\nβ : Type u\ninst✝⁹ : SecondCountableTopology α\ninst✝⁸ : MeasurableSpace α\ninst✝⁷ : OpensMeasurableSpace α\ninst✝⁶ : HasBesicovitchCovering α\ninst✝⁵ : MetricSpace β\ninst✝⁴ : MeasurableSpace β\ninst✝³ : BorelSpace β\ninst✝² : SecondCountableTopology β\ninst✝¹ : HasBesicovitchCovering β\nμ : Measure β\ninst✝ : IsLocallyFiniteMeasure μ\ns : Set β\n⊢ ∀ᵐ (x : β) ∂Measure.restrict μ s,\n    Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nfilter_upwards [VitaliFamily.ae_tendsto_measure_inter_div (Besicovitch.vitaliFamily μ) s] with x hx using\n  hx.comp (tendsto_filterAt μ x)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Covering.Besicovitch", "llama_tokens": 375726, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926666143434, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.28938926673008236}}
{"text": "[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : MeasurableSpace M\ninst✝² : SMul M α\ninst✝¹ : MeasurableSMul M α\nc : M\nμ : Measure α\ninst✝ : SMulInvariantMeasure M α μ\n⊢ map (fun x => c • x) μ = μ\n[PROOFSTEP]\next1 s hs\n[GOAL]\ncase h\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : MeasurableSpace M\ninst✝² : SMul M α\ninst✝¹ : MeasurableSMul M α\nc : M\nμ : Measure α\ninst✝ : SMulInvariantMeasure M α μ\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑(map (fun x => c • x) μ) s = ↑↑μ s\n[PROOFSTEP]\nrw [map_apply (measurable_const_smul c) hs]\n[GOAL]\ncase h\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : MeasurableSpace M\ninst✝² : SMul M α\ninst✝¹ : MeasurableSMul M α\nc : M\nμ : Measure α\ninst✝ : SMulInvariantMeasure M α μ\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑μ ((fun x x_1 => x • x_1) c ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nexact SMulInvariantMeasure.measure_preimage_smul c hs\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 1 ↔ 2\n[GOAL]\ncase tfae_1_iff_2\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\n⊢ SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nexact ⟨fun h => h.1, fun h => ⟨h⟩⟩\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 1 → 6\n[GOAL]\ncase tfae_1_to_6\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n⊢ SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\n[PROOFSTEP]\nintro h c\n[GOAL]\ncase tfae_1_to_6\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\nh : SMulInvariantMeasure G α μ\nc : G\n⊢ map (fun x => c • x) μ = μ\n[PROOFSTEP]\nexact (measurePreserving_smul c μ).map_eq\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 6 → 7\n[GOAL]\ncase tfae_6_to_7\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\n⊢ (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\n[PROOFSTEP]\nexact fun H c => ⟨measurable_const_smul c, H c⟩\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 7 → 4\n[GOAL]\ncase tfae_7_to_4\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\n⊢ (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nexact fun H c => (H c).measure_preimage_emb (measurableEmbedding_const_smul c)\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 4 → 5\n[GOAL]\ncase tfae_4_to_5\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n⊢ (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\n[PROOFSTEP]\nexact fun H c s => by\n  rw [← preimage_smul_inv]\n  apply H\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\nH : ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\nc : G\ns : Set α\n⊢ ↑↑μ (c • s) = ↑↑μ s\n[PROOFSTEP]\nrw [← preimage_smul_inv]\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\nH : ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\nc : G\ns : Set α\n⊢ ↑↑μ ((fun x => c⁻¹ • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\napply H\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 5 → 3\n[GOAL]\ncase tfae_5_to_3\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\n⊢ (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\n[PROOFSTEP]\nexact fun H c s _ => H c s\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\ntfae_5_to_3 :\n  (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_have 3 → 2\n[GOAL]\ncase tfae_3_to_2\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\ntfae_5_to_3 :\n  (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\n⊢ (∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s) →\n    ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nintro H c s hs\n[GOAL]\ncase tfae_3_to_2\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\ntfae_5_to_3 :\n  (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\nH : ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\nc : G\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n[PROOFSTEP]\nrw [preimage_smul]\n[GOAL]\ncase tfae_3_to_2\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\ntfae_5_to_3 :\n  (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\nH : ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\nc : G\ns : Set α\nhs : MeasurableSet s\n⊢ ↑↑μ (c⁻¹ • s) = ↑↑μ s\n[PROOFSTEP]\nexact H c⁻¹ s hs\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝³ : Group G\ninst✝² : MulAction G α\ninst✝¹ : MeasurableSpace G\ninst✝ : MeasurableSMul G α\nc : G\nμ : Measure α\ntfae_1_iff_2 :\n  SMulInvariantMeasure G α μ ↔ ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_1_to_6 : SMulInvariantMeasure G α μ → ∀ (c : G), map (fun x => c • x) μ = μ\ntfae_6_to_7 : (∀ (c : G), map (fun x => c • x) μ = μ) → ∀ (c : G), MeasurePreserving fun x => c • x\ntfae_7_to_4 :\n  (∀ (c : G), MeasurePreserving fun x => c • x) → ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\ntfae_4_to_5 : (∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s) → ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s\ntfae_5_to_3 :\n  (∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s) → ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s\ntfae_3_to_2 :\n  (∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s) →\n    ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s\n⊢ List.TFAE\n    [SMulInvariantMeasure G α μ, ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), MeasurableSet s → ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G) (s : Set α), ↑↑μ ((fun x => c • x) ⁻¹' s) = ↑↑μ s, ∀ (c : G) (s : Set α), ↑↑μ (c • s) = ↑↑μ s,\n      ∀ (c : G), map (fun x => c • x) μ = μ, ∀ (c : G), MeasurePreserving fun x => c • x]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\ns : Set α\nhs : NullMeasurableSet s\nc : G\n⊢ NullMeasurableSet (c • s)\n[PROOFSTEP]\nsimpa only [← preimage_smul_inv] using hs.preimage (measurePreserving_smul _ _).quasiMeasurePreserving\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns✝ : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc✝ : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\ns : Set α\nh : ↑↑μ s = 0\nc : G\n⊢ ↑↑μ (c • s) = 0\n[PROOFSTEP]\nrwa [measure_smul]\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁷ : Group G\ninst✝⁶ : MulAction G α\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝³ : SMulInvariantMeasure G α μ\ninst✝² : TopologicalSpace α\ninst✝¹ : ContinuousConstSMul G α\ninst✝ : MulAction.IsMinimal G α\nK U : Set α\nhK : IsCompact K\nhμK : ↑↑μ K ≠ 0\nhU : IsOpen U\nhne : Set.Nonempty U\nt : Finset G\nht : K ⊆ ⋃ (g : G) (_ : g ∈ t), g • U\nhμU : ↑↑μ U = 0\nx✝¹ : G\nx✝ : x✝¹ ∈ ↑t\n⊢ ↑↑μ (x✝¹ • U) = 0\n[PROOFSTEP]\nrwa [measure_smul]\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁷ : Group G\ninst✝⁶ : MulAction G α\ninst✝⁵ : MeasurableSpace G\ninst✝⁴ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝³ : SMulInvariantMeasure G α μ\ninst✝² : TopologicalSpace α\ninst✝¹ : ContinuousConstSMul G α\ninst✝ : MulAction.IsMinimal G α\nK U : Set α\nhU : IsOpen U\nhne : Set.Nonempty U\nhμU : ↑↑μ U ≠ ⊤\nx : α\ng : G\nhg : g • x ∈ U\n⊢ ↑↑μ ((fun x x_1 => x • x_1) g ⁻¹' U) ≠ ⊤\n[PROOFSTEP]\nrwa [measure_preimage_smul]\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁸ : Group G\ninst✝⁷ : MulAction G α\ninst✝⁶ : MeasurableSpace G\ninst✝⁵ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝⁴ : SMulInvariantMeasure G α μ\ninst✝³ : TopologicalSpace α\ninst✝² : ContinuousConstSMul G α\ninst✝¹ : MulAction.IsMinimal G α\nK U : Set α\ninst✝ : Regular μ\nhμ : μ ≠ 0\nhU : IsOpen U\n⊢ ↑↑μ U = 0 ↔ U = ∅\n[PROOFSTEP]\nrw [← not_iff_not, ← Ne.def, ← pos_iff_ne_zero, measure_pos_iff_nonempty_of_smulInvariant G hμ hU,\n  nonempty_iff_ne_empty]\n[GOAL]\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx y : G\nhs : x • s =ᶠ[ae μ] s\nhy : y ∈ Subgroup.zpowers x\n⊢ y • s =ᶠ[ae μ] s\n[PROOFSTEP]\nobtain ⟨k, rfl⟩ := Subgroup.mem_zpowers_iff.mp hy\n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nlet e : α ≃ α := MulAction.toPermHom G α x\n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\ne : α ≃ α := ↑(MulAction.toPermHom G α) x\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nhave he : QuasiMeasurePreserving e μ μ := (measurePreserving_smul x μ).quasiMeasurePreserving\n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\ne : α ≃ α := ↑(MulAction.toPermHom G α) x\nhe : QuasiMeasurePreserving ↑e\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nhave he' : QuasiMeasurePreserving e.symm μ μ := (measurePreserving_smul x⁻¹ μ).quasiMeasurePreserving\n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\ne : α ≃ α := ↑(MulAction.toPermHom G α) x\nhe : QuasiMeasurePreserving ↑e\nhe' : QuasiMeasurePreserving ↑e.symm\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nhave h := he.image_zpow_ae_eq he' k hs\n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\ne : α ≃ α := ↑(MulAction.toPermHom G α) x\nhe : QuasiMeasurePreserving ↑e\nhe' : QuasiMeasurePreserving ↑e.symm\nh : ↑(e ^ k) '' s =ᶠ[ae μ] s\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nsimp only [← MonoidHom.map_zpow] at h \n[GOAL]\ncase intro\nG : Type u\nM : Type v\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : Group G\ninst✝³ : MulAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableSMul G α\nc : G\nμ : Measure α\ninst✝ : SMulInvariantMeasure G α μ\nx : G\nhs : x • s =ᶠ[ae μ] s\nk : ℤ\nhy : x ^ k ∈ Subgroup.zpowers x\ne : α ≃ α := ↑(MulAction.toPermHom G α) x\nhe : QuasiMeasurePreserving ↑e\nhe' : QuasiMeasurePreserving ↑e.symm\nh : (fun a => ↑(↑(MulAction.toPermHom G α) (x ^ k)) a) '' s =ᶠ[ae μ] s\n⊢ x ^ k • s =ᶠ[ae μ] s\n[PROOFSTEP]\nsimpa only [MulAction.toPermHom_apply, MulAction.toPerm_apply, image_smul] using h\n[GOAL]\nG✝ : Type u\nM : Type v\nα✝ : Type w\ns✝ : Set α✝\nm✝ : MeasurableSpace α✝\ninst✝⁹ : Group G✝\ninst✝⁸ : MulAction G✝ α✝\ninst✝⁷ : MeasurableSpace G✝\ninst✝⁶ : MeasurableSMul G✝ α✝\nc : G✝\nμ✝ : Measure α✝\ninst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝\nG : Type u\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : AddGroup G\ninst✝³ : AddAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableVAdd G α\nμ : Measure α\ninst✝ : VAddInvariantMeasure G α μ\nx y : G\nhs : x +ᵥ s =ᶠ[ae μ] s\nhy : y ∈ AddSubgroup.zmultiples x\n⊢ y +ᵥ s =ᶠ[ae μ] s\n[PROOFSTEP]\nletI : MeasurableSpace (Multiplicative G) := (inferInstanceAs (MeasurableSpace G))\n[GOAL]\nG✝ : Type u\nM : Type v\nα✝ : Type w\ns✝ : Set α✝\nm✝ : MeasurableSpace α✝\ninst✝⁹ : Group G✝\ninst✝⁸ : MulAction G✝ α✝\ninst✝⁷ : MeasurableSpace G✝\ninst✝⁶ : MeasurableSMul G✝ α✝\nc : G✝\nμ✝ : Measure α✝\ninst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝\nG : Type u\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : AddGroup G\ninst✝³ : AddAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableVAdd G α\nμ : Measure α\ninst✝ : VAddInvariantMeasure G α μ\nx y : G\nhs : x +ᵥ s =ᶠ[ae μ] s\nhy : y ∈ AddSubgroup.zmultiples x\nthis : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)\n⊢ y +ᵥ s =ᶠ[ae μ] s\n[PROOFSTEP]\nletI : SMulInvariantMeasure (Multiplicative G) α μ :=\n  ⟨fun g => VAddInvariantMeasure.measure_preimage_vadd (Multiplicative.toAdd g)⟩\n[GOAL]\nG✝ : Type u\nM : Type v\nα✝ : Type w\ns✝ : Set α✝\nm✝ : MeasurableSpace α✝\ninst✝⁹ : Group G✝\ninst✝⁸ : MulAction G✝ α✝\ninst✝⁷ : MeasurableSpace G✝\ninst✝⁶ : MeasurableSMul G✝ α✝\nc : G✝\nμ✝ : Measure α✝\ninst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝\nG : Type u\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : AddGroup G\ninst✝³ : AddAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableVAdd G α\nμ : Measure α\ninst✝ : VAddInvariantMeasure G α μ\nx y : G\nhs : x +ᵥ s =ᶠ[ae μ] s\nhy : y ∈ AddSubgroup.zmultiples x\nthis✝ : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)\nthis : SMulInvariantMeasure (Multiplicative G) α μ :=\n  { measure_preimage_smul := fun g => VAddInvariantMeasure.measure_preimage_vadd (↑Multiplicative.toAdd g) }\n⊢ y +ᵥ s =ᶠ[ae μ] s\n[PROOFSTEP]\nletI : MeasurableSMul (Multiplicative G) α :=\n  { measurable_const_smul := fun g => measurable_const_vadd (Multiplicative.toAdd g)\n    measurable_smul_const := fun a =>\n      @measurable_vadd_const (Multiplicative G) α (inferInstanceAs (VAdd G α)) _ _\n        (inferInstanceAs (MeasurableVAdd G α)) a }\n[GOAL]\nG✝ : Type u\nM : Type v\nα✝ : Type w\ns✝ : Set α✝\nm✝ : MeasurableSpace α✝\ninst✝⁹ : Group G✝\ninst✝⁸ : MulAction G✝ α✝\ninst✝⁷ : MeasurableSpace G✝\ninst✝⁶ : MeasurableSMul G✝ α✝\nc : G✝\nμ✝ : Measure α✝\ninst✝⁵ : SMulInvariantMeasure G✝ α✝ μ✝\nG : Type u\nα : Type w\ns : Set α\nm : MeasurableSpace α\ninst✝⁴ : AddGroup G\ninst✝³ : AddAction G α\ninst✝² : MeasurableSpace G\ninst✝¹ : MeasurableVAdd G α\nμ : Measure α\ninst✝ : VAddInvariantMeasure G α μ\nx y : G\nhs : x +ᵥ s =ᶠ[ae μ] s\nhy : y ∈ AddSubgroup.zmultiples x\nthis✝¹ : MeasurableSpace (Multiplicative G) := inferInstanceAs (MeasurableSpace G)\nthis✝ : SMulInvariantMeasure (Multiplicative G) α μ :=\n  { measure_preimage_smul := fun g => VAddInvariantMeasure.measure_preimage_vadd (↑Multiplicative.toAdd g) }\nthis : MeasurableSMul (Multiplicative G) α :=\n  { measurable_const_smul := fun g => measurable_const_vadd (↑Multiplicative.toAdd g),\n    measurable_smul_const := fun a => measurable_vadd_const a }\n⊢ y +ᵥ s =ᶠ[ae μ] s\n[PROOFSTEP]\nexact @smul_ae_eq_self_of_mem_zpowers (Multiplicative G) α _ _ _ _ _ _ _ _ _ _ hs hy\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Group.Action", "llama_tokens": 13964, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6224593312018545, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.2893823211917706}}
{"text": "[GOAL]\ntm : FinTM2\ns : List (FinTM2.Γ tm tm.k₀)\nk : tm.K\nh : k = tm.k₀\n⊢ List (FinTM2.Γ tm k)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ntm : FinTM2\ns : List (FinTM2.Γ tm tm.k₀)\nk : tm.K\nh : k = tm.k₀\n⊢ List (FinTM2.Γ tm tm.k₀)\n[PROOFSTEP]\nexact s\n[GOAL]\ntm : FinTM2\ns : List (FinTM2.Γ tm tm.k₁)\nk : tm.K\nh : k = tm.k₁\n⊢ List (FinTM2.Γ tm k)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ntm : FinTM2\ns : List (FinTM2.Γ tm tm.k₁)\nk : tm.K\nh : k = tm.k₁\n⊢ List (FinTM2.Γ tm tm.k₁)\n[PROOFSTEP]\nexact s\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nc : Option σ\nh₁ : EvalsTo f a (some b)\nh₂ : EvalsTo f b c\n⊢ (flip bind f)^[h₂.steps + h₁.steps] (some a) = c\n[PROOFSTEP]\nrw [Function.iterate_add_apply, h₁.evals_in_steps, h₂.evals_in_steps]\n[GOAL]\nα : Type\nea : FinEncoding α\nx✝ : α\n⊢ { steps := 1,\n        evals_in_steps :=\n          (_ :\n            (flip bind\n                    (FinTM2.step\n                      { tm := idComputer ea,\n                          inputAlphabet :=\n                            Equiv.cast\n                              (_ :\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                          outputAlphabet :=\n                            Equiv.cast\n                              (_ :\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.tm))^[1]\n                (some\n                  (initList\n                    { tm := idComputer ea,\n                        inputAlphabet :=\n                          Equiv.cast\n                            (_ :\n                              FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                        outputAlphabet :=\n                          Equiv.cast\n                            (_ :\n                              FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.tm\n                    (List.map\n                      { tm := idComputer ea,\n                            inputAlphabet :=\n                              Equiv.cast\n                                (_ :\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                    FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                            outputAlphabet :=\n                              Equiv.cast\n                                (_ :\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                    FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.inputAlphabet.invFun\n                      (Encoding.encode ea.toEncoding x✝)))) =\n              (flip bind\n                    (FinTM2.step\n                      { tm := idComputer ea,\n                          inputAlphabet :=\n                            Equiv.cast\n                              (_ :\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                          outputAlphabet :=\n                            Equiv.cast\n                              (_ :\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.tm))^[1]\n                (some\n                  (initList\n                    { tm := idComputer ea,\n                        inputAlphabet :=\n                          Equiv.cast\n                            (_ :\n                              FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                        outputAlphabet :=\n                          Equiv.cast\n                            (_ :\n                              FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.tm\n                    (List.map\n                      { tm := idComputer ea,\n                            inputAlphabet :=\n                              Equiv.cast\n                                (_ :\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₀ =\n                                    FinTM2.Γ (idComputer ea) (idComputer ea).k₀),\n                            outputAlphabet :=\n                              Equiv.cast\n                                (_ :\n                                  FinTM2.Γ (idComputer ea) (idComputer ea).k₁ =\n                                    FinTM2.Γ (idComputer ea) (idComputer ea).k₁) }.inputAlphabet.invFun\n                      (Encoding.encode ea.toEncoding x✝))))) }.steps ≤\n    Polynomial.eval (List.length (Encoding.encode ea.toEncoding x✝)) 1\n[PROOFSTEP]\nsimp only [Polynomial.eval_one]\n", "meta": {"mathlib_filename": "Mathlib.Computability.TMComputable", "llama_tokens": 1532, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6723316991792861, "lm_q2_score": 0.43014734858584286, "lm_q1q2_score": 0.28920169777218446}}
{"text": "[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nj j' : J\nf : j ⟶ j'\n⊢ ((Functor.const J).obj (Shrink ↑(Functor.sections F))).map f ≫\n      (fun j u => ↑(↑(equivShrink ↑(Functor.sections F)).symm u) j) j' =\n    (fun j u => ↑(↑(equivShrink ↑(Functor.sections F)).symm u) j) j ≫ F.map f\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nj j' : J\nf : j ⟶ j'\nx : ((Functor.const J).obj (Shrink ↑(Functor.sections F))).obj j\n⊢ (((Functor.const J).obj (Shrink ↑(Functor.sections F))).map f ≫\n        (fun j u => ↑(↑(equivShrink ↑(Functor.sections F)).symm u) j) j')\n      x =\n    ((fun j u => ↑(↑(equivShrink ↑(Functor.sections F)).symm u) j) j ≫ F.map f) x\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx y : (limitCone F).pt\nw : ↑(equivShrink ↑(Functor.sections F)).symm x = ↑(equivShrink ↑(Functor.sections F)).symm y\n⊢ x = y\n[PROOFSTEP]\naesop\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\n⊢ x✝ =\n    (fun s v =>\n        ↑(equivShrink ↑(Functor.sections F))\n          { val := fun j => NatTrans.app s.π j v,\n            property := (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n      x✝¹\n[PROOFSTEP]\next x j\n[GOAL]\ncase h.w.a.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\nx : x✝¹.pt\nj : J\n⊢ ↑(↑(equivShrink ↑(Functor.sections F)).symm (x✝ x)) j =\n    ↑(↑(equivShrink ↑(Functor.sections F)).symm\n          ((fun s v =>\n              ↑(equivShrink ↑(Functor.sections F))\n                { val := fun j => NatTrans.app s.π j v,\n                  property :=\n                    (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n            x✝¹ x))\n      j\n[PROOFSTEP]\nsimpa using congr_fun (w j) x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nf : j ⟶ j'\n⊢ ((Functor.const J).obj ↑(Functor.sections F)).map f ≫ (fun j u => ↑u j) j' = (fun j u => ↑u j) j ≫ F.map f\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nf : j ⟶ j'\nx : ((Functor.const J).obj ↑(Functor.sections F)).obj j\n⊢ (((Functor.const J).obj ↑(Functor.sections F)).map f ≫ (fun j u => ↑u j) j') x = ((fun j u => ↑u j) j ≫ F.map f) x\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\n⊢ x✝ =\n    (fun s v =>\n        { val := fun j => NatTrans.app s.π j v,\n          property := (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n      x✝¹\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\nx : x✝¹.pt\n⊢ x✝ x =\n    (fun s v =>\n        { val := fun j => NatTrans.app s.π j v,\n          property := (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n      x✝¹ x\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase h.a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\nx : x✝¹.pt\n⊢ ↑(x✝ x) =\n    ↑((fun s v =>\n          { val := fun j => NatTrans.app s.π j v,\n            property := (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n        x✝¹ x)\n[PROOFSTEP]\nfunext j\n[GOAL]\ncase h.a.h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx✝¹ : Cone F\nx✝ : x✝¹.pt ⟶ (limitCone F).pt\nw : ∀ (j : J), x✝ ≫ NatTrans.app (limitCone F).π j = NatTrans.app x✝¹.π j\nx : x✝¹.pt\nj : J\n⊢ ↑(x✝ x) j =\n    ↑((fun s v =>\n            { val := fun j => NatTrans.app s.π j v,\n              property := (_ : ∀ {j j' : J} (f : j ⟶ j'), (NatTrans.app s.π j ≫ F.map f) v = NatTrans.app s.π j' v) })\n          x✝¹ x)\n      j\n[PROOFSTEP]\nexact congr_fun (w j) x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nc : Cone F\nt : IsLimit c\nj : J\nx : c.pt\n⊢ ↑(↑(isLimitEquivSections t) x) j = NatTrans.app c.π j x\n[PROOFSTEP]\nsimp [isLimitEquivSections, IsLimit.conePointUniqueUpToIso]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nc : Cone F\nt : IsLimit c\nx : ↑(Functor.sections F)\nj : J\n⊢ NatTrans.app c.π j (↑(isLimitEquivSections t).symm x) = ↑x j\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := (isLimitEquivSections.{v, u} t).surjective x\n[GOAL]\ncase intro\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nc : Cone F\nt : IsLimit c\nj : J\nx : c.pt\n⊢ NatTrans.app c.π j (↑(isLimitEquivSections t).symm (↑(isLimitEquivSections t) x)) = ↑(↑(isLimitEquivSections t) x) j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx : limit F\nj : J\n⊢ ↑(↑(limitEquivSections F) x) j = limit.π F j x\n[PROOFSTEP]\nsimp [limitEquivSections, isLimitEquivSections, IsLimit.conePointUniqueUpToIso]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx : (j : J) → F.obj j\nh : ∀ (j j' : J) (f : j ⟶ j'), F.map f (x j) = x j'\nj : J\n⊢ limit.π F j (mk F x h) = x j\n[PROOFSTEP]\ndsimp [Limit.mk]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx : (j : J) → F.obj j\nh : ∀ (j j' : J) (f : j ⟶ j'), F.map f (x j) = x j'\nj : J\n⊢ limit.π F j\n      (↑(limitEquivSections F).symm { val := x, property := (_ : ∀ {j j' : J} (f : j ⟶ j'), F.map f (x j) = x j') }) =\n    x j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx y : limit F\nw : ∀ (j : J), limit.π F j x = limit.π F j y\n⊢ x = y\n[PROOFSTEP]\napply (limitEquivSections.{v, u} F).injective\n[GOAL]\ncase a\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx y : limit F\nw : ∀ (j : J), limit.π F j x = limit.π F j y\n⊢ ↑(limitEquivSections F) x = ↑(limitEquivSections F) y\n[PROOFSTEP]\next j\n[GOAL]\ncase a.a.h\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : UnivLE.{v, u}\nF : J ⥤ Type u\nx y : limit F\nw : ∀ (j : J), limit.π F j x = limit.π F j y\nj : J\n⊢ ↑(↑(limitEquivSections F) x) j = ↑(↑(limitEquivSections F) y) j\n[PROOFSTEP]\nsimp [w j]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nx✝² x✝¹ : (j : J) × F.obj j\nj : J\nx : F.obj j\nj' : J\nx' : F.obj j'\nx✝ : Quot.Rel F { fst := j, snd := x } { fst := j', snd := x' }\nf : { fst := j, snd := x }.fst ⟶ { fst := j', snd := x' }.fst\nhf : { fst := j', snd := x' }.snd = F.map f { fst := j, snd := x }.snd\n⊢ (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j, snd := x } =\n    (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j', snd := x' }\n[PROOFSTEP]\ndsimp at hf \n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nx✝² x✝¹ : (j : J) × F.obj j\nj : J\nx : F.obj j\nj' : J\nx' : F.obj j'\nx✝ : Quot.Rel F { fst := j, snd := x } { fst := j', snd := x' }\nf : { fst := j, snd := x }.fst ⟶ { fst := j', snd := x' }.fst\nhf : x' = F.map f x\n⊢ (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j, snd := x } =\n    (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j', snd := x' }\n[PROOFSTEP]\nrw [hf]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nx✝² x✝¹ : (j : J) × F.obj j\nj : J\nx : F.obj j\nj' : J\nx' : F.obj j'\nx✝ : Quot.Rel F { fst := j, snd := x } { fst := j', snd := x' }\nf : { fst := j, snd := x }.fst ⟶ { fst := j', snd := x' }.fst\nhf : x' = F.map f x\n⊢ (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j, snd := x } =\n    (fun p => NatTrans.app s.ι p.fst p.snd) { fst := j', snd := F.map f x }\n[PROOFSTEP]\nexact (congr_fun (Cocone.w s f) x).symm\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nhm : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m =\n    (fun s =>\n        Quot.lift (fun p => NatTrans.app s.ι p.fst p.snd)\n          (_ :\n            ∀ (x x_1 : (j : J) × F.obj j),\n              Quot.Rel F x x_1 →\n                (fun p => NatTrans.app s.ι p.fst p.snd) x = (fun p => NatTrans.app s.ι p.fst p.snd) x_1))\n      s\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nhm : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : (colimitCocone F).pt\n⊢ m x =\n    (fun s =>\n        Quot.lift (fun p => NatTrans.app s.ι p.fst p.snd)\n          (_ :\n            ∀ (x x_1 : (j : J) × F.obj j),\n              Quot.Rel F x x_1 →\n                (fun p => NatTrans.app s.ι p.fst p.snd) x = (fun p => NatTrans.app s.ι p.fst p.snd) x_1))\n      s x\n[PROOFSTEP]\ninduction' x using Quot.ind with x\n[GOAL]\ncase h.mk\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nhm : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : (j : J) × F.obj j\n⊢ m (Quot.mk (Quot.Rel F) x) =\n    (fun s =>\n        Quot.lift (fun p => NatTrans.app s.ι p.fst p.snd)\n          (_ :\n            ∀ (x x_1 : (j : J) × F.obj j),\n              Quot.Rel F x x_1 →\n                (fun p => NatTrans.app s.ι p.fst p.snd) x = (fun p => NatTrans.app s.ι p.fst p.snd) x_1))\n      s (Quot.mk (Quot.Rel F) x)\n[PROOFSTEP]\nexact congr_fun (hm x.1) x.2\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj : J\nx : F.obj j\n⊢ ↑(colimitEquivQuot F) (colimit.ι F j x) = Quot.mk (Quot.Rel F) { fst := j, snd := x }\n[PROOFSTEP]\napply (colimitEquivQuot F).symm.injective\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj : J\nx : F.obj j\n⊢ ↑(colimitEquivQuot F).symm (↑(colimitEquivQuot F) (colimit.ι F j x)) =\n    ↑(colimitEquivQuot F).symm (Quot.mk (Quot.Rel F) { fst := j, snd := x })\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nx : F.obj j\nx' : F.obj j'\nf : j ⟶ j'\nw : F.map f x = x'\n⊢ colimit.ι F j x = colimit.ι F j' x'\n[PROOFSTEP]\nrw [← w, Colimit.w_apply.{v, u}]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nx : F.obj j\nx' : F.obj j'\nj'' : J\nf : j ⟶ j''\nf' : j' ⟶ j''\nw : F.map f x = F.map f' x'\n⊢ colimit.ι F j x = colimit.ι F j' x'\n[PROOFSTEP]\nrw [← colimit.w _ f, ← colimit.w _ f']\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nx : F.obj j\nx' : F.obj j'\nj'' : J\nf : j ⟶ j''\nf' : j' ⟶ j''\nw : F.map f x = F.map f' x'\n⊢ (F.map f ≫ colimit.ι F j'') x = (F.map f' ≫ colimit.ι F j'') x'\n[PROOFSTEP]\nrw [types_comp_apply, types_comp_apply, w]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nx : F.obj j\nx' : F.obj j'\nw : colimit.ι F j x = colimit.ι F j' x'\n⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := x' }\n[PROOFSTEP]\napply Quot.eq.1\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nj j' : J\nx : F.obj j\nx' : F.obj j'\nw : colimit.ι F j x = colimit.ι F j' x'\n⊢ Quot.mk (Quot.Rel F) { fst := j, snd := x } = Quot.mk (Quot.Rel F) { fst := j', snd := x' }\n[PROOFSTEP]\nsimpa using congr_arg (colimitEquivQuot.{v, u} F) w\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\n⊢ ∃ j y, NatTrans.app t.ι j y = x\n[PROOFSTEP]\nsuffices (fun x : t.pt => ULift.up (∃ j y, t.ι.app j y = x)) = fun _ => ULift.up.{max v u} True\n  by\n  have := congr_fun this x\n  simpa using congr_arg ULift.down this\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\nthis : (fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) = fun x => { down := True }\n⊢ ∃ j y, NatTrans.app t.ι j y = x\n[PROOFSTEP]\nhave := congr_fun this x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\nthis✝ : (fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) = fun x => { down := True }\nthis : { down := ∃ j y, NatTrans.app t.ι j y = x } = { down := True }\n⊢ ∃ j y, NatTrans.app t.ι j y = x\n[PROOFSTEP]\nsimpa using congr_arg ULift.down this\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\n⊢ (fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) = fun x => { down := True }\n[PROOFSTEP]\nrefine' h.hom_ext _\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\n⊢ ∀ (j : J),\n    (NatTrans.app t.ι j ≫ fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) =\n      NatTrans.app t.ι j ≫ fun x => { down := True }\n[PROOFSTEP]\nintro j\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\nj : J\n⊢ (NatTrans.app t.ι j ≫ fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) =\n    NatTrans.app t.ι j ≫ fun x => { down := True }\n[PROOFSTEP]\nfunext y\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\nj : J\ny : F.obj j\n⊢ (NatTrans.app t.ι j ≫ fun x => { down := ∃ j y, NatTrans.app t.ι j y = x }) y =\n    (NatTrans.app t.ι j ≫ fun x => { down := True }) y\n[PROOFSTEP]\nsimp only [Functor.const_obj_obj, types_comp_apply, ULift.up_inj, eq_iff_iff, iff_true]\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nh : IsColimit t\nx : t.pt\nj : J\ny : F.obj j\n⊢ ∃ j_1 y_1, NatTrans.app t.ι j_1 y_1 = NatTrans.app t.ι j y\n[PROOFSTEP]\nexact ⟨j, y, rfl⟩\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx : colimit F\n⊢ ∃ j y, colimit.ι F j y = x\n[PROOFSTEP]\nexact jointly_surjective.{v, u} F (colimit.isColimit F) x\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx y : (j : J) × F.obj j\nx✝ : Quot.Rel F x y\nf : x.fst ⟶ y.fst\nh : y.snd = F.map f x.snd\n⊢ F.map f x.snd = F.map (𝟙 y.fst) y.snd\n[PROOFSTEP]\nrw [← h, FunctorToTypes.map_id_apply]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx y : (j : J) × F.obj j\nx✝ : FilteredColimit.Rel F x y\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\n⊢ EqvGen (Quot.Rel F) x y\n[PROOFSTEP]\nrefine' EqvGen.trans _ ⟨k, F.map f x.2⟩ _ _ _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx y : (j : J) × F.obj j\nx✝ : FilteredColimit.Rel F x y\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\n⊢ EqvGen (Quot.Rel F) x { fst := k, snd := F.map f x.snd }\n[PROOFSTEP]\nexact (EqvGen.rel _ _ ⟨f, rfl⟩)\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nx y : (j : J) × F.obj j\nx✝ : FilteredColimit.Rel F x y\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\n⊢ EqvGen (Quot.Rel F) { fst := k, snd := F.map f x.snd } y\n[PROOFSTEP]\nexact (EqvGen.symm _ _ (EqvGen.rel _ _ ⟨g, h⟩))\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ IsColimit t\n[PROOFSTEP]\napply IsColimit.ofIsoColimit (colimit.isColimit F)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ colimit.cocone F ≅ t\n[PROOFSTEP]\nrefine' Cocones.ext (Equiv.toIso (Equiv.ofBijective _ _)) _\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ (colimit.cocone F).pt → t.pt\n[PROOFSTEP]\nexact colimit.desc F t\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ Function.Bijective (colimit.desc F t)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase refine'_2.left\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ Function.Injective (colimit.desc F t)\n[PROOFSTEP]\nshow Function.Injective _\n[GOAL]\ncase refine'_2.left\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ Function.Injective (colimit.desc F t)\n[PROOFSTEP]\nintro a b h\n[GOAL]\ncase refine'_2.left\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\na b : (colimit.cocone F).pt\nh : colimit.desc F t a = colimit.desc F t b\n⊢ a = b\n[PROOFSTEP]\nrcases jointly_surjective.{v, u} F (colimit.isColimit F) a with ⟨i, xi, rfl⟩\n[GOAL]\ncase refine'_2.left.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\nb : (colimit.cocone F).pt\ni : J\nxi : F.obj i\nh : colimit.desc F t (NatTrans.app (colimit.cocone F).ι i xi) = colimit.desc F t b\n⊢ NatTrans.app (colimit.cocone F).ι i xi = b\n[PROOFSTEP]\nrcases jointly_surjective.{v, u} F (colimit.isColimit F) b with ⟨j, xj, rfl⟩\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh :\n  colimit.desc F t (NatTrans.app (colimit.cocone F).ι i xi) = colimit.desc F t (NatTrans.app (colimit.cocone F).ι j xj)\n⊢ NatTrans.app (colimit.cocone F).ι i xi = NatTrans.app (colimit.cocone F).ι j xj\n[PROOFSTEP]\nreplace h : (colimit.ι F i ≫ colimit.desc F t) xi = (colimit.ι F j ≫ colimit.desc F t) xj := h\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : (colimit.ι F i ≫ colimit.desc F t) xi = (colimit.ι F j ≫ colimit.desc F t) xj\n⊢ NatTrans.app (colimit.cocone F).ι i xi = NatTrans.app (colimit.cocone F).ι j xj\n[PROOFSTEP]\nrw [colimit.ι_desc, colimit.ι_desc] at h \n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : NatTrans.app t.ι i xi = NatTrans.app t.ι j xj\n⊢ NatTrans.app (colimit.cocone F).ι i xi = NatTrans.app (colimit.cocone F).ι j xj\n[PROOFSTEP]\nrcases hinj i j xi xj h with ⟨k, f, g, h'⟩\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : NatTrans.app t.ι i xi = NatTrans.app t.ι j xj\nk : J\nf : i ⟶ k\ng : j ⟶ k\nh' : F.map f xi = F.map g xj\n⊢ NatTrans.app (colimit.cocone F).ι i xi = NatTrans.app (colimit.cocone F).ι j xj\n[PROOFSTEP]\nchange colimit.ι F i xi = colimit.ι F j xj\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : NatTrans.app t.ι i xi = NatTrans.app t.ι j xj\nk : J\nf : i ⟶ k\ng : j ⟶ k\nh' : F.map f xi = F.map g xj\n⊢ colimit.ι F i xi = colimit.ι F j xj\n[PROOFSTEP]\nrw [← colimit.w F f, ← colimit.w F g]\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : NatTrans.app t.ι i xi = NatTrans.app t.ι j xj\nk : J\nf : i ⟶ k\ng : j ⟶ k\nh' : F.map f xi = F.map g xj\n⊢ (F.map f ≫ colimit.ι F k) xi = (F.map g ≫ colimit.ι F k) xj\n[PROOFSTEP]\nchange colimit.ι F k (F.map f xi) = colimit.ι F k (F.map g xj)\n[GOAL]\ncase refine'_2.left.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\nj : J\nxj : F.obj j\nh : NatTrans.app t.ι i xi = NatTrans.app t.ι j xj\nk : J\nf : i ⟶ k\ng : j ⟶ k\nh' : F.map f xi = F.map g xj\n⊢ colimit.ι F k (F.map f xi) = colimit.ι F k (F.map g xj)\n[PROOFSTEP]\nrw [h']\n[GOAL]\ncase refine'_2.right\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ Function.Surjective (colimit.desc F t)\n[PROOFSTEP]\nshow Function.Surjective _\n[GOAL]\ncase refine'_2.right\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ Function.Surjective (colimit.desc F t)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2.right\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\nx : t.pt\n⊢ ∃ a, colimit.desc F t a = x\n[PROOFSTEP]\nrcases hsurj x with ⟨i, xi, rfl⟩\n[GOAL]\ncase refine'_2.right.intro.intro\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\n⊢ ∃ a, colimit.desc F t a = NatTrans.app t.ι i xi\n[PROOFSTEP]\nuse colimit.ι F i xi\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\ni : J\nxi : F.obj i\n⊢ colimit.desc F t (colimit.ι F i xi) = NatTrans.app t.ι i xi\n[PROOFSTEP]\napply Colimit.ι_desc_apply.{v, u}\n[GOAL]\ncase refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\n⊢ ∀ (j : J),\n    NatTrans.app (colimit.cocone F).ι j ≫\n        (Equiv.toIso\n            (Equiv.ofBijective (colimit.desc F t)\n              (_ : Function.Injective (colimit.desc F t) ∧ Function.Surjective (colimit.desc F t)))).hom =\n      NatTrans.app t.ι j\n[PROOFSTEP]\nintro j\n[GOAL]\ncase refine'_3\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ TypeMax\nt : Cocone F\nhsurj : ∀ (x : t.pt), ∃ i xi, x = NatTrans.app t.ι i xi\nhinj :\n  ∀ (i j : J) (xi : F.obj i) (xj : F.obj j),\n    NatTrans.app t.ι i xi = NatTrans.app t.ι j xj → ∃ k f g, F.map f xi = F.map g xj\nj : J\n⊢ NatTrans.app (colimit.cocone F).ι j ≫\n      (Equiv.toIso\n          (Equiv.ofBijective (colimit.desc F t)\n            (_ : Function.Injective (colimit.desc F t) ∧ Function.Surjective (colimit.desc F t)))).hom =\n    NatTrans.app t.ι j\n[PROOFSTEP]\napply colimit.ι_desc\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map (f ≫ fl ≫ n) x.snd = F.map (fl ≫ n) (F.map f x.snd)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map (fl ≫ n) (F.map f x.snd) = F.map (fl ≫ n) (F.map g y.snd)\n[PROOFSTEP]\nrw [h]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map (fl ≫ n) (F.map g y.snd) = F.map ((g ≫ fl) ≫ n) y.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map ((g ≫ fl) ≫ n) y.snd = F.map ((f' ≫ gl) ≫ n) y.snd\n[PROOFSTEP]\nrw [hn]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map ((f' ≫ gl) ≫ n) y.snd = F.map (gl ≫ n) (F.map f' y.snd)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map (gl ≫ n) (F.map f' y.snd) = F.map (gl ≫ n) (F.map g' z.snd)\n[PROOFSTEP]\nrw [h']\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nx y z : (j : J) × F.obj j\nx✝¹ : FilteredColimit.Rel F x y\nx✝ : FilteredColimit.Rel F y z\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\nh : F.map f x.snd = F.map g y.snd\nk' : J\nf' : y.fst ⟶ k'\ng' : z.fst ⟶ k'\nh' : F.map f' y.snd = F.map g' z.snd\nl : J\nfl : k ⟶ l\ngl : k' ⟶ l\nh✝ : True\nm : J\nn : l ⟶ m\nhn : (g ≫ fl) ≫ n = (f' ≫ gl) ≫ n\n⊢ F.map (gl ≫ n) (F.map g' z.snd) = F.map (g' ≫ gl ≫ n) z.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\n⊢ FilteredColimit.Rel F = EqvGen (Quot.Rel F)\n[PROOFSTEP]\next ⟨j, x⟩ ⟨j', y⟩\n[GOAL]\ncase h.mk.h.mk.a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nj : J\nx : F.obj j\nj' : J\ny : F.obj j'\n⊢ FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y } ↔\n    EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y }\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mk.h.mk.a.mp\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nj : J\nx : F.obj j\nj' : J\ny : F.obj j'\n⊢ FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y } →\n    EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y }\n[PROOFSTEP]\napply eqvGen_quot_rel_of_rel\n[GOAL]\ncase h.mk.h.mk.a.mpr\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nj : J\nx : F.obj j\nj' : J\ny : F.obj j'\n⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y } →\n    FilteredColimit.Rel F { fst := j, snd := x } { fst := j', snd := y }\n[PROOFSTEP]\nrw [← (FilteredColimit.rel_equiv F).eqvGen_iff]\n[GOAL]\ncase h.mk.h.mk.a.mpr\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nj : J\nx : F.obj j\nj' : J\ny : F.obj j'\n⊢ EqvGen (Quot.Rel F) { fst := j, snd := x } { fst := j', snd := y } →\n    EqvGen (FilteredColimit.Rel F) { fst := j, snd := x } { fst := j', snd := y }\n[PROOFSTEP]\nexact EqvGen.mono (rel_of_quot_rel F)\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\ni j : J\nxi : F.obj i\nxj : F.obj j\n⊢ NatTrans.app (colimitCocone F).ι i xi = NatTrans.app (colimitCocone F).ι j xj ↔\n    FilteredColimit.Rel F { fst := i, snd := xi } { fst := j, snd := xj }\n[PROOFSTEP]\nchange Quot.mk _ _ = Quot.mk _ _ ↔ _\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\ni j : J\nxi : F.obj i\nxj : F.obj j\n⊢ Quot.mk (Quot.Rel F) { fst := i, snd := xi } = Quot.mk (Quot.Rel F) { fst := j, snd := xj } ↔\n    FilteredColimit.Rel F { fst := i, snd := xi } { fst := j, snd := xj }\n[PROOFSTEP]\nrw [Quot.eq, FilteredColimit.rel_eq_eqvGen_quot_rel]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nt : Cocone F\nht : IsColimit t\ni j : J\nxi : F.obj i\nxj : F.obj j\n⊢ NatTrans.app t.ι i xi = NatTrans.app t.ι j xj ↔ ∃ k f g, F.map f xi = F.map g xj\n[PROOFSTEP]\nlet t' := colimitCocone.{v, u} F\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nt : Cocone F\nht : IsColimit t\ni j : J\nxi : F.obj i\nxj : F.obj j\nt' : Cocone F := colimitCocone F\n⊢ NatTrans.app t.ι i xi = NatTrans.app t.ι j xj ↔ ∃ k f g, F.map f xi = F.map g xj\n[PROOFSTEP]\nlet e : t' ≅ t := IsColimit.uniqueUpToIso (colimitCoconeIsColimit F) ht\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nt : Cocone F\nht : IsColimit t\ni j : J\nxi : F.obj i\nxj : F.obj j\nt' : Cocone F := colimitCocone F\ne : t' ≅ t := IsColimit.uniqueUpToIso (colimitCoconeIsColimit F) ht\n⊢ NatTrans.app t.ι i xi = NatTrans.app t.ι j xj ↔ ∃ k f g, F.map f xi = F.map g xj\n[PROOFSTEP]\nlet e' : t'.pt ≅ t.pt := (Cocones.forget _).mapIso e\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nt : Cocone F\nht : IsColimit t\ni j : J\nxi : F.obj i\nxj : F.obj j\nt' : Cocone F := colimitCocone F\ne : t' ≅ t := IsColimit.uniqueUpToIso (colimitCoconeIsColimit F) ht\ne' : t'.pt ≅ t.pt := (Cocones.forget F).mapIso e\n⊢ NatTrans.app t.ι i xi = NatTrans.app t.ι j xj ↔ ∃ k f g, F.map f xi = F.map g xj\n[PROOFSTEP]\nrefine' Iff.trans _ (colimit_eq_iff_aux.{v, u} F)\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ TypeMax\ninst✝ : IsFilteredOrEmpty J\nt : Cocone F\nht : IsColimit t\ni j : J\nxi : F.obj i\nxj : F.obj j\nt' : Cocone F := colimitCocone F\ne : t' ≅ t := IsColimit.uniqueUpToIso (colimitCoconeIsColimit F) ht\ne' : t'.pt ≅ t.pt := (Cocones.forget F).mapIso e\n⊢ NatTrans.app t.ι i xi = NatTrans.app t.ι j xj ↔\n    NatTrans.app (colimitCocone F).ι i xi = NatTrans.app (colimitCocone F).ι j xj\n[PROOFSTEP]\nexact @Equiv.apply_eq_iff_eq _ _ e'.toEquiv ((colimitCocone.{v, u} F).ι.app i xi) ((colimitCocone.{v, u} F).ι.app j xj)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf : α ⟶ β\nF' : MonoFactorisation f\n⊢ lift F' ≫ F'.m = ι f\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf : α ⟶ β\nF' : MonoFactorisation f\nx : Image f\n⊢ (lift F' ≫ F'.m) x = ι f x\n[PROOFSTEP]\nchange (F'.e ≫ F'.m) _ = _\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf : α ⟶ β\nF' : MonoFactorisation f\nx : Image f\n⊢ (F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => f x_1 = ↑x) (_ : ↑x ∈ Set.range f)) = ι f x\n[PROOFSTEP]\nrw [F'.fac, (Classical.indefiniteDescription _ x.2).2]\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf : α ⟶ β\nF' : MonoFactorisation f\nx : Image f\n⊢ ↑x = ι f x\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf : α ⟶ β\n⊢ ∀ {X Y : Type u} (f : X ⟶ Y), HasImage f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf✝ : α ⟶ β\nf g : Arrow (Type u)\nst : f ⟶ g\nx : (monoFactorisation f.hom).I\n⊢ Comma.hom g (CommaMorphism.left st (Classical.choose (_ : ↑x ∈ Set.range f.hom))) = CommaMorphism.right st ↑x\n[PROOFSTEP]\nhave p := st.w\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf✝ : α ⟶ β\nf g : Arrow (Type u)\nst : f ⟶ g\nx : (monoFactorisation f.hom).I\np : (𝟭 (Type u)).map st.left ≫ g.hom = f.hom ≫ (𝟭 (Type u)).map st.right\n⊢ Comma.hom g (CommaMorphism.left st (Classical.choose (_ : ↑x ∈ Set.range f.hom))) = CommaMorphism.right st ↑x\n[PROOFSTEP]\nreplace p := congr_fun p (Classical.choose x.2)\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf✝ : α ⟶ β\nf g : Arrow (Type u)\nst : f ⟶ g\nx : (monoFactorisation f.hom).I\np :\n  ((𝟭 (Type u)).map st.left ≫ g.hom) (Classical.choose (_ : ↑x ∈ Set.range f.hom)) =\n    (f.hom ≫ (𝟭 (Type u)).map st.right) (Classical.choose (_ : ↑x ∈ Set.range f.hom))\n⊢ Comma.hom g (CommaMorphism.left st (Classical.choose (_ : ↑x ∈ Set.range f.hom))) = CommaMorphism.right st ↑x\n[PROOFSTEP]\nsimp only [Functor.id_obj, Functor.id_map, types_comp_apply] at p \n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nα β : Type u\nf✝ : α ⟶ β\nf g : Arrow (Type u)\nst : f ⟶ g\nx : (monoFactorisation f.hom).I\np :\n  Comma.hom g (CommaMorphism.left st (Classical.choose (_ : ∃ x_1, (fun x_2 => Comma.hom f x_2 = ↑x) x_1))) =\n    CommaMorphism.right st (Comma.hom f (Classical.choose (_ : ∃ x_1, (fun x_2 => Comma.hom f x_2 = ↑x) x_1)))\n⊢ Comma.hom g (CommaMorphism.left st (Classical.choose (_ : ↑x ∈ Set.range f.hom))) = CommaMorphism.right st ↑x\n[PROOFSTEP]\nerw [p, Classical.choose_spec x.2]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Types", "llama_tokens": 17897, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.596433160611502, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.28890034460258746}}
{"text": "[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nx✝¹ x✝ : HomogeneousIdeal 𝒜\nx : Submodule A A\nhx : Ideal.IsHomogeneous 𝒜 x\ny : Submodule A A\nhy : Ideal.IsHomogeneous 𝒜 y\nh : x = y\n⊢ { toSubmodule := x, is_homogeneous' := hx } = { toSubmodule := y, is_homogeneous' := hy }\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₁ : Homogeneous 𝒜 x\nhx₂ : x ∈ I\nj : ι\n⊢ ↑(GradedRing.proj 𝒜 j) (r * x) ∈ I\n[PROOFSTEP]\nclassical\nrw [← DirectSum.sum_support_decompose 𝒜 r, Finset.sum_mul, map_sum]\napply Ideal.sum_mem\nintro k _\nobtain ⟨i, hi⟩ := hx₁\nhave mem₁ : (DirectSum.decompose 𝒜 r k : A) * x ∈ 𝒜 (k + i) := GradedMul.mul_mem (SetLike.coe_mem _) hi\nerw [GradedRing.proj_apply, DirectSum.decompose_of_mem 𝒜 mem₁, coe_of_apply]\nsplit_ifs\n· exact I.mul_mem_left _ hx₂\n· exact I.zero_mem\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₁ : Homogeneous 𝒜 x\nhx₂ : x ∈ I\nj : ι\n⊢ ↑(GradedRing.proj 𝒜 j) (r * x) ∈ I\n[PROOFSTEP]\nrw [← DirectSum.sum_support_decompose 𝒜 r, Finset.sum_mul, map_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₁ : Homogeneous 𝒜 x\nhx₂ : x ∈ I\nj : ι\n⊢ ∑ x_1 in DFinsupp.support (↑(decompose 𝒜) r), ↑(GradedRing.proj 𝒜 j) (↑(↑(↑(decompose 𝒜) r) x_1) * x) ∈ I\n[PROOFSTEP]\napply Ideal.sum_mem\n[GOAL]\ncase a\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₁ : Homogeneous 𝒜 x\nhx₂ : x ∈ I\nj : ι\n⊢ ∀ (c : ι), c ∈ DFinsupp.support (↑(decompose 𝒜) r) → ↑(GradedRing.proj 𝒜 j) (↑(↑(↑(decompose 𝒜) r) c) * x) ∈ I\n[PROOFSTEP]\nintro k _\n[GOAL]\ncase a\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₁ : Homogeneous 𝒜 x\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\n⊢ ↑(GradedRing.proj 𝒜 j) (↑(↑(↑(decompose 𝒜) r) k) * x) ∈ I\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := hx₁\n[GOAL]\ncase a.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\ni : ι\nhi : x ∈ 𝒜 i\n⊢ ↑(GradedRing.proj 𝒜 j) (↑(↑(↑(decompose 𝒜) r) k) * x) ∈ I\n[PROOFSTEP]\nhave mem₁ : (DirectSum.decompose 𝒜 r k : A) * x ∈ 𝒜 (k + i) := GradedMul.mul_mem (SetLike.coe_mem _) hi\n[GOAL]\ncase a.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\ni : ι\nhi : x ∈ 𝒜 i\nmem₁ : ↑(↑(↑(decompose 𝒜) r) k) * x ∈ 𝒜 (k + i)\n⊢ ↑(GradedRing.proj 𝒜 j) (↑(↑(↑(decompose 𝒜) r) k) * x) ∈ I\n[PROOFSTEP]\nerw [GradedRing.proj_apply, DirectSum.decompose_of_mem 𝒜 mem₁, coe_of_apply]\n[GOAL]\ncase a.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\ni : ι\nhi : x ∈ 𝒜 i\nmem₁ : ↑(↑(↑(decompose 𝒜) r) k) * x ∈ 𝒜 (k + i)\n⊢ ↑(if k + i = j then { val := ↑(↑(↑(decompose 𝒜) r) k) * x, property := mem₁ } else 0) ∈ I\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\ni : ι\nhi : x ∈ 𝒜 i\nmem₁ : ↑(↑(↑(decompose 𝒜) r) k) * x ∈ 𝒜 (k + i)\nh✝ : k + i = j\n⊢ ↑{ val := ↑(↑(↑(decompose 𝒜) r) k) * x, property := mem₁ } ∈ I\n[PROOFSTEP]\nexact I.mul_mem_left _ hx₂\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ I : Ideal A\nr x : A\nhx₂ : x ∈ I\nj k : ι\na✝ : k ∈ DFinsupp.support (↑(decompose 𝒜) r)\ni : ι\nhi : x ∈ 𝒜 i\nmem₁ : ↑(↑(↑(decompose 𝒜) r) k) * x ∈ 𝒜 (k + i)\nh✝ : ¬k + i = j\n⊢ ↑0 ∈ I\n[PROOFSTEP]\nexact I.zero_mem\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns : Set A\nh : ∀ (x : A), x ∈ s → Homogeneous 𝒜 x\n⊢ IsHomogeneous 𝒜 (span s)\n[PROOFSTEP]\nrintro i r hr\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns : Set A\nh : ∀ (x : A), x ∈ s → Homogeneous 𝒜 x\ni : ι\nr : A\nhr : r ∈ span s\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ span s\n[PROOFSTEP]\nrw [Ideal.span, Finsupp.span_eq_range_total] at hr \n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns : Set A\nh : ∀ (x : A), x ∈ s → Homogeneous 𝒜 x\ni : ι\nr : A\nhr : r ∈ LinearMap.range (Finsupp.total (↑s) A A Subtype.val)\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ span s\n[PROOFSTEP]\nrw [LinearMap.mem_range] at hr \n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns : Set A\nh : ∀ (x : A), x ∈ s → Homogeneous 𝒜 x\ni : ι\nr : A\nhr : ∃ y, ↑(Finsupp.total (↑s) A A Subtype.val) y = r\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ span s\n[PROOFSTEP]\nobtain ⟨s, rfl⟩ := hr\n[GOAL]\ncase intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\n⊢ ↑(↑(↑(decompose 𝒜) (↑(Finsupp.total (↑s✝) A A Subtype.val) s)) i) ∈ span s✝\n[PROOFSTEP]\nrw [Finsupp.total_apply, Finsupp.sum, decompose_sum, DFinsupp.finset_sum_apply, AddSubmonoidClass.coe_finset_sum]\n[GOAL]\ncase intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\n⊢ ∑ i_1 in s.support, ↑(↑(↑(decompose 𝒜) (↑s i_1 • ↑i_1)) i) ∈ span s✝\n[PROOFSTEP]\nrefine' Ideal.sum_mem _ _\n[GOAL]\ncase intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\n⊢ ∀ (c : ↑s✝), c ∈ s.support → ↑(↑(↑(decompose 𝒜) (↑s c • ↑c)) i) ∈ span s✝\n[PROOFSTEP]\nrintro z hz1\n[GOAL]\ncase intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\nz : ↑s✝\nhz1 : z ∈ s.support\n⊢ ↑(↑(↑(decompose 𝒜) (↑s z • ↑z)) i) ∈ span s✝\n[PROOFSTEP]\nrw [smul_eq_mul]\n[GOAL]\ncase intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\nz : ↑s✝\nhz1 : z ∈ s.support\n⊢ ↑(↑(↑(decompose 𝒜) (↑s z * ↑z)) i) ∈ span s✝\n[PROOFSTEP]\nrefine' Ideal.mul_homogeneous_element_mem_of_mem 𝒜 (s z) z _ _ i\n[GOAL]\ncase intro.refine'_1\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\nz : ↑s✝\nhz1 : z ∈ s.support\n⊢ Homogeneous 𝒜 ↑z\n[PROOFSTEP]\nrcases z with ⟨z, hz2⟩\n[GOAL]\ncase intro.refine'_1.mk\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\nz : A\nhz2 : z ∈ s✝\nhz1 : { val := z, property := hz2 } ∈ s.support\n⊢ Homogeneous 𝒜 ↑{ val := z, property := hz2 }\n[PROOFSTEP]\napply h _ hz2\n[GOAL]\ncase intro.refine'_2\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns✝ : Set A\nh : ∀ (x : A), x ∈ s✝ → Homogeneous 𝒜 x\ni : ι\ns : ↑s✝ →₀ A\nz : ↑s✝\nhz1 : z ∈ s.support\n⊢ ↑z ∈ span s✝\n[PROOFSTEP]\nexact Ideal.subset_span z.2\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\n⊢ HomogeneousIdeal.toIdeal (homogeneousCore 𝒜 I) = I\n[PROOFSTEP]\napply le_antisymm (I.homogeneousCore'_le 𝒜) _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\n⊢ I ≤ homogeneousCore' 𝒜 I\n[PROOFSTEP]\nintro x hx\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\nx : A\nhx : x ∈ I\n⊢ x ∈ homogeneousCore' 𝒜 I\n[PROOFSTEP]\nclassical\nrw [← DirectSum.sum_support_decompose 𝒜 x]\nexact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, homogeneous_coe _⟩, h _ hx, rfl⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\nx : A\nhx : x ∈ I\n⊢ x ∈ homogeneousCore' 𝒜 I\n[PROOFSTEP]\nrw [← DirectSum.sum_support_decompose 𝒜 x]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\nx : A\nhx : x ∈ I\n⊢ ∑ i in DFinsupp.support (↑(decompose 𝒜) x), ↑(↑(↑(decompose 𝒜) x) i) ∈ homogeneousCore' 𝒜 I\n[PROOFSTEP]\nexact Ideal.sum_mem _ fun j _ => Ideal.subset_span ⟨⟨_, homogeneous_coe _⟩, h _ hx, rfl⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ : Ideal A\nI : HomogeneousIdeal 𝒜\n⊢ Ideal.homogeneousCore 𝒜 (toIdeal I) = I\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI✝ : Ideal A\nI : HomogeneousIdeal 𝒜\n⊢ toIdeal (Ideal.homogeneousCore 𝒜 (toIdeal I)) = toIdeal I\n[PROOFSTEP]\nconvert Ideal.IsHomogeneous.toIdeal_homogeneousCore_eq_self I.isHomogeneous\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ IsHomogeneous 𝒜 I ↔ ∃ S, I = span (Subtype.val '' S)\n[PROOFSTEP]\nrw [Ideal.IsHomogeneous.iff_eq, eq_comm]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : SetLike σ A\ninst✝³ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝² : DecidableEq ι\ninst✝¹ : AddMonoid ι\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ I = HomogeneousIdeal.toIdeal (homogeneousCore 𝒜 I) ↔ ∃ S, I = span (Subtype.val '' S)\n[PROOFSTEP]\nexact ((Set.image_preimage.compose (Submodule.gi _ _).gc).exists_eq_l _).symm\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : r ∈ ⊥\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ ⊥\n[PROOFSTEP]\nsimp only [Ideal.mem_bot] at hr \n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : r = 0\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ ⊥\n[PROOFSTEP]\nrw [hr, decompose_zero, zero_apply]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : r = 0\n⊢ ↑0 ∈ ⊥\n[PROOFSTEP]\napply Ideal.zero_mem\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nx✝ : r ∈ ⊤\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ ⊤\n[PROOFSTEP]\nsimp only [Submodule.mem_top]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI J : Ideal A\nHI : IsHomogeneous 𝒜 I\nHJ : IsHomogeneous 𝒜 J\n⊢ IsHomogeneous 𝒜 (I ⊔ J)\n[PROOFSTEP]\nrw [iff_exists] at HI HJ ⊢\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI J : Ideal A\nHI : ∃ S, I = span (Subtype.val '' S)\nHJ : ∃ S, J = span (Subtype.val '' S)\n⊢ ∃ S, I ⊔ J = span (Subtype.val '' S)\n[PROOFSTEP]\nobtain ⟨⟨s₁, rfl⟩, ⟨s₂, rfl⟩⟩ := HI, HJ\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ns₁ s₂ : Set { x // x ∈ homogeneousSubmonoid 𝒜 }\n⊢ ∃ S, span (Subtype.val '' s₁) ⊔ span (Subtype.val '' s₂) = span (Subtype.val '' S)\n[PROOFSTEP]\nrefine' ⟨s₁ ∪ s₂, _⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ns₁ s₂ : Set { x // x ∈ homogeneousSubmonoid 𝒜 }\n⊢ span (Subtype.val '' s₁) ⊔ span (Subtype.val '' s₂) = span (Subtype.val '' (s₁ ∪ s₂))\n[PROOFSTEP]\nrw [Set.image_union]\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ns₁ s₂ : Set { x // x ∈ homogeneousSubmonoid 𝒜 }\n⊢ span (Subtype.val '' s₁) ⊔ span (Subtype.val '' s₂) = span (Subtype.val '' s₁ ∪ Subtype.val '' s₂)\n[PROOFSTEP]\nexact (Submodule.span_union _ _).symm\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\nh : ∀ (i : κ), IsHomogeneous 𝒜 (f i)\n⊢ IsHomogeneous 𝒜 (⨆ (i : κ), f i)\n[PROOFSTEP]\nsimp_rw [iff_exists] at h ⊢\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\nh : ∀ (i : κ), ∃ S, f i = span (Subtype.val '' S)\n⊢ ∃ S, ⨆ (i : κ), f i = span (Subtype.val '' S)\n[PROOFSTEP]\nchoose s hs using h\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\ns : κ → Set { x // x ∈ homogeneousSubmonoid 𝒜 }\nhs : ∀ (i : κ), f i = span (Subtype.val '' s i)\n⊢ ∃ S, ⨆ (i : κ), f i = span (Subtype.val '' S)\n[PROOFSTEP]\nrefine' ⟨⋃ i, s i, _⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\ns : κ → Set { x // x ∈ homogeneousSubmonoid 𝒜 }\nhs : ∀ (i : κ), f i = span (Subtype.val '' s i)\n⊢ ⨆ (i : κ), f i = span (Subtype.val '' ⋃ (i : κ), s i)\n[PROOFSTEP]\nsimp_rw [Set.image_iUnion, Ideal.span_iUnion]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\ns : κ → Set { x // x ∈ homogeneousSubmonoid 𝒜 }\nhs : ∀ (i : κ), f i = span (Subtype.val '' s i)\n⊢ ⨆ (i : κ), f i = ⨆ (i : κ), span (Subtype.val '' s i)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\ns : κ → Set { x // x ∈ homogeneousSubmonoid 𝒜 }\nhs : ∀ (i : κ), f i = span (Subtype.val '' s i)\n⊢ (fun i => f i) = fun i => span (Subtype.val '' s i)\n[PROOFSTEP]\nexact funext hs\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\nh : ∀ (i : κ), IsHomogeneous 𝒜 (f i)\n⊢ IsHomogeneous 𝒜 (⨅ (i : κ), f i)\n[PROOFSTEP]\nintro i x hx\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\nh : ∀ (i : κ), IsHomogeneous 𝒜 (f i)\ni : ι\nx : A\nhx : x ∈ ⨅ (i : κ), f i\n⊢ ↑(↑(↑(decompose 𝒜) x) i) ∈ ⨅ (i : κ), f i\n[PROOFSTEP]\nsimp only [Ideal.mem_iInf] at hx ⊢\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nf : κ → Ideal A\nh : ∀ (i : κ), IsHomogeneous 𝒜 (f i)\ni : ι\nx : A\nhx : ∀ (i : κ), x ∈ f i\n⊢ ∀ (i_1 : κ), ↑(↑(↑(decompose 𝒜) x) i) ∈ f i_1\n[PROOFSTEP]\nexact fun j => h _ _ (hx j)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nℐ : Set (Ideal A)\nh : ∀ (I : Ideal A), I ∈ ℐ → IsHomogeneous 𝒜 I\n⊢ IsHomogeneous 𝒜 (SupSet.sSup ℐ)\n[PROOFSTEP]\nrw [sSup_eq_iSup]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nℐ : Set (Ideal A)\nh : ∀ (I : Ideal A), I ∈ ℐ → IsHomogeneous 𝒜 I\n⊢ IsHomogeneous 𝒜 (⨆ (a : Ideal A) (_ : a ∈ ℐ), a)\n[PROOFSTEP]\nexact iSup₂ h\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nℐ : Set (Ideal A)\nh : ∀ (I : Ideal A), I ∈ ℐ → IsHomogeneous 𝒜 I\n⊢ IsHomogeneous 𝒜 (InfSet.sInf ℐ)\n[PROOFSTEP]\nrw [sInf_eq_iInf]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nℐ : Set (Ideal A)\nh : ∀ (I : Ideal A), I ∈ ℐ → IsHomogeneous 𝒜 I\n⊢ IsHomogeneous 𝒜 (⨅ (a : Ideal A) (_ : a ∈ ℐ), a)\n[PROOFSTEP]\nexact iInf₂ h\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\ns : κ → HomogeneousIdeal 𝒜\n⊢ toIdeal (⨆ (i : κ), s i) = ⨆ (i : κ), toIdeal (s i)\n[PROOFSTEP]\nrw [iSup, toIdeal_sSup, iSup_range]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\ns : κ → HomogeneousIdeal 𝒜\n⊢ toIdeal (⨅ (i : κ), s i) = ⨅ (i : κ), toIdeal (s i)\n[PROOFSTEP]\nrw [iInf, toIdeal_sInf, iInf_range]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nκ' : κ → Sort u_6\ns : (i : κ) → κ' i → HomogeneousIdeal 𝒜\n⊢ toIdeal (⨆ (i : κ) (j : κ' i), s i j) = ⨆ (i : κ) (j : κ' i), toIdeal (s i j)\n[PROOFSTEP]\nsimp_rw [toIdeal_iSup]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nκ : Sort u_5\nκ' : κ → Sort u_6\ns : (i : κ) → κ' i → HomogeneousIdeal 𝒜\n⊢ toIdeal (⨅ (i : κ) (j : κ' i), s i j) = ⨅ (i : κ) (j : κ' i), toIdeal (s i j)\n[PROOFSTEP]\nsimp_rw [toIdeal_iInf]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : CommSemiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI✝ I J : Ideal A\nHI : IsHomogeneous 𝒜 I\nHJ : IsHomogeneous 𝒜 J\n⊢ IsHomogeneous 𝒜 (I * J)\n[PROOFSTEP]\nrw [Ideal.IsHomogeneous.iff_exists] at HI HJ ⊢\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : CommSemiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI✝ I J : Ideal A\nHI : ∃ S, I = span (Subtype.val '' S)\nHJ : ∃ S, J = span (Subtype.val '' S)\n⊢ ∃ S, I * J = span (Subtype.val '' S)\n[PROOFSTEP]\nobtain ⟨⟨s₁, rfl⟩, ⟨s₂, rfl⟩⟩ := HI, HJ\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : CommSemiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns₁ s₂ : Set { x // x ∈ homogeneousSubmonoid 𝒜 }\n⊢ ∃ S, span (Subtype.val '' s₁) * span (Subtype.val '' s₂) = span (Subtype.val '' S)\n[PROOFSTEP]\nrw [Ideal.span_mul_span']\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : CommSemiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ns₁ s₂ : Set { x // x ∈ homogeneousSubmonoid 𝒜 }\n⊢ ∃ S, span (Subtype.val '' s₁ * Subtype.val '' s₂) = span (Subtype.val '' S)\n[PROOFSTEP]\nexact ⟨s₁ * s₂, congr_arg _ <| (Set.image_mul (homogeneousSubmonoid 𝒜).subtype).symm⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ homogeneousCore' 𝒜 I = sSup {J | IsHomogeneous 𝒜 J ∧ J ≤ I}\n[PROOFSTEP]\nrefine' (IsLUB.sSup_eq _).symm\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ IsLUB {J | IsHomogeneous 𝒜 J ∧ J ≤ I} (homogeneousCore' 𝒜 I)\n[PROOFSTEP]\napply IsGreatest.isLUB\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ IsGreatest {J | IsHomogeneous 𝒜 J ∧ J ≤ I} (homogeneousCore' 𝒜 I)\n[PROOFSTEP]\nhave coe_mono : Monotone (toIdeal : HomogeneousIdeal 𝒜 → Ideal A) := fun x y => id\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\n⊢ IsGreatest {J | IsHomogeneous 𝒜 J ∧ J ≤ I} (homogeneousCore' 𝒜 I)\n[PROOFSTEP]\nconvert coe_mono.map_isGreatest (Ideal.homogeneousCore.gc 𝒜).isGreatest_u using 1\n[GOAL]\ncase h.e'_3\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\n⊢ {J | IsHomogeneous 𝒜 J ∧ J ≤ I} = toIdeal '' {a | toIdeal a ≤ I}\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_3.h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\nx : Ideal A\n⊢ x ∈ {J | IsHomogeneous 𝒜 J ∧ J ≤ I} ↔ x ∈ toIdeal '' {a | toIdeal a ≤ I}\n[PROOFSTEP]\nrw [mem_image, mem_setOf_eq]\n[GOAL]\ncase h.e'_3.h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\nx : Ideal A\n⊢ IsHomogeneous 𝒜 x ∧ x ≤ I ↔ ∃ x_1, x_1 ∈ {a | toIdeal a ≤ I} ∧ toIdeal x_1 = x\n[PROOFSTEP]\nrefine' ⟨fun hI => ⟨⟨x, hI.1⟩, ⟨hI.2, rfl⟩⟩, _⟩\n[GOAL]\ncase h.e'_3.h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\nx : Ideal A\n⊢ (∃ x_1, x_1 ∈ {a | toIdeal a ≤ I} ∧ toIdeal x_1 = x) → IsHomogeneous 𝒜 x ∧ x ≤ I\n[PROOFSTEP]\nrintro ⟨x, ⟨hx, rfl⟩⟩\n[GOAL]\ncase h.e'_3.h.intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ncoe_mono : Monotone toIdeal\nx : HomogeneousIdeal 𝒜\nhx : x ∈ {a | toIdeal a ≤ I}\n⊢ IsHomogeneous 𝒜 (toIdeal x) ∧ toIdeal x ≤ I\n[PROOFSTEP]\nexact ⟨x.isHomogeneous, hx⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ IsHomogeneous 𝒜 (span {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r})\n[PROOFSTEP]\nrefine' Ideal.homogeneous_span _ _ fun x hx => _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nx : A\nhx : x ∈ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r}\n⊢ Homogeneous 𝒜 x\n[PROOFSTEP]\nobtain ⟨i, x, rfl⟩ := hx\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ni : ι\nx : { x // x ∈ I }\n⊢ Homogeneous 𝒜 ↑(↑(↑(decompose 𝒜) ↑x) i)\n[PROOFSTEP]\napply SetLike.homogeneous_coe\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ I ≤ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\nintro r hr\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\n⊢ r ∈ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\nclassical\nrw [← DirectSum.sum_support_decompose 𝒜 r]\nrefine' Ideal.sum_mem _ _\nintro j _\napply Ideal.subset_span\nuse j\nuse⟨r, hr⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\n⊢ r ∈ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\nrw [← DirectSum.sum_support_decompose 𝒜 r]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\n⊢ ∑ i in DFinsupp.support (↑(decompose 𝒜) r), ↑(↑(↑(decompose 𝒜) r) i) ∈ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\nrefine' Ideal.sum_mem _ _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\n⊢ ∀ (c : ι), c ∈ DFinsupp.support (↑(decompose 𝒜) r) → ↑(↑(↑(decompose 𝒜) r) c) ∈ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\nintro j _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\nj : ι\na✝ : j ∈ DFinsupp.support (↑(decompose 𝒜) r)\n⊢ ↑(↑(↑(decompose 𝒜) r) j) ∈ toIdeal (homogeneousHull 𝒜 I)\n[PROOFSTEP]\napply Ideal.subset_span\n[GOAL]\ncase a\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\nj : ι\na✝ : j ∈ DFinsupp.support (↑(decompose 𝒜) r)\n⊢ ↑(↑(↑(decompose 𝒜) r) j) ∈ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r}\n[PROOFSTEP]\nuse j\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nr : A\nhr : r ∈ I\nj : ι\na✝ : j ∈ DFinsupp.support (↑(decompose 𝒜) r)\n⊢ ∃ x, ↑(↑(↑(decompose 𝒜) ↑x) j) = ↑(↑(↑(decompose 𝒜) r) j)\n[PROOFSTEP]\nuse⟨r, hr⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI✝ I J : Ideal A\nI_le_J : I ≤ J\n⊢ homogeneousHull 𝒜 I ≤ homogeneousHull 𝒜 J\n[PROOFSTEP]\napply Ideal.span_mono\n[GOAL]\ncase a\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI✝ I J : Ideal A\nI_le_J : I ≤ J\n⊢ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} ⊆ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r}\n[PROOFSTEP]\nrintro r ⟨hr1, ⟨x, hx⟩, rfl⟩\n[GOAL]\ncase a.intro.intro.mk\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI✝ I J : Ideal A\nI_le_J : I ≤ J\nhr1 : ι\nx : A\nhx : x ∈ I\n⊢ ↑(↑(↑(decompose 𝒜) ↑{ val := x, property := hx }) hr1) ∈ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r}\n[PROOFSTEP]\nrefine' ⟨hr1, ⟨⟨x, I_le_J hx⟩, rfl⟩⟩\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\n⊢ toIdeal (homogeneousHull 𝒜 I) = I\n[PROOFSTEP]\napply le_antisymm _ (Ideal.le_toIdeal_homogeneousHull _ _)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\n⊢ toIdeal (homogeneousHull 𝒜 I) ≤ I\n[PROOFSTEP]\napply Ideal.span_le.2\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\n⊢ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} ⊆ ↑I\n[PROOFSTEP]\nrintro _ ⟨i, x, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nh : IsHomogeneous 𝒜 I\ni : ι\nx : { x // x ∈ I }\n⊢ ↑(↑(↑(decompose 𝒜) ↑x) i) ∈ ↑I\n[PROOFSTEP]\nexact h _ x.prop\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ toIdeal (homogeneousHull 𝒜 I) = ⨆ (i : ι), span (↑(GradedRing.proj 𝒜 i) '' ↑I)\n[PROOFSTEP]\nrw [← Ideal.span_iUnion]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ toIdeal (homogeneousHull 𝒜 I) = span (⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I)\n[PROOFSTEP]\napply congr_arg Ideal.span _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} = ⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\nx✝ : A\n⊢ x✝ ∈ {r | ∃ i x, ↑(↑(↑(decompose 𝒜) ↑x) i) = r} ↔ x✝ ∈ ⋃ (i : ι), ↑(GradedRing.proj 𝒜 i) '' ↑I\n[PROOFSTEP]\nsimp only [Set.mem_iUnion, Set.mem_image, mem_setOf_eq, GradedRing.proj_apply, SetLike.exists, exists_prop,\n  Subtype.coe_mk, SetLike.mem_coe]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ni : ι\n⊢ ∀ (x : A), x ∈ ↑(GradedRing.proj 𝒜 i) '' ↑I → Homogeneous 𝒜 x\n[PROOFSTEP]\nrintro _ ⟨x, -, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\ni : ι\nx : A\n⊢ Homogeneous 𝒜 (↑(GradedRing.proj 𝒜 i) x)\n[PROOFSTEP]\napply SetLike.homogeneous_coe\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ homogeneousHull 𝒜 I =\n    ⨆ (i : ι),\n      { toSubmodule := span (↑(GradedRing.proj 𝒜 i) '' ↑I),\n        is_homogeneous' := (_ : IsHomogeneous 𝒜 (span (↑(GradedRing.proj 𝒜 i) '' ↑I))) }\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ toIdeal (homogeneousHull 𝒜 I) =\n    toIdeal\n      (⨆ (i : ι),\n        { toSubmodule := span (↑(GradedRing.proj 𝒜 i) '' ↑I),\n          is_homogeneous' := (_ : IsHomogeneous 𝒜 (span (↑(GradedRing.proj 𝒜 i) '' ↑I))) })\n[PROOFSTEP]\nrw [Ideal.toIdeal_homogeneousHull_eq_iSup, toIdeal_iSup]\n[GOAL]\ncase h\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : AddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\nI : Ideal A\n⊢ ⨆ (i : ι), span (↑(GradedRing.proj 𝒜 i) '' ↑I) =\n    ⨆ (i : ι),\n      toIdeal\n        { toSubmodule := span (↑(GradedRing.proj 𝒜 i) '' ↑I),\n          is_homogeneous' := (_ : IsHomogeneous 𝒜 (span (↑(GradedRing.proj 𝒜 i) '' ↑I))) }\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : CanonicallyOrderedAddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : ↑(↑(↑(decompose 𝒜) r) 0) = 0\n⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ RingHom.ker (projZeroRingHom 𝒜)\n[PROOFSTEP]\nchange (decompose 𝒜 (decompose 𝒜 r _ : A) 0 : A) = 0\n[GOAL]\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : CanonicallyOrderedAddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : ↑(↑(↑(decompose 𝒜) r) 0) = 0\n⊢ ↑(↑(↑(decompose 𝒜) ↑(↑(↑(decompose 𝒜) r) i)) 0) = 0\n[PROOFSTEP]\nby_cases h : i = 0\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : CanonicallyOrderedAddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : ↑(↑(↑(decompose 𝒜) r) 0) = 0\nh : i = 0\n⊢ ↑(↑(↑(decompose 𝒜) ↑(↑(↑(decompose 𝒜) r) i)) 0) = 0\n[PROOFSTEP]\nrw [h, hr, decompose_zero, zero_apply, ZeroMemClass.coe_zero]\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nR : Type u_3\nA : Type u_4\ninst✝⁵ : Semiring A\ninst✝⁴ : DecidableEq ι\ninst✝³ : CanonicallyOrderedAddMonoid ι\ninst✝² : SetLike σ A\ninst✝¹ : AddSubmonoidClass σ A\n𝒜 : ι → σ\ninst✝ : GradedRing 𝒜\ni : ι\nr : A\nhr : ↑(↑(↑(decompose 𝒜) r) 0) = 0\nh : ¬i = 0\n⊢ ↑(↑(↑(decompose 𝒜) ↑(↑(↑(decompose 𝒜) r) i)) 0) = 0\n[PROOFSTEP]\nrw [decompose_of_mem_ne 𝒜 (SetLike.coe_mem _) h]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.GradedAlgebra.HomogeneousIdeal", "llama_tokens": 23162, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6477982043529715, "lm_q2_score": 0.44552953503957266, "lm_q1q2_score": 0.28861323278484946}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na✝ b c d : WithTop α\nx y : α\na : WithTop α\n⊢ a + ⊤ = ⊤\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y : α\n⊢ none + ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y val✝ : α\n⊢ Option.some val✝ + ⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y : α\n⊢ a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝ : Add α\nb c d : WithTop α\nx y : α\n⊢ none + b = ⊤ ↔ none = ⊤ ∨ b = ⊤\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝ : Add α\nb c d : WithTop α\nx y val✝ : α\n⊢ Option.some val✝ + b = ⊤ ↔ Option.some val✝ = ⊤ ∨ b = ⊤\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝ : Add α\nc d : WithTop α\nx y : α\n⊢ none + none = ⊤ ↔ none = ⊤ ∨ none = ⊤\n[PROOFSTEP]\nsimp [none_eq_top, some_eq_coe, ← WithTop.coe_add]\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝ : Add α\nc d : WithTop α\nx y val✝ : α\n⊢ none + Option.some val✝ = ⊤ ↔ none = ⊤ ∨ Option.some val✝ = ⊤\n[PROOFSTEP]\nsimp [none_eq_top, some_eq_coe, ← WithTop.coe_add]\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝ : Add α\nc d : WithTop α\nx y val✝ : α\n⊢ Option.some val✝ + none = ⊤ ↔ Option.some val✝ = ⊤ ∨ none = ⊤\n[PROOFSTEP]\nsimp [none_eq_top, some_eq_coe, ← WithTop.coe_add]\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝ : Add α\nc d : WithTop α\nx y val✝¹ val✝ : α\n⊢ Option.some val✝¹ + Option.some val✝ = ⊤ ↔ Option.some val✝¹ = ⊤ ∨ Option.some val✝ = ⊤\n[PROOFSTEP]\nsimp [none_eq_top, some_eq_coe, ← WithTop.coe_add]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Add α\na✝ b✝ c d : WithTop α\nx y : α\ninst✝ : LT α\na b : WithTop α\n⊢ a + b < ⊤ ↔ a < ⊤ ∧ b < ⊤\n[PROOFSTEP]\nsimp_rw [WithTop.lt_top_iff_ne_top, add_ne_top]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na b✝ c✝ d : WithTop α\nx y : α\nb : WithTop α\nc : α\n⊢ none + b = ↑c ↔ ∃ a' b', ↑a' = none ∧ ↑b' = b ∧ a' + b' = c\n[PROOFSTEP]\nsimp [none_eq_top]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na✝ b c✝ d : WithTop α\nx y a c : α\n⊢ Option.some a + none = ↑c ↔ ∃ a' b', ↑a' = Option.some a ∧ ↑b' = none ∧ a' + b' = c\n[PROOFSTEP]\nsimp [none_eq_top]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na✝ b✝ c✝ d : WithTop α\nx y a b c : α\n⊢ Option.some a + Option.some b = ↑c ↔ ∃ a' b', ↑a' = Option.some a ∧ ↑b' = Option.some b ∧ a' + b' = c\n[PROOFSTEP]\nsimp only [some_eq_coe, ← coe_add, coe_eq_coe, exists_and_left, exists_eq_left]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx✝ y✝ : α\nx : WithTop α\ny : α\n⊢ x + ↑y = ⊤ ↔ x = ⊤\n[PROOFSTEP]\ninduction x using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y✝ y : α\n⊢ ⊤ + ↑y = ⊤ ↔ ⊤ = ⊤\n[PROOFSTEP]\nsimp [← coe_add]\n[GOAL]\ncase coe\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y✝ y a✝ : α\n⊢ ↑a✝ + ↑y = ⊤ ↔ ↑a✝ = ⊤\n[PROOFSTEP]\nsimp [← coe_add]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y✝ : α\ny : WithTop α\n⊢ ↑x + y = ⊤ ↔ y = ⊤\n[PROOFSTEP]\ninduction y using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y : α\n⊢ ↑x + ⊤ = ⊤ ↔ ⊤ = ⊤\n[PROOFSTEP]\nsimp [← coe_add]\n[GOAL]\ncase coe\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithTop α\nx y a✝ : α\n⊢ ↑x + ↑a✝ = ⊤ ↔ ↑a✝ = ⊤\n[PROOFSTEP]\nsimp [← coe_add]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Add α\na b c d : WithTop α\nx y : α\ninst✝ : IsRightCancelAdd α\nha : a ≠ ⊤\n⊢ b + a = c + a ↔ b = c\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nb c d : WithTop α\nx y : α\ninst✝ : IsRightCancelAdd α\na : α\n⊢ b + ↑a = c + ↑a ↔ b = c\n[PROOFSTEP]\nobtain rfl | hb := (eq_or_ne b ⊤)\n[GOAL]\ncase intro.inl\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nc d : WithTop α\nx y : α\ninst✝ : IsRightCancelAdd α\na : α\n⊢ ⊤ + ↑a = c + ↑a ↔ ⊤ = c\n[PROOFSTEP]\nrw [top_add, eq_comm, WithTop.add_coe_eq_top_iff, eq_comm]\n[GOAL]\ncase intro.inr\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nb c d : WithTop α\nx y : α\ninst✝ : IsRightCancelAdd α\na : α\nhb : b ≠ ⊤\n⊢ b + ↑a = c + ↑a ↔ b = c\n[PROOFSTEP]\nlift b to α using hb\n[GOAL]\ncase intro.inr.intro\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nc d : WithTop α\nx y : α\ninst✝ : IsRightCancelAdd α\na b : α\n⊢ ↑b + ↑a = c + ↑a ↔ ↑b = c\n[PROOFSTEP]\nsimp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, coe_eq_coe, exists_and_left, exists_eq_left, add_left_inj,\n  exists_eq_right, eq_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : Add α\na b c d : WithTop α\nx y : α\ninst✝ : IsLeftCancelAdd α\nha : a ≠ ⊤\n⊢ a + b = a + c ↔ b = c\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nb c d : WithTop α\nx y : α\ninst✝ : IsLeftCancelAdd α\na : α\n⊢ ↑a + b = ↑a + c ↔ b = c\n[PROOFSTEP]\nobtain rfl | hb := (eq_or_ne b ⊤)\n[GOAL]\ncase intro.inl\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nc d : WithTop α\nx y : α\ninst✝ : IsLeftCancelAdd α\na : α\n⊢ ↑a + ⊤ = ↑a + c ↔ ⊤ = c\n[PROOFSTEP]\nrw [add_top, eq_comm, WithTop.coe_add_eq_top_iff, eq_comm]\n[GOAL]\ncase intro.inr\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nb c d : WithTop α\nx y : α\ninst✝ : IsLeftCancelAdd α\na : α\nhb : b ≠ ⊤\n⊢ ↑a + b = ↑a + c ↔ b = c\n[PROOFSTEP]\nlift b to α using hb\n[GOAL]\ncase intro.inr.intro\nα : Type u\nβ : Type v\ninst✝¹ : Add α\nc d : WithTop α\nx y : α\ninst✝ : IsLeftCancelAdd α\na b : α\n⊢ ↑a + ↑b = ↑a + c ↔ ↑b = c\n[PROOFSTEP]\nsimp_rw [← WithTop.coe_add, eq_comm, WithTop.add_eq_coe, eq_comm, coe_eq_coe, exists_and_left, exists_eq_left',\n  add_right_inj, exists_eq_right']\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na✝ b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : WithTop α\nh : b ≤ c\n⊢ a + b ≤ a + c\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb c : WithTop α\nh : b ≤ c\n⊢ none + b ≤ none + c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb c : WithTop α\nh : b ≤ c\nval✝ : α\n⊢ Option.some val✝ + b ≤ Option.some val✝ + c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nh : b ≤ none\n⊢ none + b ≤ none + none\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nh : b ≤ none\n⊢ none + b ≤ none + none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ Option.some val✝\n⊢ none + b ≤ none + Option.some val✝\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ Option.some val✝\n⊢ none + b ≤ none + Option.some val✝\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ none\n⊢ Option.some val✝ + b ≤ Option.some val✝ + none\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ none\n⊢ Option.some val✝ + b ≤ Option.some val✝ + none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ Option.some val✝¹ + b ≤ Option.some val✝¹ + Option.some val✝\n[PROOFSTEP]\nrcases le_coe_iff.1 h with ⟨b, rfl, _⟩\n[GOAL]\ncase some.some.intro.intro\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nval✝¹ val✝ b : α\nright✝ : b ≤ val✝\nh : ↑b ≤ Option.some val✝\n⊢ Option.some val✝¹ + ↑b ≤ Option.some val✝¹ + Option.some val✝\n[PROOFSTEP]\nexact coe_le_coe.2 (add_le_add_left (coe_le_coe.1 h) _)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na✝ b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na b c : WithTop α\nh : b ≤ c\n⊢ swap (fun x x_1 => x + x_1) a b ≤ swap (fun x x_1 => x + x_1) a c\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb c : WithTop α\nh : b ≤ c\n⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb c : WithTop α\nh : b ≤ c\nval✝ : α\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nh : b ≤ none\n⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none none\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nh : b ≤ none\n⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none (Option.some val✝)\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) none b ≤ swap (fun x x_1 => x + x_1) none (Option.some val✝)\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ none\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) none\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝ : α\nh : b ≤ none\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝) none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)\n[PROOFSTEP]\ntry exact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nb : WithTop α\nval✝¹ val✝ : α\nh : b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) b ≤ swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)\n[PROOFSTEP]\nrcases le_coe_iff.1 h with ⟨b, rfl, _⟩\n[GOAL]\ncase some.some.intro.intro\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nval✝¹ val✝ b : α\nright✝ : b ≤ val✝\nh : ↑b ≤ Option.some val✝\n⊢ swap (fun x x_1 => x + x_1) (Option.some val✝¹) ↑b ≤\n    swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝)\n[PROOFSTEP]\nexact coe_le_coe.2 (add_le_add_right (coe_le_coe.1 h) _)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na✝ b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b c : WithTop α\nh : a + b < a + c\n⊢ b < c\n[PROOFSTEP]\ninduction a using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nb c : WithTop α\nh : ⊤ + b < ⊤ + c\n⊢ b < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nb c : WithTop α\na✝ : α\nh : ↑a✝ + b < ↑a✝ + c\n⊢ b < c\n[PROOFSTEP]\ninduction b using WithTop.recTopCoe\n[GOAL]\ncase coe.top\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\na✝ : α\nh : ↑a✝ + ⊤ < ↑a✝ + c\n⊢ ⊤ < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\na✝¹ a✝ : α\nh : ↑a✝¹ + ↑a✝ < ↑a✝¹ + c\n⊢ ↑a✝ < c\n[PROOFSTEP]\ninduction c using WithTop.recTopCoe\n[GOAL]\ncase coe.coe.top\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na✝¹ a✝ : α\nh : ↑a✝¹ + ↑a✝ < ↑a✝¹ + ⊤\n⊢ ↑a✝ < ⊤\n[PROOFSTEP]\nexact coe_lt_top _\n[GOAL]\ncase coe.coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na✝² a✝¹ a✝ : α\nh : ↑a✝² + ↑a✝¹ < ↑a✝² + ↑a✝\n⊢ ↑a✝¹ < ↑a✝\n[PROOFSTEP]\nexact coe_lt_coe.2 (lt_of_add_lt_add_left <| coe_lt_coe.1 h)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na✝ b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b c : WithTop α\nh : swap (fun x x_1 => x + x_1) a b < swap (fun x x_1 => x + x_1) a c\n⊢ b < c\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nb c : WithTop α\nh : swap (fun x x_1 => x + x_1) none b < swap (fun x x_1 => x + x_1) none c\n⊢ b < c\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nb c : WithTop α\nval✝ : α\nh : swap (fun x x_1 => x + x_1) (Option.some val✝) b < swap (fun x x_1 => x + x_1) (Option.some val✝) c\n⊢ b < c\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nh : swap (fun x x_1 => x + x_1) none none < swap (fun x x_1 => x + x_1) none c\n⊢ none < c\n[PROOFSTEP]\ntry exact (not_none_lt _ h).elim\n[GOAL]\ncase none.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nh : swap (fun x x_1 => x + x_1) none none < swap (fun x x_1 => x + x_1) none c\n⊢ none < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝ : α\nh : swap (fun x x_1 => x + x_1) none (Option.some val✝) < swap (fun x x_1 => x + x_1) none c\n⊢ Option.some val✝ < c\n[PROOFSTEP]\ntry exact (not_none_lt _ h).elim\n[GOAL]\ncase none.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝ : α\nh : swap (fun x x_1 => x + x_1) none (Option.some val✝) < swap (fun x x_1 => x + x_1) none c\n⊢ Option.some val✝ < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝ : α\nh : swap (fun x x_1 => x + x_1) (Option.some val✝) none < swap (fun x x_1 => x + x_1) (Option.some val✝) c\n⊢ none < c\n[PROOFSTEP]\ntry exact (not_none_lt _ h).elim\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝ : α\nh : swap (fun x x_1 => x + x_1) (Option.some val✝) none < swap (fun x x_1 => x + x_1) (Option.some val✝) c\n⊢ none < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝¹ val✝ : α\nh :\n  swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝) < swap (fun x x_1 => x + x_1) (Option.some val✝¹) c\n⊢ Option.some val✝ < c\n[PROOFSTEP]\ntry exact (not_none_lt _ h).elim\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝¹ val✝ : α\nh :\n  swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝) < swap (fun x x_1 => x + x_1) (Option.some val✝¹) c\n⊢ Option.some val✝ < c\n[PROOFSTEP]\nexact (not_none_lt _ h).elim\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c✝ d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nc : WithTop α\nval✝¹ val✝ : α\nh :\n  swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝) < swap (fun x x_1 => x + x_1) (Option.some val✝¹) c\n⊢ Option.some val✝ < c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nval✝¹ val✝ : α\nh :\n  swap (fun x x_1 => x + x_1) (Option.some val✝¹) (Option.some val✝) <\n    swap (fun x x_1 => x + x_1) (Option.some val✝¹) none\n⊢ Option.some val✝ < none\n[PROOFSTEP]\nexact coe_lt_top _\n[GOAL]\ncase some.some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nval✝² val✝¹ val✝ : α\nh :\n  swap (fun x x_1 => x + x_1) (Option.some val✝²) (Option.some val✝¹) <\n    swap (fun x x_1 => x + x_1) (Option.some val✝²) (Option.some val✝)\n⊢ Option.some val✝¹ < Option.some val✝\n[PROOFSTEP]\nexact coe_lt_coe.2 (lt_of_add_lt_add_right <| coe_lt_coe.1 h)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nha : a ≠ ⊤\nh : a + b ≤ a + c\n⊢ b ≤ c\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nb c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : α\nh : ↑a + b ≤ ↑a + c\n⊢ b ≤ c\n[PROOFSTEP]\ninduction c using WithTop.recTopCoe\n[GOAL]\ncase intro.top\nα : Type u\nβ : Type v\ninst✝² : Add α\nb d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : α\nh : ↑a + b ≤ ↑a + ⊤\n⊢ b ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase intro.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\nb d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na a✝ : α\nh : ↑a + b ≤ ↑a + ↑a✝\n⊢ b ≤ ↑a✝\n[PROOFSTEP]\ninduction b using WithTop.recTopCoe\n[GOAL]\ncase intro.coe.top\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na a✝ : α\nh : ↑a + ⊤ ≤ ↑a + ↑a✝\n⊢ ⊤ ≤ ↑a✝\n[PROOFSTEP]\nexact (not_top_le_coe _ h).elim\n[GOAL]\ncase intro.coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na a✝¹ a✝ : α\nh : ↑a + ↑a✝ ≤ ↑a + ↑a✝¹\n⊢ ↑a✝ ≤ ↑a✝¹\n[PROOFSTEP]\nsimp only [← coe_add, coe_le_coe] at h ⊢\n[GOAL]\ncase intro.coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na a✝¹ a✝ : α\nh : a + a✝ ≤ a + a✝¹\n⊢ a✝ ≤ a✝¹\n[PROOFSTEP]\nexact le_of_add_le_add_left h\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nha : a ≠ ⊤\nh : b + a ≤ c + a\n⊢ b ≤ c\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nb c d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : α\nh : b + ↑a ≤ c + ↑a\n⊢ b ≤ c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase intro.none\nα : Type u\nβ : Type v\ninst✝² : Add α\nb d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na : α\nh : b + ↑a ≤ none + ↑a\n⊢ b ≤ none\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase intro.some\nα : Type u\nβ : Type v\ninst✝² : Add α\nb d : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na val✝ : α\nh : b + ↑a ≤ Option.some val✝ + ↑a\n⊢ b ≤ Option.some val✝\n[PROOFSTEP]\ncases b\n[GOAL]\ncase intro.some.none\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na val✝ : α\nh : none + ↑a ≤ Option.some val✝ + ↑a\n⊢ none ≤ Option.some val✝\n[PROOFSTEP]\nexact (not_top_le_coe _ h).elim\n[GOAL]\ncase intro.some.some\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LE α\ninst✝ : ContravariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\na val✝¹ val✝ : α\nh : Option.some val✝ + ↑a ≤ Option.some val✝¹ + ↑a\n⊢ Option.some val✝ ≤ Option.some val✝¹\n[PROOFSTEP]\nexact coe_le_coe.2 (le_of_add_le_add_right <| coe_le_coe.1 h)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nha : a ≠ ⊤\nh : b < c\n⊢ a + b < a + c\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nb c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : b < c\na : α\n⊢ ↑a + b < ↑a + c\n[PROOFSTEP]\nrcases lt_iff_exists_coe.1 h with ⟨b, rfl, h'⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nc d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : α\nh' h : ↑b < c\n⊢ ↑a + ↑b < ↑a + c\n[PROOFSTEP]\ncases c\n[GOAL]\ncase intro.intro.intro.none\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : α\nh' h : ↑b < none\n⊢ ↑a + ↑b < ↑a + none\n[PROOFSTEP]\nexact coe_lt_top _\n[GOAL]\ncase intro.intro.intro.some\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b val✝ : α\nh' h : ↑b < Option.some val✝\n⊢ ↑a + ↑b < ↑a + Option.some val✝\n[PROOFSTEP]\nexact coe_lt_coe.2 (add_lt_add_left (coe_lt_coe.1 h) _)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nha : a ≠ ⊤\nh : b < c\n⊢ b + a < c + a\n[PROOFSTEP]\nlift a to α using ha\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nb c d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\nh : b < c\na : α\n⊢ b + ↑a < c + ↑a\n[PROOFSTEP]\nrcases lt_iff_exists_coe.1 h with ⟨b, rfl, h'⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : Add α\nc d : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : α\nh' h : ↑b < c\n⊢ ↑b + ↑a < c + ↑a\n[PROOFSTEP]\ncases c\n[GOAL]\ncase intro.intro.intro.none\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b : α\nh' h : ↑b < none\n⊢ ↑b + ↑a < none + ↑a\n[PROOFSTEP]\nexact coe_lt_top _\n[GOAL]\ncase intro.intro.intro.some\nα : Type u\nβ : Type v\ninst✝² : Add α\nd : WithTop α\nx y : α\ninst✝¹ : LT α\ninst✝ : CovariantClass α α (swap fun x x_1 => x + x_1) fun x x_1 => x < x_1\na b val✝ : α\nh' h : ↑b < Option.some val✝\n⊢ ↑b + ↑a < Option.some val✝ + ↑a\n[PROOFSTEP]\nexact coe_lt_coe.2 (add_lt_add_right (coe_lt_coe.1 h) _)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na✝ b✝ c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\na b : WithTop α\n⊢ map (↑f) (a + b) = map (↑f) a + map (↑f) b\n[PROOFSTEP]\ninduction a using WithTop.recTopCoe\n[GOAL]\ncase top\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\nb : WithTop α\n⊢ map (↑f) (⊤ + b) = map ↑f ⊤ + map (↑f) b\n[PROOFSTEP]\nexact (top_add _).symm\n[GOAL]\ncase coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b✝ c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\nb : WithTop α\na✝ : α\n⊢ map (↑f) (↑a✝ + b) = map ↑f ↑a✝ + map (↑f) b\n[PROOFSTEP]\ninduction b using WithTop.recTopCoe\n[GOAL]\ncase coe.top\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\na✝ : α\n⊢ map (↑f) (↑a✝ + ⊤) = map ↑f ↑a✝ + map ↑f ⊤\n[PROOFSTEP]\nexact (add_top _).symm\n[GOAL]\ncase coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\na✝¹ a✝ : α\n⊢ map (↑f) (↑a✝¹ + ↑a✝) = map ↑f ↑a✝¹ + map ↑f ↑a✝\n[PROOFSTEP]\nrw [map_coe, map_coe, ← coe_add, ← coe_add, ← map_add]\n[GOAL]\ncase coe.coe\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithTop α\nx y : α\nF : Type u_1\ninst✝¹ : Add β\ninst✝ : AddHomClass F α β\nf : F\na✝¹ a✝ : α\n⊢ map ↑f ↑(a✝¹ + a✝) = ↑(↑f (a✝¹ + a✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : AddMonoidWithOne α\nsrc✝¹ : One (WithTop α) := one\nsrc✝ : AddMonoid (WithTop α) := addMonoid\n⊢ NatCast.natCast 0 = 0\n[PROOFSTEP]\nsimp only\n  -- Porting note: Had to add this...?\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : AddMonoidWithOne α\nsrc✝¹ : One (WithTop α) := one\nsrc✝ : AddMonoid (WithTop α) := addMonoid\n⊢ ↑↑0 = 0\n[PROOFSTEP]\nrw [Nat.cast_zero, WithTop.coe_zero]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : AddMonoidWithOne α\nsrc✝¹ : One (WithTop α) := one\nsrc✝ : AddMonoid (WithTop α) := addMonoid\nn : ℕ\n⊢ NatCast.natCast (n + 1) = NatCast.natCast n + 1\n[PROOFSTEP]\nsimp only\n  -- Porting note: Had to add this...?\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : AddMonoidWithOne α\nsrc✝¹ : One (WithTop α) := one\nsrc✝ : AddMonoid (WithTop α) := addMonoid\nn : ℕ\n⊢ ↑↑(n + 1) = ↑↑n + 1\n[PROOFSTEP]\nrw [Nat.cast_add_one, WithTop.coe_add, WithTop.coe_one]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\n⊢ ∀ (a b : WithTop α), a ≤ b → ∀ (c : WithTop α), c + a ≤ c + b\n[PROOFSTEP]\nrintro a b h (_ | c)\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\na b : WithTop α\nh : a ≤ b\n⊢ none + a ≤ none + b\n[PROOFSTEP]\nsimp [none_eq_top]\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\na b : WithTop α\nh : a ≤ b\nc : α\n⊢ Option.some c + a ≤ Option.some c + b\n[PROOFSTEP]\nrcases b with (_ | b)\n[GOAL]\ncase some.none\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\na : WithTop α\nc : α\nh : a ≤ none\n⊢ Option.some c + a ≤ Option.some c + none\n[PROOFSTEP]\nsimp [none_eq_top]\n[GOAL]\ncase some.some\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\na : WithTop α\nc b : α\nh : a ≤ Option.some b\n⊢ Option.some c + a ≤ Option.some c + Option.some b\n[PROOFSTEP]\nrcases le_coe_iff.1 h with ⟨a, rfl, _⟩\n[GOAL]\ncase some.some.intro.intro\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\nc b a : α\nright✝ : a ≤ b\nh : ↑a ≤ Option.some b\n⊢ Option.some c + ↑a ≤ Option.some c + Option.some b\n[PROOFSTEP]\nsimp only [some_eq_coe, ← coe_add, coe_le_coe] at h ⊢\n[GOAL]\ncase some.some.intro.intro\nα : Type u\nβ : Type v\ninst✝ : OrderedAddCommMonoid α\nsrc✝¹ : PartialOrder (WithTop α) := partialOrder\nsrc✝ : AddCommMonoid (WithTop α) := addCommMonoid\nc b a : α\nright✝ h : a ≤ b\n⊢ c + a ≤ c + b\n[PROOFSTEP]\nexact add_le_add_left h c\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : LE α\ninst✝¹ : Add α\ninst✝ : ExistsAddOfLE α\na b : WithTop α\n⊢ ⊤ ≤ ⊤ → ∃ c, ⊤ = ⊤ + c\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : LE α\ninst✝¹ : Add α\ninst✝ : ExistsAddOfLE α\na✝ b✝ : WithTop α\na b : α\nh : ↑a ≤ ↑b\n⊢ ∃ c, ↑b = ↑a + c\n[PROOFSTEP]\nobtain ⟨c, rfl⟩ := exists_add_of_le (WithTop.coe_le_coe.1 h)\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : LE α\ninst✝¹ : Add α\ninst✝ : ExistsAddOfLE α\na✝ b : WithTop α\na c : α\nh : ↑a ≤ ↑(a + c)\n⊢ ∃ c_1, ↑(a + c) = ↑a + c_1\n[PROOFSTEP]\nexact ⟨c, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nM : Type u_1\nN : Type u_2\ninst✝¹ : One M\ninst✝ : One N\nf : OneHom M N\n⊢ map (↑f) 1 = 1\n[PROOFSTEP]\nrw [WithTop.map_one, map_one, coe_one]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : Add α\na✝ b c d : WithBot α\nx y : α\na : WithBot α\n⊢ a + ⊥ = ⊥\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithBot α\nx y : α\n⊢ none + ⊥ = ⊥\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u\nβ : Type v\ninst✝ : Add α\na b c d : WithBot α\nx y val✝ : α\n⊢ Option.some val✝ + ⊥ = ⊥\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : Add α\na b c d : WithBot α\nx y : α\nM : Type u_1\nN : Type u_2\ninst✝¹ : One M\ninst✝ : One N\nf : OneHom M N\n⊢ map (↑f) 1 = 1\n[PROOFSTEP]\nrw [WithBot.map_one, map_one, coe_one]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Order.Monoid.WithTop", "llama_tokens": 17213, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.600188359260205, "lm_q2_score": 0.480478678047907, "lm_q1q2_score": 0.28837770943708557}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One M\ns t : Set α\nf g : α → M\na : α\nl : Filter α\nhf : f =ᶠ[l ⊓ 𝓟 s] g\nhs : s =ᶠ[l] t\nx : α\nhst : x ∈ s ↔ x ∈ t\nhfg : x ∈ s → f x = g x\nhxs : x ∈ s\n⊢ mulIndicator s f x = mulIndicator t g x\n[PROOFSTEP]\nsimp only [*, hst.1 hxs, mulIndicator_of_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One M\ns t : Set α\nf g : α → M\na : α\nl : Filter α\nhf : f =ᶠ[l ⊓ 𝓟 s] g\nhs : s =ᶠ[l] t\nx : α\nhst : x ∈ s ↔ x ∈ t\nhfg : x ∈ s → f x = g x\nhxs : ¬x ∈ s\n⊢ mulIndicator s f x = mulIndicator t g x\n[PROOFSTEP]\nsimp only [mulIndicator_of_not_mem, hxs, mt hst.2 hxs]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝¹ : Preorder ι\ninst✝ : One β\ns : ι → Set α\nhs : Monotone s\nf : α → β\na : α\n⊢ (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun x => mulIndicator (⋃ (i : ι), s i) f a\n[PROOFSTEP]\nclassical exact hs.piecewise_eventually_eq_iUnion f 1 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝¹ : Preorder ι\ninst✝ : One β\ns : ι → Set α\nhs : Monotone s\nf : α → β\na : α\n⊢ (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun x => mulIndicator (⋃ (i : ι), s i) f a\n[PROOFSTEP]\nexact hs.piecewise_eventually_eq_iUnion f 1 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝¹ : Preorder ι\ninst✝ : One β\ns : ι → Set α\nhs : Antitone s\nf : α → β\na : α\n⊢ (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun x => mulIndicator (⋂ (i : ι), s i) f a\n[PROOFSTEP]\nclassical exact hs.piecewise_eventually_eq_iInter f 1 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝¹ : Preorder ι\ninst✝ : One β\ns : ι → Set α\nhs : Antitone s\nf : α → β\na : α\n⊢ (fun i => mulIndicator (s i) f a) =ᶠ[atTop] fun x => mulIndicator (⋂ (i : ι), s i) f a\n[PROOFSTEP]\nexact hs.piecewise_eventually_eq_iInter f 1 a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝ : One β\ns : ι → Set α\nf : α → β\na : α\n⊢ (fun n => mulIndicator (⋃ (i : ι) (_ : i ∈ n), s i) f a) =ᶠ[atTop] fun x => mulIndicator (iUnion s) f a\n[PROOFSTEP]\nrw [iUnion_eq_iUnion_finset s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝ : One β\ns : ι → Set α\nf : α → β\na : α\n⊢ (fun n => mulIndicator (⋃ (i : ι) (_ : i ∈ n), s i) f a) =ᶠ[atTop] fun x =>\n    mulIndicator (⋃ (t : Finset ι) (i : ι) (_ : i ∈ t), s i) f a\n[PROOFSTEP]\napply Monotone.mulIndicator_eventuallyEq_iUnion\n[GOAL]\ncase hs\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\nι : Type u_5\ninst✝ : One β\ns : ι → Set α\nf : α → β\na : α\n⊢ Monotone fun i => ⋃ (i_1 : ι) (_ : i_1 ∈ i), s i_1\n[PROOFSTEP]\nexact fun _ _ ↦ biUnion_subset_biUnion_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One β\nl : Filter α\nf : α → β\ns : Set α\nhf : f =ᶠ[l] 1\n⊢ mulIndicator s 1 =ᶠ[l] 1\n[PROOFSTEP]\nrw [mulIndicator_one']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One β\nl : Filter α\nf : α → β\nhf : ∀ᶠ (x : α) in l, f x ≠ 1\ns t : Set α\nh : mulIndicator s f =ᶠ[l] mulIndicator t f\n⊢ s =ᶠ[l] t\n[PROOFSTEP]\nhave : ∀ {s : Set α}, Function.mulSupport (s.mulIndicator f) =ᶠ[l] s := fun {s} ↦\n  by\n  rw [mulSupport_mulIndicator]\n  exact (hf.mono fun x hx ↦ and_iff_left hx).set_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One β\nl : Filter α\nf : α → β\nhf : ∀ᶠ (x : α) in l, f x ≠ 1\ns✝ t : Set α\nh : mulIndicator s✝ f =ᶠ[l] mulIndicator t f\ns : Set α\n⊢ Function.mulSupport (mulIndicator s f) =ᶠ[l] s\n[PROOFSTEP]\nrw [mulSupport_mulIndicator]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One β\nl : Filter α\nf : α → β\nhf : ∀ᶠ (x : α) in l, f x ≠ 1\ns✝ t : Set α\nh : mulIndicator s✝ f =ᶠ[l] mulIndicator t f\ns : Set α\n⊢ s ∩ Function.mulSupport f =ᶠ[l] s\n[PROOFSTEP]\nexact (hf.mono fun x hx ↦ and_iff_left hx).set_eq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nM : Type u_3\nE : Type u_4\ninst✝ : One β\nl : Filter α\nf : α → β\nhf : ∀ᶠ (x : α) in l, f x ≠ 1\ns t : Set α\nh : mulIndicator s f =ᶠ[l] mulIndicator t f\nthis : ∀ {s : Set α}, Function.mulSupport (mulIndicator s f) =ᶠ[l] s\n⊢ s =ᶠ[l] t\n[PROOFSTEP]\nexact this.symm.trans <| h.mulSupport.trans this\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.IndicatorFunction", "llama_tokens": 2213, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6039318337259583, "lm_q2_score": 0.476579651063676, "lm_q1q2_score": 0.2878216225833632}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX✝ Y✝ : SimplexCategoryᵒᵖ\ng : X✝ ⟶ Y✝\n⊢ ∀ (j : Fin (SimplexCategory.len Y✝.unop + 1)),\n    (fun i => WidePullback.π (fun x => f.hom) (↑(SimplexCategory.Hom.toOrderHom g.unop) i)) j ≫ f.hom =\n      WidePullback.base fun x => f.hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf✝ : Arrow C\ninst✝² : ∀ (n : ℕ), HasWidePullback f✝.right (fun x => f✝.left) fun x => f✝.hom\nf g : Arrow C\ninst✝¹ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom\ninst✝ : ∀ (n : ℕ), HasWidePullback g.right (fun x => g.left) fun x => g.hom\nF : f ⟶ g\nn : SimplexCategoryᵒᵖ\nj : Fin (SimplexCategory.len n.unop + 1)\n⊢ (fun i => WidePullback.π (fun x => f.hom) i ≫ F.left) j ≫ g.hom = (WidePullback.base fun x => f.hom) ≫ F.right\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : X ⟶ Arrow.augmentedCechNerve F\n⊢ (𝟭 C).map (NatTrans.app G.left (Opposite.op (SimplexCategory.mk 0)) ≫ WidePullback.π (fun x => F.hom) 0) ≫ F.hom =\n    (Augmented.toArrow.obj X).hom ≫ (𝟭 C).map G.right\n[PROOFSTEP]\nhave := G.w\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : X ⟶ Arrow.augmentedCechNerve F\nthis : (𝟭 (SimplicialObject C)).map G.left ≫ (Arrow.augmentedCechNerve F).hom = X.hom ≫ (const C).map G.right\n⊢ (𝟭 C).map (NatTrans.app G.left (Opposite.op (SimplexCategory.mk 0)) ≫ WidePullback.π (fun x => F.hom) 0) ≫ F.hom =\n    (Augmented.toArrow.obj X).hom ≫ (𝟭 C).map G.right\n[PROOFSTEP]\napply_fun fun e => e.app (Opposite.op <| SimplexCategory.mk 0) at this \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : X ⟶ Arrow.augmentedCechNerve F\nthis :\n  NatTrans.app ((𝟭 (SimplicialObject C)).map G.left ≫ (Arrow.augmentedCechNerve F).hom)\n      (Opposite.op (SimplexCategory.mk 0)) =\n    NatTrans.app (X.hom ≫ (const C).map G.right) (Opposite.op (SimplexCategory.mk 0))\n⊢ (𝟭 C).map (NatTrans.app G.left (Opposite.op (SimplexCategory.mk 0)) ≫ WidePullback.π (fun x => F.hom) 0) ≫ F.hom =\n    (Augmented.toArrow.obj X).hom ≫ (𝟭 C).map G.right\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx : SimplexCategoryᵒᵖ\ni : Fin (SimplexCategory.len x.unop + 1)\n⊢ (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) i ≫ F.hom = NatTrans.app X.hom x ≫ G.right\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx : SimplexCategoryᵒᵖ\ni : Fin (SimplexCategory.len x.unop + 1)\n⊢ (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right\n[PROOFSTEP]\nerw [Category.assoc, Arrow.w, Augmented.toArrow_obj_hom, NatTrans.naturality_assoc, Functor.const_obj_map,\n  Category.id_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\n⊢ ∀ ⦃X_1 Y : SimplexCategoryᵒᵖ⦄ (f : X_1 ⟶ Y),\n    X.left.map f ≫\n        (fun x =>\n            WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n              (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n              (_ :\n                ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n                  (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) i ≫ F.hom =\n                    NatTrans.app X.hom x ≫ G.right))\n          Y =\n      (fun x =>\n            WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n              (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n              (_ :\n                ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n                  (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) i ≫ F.hom =\n                    NatTrans.app X.hom x ≫ G.right))\n          X_1 ≫\n        (Arrow.augmentedCechNerve F).left.map f\n[PROOFSTEP]\nintro x y f\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\n⊢ X.left.map f ≫\n      (fun x =>\n          WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n            (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n            (_ :\n              ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n                (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) i ≫ F.hom =\n                  NatTrans.app X.hom x ≫ G.right))\n        y =\n    (fun x =>\n          WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n            (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n            (_ :\n              ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n                (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) i ≫ F.hom =\n                  NatTrans.app X.hom x ≫ G.right))\n        x ≫\n      (Arrow.augmentedCechNerve F).left.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\n⊢ X.left.map f ≫\n      WidePullback.lift (NatTrans.app X.hom y ≫ G.right)\n        (fun i => X.left.map (SimplexCategory.const y.unop i).op ≫ G.left)\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len y.unop + 1)),\n            (X.left.map (SimplexCategory.const y.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom y ≫ G.right) =\n    WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n        (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n            (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right) ≫\n      WidePullback.lift (WidePullback.base fun x => F.hom)\n        (fun i => WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len y.unop + 1)),\n            WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫ F.hom =\n              WidePullback.base fun x => F.hom)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len y.unop + 1)\n⊢ (X.left.map f ≫\n        WidePullback.lift (NatTrans.app X.hom y ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const y.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len y.unop + 1)),\n              (X.left.map (SimplexCategory.const y.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom y ≫ G.right)) ≫\n      WidePullback.π (fun x => F.hom) j✝ =\n    (WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n              (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right) ≫\n        WidePullback.lift (WidePullback.base fun x => F.hom)\n          (fun i => WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y.unop + 1)),\n              WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫ F.hom =\n                WidePullback.base fun x => F.hom)) ≫\n      WidePullback.π (fun x => F.hom) j✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len y.unop + 1)\n⊢ (X.left.map f ≫\n        WidePullback.lift (NatTrans.app X.hom y ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const y.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len y.unop + 1)),\n              (X.left.map (SimplexCategory.const y.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom y ≫ G.right)) ≫\n      WidePullback.π (fun x => F.hom) j✝ =\n    (WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n              (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right) ≫\n        WidePullback.lift (WidePullback.base fun x => F.hom)\n          (fun i => WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y.unop + 1)),\n              WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫ F.hom =\n                WidePullback.base fun x => F.hom)) ≫\n      WidePullback.π (fun x => F.hom) j✝\n[PROOFSTEP]\nsimp only [WidePullback.lift_π, Category.assoc, ← X.left.map_comp_assoc]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len y.unop + 1)\n⊢ X.left.map (f ≫ (SimplexCategory.const y.unop j✝).op) ≫ G.left =\n    X.left.map (SimplexCategory.const x.unop (↑(SimplexCategory.Hom.toOrderHom f.unop) j✝)).op ≫ G.left\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\n⊢ ((X.left.map f ≫\n        WidePullback.lift (NatTrans.app X.hom y ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const y.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len y.unop + 1)),\n              (X.left.map (SimplexCategory.const y.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom y ≫ G.right)) ≫\n      WidePullback.base fun x => F.hom) =\n    (WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n              (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right) ≫\n        WidePullback.lift (WidePullback.base fun x => F.hom)\n          (fun i => WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y.unop + 1)),\n              WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫ F.hom =\n                WidePullback.base fun x => F.hom)) ≫\n      WidePullback.base fun x => F.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nG : Augmented.toArrow.obj X ⟶ F\nx y : SimplexCategoryᵒᵖ\nf : x ⟶ y\n⊢ ((X.left.map f ≫\n        WidePullback.lift (NatTrans.app X.hom y ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const y.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len y.unop + 1)),\n              (X.left.map (SimplexCategory.const y.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom y ≫ G.right)) ≫\n      WidePullback.base fun x => F.hom) =\n    (WidePullback.lift (NatTrans.app X.hom x ≫ G.right)\n          (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ G.left)\n          (_ :\n            ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n              (X.left.map (SimplexCategory.const x.unop i).op ≫ G.left) ≫ F.hom = NatTrans.app X.hom x ≫ G.right) ≫\n        WidePullback.lift (WidePullback.base fun x => F.hom)\n          (fun i => WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y.unop + 1)),\n              WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫ F.hom =\n                WidePullback.base fun x => F.hom)) ≫\n      WidePullback.base fun x => F.hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\n⊢ Function.LeftInverse (equivalenceRightToLeft X F) (equivalenceLeftToRight X F)\n[PROOFSTEP]\nintro A\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ equivalenceRightToLeft X F (equivalenceLeftToRight X F A) = A\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ (equivalenceRightToLeft X F (equivalenceLeftToRight X F A)).left = A.left\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ WidePullback.lift (NatTrans.app X.hom (Opposite.op (SimplexCategory.mk 0)) ≫ A.right)\n        (fun i => X.left.map (SimplexCategory.const (SimplexCategory.mk 0) i).op ≫ A.left)\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len (Opposite.op (SimplexCategory.mk 0)).unop + 1)),\n            (fun i => X.left.map (SimplexCategory.const (Opposite.op (SimplexCategory.mk 0)).unop i).op ≫ A.left) i ≫\n                F.hom =\n              NatTrans.app X.hom (Opposite.op (SimplexCategory.mk 0)) ≫ A.right) ≫\n      WidePullback.π (fun x => F.hom) 0 =\n    A.left\n[PROOFSTEP]\nerw [WidePullback.lift_π]\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ X.left.map (SimplexCategory.const (SimplexCategory.mk 0) 0).op ≫ A.left = A.left\n[PROOFSTEP]\nnth_rw 2 [← Category.id_comp A.left]\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ X.left.map (SimplexCategory.const (SimplexCategory.mk 0) 0).op ≫ A.left = 𝟙 (Augmented.toArrow.obj X).left ≫ A.left\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h₁.e_a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ X.left.map (SimplexCategory.const (SimplexCategory.mk 0) 0).op = 𝟙 (Augmented.toArrow.obj X).left\n[PROOFSTEP]\nconvert X.left.map_id _\n[GOAL]\ncase h.e'_2.h.h.e'_8\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ (SimplexCategory.const (SimplexCategory.mk 0) 0).op = 𝟙 (Opposite.op (SimplexCategory.mk 0))\n[PROOFSTEP]\nrw [← op_id]\n[GOAL]\ncase h.e'_2.h.h.e'_8\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ (SimplexCategory.const (SimplexCategory.mk 0) 0).op = (𝟙 (SimplexCategory.mk 0)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_2.h.h.e'_8.e_f\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ SimplexCategory.const (SimplexCategory.mk 0) 0 = 𝟙 (SimplexCategory.mk 0)\n[PROOFSTEP]\next ⟨a, ha⟩\n[GOAL]\ncase h.e'_2.h.h.e'_8.e_f.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\na : ℕ\nha : a < SimplexCategory.len (SimplexCategory.mk 0) + 1\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const (SimplexCategory.mk 0) 0)) { val := a, isLt := ha }) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom (𝟙 (SimplexCategory.mk 0))) { val := a, isLt := ha })\n[PROOFSTEP]\nchange a < 1 at ha \n[GOAL]\ncase h.e'_2.h.h.e'_8.e_f.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\na : ℕ\nha : a < 1\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const (SimplexCategory.mk 0) 0)) { val := a, isLt := ha }) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom (𝟙 (SimplexCategory.mk 0))) { val := a, isLt := ha })\n[PROOFSTEP]\nchange 0 = a\n[GOAL]\ncase h.e'_2.h.h.e'_8.e_f.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\na : ℕ\nha : a < 1\n⊢ 0 = a\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : Augmented.toArrow.obj X ⟶ F\n⊢ (equivalenceRightToLeft X F (equivalenceLeftToRight X F A)).right = A.right\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\n⊢ Function.RightInverse (equivalenceRightToLeft X F) (equivalenceLeftToRight X F)\n[PROOFSTEP]\nintro A\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\n⊢ equivalenceLeftToRight X F (equivalenceRightToLeft X F A) = A\n[PROOFSTEP]\next x : 2\n[GOAL]\ncase h₁.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\nx : SimplexCategoryᵒᵖ\n⊢ NatTrans.app (equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).left x = NatTrans.app A.left x\n[PROOFSTEP]\nrefine' WidePullback.hom_ext _ _ _ (fun j => _) _\n[GOAL]\ncase h₁.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\nx : SimplexCategoryᵒᵖ\nj : Fin (SimplexCategory.len x.unop + 1)\n⊢ NatTrans.app (equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).left x ≫ WidePullback.π (fun x => F.hom) j =\n    NatTrans.app A.left x ≫ WidePullback.π (fun x => F.hom) j\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₁.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\nx : SimplexCategoryᵒᵖ\nj : Fin (SimplexCategory.len x.unop + 1)\n⊢ WidePullback.lift (NatTrans.app X.hom x ≫ A.right)\n        (fun i =>\n          X.left.map (SimplexCategory.const x.unop i).op ≫\n            NatTrans.app A.left (Opposite.op (SimplexCategory.mk 0)) ≫ WidePullback.π (fun x => F.hom) 0)\n        (_ :\n          ∀ (i : Fin (SimplexCategory.len x.unop + 1)),\n            (fun i => X.left.map (SimplexCategory.const x.unop i).op ≫ (equivalenceRightToLeft X F A).left) i ≫ F.hom =\n              NatTrans.app X.hom x ≫ (equivalenceRightToLeft X F A).right) ≫\n      WidePullback.π (fun x => F.hom) j =\n    NatTrans.app A.left x ≫ WidePullback.π (fun x => F.hom) j\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h₁.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\nx : SimplexCategoryᵒᵖ\nj : Fin (SimplexCategory.len x.unop + 1)\n⊢ NatTrans.app A.left x ≫\n      WidePullback.π (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const x.unop j)) 0) =\n    NatTrans.app A.left x ≫ WidePullback.π (fun x => F.hom) j\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₁.h.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\nx : SimplexCategoryᵒᵖ\n⊢ (NatTrans.app (equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).left x ≫ WidePullback.base fun x => F.hom) =\n    NatTrans.app A.left x ≫ WidePullback.base fun x => F.hom\n[PROOFSTEP]\nsimpa using congr_app A.w.symm x\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\nX : Augmented C\nF : Arrow C\nA : X ⟶ Arrow.augmentedCechNerve F\n⊢ (equivalenceLeftToRight X F (equivalenceRightToLeft X F A)).right = A.right\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\n⊢ ∀ {X' X : Augmented C} {Y : Arrow C} (f : X' ⟶ X) (g : X ⟶ augmentedCechNerve.obj Y),\n    ↑(cechNerveEquiv X' Y).symm (f ≫ g) = Augmented.toArrow.map f ≫ ↑(cechNerveEquiv X Y).symm g\n[PROOFSTEP]\ndsimp [cechNerveEquiv]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\n⊢ ∀ {X' X : Augmented C} {Y : Arrow C} (f : X' ⟶ X) (g : X ⟶ augmentedCechNerve.obj Y),\n    equivalenceRightToLeft X' Y (f ≫ g) = Augmented.toArrow.map f ≫ equivalenceRightToLeft X Y g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\n⊢ ∀ {X : Augmented C} {Y Y' : Arrow C} (f : Augmented.toArrow.obj X ⟶ Y) (g : Y ⟶ Y'),\n    ↑(cechNerveEquiv X Y') (f ≫ g) = ↑(cechNerveEquiv X Y) f ≫ augmentedCechNerve.map g\n[PROOFSTEP]\ndsimp [cechNerveEquiv]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePullback f.right (fun x => f.left) fun x => f.hom\n⊢ ∀ {X : Augmented C} {Y Y' : Arrow C} (f : Augmented.toArrow.obj X ⟶ Y) (g : Y ⟶ Y'),\n    equivalenceLeftToRight X Y' (f ≫ g) = equivalenceLeftToRight X Y f ≫ augmentedCechNerve.map g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nx y : SimplexCategory\ng : x ⟶ y\n⊢ (fun n => widePushout f.left (fun x => f.right) fun x => f.hom) x ⟶\n    (fun n => widePushout f.left (fun x => f.right) fun x => f.hom) y\n[PROOFSTEP]\nrefine'\n  WidePushout.desc (WidePushout.head _) (fun i => (@WidePushout.ι _ _ _ _ _ (fun _ => f.hom) ?_ (g.toOrderHom i)))\n    (fun j => _)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nf : Arrow C\ninst✝ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nx y : SimplexCategory\ng : x ⟶ y\nj : Fin (SimplexCategory.len x + 1)\n⊢ f.hom ≫ (fun i => WidePushout.ι (fun x => f.hom) (↑(SimplexCategory.Hom.toOrderHom g) i)) j =\n    WidePushout.head fun x => f.hom\n[PROOFSTEP]\nerw [← WidePushout.arrow_ι]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf✝ : Arrow C\ninst✝² : ∀ (n : ℕ), HasWidePushout f✝.left (fun x => f✝.right) fun x => f✝.hom\nf g : Arrow C\ninst✝¹ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom\ninst✝ : ∀ (n : ℕ), HasWidePushout g.left (fun x => g.right) fun x => g.hom\nF : f ⟶ g\nn : SimplexCategory\ni : Fin (SimplexCategory.len n + 1)\n⊢ g.right ⟶ (cechConerve g).obj n\n[PROOFSTEP]\napply WidePushout.ι _ i\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nf✝ : Arrow C\ninst✝² : ∀ (n : ℕ), HasWidePushout f✝.left (fun x => f✝.right) fun x => f✝.hom\nf g : Arrow C\ninst✝¹ : ∀ (n : ℕ), HasWidePushout f.left (fun x => f.right) fun x => f.hom\ninst✝ : ∀ (n : ℕ), HasWidePushout g.left (fun x => g.right) fun x => g.hom\nF : f ⟶ g\nn : SimplexCategory\ni : Fin (SimplexCategory.len n + 1)\n⊢ f.hom ≫ (fun i => F.right ≫ WidePushout.ι (fun x => g.hom) i) i = F.left ≫ WidePushout.head fun x => g.hom\n[PROOFSTEP]\nrw [← Arrow.w_assoc F, ← WidePushout.arrow_ι]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : Arrow.augmentedCechConerve F ⟶ X\n⊢ (𝟭 C).map G.left ≫ (Augmented.toArrow.obj X).hom =\n    F.hom ≫ (𝟭 C).map (WidePushout.ι (fun x => F.hom) 0 ≫ NatTrans.app G.right (SimplexCategory.mk 0))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : Arrow.augmentedCechConerve F ⟶ X\n⊢ G.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0) =\n    F.hom ≫ WidePushout.ι (fun x => F.hom) 0 ≫ NatTrans.app G.right (SimplexCategory.mk 0)\n[PROOFSTEP]\nrw [@WidePushout.arrow_ι_assoc _ _ _ _ _ (fun (_ : Fin 1) => F.hom) (by dsimp; infer_instance)]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : Arrow.augmentedCechConerve F ⟶ X\n⊢ HasWidePushout ((𝟭 C).obj F.left) (fun x => (𝟭 C).obj F.right) fun x => F.hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : Arrow.augmentedCechConerve F ⟶ X\n⊢ HasWidePushout F.left (fun x => F.right) fun x => F.hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : Arrow.augmentedCechConerve F ⟶ X\n⊢ G.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0) =\n    (WidePushout.head fun x => F.hom) ≫ NatTrans.app G.right (SimplexCategory.mk 0)\n[PROOFSTEP]\nexact congr_app G.w (SimplexCategory.mk 0)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\n⊢ ∀ (j : Fin (SimplexCategory.len x + 1)),\n    F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\nrintro j\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\n⊢ F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\nrw [← Arrow.w_assoc G]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\n⊢ G.left ≫ (Augmented.toArrow.obj X).hom ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\nhave t := X.hom.naturality (x.const j)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\nt :\n  ((const C).obj X.left).map (SimplexCategory.const x j) ≫ NatTrans.app X.hom x =\n    NatTrans.app X.hom (SimplexCategory.mk 0) ≫ ((𝟭 (CosimplicialObject C)).obj X.right).map (SimplexCategory.const x j)\n⊢ G.left ≫ (Augmented.toArrow.obj X).hom ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\ndsimp at t ⊢\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\nt :\n  𝟙 X.left ≫ NatTrans.app X.hom x = NatTrans.app X.hom (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j)\n⊢ G.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j) =\n    G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\nsimp only [Category.id_comp] at t \n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\nt : NatTrans.app X.hom x = NatTrans.app X.hom (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j)\n⊢ G.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0) ≫ X.right.map (SimplexCategory.const x j) =\n    G.left ≫ NatTrans.app X.hom x\n[PROOFSTEP]\nrw [← t]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\n⊢ ∀ ⦃X_1 Y : SimplexCategory⦄ (f : X_1 ⟶ Y),\n    (Arrow.augmentedCechConerve F).right.map f ≫\n        (fun x =>\n            WidePushout.desc (G.left ≫ NatTrans.app X.hom x)\n              (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n              (_ :\n                ∀ (j : Fin (SimplexCategory.len x + 1)),\n                  F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j =\n                    G.left ≫ NatTrans.app X.hom x))\n          Y =\n      (fun x =>\n            WidePushout.desc (G.left ≫ NatTrans.app X.hom x)\n              (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n              (_ :\n                ∀ (j : Fin (SimplexCategory.len x + 1)),\n                  F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j =\n                    G.left ≫ NatTrans.app X.hom x))\n          X_1 ≫\n        X.right.map f\n[PROOFSTEP]\nintro x y f\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\n⊢ (Arrow.augmentedCechConerve F).right.map f ≫\n      (fun x =>\n          WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n            (_ :\n              ∀ (j : Fin (SimplexCategory.len x + 1)),\n                F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ NatTrans.app X.hom x))\n        y =\n    (fun x =>\n          WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n            (_ :\n              ∀ (j : Fin (SimplexCategory.len x + 1)),\n                F.hom ≫ (fun i => G.right ≫ X.right.map (SimplexCategory.const x i)) j = G.left ≫ NatTrans.app X.hom x))\n        x ≫\n      X.right.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\n⊢ WidePushout.desc (WidePushout.head fun x => F.hom)\n        (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len x + 1)),\n            F.hom ≫ (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i)) j =\n              WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (G.left ≫ NatTrans.app X.hom y) (fun i => G.right ≫ X.right.map (SimplexCategory.const y i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len y + 1)),\n            F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const y j) = G.left ≫ NatTrans.app X.hom y) =\n    WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len x + 1)),\n            F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x) ≫\n      X.right.map f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len x + 1)\n⊢ WidePushout.ι (fun x => F.hom) j✝ ≫\n      WidePushout.desc (WidePushout.head fun x => F.hom)\n          (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i)) j =\n                WidePushout.head fun x => F.hom) ≫\n        WidePushout.desc (G.left ≫ NatTrans.app X.hom y) (fun i => G.right ≫ X.right.map (SimplexCategory.const y i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const y j) = G.left ≫ NatTrans.app X.hom y) =\n    WidePushout.ι (fun x => F.hom) j✝ ≫\n      WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x) ≫\n        X.right.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len x + 1)\n⊢ WidePushout.ι (fun x => F.hom) j✝ ≫\n      WidePushout.desc (WidePushout.head fun x => F.hom)\n          (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i)) j =\n                WidePushout.head fun x => F.hom) ≫\n        WidePushout.desc (G.left ≫ NatTrans.app X.hom y) (fun i => G.right ≫ X.right.map (SimplexCategory.const y i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const y j) = G.left ≫ NatTrans.app X.hom y) =\n    WidePushout.ι (fun x => F.hom) j✝ ≫\n      WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x) ≫\n        X.right.map f\n[PROOFSTEP]\nsimp only [WidePushout.ι_desc_assoc, WidePushout.ι_desc]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len x + 1)\n⊢ G.right ≫ X.right.map (SimplexCategory.const y (↑(SimplexCategory.Hom.toOrderHom f) j✝)) =\n    (G.right ≫ X.right.map (SimplexCategory.const x j✝)) ≫ X.right.map f\n[PROOFSTEP]\nrw [Category.assoc, ← X.right.map_comp]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\nj✝ : Fin (SimplexCategory.len x + 1)\n⊢ G.right ≫ X.right.map (SimplexCategory.const y (↑(SimplexCategory.Hom.toOrderHom f) j✝)) =\n    G.right ≫ X.right.map (SimplexCategory.const x j✝ ≫ f)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\n⊢ (WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (WidePushout.head fun x => F.hom)\n          (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i)) j =\n                WidePushout.head fun x => F.hom) ≫\n        WidePushout.desc (G.left ≫ NatTrans.app X.hom y) (fun i => G.right ≫ X.right.map (SimplexCategory.const y i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const y j) = G.left ≫ NatTrans.app X.hom y) =\n    (WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x) ≫\n        X.right.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\n⊢ (WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (WidePushout.head fun x => F.hom)\n          (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ (fun i => WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom f) i)) j =\n                WidePushout.head fun x => F.hom) ≫\n        WidePushout.desc (G.left ≫ NatTrans.app X.hom y) (fun i => G.right ≫ X.right.map (SimplexCategory.const y i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len y + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const y j) = G.left ≫ NatTrans.app X.hom y) =\n    (WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (G.left ≫ NatTrans.app X.hom x) (fun i => G.right ≫ X.right.map (SimplexCategory.const x i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ G.right ≫ X.right.map (SimplexCategory.const x j) = G.left ≫ NatTrans.app X.hom x) ≫\n        X.right.map f\n[PROOFSTEP]\nsimp only [Functor.const_obj_map, ← NatTrans.naturality, WidePushout.head_desc_assoc, WidePushout.head_desc,\n  Category.assoc]\n[GOAL]\ncase a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nG : F ⟶ Augmented.toArrow.obj X\nx y : SimplexCategory\nf : x ⟶ y\n⊢ G.left ≫ NatTrans.app X.hom y = G.left ≫ 𝟙 X.left ≫ NatTrans.app X.hom y\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\n⊢ Function.LeftInverse (equivalenceRightToLeft F X) (equivalenceLeftToRight F X)\n[PROOFSTEP]\nintro A\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\n⊢ equivalenceRightToLeft F X (equivalenceLeftToRight F X A) = A\n[PROOFSTEP]\next x : 2\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\n⊢ (equivalenceRightToLeft F X (equivalenceLeftToRight F X A)).left = A.left\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\n⊢ NatTrans.app (equivalenceRightToLeft F X (equivalenceLeftToRight F X A)).right x = NatTrans.app A.right x\n[PROOFSTEP]\nrefine' WidePushout.hom_ext _ _ _ (fun j => _) _\n[GOAL]\ncase h₂.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\n⊢ WidePushout.ι (fun x => F.hom) j ≫ NatTrans.app (equivalenceRightToLeft F X (equivalenceLeftToRight F X A)).right x =\n    WidePushout.ι (fun x => F.hom) j ≫ NatTrans.app A.right x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\n⊢ WidePushout.ι (fun x => F.hom) j ≫\n      WidePushout.desc (A.left ≫ NatTrans.app X.hom x)\n        (fun i =>\n          (WidePushout.ι (fun x => F.hom) 0 ≫ NatTrans.app A.right (SimplexCategory.mk 0)) ≫\n            X.right.map (SimplexCategory.const x i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len x + 1)),\n            F.hom ≫ (fun i => (equivalenceLeftToRight F X A).right ≫ X.right.map (SimplexCategory.const x i)) j =\n              (equivalenceLeftToRight F X A).left ≫ NatTrans.app X.hom x) =\n    WidePushout.ι (fun x => F.hom) j ≫ NatTrans.app A.right x\n[PROOFSTEP]\nsimp only [Category.assoc, ← NatTrans.naturality A.right, Arrow.augmentedCechConerve_right, SimplexCategory.len_mk,\n  Arrow.cechConerve_map, colimit.ι_desc, WidePushoutShape.mkCocone_ι_app, colimit.ι_desc_assoc]\n[GOAL]\ncase h₂.h.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\nj : Fin (SimplexCategory.len x + 1)\n⊢ WidePushout.ι (fun x => F.hom) (↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const x j)) 0) ≫\n      NatTrans.app A.right x =\n    WidePushout.ι (fun x => F.hom) j ≫ NatTrans.app A.right x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂.h.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\n⊢ (WidePushout.head fun x => F.hom) ≫ NatTrans.app (equivalenceRightToLeft F X (equivalenceLeftToRight F X A)).right x =\n    (WidePushout.head fun x => F.hom) ≫ NatTrans.app A.right x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂.h.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\n⊢ (WidePushout.head fun x => F.hom) ≫\n      WidePushout.desc (A.left ≫ NatTrans.app X.hom x)\n        (fun i =>\n          (WidePushout.ι (fun x => F.hom) 0 ≫ NatTrans.app A.right (SimplexCategory.mk 0)) ≫\n            X.right.map (SimplexCategory.const x i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len x + 1)),\n            F.hom ≫ (fun i => (equivalenceLeftToRight F X A).right ≫ X.right.map (SimplexCategory.const x i)) j =\n              (equivalenceLeftToRight F X A).left ≫ NatTrans.app X.hom x) =\n    (WidePushout.head fun x => F.hom) ≫ NatTrans.app A.right x\n[PROOFSTEP]\nrw [colimit.ι_desc]\n[GOAL]\ncase h₂.h.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : Arrow.augmentedCechConerve F ⟶ X\nx : SimplexCategory\n⊢ NatTrans.app\n      (WidePushoutShape.mkCocone (A.left ≫ NatTrans.app X.hom x)\n          (fun i =>\n            (WidePushout.ι (fun x => F.hom) 0 ≫ NatTrans.app A.right (SimplexCategory.mk 0)) ≫\n              X.right.map (SimplexCategory.const x i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len x + 1)),\n              F.hom ≫ (fun i => (equivalenceLeftToRight F X A).right ≫ X.right.map (SimplexCategory.const x i)) j =\n                (equivalenceLeftToRight F X A).left ≫ NatTrans.app X.hom x)).ι\n      none =\n    (WidePushout.head fun x => F.hom) ≫ NatTrans.app A.right x\n[PROOFSTEP]\nexact congr_app A.w x\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\n⊢ Function.RightInverse (equivalenceRightToLeft F X) (equivalenceLeftToRight F X)\n[PROOFSTEP]\nintro A\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ equivalenceLeftToRight F X (equivalenceRightToLeft F X A) = A\n[PROOFSTEP]\next\n[GOAL]\ncase h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ (equivalenceLeftToRight F X (equivalenceRightToLeft F X A)).left = A.left\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ (equivalenceLeftToRight F X (equivalenceRightToLeft F X A)).right = A.right\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ WidePushout.ι (fun x => F.hom) 0 ≫\n      WidePushout.desc (A.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0))\n        (fun i => A.right ≫ X.right.map (SimplexCategory.const (SimplexCategory.mk 0) i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len (SimplexCategory.mk 0) + 1)),\n            F.hom ≫ (fun i => A.right ≫ X.right.map (SimplexCategory.const (SimplexCategory.mk 0) i)) j =\n              A.left ≫ NatTrans.app X.hom (SimplexCategory.mk 0)) =\n    A.right\n[PROOFSTEP]\nerw [WidePushout.ι_desc]\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ A.right ≫ X.right.map (SimplexCategory.const (SimplexCategory.mk 0) 0) = A.right\n[PROOFSTEP]\nnth_rw 2 [← Category.comp_id A.right]\n[GOAL]\ncase h₂\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ A.right ≫ X.right.map (SimplexCategory.const (SimplexCategory.mk 0) 0) = A.right ≫ 𝟙 (Augmented.toArrow.obj X).right\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h₂.e_a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ X.right.map (SimplexCategory.const (SimplexCategory.mk 0) 0) = 𝟙 (Augmented.toArrow.obj X).right\n[PROOFSTEP]\nconvert X.right.map_id _\n[GOAL]\ncase h.e'_2.h.h.e'_8\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\n⊢ SimplexCategory.const (SimplexCategory.mk 0) 0 = 𝟙 (SimplexCategory.mk 0)\n[PROOFSTEP]\next ⟨a, ha⟩\n[GOAL]\ncase h.e'_2.h.h.e'_8.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\na : ℕ\nha : a < SimplexCategory.len (SimplexCategory.mk 0) + 1\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const (SimplexCategory.mk 0) 0)) { val := a, isLt := ha }) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom (𝟙 (SimplexCategory.mk 0))) { val := a, isLt := ha })\n[PROOFSTEP]\nchange a < 1 at ha \n[GOAL]\ncase h.e'_2.h.h.e'_8.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\na : ℕ\nha : a < 1\n⊢ ↑(↑(SimplexCategory.Hom.toOrderHom (SimplexCategory.const (SimplexCategory.mk 0) 0)) { val := a, isLt := ha }) =\n    ↑(↑(SimplexCategory.Hom.toOrderHom (𝟙 (SimplexCategory.mk 0))) { val := a, isLt := ha })\n[PROOFSTEP]\nchange 0 = a\n[GOAL]\ncase h.e'_2.h.h.e'_8.a.h.h.mk.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : ∀ (n : ℕ) (f : Arrow C), HasWidePushout f.left (fun x => f.right) fun x => f.hom\nF : Arrow C\nX : Augmented C\nA : F ⟶ Augmented.toArrow.obj X\na : ℕ\nha : a < 1\n⊢ 0 = a\n[PROOFSTEP]\nlinarith\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasTerminal C\nι : Type w\nX Y : C\n⊢ Unique (Y ⟶ (wideCospan ι X).obj none)\n[PROOFSTEP]\ndsimp [wideCospan]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasTerminal C\nι : Type w\nX Y : C\n⊢ Unique (Y ⟶ ⊤_ C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ni j : WidePullbackShape ι\nf : i ⟶ j\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map f ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        j =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        i ≫\n      (wideCospan ι X).map f\n[PROOFSTEP]\ncases f\n[GOAL]\ncase id\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ni : WidePullbackShape ι\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.id i) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        i =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        i ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.id i)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase id.none\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.id none) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        none =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        none ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.id none)\ncase id.some\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nval✝ : ι\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.id (some val✝)) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        (some val✝) =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        (some val✝) ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.id (some val✝))\n[PROOFSTEP]\nall_goals dsimp; simp\n[GOAL]\ncase id.none\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.id none) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        none =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        none ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.id none)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase id.none\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\n⊢ 𝟙 (∏ fun x => X) ≫ terminal.from (∏ fun x => X) = terminal.from (∏ fun x => X) ≫ (wideCospan ι X).map (𝟙 none)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id.some\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nval✝ : ι\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.id (some val✝)) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        (some val✝) =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        (some val✝) ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.id (some val✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase id.some\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nval✝ : ι\n⊢ 𝟙 (∏ fun x => X) ≫ limit.π (Discrete.functor fun x => X) { as := val✝ } =\n    limit.π (Discrete.functor fun x => X) { as := val✝ } ≫ (wideCospan ι X).map (𝟙 (some val✝))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase term\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nj✝ : ι\n⊢ ((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).map (WidePullbackShape.Hom.term j✝) ≫\n      (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        none =\n    (fun X_1 =>\n          Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n            fun i => limit.π (Discrete.functor fun x => X) { as := i })\n        (some j✝) ≫\n      (wideCospan ι X).map (WidePullbackShape.Hom.term j✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase term\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nj✝ : ι\n⊢ 𝟙 (∏ fun x => X) ≫ terminal.from (∏ fun x => X) =\n    limit.π (Discrete.functor fun x => X) { as := j✝ } ≫ (wideCospan ι X).map (WidePullbackShape.Hom.term j✝)\n[PROOFSTEP]\nsimp only [terminal.comp_from]\n[GOAL]\ncase term\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nj✝ : ι\n⊢ terminal.from (∏ fun x => X) =\n    limit.π (Discrete.functor fun x => X) { as := j✝ } ≫ (wideCospan ι X).map (WidePullbackShape.Hom.term j✝)\n[PROOFSTEP]\nexact Subsingleton.elim _ _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\n⊢ f = (fun s => Pi.lift fun j => NatTrans.app s.π (some j)) s\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\n⊢ f = Pi.lift fun j => NatTrans.app s.π (some j)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\nj : ι\n⊢ f ≫ Pi.π (fun x => X) j = (Pi.lift fun j => NatTrans.app s.π (some j)) ≫ Pi.π (fun x => X) j\n[PROOFSTEP]\ndsimp only [Limits.Pi.lift]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\nj : ι\n⊢ f ≫ Pi.π (fun x => X) j =\n    limit.lift (Discrete.functor fun b => X) (Fan.mk s.pt fun j => NatTrans.app s.π (some j)) ≫ Pi.π (fun x => X) j\n[PROOFSTEP]\nrw [limit.lift_π]\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\nj : ι\n⊢ f ≫ Pi.π (fun x => X) j = NatTrans.app (Fan.mk s.pt fun j => NatTrans.app s.π (some j)).π { as := j }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\ns : Cone (wideCospan ι X)\nf :\n  s.pt ⟶\n    { pt := ∏ fun x => X,\n        π :=\n          NatTrans.mk fun X_1 =>\n            Option.casesOn X_1 (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none))\n              fun i => limit.π (Discrete.functor fun x => X) { as := i } }.pt\nh :\n  ∀ (j : WidePullbackShape ι),\n    f ≫\n        NatTrans.app\n          { pt := ∏ fun x => X,\n              π :=\n                NatTrans.mk fun X_1 =>\n                  Option.casesOn X_1\n                    (terminal.from (((Functor.const (WidePullbackShape ι)).obj (∏ fun x => X)).obj none)) fun i =>\n                    limit.π (Discrete.functor fun x => X) { as := i } }.π\n          j =\n      NatTrans.app s.π j\nj : ι\n⊢ f ≫ Pi.π (fun x => X) j = NatTrans.app s.π (some j)\n[PROOFSTEP]\nrw [← h (some j)]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\n⊢ HasWidePullback (Arrow.mk (terminal.from X)).right (fun x => (Arrow.mk (terminal.from X)).left) fun x =>\n    (Arrow.mk (terminal.from X)).hom\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nval✝ : Fintype ι\n⊢ HasWidePullback (Arrow.mk (terminal.from X)).right (fun x => (Arrow.mk (terminal.from X)).left) fun x =>\n    (Arrow.mk (terminal.from X)).hom\n[PROOFSTEP]\nexact ⟨⟨wideCospan.limitCone ι X⟩⟩\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasTerminal C\nι : Type w\ninst✝¹ : HasFiniteProducts C\ninst✝ : Finite ι\nX : C\nj : ι\n⊢ (limitIsoPi ι X).hom ≫ Pi.π (fun x => X) j = WidePullback.π (fun x => terminal.from X) j\n[PROOFSTEP]\nrw [← wideCospan.limitIsoPi_inv_comp_pi, Iso.hom_inv_id_assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasTerminal C\nι : Type w\ninst✝ : HasFiniteProducts C\nX : C\nm n : SimplexCategoryᵒᵖ\nf : m ⟶ n\n⊢ (Arrow.cechNerve (Arrow.mk (terminal.from X))).map f ≫\n      ((fun m => wideCospan.limitIsoPi (Fin (SimplexCategory.len m.unop + 1)) (Arrow.mk (terminal.from X)).left)\n          n).hom =\n    ((fun m => wideCospan.limitIsoPi (Fin (SimplexCategory.len m.unop + 1)) (Arrow.mk (terminal.from X)).left) m).hom ≫\n      (cechNerveTerminalFrom X).map f\n[PROOFSTEP]\ndsimp only [cechNerveTerminalFrom, Arrow.cechNerve]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasTerminal C\nι : Type w\ninst✝ : HasFiniteProducts C\nX : C\nm n : SimplexCategoryᵒᵖ\nf : m ⟶ n\n⊢ WidePullback.lift (WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom)\n        (fun i =>\n          WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len n.unop + 1)),\n            WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫\n                (Arrow.mk (terminal.from X)).hom =\n              WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom) ≫\n      (wideCospan.limitIsoPi (Fin (SimplexCategory.len n.unop + 1)) (Arrow.mk (terminal.from X)).left).hom =\n    (wideCospan.limitIsoPi (Fin (SimplexCategory.len m.unop + 1)) (Arrow.mk (terminal.from X)).left).hom ≫\n      Pi.lift fun i => Pi.π (fun x => X) (↑(SimplexCategory.Hom.toOrderHom f.unop) i)\n[PROOFSTEP]\next ⟨j⟩\n[GOAL]\ncase h.mk\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasTerminal C\nι : Type w\ninst✝ : HasFiniteProducts C\nX : C\nm n : SimplexCategoryᵒᵖ\nf : m ⟶ n\nj : ℕ\nisLt✝ : j < SimplexCategory.len n.unop + 1\n⊢ (WidePullback.lift (WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom)\n          (fun i =>\n            WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len n.unop + 1)),\n              WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫\n                  (Arrow.mk (terminal.from X)).hom =\n                WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom) ≫\n        (wideCospan.limitIsoPi (Fin (SimplexCategory.len n.unop + 1)) (Arrow.mk (terminal.from X)).left).hom) ≫\n      Pi.π (fun x => X) { val := j, isLt := isLt✝ } =\n    ((wideCospan.limitIsoPi (Fin (SimplexCategory.len m.unop + 1)) (Arrow.mk (terminal.from X)).left).hom ≫\n        Pi.lift fun i => Pi.π (fun x => X) (↑(SimplexCategory.Hom.toOrderHom f.unop) i)) ≫\n      Pi.π (fun x => X) { val := j, isLt := isLt✝ }\n[PROOFSTEP]\nsimp only [Category.assoc, limit.lift_π, Fan.mk_π_app]\n[GOAL]\ncase h.mk\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasTerminal C\nι : Type w\ninst✝ : HasFiniteProducts C\nX : C\nm n : SimplexCategoryᵒᵖ\nf : m ⟶ n\nj : ℕ\nisLt✝ : j < SimplexCategory.len n.unop + 1\n⊢ WidePullback.lift (WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom)\n        (fun i =>\n          WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n        (_ :\n          ∀ (j : Fin (SimplexCategory.len n.unop + 1)),\n            WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫\n                (Arrow.mk (terminal.from X)).hom =\n              WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom) ≫\n      (wideCospan.limitIsoPi (Fin (SimplexCategory.len n.unop + 1)) (Arrow.mk (terminal.from X)).left).hom ≫\n        Pi.π (fun x => X) { val := j, isLt := isLt✝ } =\n    (wideCospan.limitIsoPi (Fin (SimplexCategory.len m.unop + 1)) (Arrow.mk (terminal.from X)).left).hom ≫\n      Pi.π (fun x => X) (↑(SimplexCategory.Hom.toOrderHom f.unop) { val := j, isLt := isLt✝ })\n[PROOFSTEP]\nerw [wideCospan.limitIsoPi_hom_comp_pi, wideCospan.limitIsoPi_hom_comp_pi, limit.lift_π]\n[GOAL]\ncase h.mk\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasTerminal C\nι : Type w\ninst✝ : HasFiniteProducts C\nX : C\nm n : SimplexCategoryᵒᵖ\nf : m ⟶ n\nj : ℕ\nisLt✝ : j < SimplexCategory.len n.unop + 1\n⊢ NatTrans.app\n      (WidePullbackShape.mkCone (WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom)\n          (fun i =>\n            WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) i))\n          (_ :\n            ∀ (j : Fin (SimplexCategory.len n.unop + 1)),\n              WidePullback.π (fun x => (Arrow.mk (terminal.from X)).hom) (↑(SimplexCategory.Hom.toOrderHom f.unop) j) ≫\n                  (Arrow.mk (terminal.from X)).hom =\n                WidePullback.base fun x => (Arrow.mk (terminal.from X)).hom)).π\n      (some { val := j, isLt := isLt✝ }) =\n    WidePullback.π (fun x => terminal.from X) (↑(SimplexCategory.Hom.toOrderHom f.unop) { val := j, isLt := isLt✝ })\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.CechNerve", "llama_tokens": 30265, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6039318337259584, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.2878216225833632}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\n⊢ Set.Pairwise (⋃ (n : κ), f n) r ↔ ∀ (n : κ), Set.Pairwise (f n) r\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\n⊢ Set.Pairwise (⋃ (n : κ), f n) r → ∀ (n : κ), Set.Pairwise (f n) r\n[PROOFSTEP]\nintro H n\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\nH : Set.Pairwise (⋃ (n : κ), f n) r\nn : κ\n⊢ Set.Pairwise (f n) r\n[PROOFSTEP]\nexact Pairwise.mono (subset_iUnion _ _) H\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\n⊢ (∀ (n : κ), Set.Pairwise (f n) r) → Set.Pairwise (⋃ (n : κ), f n) r\n[PROOFSTEP]\nintro H i hi j hj hij\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\nH : ∀ (n : κ), Set.Pairwise (f n) r\ni : α\nhi : i ∈ ⋃ (n : κ), f n\nj : α\nhj : j ∈ ⋃ (n : κ), f n\nhij : i ≠ j\n⊢ r i j\n[PROOFSTEP]\nrcases mem_iUnion.1 hi with ⟨m, hm⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\nH : ∀ (n : κ), Set.Pairwise (f n) r\ni : α\nhi : i ∈ ⋃ (n : κ), f n\nj : α\nhj : j ∈ ⋃ (n : κ), f n\nhij : i ≠ j\nm : κ\nhm : i ∈ f m\n⊢ r i j\n[PROOFSTEP]\nrcases mem_iUnion.1 hj with ⟨n, hn⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\nH : ∀ (n : κ), Set.Pairwise (f n) r\ni : α\nhi : i ∈ ⋃ (n : κ), f n\nj : α\nhj : j ∈ ⋃ (n : κ), f n\nhij : i ≠ j\nm : κ\nhm : i ∈ f m\nn : κ\nhn : j ∈ f n\n⊢ r i j\n[PROOFSTEP]\nrcases h m n with ⟨p, mp, np⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p✝ q : α → α → Prop\nf✝ g : ι → α\ns t u : Set α\na b : α\nf : κ → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\nH : ∀ (n : κ), Set.Pairwise (f n) r\ni : α\nhi : i ∈ ⋃ (n : κ), f n\nj : α\nhj : j ∈ ⋃ (n : κ), f n\nhij : i ≠ j\nm : κ\nhm : i ∈ f m\nn : κ\nhn : j ∈ f n\np : κ\nmp : f m ⊆ f p\nnp : f n ⊆ f p\n⊢ r i j\n[PROOFSTEP]\nexact H p (mp hm) (np hn) hij\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr✝ p q : α → α → Prop\nf g : ι → α\ns✝ t u : Set α\na b : α\nr : α → α → Prop\ns : Set (Set α)\nh : DirectedOn (fun x x_1 => x ⊆ x_1) s\n⊢ Set.Pairwise (⋃₀ s) r ↔ ∀ (a : Set α), a ∈ s → Set.Pairwise a r\n[PROOFSTEP]\nrw [sUnion_eq_iUnion, pairwise_iUnion h.directed_val, SetCoe.forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\n⊢ PairwiseDisjoint (⋃ (i : ι') (_ : i ∈ s), g i) f\n[PROOFSTEP]\nrintro a ha b hb hab\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na : ι\nha : a ∈ ⋃ (i : ι') (_ : i ∈ s), g i\nb : ι\nhb : b ∈ ⋃ (i : ι') (_ : i ∈ s), g i\nhab : a ≠ b\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nsimp_rw [Set.mem_iUnion] at ha hb \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na b : ι\nhab : a ≠ b\nha : ∃ i i_1, a ∈ g i\nhb : ∃ i i_1, b ∈ g i\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nobtain ⟨c, hc, ha⟩ := ha\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na b : ι\nhab : a ≠ b\nhb : ∃ i i_1, b ∈ g i\nc : ι'\nhc : c ∈ s\nha : a ∈ g c\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nobtain ⟨d, hd, hb⟩ := hb\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na b : ι\nhab : a ≠ b\nc : ι'\nhc : c ∈ s\nha : a ∈ g c\nd : ι'\nhd : d ∈ s\nhb : b ∈ g d\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nobtain hcd | hcd := eq_or_ne (g c) (g d)\n[GOAL]\ncase intro.intro.intro.intro.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na b : ι\nhab : a ≠ b\nc : ι'\nhc : c ∈ s\nha : a ∈ g c\nd : ι'\nhd : d ∈ s\nhb : b ∈ g d\nhcd : g c = g d\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nexact hg d hd (hcd.subst ha) hb hab\n[GOAL]\ncase intro.intro.intro.intro.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns✝ : Set ι\nt s : Set ι'\ng : ι' → Set ι\nf : ι → α\nhs : PairwiseDisjoint s fun i' => ⨆ (i : ι) (_ : i ∈ g i'), f i\nhg : ∀ (i : ι'), i ∈ s → PairwiseDisjoint (g i) f\na b : ι\nhab : a ≠ b\nc : ι'\nhc : c ∈ s\nha : a ∈ g c\nd : ι'\nhd : d ∈ s\nhb : b ∈ g d\nhcd : g c ≠ g d\n⊢ (Disjoint on f) a b\n[PROOFSTEP]\nexact\n  (hs hc hd <| ne_of_apply_ne _ hcd).mono (le_iSup₂ (f := fun i (_ : i ∈ g c) => f i) a ha)\n    (le_iSup₂ (f := fun i (_ : i ∈ g d) => f i) b hb)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\n⊢ PairwiseDisjoint (s ×ˢ t) f\n[PROOFSTEP]\nrintro ⟨i, i'⟩ hi ⟨j, j'⟩ hj h\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i') ∈ s ×ˢ t\nj : ι\nj' : ι'\nhj : (j, j') ∈ s ×ˢ t\nh : (i, i') ≠ (j, j')\n⊢ (Disjoint on f) (i, i') (j, j')\n[PROOFSTEP]\nrw [mem_prod] at hi hj \n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\n⊢ (Disjoint on f) (i, i') (j, j')\n[PROOFSTEP]\nobtain rfl | hij := eq_or_ne i j\n[GOAL]\ncase mk.mk.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj' : ι'\nhj : (i, j').fst ∈ s ∧ (i, j').snd ∈ t\nh : (i, i') ≠ (i, j')\n⊢ (Disjoint on f) (i, i') (i, j')\n[PROOFSTEP]\nrefine' (ht hi.2 hj.2 <| (Prod.mk.inj_left _).ne_iff.1 h).mono _ _\n[GOAL]\ncase mk.mk.inl.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj' : ι'\nhj : (i, j').fst ∈ s ∧ (i, j').snd ∈ t\nh : (i, i') ≠ (i, j')\n⊢ f (i, i') ≤ (fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')) (i, i').snd\n[PROOFSTEP]\nconvert le_iSup₂ (α := α) i hi.1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj' : ι'\nhj : (i, j').fst ∈ s ∧ (i, j').snd ∈ t\nh : (i, i') ≠ (i, j')\n⊢ f (i, i') = f (i, (i, i').snd)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inl.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj' : ι'\nhj : (i, j').fst ∈ s ∧ (i, j').snd ∈ t\nh : (i, i') ≠ (i, j')\n⊢ f (i, j') ≤ (fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')) (i, j').snd\n[PROOFSTEP]\nconvert le_iSup₂ (α := α) i hj.1\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj' : ι'\nhj : (i, j').fst ∈ s ∧ (i, j').snd ∈ t\nh : (i, i') ≠ (i, j')\n⊢ f (i, j') = f (i, (i, j').snd)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\nhij : i ≠ j\n⊢ (Disjoint on f) (i, i') (j, j')\n[PROOFSTEP]\nrefine' (hs hi.1 hj.1 hij).mono _ _\n[GOAL]\ncase mk.mk.inr.refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\nhij : i ≠ j\n⊢ f (i, i') ≤ (fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')) (i, i').fst\n[PROOFSTEP]\nconvert le_iSup₂ (α := α) i' hi.2\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\nhij : i ≠ j\n⊢ f (i, i') = f ((i, i').fst, i')\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.mk.inr.refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\nhij : i ≠ j\n⊢ f (j, j') ≤ (fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')) (j, j').fst\n[PROOFSTEP]\nconvert le_iSup₂ (α := α) j' hj.2\n[GOAL]\ncase h.e'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : CompleteLattice α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nhs : PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')\nht : PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\ni : ι\ni' : ι'\nhi : (i, i').fst ∈ s ∧ (i, i').snd ∈ t\nj : ι\nj' : ι'\nhj : (j, j').fst ∈ s ∧ (j, j').snd ∈ t\nh : (i, i') ≠ (j, j')\nhij : i ≠ j\n⊢ f (j, j') = f ((j, j').fst, j')\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\n⊢ PairwiseDisjoint (s ×ˢ t) f ↔\n    (PairwiseDisjoint s fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')) ∧\n      PairwiseDisjoint t fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨fun i hi j hj hij => _, fun i hi j hj hij => _⟩, fun h => h.1.prod_left h.2⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι\nhi : i ∈ s\nj : ι\nhj : j ∈ s\nhij : i ≠ j\n⊢ (Disjoint on fun i => ⨆ (i' : ι') (_ : i' ∈ t), f (i, i')) i j\n[PROOFSTEP]\nsimp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι'\nhi : i ∈ t\nj : ι'\nhj : j ∈ t\nhij : i ≠ j\n⊢ (Disjoint on fun i' => ⨆ (i : ι) (_ : i ∈ s), f (i, i')) i j\n[PROOFSTEP]\nsimp_rw [Function.onFun, iSup_disjoint_iff, disjoint_iSup_iff]\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι\nhi : i ∈ s\nj : ι\nhj : j ∈ s\nhij : i ≠ j\n⊢ ∀ (i_1 : ι'), i_1 ∈ t → ∀ (i_3 : ι'), i_3 ∈ t → Disjoint (f (i, i_1)) (f (j, i_3))\n[PROOFSTEP]\nintro i' hi' j' hj'\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι'\nhi : i ∈ t\nj : ι'\nhj : j ∈ t\nhij : i ≠ j\n⊢ ∀ (i_1 : ι), i_1 ∈ s → ∀ (i_3 : ι), i_3 ∈ s → Disjoint (f (i_1, i)) (f (i_3, j))\n[PROOFSTEP]\nintro i' hi' j' hj'\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι\nhi : i ∈ s\nj : ι\nhj : j ∈ s\nhij : i ≠ j\ni' : ι'\nhi' : i' ∈ t\nj' : ι'\nhj' : j' ∈ t\n⊢ Disjoint (f (i, i')) (f (j, j'))\n[PROOFSTEP]\nexact h (mk_mem_prod hi hi') (mk_mem_prod hj hj') (ne_of_apply_ne Prod.fst hij)\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ninst✝ : Frame α\ns : Set ι\nt : Set ι'\nf : ι × ι' → α\nh : PairwiseDisjoint (s ×ˢ t) f\ni : ι'\nhi : i ∈ t\nj : ι'\nhj : j ∈ t\nhij : i ≠ j\ni' : ι\nhi' : i' ∈ s\nj' : ι\nhj' : j' ∈ s\n⊢ Disjoint (f (i', i)) (f (j', j))\n[PROOFSTEP]\nexact h (mk_mem_prod hi' hi) (mk_mem_prod hj' hj) (ne_of_apply_ne Prod.snd hij)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ns t : Set ι\nf : ι → Set α\nh : PairwiseDisjoint (s ∪ t) f\n⊢ (⋃ (i : ι) (_ : i ∈ s), f i) \\ ⋃ (i : ι) (_ : i ∈ t), f i = ⋃ (i : ι) (_ : i ∈ s \\ t), f i\n[PROOFSTEP]\nrefine'\n  (biUnion_diff_biUnion_subset f s t).antisymm (iUnion₂_subset fun i hi a ha => (mem_diff _).2 ⟨mem_biUnion hi.1 ha, _⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ns t : Set ι\nf : ι → Set α\nh : PairwiseDisjoint (s ∪ t) f\ni : ι\nhi : i ∈ s \\ t\na : α\nha : a ∈ f i\n⊢ ¬a ∈ ⋃ (x : ι) (_ : x ∈ t), f x\n[PROOFSTEP]\nrw [mem_iUnion₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ns t : Set ι\nf : ι → Set α\nh : PairwiseDisjoint (s ∪ t) f\ni : ι\nhi : i ∈ s \\ t\na : α\nha : a ∈ f i\n⊢ ¬∃ i j, a ∈ f i\n[PROOFSTEP]\nrintro ⟨j, hj, haj⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\ns t : Set ι\nf : ι → Set α\nh : PairwiseDisjoint (s ∪ t) f\ni : ι\nhi : i ∈ s \\ t\na : α\nha : a ∈ f i\nj : ι\nhj : j ∈ t\nhaj : a ∈ f j\n⊢ False\n[PROOFSTEP]\nexact (h (Or.inl hi.1) (Or.inr hj) (ne_of_mem_of_not_mem hj hi.2).symm).le_bot ⟨ha, haj⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf : ι → Set α\ns t : Set ι\nh₀ : PairwiseDisjoint (s ∪ t) f\nh₁ : ∀ (i : ι), i ∈ s → Set.Nonempty (f i)\nh : ⋃ (i : ι) (_ : i ∈ s), f i ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\n⊢ s ⊆ t\n[PROOFSTEP]\nrintro i hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf : ι → Set α\ns t : Set ι\nh₀ : PairwiseDisjoint (s ∪ t) f\nh₁ : ∀ (i : ι), i ∈ s → Set.Nonempty (f i)\nh : ⋃ (i : ι) (_ : i ∈ s), f i ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\ni : ι\nhi : i ∈ s\n⊢ i ∈ t\n[PROOFSTEP]\nobtain ⟨a, hai⟩ := h₁ i hi\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf : ι → Set α\ns t : Set ι\nh₀ : PairwiseDisjoint (s ∪ t) f\nh₁ : ∀ (i : ι), i ∈ s → Set.Nonempty (f i)\nh : ⋃ (i : ι) (_ : i ∈ s), f i ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\ni : ι\nhi : i ∈ s\na : α\nhai : a ∈ f i\n⊢ i ∈ t\n[PROOFSTEP]\nobtain ⟨j, hj, haj⟩ := mem_iUnion₂.1 (h <| mem_iUnion₂_of_mem hi hai)\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Type u_5\nκ : Sort u_6\nr p q : α → α → Prop\nf : ι → Set α\ns t : Set ι\nh₀ : PairwiseDisjoint (s ∪ t) f\nh₁ : ∀ (i : ι), i ∈ s → Set.Nonempty (f i)\nh : ⋃ (i : ι) (_ : i ∈ s), f i ⊆ ⋃ (i : ι) (_ : i ∈ t), f i\ni : ι\nhi : i ∈ s\na : α\nhai : a ∈ f i\nj : ι\nhj : j ∈ t\nhaj : a ∈ f j\n⊢ i ∈ t\n[PROOFSTEP]\nrwa [h₀.eq (subset_union_left _ _ hi) (subset_union_right _ _ hj) (not_disjoint_iff.2 ⟨a, hai, haj⟩)]\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Pairwise.Lattice", "llama_tokens": 10807, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6039318337259583, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.28782162258336313}}
{"text": "[GOAL]\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nw :\n  ∀ (x : { x // x ∈ U }),\n    ∃ V x i,\n      PrelocalPredicate.pred\n        { pred := fun {U} => PrelocalPredicate.pred src✝,\n          res :=\n            (_ :\n              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n                PrelocalPredicate.pred src✝ f →\n                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ PrelocalPredicate.pred\n    { pred := fun {U} => PrelocalPredicate.pred src✝,\n      res :=\n        (_ :\n          ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n            PrelocalPredicate.pred src✝ f →\n              PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n    f\n[PROOFSTEP]\napply continuous_iff_continuousAt.2\n[GOAL]\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nw :\n  ∀ (x : { x // x ∈ U }),\n    ∃ V x i,\n      PrelocalPredicate.pred\n        { pred := fun {U} => PrelocalPredicate.pred src✝,\n          res :=\n            (_ :\n              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n                PrelocalPredicate.pred src✝ f →\n                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ∀ (x : { x // x ∈ U }), ContinuousAt f x\n[PROOFSTEP]\nintro x\n[GOAL]\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nw :\n  ∀ (x : { x // x ∈ U }),\n    ∃ V x i,\n      PrelocalPredicate.pred\n        { pred := fun {U} => PrelocalPredicate.pred src✝,\n          res :=\n            (_ :\n              ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n                PrelocalPredicate.pred src✝ f →\n                  PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\nx : { x // x ∈ U }\n⊢ ContinuousAt f x\n[PROOFSTEP]\nspecialize w x\n[GOAL]\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nx : { x // x ∈ U }\nw :\n  ∃ V x i,\n    PrelocalPredicate.pred\n      { pred := fun {U} => PrelocalPredicate.pred src✝,\n        res :=\n          (_ :\n            ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n              PrelocalPredicate.pred src✝ f →\n                PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n      fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ContinuousAt f x\n[PROOFSTEP]\nrcases w with ⟨V, m, i, w⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\nw :\n  PrelocalPredicate.pred\n    { pred := fun {U} => PrelocalPredicate.pred src✝,\n      res :=\n        (_ :\n          ∀ {U V : Opens ↑X} (i : U ⟶ V) (f : { x // x ∈ V } → ↑T),\n            PrelocalPredicate.pred src✝ f →\n              PrelocalPredicate.pred src✝ fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n    fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ContinuousAt f x\n[PROOFSTEP]\ndsimp at w \n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\nw : Continuous fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }\n⊢ ContinuousAt f x\n[PROOFSTEP]\nrw [continuous_iff_continuousAt] at w \n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\nw : ∀ (x : { x // x ∈ V }), ContinuousAt (fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x\n⊢ ContinuousAt f x\n[PROOFSTEP]\nspecialize w ⟨x, m⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ : ↑X → Type v\nT : TopCat\nsrc✝ : PrelocalPredicate fun x => ↑T := continuousPrelocal X T\nU : Opens ↑X\nf : { x // x ∈ U } → ↑T\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\nw : ContinuousAt (fun x => f { val := ↑x, property := (_ : ↑x ∈ ↑U) }) { val := ↑x, property := m }\n⊢ ContinuousAt f x\n[PROOFSTEP]\nsimpa using (Opens.openEmbedding_of_le i.le).continuousAt_iff.1 w\n[GOAL]\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nV U : Opens ↑X\ni : V ⟶ U\nf : (x : { x // x ∈ U }) → T ↑x\nw :\n  (fun {U} f =>\n      ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n    f\nx : { x // x ∈ V }\n⊢ ∃ V_1 x i_1,\n    pred P fun x =>\n      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n[PROOFSTEP]\nspecialize w (i x)\n[GOAL]\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nV U : Opens ↑X\ni : V ⟶ U\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ V }\nw : ∃ V_1 x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ∃ V_1 x i_1,\n    pred P fun x =>\n      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n[PROOFSTEP]\nrcases w with ⟨V', m', i', p⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nV U : Opens ↑X\ni : V ⟶ U\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ V }\nV' : Opens ↑X\nm' : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x) ∈ V'\ni' : V' ⟶ U\np : pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ∃ V_1 x i_1,\n    pred P fun x =>\n      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n[PROOFSTEP]\nrefine' ⟨V ⊓ V', ⟨x.2, m'⟩, Opens.infLELeft _ _, _⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nV U : Opens ↑X\ni : V ⟶ U\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ V }\nV' : Opens ↑X\nm' : ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x) ∈ V'\ni' : V' ⟶ U\np : pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ pred P fun x =>\n    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n[PROOFSTEP]\nconvert P.res (Opens.infLERight V V') _ p\n[GOAL]\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nw :\n  ∀ (x : { x // x ∈ U }),\n    ∃ V x i,\n      pred\n        {\n          pred := fun {U} f =>\n            ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),\n          res :=\n            (_ :\n              ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),\n                (∀ (x : { x // x ∈ U }),\n                    ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →\n                  ∀ (x : { x // x ∈ V }),\n                    ∃ V_1 x i_1,\n                      pred P fun x =>\n                        (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n                          ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n        fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\nx : { x // x ∈ U }\n⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nspecialize w x\n[GOAL]\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ U }\nw :\n  ∃ V x i,\n    pred\n      {\n        pred := fun {U} f =>\n          ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),\n        res :=\n          (_ :\n            ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),\n              (∀ (x : { x // x ∈ U }),\n                  ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →\n                ∀ (x : { x // x ∈ V }),\n                  ∃ V_1 x i_1,\n                    pred P fun x =>\n                      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n                        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n      fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nrcases w with ⟨V, m, i, p⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\np :\n  pred\n    {\n      pred := fun {U} f =>\n        ∀ (x : { x // x ∈ U }), ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x),\n      res :=\n        (_ :\n          ∀ {V U : Opens ↑X} (i : V ⟶ U) (f : (x : { x // x ∈ U }) → T ↑x),\n            (∀ (x : { x // x ∈ U }),\n                ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)) →\n              ∀ (x : { x // x ∈ V }),\n                ∃ V_1 x i_1,\n                  pred P fun x =>\n                    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)) }\n    fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nspecialize p ⟨x.1, m⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\np :\n  ∃ V_1 x i_1,\n    pred P fun x =>\n      (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n        ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nrcases p with ⟨V', m', i', p'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nx : { x // x ∈ U }\nV : Opens ↑X\nm : ↑x ∈ V\ni : V ⟶ U\nV' : Opens ↑X\nm' : ↑{ val := ↑x, property := m } ∈ V'\ni' : V' ⟶ V\np' :\n  pred P fun x =>\n    (fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x))\n      ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑V) }) x)\n⊢ ∃ V x i, pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nexact ⟨V', m', i' ≫ i, p'⟩\n[GOAL]\nX : TopCat\nT✝ T : ↑X → Type v\nP : PrelocalPredicate T\nU : Opens ↑X\nf : (x : { x // x ∈ U }) → T ↑x\nh : pred P f\nx : { x // x ∈ U }\n⊢ pred P fun x => f ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U) }) x)\n[PROOFSTEP]\nconvert h\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\n⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s\n[PROOFSTEP]\nlet sf' : ∀ i : ι, (presheafToTypes X T).obj (op (U i)) := fun i => (sf i).val\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\n⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s\n[PROOFSTEP]\nhave sf'_comp : (presheafToTypes X T).IsCompatible U sf' := fun i j =>\n  congr_arg Subtype.val\n    (sf_comp i j)\n      -- So, we can obtain a unique gluing\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\n⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s\n[PROOFSTEP]\nobtain ⟨gl, gl_spec, gl_uniq⟩ := (sheafToTypes X T).existsUnique_gluing U sf' sf'_comp\n[GOAL]\ncase intro.intro\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\n⊢ ∃! s, IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s\n[PROOFSTEP]\nrefine' ⟨⟨gl, _⟩, _, _⟩\n[GOAL]\ncase intro.intro.refine'_1\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\n⊢ PrelocalPredicate.pred P.toPrelocalPredicate gl\n[PROOFSTEP]\napply P.locality\n[GOAL]\ncase intro.intro.refine'_1.x\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\n⊢ ∀ (x : { x // x ∈ (op (iSup U)).unop }),\n    ∃ V x i,\n      PrelocalPredicate.pred P.toPrelocalPredicate fun x =>\n        gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)\n[PROOFSTEP]\nrintro\n  ⟨x, mem⟩\n      -- Once we're at a particular point `x`, we can select some open set `x ∈ U i`.\n[GOAL]\ncase intro.intro.refine'_1.x.mk\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\nx : ↑X\nmem : x ∈ (op (iSup U)).unop\n⊢ ∃ V x i,\n    PrelocalPredicate.pred P.toPrelocalPredicate fun x =>\n      gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)\n[PROOFSTEP]\nchoose i hi using Opens.mem_iSup.mp mem\n[GOAL]\ncase intro.intro.refine'_1.x.mk\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\nx : ↑X\nmem : x ∈ (op (iSup U)).unop\ni : ι\nhi : x ∈ U i\n⊢ ∃ V x i,\n    PrelocalPredicate.pred P.toPrelocalPredicate fun x =>\n      gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)\n[PROOFSTEP]\nuse U i, hi, Opens.leSupr U i\n[GOAL]\ncase h\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\nx : ↑X\nmem : x ∈ (op (iSup U)).unop\ni : ι\nhi : x ∈ U i\n⊢ PrelocalPredicate.pred P.toPrelocalPredicate fun x =>\n    gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)\n[PROOFSTEP]\nconvert (sf i).property using 1\n[GOAL]\ncase h.e'_5.h\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\nx : ↑X\nmem : x ∈ (op (iSup U)).unop\ni : ι\nhi : x ∈ U i\ne_4✝ : U i = (op (U i)).unop\n⊢ (fun x => gl ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑(op (iSup U)).unop) }) x)) = ↑(sf i)\n[PROOFSTEP]\nexact gl_spec i\n[GOAL]\ncase intro.intro.refine'_2\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\n⊢ (fun s => IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s)\n    { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }\n[PROOFSTEP]\nexact fun i => Subtype.ext (gl_spec i)\n[GOAL]\ncase intro.intro.refine'_3\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\n⊢ ∀ (y : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))),\n    (fun s => IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf s) y →\n      y = { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }\n[PROOFSTEP]\nintro gl' hgl'\n[GOAL]\ncase intro.intro.refine'_3\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\ngl' : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))\nhgl' : IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf gl'\n⊢ gl' = { val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }\n[PROOFSTEP]\nrefine Subtype.ext ?_\n[GOAL]\ncase intro.intro.refine'_3\nX : TopCat\nT : ↑X → Type v\nP✝ : PrelocalPredicate T\nP : LocalPredicate T\nι : Type v\nU : ι → Opens ↑X\nsf : (i : ι) → (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (U i)))\nsf_comp : IsCompatible (subpresheafToTypes P.toPrelocalPredicate) U sf\nsf' : (i : ι) → (presheafToTypes X T).obj (op (U i)) := fun i => ↑(sf i)\nsf'_comp : IsCompatible (presheafToTypes X T) U sf'\ngl : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))\ngl_spec : IsGluing (sheafToTypes X T).val U sf' gl\ngl_uniq :\n  ∀ (y : (forget (Type v)).obj ((sheafToTypes X T).val.obj (op (iSup U)))),\n    (fun s => IsGluing (sheafToTypes X T).val U sf' s) y → y = gl\ngl' : (forget (Type v)).obj ((subpresheafToTypes P.toPrelocalPredicate).obj (op (iSup U)))\nhgl' : IsGluing (subpresheafToTypes P.toPrelocalPredicate) U sf gl'\n⊢ ↑gl' = ↑{ val := gl, property := (_ : PrelocalPredicate.pred P.toPrelocalPredicate gl) }\n[PROOFSTEP]\nexact gl_uniq gl'.1 fun i => congr_arg Subtype.val (hgl' i)\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\n⊢ Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x ⟶ T x\n[PROOFSTEP]\nrefine'\n  colimit.desc _\n    { pt := T x\n      ι :=\n        { app := fun U f => _\n          naturality := _ } }\n[GOAL]\ncase refine'_1\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nf :\n  (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n        (Sheaf.presheaf (subsheafToTypes P))).obj\n    U\n⊢ ((Functor.const (OpenNhds x)ᵒᵖ).obj (T x)).obj U\n[PROOFSTEP]\nexact f.1 ⟨x, (unop U).2⟩\n[GOAL]\ncase refine'_2\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\n⊢ ∀ ⦃X_1 Y : (OpenNhds x)ᵒᵖ⦄ (f : X_1 ⟶ Y),\n    (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n              (Sheaf.presheaf (subsheafToTypes P))).map\n          f ≫\n        (fun U f => ↑f { val := x, property := (_ : x ∈ U.unop.obj) }) Y =\n      (fun U f => ↑f { val := x, property := (_ : x ∈ U.unop.obj) }) X_1 ≫\n        ((Functor.const (OpenNhds x)ᵒᵖ).obj (T x)).map f\n[PROOFSTEP]\naesop\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nU : Opens ↑X\nx : { x // x ∈ U }\nf : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)\n⊢ stalkToFiber P (↑x) (Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) x f) = ↑f x\n[PROOFSTEP]\ndsimp [Presheaf.germ, stalkToFiber]\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nU : Opens ↑X\nx : { x // x ∈ U }\nf : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)\n⊢ colimit.desc ((OpenNhds.inclusion ↑x).op ⋙ subpresheafToTypes P.toPrelocalPredicate)\n      { pt := T ↑x, ι := NatTrans.mk fun U_1 f => ↑f { val := ↑x, property := (_ : ↑x ∈ U_1.unop.obj) } }\n      (colimit.ι ((OpenNhds.inclusion ↑x).op ⋙ subpresheafToTypes P.toPrelocalPredicate)\n        (op { obj := U, property := (_ : ↑x ∈ U) }) f) =\n    ↑f x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nU : Opens ↑X\nf : (Sheaf.presheaf (subsheafToTypes P)).obj (op U)\nval✝ : ↑X\nproperty✝ : val✝ ∈ U\n⊢ colimit.desc\n      ((OpenNhds.inclusion ↑{ val := val✝, property := property✝ }).op ⋙ subpresheafToTypes P.toPrelocalPredicate)\n      { pt := T ↑{ val := val✝, property := property✝ },\n        ι :=\n          NatTrans.mk fun U_1 f =>\n            ↑f\n              { val := ↑{ val := val✝, property := property✝ },\n                property := (_ : ↑{ val := val✝, property := property✝ } ∈ U_1.unop.obj) } }\n      (colimit.ι\n        ((OpenNhds.inclusion ↑{ val := val✝, property := property✝ }).op ⋙ subpresheafToTypes P.toPrelocalPredicate)\n        (op { obj := U, property := (_ : ↑{ val := val✝, property := property✝ } ∈ U) }) f) =\n    ↑f { val := val✝, property := property✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\nt : T x\n⊢ ∃ a, stalkToFiber P x a = t\n[PROOFSTEP]\nrcases w t with ⟨U, f, h, rfl⟩\n[GOAL]\ncase intro.intro.intro\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\nU : OpenNhds x\nf : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y\nh : PrelocalPredicate.pred P.toPrelocalPredicate f\n⊢ ∃ a, stalkToFiber P x a = f { val := x, property := (_ : x ∈ U.obj) }\n[PROOFSTEP]\nfconstructor\n[GOAL]\ncase intro.intro.intro.w\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\nU : OpenNhds x\nf : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y\nh : PrelocalPredicate.pred P.toPrelocalPredicate f\n⊢ Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\n[PROOFSTEP]\nexact (subsheafToTypes P).presheaf.germ ⟨x, U.2⟩ ⟨f, h⟩\n[GOAL]\ncase intro.intro.intro.h\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw : ∀ (t : T x), ∃ U f x_1, f { val := x, property := (_ : x ∈ U.obj) } = t\nU : OpenNhds x\nf : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y\nh : PrelocalPredicate.pred P.toPrelocalPredicate f\n⊢ stalkToFiber P x\n      (Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ U.obj) }\n        { val := f, property := h }) =\n    f { val := x, property := (_ : x ∈ U.obj) }\n[PROOFSTEP]\nexact stalkToFiber_germ _ U.1 ⟨x, U.2⟩ ⟨f, h⟩\n[GOAL]\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\ntU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\nh : stalkToFiber P x tU = stalkToFiber P x tV\n⊢ tU = tV\n[PROOFSTEP]\nlet Q :\n  ∃ (W : (OpenNhds x)ᵒᵖ) (s : ∀ w : (unop W).1, T w) (hW : P.pred s),\n    tU = (subsheafToTypes P).presheaf.germ ⟨x, (unop W).2⟩ ⟨s, hW⟩ ∧\n      tV = (subsheafToTypes P).presheaf.germ ⟨x, (unop W).2⟩ ⟨s, hW⟩ :=\n  ?_\n[GOAL]\ncase refine_2\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\ntU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\nh : stalkToFiber P x tU = stalkToFiber P x tV\nQ : ∃ W s hW,\n  tU =\n      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n        { val := s, property := hW } ∧\n    tV =\n      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n        { val := s, property := hW } :=\n  ?refine_1\n⊢ tU = tV\n[PROOFSTEP]\nchoose W s hW e using Q\n[GOAL]\ncase refine_2\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\ntU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\nh : stalkToFiber P x tU = stalkToFiber P x tV\nW : (OpenNhds x)ᵒᵖ\ns : (w : { x_1 // x_1 ∈ W.unop.obj }) → T ↑w\nhW : PrelocalPredicate.pred P.toPrelocalPredicate s\ne :\n  tU =\n      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n        { val := s, property := hW } ∧\n    tV =\n      Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n        { val := s, property := hW }\n⊢ tU = tV\n[PROOFSTEP]\nexact e.1.trans e.2.symm\n[GOAL]\ncase refine_1\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\ntU tV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\nh : stalkToFiber P x tU = stalkToFiber P x tV\n⊢ ∃ W s hW,\n    tU =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      tV =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nobtain ⟨U, ⟨fU, hU⟩, rfl⟩ := jointly_surjective'.{v, v} tU\n[GOAL]\ncase refine_1.intro.intro.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\ntV : Presheaf.stalk (Sheaf.presheaf (subsheafToTypes P)) x\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nh :\n  stalkToFiber P x\n      (colimit.ι\n        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n          (Sheaf.presheaf (subsheafToTypes P)))\n        U { val := fU, property := hU }) =\n    stalkToFiber P x tV\n⊢ ∃ W s hW,\n    colimit.ι\n          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n            (Sheaf.presheaf (subsheafToTypes P)))\n          U { val := fU, property := hU } =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      tV =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nobtain ⟨V, ⟨fV, hV⟩, rfl⟩ := jointly_surjective'.{v, v} tV\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh :\n  stalkToFiber P x\n      (colimit.ι\n        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n          (Sheaf.presheaf (subsheafToTypes P)))\n        U { val := fU, property := hU }) =\n    stalkToFiber P x\n      (colimit.ι\n        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n          (Sheaf.presheaf (subsheafToTypes P)))\n        V { val := fV, property := hV })\n⊢ ∃ W s hW,\n    colimit.ι\n          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n            (Sheaf.presheaf (subsheafToTypes P)))\n          U { val := fU, property := hU } =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      colimit.ι\n          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n            (Sheaf.presheaf (subsheafToTypes P)))\n          V { val := fV, property := hV } =\n        Presheaf.germ (Sheaf.presheaf (subsheafToTypes P)) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh :\n  stalkToFiber P x\n      (colimit.ι\n        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n          (Sheaf.presheaf (subsheafToTypes P)))\n        U { val := fU, property := hU }) =\n    stalkToFiber P x\n      (colimit.ι\n        (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ (Type v)).obj (OpenNhds.inclusion x).op).obj\n          (Sheaf.presheaf (subsheafToTypes P)))\n        V { val := fV, property := hV })\n⊢ ∃ W s hW,\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nsimp only [stalkToFiber, Types.Colimit.ι_desc_apply'] at h \n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nw :\n  ∀ (U V : OpenNhds x) (fU : (y : { x_1 // x_1 ∈ U.obj }) → T ↑y),\n    PrelocalPredicate.pred P.toPrelocalPredicate fU →\n      ∀ (fV : (y : { x_2 // x_2 ∈ V.obj }) → T ↑y),\n        PrelocalPredicate.pred P.toPrelocalPredicate fV →\n          fU { val := x, property := (_ : x ∈ U.obj) } = fV { val := x, property := (_ : x ∈ V.obj) } →\n            ∃ W iU iV,\n              ∀ (w : { x_4 // x_4 ∈ W.obj }),\n                fU ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑U.obj) }) w) =\n                  fV ((fun x_4 => { val := ↑x_4, property := (_ : ↑x_4 ∈ ↑V.obj) }) w)\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\n⊢ ∃ W s hW,\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nspecialize w (unop U) (unop V) fU hU fV hV h\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nw :\n  ∃ W iU iV,\n    ∀ (w : { x_1 // x_1 ∈ W.obj }),\n      fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n        fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ ∃ W s hW,\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nrcases w with\n  ⟨W, iU, iV, w⟩\n    -- and put it back together again in the correct order.\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nW : OpenNhds x\niU : W ⟶ U.unop\niV : W ⟶ V.unop\nw :\n  ∀ (w : { x_1 // x_1 ∈ W.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ ∃ W s hW,\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW } ∧\n      colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n        Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ W.unop.obj) }\n          { val := s, property := hW }\n[PROOFSTEP]\nrefine' ⟨op W, fun w => fU (iU w : (unop U).1), P.res _ _ hU, _⟩\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_1\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nW : OpenNhds x\niU : W ⟶ U.unop\niV : W ⟶ V.unop\nw :\n  ∀ (w : { x_1 // x_1 ∈ W.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ (op W).unop.obj ⟶ U.unop.obj\ncase refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_2\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nW : OpenNhds x\niU : W ⟶ U.unop\niV : W ⟶ V.unop\nw :\n  ∀ (w : { x_1 // x_1 ∈ W.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }\n        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),\n          property :=\n            (_ :\n              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>\n                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) } ∧\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }\n        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),\n          property :=\n            (_ :\n              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>\n                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) }\n[PROOFSTEP]\nrcases W with ⟨W, m⟩\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_1.mk\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nW : Opens ↑X\nm : x ∈ W\niU : { obj := W, property := m } ⟶ U.unop\niV : { obj := W, property := m } ⟶ V.unop\nw :\n  ∀ (w : { x_1 // x_1 ∈ { obj := W, property := m }.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ (op { obj := W, property := m }).unop.obj ⟶ U.unop.obj\n[PROOFSTEP]\nexact iU\n[GOAL]\ncase refine_1.intro.intro.mk.intro.intro.mk.intro.intro.intro.refine'_2\nX : TopCat\nT : ↑X → Type v\nP : LocalPredicate T\nx : ↑X\nU : (OpenNhds x)ᵒᵖ\nfU : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj U).unop }) → T ↑x_1\nhU : PrelocalPredicate.pred P.toPrelocalPredicate fU\nV : (OpenNhds x)ᵒᵖ\nfV : (x_1 : { x_1 // x_1 ∈ ((OpenNhds.inclusion x).op.obj V).unop }) → T ↑x_1\nhV : PrelocalPredicate.pred P.toPrelocalPredicate fV\nh : fU { val := x, property := (_ : x ∈ U.unop.obj) } = fV { val := x, property := (_ : x ∈ V.unop.obj) }\nW : OpenNhds x\niU : W ⟶ U.unop\niV : W ⟶ V.unop\nw :\n  ∀ (w : { x_1 // x_1 ∈ W.obj }),\n    fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w) =\n      fV ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑V.unop.obj) }) w)\n⊢ colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) U { val := fU, property := hU } =\n      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }\n        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),\n          property :=\n            (_ :\n              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>\n                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) } ∧\n    colimit.ι ((OpenNhds.inclusion x).op ⋙ subpresheafToTypes P.toPrelocalPredicate) V { val := fV, property := hV } =\n      Presheaf.germ (subpresheafToTypes P.toPrelocalPredicate) { val := x, property := (_ : x ∈ (op W).unop.obj) }\n        { val := fun w => fU ((fun x_1 => { val := ↑x_1, property := (_ : ↑x_1 ∈ ↑U.unop.obj) }) w),\n          property :=\n            (_ :\n              PrelocalPredicate.pred P.toPrelocalPredicate fun x_1 =>\n                fU ((fun x_2 => { val := ↑x_2, property := (_ : ↑x_2 ∈ ↑U.unop.obj) }) x_1)) }\n[PROOFSTEP]\nexact ⟨colimit_sound iU.op (Subtype.eq rfl), colimit_sound iV.op (Subtype.eq (funext w).symm)⟩\n[GOAL]\nX✝ : TopCat\nT✝ : ↑X✝ → Type v\nT : TopCat\nX : (Opens ↑X✝)ᵒᵖ\n⊢ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X ⟶ (presheafToTop X✝ T).obj X\n[PROOFSTEP]\nrintro ⟨f, c⟩\n[GOAL]\ncase mk\nX✝ : TopCat\nT✝ : ↑X✝ → Type v\nT : TopCat\nX : (Opens ↑X✝)ᵒᵖ\nf : (x : { x // x ∈ X.unop }) → (fun x => ↑T) ↑x\nc : PrelocalPredicate.pred (continuousPrelocal X✝ T) f\n⊢ (presheafToTop X✝ T).obj X\n[PROOFSTEP]\nexact ⟨f, c⟩\n[GOAL]\nX✝ : TopCat\nT✝ : ↑X✝ → Type v\nT : TopCat\nX : (Opens ↑X✝)ᵒᵖ\n⊢ (presheafToTop X✝ T).obj X ⟶ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X\n[PROOFSTEP]\nrintro ⟨f, c⟩\n[GOAL]\ncase mk\nX✝ : TopCat\nT✝ : ↑X✝ → Type v\nT : TopCat\nX : (Opens ↑X✝)ᵒᵖ\nf : ↑((Opens.toTopCat X✝).op.obj X).unop → ↑T\nc : Continuous f\n⊢ (subpresheafToTypes (continuousPrelocal X✝ T)).obj X\n[PROOFSTEP]\nexact ⟨f, c⟩\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.LocalPredicate", "llama_tokens": 22318, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.2870758976339061}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (G.obj (op U))\n⊢ ∀ {Y Z : C} {f_1 : Y ⟶ U},\n    (fun V i => ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s) Y f_1 →\n      ∀ (g : Z ⟶ Y), (fun V i => ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s) Z (g ≫ f_1)\n[PROOFSTEP]\nrintro V W i ⟨t, ht⟩ j\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (G.obj (op U))\nV W : C\ni : V ⟶ U\nt : (forget A).obj (F.obj (op V))\nht : ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s\nj : W ⟶ V\n⊢ ∃ t, ↑(NatTrans.app f (op W)) t = ↑(G.map (j ≫ i).op) s\n[PROOFSTEP]\nrefine' ⟨F.map j.op t, _⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (G.obj (op U))\nV W : C\ni : V ⟶ U\nt : (forget A).obj (F.obj (op V))\nht : ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) s\nj : W ⟶ V\n⊢ ↑(NatTrans.app f (op W)) (↑(F.map j.op) t) = ↑(G.map (j ≫ i).op) s\n[PROOFSTEP]\nrw [op_comp, G.map_comp, comp_apply, ← ht, elementwise_of% f.naturality]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (F.obj (op U))\n⊢ imageSieve f (↑(NatTrans.app f (op U)) s) = ⊤\n[PROOFSTEP]\next V i\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (F.obj (op U))\nV : C\ni : V ⟶ U\n⊢ (imageSieve f (↑(NatTrans.app f (op U)) s)).arrows i ↔ ⊤.arrows i\n[PROOFSTEP]\nsimp only [Sieve.top_apply, iff_true_iff, imageSieve_apply]\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (F.obj (op U))\nV : C\ni : V ⟶ U\n⊢ ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) (↑(NatTrans.app f (op U)) s)\n[PROOFSTEP]\nhave := elementwise_of% (f.naturality i.op)\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nU : C\ns : (forget A).obj (F.obj (op U))\nV : C\ni : V ⟶ U\nthis :\n  ∀ (x : (forget A).obj (F.obj (op U))),\n    ↑(NatTrans.app f (op V)) (↑(F.map i.op) x) = ↑(G.map i.op) (↑(NatTrans.app f (op U)) x)\n⊢ ∃ t, ↑(NatTrans.app f (op V)) t = ↑(G.map i.op) (↑(NatTrans.app f (op U)) s)\n[PROOFSTEP]\nexact ⟨F.map i.op s, this s⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\n⊢ IsLocallySurjective J f ↔ Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A))) = ⊤\n[PROOFSTEP]\nsimp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj, Set.top_eq_univ, Set.mem_univ,\n  iff_true_iff]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\n⊢ IsLocallySurjective J f ↔\n    ∀ (a : Cᵒᵖ) (x : (G ⋙ forget A).obj a),\n      x ∈ Subpresheaf.obj (Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A)))) a\n[PROOFSTEP]\nexact ⟨fun H U => H (unop U), fun H U => H (op U)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ Type w\nf : F ⟶ G\n⊢ IsLocallySurjective J f ↔ Subpresheaf.sheafify J (imagePresheaf f) = ⊤\n[PROOFSTEP]\nsimp only [Subpresheaf.ext_iff, Function.funext_iff, Set.ext_iff, top_subpresheaf_obj, Set.top_eq_univ, Set.mem_univ,\n  iff_true_iff]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ Type w\nf : F ⟶ G\n⊢ IsLocallySurjective J f ↔ ∀ (a : Cᵒᵖ) (x : G.obj a), x ∈ Subpresheaf.obj (Subpresheaf.sheafify J (imagePresheaf f)) a\n[PROOFSTEP]\nexact ⟨fun H U => H (unop U), fun H U => H (op U)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Sheaf J (Type w)\nf : F ⟶ G\n⊢ IsLocallySurjective J f.val ↔ IsIso (imageSheafι f)\n[PROOFSTEP]\nrw [imageSheafι, isLocallySurjective_iff_imagePresheaf_sheafify_eq_top', Subpresheaf.eq_top_iff_isIso]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Sheaf J (Type w)\nf : F ⟶ G\n⊢ IsIso (Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf f.val))) ↔\n    IsIso { val := Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf f.val)) }\n[PROOFSTEP]\nexact\n  ⟨fun h => @isIso_of_reflects_iso _ _ _ _ _ _ (imageSheafι f) (sheafToPresheaf J _) h _, fun h =>\n    @Functor.map_isIso _ _ _ _ _ _ (sheafToPresheaf J _) _ h⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\n⊢ IsLocallySurjective J f ↔ IsLocallySurjective J (whiskerRight f (forget A))\n[PROOFSTEP]\nsimp only [isLocallySurjective_iff_imagePresheaf_sheafify_eq_top]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\n⊢ Subpresheaf.sheafify J (imagePresheaf (whiskerRight f (forget A))) = ⊤ ↔\n    Subpresheaf.sheafify J (imagePresheaf (whiskerRight (whiskerRight f (forget A)) (forget (Type w')))) = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nH : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)\n⊢ IsLocallySurjective J f\n[PROOFSTEP]\nintro U s\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nH : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)\nU : C\ns : (forget A).obj (G.obj (op U))\n⊢ imageSieve f s ∈ sieves J U\n[PROOFSTEP]\nobtain ⟨t, rfl⟩ := H _ s\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nH : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)\nU : C\nt : (forget A).obj (F.obj (op U))\n⊢ imageSieve f (↑(NatTrans.app f (op U)) t) ∈ sieves J U\n[PROOFSTEP]\nrw [imageSieve_app]\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\nH : ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)\nU : C\nt : (forget A).obj (F.obj (op U))\n⊢ ⊤ ∈ sieves J U\n[PROOFSTEP]\nexact J.top_mem _\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝² : Category.{v', u'} A\ninst✝¹ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\ninst✝ : IsIso f\n⊢ IsLocallySurjective J f\n[PROOFSTEP]\napply isLocallySurjective_of_surjective\n[GOAL]\ncase H\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝² : Category.{v', u'} A\ninst✝¹ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\ninst✝ : IsIso f\n⊢ ∀ (U : Cᵒᵖ), Function.Surjective ↑(NatTrans.app f U)\n[PROOFSTEP]\nintro U\n[GOAL]\ncase H\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝² : Category.{v', u'} A\ninst✝¹ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\ninst✝ : IsIso f\nU : Cᵒᵖ\n⊢ Function.Surjective ↑(NatTrans.app f U)\n[PROOFSTEP]\napply Function.Bijective.surjective\n[GOAL]\ncase H.hf\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝² : Category.{v', u'} A\ninst✝¹ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\ninst✝ : IsIso f\nU : Cᵒᵖ\n⊢ Function.Bijective ↑(NatTrans.app f U)\n[PROOFSTEP]\nrw [← isIso_iff_bijective, ← forget_map_eq_coe]\n[GOAL]\ncase H.hf\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝² : Category.{v', u'} A\ninst✝¹ : ConcreteCategory A\nF G : Cᵒᵖ ⥤ A\nf : F ⟶ G\ninst✝ : IsIso f\nU : Cᵒᵖ\n⊢ IsIso ((forget A).map (NatTrans.app f U))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\n⊢ IsLocallySurjective J (f₁ ≫ f₂)\n[PROOFSTEP]\nintro U s\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\n⊢ imageSieve (f₁ ≫ f₂) s ∈ sieves J U\n[PROOFSTEP]\nhave : (Sieve.bind (imageSieve f₂ s) fun _ _ h => imageSieve f₁ h.choose) ≤ imageSieve (f₁ ≫ f₂) s :=\n  by\n  rintro V i ⟨W, i, j, H, ⟨t', ht'⟩, rfl⟩\n  refine' ⟨t', _⟩\n  rw [op_comp, F₃.map_comp, NatTrans.comp_app, comp_apply, comp_apply, ht', elementwise_of% f₂.naturality,\n    H.choose_spec]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\n⊢ (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\n[PROOFSTEP]\nrintro V i ⟨W, i, j, H, ⟨t', ht'⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nV W : C\ni : V ⟶ W\nj : W ⟶ U\nH : (imageSieve f₂ s).arrows j\nt' : (forget A).obj (F₁.obj (op V))\nht' : ↑(NatTrans.app f₁ (op V)) t' = ↑(F₂.map i.op) (Exists.choose H)\n⊢ (imageSieve (f₁ ≫ f₂) s).arrows (i ≫ j)\n[PROOFSTEP]\nrefine' ⟨t', _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nV W : C\ni : V ⟶ W\nj : W ⟶ U\nH : (imageSieve f₂ s).arrows j\nt' : (forget A).obj (F₁.obj (op V))\nht' : ↑(NatTrans.app f₁ (op V)) t' = ↑(F₂.map i.op) (Exists.choose H)\n⊢ ↑(NatTrans.app (f₁ ≫ f₂) (op V)) t' = ↑(F₃.map (i ≫ j).op) s\n[PROOFSTEP]\nrw [op_comp, F₃.map_comp, NatTrans.comp_app, comp_apply, comp_apply, ht', elementwise_of% f₂.naturality, H.choose_spec]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nthis : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\n⊢ imageSieve (f₁ ≫ f₂) s ∈ sieves J U\n[PROOFSTEP]\napply J.superset_covering this\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nthis : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\n⊢ (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ∈ sieves J U\n[PROOFSTEP]\napply J.bind_covering\n[GOAL]\ncase hS\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nthis : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\n⊢ imageSieve f₂ s ∈ sieves J U\n[PROOFSTEP]\napply h₂\n[GOAL]\ncase hR\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nthis : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\n⊢ ∀ ⦃Y : C⦄ ⦃f : Y ⟶ U⦄ (H : (imageSieve f₂ s).arrows f), imageSieve f₁ (Exists.choose H) ∈ sieves J Y\n[PROOFSTEP]\nintros\n[GOAL]\ncase hR\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF₁ F₂ F₃ : Cᵒᵖ ⥤ A\nf₁ : F₁ ⟶ F₂\nf₂ : F₂ ⟶ F₃\nh₁ : IsLocallySurjective J f₁\nh₂ : IsLocallySurjective J f₂\nU : C\ns : (forget A).obj (F₃.obj (op U))\nthis : (Sieve.bind (imageSieve f₂ s).arrows fun x x_1 h => imageSieve f₁ (Exists.choose h)) ≤ imageSieve (f₁ ≫ f₂) s\nY✝ : C\nf✝ : Y✝ ⟶ U\nH✝ : (imageSieve f₂ s).arrows f✝\n⊢ imageSieve f₁ (Exists.choose H✝) ∈ sieves J Y✝\n[PROOFSTEP]\napply h₁\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ toSheafify J F ≫\n      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫\n        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =\n    toSheafify J F ≫ 𝟙 (sheafify J F)\n[PROOFSTEP]\nsimp [toImagePresheafSheafify]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫\n      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n        (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) =\n    𝟙 (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))\n[PROOFSTEP]\nrw [← cancel_mono (Subpresheaf.ι _), Category.id_comp, Category.assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫\n      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫\n        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =\n    Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F)))\n[PROOFSTEP]\nrefine' Eq.trans _ (Category.comp_id _)\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫\n      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫\n        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =\n    Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) ≫ 𝟙 (sheafify J F)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n        (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫\n      Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =\n    𝟙 (sheafify J F)\n[PROOFSTEP]\nexact J.sheafify_hom_ext _ _ (J.sheafify_isSheaf _) (by simp [toImagePresheafSheafify])\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝¹ : Category.{v', u'} A\ninst✝ : ConcreteCategory A\nF : Cᵒᵖ ⥤ Type (max u v)\n⊢ toSheafify J F ≫\n      sheafifyLift J (toImagePresheafSheafify J (toSheafify J F))\n          (_ : Presheaf.IsSheaf J (Subpresheaf.toPresheaf (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))))) ≫\n        Subpresheaf.ι (Subpresheaf.sheafify J (imagePresheaf (toSheafify J F))) =\n    toSheafify J F ≫ 𝟙 (sheafify J F)\n[PROOFSTEP]\nsimp [toImagePresheafSheafify]\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝⁸ : Category.{v', u'} A\ninst✝⁷ : ConcreteCategory A\nF✝ : Cᵒᵖ ⥤ Type (max u v)\nB : Type w\ninst✝⁶ : Category.{max u v, w} B\ninst✝⁵ : ConcreteCategory B\ninst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)\ninst✝² :\n  (X : C) →\n    (W : Cover J X) →\n      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)\ninst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)\ninst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B\nF : Cᵒᵖ ⥤ B\n⊢ IsLocallySurjective J (toSheafify J F)\n[PROOFSTEP]\nrw [isLocallySurjective_iff_whisker_forget, ← toSheafify_comp_sheafifyCompIso_inv]\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝⁸ : Category.{v', u'} A\ninst✝⁷ : ConcreteCategory A\nF✝ : Cᵒᵖ ⥤ Type (max u v)\nB : Type w\ninst✝⁶ : Category.{max u v, w} B\ninst✝⁵ : ConcreteCategory B\ninst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)\ninst✝² :\n  (X : C) →\n    (W : Cover J X) →\n      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)\ninst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)\ninst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B\nF : Cᵒᵖ ⥤ B\n⊢ IsLocallySurjective J (toSheafify J (F ⋙ forget B) ≫ (sheafifyCompIso J (forget B) F).inv)\n[PROOFSTEP]\napply IsLocallySurjective.comp\n[GOAL]\ncase h₁\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝⁸ : Category.{v', u'} A\ninst✝⁷ : ConcreteCategory A\nF✝ : Cᵒᵖ ⥤ Type (max u v)\nB : Type w\ninst✝⁶ : Category.{max u v, w} B\ninst✝⁵ : ConcreteCategory B\ninst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)\ninst✝² :\n  (X : C) →\n    (W : Cover J X) →\n      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)\ninst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)\ninst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B\nF : Cᵒᵖ ⥤ B\n⊢ IsLocallySurjective J (toSheafify J (F ⋙ forget B))\n[PROOFSTEP]\nrw [isLocallySurjective_iff_imagePresheaf_sheafify_eq_top, Subpresheaf.eq_top_iff_isIso]\n[GOAL]\ncase h₁\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝⁸ : Category.{v', u'} A\ninst✝⁷ : ConcreteCategory A\nF✝ : Cᵒᵖ ⥤ Type (max u v)\nB : Type w\ninst✝⁶ : Category.{max u v, w} B\ninst✝⁵ : ConcreteCategory B\ninst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)\ninst✝² :\n  (X : C) →\n    (W : Cover J X) →\n      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)\ninst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)\ninst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B\nF : Cᵒᵖ ⥤ B\n⊢ IsIso\n    (Subpresheaf.ι\n      (Subpresheaf.sheafify J (imagePresheaf (whiskerRight (toSheafify J (F ⋙ forget B)) (forget (Type (max u v)))))))\n[PROOFSTEP]\nexact IsIso.of_iso_inv (sheafificationIsoImagePresheaf J (F ⋙ forget B))\n[GOAL]\ncase h₂\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nA : Type u'\ninst✝⁸ : Category.{v', u'} A\ninst✝⁷ : ConcreteCategory A\nF✝ : Cᵒᵖ ⥤ Type (max u v)\nB : Type w\ninst✝⁶ : Category.{max u v, w} B\ninst✝⁵ : ConcreteCategory B\ninst✝⁴ : ∀ (X : C), Limits.HasColimitsOfShape (Cover J X)ᵒᵖ B\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ B) (X : C) (S : Cover J X), Limits.HasMultiequalizer (Cover.index S P)\ninst✝² :\n  (X : C) →\n    (W : Cover J X) →\n      (P : Cᵒᵖ ⥤ B) → Limits.PreservesLimit (Limits.MulticospanIndex.multicospan (Cover.index W P)) (forget B)\ninst✝¹ : (X : C) → Limits.PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget B)\ninst✝ : ∀ (α β : Type (max u v)) (fst snd : β → α), Limits.HasLimitsOfShape (Limits.WalkingMulticospan fst snd) B\nF : Cᵒᵖ ⥤ B\n⊢ IsLocallySurjective J (sheafifyCompIso J (forget B) F).inv\n[PROOFSTEP]\nexact isLocallySurjective_of_iso _ _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Surjective", "llama_tokens": 10873, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6548947290421275, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.2867283018206714}}
{"text": "[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\n⊢ Function.Injective fun S => S.carrier\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩ ⟨⟨⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\ntoSubsemiring✝¹ : Subsemiring L\nalgebraMap_mem'✝¹ : ∀ (r : K), ↑(algebraMap K L) r ∈ toSubsemiring✝¹.carrier\ninv_mem'✝¹ :\n  ∀ (x : L),\n    x ∈\n        { toSubsemiring := toSubsemiring✝¹,\n                  algebraMap_mem' := algebraMap_mem'✝¹ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      x⁻¹ ∈\n        { toSubsemiring := toSubsemiring✝¹,\n                  algebraMap_mem' := algebraMap_mem'✝¹ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\ntoSubsemiring✝ : Subsemiring L\nalgebraMap_mem'✝ : ∀ (r : K), ↑(algebraMap K L) r ∈ toSubsemiring✝.carrier\ninv_mem'✝ :\n  ∀ (x : L),\n    x ∈\n        { toSubsemiring := toSubsemiring✝,\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      x⁻¹ ∈\n        { toSubsemiring := toSubsemiring✝,\n                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n⊢ (fun S => S.carrier)\n        { toSubalgebra := { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ },\n          inv_mem' := inv_mem'✝¹ } =\n      (fun S => S.carrier)\n        { toSubalgebra := { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ },\n          inv_mem' := inv_mem'✝ } →\n    { toSubalgebra := { toSubsemiring := toSubsemiring✝¹, algebraMap_mem' := algebraMap_mem'✝¹ },\n        inv_mem' := inv_mem'✝¹ } =\n      { toSubalgebra := { toSubsemiring := toSubsemiring✝, algebraMap_mem' := algebraMap_mem'✝ },\n        inv_mem' := inv_mem'✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : L\nhx : x ∈ S\n⊢ -x ∈ S\n[PROOFSTEP]\nshow -x ∈ S.toSubalgebra\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : L\nhx : x ∈ S\n⊢ -x ∈ S.toSubalgebra\n[PROOFSTEP]\nsimpa\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nn : ℕ\n⊢ ↑n ∈ S\n[PROOFSTEP]\nsimpa using coe_int_mem S n\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\ninv_mem : ∀ (x : L), x ∈ S → x⁻¹ ∈ S\n⊢ (Subalgebra.toIntermediateField S inv_mem).toSubalgebra = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\ninv_mem : ∀ (x : L), x ∈ S → x⁻¹ ∈ S\nx✝ : L\n⊢ x✝ ∈ (Subalgebra.toIntermediateField S inv_mem).toSubalgebra ↔ x✝ ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S : IntermediateField K L\n⊢ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S : IntermediateField K L\nx✝ : L\n⊢ x✝ ∈ Subalgebra.toIntermediateField S.toSubalgebra (_ : ∀ (x : L), x ∈ S → x⁻¹ ∈ S) ↔ x✝ ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nby_cases hx0 : x = 0\n[GOAL]\ncase pos\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : x = 0\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nrw [hx0, inv_zero]\n[GOAL]\ncase pos\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : x = 0\n⊢ 0 ∈ S\n[PROOFSTEP]\nexact S.zero_mem\n[GOAL]\ncase neg\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : ¬x = 0\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nletI hS' := hS.toField\n[GOAL]\ncase neg\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : ¬x = 0\nhS' : Field { x // x ∈ S } := IsField.toField hS\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nobtain ⟨y, hy⟩ := hS.mul_inv_cancel (show (⟨x, hx⟩ : S) ≠ 0 from Subtype.ne_of_val_ne hx0)\n[GOAL]\ncase neg.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : ¬x = 0\nhS' : Field { x // x ∈ S } := IsField.toField hS\ny : { x // x ∈ S }\nhy : { val := x, property := hx } * y = 1\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nrw [Subtype.ext_iff, S.coe_mul, S.coe_one, Subtype.coe_mk, mul_eq_one_iff_inv_eq₀ hx0] at hy \n[GOAL]\ncase neg.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx : L\nhx : x ∈ S\nhx0 : ¬x = 0\nhS' : Field { x // x ∈ S } := IsField.toField hS\ny : { x // x ∈ S }\nhy : x⁻¹ = ↑y\n⊢ x⁻¹ ∈ S\n[PROOFSTEP]\nexact hy.symm ▸ y.2\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\n⊢ (Subalgebra.toIntermediateField' S hS).toSubalgebra = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nS : Subalgebra K L\nhS : IsField { x // x ∈ S }\nx✝ : L\n⊢ x✝ ∈ (Subalgebra.toIntermediateField' S hS).toSubalgebra ↔ x✝ ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S : IntermediateField K L\n⊢ Subalgebra.toIntermediateField' S.toSubalgebra (_ : IsField { x // x ∈ S }) = S\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S : IntermediateField K L\nx✝ : L\n⊢ x✝ ∈ Subalgebra.toIntermediateField' S.toSubalgebra (_ : IsField { x // x ∈ S }) ↔ x✝ ∈ S\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∑ i : ι, f i) = ∑ i : ι, ↑(f i)\n[PROOFSTEP]\nclassical\ninduction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H\n· simp\n· rw [Finset.sum_insert hi, AddMemClass.coe_add, H, Finset.sum_insert hi]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∑ i : ι, f i) = ∑ i : ι, ↑(f i)\n[PROOFSTEP]\ninduction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H\n[GOAL]\ncase empty\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∑ i in ∅, f i) = ∑ i in ∅, ↑(f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nH : ↑(∑ i in s, f i) = ∑ i in s, ↑(f i)\n⊢ ↑(∑ i in insert i s, f i) = ∑ i in insert i s, ↑(f i)\n[PROOFSTEP]\nrw [Finset.sum_insert hi, AddMemClass.coe_add, H, Finset.sum_insert hi]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∏ i : ι, f i) = ∏ i : ι, ↑(f i)\n[PROOFSTEP]\nclassical\ninduction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H\n· simp\n· rw [Finset.prod_insert hi, MulMemClass.coe_mul, H, Finset.prod_insert hi]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∏ i : ι, f i) = ∏ i : ι, ↑(f i)\n[PROOFSTEP]\ninduction' (Finset.univ : Finset ι) using Finset.induction_on with i s hi H\n[GOAL]\ncase empty\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\n⊢ ↑(∏ i in ∅, f i) = ∏ i in ∅, ↑(f i)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS : IntermediateField K L\nι : Type u_4\ninst✝ : Fintype ι\nf : ι → { x // x ∈ S }\ni : ι\ns : Finset ι\nhi : ¬i ∈ s\nH : ↑(∏ i in s, f i) = ∏ i in s, ↑(f i)\n⊢ ↑(∏ i in insert i s, f i) = ∏ i in insert i s, ↑(f i)\n[PROOFSTEP]\nrw [Finset.prod_insert hi, MulMemClass.coe_mul, H, Finset.prod_insert hi]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nf : L →ₐ[K] L'\nS : IntermediateField K L\nsrc✝ : Subalgebra K L' := Subalgebra.map f S.toSubalgebra\n⊢ ∀ (x : L'),\n    x ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  algebraMap_mem' :=\n                    (_ :\n                      ∀ (r : K),\n                        ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →\n      x⁻¹ ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  algebraMap_mem' :=\n                    (_ :\n                      ∀ (r : K), ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ : IntermediateField K L\nf : L →ₐ[K] L'\nS : IntermediateField K L\nsrc✝ : Subalgebra K L' := Subalgebra.map f S.toSubalgebra\nx : L\nhx : x ∈ ↑S.toSubsemiring\n⊢ (↑↑f x)⁻¹ ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              algebraMap_mem' :=\n                (_ : ∀ (r : K), ↑(algebraMap K L') r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nexact ⟨x⁻¹, S.inv_mem hx, map_inv₀ f x⟩\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\n⊢ ↑(aeval ↑x) P = ↑(↑(aeval x) P)\n[PROOFSTEP]\nrefine' Polynomial.induction_on' P (fun f g hf hg => _) fun n r => _\n[GOAL]\ncase refine'_1\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP f g : R[X]\nhf : ↑(aeval ↑x) f = ↑(↑(aeval x) f)\nhg : ↑(aeval ↑x) g = ↑(↑(aeval x) g)\n⊢ ↑(aeval ↑x) (f + g) = ↑(↑(aeval x) (f + g))\n[PROOFSTEP]\nrw [aeval_add, aeval_add, AddMemClass.coe_add, hf, hg]\n[GOAL]\ncase refine'_2\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nn : ℕ\nr : R\n⊢ ↑(aeval ↑x) (↑(monomial n) r) = ↑(↑(aeval x) (↑(monomial n) r))\n[PROOFSTEP]\nsimp only [MulMemClass.coe_mul, aeval_monomial, SubmonoidClass.coe_pow, mul_eq_mul_right_iff]\n[GOAL]\ncase refine'_2\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nn : ℕ\nr : R\n⊢ ↑(algebraMap R L) r = ↑(↑(algebraMap R { x // x ∈ S }) r) ∨ ↑x ^ n = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase refine'_2.h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nn : ℕ\nr : R\n⊢ ↑(algebraMap R L) r = ↑(↑(algebraMap R { x // x ∈ S }) r)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\n⊢ IsIntegral R ↑x ↔ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nh : IsIntegral R ↑x\n⊢ IsIntegral R x\n[PROOFSTEP]\nobtain ⟨P, hPmo, hProot⟩ := h\n[GOAL]\ncase refine'_1.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R L) (↑x) P = 0\n⊢ IsIntegral R x\n[PROOFSTEP]\nrefine' ⟨P, hPmo, (injective_iff_map_eq_zero _).1 (algebraMap (↥S) L).injective _ _⟩\n[GOAL]\ncase refine'_1.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R L) (↑x) P = 0\n⊢ ↑(algebraMap { x // x ∈ S } L) (eval₂ (algebraMap R { x // x ∈ S }) x P) = 0\n[PROOFSTEP]\nletI : IsScalarTower R S L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)\n[GOAL]\ncase refine'_1.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R L) (↑x) P = 0\nthis : IsScalarTower R { x // x ∈ S } L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)\n⊢ ↑(algebraMap { x // x ∈ S } L) (eval₂ (algebraMap R { x // x ∈ S }) x P) = 0\n[PROOFSTEP]\nrw [eval₂_eq_eval_map, ← eval₂_at_apply, eval₂_eq_eval_map, Polynomial.map_map, ←\n  --Porting note: very strange that I have to `rw` twice with `eval₂_eq_eval_map`.\n        -- The first `rw` does nothingIsScalarTower.algebraMap_eq, ← eval₂_eq_eval_map, ← eval₂_eq_eval_map]\n[GOAL]\ncase refine'_1.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R L) (↑x) P = 0\nthis : IsScalarTower R { x // x ∈ S } L := IsScalarTower.of_algebraMap_eq (congr_fun rfl)\n⊢ eval₂ (algebraMap R L) (↑(algebraMap { x // x ∈ S } L) x) P = 0\n[PROOFSTEP]\nexact hProot\n[GOAL]\ncase refine'_2\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nh : IsIntegral R x\n⊢ IsIntegral R ↑x\n[PROOFSTEP]\nobtain ⟨P, hPmo, hProot⟩ := h\n[GOAL]\ncase refine'_2.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R { x // x ∈ S }) x P = 0\n⊢ IsIntegral R ↑x\n[PROOFSTEP]\nrefine' ⟨P, hPmo, _⟩\n[GOAL]\ncase refine'_2.intro.intro\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁸ : Field K\ninst✝⁷ : Field L\ninst✝⁶ : Field L'\ninst✝⁵ : Algebra K L\ninst✝⁴ : Algebra K L'\nS : IntermediateField K L\nR : Type u_4\ninst✝³ : CommRing R\ninst✝² : Algebra R K\ninst✝¹ : Algebra R L\ninst✝ : IsScalarTower R K L\nx : { x // x ∈ S }\nP : R[X]\nhPmo : Monic P\nhProot : eval₂ (algebraMap R { x // x ∈ S }) x P = 0\n⊢ eval₂ (algebraMap R L) (↑x) P = 0\n[PROOFSTEP]\nrw [← aeval_def, aeval_coe, aeval_def, hProot, ZeroMemClass.coe_zero]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S S' : IntermediateField K L\nh : S.toSubalgebra = S'.toSubalgebra\n⊢ S = S'\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS✝ S S' : IntermediateField K L\nh : S.toSubalgebra = S'.toSubalgebra\nx✝ : L\n⊢ x✝ ∈ S ↔ x✝ ∈ S'\n[PROOFSTEP]\nrw [← mem_toSubalgebra, ← mem_toSubalgebra, h]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : L\nhx : x ∈ RingHom.fieldRange (algebraMap K L)\n⊢ x ∈ Set.range ↑(algebraMap K L)\n[PROOFSTEP]\nrwa [Set.mem_range, ← RingHom.mem_fieldRange]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁶ : Field K\ninst✝⁵ : Field L\ninst✝⁴ : Field L'\ninst✝³ : Algebra K L\ninst✝² : Algebra K L'\nS : IntermediateField K L\ninst✝¹ : Algebra L' L\ninst✝ : IsScalarTower K L' L\nU V : IntermediateField L' L\nH : restrictScalars K U = restrictScalars K V\nx : L\n⊢ x ∈ U ↔ x ∈ V\n[PROOFSTEP]\nrw [← mem_restrictScalars K, H, mem_restrictScalars]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS F : IntermediateField K L\nE : IntermediateField { x // x ∈ F } L\n⊢ Algebra K { x // x ∈ E }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS F E : IntermediateField K L\n⊢ F.toSubalgebra = E.toSubalgebra ↔ F = E\n[PROOFSTEP]\nrw [SetLike.ext_iff, SetLike.ext'_iff, Set.ext_iff]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS F E : IntermediateField K L\n⊢ (∀ (x : L), x ∈ F.toSubalgebra ↔ x ∈ E.toSubalgebra) ↔ ∀ (x : L), x ∈ ↑F ↔ x ∈ ↑E\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS F E : IntermediateField K L\ninst✝ : FiniteDimensional K L\nh_le : F ≤ E\nh_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L\n⊢ F = E\n[PROOFSTEP]\napply eq_of_le_of_finrank_le h_le\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS F E : IntermediateField K L\ninst✝ : FiniteDimensional K L\nh_le : F ≤ E\nh_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L\n⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }\n[PROOFSTEP]\nhave h1 := finrank_mul_finrank K F L\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS F E : IntermediateField K L\ninst✝ : FiniteDimensional K L\nh_le : F ≤ E\nh_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L\nh1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L\n⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }\n[PROOFSTEP]\nhave h2 := finrank_mul_finrank K E L\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS F E : IntermediateField K L\ninst✝ : FiniteDimensional K L\nh_le : F ≤ E\nh_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L\nh1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L\nh2 : finrank K { x // x ∈ E } * finrank { x // x ∈ E } L = finrank K L\n⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }\n[PROOFSTEP]\nhave h3 : 0 < finrank E L := finrank_pos\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁵ : Field K\ninst✝⁴ : Field L\ninst✝³ : Field L'\ninst✝² : Algebra K L\ninst✝¹ : Algebra K L'\nS F E : IntermediateField K L\ninst✝ : FiniteDimensional K L\nh_le : F ≤ E\nh_finrank : finrank { x // x ∈ F } L ≤ finrank { x // x ∈ E } L\nh1 : finrank K { x // x ∈ F } * finrank { x // x ∈ F } L = finrank K L\nh2 : finrank K { x // x ∈ E } * finrank { x // x ∈ E } L = finrank K L\nh3 : 0 < finrank { x // x ∈ E } L\n⊢ finrank K { x // x ∈ E } ≤ finrank K { x // x ∈ F }\n[PROOFSTEP]\nnlinarith\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : { x // x ∈ S }\n⊢ IsIntegral K x ↔ IsIntegral K ↑x\n[PROOFSTEP]\nrw [← isAlgebraic_iff_isIntegral, isAlgebraic_iff, isAlgebraic_iff_isIntegral]\n[GOAL]\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : { x // x ∈ S }\n⊢ minpoly K x = minpoly K ↑x\n[PROOFSTEP]\nby_cases hx : IsIntegral K x\n[GOAL]\ncase pos\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : { x // x ∈ S }\nhx : IsIntegral K x\n⊢ minpoly K x = minpoly K ↑x\n[PROOFSTEP]\nexact minpoly.eq_of_algebraMap_eq (algebraMap S L).injective hx rfl\n[GOAL]\ncase neg\nK : Type u_1\nL : Type u_2\nL' : Type u_3\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field L'\ninst✝¹ : Algebra K L\ninst✝ : Algebra K L'\nS : IntermediateField K L\nx : { x // x ∈ S }\nhx : ¬IsIntegral K x\n⊢ minpoly K x = minpoly K ↑x\n[PROOFSTEP]\nexact (minpoly.eq_zero hx).trans (minpoly.eq_zero (mt isIntegral_iff.mpr hx)).symm\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.IntermediateField", "llama_tokens": 12096, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5964331319177487, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.28657340276781285}}
{"text": "[GOAL]\nX : Scheme\n⊢ Continuous fun x => PEmpty.elim x\n[PROOFSTEP]\ncontinuity\n[GOAL]\nX : Scheme\nf g : ∅ ⟶ X\n⊢ f.val.base = g.val.base\n[PROOFSTEP]\next a\n[GOAL]\ncase w\nX : Scheme\nf g : ∅ ⟶ X\na : (forget TopCat).obj ↑∅.toPresheafedSpace\n⊢ ↑f.val.base a = ↑g.val.base a\n[PROOFSTEP]\nexact PEmpty.elim a\n[GOAL]\nX : Scheme\nf g : ∅ ⟶ X\na : (Opens ↑↑X.toPresheafedSpace)ᵒᵖ\n⊢ NatTrans.app (f.val.c ≫ whiskerRight (eqToHom (_ : (Opens.map f.val.base).op = (Opens.map g.val.base).op)) ∅.presheaf)\n      a =\n    NatTrans.app g.val.c a\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ IsEmpty PEmpty\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ IsOpenImmersion f\n[PROOFSTEP]\napply (config := { allowSynthFailures := true }) IsOpenImmersion.of_stalk_iso\n[GOAL]\ncase hf\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ OpenEmbedding ↑f.val.base\n[PROOFSTEP]\napply openEmbedding_of_continuous_injective_open\n[GOAL]\ncase hf.h₁\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ Continuous ↑f.val.base\n[PROOFSTEP]\ncontinuity\n[GOAL]\ncase hf.h₂\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ Function.Injective ↑f.val.base\n[PROOFSTEP]\nrintro (i : X.carrier)\n[GOAL]\ncase hf.h₂\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\ni : ↑↑X.toPresheafedSpace\n⊢ ∀ ⦃a₂ : (forget TopCat).obj ↑X.toPresheafedSpace⦄, ↑f.val.base i = ↑f.val.base a₂ → i = a₂\n[PROOFSTEP]\nexact isEmptyElim i\n[GOAL]\ncase hf.h₃\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ IsOpenMap ↑f.val.base\n[PROOFSTEP]\nintro U _\n[GOAL]\ncase hf.h₃\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\nU : Set ((forget TopCat).obj ↑X.toPresheafedSpace)\na✝ : IsOpen U\n⊢ IsOpen (↑f.val.base '' U)\n[PROOFSTEP]\nconvert isOpen_empty (α := Y)\n[GOAL]\ncase h.e'_3.h\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\nU : Set ((forget TopCat).obj ↑X.toPresheafedSpace)\na✝ : IsOpen U\ne_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base '' U = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h.h\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\nU : Set ((forget TopCat).obj ↑X.toPresheafedSpace)\na✝ : IsOpen U\ne_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace\nx✝ : (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ x✝ ∈ ↑f.val.base '' U ↔ x✝ ∈ ∅\n[PROOFSTEP]\nrw [Set.mem_empty_iff_false, iff_false_iff]\n[GOAL]\ncase h.e'_3.h.h\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\nU : Set ((forget TopCat).obj ↑X.toPresheafedSpace)\na✝ : IsOpen U\ne_1✝ : (forget TopCat).obj ↑Y.toPresheafedSpace = ↑↑Y.toPresheafedSpace\nx✝ : (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ ¬x✝ ∈ ↑f.val.base '' U\n[PROOFSTEP]\nexact fun x => isEmptyElim (show X.carrier from x.choose)\n[GOAL]\ncase inst\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\n⊢ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)\n[PROOFSTEP]\nrintro (i : X.carrier)\n[GOAL]\ncase inst\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑X.toPresheafedSpace\ni : ↑↑X.toPresheafedSpace\n⊢ IsIso (PresheafedSpace.stalkMap f.val i)\n[PROOFSTEP]\nexact isEmptyElim i\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\n⊢ IsIso f\n[PROOFSTEP]\nhaveI : IsEmpty X.carrier := ⟨fun x => isEmptyElim (show Y.carrier from f.1.base x)⟩\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\nthis : IsEmpty ↑↑X.toPresheafedSpace\n⊢ IsIso f\n[PROOFSTEP]\nhave : Epi f.1.base\n[GOAL]\ncase this\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\nthis : IsEmpty ↑↑X.toPresheafedSpace\n⊢ Epi f.val.base\n[PROOFSTEP]\nrw [TopCat.epi_iff_surjective]\n[GOAL]\ncase this\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\nthis : IsEmpty ↑↑X.toPresheafedSpace\n⊢ Function.Surjective ↑f.val.base\n[PROOFSTEP]\nrintro (x : Y.carrier)\n[GOAL]\ncase this\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\nthis : IsEmpty ↑↑X.toPresheafedSpace\nx : ↑↑Y.toPresheafedSpace\n⊢ ∃ a, ↑f.val.base a = x\n[PROOFSTEP]\nexact isEmptyElim x\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsEmpty ↑↑Y.toPresheafedSpace\nthis✝ : IsEmpty ↑↑X.toPresheafedSpace\nthis : Epi f.val.base\n⊢ IsIso f\n[PROOFSTEP]\napply IsOpenImmersion.to_iso\n[GOAL]\nX : Scheme\n⊢ IsAffineOpen ⊥\n[PROOFSTEP]\nconvert rangeIsAffineOpenOfOpenImmersion (initial.to X)\n[GOAL]\ncase h.e'_2\nX : Scheme\n⊢ ⊥ = Scheme.Hom.opensRange (initial.to X)\n[PROOFSTEP]\next\n  -- Porting note : added this `erw` to turn LHS to `False`\n[GOAL]\ncase h.e'_2.h.h\nX : Scheme\nx✝ : ↑↑X.toPresheafedSpace\n⊢ x✝ ∈ ↑⊥ ↔ x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))\n[PROOFSTEP]\nerw [Set.mem_empty_iff_false]\n[GOAL]\ncase h.e'_2.h.h\nX : Scheme\nx✝ : ↑↑X.toPresheafedSpace\n⊢ False ↔ x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))\n[PROOFSTEP]\nrw [false_iff_iff]\n[GOAL]\ncase h.e'_2.h.h\nX : Scheme\nx✝ : ↑↑X.toPresheafedSpace\n⊢ ¬x✝ ∈ ↑(Scheme.Hom.opensRange (initial.to X))\n[PROOFSTEP]\nexact fun x => isEmptyElim (show (⊥_ Scheme).carrier from x.choose)\n[GOAL]\nA : Scheme\nf : A ⟶ ⊥_ Scheme\n⊢ IsIso f\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Limits", "llama_tokens": 2545, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5774953651858117, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.28649188721673646}}
{"text": "[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX✝ Y✝ : ModuleCat S\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : (restrictScalars f).map a₁✝ = (restrictScalars f).map a₂✝\nx : ↑X✝\n⊢ ↑a₁✝ x = ↑a₂✝ x\n[PROOFSTEP]\nsimpa only using FunLike.congr_fun h x\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝² : Ring R\ninst✝¹ : CommRing S\nf : R →+* S\nM : Type v\nI : AddCommGroup M\ninst✝ : Module S M\nthis : SMul R M\nr : R\ns : S\nm : M\n⊢ ↑f r • s • m = s • ↑f r • m\n[PROOFSTEP]\nsimp [← mul_smul, mul_comm]\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M1 M2 : ModuleCat R\nl : M1 ⟶ M2\n⊢ obj' f M1 ⟶ obj' f M2\n[PROOFSTEP]\napply @LinearMap.baseChange R S M1 M2 _ _ ((algebraMap S _).comp f).toAlgebra _ _ _ _ l\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\nx : ↑(obj' f M)\n⊢ ↑(map' f (𝟙 M)) x = ↑(𝟙 (obj' f M)) x\n[PROOFSTEP]\ndsimp only [map']\n  -- Porting note: this got put in the dsimp by mathport\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\nx : ↑(obj' f M)\n⊢ ↑(LinearMap.baseChange S (𝟙 M)) x = ↑(𝟙 (obj' f M)) x\n[PROOFSTEP]\nrw [ModuleCat.id_apply]\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\nx : ↑(obj' f M)\n⊢ ↑(LinearMap.baseChange S (𝟙 M)) x = x\n[PROOFSTEP]\ninduction' x using TensorProduct.induction_on with _ _ m s ihx ihy\n[GOAL]\ncase zero\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\n⊢ ↑(LinearMap.baseChange S (𝟙 M)) 0 = 0\n[PROOFSTEP]\nrw [map_zero]\n  -- Porting note: simp only [map_zero] failed\n[GOAL]\ncase tmul\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\nx✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny✝ : ↑M\n⊢ ↑(LinearMap.baseChange S (𝟙 M)) (x✝ ⊗ₜ[R] y✝) = x✝ ⊗ₜ[R] y✝\n[PROOFSTEP]\nerw [@LinearMap.baseChange_tmul R S M M _ _ (_), ModuleCat.id_apply]\n[GOAL]\ncase add\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM✝ M : ModuleCat R\nm s : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑M\nihx : ↑(LinearMap.baseChange S (𝟙 M)) m = m\nihy : ↑(LinearMap.baseChange S (𝟙 M)) s = s\n⊢ ↑(LinearMap.baseChange S (𝟙 M)) (m + s) = m + s\n[PROOFSTEP]\nrw [map_add, ihx, ihy]\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M₁ M₂ M₃ : ModuleCat R\nl₁₂ : M₁ ⟶ M₂\nl₂₃ : M₂ ⟶ M₃\nx : ↑(obj' f M₁)\n⊢ ↑(map' f (l₁₂ ≫ l₂₃)) x = ↑(map' f l₁₂ ≫ map' f l₂₃) x\n[PROOFSTEP]\ndsimp only [map']\n[GOAL]\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M₁ M₂ M₃ : ModuleCat R\nl₁₂ : M₁ ⟶ M₂\nl₂₃ : M₂ ⟶ M₃\nx : ↑(obj' f M₁)\n⊢ ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) x = ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) x\n[PROOFSTEP]\ninduction' x using TensorProduct.induction_on with _ _ x y ihx ihy\n[GOAL]\ncase zero\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M₁ M₂ M₃ : ModuleCat R\nl₁₂ : M₁ ⟶ M₂\nl₂₃ : M₂ ⟶ M₃\n⊢ ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) 0 = ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase tmul\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M₁ M₂ M₃ : ModuleCat R\nl₁₂ : M₁ ⟶ M₂\nl₂₃ : M₂ ⟶ M₃\nx✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny✝ : ↑M₁\n⊢ ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) (x✝ ⊗ₜ[R] y✝) =\n    ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) (x✝ ⊗ₜ[R] y✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase add\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nM M₁ M₂ M₃ : ModuleCat R\nl₁₂ : M₁ ⟶ M₂\nl₂₃ : M₂ ⟶ M₃\nx y : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑M₁\nihx : ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) x = ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) x\nihy : ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) y = ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) y\n⊢ ↑(LinearMap.baseChange S (l₁₂ ≫ l₂₃)) (x + y) = ↑(LinearMap.baseChange S l₁₂ ≫ LinearMap.baseChange S l₂₃) (x + y)\n[PROOFSTEP]\nrw [map_add, map_add, ihx, ihy]\n  -- Porting note: simp again failing where rw succeeds\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nx y : S\n⊢ (fun s' => ↑g (s' * s)) (x + y) = (fun s' => ↑g (s' * s)) x + (fun s' => ↑g (s' * s)) y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nx y : S\n⊢ ↑g ((x + y) * s) = ↑g (x * s) + ↑g (y * s)\n[PROOFSTEP]\nrw [add_mul, map_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nr : R\nt : S\n⊢ AddHom.toFun\n      { toFun := fun s' => ↑g (s' * s),\n        map_add' :=\n          (_ : ∀ (x y : S), (fun s' => ↑g (s' * s)) (x + y) = (fun s' => ↑g (s' * s)) x + (fun s' => ↑g (s' * s)) y) }\n      (r • t) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun s' => ↑g (s' * s),\n          map_add' :=\n            (_ : ∀ (x y : S), (fun s' => ↑g (s' * s)) (x + y) = (fun s' => ↑g (s' * s)) x + (fun s' => ↑g (s' * s)) y) }\n        t\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nr : R\nt : S\n⊢ ↑g (r • t * s) = r • ↑g (t * s)\n[PROOFSTEP]\nrw [← LinearMap.map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nr : R\nt : S\n⊢ ↑g (r • t * s) = ↑g (r • (t * s))\n[PROOFSTEP]\nerw [smul_eq_mul, smul_eq_mul, mul_assoc]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : SMul S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := hasSMul f M\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\ns : S\n⊢ ↑(1 • g) s = ↑g s\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : SMul S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := hasSMul f M\ns t : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nx : S\n⊢ ↑((s * t) • g) x = ↑(s • t • g) x\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : MulAction S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := mulAction f M\ns t : S\n⊢ ↑(s • 0) t = ↑0 t\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : MulAction S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := mulAction f M\ns : S\ng h : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nt : S\n⊢ ↑(s • (g + h)) t = ↑(s • g + s • h) t\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : DistribMulAction S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := distribMulAction f M\ns1 s2 : S\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nx : S\n⊢ ↑((s1 + s2) • g) x = ↑(s1 • g + s2 • g) x\n[PROOFSTEP]\nsimp [mul_add, LinearMap.map_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝⁵ : CommRing R✝\ninst✝⁴ : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝³ : Ring R\ninst✝² : Ring S\nf : R →+* S\nM : Type v\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nsrc✝ : DistribMulAction S (↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M) := distribMulAction f M\ng : ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] M\nx : S\n⊢ ↑(0 • g) x = ↑0 x\n[PROOFSTEP]\nsimp [LinearMap.map_zero]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nM✝ : ModuleCat R\nM M' : ModuleCat R\ng : M ⟶ M'\ns : S\nh : ↑(obj' f M)\nt : S\n⊢ ↑(AddHom.toFun\n          { toFun := fun h => LinearMap.comp g h,\n            map_add' :=\n              (_ : ∀ (x x_1 : ↑(obj' f M)), LinearMap.comp g (x + x_1) = LinearMap.comp g x + LinearMap.comp g x_1) }\n          (s • h))\n      t =\n    ↑(↑(RingHom.id S) s •\n          AddHom.toFun\n            { toFun := fun h => LinearMap.comp g h,\n              map_add' :=\n                (_ : ∀ (x x_1 : ↑(obj' f M)), LinearMap.comp g (x + x_1) = LinearMap.comp g x + LinearMap.comp g x_1) }\n            h)\n      t\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nM✝ : ModuleCat R\nM M' : ModuleCat R\ng : M ⟶ M'\ns : S\nh : ↑(obj' f M)\nt : S\n⊢ ↑g (↑(s • h) t) = ↑(s • LinearMap.comp g h) t\n[PROOFSTEP]\nrw [smul_apply', smul_apply']\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nM✝ : ModuleCat R\nM M' : ModuleCat R\ng : M ⟶ M'\ns : S\nh : ↑(obj' f M)\nt : S\n⊢ ↑g (↑h (t * s)) = ↑(LinearMap.comp g h) (t * s)\n[PROOFSTEP]\nsimp\n  -- Porting note: smul_apply' not working in simp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\ns1 s2 : S\n⊢ (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2\n[PROOFSTEP]\nsimp only [add_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\ns1 s2 : S\n⊢ ↑g (s1 • y + s2 • y) = ↑g (s1 • y) + ↑g (s2 • y)\n[PROOFSTEP]\nrw [LinearMap.map_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\nr : R\ns : S\n⊢ AddHom.toFun\n      { toFun := fun s => ↑g (s • y),\n        map_add' :=\n          (_ : ∀ (s1 s2 : S), (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n      (r • s) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun s => ↑g (s • y),\n          map_add' :=\n            (_ : ∀ (s1 s2 : S), (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n        s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\nr : R\ns : S\n⊢ ↑g ((r • s) • y) = r • ↑g (s • y)\n[PROOFSTEP]\nrw [← g.map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\nr : R\ns : S\n⊢ ↑g ((r • s) • y) = ↑g (r • s • y)\n[PROOFSTEP]\nerw [smul_eq_mul, mul_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny : ↑Y\nr : R\ns : S\n⊢ ↑g (↑f r • s • y) = ↑g (r • s • y)\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny1 y2 : ↑Y\ns : S\n⊢ ↑((fun y =>\n            {\n              toAddHom :=\n                { toFun := fun s => ↑g (s • y),\n                  map_add' :=\n                    (_ :\n                      ∀ (s1 s2 : S),\n                        (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => ↑g (s • y),\n                          map_add' :=\n                            (_ :\n                              ∀ (s1 s2 : S),\n                                (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => ↑g (s • y),\n                            map_add' :=\n                              (_ :\n                                ∀ (s1 s2 : S),\n                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                          s) })\n          (y1 + y2))\n      s =\n    ↑((fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => ↑g (s • y),\n                    map_add' :=\n                      (_ :\n                        ∀ (s1 s2 : S),\n                          (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => ↑g (s • y),\n                            map_add' :=\n                              (_ :\n                                ∀ (s1 s2 : S),\n                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => ↑g (s • y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (s1 s2 : S),\n                                    (fun s => ↑g (s • y)) (s1 + s2) =\n                                      (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                            s) })\n            y1 +\n          (fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => ↑g (s • y),\n                    map_add' :=\n                      (_ :\n                        ∀ (s1 s2 : S),\n                          (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => ↑g (s • y),\n                            map_add' :=\n                              (_ :\n                                ∀ (s1 s2 : S),\n                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => ↑g (s • y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (s1 s2 : S),\n                                    (fun s => ↑g (s • y)) (s1 + s2) =\n                                      (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                            s) })\n            y2)\n      s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny1 y2 : ↑Y\ns : S\n⊢ ↑g (s • (y1 + y2)) =\n    ↑({\n            toAddHom :=\n              { toFun := fun s => ↑g (s • y1),\n                map_add' := (_ : ∀ (s1 s2 : S), ↑g ((s1 + s2) • y1) = ↑g (s1 • y1) + ↑g (s2 • y1)) },\n            map_smul' := (_ : ∀ (r : R) (s : S), ↑g ((r • s) • y1) = r • ↑g (s • y1)) } +\n          {\n            toAddHom :=\n              { toFun := fun s => ↑g (s • y2),\n                map_add' := (_ : ∀ (s1 s2 : S), ↑g ((s1 + s2) • y2) = ↑g (s1 • y2) + ↑g (s2 • y2)) },\n            map_smul' := (_ : ∀ (r : R) (s : S), ↑g ((r • s) • y2) = r • ↑g (s • y2)) })\n      s\n[PROOFSTEP]\nrw [LinearMap.add_apply, LinearMap.coe_mk, LinearMap.coe_mk]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny1 y2 : ↑Y\ns : S\n⊢ ↑g (s • (y1 + y2)) =\n    ↑{ toFun := fun s => ↑g (s • y1),\n            map_add' := (_ : ∀ (s1 s2 : S), ↑g ((s1 + s2) • y1) = ↑g (s1 • y1) + ↑g (s2 • y1)) }\n        s +\n      ↑{ toFun := fun s => ↑g (s • y2),\n            map_add' := (_ : ∀ (s1 s2 : S), ↑g ((s1 + s2) • y2) = ↑g (s1 • y2) + ↑g (s2 • y2)) }\n        s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ny1 y2 : ↑Y\ns : S\n⊢ ↑g (s • (y1 + y2)) = ↑g (s • y1) + ↑g (s • y2)\n[PROOFSTEP]\nrw [smul_add, map_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ns : S\ny : ↑Y\nt : S\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => ↑g (s • y),\n                    map_add' :=\n                      (_ :\n                        ∀ (s1 s2 : S),\n                          (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => ↑g (s • y),\n                            map_add' :=\n                              (_ :\n                                ∀ (s1 s2 : S),\n                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => ↑g (s • y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (s1 s2 : S),\n                                    (fun s => ↑g (s • y)) (s1 + s2) =\n                                      (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                            s) },\n            map_add' :=\n              (_ :\n                ∀ (y1 y2 : ↑Y),\n                  (fun y =>\n                        {\n                          toAddHom :=\n                            { toFun := fun s => ↑g (s • y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (s1 s2 : S),\n                                    (fun s => ↑g (s • y)) (s1 + s2) =\n                                      (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => ↑g (s • y),\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s1 s2 : S),\n                                            (fun s => ↑g (s • y)) (s1 + s2) =\n                                              (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => ↑g (s • y),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s1 s2 : S),\n                                              (fun s => ↑g (s • y)) (s1 + s2) =\n                                                (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                      s) })\n                      (y1 + y2) =\n                    (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => ↑g (s • y),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s1 s2 : S),\n                                      (fun s => ↑g (s • y)) (s1 + s2) =\n                                        (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => ↑g (s • y),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s1 s2 : S),\n                                              (fun s => ↑g (s • y)) (s1 + s2) =\n                                                (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => ↑g (s • y),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s1 s2 : S),\n                                                (fun s => ↑g (s • y)) (s1 + s2) =\n                                                  (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                        s) })\n                        y1 +\n                      (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => ↑g (s • y),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s1 s2 : S),\n                                      (fun s => ↑g (s • y)) (s1 + s2) =\n                                        (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => ↑g (s • y),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s1 s2 : S),\n                                              (fun s => ↑g (s • y)) (s1 + s2) =\n                                                (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => ↑g (s • y),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s1 s2 : S),\n                                                (fun s => ↑g (s • y)) (s1 + s2) =\n                                                  (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                        s) })\n                        y2) }\n          (s • y))\n      t =\n    ↑(↑(RingHom.id S) s •\n          AddHom.toFun\n            {\n              toFun := fun y =>\n                {\n                  toAddHom :=\n                    { toFun := fun s => ↑g (s • y),\n                      map_add' :=\n                        (_ :\n                          ∀ (s1 s2 : S),\n                            (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => ↑g (s • y),\n                              map_add' :=\n                                (_ :\n                                  ∀ (s1 s2 : S),\n                                    (fun s => ↑g (s • y)) (s1 + s2) =\n                                      (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => ↑g (s • y),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s1 s2 : S),\n                                      (fun s => ↑g (s • y)) (s1 + s2) =\n                                        (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                              s) },\n              map_add' :=\n                (_ :\n                  ∀ (y1 y2 : ↑Y),\n                    (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => ↑g (s • y),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s1 s2 : S),\n                                      (fun s => ↑g (s • y)) (s1 + s2) =\n                                        (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => ↑g (s • y),\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s1 s2 : S),\n                                              (fun s => ↑g (s • y)) (s1 + s2) =\n                                                (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => ↑g (s • y),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s1 s2 : S),\n                                                (fun s => ↑g (s • y)) (s1 + s2) =\n                                                  (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                        s) })\n                        (y1 + y2) =\n                      (fun y =>\n                            {\n                              toAddHom :=\n                                { toFun := fun s => ↑g (s • y),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s1 s2 : S),\n                                        (fun s => ↑g (s • y)) (s1 + s2) =\n                                          (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => ↑g (s • y),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s1 s2 : S),\n                                                (fun s => ↑g (s • y)) (s1 + s2) =\n                                                  (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => ↑g (s • y),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s1 s2 : S),\n                                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                          s) })\n                          y1 +\n                        (fun y =>\n                            {\n                              toAddHom :=\n                                { toFun := fun s => ↑g (s • y),\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s1 s2 : S),\n                                        (fun s => ↑g (s • y)) (s1 + s2) =\n                                          (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => ↑g (s • y),\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s1 s2 : S),\n                                                (fun s => ↑g (s • y)) (s1 + s2) =\n                                                  (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => ↑g (s • y),\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s1 s2 : S),\n                                                  (fun s => ↑g (s • y)) (s1 + s2) =\n                                                    (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n                                          s) })\n                          y2) }\n            y)\n      t\n[PROOFSTEP]\nrw [RingHom.id_apply, LinearMap.coe_mk, CategoryTheory.ModuleCat.CoextendScalars.smul_apply', LinearMap.coe_mk]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ns : S\ny : ↑Y\nt : S\n⊢ ↑{ toFun := fun s_1 => ↑g (s_1 • s • y),\n          map_add' :=\n            (_ :\n              ∀ (s1 s2 : S),\n                (fun s_1 => ↑g (s_1 • s • y)) (s1 + s2) =\n                  (fun s_1 => ↑g (s_1 • s • y)) s1 + (fun s_1 => ↑g (s_1 • s • y)) s2) }\n      t =\n    ↑{ toFun := fun s => ↑g (s • y),\n          map_add' :=\n            (_ : ∀ (s1 s2 : S), (fun s => ↑g (s • y)) (s1 + s2) = (fun s => ↑g (s • y)) s1 + (fun s => ↑g (s • y)) s2) }\n      (t * s)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (restrictScalars f).obj Y ⟶ X\ns : S\ny : ↑Y\nt : S\n⊢ ↑g (t • s • y) = ↑g ((t * s) • y)\n[PROOFSTEP]\nrw [mul_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nx y : ↑((restrictScalars f).obj Y)\n⊢ (fun y => AddHom.toFun (↑g y).toAddHom 1) (x + y) =\n    (fun y => AddHom.toFun (↑g y).toAddHom 1) x + (fun y => AddHom.toFun (↑g y).toAddHom 1) y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nx y : ↑((restrictScalars f).obj Y)\n⊢ ↑(↑g (x + y)) 1 = ↑(↑g x) 1 + ↑(↑g y) 1\n[PROOFSTEP]\nrw [g.map_add, LinearMap.add_apply]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ AddHom.toFun\n      { toFun := fun y => AddHom.toFun (↑g y).toAddHom 1,\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑((restrictScalars f).obj Y)),\n              (fun y => AddHom.toFun (↑g y).toAddHom 1) (x + y) =\n                (fun y => AddHom.toFun (↑g y).toAddHom 1) x + (fun y => AddHom.toFun (↑g y).toAddHom 1) y) }\n      (r • y) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun y => AddHom.toFun (↑g y).toAddHom 1,\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑((restrictScalars f).obj Y)),\n                (fun y => AddHom.toFun (↑g y).toAddHom 1) (x + y) =\n                  (fun y => AddHom.toFun (↑g y).toAddHom 1) x + (fun y => AddHom.toFun (↑g y).toAddHom 1) y) }\n        y\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ ↑(↑g (↑f r • y)) 1 = r • ↑(↑g y) 1\n[PROOFSTEP]\nrw [← LinearMap.map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ ↑(↑g (↑f r • y)) 1 = ↑(↑g y) (r • 1)\n[PROOFSTEP]\nerw [smul_eq_mul, mul_one, LinearMap.map_smul]\n  -- Porting note: should probably change CoeFun for obj above\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ ↑(↑f r • ↑g y) 1 = ↑(↑g y) (↑f r)\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ AddHom.toFun (↑f r • ↑g y).toAddHom 1 = ↑(↑g y) (↑f r)\n[PROOFSTEP]\nrw [CoextendScalars.smul_apply (s := f r) (g := g y) (s' := 1), one_mul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : Y ⟶ (coextendScalars f).obj X\nr : R\ny : ↑Y\n⊢ AddHom.toFun (↑g y).toAddHom (↑f r) = ↑(↑g y) (↑f r)\n[PROOFSTEP]\nrw [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny : ↑Y\nr : R\ns : S\n⊢ AddHom.toFun\n      { toFun := fun s => s • y,\n        map_add' := (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n      (r • s) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun s => s • y,\n          map_add' := (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n        s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny : ↑Y\nr : R\ns : S\n⊢ (r • s) • y = ↑f r • s • y\n[PROOFSTEP]\nerw [smul_eq_mul, mul_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny1 y2 : ↑Y\ns : S\n⊢ ↑((fun y =>\n            {\n              toAddHom :=\n                { toFun := fun s => s • y,\n                  map_add' :=\n                    (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => s • y,\n                          map_add' :=\n                            (_ :\n                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => s • y,\n                            map_add' :=\n                              (_ :\n                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n                          s) })\n          (y1 + y2))\n      s =\n    ↑((fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => s • y,\n                    map_add' :=\n                      (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => s • y,\n                            map_add' :=\n                              (_ :\n                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => s • y,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                    (s + s') • y = s • y + s' • y) }\n                            s) })\n            y1 +\n          (fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => s • y,\n                    map_add' :=\n                      (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => s • y,\n                            map_add' :=\n                              (_ :\n                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => s • y,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                    (s + s') • y = s • y + s' • y) }\n                            s) })\n            y2)\n      s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny1 y2 : ↑Y\ns : S\n⊢ ↑{\n          toAddHom :=\n            { toFun := fun s => s • (y1 + y2),\n              map_add' :=\n                (_ :\n                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                    (s + s') • (y1 + y2) = s • (y1 + y2) + s' • (y1 + y2)) },\n          map_smul' := (_ : ∀ (r : R) (s : S), (↑f r * s) • (y1 + y2) = ↑f r • s • (y1 + y2)) }\n      s =\n    ↑({\n            toAddHom :=\n              { toFun := fun s => s • y1,\n                map_add' :=\n                  (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y1 = s • y1 + s' • y1) },\n            map_smul' := (_ : ∀ (r : R) (s : S), (↑f r * s) • y1 = ↑f r • s • y1) } +\n          {\n            toAddHom :=\n              { toFun := fun s => s • y2,\n                map_add' :=\n                  (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y2 = s • y2 + s' • y2) },\n            map_smul' := (_ : ∀ (r : R) (s : S), (↑f r * s) • y2 = ↑f r • s • y2) })\n      s\n[PROOFSTEP]\nrw [LinearMap.add_apply, LinearMap.coe_mk, LinearMap.coe_mk, LinearMap.coe_mk]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny1 y2 : ↑Y\ns : S\n⊢ ↑{ toFun := fun s => s • (y1 + y2),\n          map_add' :=\n            (_ :\n              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                (s + s') • (y1 + y2) = s • (y1 + y2) + s' • (y1 + y2)) }\n      s =\n    ↑{ toFun := fun s => s • y1,\n            map_add' := (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y1 = s • y1 + s' • y1) }\n        s +\n      ↑{ toFun := fun s => s • y2,\n            map_add' := (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y2 = s • y2 + s' • y2) }\n        s\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ny1 y2 : ↑Y\ns : S\n⊢ s • (y1 + y2) = s • y1 + s • y2\n[PROOFSTEP]\nrw [smul_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ns : S\ny : ↑Y\nt : S\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun y =>\n              {\n                toAddHom :=\n                  { toFun := fun s => s • y,\n                    map_add' :=\n                      (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => s • y,\n                            map_add' :=\n                              (_ :\n                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => s • y,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                    (s + s') • y = s • y + s' • y) }\n                            s) },\n            map_add' :=\n              (_ :\n                ∀ (y1 y2 : ↑Y),\n                  (fun y =>\n                        {\n                          toAddHom :=\n                            { toFun := fun s => s • y,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                    (s + s') • y = s • y + s' • y) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => s • y,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                            (s + s') • y = s • y + s' • y) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => s • y,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                              (s + s') • y = s • y + s' • y) }\n                                      s) })\n                      (y1 + y2) =\n                    (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => s • y,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                      (s + s') • y = s • y + s' • y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => s • y,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                              (s + s') • y = s • y + s' • y) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => s • y,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                (s + s') • y = s • y + s' • y) }\n                                        s) })\n                        y1 +\n                      (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => s • y,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                      (s + s') • y = s • y + s' • y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => s • y,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                              (s + s') • y = s • y + s' • y) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => s • y,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                (s + s') • y = s • y + s' • y) }\n                                        s) })\n                        y2) }\n          (s • y))\n      t =\n    ↑(↑(RingHom.id S) s •\n          AddHom.toFun\n            {\n              toFun := fun y =>\n                {\n                  toAddHom :=\n                    { toFun := fun s => s • y,\n                      map_add' :=\n                        (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => s • y,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                    (s + s') • y = s • y + s' • y) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => s • y,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                      (s + s') • y = s • y + s' • y) }\n                              s) },\n              map_add' :=\n                (_ :\n                  ∀ (y1 y2 : ↑Y),\n                    (fun y =>\n                          {\n                            toAddHom :=\n                              { toFun := fun s => s • y,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                      (s + s') • y = s • y + s' • y) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => s • y,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                              (s + s') • y = s • y + s' • y) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => s • y,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                (s + s') • y = s • y + s' • y) }\n                                        s) })\n                        (y1 + y2) =\n                      (fun y =>\n                            {\n                              toAddHom :=\n                                { toFun := fun s => s • y,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                        (s + s') • y = s • y + s' • y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => s • y,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                (s + s') • y = s • y + s' • y) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => s • y,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                  (s + s') • y = s • y + s' • y) }\n                                          s) })\n                          y1 +\n                        (fun y =>\n                            {\n                              toAddHom :=\n                                { toFun := fun s => s • y,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                        (s + s') • y = s • y + s' • y) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => s • y,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                (s + s') • y = s • y + s' • y) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => s • y,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))),\n                                                  (s + s') • y = s • y + s' • y) }\n                                          s) })\n                          y2) }\n            y)\n      t\n[PROOFSTEP]\nrw [RingHom.id_apply, LinearMap.coe_mk, CoextendScalars.smul_apply', LinearMap.coe_mk]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ns : S\ny : ↑Y\nt : S\n⊢ ↑{ toFun := fun s_1 => s_1 • s • y,\n          map_add' :=\n            (_ :\n              ∀ (s_1 s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s_1 + s') • s • y = s_1 • s • y + s' • s • y) }\n      t =\n    ↑{ toFun := fun s => s • y,\n          map_add' := (_ : ∀ (s s' : ↑((restrictScalars f).obj (ModuleCat.mk S))), (s + s') • y = s • y + s' • y) }\n      (t * s)\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY : ModuleCat S\ns : S\ny : ↑Y\nt : S\n⊢ t • s • y = (t * s) • y\n[PROOFSTEP]\nrw [mul_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ ↑(↑((𝟭 (ModuleCat S)).map g ≫ (fun Y => app' f Y) Y') y) s =\n    ↑(↑((fun Y => app' f Y) Y ≫ (restrictScalars f ⋙ coextendScalars f).map g) y) s\n[PROOFSTEP]\nsimp only [ModuleCat.coe_comp, Functor.id_map, Functor.id_obj, Functor.comp_obj, Functor.comp_map]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ ↑(↑(g ≫ app' f Y') y) s = ↑(↑(app' f Y ≫ (coextendScalars f).map ((restrictScalars f).map g)) y) s\n[PROOFSTEP]\nrw [coe_comp, coe_comp, Function.comp, Function.comp]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ ↑(↑(app' f Y') (↑g y)) s = ↑(↑((coextendScalars f).map ((restrictScalars f).map g)) (↑(app' f Y) y)) s\n[PROOFSTEP]\nconv_rhs => rw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n| ↑(↑((coextendScalars f).map ((restrictScalars f).map g)) (↑(app' f Y) y)) s\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n| ↑(↑((coextendScalars f).map ((restrictScalars f).map g)) (↑(app' f Y) y)) s\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n| ↑(↑((coextendScalars f).map ((restrictScalars f).map g)) (↑(app' f Y) y)) s\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ ↑(↑(app' f Y') (↑g y)) s =\n    AddHom.toFun (↑((coextendScalars f).map ((restrictScalars f).map g)) (↑(app' f Y) y)).toAddHom s\n[PROOFSTEP]\nerw [CoextendScalars.map_apply, AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, restrictScalars.map_apply f]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ ↑(↑(app' f Y') (↑g y)) s = ↑((restrictScalars f).map g) (↑(↑(app' f Y) y).toAddHom s)\n[PROOFSTEP]\nchange s • (g y) = g (s • y)\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\ny : ↑Y\ns : S\n⊢ s • ↑g y = ↑g (s • y)\n[PROOFSTEP]\nrw [map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nx1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)\n⊢ (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n    (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nx1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)\n⊢ ↑(x1 + x2) 1 = ↑x1 1 + ↑x2 1\n[PROOFSTEP]\nrw [LinearMap.add_apply]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ AddHom.toFun\n      { toFun := fun g => AddHom.toFun g.toAddHom 1,\n        map_add' :=\n          (_ :\n            ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n              (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n      (r • g) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun g => AddHom.toFun g.toAddHom 1,\n          map_add' :=\n            (_ :\n              ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                  (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n        g\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ ↑(↑f r • g) 1 = r • ↑g 1\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ AddHom.toFun (↑f r • g).toAddHom 1 = r • ↑g 1\n[PROOFSTEP]\nrw [CoextendScalars.smul_apply (s := f r) (g := g) (s' := 1), one_mul, ← LinearMap.map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ AddHom.toFun g.toAddHom (↑f r) = ↑g (r • 1)\n[PROOFSTEP]\nrw [← LinearMap.coe_toAddHom, ← AddHom.toFun_eq_coe]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ AddHom.toFun g.toAddHom (↑f r) = AddHom.toFun g.toAddHom (r • 1)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ ↑f r = r • 1\n[PROOFSTEP]\nchange f r = (f r) • (1 : S)\n[GOAL]\ncase e_a\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat R\nr : R\ng : ↑((restrictScalars f).obj ((coextendScalars f).obj X))\n⊢ ↑f r = ↑f r • 1\n[PROOFSTEP]\nrw [smul_eq_mul (a := f r) (a' := 1), mul_one]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX X' : ModuleCat R\ng : X ⟶ X'\nh : ↑((coextendScalars f ⋙ restrictScalars f).obj X)\n⊢ ↑((coextendScalars f ⋙ restrictScalars f).map g ≫\n          (fun X =>\n              {\n                toAddHom :=\n                  { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                    map_add' :=\n                      (_ :\n                        ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                          (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                            (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (g : ↑((restrictScalars f).obj ((coextendScalars f).obj X))),\n                      AddHom.toFun\n                          { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                            map_add' :=\n                              (_ :\n                                ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                  (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                    (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                          (r • g) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                    (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                      (fun g => AddHom.toFun g.toAddHom 1) x1 +\n                                        (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                            g) })\n            X')\n      h =\n    ↑((fun X =>\n              {\n                toAddHom :=\n                  { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                    map_add' :=\n                      (_ :\n                        ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                          (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                            (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (g : ↑((restrictScalars f).obj ((coextendScalars f).obj X))),\n                      AddHom.toFun\n                          { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                            map_add' :=\n                              (_ :\n                                ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                  (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                    (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                          (r • g) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                    (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                      (fun g => AddHom.toFun g.toAddHom 1) x1 +\n                                        (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                            g) })\n            X ≫\n          (𝟭 (ModuleCat R)).map g)\n      h\n[PROOFSTEP]\nrw [ModuleCat.coe_comp]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX X' : ModuleCat R\ng : X ⟶ X'\nh : ↑((coextendScalars f ⋙ restrictScalars f).obj X)\n⊢ (↑((fun X =>\n              {\n                toAddHom :=\n                  { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                    map_add' :=\n                      (_ :\n                        ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                          (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                            (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (g : ↑((restrictScalars f).obj ((coextendScalars f).obj X))),\n                      AddHom.toFun\n                          { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                            map_add' :=\n                              (_ :\n                                ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                  (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                    (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                          (r • g) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                    (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                      (fun g => AddHom.toFun g.toAddHom 1) x1 +\n                                        (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                            g) })\n            X') ∘\n        ↑((coextendScalars f ⋙ restrictScalars f).map g))\n      h =\n    ↑((fun X =>\n              {\n                toAddHom :=\n                  { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                    map_add' :=\n                      (_ :\n                        ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                          (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                            (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (g : ↑((restrictScalars f).obj ((coextendScalars f).obj X))),\n                      AddHom.toFun\n                          { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                            map_add' :=\n                              (_ :\n                                ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                  (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                    (fun g => AddHom.toFun g.toAddHom 1) x1 + (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                          (r • g) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun g => AddHom.toFun g.toAddHom 1,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x1 x2 : ↑((coextendScalars f ⋙ restrictScalars f).obj X)),\n                                    (fun g => AddHom.toFun g.toAddHom 1) (x1 + x2) =\n                                      (fun g => AddHom.toFun g.toAddHom 1) x1 +\n                                        (fun g => AddHom.toFun g.toAddHom 1) x2) }\n                            g) })\n            X ≫\n          (𝟭 (ModuleCat R)).map g)\n      h\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : (restrictScalars f).obj X ⟶ Y\nx : ↑X\n⊢ ↑(RestrictionCoextensionAdj.HomEquiv.toRestriction f (RestrictionCoextensionAdj.HomEquiv.fromRestriction f g)) x =\n    ↑g x\n[PROOFSTEP]\nrw [RestrictionCoextensionAdj.HomEquiv.toRestriction_apply, AddHom.toFun_eq_coe, LinearMap.coe_toAddHom,\n  RestrictionCoextensionAdj.HomEquiv.fromRestriction_apply_apply, one_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\nx : ↑X\ns : S\n⊢ ↑(↑(RestrictionCoextensionAdj.HomEquiv.fromRestriction f (RestrictionCoextensionAdj.HomEquiv.toRestriction f g)) x)\n      s =\n    ↑(↑g x) s\n[PROOFSTEP]\nrw [RestrictionCoextensionAdj.HomEquiv.fromRestriction_apply_apply,\n  RestrictionCoextensionAdj.HomEquiv.toRestriction_apply, AddHom.toFun_eq_coe, LinearMap.coe_toAddHom,\n  LinearMap.map_smulₛₗ, RingHom.id_apply, CoextendScalars.smul_apply', one_mul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\n⊢ ∀ (x : ↑((restrictScalars f).obj X)),\n    ↑(↑((fun X Y =>\n                    { toFun := RestrictionCoextensionAdj.HomEquiv.fromRestriction f,\n                      invFun := RestrictionCoextensionAdj.HomEquiv.toRestriction f,\n                      left_inv :=\n                        (_ :\n                          ∀ (g : (restrictScalars f).obj X ⟶ Y),\n                            RestrictionCoextensionAdj.HomEquiv.toRestriction f\n                                (RestrictionCoextensionAdj.HomEquiv.fromRestriction f g) =\n                              g),\n                      right_inv :=\n                        (_ :\n                          ∀ (g : X ⟶ (coextendScalars f).obj Y),\n                            RestrictionCoextensionAdj.HomEquiv.fromRestriction f\n                                (RestrictionCoextensionAdj.HomEquiv.toRestriction f g) =\n                              g) })\n                  X Y).symm\n            g)\n        x =\n      ↑((restrictScalars f).map g ≫ NatTrans.app (RestrictionCoextensionAdj.counit' f) Y) x\n[PROOFSTEP]\nintro x\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\nx : ↑((restrictScalars f).obj X)\n⊢ ↑(↑((fun X Y =>\n                  { toFun := RestrictionCoextensionAdj.HomEquiv.fromRestriction f,\n                    invFun := RestrictionCoextensionAdj.HomEquiv.toRestriction f,\n                    left_inv :=\n                      (_ :\n                        ∀ (g : (restrictScalars f).obj X ⟶ Y),\n                          RestrictionCoextensionAdj.HomEquiv.toRestriction f\n                              (RestrictionCoextensionAdj.HomEquiv.fromRestriction f g) =\n                            g),\n                    right_inv :=\n                      (_ :\n                        ∀ (g : X ⟶ (coextendScalars f).obj Y),\n                          RestrictionCoextensionAdj.HomEquiv.fromRestriction f\n                              (RestrictionCoextensionAdj.HomEquiv.toRestriction f g) =\n                            g) })\n                X Y).symm\n          g)\n      x =\n    ↑((restrictScalars f).map g ≫ NatTrans.app (RestrictionCoextensionAdj.counit' f) Y) x\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\nx : ↑((restrictScalars f).obj X)\n⊢ ↑(↑g x) 1 = ↑((restrictScalars f).map g ≫ NatTrans.app (RestrictionCoextensionAdj.counit' f) Y) x\n[PROOFSTEP]\nrw [coe_comp, Function.comp]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\nx : ↑((restrictScalars f).obj X)\n⊢ ↑(↑g x) 1 = ↑(NatTrans.app (RestrictionCoextensionAdj.counit' f) Y) (↑((restrictScalars f).map g) x)\n[PROOFSTEP]\nchange _ = (((restrictScalars f).map g) x).toFun (1 : S)\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : Ring R\ninst✝ : Ring S\nf : R →+* S\nX : ModuleCat S\nY : ModuleCat R\ng : X ⟶ (coextendScalars f).obj Y\nx : ↑((restrictScalars f).obj X)\n⊢ ↑(↑g x) 1 = AddHom.toFun (↑((restrictScalars f).map g) x).toAddHom 1\n[PROOFSTEP]\nrw [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, restrictScalars.map_apply]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nx✝¹ x✝ : ↑X\n⊢ (fun x => ↑g (1 ⊗ₜ[R] x)) (x✝¹ + x✝) = (fun x => ↑g (1 ⊗ₜ[R] x)) x✝¹ + (fun x => ↑g (1 ⊗ₜ[R] x)) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nx✝¹ x✝ : ↑X\n⊢ ↑g (1 ⊗ₜ[R] (x✝¹ + x✝)) = ↑g (1 ⊗ₜ[R] x✝¹) + ↑g (1 ⊗ₜ[R] x✝)\n[PROOFSTEP]\nrw [tmul_add, map_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\n⊢ AddHom.toFun\n      { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n        map_add' :=\n          (_ :\n            ∀ (x x_1 : ↑X),\n              (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : ↑X),\n                (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n        x\n[PROOFSTEP]\nletI : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\nthis : Module R S := Module.compHom S f\n⊢ AddHom.toFun\n      { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n        map_add' :=\n          (_ :\n            ∀ (x x_1 : ↑X),\n              (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : ↑X),\n                (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n        x\n[PROOFSTEP]\nletI : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\nthis✝ : Module R S := Module.compHom S f\nthis : Module R ↑Y := Module.compHom (↑Y) f\n⊢ AddHom.toFun\n      { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n        map_add' :=\n          (_ :\n            ∀ (x x_1 : ↑X),\n              (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => ↑g (1 ⊗ₜ[R] x),\n          map_add' :=\n            (_ :\n              ∀ (x x_1 : ↑X),\n                (fun x => ↑g (1 ⊗ₜ[R] x)) (x + x_1) = (fun x => ↑g (1 ⊗ₜ[R] x)) x + (fun x => ↑g (1 ⊗ₜ[R] x)) x_1) }\n        x\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\nthis✝ : Module R S := Module.compHom S f\nthis : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑g (1 ⊗ₜ[R] (r • x)) = ↑f r • ↑g (1 ⊗ₜ[R] x)\n[PROOFSTEP]\nrw [RestrictScalars.smul_def, ← LinearMap.map_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\nthis✝ : Module R S := Module.compHom S f\nthis : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑g\n      (1 ⊗ₜ[R]\n        ↑(AddEquiv.symm (RestrictScalars.addEquiv R R ↑X))\n          (↑(algebraMap R R) r • ↑(RestrictScalars.addEquiv R R ↑X) x)) =\n    ↑g (↑f r • 1 ⊗ₜ[R] x)\n[PROOFSTEP]\nerw [tmul_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nr : R\nx : ↑X\nthis✝ : Module R S := Module.compHom S f\nthis : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑g (↑(algebraMap R R) r • 1 ⊗ₜ[R] ↑(RestrictScalars.addEquiv R R ↑X) x) = ↑g (↑f r • 1 ⊗ₜ[R] x)\n[PROOFSTEP]\ncongr\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ns : S\ng : X ⟶ (restrictScalars f).obj Y\n⊢ ∀ (x y : ↑X), (fun x => s • ↑g x) (x + y) = (fun x => s • ↑g x) x + (fun x => s • ↑g x) y\n[PROOFSTEP]\nintros\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ns : S\ng : X ⟶ (restrictScalars f).obj Y\nx✝ y✝ : ↑X\n⊢ (fun x => s • ↑g x) (x✝ + y✝) = (fun x => s • ↑g x) x✝ + (fun x => s • ↑g x) y✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ns : S\ng : X ⟶ (restrictScalars f).obj Y\nx✝ y✝ : ↑X\n⊢ s • ↑g (x✝ + y✝) = s • ↑g x✝ + s • ↑g y✝\n[PROOFSTEP]\nrw [map_add, smul_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ns : S\ng : X ⟶ (restrictScalars f).obj Y\n⊢ ∀ (r : R) (x : ↑X),\n    AddHom.toFun\n        { toFun := fun x => s • ↑g x,\n          map_add' := (_ : ∀ (x y : ↑X), (fun x => s • ↑g x) (x + y) = (fun x => s • ↑g x) x + (fun x => s • ↑g x) y) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          { toFun := fun x => s • ↑g x,\n            map_add' :=\n              (_ : ∀ (x y : ↑X), (fun x => s • ↑g x) (x + y) = (fun x => s • ↑g x) x + (fun x => s • ↑g x) y) }\n          x\n[PROOFSTEP]\nintros r x\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ns : S\ng : X ⟶ (restrictScalars f).obj Y\nr : R\nx : ↑X\n⊢ AddHom.toFun\n      { toFun := fun x => s • ↑g x,\n        map_add' := (_ : ∀ (x y : ↑X), (fun x => s • ↑g x) (x + y) = (fun x => s • ↑g x) x + (fun x => s • ↑g x) y) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => s • ↑g x,\n          map_add' := (_ : ∀ (x y : ↑X), (fun x => s • ↑g x) (x + y) = (fun x => s • ↑g x) x + (fun x => s • ↑g x) y) }\n        x\n[PROOFSTEP]\nrw [AddHom.toFun_eq_coe, AddHom.coe_mk, RingHom.id_apply, LinearMap.map_smul, smul_comm r s (g x : Y)]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\n⊢ (extendScalars f).obj X ⟶ Y\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\n⊢ (extendScalars f).obj X ⟶ Y\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ (extendScalars f).obj X ⟶ Y\n[PROOFSTEP]\nrefine { toFun := fun z => TensorProduct.lift ?_ z, map_add' := ?_, map_smul' := ?_ }\n[GOAL]\ncase refine_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\n⊢ ↑((restrictScalars f).obj (ModuleCat.mk S)) →ₗ[R] ↑X →ₗ[R] ↑Y\n[PROOFSTEP]\nrefine\n  { toFun := fun s => HomEquiv.evalAt f s g, map_add' := fun (s₁ s₂ : S) => ?_, map_smul' := fun (r : R) (s : S) => ?_ }\n[GOAL]\ncase refine_1.refine_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\ns₁ s₂ : S\n⊢ (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂\n[PROOFSTEP]\next\n[GOAL]\ncase refine_1.refine_1.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\ns₁ s₂ : S\nx✝ : ↑X\n⊢ ↑((fun s => evalAt f s g) (s₁ + s₂)) x✝ = ↑((fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) x✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine_1.refine_1.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\ns₁ s₂ : S\nx✝ : ↑X\n⊢ (s₁ + s₂) • ↑g x✝ = s₁ • ↑g x✝ + s₂ • ↑g x✝\n[PROOFSTEP]\nrw [← add_smul]\n[GOAL]\ncase refine_1.refine_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\nr : R\ns : S\n⊢ AddHom.toFun\n      { toFun := fun s => evalAt f s g,\n        map_add' :=\n          (_ :\n            ∀ (s₁ s₂ : S),\n              (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n      (r • s) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun s => evalAt f s g,\n          map_add' :=\n            (_ :\n              ∀ (s₁ s₂ : S),\n                (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n        s\n[PROOFSTEP]\next x\n[GOAL]\ncase refine_1.refine_2.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\nr : R\ns : S\nx : ↑X\n⊢ ↑(AddHom.toFun\n          { toFun := fun s => evalAt f s g,\n            map_add' :=\n              (_ :\n                ∀ (s₁ s₂ : S),\n                  (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n          (r • s))\n      x =\n    ↑(↑(RingHom.id R) r •\n          AddHom.toFun\n            { toFun := fun s => evalAt f s g,\n              map_add' :=\n                (_ :\n                  ∀ (s₁ s₂ : S),\n                    (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n            s)\n      x\n[PROOFSTEP]\napply mul_smul (f r) s (g x)\n[GOAL]\ncase refine_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (x y : ↑((extendScalars f).obj X)),\n    (fun z =>\n          ↑(lift\n                {\n                  toAddHom :=\n                    { toFun := fun s => evalAt f s g,\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s => evalAt f s g) (s₁ + s₂) =\n                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              s) })\n            z)\n        (x + y) =\n      (fun z =>\n            ↑(lift\n                  {\n                    toAddHom :=\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (s : S),\n                          AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              (r • s) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                s) })\n              z)\n          x +\n        (fun z =>\n            ↑(lift\n                  {\n                    toAddHom :=\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (s : S),\n                          AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              (r • s) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                s) })\n              z)\n          y\n[PROOFSTEP]\nintros z₁ z₂\n[GOAL]\ncase refine_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz₁ z₂ : ↑((extendScalars f).obj X)\n⊢ (fun z =>\n        ↑(lift\n              {\n                toAddHom :=\n                  { toFun := fun s => evalAt f s g,\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s => evalAt f s g) (s₁ + s₂) =\n                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            s) })\n          z)\n      (z₁ + z₂) =\n    (fun z =>\n          ↑(lift\n                {\n                  toAddHom :=\n                    { toFun := fun s => evalAt f s g,\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s => evalAt f s g) (s₁ + s₂) =\n                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              s) })\n            z)\n        z₁ +\n      (fun z =>\n          ↑(lift\n                {\n                  toAddHom :=\n                    { toFun := fun s => evalAt f s g,\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s => evalAt f s g) (s₁ + s₂) =\n                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              s) })\n            z)\n        z₂\n[PROOFSTEP]\nchange lift _ (z₁ + z₂) = lift _ z₁ + lift _ z₂\n[GOAL]\ncase refine_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz₁ z₂ : ↑((extendScalars f).obj X)\n⊢ ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (z₁ + z₂) =\n    ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        z₁ +\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        z₂\n[PROOFSTEP]\nrw [map_add]\n[GOAL]\ncase refine_3\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (r : S) (x : ↑((extendScalars f).obj X)),\n    AddHom.toFun\n        {\n          toFun := fun z =>\n            ↑(lift\n                  {\n                    toAddHom :=\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (s : S),\n                          AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              (r • s) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                s) })\n              z,\n          map_add' :=\n            (_ :\n              ∀ (z₁ z₂ : ↑((extendScalars f).obj X)),\n                ↑(lift\n                        {\n                          toAddHom :=\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => evalAt f s g,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s => evalAt f s g) (s₁ + s₂) =\n                                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      s) })\n                    (z₁ + z₂) =\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        s) })\n                      z₁ +\n                    ↑(lift\n                          {\n                            toAddHom :=\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        s) })\n                      z₂) }\n        (r • x) =\n      ↑(RingHom.id S) r •\n        AddHom.toFun\n          {\n            toFun := fun z =>\n              ↑(lift\n                    {\n                      toAddHom :=\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (s : S),\n                            AddHom.toFun\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                (r • s) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun s => evalAt f s g,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (s₁ s₂ : S),\n                                          (fun s => evalAt f s g) (s₁ + s₂) =\n                                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                  s) })\n                z,\n            map_add' :=\n              (_ :\n                ∀ (z₁ z₂ : ↑((extendScalars f).obj X)),\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        s) })\n                      (z₁ + z₂) =\n                    ↑(lift\n                            {\n                              toAddHom :=\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => evalAt f s g,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s₁ s₂ : S),\n                                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                          s) })\n                        z₁ +\n                      ↑(lift\n                            {\n                              toAddHom :=\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun s => evalAt f s g,\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s₁ s₂ : S),\n                                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                          s) })\n                        z₂) }\n          x\n[PROOFSTEP]\nintro s z\n[GOAL]\ncase refine_3\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nz : ↑((extendScalars f).obj X)\n⊢ AddHom.toFun\n      {\n        toFun := fun z =>\n          ↑(lift\n                {\n                  toAddHom :=\n                    { toFun := fun s => evalAt f s g,\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s => evalAt f s g) (s₁ + s₂) =\n                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              s) })\n            z,\n        map_add' :=\n          (_ :\n            ∀ (z₁ z₂ : ↑((extendScalars f).obj X)),\n              ↑(lift\n                      {\n                        toAddHom :=\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (s : S),\n                              AddHom.toFun\n                                  { toFun := fun s => evalAt f s g,\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (s₁ s₂ : S),\n                                          (fun s => evalAt f s g) (s₁ + s₂) =\n                                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                  (r • s) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun s => evalAt f s g,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s => evalAt f s g) (s₁ + s₂) =\n                                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                    s) })\n                  (z₁ + z₂) =\n                ↑(lift\n                        {\n                          toAddHom :=\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => evalAt f s g,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s => evalAt f s g) (s₁ + s₂) =\n                                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      s) })\n                    z₁ +\n                  ↑(lift\n                        {\n                          toAddHom :=\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => evalAt f s g,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s => evalAt f s g) (s₁ + s₂) =\n                                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      s) })\n                    z₂) }\n      (s • z) =\n    ↑(RingHom.id S) s •\n      AddHom.toFun\n        {\n          toFun := fun z =>\n            ↑(lift\n                  {\n                    toAddHom :=\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (s : S),\n                          AddHom.toFun\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                              (r • s) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun s => evalAt f s g,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s => evalAt f s g) (s₁ + s₂) =\n                                          (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                s) })\n              z,\n          map_add' :=\n            (_ :\n              ∀ (z₁ z₂ : ↑((extendScalars f).obj X)),\n                ↑(lift\n                        {\n                          toAddHom :=\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    { toFun := fun s => evalAt f s g,\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s => evalAt f s g) (s₁ + s₂) =\n                                              (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      s) })\n                    (z₁ + z₂) =\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        s) })\n                      z₁ +\n                    ↑(lift\n                          {\n                            toAddHom :=\n                              { toFun := fun s => evalAt f s g,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s => evalAt f s g) (s₁ + s₂) =\n                                        (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      { toFun := fun s => evalAt f s g,\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun s => evalAt f s g,\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                                        s) })\n                      z₂) }\n        z\n[PROOFSTEP]\nchange lift _ (s • z) = s • lift _ z\n[GOAL]\ncase refine_3\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nz : ↑((extendScalars f).obj X)\n⊢ ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • z) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        z\n[PROOFSTEP]\ninduction' z using TensorProduct.induction_on with s' x x y ih1 ih2\n[GOAL]\ncase refine_3.zero\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\n⊢ ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • 0) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        0\n[PROOFSTEP]\nrw [smul_zero, map_zero, smul_zero]\n[GOAL]\ncase refine_3.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • s' ⊗ₜ[R] x) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        (s' ⊗ₜ[R] x)\n[PROOFSTEP]\nrw [LinearMap.coe_mk, ExtendScalars.smul_tmul]\n[GOAL]\ncase refine_3.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) }).toAddHom\n      ((s * s') ⊗ₜ[R] x) =\n    s •\n      ↑(lift\n              {\n                toAddHom :=\n                  { toFun := fun s => evalAt f s g,\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s => evalAt f s g) (s₁ + s₂) =\n                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            s) }).toAddHom\n        (s' ⊗ₜ[R] x)\n[PROOFSTEP]\nerw [lift.tmul, lift.tmul]\n[GOAL]\ncase refine_3.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ ↑(↑{\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) }\n          (s * s'))\n      x =\n    s •\n      ↑(↑{\n                toAddHom :=\n                  { toFun := fun s => evalAt f s g,\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s => evalAt f s g) (s₁ + s₂) =\n                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            s) }\n            s')\n        x\n[PROOFSTEP]\nset s' : S := s'\n[GOAL]\ncase refine_3.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\ns' : S := s'✝\n⊢ ↑(↑{\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) }\n          (s * s'))\n      x =\n    s •\n      ↑(↑{\n                toAddHom :=\n                  { toFun := fun s => evalAt f s g,\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s => evalAt f s g) (s₁ + s₂) =\n                            (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun s => evalAt f s g,\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s => evalAt f s g) (s₁ + s₂) =\n                                      (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                            s) }\n            s')\n        x\n[PROOFSTEP]\nchange (s * s') • (g x) = s • s' • (g x)\n[GOAL]\ncase refine_3.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\ns' : S := s'✝\n⊢ (s * s') • ↑g x = s • s' • ↑g x\n[PROOFSTEP]\nrw [mul_smul]\n[GOAL]\ncase refine_3.add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nx y : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑X\nih1 :\n  ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • x) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        x\nih2 :\n  ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • y) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        y\n⊢ ↑(lift\n          {\n            toAddHom :=\n              { toFun := fun s => evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      { toFun := fun s => evalAt f s g,\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s => evalAt f s g) (s₁ + s₂) =\n                                (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        s) })\n      (s • (x + y)) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                { toFun := fun s => evalAt f s g,\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => evalAt f s g) (s₁ + s₂) = (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => evalAt f s g,\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => evalAt f s g) (s₁ + s₂) =\n                                  (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => evalAt f s g,\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => evalAt f s g) (s₁ + s₂) =\n                                    (fun s => evalAt f s g) s₁ + (fun s => evalAt f s g) s₂) }\n                          s) })\n        (x + y)\n[PROOFSTEP]\nrw [smul_add, map_add, ih1, ih2, map_add, smul_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\n⊢ HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g) = g\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\n⊢ HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g) = g\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g) = g\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (x : ↑((extendScalars f).obj X)), ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) x = ↑g x\n[PROOFSTEP]\nintro z\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz : ↑((extendScalars f).obj X)\n⊢ ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) z = ↑g z\n[PROOFSTEP]\ninduction' z using TensorProduct.induction_on with x s z1 z2 ih1 ih2\n[GOAL]\ncase h.zero\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) 0 = ↑g 0\n[PROOFSTEP]\nrw [map_zero, map_zero]\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑((restrictScalars f).obj (ModuleCat.mk S))\ns : ↑X\n⊢ ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) (x ⊗ₜ[R] s) = ↑g (x ⊗ₜ[R] s)\n[PROOFSTEP]\nerw [TensorProduct.lift.tmul]\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑((restrictScalars f).obj (ModuleCat.mk S))\ns : ↑X\n⊢ ↑(↑{\n              toAddHom :=\n                { toFun := fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g),\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) (s₁ + s₂) =\n                          (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₁ +\n                            (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        { toFun := fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g),\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) (s₁ + s₂) =\n                                  (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₁ +\n                                    (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g),\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) (s₁ + s₂) =\n                                    (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₁ +\n                                      (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₂) }\n                          s) }\n          x)\n      s =\n    ↑g (x ⊗ₜ[R] s)\n[PROOFSTEP]\nsimp only [LinearMap.coe_mk]\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑((restrictScalars f).obj (ModuleCat.mk S))\ns : ↑X\n⊢ ↑(↑{ toFun := fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g),\n              map_add' :=\n                (_ :\n                  ∀ (s₁ s₂ : S),\n                    (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) (s₁ + s₂) =\n                      (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₁ +\n                        (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₂) }\n          x)\n      s =\n    ↑g (x ⊗ₜ[R] s)\n[PROOFSTEP]\nchange S at x \n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑X\nx : S\n⊢ ↑(↑{ toFun := fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g),\n              map_add' :=\n                (_ :\n                  ∀ (s₁ s₂ : S),\n                    (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) (s₁ + s₂) =\n                      (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₁ +\n                        (fun s => HomEquiv.evalAt f s (HomEquiv.toRestrictScalars f g)) s₂) }\n          x)\n      s =\n    ↑g (x ⊗ₜ[R] s)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑X\nx : S\n⊢ x • ↑(HomEquiv.toRestrictScalars f g) s = ↑g (x ⊗ₜ[R] s)\n[PROOFSTEP]\nerw [← LinearMap.map_smul, ExtendScalars.smul_tmul, mul_one x]\n[GOAL]\ncase h.add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nz1 z2 : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑X\nih1 : ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) z1 = ↑g z1\nih2 : ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) z2 = ↑g z2\n⊢ ↑(HomEquiv.fromExtendScalars f (HomEquiv.toRestrictScalars f g)) (z1 + z2) = ↑g (z1 + z2)\n[PROOFSTEP]\nrw [map_add, map_add, ih1, ih2]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\n⊢ HomEquiv.toRestrictScalars f (HomEquiv.fromExtendScalars f g) = g\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\n⊢ HomEquiv.toRestrictScalars f (HomEquiv.fromExtendScalars f g) = g\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ HomEquiv.toRestrictScalars f (HomEquiv.fromExtendScalars f g) = g\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (x : ↑X), ↑(HomEquiv.toRestrictScalars f (HomEquiv.fromExtendScalars f g)) x = ↑g x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑X\n⊢ ↑(HomEquiv.toRestrictScalars f (HomEquiv.fromExtendScalars f g)) x = ↑g x\n[PROOFSTEP]\nrw [HomEquiv.toRestrictScalars_apply, HomEquiv.fromExtendScalars_apply, lift.tmul, LinearMap.coe_mk, LinearMap.coe_mk]\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑X\n⊢ ↑(↑{ toFun := fun s => HomEquiv.evalAt f s g,\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s => HomEquiv.evalAt f s g) (s₁ + s₂) =\n                        (fun s => HomEquiv.evalAt f s g) s₁ + (fun s => HomEquiv.evalAt f s g) s₂) }\n            1).toAddHom\n      x =\n    ↑g x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx : ↑X\n⊢ 1 • ↑g x = ↑g x\n[PROOFSTEP]\nrw [one_smul]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nx x' : ↑X\n⊢ (fun x => 1 ⊗ₜ[R] x) (x + x') = (fun x => 1 ⊗ₜ[R] x) x + (fun x => 1 ⊗ₜ[R] x) x'\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nx x' : ↑X\n⊢ 1 ⊗ₜ[R] (x + x') = 1 ⊗ₜ[R] x + 1 ⊗ₜ[R] x'\n[PROOFSTEP]\nrw [TensorProduct.tmul_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nr : R\nx : ↑X\n⊢ AddHom.toFun\n      { toFun := fun x => 1 ⊗ₜ[R] x,\n        map_add' :=\n          (_ : ∀ (x x' : ↑X), (fun x => 1 ⊗ₜ[R] x) (x + x') = (fun x => 1 ⊗ₜ[R] x) x + (fun x => 1 ⊗ₜ[R] x) x') }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => 1 ⊗ₜ[R] x,\n          map_add' :=\n            (_ : ∀ (x x' : ↑X), (fun x => 1 ⊗ₜ[R] x) (x + x') = (fun x => 1 ⊗ₜ[R] x) x + (fun x => 1 ⊗ₜ[R] x) x') }\n        x\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nr : R\nx : ↑X\nm1 : Module R S := Module.compHom S f\n⊢ AddHom.toFun\n      { toFun := fun x => 1 ⊗ₜ[R] x,\n        map_add' :=\n          (_ : ∀ (x x' : ↑X), (fun x => 1 ⊗ₜ[R] x) (x + x') = (fun x => 1 ⊗ₜ[R] x) x + (fun x => 1 ⊗ₜ[R] x) x') }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x => 1 ⊗ₜ[R] x,\n          map_add' :=\n            (_ : ∀ (x x' : ↑X), (fun x => 1 ⊗ₜ[R] x) (x + x') = (fun x => 1 ⊗ₜ[R] x) x + (fun x => 1 ⊗ₜ[R] x) x') }\n        x\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nr : R\nx : ↑X\nm1 : Module R S := Module.compHom S f\n⊢ 1 ⊗ₜ[R] (r • x) = r • 1 ⊗ₜ[R] x\n[PROOFSTEP]\nrw [← TensorProduct.smul_tmul, TensorProduct.smul_tmul']\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\n⊢ (restrictScalars f ⋙ extendScalars f).obj Y ⟶ Y\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\n⊢ (restrictScalars f ⋙ extendScalars f).obj Y ⟶ Y\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ (restrictScalars f ⋙ extendScalars f).obj Y ⟶ Y\n[PROOFSTEP]\nrefine'\n  {\n    toFun :=\n      TensorProduct.lift\n        { toFun := fun s : S => { toFun := fun y : Y => s • y, map_add' := smul_add _, map_smul' := _ }, map_add' := _,\n          map_smul' := _ },\n    map_add' := _, map_smul' := _ }\n[GOAL]\ncase refine'_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\n⊢ ∀ (r : R) (x : ↑Y),\n    AddHom.toFun { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) } x\n[PROOFSTEP]\nintros r y\n[GOAL]\ncase refine'_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nr : R\ny : ↑Y\n⊢ AddHom.toFun { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) } (r • y) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) } y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nr : R\ny : ↑Y\n⊢ s • r • y = r • s • y\n[PROOFSTEP]\nchange s • f r • y = f r • s • y\n[GOAL]\ncase refine'_1\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nr : R\ny : ↑Y\n⊢ s • ↑f r • y = ↑f r • s • y\n[PROOFSTEP]\nrw [← mul_smul, mul_comm, mul_smul]\n[GOAL]\ncase refine'_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (x y : S),\n    (fun s =>\n          { toAddHom := { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (y : ↑Y),\n                  AddHom.toFun\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                      (r • y) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        y) })\n        (x + y) =\n      (fun s =>\n            {\n              toAddHom :=\n                { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (y : ↑Y),\n                    AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        (r • y) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          y) })\n          x +\n        (fun s =>\n            {\n              toAddHom :=\n                { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (y : ↑Y),\n                    AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        (r • y) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          y) })\n          y\n[PROOFSTEP]\nintros s₁ s₂\n[GOAL]\ncase refine'_2\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns₁ s₂ : S\n⊢ (fun s =>\n        { toAddHom := { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n          map_smul' :=\n            (_ :\n              ∀ (r : R) (y : ↑Y),\n                AddHom.toFun\n                    { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                    (r • y) =\n                  ↑(RingHom.id R) r •\n                    AddHom.toFun\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                      y) })\n      (s₁ + s₂) =\n    (fun s =>\n          { toAddHom := { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (y : ↑Y),\n                  AddHom.toFun\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                      (r • y) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        y) })\n        s₁ +\n      (fun s =>\n          { toAddHom := { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (y : ↑Y),\n                  AddHom.toFun\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                      (r • y) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        y) })\n        s₂\n[PROOFSTEP]\next y\n[GOAL]\ncase refine'_2.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns₁ s₂ : S\ny : ↑Y\n⊢ ↑((fun s =>\n            {\n              toAddHom :=\n                { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (y : ↑Y),\n                    AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        (r • y) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          y) })\n          (s₁ + s₂))\n      y =\n    ↑((fun s =>\n              {\n                toAddHom :=\n                  { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (y : ↑Y),\n                      AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          (r • y) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                            y) })\n            s₁ +\n          (fun s =>\n              {\n                toAddHom :=\n                  { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (y : ↑Y),\n                      AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          (r • y) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                            y) })\n            s₂)\n      y\n[PROOFSTEP]\nchange (s₁ + s₂) • y = s₁ • y + s₂ • y\n[GOAL]\ncase refine'_2.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns₁ s₂ : S\ny : ↑Y\n⊢ (s₁ + s₂) • y = s₁ • y + s₂ • y\n[PROOFSTEP]\nrw [add_smul]\n[GOAL]\ncase refine'_3\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (r : R) (x : S),\n    AddHom.toFun\n        {\n          toFun := fun s =>\n            {\n              toAddHom :=\n                { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (y : ↑Y),\n                    AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        (r • y) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          y) },\n          map_add' :=\n            (_ :\n              ∀ (s₁ s₂ : S),\n                (fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) })\n                    (s₁ + s₂) =\n                  (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      s₁ +\n                    (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      s₂) }\n        (r • x) =\n      ↑(RingHom.id R) r •\n        AddHom.toFun\n          {\n            toFun := fun s =>\n              {\n                toAddHom :=\n                  { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (y : ↑Y),\n                      AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          (r • y) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                            y) },\n            map_add' :=\n              (_ :\n                ∀ (s₁ s₂ : S),\n                  (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      (s₁ + s₂) =\n                    (fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) })\n                        s₁ +\n                      (fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) })\n                        s₂) }\n          x\n[PROOFSTEP]\nintros r s\n[GOAL]\ncase refine'_3\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nr : R\ns : S\n⊢ AddHom.toFun\n      {\n        toFun := fun s =>\n          { toAddHom := { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (y : ↑Y),\n                  AddHom.toFun\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                      (r • y) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        y) },\n        map_add' :=\n          (_ :\n            ∀ (s₁ s₂ : S),\n              (fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (y : ↑Y),\n                            AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                (r • y) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  y) })\n                  (s₁ + s₂) =\n                (fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) })\n                    s₁ +\n                  (fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) })\n                    s₂) }\n      (r • s) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        {\n          toFun := fun s =>\n            {\n              toAddHom :=\n                { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (y : ↑Y),\n                    AddHom.toFun\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                        (r • y) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          y) },\n          map_add' :=\n            (_ :\n              ∀ (s₁ s₂ : S),\n                (fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) })\n                    (s₁ + s₂) =\n                  (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      s₁ +\n                    (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      s₂) }\n        s\n[PROOFSTEP]\next y\n[GOAL]\ncase refine'_3.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nr : R\ns : S\ny : ↑Y\n⊢ ↑(AddHom.toFun\n          {\n            toFun := fun s =>\n              {\n                toAddHom :=\n                  { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (y : ↑Y),\n                      AddHom.toFun\n                          { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                          (r • y) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                            y) },\n            map_add' :=\n              (_ :\n                ∀ (s₁ s₂ : S),\n                  (fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) })\n                      (s₁ + s₂) =\n                    (fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) })\n                        s₁ +\n                      (fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) })\n                        s₂) }\n          (r • s))\n      y =\n    ↑(↑(RingHom.id R) r •\n          AddHom.toFun\n            {\n              toFun := fun s =>\n                {\n                  toAddHom :=\n                    { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (y : ↑Y),\n                        AddHom.toFun\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                            (r • y) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              y) },\n              map_add' :=\n                (_ :\n                  ∀ (s₁ s₂ : S),\n                    (fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) })\n                        (s₁ + s₂) =\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          s₁ +\n                        (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          s₂) }\n            s)\n      y\n[PROOFSTEP]\nchange (f r • s) • y = (f r) • s • y\n[GOAL]\ncase refine'_3.h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nr : R\ns : S\ny : ↑Y\n⊢ (↑f r • s) • y = ↑f r • s • y\n[PROOFSTEP]\nrw [smul_eq_mul, mul_smul]\n[GOAL]\ncase refine'_4\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (x y : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n    ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (y : ↑Y),\n                            AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                (r • y) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            (s₁ + s₂) =\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₁ +\n                            (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          s) })\n        (x + y) =\n      ↑(lift\n              {\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              (s₁ + s₂) =\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₁ +\n                              (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            s) })\n          x +\n        ↑(lift\n              {\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              (s₁ + s₂) =\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₁ +\n                              (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            s) })\n          y\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx✝ y✝ : ↑((restrictScalars f ⋙ extendScalars f).obj Y)\n⊢ ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (y : ↑Y),\n                          AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              (r • y) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          (s₁ + s₂) =\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₁ +\n                          (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) },\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  (s₁ + s₂) =\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₁ +\n                                  (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        s) })\n      (x✝ + y✝) =\n    ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (y : ↑Y),\n                            AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                (r • y) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            (s₁ + s₂) =\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₁ +\n                            (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          s) })\n        x✝ +\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (y : ↑Y),\n                            AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                (r • y) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            (s₁ + s₂) =\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₁ +\n                            (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          s) })\n        y✝\n[PROOFSTEP]\nrw [map_add]\n[GOAL]\ncase refine'_5\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ∀ (r : S) (x : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n    AddHom.toFun\n        {\n          toFun :=\n            ↑(lift\n                {\n                  toAddHom :=\n                    {\n                      toFun := fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) },\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                (s₁ + s₂) =\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  s₁ +\n                                (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) }\n                              s) }),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n                ↑(lift\n                        {\n                          toAddHom :=\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                (s₁ + s₂) =\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₁ +\n                                                (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      s) })\n                    (x + y) =\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        s) })\n                      x +\n                    ↑(lift\n                          {\n                            toAddHom :=\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        s) })\n                      y) }\n        (r • x) =\n      ↑(RingHom.id S) r •\n        AddHom.toFun\n          {\n            toFun :=\n              ↑(lift\n                  {\n                    toAddHom :=\n                      {\n                        toFun := fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) },\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  (s₁ + s₂) =\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₁ +\n                                  (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (s : S),\n                          AddHom.toFun\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) }\n                              (r • s) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                {\n                                  toFun := fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) },\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            (s₁ + s₂) =\n                                          (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₁ +\n                                            (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₂) }\n                                s) }),\n            map_add' :=\n              (_ :\n                ∀ (x y : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        s) })\n                      (x + y) =\n                    ↑(lift\n                            {\n                              toAddHom :=\n                                {\n                                  toFun := fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) },\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            (s₁ + s₂) =\n                                          (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₁ +\n                                            (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) },\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s₁ s₂ : S),\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      (s₁ + s₂) =\n                                                    (fun s =>\n                                                          {\n                                                            toAddHom :=\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                            map_smul' :=\n                                                              (_ :\n                                                                ∀ (r : R) (y : ↑Y),\n                                                                  AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      (r • y) =\n                                                                    ↑(RingHom.id R) r •\n                                                                      AddHom.toFun\n                                                                        { toFun := fun y => s • y,\n                                                                          map_add' :=\n                                                                            (_ :\n                                                                              ∀ (b₁ b₂ : ↑Y),\n                                                                                s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                        y) })\n                                                        s₁ +\n                                                      (fun s =>\n                                                          {\n                                                            toAddHom :=\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                            map_smul' :=\n                                                              (_ :\n                                                                ∀ (r : R) (y : ↑Y),\n                                                                  AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      (r • y) =\n                                                                    ↑(RingHom.id R) r •\n                                                                      AddHom.toFun\n                                                                        { toFun := fun y => s • y,\n                                                                          map_add' :=\n                                                                            (_ :\n                                                                              ∀ (b₁ b₂ : ↑Y),\n                                                                                s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                        y) })\n                                                        s₂) }\n                                          s) })\n                        x +\n                      ↑(lift\n                            {\n                              toAddHom :=\n                                {\n                                  toFun := fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) },\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (s₁ s₂ : S),\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            (s₁ + s₂) =\n                                          (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₁ +\n                                            (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              s₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (s : S),\n                                    AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        (r • s) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          {\n                                            toFun := fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) },\n                                            map_add' :=\n                                              (_ :\n                                                ∀ (s₁ s₂ : S),\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      (s₁ + s₂) =\n                                                    (fun s =>\n                                                          {\n                                                            toAddHom :=\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                            map_smul' :=\n                                                              (_ :\n                                                                ∀ (r : R) (y : ↑Y),\n                                                                  AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      (r • y) =\n                                                                    ↑(RingHom.id R) r •\n                                                                      AddHom.toFun\n                                                                        { toFun := fun y => s • y,\n                                                                          map_add' :=\n                                                                            (_ :\n                                                                              ∀ (b₁ b₂ : ↑Y),\n                                                                                s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                        y) })\n                                                        s₁ +\n                                                      (fun s =>\n                                                          {\n                                                            toAddHom :=\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                            map_smul' :=\n                                                              (_ :\n                                                                ∀ (r : R) (y : ↑Y),\n                                                                  AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      (r • y) =\n                                                                    ↑(RingHom.id R) r •\n                                                                      AddHom.toFun\n                                                                        { toFun := fun y => s • y,\n                                                                          map_add' :=\n                                                                            (_ :\n                                                                              ∀ (b₁ b₂ : ↑Y),\n                                                                                s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                        y) })\n                                                        s₂) }\n                                          s) })\n                        y) }\n          x\n[PROOFSTEP]\nintro s z\n[GOAL]\ncase refine'_5\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nz : ↑((restrictScalars f ⋙ extendScalars f).obj Y)\n⊢ AddHom.toFun\n      {\n        toFun :=\n          ↑(lift\n              {\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              (s₁ + s₂) =\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₁ +\n                              (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            s) }),\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n              ↑(lift\n                      {\n                        toAddHom :=\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (s : S),\n                              AddHom.toFun\n                                  {\n                                    toFun := fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) },\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (s₁ s₂ : S),\n                                          (fun s =>\n                                                {\n                                                  toAddHom :=\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                  map_smul' :=\n                                                    (_ :\n                                                      ∀ (r : R) (y : ↑Y),\n                                                        AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            (r • y) =\n                                                          ↑(RingHom.id R) r •\n                                                            AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              y) })\n                                              (s₁ + s₂) =\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                s₁ +\n                                              (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                s₂) }\n                                  (r • s) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    {\n                                      toFun := fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                (s₁ + s₂) =\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₁ +\n                                                (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₂) }\n                                    s) })\n                  (x + y) =\n                ↑(lift\n                        {\n                          toAddHom :=\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                (s₁ + s₂) =\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₁ +\n                                                (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      s) })\n                    x +\n                  ↑(lift\n                        {\n                          toAddHom :=\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                (s₁ + s₂) =\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₁ +\n                                                (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      s) })\n                    y) }\n      (s • z) =\n    ↑(RingHom.id S) s •\n      AddHom.toFun\n        {\n          toFun :=\n            ↑(lift\n                {\n                  toAddHom :=\n                    {\n                      toFun := fun s =>\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (y : ↑Y),\n                                AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    (r • y) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      y) },\n                      map_add' :=\n                        (_ :\n                          ∀ (s₁ s₂ : S),\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                (s₁ + s₂) =\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  s₁ +\n                                (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  s₂) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (r : R) (s : S),\n                        AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            (r • s) =\n                          ↑(RingHom.id R) r •\n                            AddHom.toFun\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) }\n                              s) }),\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n                ↑(lift\n                        {\n                          toAddHom :=\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (r : R) (s : S),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (s₁ s₂ : S),\n                                            (fun s =>\n                                                  {\n                                                    toAddHom :=\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                    map_smul' :=\n                                                      (_ :\n                                                        ∀ (r : R) (y : ↑Y),\n                                                          AddHom.toFun\n                                                              { toFun := fun y => s • y,\n                                                                map_add' :=\n                                                                  (_ :\n                                                                    ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                              (r • y) =\n                                                            ↑(RingHom.id R) r •\n                                                              AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                y) })\n                                                (s₁ + s₂) =\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₁ +\n                                                (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  s₂) }\n                                    (r • s) =\n                                  ↑(RingHom.id R) r •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      s) })\n                    (x + y) =\n                  ↑(lift\n                          {\n                            toAddHom :=\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        s) })\n                      x +\n                    ↑(lift\n                          {\n                            toAddHom :=\n                              {\n                                toFun := fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (s₁ s₂ : S),\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          (s₁ + s₂) =\n                                        (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₁ +\n                                          (fun s =>\n                                              {\n                                                toAddHom :=\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                map_smul' :=\n                                                  (_ :\n                                                    ∀ (r : R) (y : ↑Y),\n                                                      AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          (r • y) =\n                                                        ↑(RingHom.id R) r •\n                                                          AddHom.toFun\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                            y) })\n                                            s₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (s : S),\n                                  AddHom.toFun\n                                      {\n                                        toFun := fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (s₁ s₂ : S),\n                                              (fun s =>\n                                                    {\n                                                      toAddHom :=\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                      map_smul' :=\n                                                        (_ :\n                                                          ∀ (r : R) (y : ↑Y),\n                                                            AddHom.toFun\n                                                                { toFun := fun y => s • y,\n                                                                  map_add' :=\n                                                                    (_ :\n                                                                      ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                (r • y) =\n                                                              ↑(RingHom.id R) r •\n                                                                AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  y) })\n                                                  (s₁ + s₂) =\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₁ +\n                                                  (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    s₂) }\n                                      (r • s) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        {\n                                          toFun := fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) },\n                                          map_add' :=\n                                            (_ :\n                                              ∀ (s₁ s₂ : S),\n                                                (fun s =>\n                                                      {\n                                                        toAddHom :=\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                        map_smul' :=\n                                                          (_ :\n                                                            ∀ (r : R) (y : ↑Y),\n                                                              AddHom.toFun\n                                                                  { toFun := fun y => s • y,\n                                                                    map_add' :=\n                                                                      (_ :\n                                                                        ∀ (b₁ b₂ : ↑Y),\n                                                                          s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                  (r • y) =\n                                                                ↑(RingHom.id R) r •\n                                                                  AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    y) })\n                                                    (s₁ + s₂) =\n                                                  (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₁ +\n                                                    (fun s =>\n                                                        {\n                                                          toAddHom :=\n                                                            { toFun := fun y => s • y,\n                                                              map_add' :=\n                                                                (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                                          map_smul' :=\n                                                            (_ :\n                                                              ∀ (r : R) (y : ↑Y),\n                                                                AddHom.toFun\n                                                                    { toFun := fun y => s • y,\n                                                                      map_add' :=\n                                                                        (_ :\n                                                                          ∀ (b₁ b₂ : ↑Y),\n                                                                            s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                    (r • y) =\n                                                                  ↑(RingHom.id R) r •\n                                                                    AddHom.toFun\n                                                                      { toFun := fun y => s • y,\n                                                                        map_add' :=\n                                                                          (_ :\n                                                                            ∀ (b₁ b₂ : ↑Y),\n                                                                              s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                                      y) })\n                                                      s₂) }\n                                        s) })\n                      y) }\n        z\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_5\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nz : ↑((restrictScalars f ⋙ extendScalars f).obj Y)\n⊢ ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • z) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        z\n[PROOFSTEP]\ninduction' z using TensorProduct.induction_on with s' y z1 z2 ih1 ih2\n[GOAL]\ncase refine'_5.zero\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\n⊢ ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • 0) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        0\n[PROOFSTEP]\nrw [smul_zero, map_zero, smul_zero]\n[GOAL]\ncase refine'_5.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • s' ⊗ₜ[R] y) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        (s' ⊗ₜ[R] y)\n[PROOFSTEP]\nrw [ExtendScalars.smul_tmul, LinearMap.coe_mk]\n[GOAL]\ncase refine'_5.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }).toAddHom\n      ((s * s') ⊗ₜ[R] y) =\n    s •\n      ↑(lift\n              {\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          {\n                              toAddHom :=\n                                { toFun := fun y => (s₁ + s₂) • y,\n                                  map_add' :=\n                                    (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                            {\n                                toAddHom :=\n                                  { toFun := fun y => s₁ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s₂ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (r • s) • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                          map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                        r •\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }).toAddHom\n        (s' ⊗ₜ[R] y)\n[PROOFSTEP]\nerw [TensorProduct.lift.tmul, TensorProduct.lift.tmul]\n[GOAL]\ncase refine'_5.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑(↑{\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }\n          (s * s'))\n      y =\n    s •\n      ↑(↑{\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          {\n                              toAddHom :=\n                                { toFun := fun y => (s₁ + s₂) • y,\n                                  map_add' :=\n                                    (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                            {\n                                toAddHom :=\n                                  { toFun := fun y => s₁ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s₂ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (r • s) • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                          map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                        r •\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }\n            s')\n        y\n[PROOFSTEP]\nset s' : S := s'\n[GOAL]\ncase refine'_5.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\ns' : S := s'✝\n⊢ ↑(↑{\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }\n          (s * s'))\n      y =\n    s •\n      ↑(↑{\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          {\n                              toAddHom :=\n                                { toFun := fun y => (s₁ + s₂) • y,\n                                  map_add' :=\n                                    (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                            {\n                                toAddHom :=\n                                  { toFun := fun y => s₁ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s₂ • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                                map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (r • s) • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                          map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                        r •\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) }\n            s')\n        y\n[PROOFSTEP]\nchange (s * s') • y = s • s' • y\n[GOAL]\ncase refine'_5.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\ns' : S := s'✝\n⊢ (s * s') • y = s • s' • y\n[PROOFSTEP]\nrw [mul_smul]\n[GOAL]\ncase refine'_5.add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY : ModuleCat S\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : S\nz1 z2 : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑((restrictScalars f).obj Y)\nih1 :\n  ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • z1) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        z1\nih2 :\n  ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • z2) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        z2\n⊢ ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      {\n                          toAddHom :=\n                            { toFun := fun y => (s₁ + s₂) • y,\n                              map_add' :=\n                                (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                        {\n                            toAddHom :=\n                              { toFun := fun y => s₁ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s₂ • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  {\n                      toAddHom :=\n                        { toFun := fun y => (r • s) • y,\n                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                      map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                    r •\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n      (s • (z1 + z2)) =\n    s •\n      ↑(lift\n            {\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        {\n                            toAddHom :=\n                              { toFun := fun y => (s₁ + s₂) • y,\n                                map_add' :=\n                                  (_ : ∀ (b₁ b₂ : ↑Y), (s₁ + s₂) • (b₁ + b₂) = (s₁ + s₂) • b₁ + (s₁ + s₂) • b₂) },\n                            map_smul' := (_ : ∀ (r : R) (y : ↑Y), (s₁ + s₂) • ↑f r • y = ↑f r • (s₁ + s₂) • y) } =\n                          {\n                              toAddHom :=\n                                { toFun := fun y => s₁ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₁ • (b₁ + b₂) = s₁ • b₁ + s₁ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₁ • ↑f r • y = ↑f r • s₁ • y) } +\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s₂ • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s₂ • (b₁ + b₂) = s₂ • b₁ + s₂ • b₂) },\n                              map_smul' := (_ : ∀ (r : R) (y : ↑Y), s₂ • ↑f r • y = ↑f r • s₂ • y) }) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    {\n                        toAddHom :=\n                          { toFun := fun y => (r • s) • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), (r • s) • (b₁ + b₂) = (r • s) • b₁ + (r • s) • b₂) },\n                        map_smul' := (_ : ∀ (r_1 : R) (y : ↑Y), (r • s) • ↑f r_1 • y = ↑f r_1 • (r • s) • y) } =\n                      r •\n                        {\n                          toAddHom :=\n                            { toFun := fun y => s • y,\n                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                          map_smul' := (_ : ∀ (r : R) (y : ↑Y), s • ↑f r • y = ↑f r • s • y) }) })\n        (z1 + z2)\n[PROOFSTEP]\nrw [smul_add, map_add, map_add, ih1, ih2, smul_add]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\n⊢ (restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y' =\n    (fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\n⊢ (restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y' =\n    (fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ (restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y' =\n    (fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g\n[PROOFSTEP]\nletI m2 : Module R Y' := Module.compHom Y' f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\n⊢ (restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y' =\n    (fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g\n[PROOFSTEP]\napply LinearMap.ext\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\n⊢ ∀ (x : ↑((restrictScalars f ⋙ extendScalars f).obj Y)),\n    ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') x =\n      ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) x\n[PROOFSTEP]\nintro z\n[GOAL]\ncase h\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\nz : ↑((restrictScalars f ⋙ extendScalars f).obj Y)\n⊢ ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z\n[PROOFSTEP]\ninduction' z using TensorProduct.induction_on with s' y z₁ z₂ ih₁ ih₂\n[GOAL]\ncase h.zero\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\n⊢ ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') 0 =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) 0\n[PROOFSTEP]\nrw [map_zero, map_zero]\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') (s' ⊗ₜ[R] y) =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) (s' ⊗ₜ[R] y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑((extendScalars f).map ((restrictScalars f).map g) ≫ Counit.map f) (s' ⊗ₜ[R] y) = ↑(Counit.map f ≫ g) (s' ⊗ₜ[R] y)\n[PROOFSTEP]\nrw [ModuleCat.coe_comp, ModuleCat.coe_comp, Function.comp, Function.comp, ExtendScalars.map_tmul,\n  restrictScalars.map_apply, Counit.map_apply, Counit.map_apply, lift.tmul, lift.tmul, LinearMap.coe_mk,\n  LinearMap.coe_mk]\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\ns' : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\n⊢ ↑(↑{\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (y : ↑Y'),\n                          AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              (r • y) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y'),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          (s₁ + s₂) =\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y'),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₁ +\n                          (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y'),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₂) }\n            s').toAddHom\n      (↑g y) =\n    ↑g\n      (↑(↑{\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              (s₁ + s₂) =\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₁ +\n                              (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            s) }\n            s')\n        y)\n[PROOFSTEP]\nset s' : S := s'\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\ns' : S := s'✝\n⊢ ↑(↑{\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (y : ↑Y'),\n                          AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              (r • y) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y'),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          (s₁ + s₂) =\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y'),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₁ +\n                          (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y'),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y'), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₂) }\n            s').toAddHom\n      (↑g y) =\n    ↑g\n      (↑(↑{\n                toAddHom :=\n                  {\n                    toFun := fun s =>\n                      {\n                        toAddHom :=\n                          { toFun := fun y => s • y,\n                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (r : R) (y : ↑Y),\n                              AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  (r • y) =\n                                ↑(RingHom.id R) r •\n                                  AddHom.toFun\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                    y) },\n                    map_add' :=\n                      (_ :\n                        ∀ (s₁ s₂ : S),\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              (s₁ + s₂) =\n                            (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₁ +\n                              (fun s =>\n                                  {\n                                    toAddHom :=\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                    map_smul' :=\n                                      (_ :\n                                        ∀ (r : R) (y : ↑Y),\n                                          AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              (r • y) =\n                                            ↑(RingHom.id R) r •\n                                              AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                y) })\n                                s₂) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : R) (s : S),\n                      AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          (r • s) =\n                        ↑(RingHom.id R) r •\n                          AddHom.toFun\n                            {\n                              toFun := fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (s₁ s₂ : S),\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        (s₁ + s₂) =\n                                      (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₁ +\n                                        (fun s =>\n                                            {\n                                              toAddHom :=\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                              map_smul' :=\n                                                (_ :\n                                                  ∀ (r : R) (y : ↑Y),\n                                                    AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        (r • y) =\n                                                      ↑(RingHom.id R) r •\n                                                        AddHom.toFun\n                                                          { toFun := fun y => s • y,\n                                                            map_add' :=\n                                                              (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                          y) })\n                                          s₂) }\n                            s) }\n            s')\n        y)\n[PROOFSTEP]\nchange s' • g y = g (s' • y)\n[GOAL]\ncase h.tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\ns'✝ : ↑((restrictScalars f).obj (ModuleCat.mk S))\ny : ↑((restrictScalars f).obj Y)\ns' : S := s'✝\n⊢ s' • ↑g y = ↑g (s' • y)\n[PROOFSTEP]\nrw [map_smul]\n[GOAL]\ncase h.add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\nz₁ z₂ : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑((restrictScalars f).obj Y)\nih₁ :\n  ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₁ =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₁\nih₂ :\n  ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₂ =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₂\n⊢ ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') (z₁ + z₂) =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) (z₁ + z₂)\n[PROOFSTEP]\nrw [map_add, map_add]\n[GOAL]\ncase h.add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nY Y' : ModuleCat S\ng : Y ⟶ Y'\nm1 : Module R S := Module.compHom S f\nm2✝ : Module R ↑Y := Module.compHom (↑Y) f\nm2 : Module R ↑Y' := Module.compHom (↑Y') f\nz₁ z₂ : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑((restrictScalars f).obj Y)\nih₁ :\n  ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₁ =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₁\nih₂ :\n  ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₂ =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₂\n⊢ ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₁ +\n      ↑((restrictScalars f ⋙ extendScalars f).map g ≫ (fun x => Counit.map f) Y') z₂ =\n    ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₁ +\n      ↑((fun x => Counit.map f) Y ≫ (𝟭 (ModuleCat S)).map g) z₂\n[PROOFSTEP]\ncongr 1\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nx : ↑X\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y) g) x =\n    ↑(NatTrans.app (ExtendRestrictScalarsAdj.unit f) X ≫ (restrictScalars f).map g) x\n[PROOFSTEP]\ndsimp\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nx : ↑X\n⊢ ↑(↑(ExtendRestrictScalarsAdj.homEquiv f) g) x = ↑(ExtendRestrictScalarsAdj.Unit.map f ≫ (restrictScalars f).map g) x\n[PROOFSTEP]\nrw [ModuleCat.coe_comp, Function.comp, restrictScalars.map_apply]\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : (extendScalars f).obj X ⟶ Y\nx : ↑X\n⊢ ↑(↑(ExtendRestrictScalarsAdj.homEquiv f) g) x = ↑g (↑(ExtendRestrictScalarsAdj.Unit.map f) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nx : ↑((extendScalars f).obj X)\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x\n[PROOFSTEP]\nletI m1 : Module R S := Module.compHom S f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nx : ↑((extendScalars f).obj X)\nm1 : Module R S := Module.compHom S f\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x\n[PROOFSTEP]\nletI m2 : Module R Y := Module.compHom Y f\n[GOAL]\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nx : ↑((extendScalars f).obj X)\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x\n[PROOFSTEP]\ninduction' x using TensorProduct.induction_on with s x _ _ _ _\n[GOAL]\ncase zero\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) 0 =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) 0\n[PROOFSTEP]\nrw [map_zero, map_zero]\n[GOAL]\ncase tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) (s ⊗ₜ[R] x) =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) (s ⊗ₜ[R] x)\n[PROOFSTEP]\nrw [ExtendRestrictScalarsAdj.homEquiv_symm_apply, ModuleCat.coe_comp, Function.comp_apply,\n  ExtendRestrictScalarsAdj.counit_app, ExtendRestrictScalarsAdj.Counit.map_apply]\n[GOAL]\ncase tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ ↑(ExtendRestrictScalarsAdj.HomEquiv.fromExtendScalars f g) (s ⊗ₜ[R] x) =\n    ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (y : ↑Y),\n                          AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              (r • y) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          (s₁ + s₂) =\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₁ +\n                          (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) },\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  (s₁ + s₂) =\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₁ +\n                                  (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        s) })\n      (↑((extendScalars f).map g) (s ⊗ₜ[R] x))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ s • ↑g x =\n    ↑(lift\n          {\n            toAddHom :=\n              {\n                toFun := fun s =>\n                  {\n                    toAddHom :=\n                      { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : R) (y : ↑Y),\n                          AddHom.toFun\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                              (r • y) =\n                            ↑(RingHom.id R) r •\n                              AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                y) },\n                map_add' :=\n                  (_ :\n                    ∀ (s₁ s₂ : S),\n                      (fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) })\n                          (s₁ + s₂) =\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₁ +\n                          (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            s₂) },\n            map_smul' :=\n              (_ :\n                ∀ (r : R) (s : S),\n                  AddHom.toFun\n                      {\n                        toFun := fun s =>\n                          {\n                            toAddHom :=\n                              { toFun := fun y => s • y,\n                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                            map_smul' :=\n                              (_ :\n                                ∀ (r : R) (y : ↑Y),\n                                  AddHom.toFun\n                                      { toFun := fun y => s • y,\n                                        map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                      (r • y) =\n                                    ↑(RingHom.id R) r •\n                                      AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        y) },\n                        map_add' :=\n                          (_ :\n                            ∀ (s₁ s₂ : S),\n                              (fun s =>\n                                    {\n                                      toAddHom :=\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                      map_smul' :=\n                                        (_ :\n                                          ∀ (r : R) (y : ↑Y),\n                                            AddHom.toFun\n                                                { toFun := fun y => s • y,\n                                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                (r • y) =\n                                              ↑(RingHom.id R) r •\n                                                AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  y) })\n                                  (s₁ + s₂) =\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₁ +\n                                  (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    s₂) }\n                      (r • s) =\n                    ↑(RingHom.id R) r •\n                      AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        s) })\n      (s ⊗ₜ[R] ↑g x)\n[PROOFSTEP]\nrw [TensorProduct.lift.tmul]\n[GOAL]\ncase tmul\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\ns : ↑((restrictScalars f).obj (ModuleCat.mk S))\nx : ↑X\n⊢ s • ↑g x =\n    ↑(↑{\n              toAddHom :=\n                {\n                  toFun := fun s =>\n                    {\n                      toAddHom :=\n                        { toFun := fun y => s • y, map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (r : R) (y : ↑Y),\n                            AddHom.toFun\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                (r • y) =\n                              ↑(RingHom.id R) r •\n                                AddHom.toFun\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                  y) },\n                  map_add' :=\n                    (_ :\n                      ∀ (s₁ s₂ : S),\n                        (fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) })\n                            (s₁ + s₂) =\n                          (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₁ +\n                            (fun s =>\n                                {\n                                  toAddHom :=\n                                    { toFun := fun y => s • y,\n                                      map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                  map_smul' :=\n                                    (_ :\n                                      ∀ (r : R) (y : ↑Y),\n                                        AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            (r • y) =\n                                          ↑(RingHom.id R) r •\n                                            AddHom.toFun\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                              y) })\n                              s₂) },\n              map_smul' :=\n                (_ :\n                  ∀ (r : R) (s : S),\n                    AddHom.toFun\n                        {\n                          toFun := fun s =>\n                            {\n                              toAddHom :=\n                                { toFun := fun y => s • y,\n                                  map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                              map_smul' :=\n                                (_ :\n                                  ∀ (r : R) (y : ↑Y),\n                                    AddHom.toFun\n                                        { toFun := fun y => s • y,\n                                          map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                        (r • y) =\n                                      ↑(RingHom.id R) r •\n                                        AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          y) },\n                          map_add' :=\n                            (_ :\n                              ∀ (s₁ s₂ : S),\n                                (fun s =>\n                                      {\n                                        toAddHom :=\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                        map_smul' :=\n                                          (_ :\n                                            ∀ (r : R) (y : ↑Y),\n                                              AddHom.toFun\n                                                  { toFun := fun y => s • y,\n                                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                  (r • y) =\n                                                ↑(RingHom.id R) r •\n                                                  AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    y) })\n                                    (s₁ + s₂) =\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₁ +\n                                    (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      s₂) }\n                        (r • s) =\n                      ↑(RingHom.id R) r •\n                        AddHom.toFun\n                          {\n                            toFun := fun s =>\n                              {\n                                toAddHom :=\n                                  { toFun := fun y => s • y,\n                                    map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                map_smul' :=\n                                  (_ :\n                                    ∀ (r : R) (y : ↑Y),\n                                      AddHom.toFun\n                                          { toFun := fun y => s • y,\n                                            map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                          (r • y) =\n                                        ↑(RingHom.id R) r •\n                                          AddHom.toFun\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                            y) },\n                            map_add' :=\n                              (_ :\n                                ∀ (s₁ s₂ : S),\n                                  (fun s =>\n                                        {\n                                          toAddHom :=\n                                            { toFun := fun y => s • y,\n                                              map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                          map_smul' :=\n                                            (_ :\n                                              ∀ (r : R) (y : ↑Y),\n                                                AddHom.toFun\n                                                    { toFun := fun y => s • y,\n                                                      map_add' :=\n                                                        (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                    (r • y) =\n                                                  ↑(RingHom.id R) r •\n                                                    AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      y) })\n                                      (s₁ + s₂) =\n                                    (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₁ +\n                                      (fun s =>\n                                          {\n                                            toAddHom :=\n                                              { toFun := fun y => s • y,\n                                                map_add' := (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) },\n                                            map_smul' :=\n                                              (_ :\n                                                ∀ (r : R) (y : ↑Y),\n                                                  AddHom.toFun\n                                                      { toFun := fun y => s • y,\n                                                        map_add' :=\n                                                          (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                      (r • y) =\n                                                    ↑(RingHom.id R) r •\n                                                      AddHom.toFun\n                                                        { toFun := fun y => s • y,\n                                                          map_add' :=\n                                                            (_ : ∀ (b₁ b₂ : ↑Y), s • (b₁ + b₂) = s • b₁ + s • b₂) }\n                                                        y) })\n                                        s₂) }\n                          s) }\n          s)\n      (↑g x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx✝ y✝ : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑X\na✝¹ :\n  ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x✝ =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x✝\na✝ :\n  ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) y✝ =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) y✝\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) (x✝ + y✝) =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) (x✝ + y✝)\n[PROOFSTEP]\nrw [map_add, map_add]\n[GOAL]\ncase add\nR✝ : Type u₁\nS✝ : Type u₂\ninst✝³ : CommRing R✝\ninst✝² : CommRing S✝\nf✝ : R✝ →+* S✝\nR : Type u₁\nS : Type u₂\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\nX : ModuleCat R\nY : ModuleCat S\ng : X ⟶ (restrictScalars f).obj Y\nm1 : Module R S := Module.compHom S f\nm2 : Module R ↑Y := Module.compHom (↑Y) f\nx✝ y✝ : ↑((restrictScalars f).obj (ModuleCat.mk S)) ⊗[R] ↑X\na✝¹ :\n  ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x✝ =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x✝\na✝ :\n  ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) y✝ =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) y✝\n⊢ ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) x✝ +\n      ↑(↑((fun x x_1 => ExtendRestrictScalarsAdj.homEquiv f) X Y).symm g) y✝ =\n    ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) x✝ +\n      ↑((extendScalars f).map g ≫ NatTrans.app (ExtendRestrictScalarsAdj.counit f) Y) y✝\n[PROOFSTEP]\ncongr 1\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.ChangeOfRings", "llama_tokens": 209043, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6150878696277513, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.2859553171226515}}
{"text": "[GOAL]\n⊢ ConcreteCategory GroupCat\n[PROOFSTEP]\ndsimp only [GroupCat]\n[GOAL]\n⊢ ConcreteCategory (Bundled Group)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR S : GroupCat\ni : R ⟶ S\nr : ↑R\nh : r = 1\n⊢ ↑i r = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\n⊢ ConcreteCategory CommGroupCat\n[PROOFSTEP]\ndsimp only [CommGroupCat]\n[GOAL]\n⊢ ConcreteCategory (Bundled CommGroup)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nR S : CommGroupCat\ni : R ⟶ S\nr : ↑R\nh : r = 1\n⊢ ↑i r = 1\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nG : AddCommGroupCat\nh k : ↑G\nw : asHom h = asHom k\n⊢ h = k\n[PROOFSTEP]\nconvert congr_arg (fun k : AddCommGroupCat.of ℤ ⟶ G => (k : ℤ → G) (1 : ℤ)) w\n[GOAL]\ncase h.e'_2\nG : AddCommGroupCat\nh k : ↑G\nw : asHom h = asHom k\n⊢ h = ↑(asHom h) 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nG : AddCommGroupCat\nh k : ↑G\nw : asHom h = asHom k\n⊢ k = ↑(asHom k) 1\n[PROOFSTEP]\nsimp\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\ninst✝ : Mono f\ng₁ g₂ : ↑G\nh : ↑f g₁ = ↑f g₂\n⊢ g₁ = g₂\n[PROOFSTEP]\nhave t0 : asHom g₁ ≫ f = asHom g₂ ≫ f := by aesop_cat\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\ninst✝ : Mono f\ng₁ g₂ : ↑G\nh : ↑f g₁ = ↑f g₂\n⊢ asHom g₁ ≫ f = asHom g₂ ≫ f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\ninst✝ : Mono f\ng₁ g₂ : ↑G\nh : ↑f g₁ = ↑f g₂\nt0 : asHom g₁ ≫ f = asHom g₂ ≫ f\n⊢ g₁ = g₂\n[PROOFSTEP]\nhave t1 : asHom g₁ = asHom g₂ := (cancel_mono _).1 t0\n[GOAL]\nG H : AddCommGroupCat\nf : G ⟶ H\ninst✝ : Mono f\ng₁ g₂ : ↑G\nh : ↑f g₁ = ↑f g₂\nt0 : asHom g₁ ≫ f = asHom g₂ ≫ f\nt1 : asHom g₁ = asHom g₂\n⊢ g₁ = g₂\n[PROOFSTEP]\napply asHom_injective t1\n[GOAL]\nα : Type u\n⊢ (fun g => g.toEquiv) 1 = 1\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u\n⊢ ∀ (x y : ↑(GroupCat.of (Aut α))),\n    OneHom.toFun { toFun := fun g => g.toEquiv, map_one' := (_ : (fun g => g.toEquiv) 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := fun g => g.toEquiv, map_one' := (_ : (fun g => g.toEquiv) 1 = 1) } x *\n        OneHom.toFun { toFun := fun g => g.toEquiv, map_one' := (_ : (fun g => g.toEquiv) 1 = 1) } y\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u\n⊢ (fun g => Equiv.toIso g) 1 = 1\n[PROOFSTEP]\naesop\n[GOAL]\nα : Type u\n⊢ ∀ (x y : ↑(GroupCat.of (Equiv.Perm α))),\n    OneHom.toFun { toFun := fun g => Equiv.toIso g, map_one' := (_ : (fun g => Equiv.toIso g) 1 = 1) } (x * y) =\n      OneHom.toFun { toFun := fun g => Equiv.toIso g, map_one' := (_ : (fun g => Equiv.toIso g) 1 = 1) } x *\n        OneHom.toFun { toFun := fun g => Equiv.toIso g, map_one' := (_ : (fun g => Equiv.toIso g) 1 = 1) } y\n[PROOFSTEP]\naesop\n[GOAL]\nX Y : GroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget GroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet i := asIso ((forget GroupCat).map f)\n[GOAL]\nX Y : GroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget GroupCat).map f)\ni : (forget GroupCat).obj X ≅ (forget GroupCat).obj Y := asIso ((forget GroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))\n[GOAL]\nX Y : GroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget GroupCat).map f)\ni : (forget GroupCat).obj X ≅ (forget GroupCat).obj Y := asIso ((forget GroupCat).map f)\ne : ↑X ≃* ↑Y :=\n  { toEquiv := i.toEquiv,\n    map_mul' :=\n      (_ :\n        ∀ (a b : ↑X),\n          ↑(let_fun this := f;\n                this)\n              (a * b) =\n            ↑(let_fun this := f;\n                  this)\n                a *\n              ↑(let_fun this := f;\n                  this)\n                b) }\n⊢ IsIso f\n[PROOFSTEP]\nexact IsIso.of_iso e.toGroupCatIso\n[GOAL]\nX Y : CommGroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget CommGroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet i := asIso ((forget CommGroupCat).map f)\n[GOAL]\nX Y : CommGroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget CommGroupCat).map f)\ni : (forget CommGroupCat).obj X ≅ (forget CommGroupCat).obj Y := asIso ((forget CommGroupCat).map f)\n⊢ IsIso f\n[PROOFSTEP]\nlet e : X ≃* Y := MulEquiv.mk i.toEquiv (MonoidHom.map_mul (show MonoidHom X Y from f))\n[GOAL]\nX Y : CommGroupCat\nf : X ⟶ Y\nx✝ : IsIso ((forget CommGroupCat).map f)\ni : (forget CommGroupCat).obj X ≅ (forget CommGroupCat).obj Y := asIso ((forget CommGroupCat).map f)\ne : ↑X ≃* ↑Y :=\n  { toEquiv := i.toEquiv,\n    map_mul' :=\n      (_ :\n        ∀ (a b : ↑X),\n          ↑(let_fun this := f;\n                this)\n              (a * b) =\n            ↑(let_fun this := f;\n                  this)\n                a *\n              ↑(let_fun this := f;\n                  this)\n                b) }\n⊢ IsIso f\n[PROOFSTEP]\nexact IsIso.of_iso e.toCommGroupCatIso\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.GroupCat.Basic", "llama_tokens": 2076, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6406358548398979, "lm_q2_score": 0.4455295350395727, "lm_q1q2_score": 0.2854221945364989}}
{"text": "[GOAL]\n⊢ LawfulFunctor Multiset\n[PROOFSTEP]\nrefine' { .. }\n[GOAL]\ncase refine'_1\n⊢ ∀ {α β : Type ?u.250}, Functor.mapConst = Functor.map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\n⊢ ∀ {α : Type ?u.250} (x : Multiset α), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\n⊢ ∀ {α β γ : Type ?u.250} (g : α → β) (h : β → γ) (x : Multiset α), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nα✝ β✝ : Type ?u.250\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_1\nα✝ β✝ : Type ?u.250\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nα✝ : Type ?u.250\nx✝ : Multiset α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_2\nα✝ : Type ?u.250\nx✝ : Multiset α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nα✝ β✝ γ✝ : Type ?u.250\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Multiset α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\ntry simp\n[GOAL]\ncase refine'_3\nα✝ β✝ γ✝ : Type ?u.250\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : Multiset α✝\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1\nα✝ β✝ : Type ?u.250\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\n⊢ Multiset α' → F (Multiset β')\n[PROOFSTEP]\nrefine' Quotient.lift (Functor.map Coe.coe ∘ Traversable.traverse f) _\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\n⊢ ∀ (a b : List α'),\n    a ≈ b → (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.traverse f) b\n[PROOFSTEP]\nintrov p\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\np : a ≈ b\n⊢ (Functor.map Coe.coe ∘ Traversable.traverse f) a = (Functor.map Coe.coe ∘ Traversable.traverse f) b\n[PROOFSTEP]\nunfold Function.comp\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\np : a ≈ b\n⊢ Coe.coe <$> Traversable.traverse f a = Coe.coe <$> Traversable.traverse f b\n[PROOFSTEP]\ninduction p\n[GOAL]\ncase nil\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\n⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []\ncase cons\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx✝ : α'\nl₁✝ l₂✝ : List α'\na✝ : l₁✝ ~ l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\n⊢ Coe.coe <$> Traversable.traverse f (x✝ :: l₁✝) = Coe.coe <$> Traversable.traverse f (x✝ :: l₂✝)\ncase swap\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx✝ y✝ : α'\nl✝ : List α'\n⊢ Coe.coe <$> Traversable.traverse f (y✝ :: x✝ :: l✝) = Coe.coe <$> Traversable.traverse f (x✝ :: y✝ :: l✝)\ncase trans\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\ncase nil => rfl\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\n⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []\n[PROOFSTEP]\ncase nil => rfl\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\n⊢ Coe.coe <$> Traversable.traverse f [] = Coe.coe <$> Traversable.traverse f []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx✝ : α'\nl₁✝ l₂✝ : List α'\na✝ : l₁✝ ~ l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\n⊢ Coe.coe <$> Traversable.traverse f (x✝ :: l₁✝) = Coe.coe <$> Traversable.traverse f (x✝ :: l₂✝)\ncase swap\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx✝ y✝ : α'\nl✝ : List α'\n⊢ Coe.coe <$> Traversable.traverse f (y✝ :: x✝ :: l✝) = Coe.coe <$> Traversable.traverse f (x✝ :: y✝ :: l✝)\ncase trans\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\ncase cons x l₁ l₂ _\n  h =>\n  have :\n    Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =\n      Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ :=\n    by rw [h]\n  simpa [functor_norm] using this\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx : α'\nl₁ l₂ : List α'\na✝ : l₁ ~ l₂\nh : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂\n⊢ Coe.coe <$> Traversable.traverse f (x :: l₁) = Coe.coe <$> Traversable.traverse f (x :: l₂)\n[PROOFSTEP]\ncase cons x l₁ l₂ _\n  h =>\n  have :\n    Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =\n      Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ :=\n    by rw [h]\n  simpa [functor_norm] using this\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx : α'\nl₁ l₂ : List α'\na✝ : l₁ ~ l₂\nh : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂\n⊢ Coe.coe <$> Traversable.traverse f (x :: l₁) = Coe.coe <$> Traversable.traverse f (x :: l₂)\n[PROOFSTEP]\nhave :\n  Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₁ =\n    Multiset.cons <$> f x <*> Coe.coe <$> Traversable.traverse f l₂ :=\n  by rw [h]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx : α'\nl₁ l₂ : List α'\na✝ : l₁ ~ l₂\nh : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂\n⊢ (Seq.seq (cons <$> f x) fun x => Coe.coe <$> Traversable.traverse f l₁) =\n    Seq.seq (cons <$> f x) fun x => Coe.coe <$> Traversable.traverse f l₂\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx : α'\nl₁ l₂ : List α'\na✝ : l₁ ~ l₂\nh : Coe.coe <$> Traversable.traverse f l₁ = Coe.coe <$> Traversable.traverse f l₂\nthis :\n  (Seq.seq (cons <$> f x) fun x => Coe.coe <$> Traversable.traverse f l₁) =\n    Seq.seq (cons <$> f x) fun x => Coe.coe <$> Traversable.traverse f l₂\n⊢ Coe.coe <$> Traversable.traverse f (x :: l₁) = Coe.coe <$> Traversable.traverse f (x :: l₂)\n[PROOFSTEP]\nsimpa [functor_norm] using this\n[GOAL]\ncase swap\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx✝ y✝ : α'\nl✝ : List α'\n⊢ Coe.coe <$> Traversable.traverse f (y✝ :: x✝ :: l✝) = Coe.coe <$> Traversable.traverse f (x✝ :: y✝ :: l✝)\ncase trans\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\ncase swap x y\n  l =>\n  have :\n    (fun a b (l : List β') ↦ (↑(a :: b :: l) : Multiset β')) <$> f y <*> f x =\n      (fun a b l ↦ ↑(a :: b :: l)) <$> f x <*> f y :=\n    by\n    rw [CommApplicative.commutative_map]\n    congr\n    funext a b l\n    simpa [flip] using Perm.swap a b l\n  simp [(· ∘ ·), this, functor_norm, Coe.coe]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\n⊢ Coe.coe <$> Traversable.traverse f (y :: x :: l) = Coe.coe <$> Traversable.traverse f (x :: y :: l)\n[PROOFSTEP]\ncase swap x y\n  l =>\n  have :\n    (fun a b (l : List β') ↦ (↑(a :: b :: l) : Multiset β')) <$> f y <*> f x =\n      (fun a b l ↦ ↑(a :: b :: l)) <$> f x <*> f y :=\n    by\n    rw [CommApplicative.commutative_map]\n    congr\n    funext a b l\n    simpa [flip] using Perm.swap a b l\n  simp [(· ∘ ·), this, functor_norm, Coe.coe]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\n⊢ Coe.coe <$> Traversable.traverse f (y :: x :: l) = Coe.coe <$> Traversable.traverse f (x :: y :: l)\n[PROOFSTEP]\nhave :\n  (fun a b (l : List β') ↦ (↑(a :: b :: l) : Multiset β')) <$> f y <*> f x =\n    (fun a b l ↦ ↑(a :: b :: l)) <$> f x <*> f y :=\n  by\n  rw [CommApplicative.commutative_map]\n  congr\n  funext a b l\n  simpa [flip] using Perm.swap a b l\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\n⊢ (Seq.seq ((fun a b l => ↑(a :: b :: l)) <$> f y) fun x_1 => f x) =\n    Seq.seq ((fun a b l => ↑(a :: b :: l)) <$> f x) fun x => f y\n[PROOFSTEP]\nrw [CommApplicative.commutative_map]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\n⊢ (Seq.seq ((flip fun a b l => ↑(a :: b :: l)) <$> f x) fun x => f y) =\n    Seq.seq ((fun a b l => ↑(a :: b :: l)) <$> f x) fun x => f y\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_a\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\n⊢ (flip fun a b l => ↑(a :: b :: l)) = fun a b l => ↑(a :: b :: l)\n[PROOFSTEP]\nfunext a b l\n[GOAL]\ncase e_a.e_a.h.h.h\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na✝ b✝ : List α'\nx y : α'\nl✝ : List α'\na b : β'\nl : List β'\n⊢ flip (fun a b l => ↑(a :: b :: l)) a b l = ↑(a :: b :: l)\n[PROOFSTEP]\nsimpa [flip] using Perm.swap a b l\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b : List α'\nx y : α'\nl : List α'\nthis :\n  (Seq.seq ((fun a b l => ↑(a :: b :: l)) <$> f y) fun x_1 => f x) =\n    Seq.seq ((fun a b l => ↑(a :: b :: l)) <$> f x) fun x => f y\n⊢ Coe.coe <$> Traversable.traverse f (y :: x :: l) = Coe.coe <$> Traversable.traverse f (x :: y :: l)\n[PROOFSTEP]\nsimp [(· ∘ ·), this, functor_norm, Coe.coe]\n[GOAL]\ncase trans\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\ncase trans => simp [*]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\ncase trans => simp [*]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\na b l₁✝ l₂✝ l₃✝ : List α'\na✝¹ : l₁✝ ~ l₂✝\na✝ : l₂✝ ~ l₃✝\na_ih✝¹ : Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₂✝\na_ih✝ : Coe.coe <$> Traversable.traverse f l₂✝ = Coe.coe <$> Traversable.traverse f l₃✝\n⊢ Coe.coe <$> Traversable.traverse f l₁✝ = Coe.coe <$> Traversable.traverse f l₃✝\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα✝ : Type ?u.36389\nx✝ : Multiset α✝\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nsimp only [fmap_def, id_eq, map_id']\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα✝ β✝ : Type ?u.36389\nx✝¹ : α✝\nx✝ : α✝ → Multiset β✝\n⊢ pure x✝¹ >>= x✝ = x✝ x✝¹\n[PROOFSTEP]\nsimp only [pure_def, bind_def, singleton_bind]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα✝ β✝ : Type ?u.36389\nx✝¹ : α✝ → β✝\nx✝ : Multiset α✝\n⊢ (do\n      let y ← x✝\n      pure (x✝¹ y)) =\n    x✝¹ <$> x✝\n[PROOFSTEP]\nsimp only [pure_def, bind_def, bind_singleton, fmap_def]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα β : Type u_1\nh : α → β\n⊢ Functor.map h ∘ Coe.coe = Coe.coe ∘ Functor.map h\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα β : Type u_1\nh : α → β\nx✝ : List α\n⊢ (Functor.map h ∘ Coe.coe) x✝ = (Coe.coe ∘ Functor.map h) x✝\n[PROOFSTEP]\nsimp only [Function.comp_apply, Coe.coe, fmap_def, coe_map, List.map_eq_map]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα : Type u_1\nx : Multiset α\n⊢ traverse pure x = x\n[PROOFSTEP]\nrefine' Quotient.inductionOn x _\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα : Type u_1\nx : Multiset α\n⊢ ∀ (a : List α), traverse pure (Quotient.mk (isSetoid α) a) = Quotient.mk (isSetoid α) a\n[PROOFSTEP]\nintro\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Applicative F\ninst✝ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nα : Type u_1\nx : Multiset α\na✝ : List α\n⊢ traverse pure (Quotient.mk (isSetoid α) a✝) = Quotient.mk (isSetoid α) a✝\n[PROOFSTEP]\nsimp [traverse, Coe.coe]\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\nα β γ : Type u_1\ng : α → G β\nh : β → H γ\nx : Multiset α\n⊢ traverse (Comp.mk ∘ Functor.map h ∘ g) x = Comp.mk (traverse h <$> traverse g x)\n[PROOFSTEP]\nrefine' Quotient.inductionOn x _\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\nα β γ : Type u_1\ng : α → G β\nh : β → H γ\nx : Multiset α\n⊢ ∀ (a : List α),\n    traverse (Comp.mk ∘ Functor.map h ∘ g) (Quotient.mk (isSetoid α) a) =\n      Comp.mk (traverse h <$> traverse g (Quotient.mk (isSetoid α) a))\n[PROOFSTEP]\nintro\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\nα β γ : Type u_1\ng : α → G β\nh : β → H γ\nx : Multiset α\na✝ : List α\n⊢ traverse (Comp.mk ∘ Functor.map h ∘ g) (Quotient.mk (isSetoid α) a✝) =\n    Comp.mk (traverse h <$> traverse g (Quotient.mk (isSetoid α) a✝))\n[PROOFSTEP]\nsimp only [traverse, quot_mk_to_coe, lift_coe, Coe.coe, Function.comp_apply, Functor.map_map, functor_norm]\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\nα β γ : Type u_1\ng : α → G β\nh : β → H γ\nx : Multiset α\na✝ : List α\n⊢ Comp.mk (((fun x => ofList <$> x) ∘ Traversable.traverse h) <$> Traversable.traverse g a✝) =\n    Comp.mk\n      ((Quotient.lift (Functor.map ofList ∘ Traversable.traverse h)\n            (_ :\n              ∀ (a b : List β),\n                a ≈ b →\n                  (Functor.map Coe.coe ∘ Traversable.traverse h) a = (Functor.map Coe.coe ∘ Traversable.traverse h) b) ∘\n          ofList) <$>\n        Traversable.traverse g a✝)\n[PROOFSTEP]\nsimp only [Function.comp, lift_coe]\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → G β\nh : β → γ\nx : Multiset α\n⊢ Functor.map h <$> traverse g x = traverse (Functor.map h ∘ g) x\n[PROOFSTEP]\nrefine' Quotient.inductionOn x _\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → G β\nh : β → γ\nx : Multiset α\n⊢ ∀ (a : List α),\n    Functor.map h <$> traverse g (Quotient.mk (isSetoid α) a) =\n      traverse (Functor.map h ∘ g) (Quotient.mk (isSetoid α) a)\n[PROOFSTEP]\nintro\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → G β\nh : β → γ\nx : Multiset α\na✝ : List α\n⊢ Functor.map h <$> traverse g (Quotient.mk (isSetoid α) a✝) =\n    traverse (Functor.map h ∘ g) (Quotient.mk (isSetoid α) a✝)\n[PROOFSTEP]\nsimp only [traverse, quot_mk_to_coe, lift_coe, Function.comp_apply, Functor.map_map, map_comp_coe]\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → G β\nh : β → γ\nx : Multiset α\na✝ : List α\n⊢ (Coe.coe ∘ Functor.map h) <$> Traversable.traverse g a✝ = Coe.coe <$> Traversable.traverse (Functor.map h ∘ g) a✝\n[PROOFSTEP]\nrw [LawfulFunctor.comp_map, Traversable.map_traverse']\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → G β\nh : β → γ\nx : Multiset α\na✝ : List α\n⊢ Coe.coe <$> Functor.map h <$> Traversable.traverse g a✝ =\n    Coe.coe <$> (Functor.map (Functor.map h) ∘ Traversable.traverse g) a✝\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → β\nh : β → G γ\nx : Multiset α\n⊢ traverse h (map g x) = traverse (h ∘ g) x\n[PROOFSTEP]\nrefine' Quotient.inductionOn x _\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → β\nh : β → G γ\nx : Multiset α\n⊢ ∀ (a : List α), traverse h (map g (Quotient.mk (isSetoid α) a)) = traverse (h ∘ g) (Quotient.mk (isSetoid α) a)\n[PROOFSTEP]\nintro\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → β\nh : β → G γ\nx : Multiset α\na✝ : List α\n⊢ traverse h (map g (Quotient.mk (isSetoid α) a✝)) = traverse (h ∘ g) (Quotient.mk (isSetoid α) a✝)\n[PROOFSTEP]\nsimp only [traverse, quot_mk_to_coe, coe_map, lift_coe, Function.comp_apply]\n[GOAL]\nF : Type u → Type u\ninst✝³ : Applicative F\ninst✝² : CommApplicative F\nα' β' : Type u\nf : α' → F β'\nG : Type u_1 → Type u_1\ninst✝¹ : Applicative G\ninst✝ : CommApplicative G\nα β γ : Type u_1\ng : α → β\nh : β → G γ\nx : Multiset α\na✝ : List α\n⊢ Coe.coe <$> Traversable.traverse h (List.map g a✝) = Coe.coe <$> Traversable.traverse (h ∘ g) a✝\n[PROOFSTEP]\nrw [← Traversable.traverse_map h g, List.map_eq_map]\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf✝ : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\neta : ApplicativeTransformation G H\nα β : Type u_1\nf : α → G β\nx : Multiset α\n⊢ (fun {α} => ApplicativeTransformation.app eta α) (traverse f x) =\n    traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) x\n[PROOFSTEP]\nrefine' Quotient.inductionOn x _\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf✝ : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\neta : ApplicativeTransformation G H\nα β : Type u_1\nf : α → G β\nx : Multiset α\n⊢ ∀ (a : List α),\n    (fun {α} => ApplicativeTransformation.app eta α) (traverse f (Quotient.mk (isSetoid α) a)) =\n      traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) (Quotient.mk (isSetoid α) a)\n[PROOFSTEP]\nintro\n[GOAL]\nF : Type u → Type u\ninst✝⁵ : Applicative F\ninst✝⁴ : CommApplicative F\nα' β' : Type u\nf✝ : α' → F β'\nG H : Type u_1 → Type u_1\ninst✝³ : Applicative G\ninst✝² : Applicative H\ninst✝¹ : CommApplicative G\ninst✝ : CommApplicative H\neta : ApplicativeTransformation G H\nα β : Type u_1\nf : α → G β\nx : Multiset α\na✝ : List α\n⊢ (fun {α} => ApplicativeTransformation.app eta α) (traverse f (Quotient.mk (isSetoid α) a✝)) =\n    traverse ((fun {α} => ApplicativeTransformation.app eta α) ∘ f) (Quotient.mk (isSetoid α) a✝)\n[PROOFSTEP]\nsimp only [quot_mk_to_coe, traverse, lift_coe, Function.comp_apply, ApplicativeTransformation.preserves_map,\n  LawfulTraversable.naturality]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Functor", "llama_tokens": 11292, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5888891451980403, "lm_q2_score": 0.4843800842769843, "lm_q1q2_score": 0.285246173780828}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝⁴ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝³ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝² : PreservesFiniteLimits F\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\napply preservesLimitsOfShapeOfEquiv (FinCategory.equivAsType J)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝¹ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝ : PreservesLimitsOfSize.{w, w₂, v₁, v₂, u₁, u₂} F\nJ : Type\nsJ : SmallCategory J\nfJ : FinCategory J\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\nhaveI := preservesSmallestLimitsOfPreservesLimits F\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝¹ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝ : PreservesLimitsOfSize.{w, w₂, v₁, v₂, u₁, u₂} F\nJ : Type\nsJ : SmallCategory J\nfJ : FinCategory J\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₂, u₁, u₂} F\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\nexact preservesLimitsOfShapeOfEquiv (FinCategory.equivAsType J) F\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesLimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\nletI : Category (ULiftHom (ULift J)) := ULiftHom.category\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesLimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\nthis : Category.{?u.3382, ?u.3380} (ULiftHom (ULift J)) := ULiftHom.category\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\nhaveI := h (ULiftHom (ULift J)) CategoryTheory.finCategoryUlift\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesLimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\nthis✝ : Category.{?u.3382, ?u.3380} (ULiftHom (ULift J)) := ULiftHom.category\nthis : PreservesLimitsOfShape (ULiftHom (ULift J)) F\n⊢ PreservesLimitsOfShape J F\n[PROOFSTEP]\nexact preservesLimitsOfShapeOfEquiv (ULiftHomULiftCategory.equiv J).symm F\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ : Type w\ninst✝ : SmallCategory J\nK : J ⥤ C\nx✝² : Type\nx✝¹ : SmallCategory x✝²\nx✝ : FinCategory x✝²\n⊢ PreservesLimitsOfShape x✝² (𝟭 C)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝³ : Category.{v₃, u₃} E\nJ : Type w\ninst✝² : SmallCategory J\nK : J ⥤ C\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesFiniteLimits F\ninst✝ : PreservesFiniteLimits G\nx✝² : Type\nx✝¹ : SmallCategory x✝²\nx✝ : FinCategory x✝²\n⊢ PreservesLimitsOfShape x✝² (F ⋙ G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁵ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝⁴ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝³ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝² : PreservesFiniteColimits F\nJ : Type w\ninst✝¹ : SmallCategory J\ninst✝ : FinCategory J\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\napply preservesColimitsOfShapeOfEquiv (FinCategory.equivAsType J)\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝¹ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝ : PreservesColimitsOfSize.{w, w₂, v₁, v₂, u₁, u₂} F\nJ : Type\nsJ : SmallCategory J\nfJ : FinCategory J\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\nhaveI := preservesSmallestColimitsOfPreservesColimits F\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝¹ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\ninst✝ : PreservesColimitsOfSize.{w, w₂, v₁, v₂, u₁, u₂} F\nJ : Type\nsJ : SmallCategory J\nfJ : FinCategory J\nthis : PreservesColimitsOfSize.{0, 0, v₁, v₂, u₁, u₂} F\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\nexact preservesColimitsOfShapeOfEquiv (FinCategory.equivAsType J) F\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesColimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\nletI : Category (ULiftHom (ULift J)) := ULiftHom.category\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesColimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\nthis : Category.{?u.13228, ?u.13226} (ULiftHom (ULift J)) := ULiftHom.category\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\nhaveI := h (ULiftHom (ULift J)) CategoryTheory.finCategoryUlift\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\nJ✝ : Type w\ninst✝ : SmallCategory J✝\nK : J✝ ⥤ C\nF : C ⥤ D\nh : (J : Type w) → {𝒥 : SmallCategory J} → FinCategory J → PreservesColimitsOfShape J F\nJ : Type\nx✝¹ : SmallCategory J\nx✝ : FinCategory J\nthis✝ : Category.{?u.13228, ?u.13226} (ULiftHom (ULift J)) := ULiftHom.category\nthis : PreservesColimitsOfShape (ULiftHom (ULift J)) F\n⊢ PreservesColimitsOfShape J F\n[PROOFSTEP]\nexact preservesColimitsOfShapeOfEquiv (ULiftHomULiftCategory.equiv J).symm F\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\nE : Type u₃\ninst✝³ : Category.{v₃, u₃} E\nJ : Type w\ninst✝² : SmallCategory J\nK : J ⥤ C\nF : C ⥤ D\nG : D ⥤ E\ninst✝¹ : PreservesFiniteColimits F\ninst✝ : PreservesFiniteColimits G\nx✝² : Type\nx✝¹ : SmallCategory x✝²\nx✝ : FinCategory x✝²\n⊢ PreservesColimitsOfShape x✝² (F ⋙ G)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Finite", "llama_tokens": 3287, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6688802603710086, "lm_q2_score": 0.4263215925474903, "lm_q1q2_score": 0.28515809782494833}}
{"text": "[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : List Γ\n⊢ l = l ++ List.replicate 0 default\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\n⊢ BlankExtends l₁ l₂ → BlankExtends l₂ l₃ → BlankExtends l₁ l₃\n[PROOFSTEP]\nrintro ⟨i, rfl⟩ ⟨j, rfl⟩\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ : List Γ\ni j : ℕ\n⊢ BlankExtends l₁ (l₁ ++ List.replicate i default ++ List.replicate j default)\n[PROOFSTEP]\nexact ⟨i + j, by simp [List.replicate_add]⟩\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ : List Γ\ni j : ℕ\n⊢ l₁ ++ List.replicate i default ++ List.replicate j default = l₁ ++ List.replicate (i + j) default\n[PROOFSTEP]\nsimp [List.replicate_add]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl l₁ l₂ : List Γ\n⊢ BlankExtends l l₁ → BlankExtends l l₂ → List.length l₁ ≤ List.length l₂ → BlankExtends l₁ l₂\n[PROOFSTEP]\nrintro ⟨i, rfl⟩ ⟨j, rfl⟩ h\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : List Γ\ni j : ℕ\nh : List.length (l ++ List.replicate i default) ≤ List.length (l ++ List.replicate j default)\n⊢ BlankExtends (l ++ List.replicate i default) (l ++ List.replicate j default)\n[PROOFSTEP]\nuse j - i\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : List Γ\ni j : ℕ\nh : List.length (l ++ List.replicate i default) ≤ List.length (l ++ List.replicate j default)\n⊢ l ++ List.replicate j default = l ++ List.replicate i default ++ List.replicate (j - i) default\n[PROOFSTEP]\nsimp only [List.length_append, add_le_add_iff_left, List.length_replicate] at h \n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : List Γ\ni j : ℕ\nh : i ≤ j\n⊢ l ++ List.replicate j default = l ++ List.replicate i default ++ List.replicate (j - i) default\n[PROOFSTEP]\nsimp only [← List.replicate_add, add_tsub_cancel_of_le h, List.append_assoc]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl l₁ l₂ : List Γ\n⊢ BlankExtends l₁ l → BlankExtends l₂ l → List.length l₁ ≤ List.length l₂ → BlankExtends l₁ l₂\n[PROOFSTEP]\nrintro ⟨i, rfl⟩ ⟨j, e⟩ h\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\ne : l₁ ++ List.replicate i default = l₂ ++ List.replicate j default\nh : List.length l₁ ≤ List.length l₂\n⊢ BlankExtends l₁ l₂\n[PROOFSTEP]\nuse i - j\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\ne : l₁ ++ List.replicate i default = l₂ ++ List.replicate j default\nh : List.length l₁ ≤ List.length l₂\n⊢ l₂ = l₁ ++ List.replicate (i - j) default\n[PROOFSTEP]\nrefine' List.append_right_cancel (e.symm.trans _)\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\ne : l₁ ++ List.replicate i default = l₂ ++ List.replicate j default\nh : List.length l₁ ≤ List.length l₂\n⊢ l₁ ++ List.replicate i default = l₁ ++ List.replicate (i - j) default ++ List.replicate j default\n[PROOFSTEP]\nrw [List.append_assoc, ← List.replicate_add, tsub_add_cancel_of_le]\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\ne : l₁ ++ List.replicate i default = l₂ ++ List.replicate j default\nh : List.length l₁ ≤ List.length l₂\n⊢ j ≤ i\n[PROOFSTEP]\napply_fun List.length at e \n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\nh : List.length l₁ ≤ List.length l₂\ne : List.length (l₁ ++ List.replicate i default) = List.length (l₂ ++ List.replicate j default)\n⊢ j ≤ i\n[PROOFSTEP]\nsimp only [List.length_append, List.length_replicate] at e \n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\ni j : ℕ\nh : List.length l₁ ≤ List.length l₂\ne : List.length l₁ + i = List.length l₂ + j\n⊢ j ≤ i\n[PROOFSTEP]\nrwa [← add_le_add_iff_left, e, add_le_add_iff_right]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\n⊢ BlankRel l₁ l₂ → BlankRel l₂ l₃ → BlankRel l₁ l₃\n[PROOFSTEP]\nrintro (h₁ | h₁) (h₂ | h₂)\n[GOAL]\ncase inl.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₁ l₂\nh₂ : BlankExtends l₂ l₃\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inl (h₁.trans h₂)\n[GOAL]\ncase inl.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₁ l₂\nh₂ : BlankExtends l₃ l₂\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\ncases' le_total l₁.length l₃.length with h h\n[GOAL]\ncase inl.inr.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₁ l₂\nh₂ : BlankExtends l₃ l₂\nh : List.length l₁ ≤ List.length l₃\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inl (h₁.above_of_le h₂ h)\n[GOAL]\ncase inl.inr.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₁ l₂\nh₂ : BlankExtends l₃ l₂\nh : List.length l₃ ≤ List.length l₁\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inr (h₂.above_of_le h₁ h)\n[GOAL]\ncase inr.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₂ l₁\nh₂ : BlankExtends l₂ l₃\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\ncases' le_total l₁.length l₃.length with h h\n[GOAL]\ncase inr.inl.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₂ l₁\nh₂ : BlankExtends l₂ l₃\nh : List.length l₁ ≤ List.length l₃\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inl (h₁.below_of_le h₂ h)\n[GOAL]\ncase inr.inl.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₂ l₁\nh₂ : BlankExtends l₂ l₃\nh : List.length l₃ ≤ List.length l₁\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inr (h₂.below_of_le h₁ h)\n[GOAL]\ncase inr.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ l₃ : List Γ\nh₁ : BlankExtends l₂ l₁\nh₂ : BlankExtends l₃ l₂\n⊢ BlankRel l₁ l₃\n[PROOFSTEP]\nexact Or.inr (h₂.trans h₁)\n[GOAL]\nΓ : Type ?u.9261\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\n⊢ { l // BlankExtends l₁ l ∧ BlankExtends l₂ l }\n[PROOFSTEP]\nrefine'\n  if hl : l₁.length ≤ l₂.length then ⟨l₂, Or.elim h id fun h' ↦ _, BlankExtends.refl _⟩\n  else ⟨l₁, BlankExtends.refl _, Or.elim h (fun h' ↦ _) id⟩\n[GOAL]\ncase refine'_1\nΓ : Type ?u.9261\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₂ l₁\n⊢ BlankExtends l₁ l₂\ncase refine'_2\nΓ : Type ?u.9261\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : ¬List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₁ l₂\n⊢ BlankExtends l₂ l₁\n[PROOFSTEP]\nexact (BlankExtends.refl _).above_of_le h' hl\n[GOAL]\ncase refine'_2\nΓ : Type ?u.9261\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : ¬List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₁ l₂\n⊢ BlankExtends l₂ l₁\n[PROOFSTEP]\nexact (BlankExtends.refl _).above_of_le h' (le_of_not_ge hl)\n[GOAL]\nΓ : Type ?u.10721\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\n⊢ { l // BlankExtends l l₁ ∧ BlankExtends l l₂ }\n[PROOFSTEP]\nrefine'\n  if hl : l₁.length ≤ l₂.length then ⟨l₁, BlankExtends.refl _, Or.elim h id fun h' ↦ _⟩\n  else ⟨l₂, Or.elim h (fun h' ↦ _) id, BlankExtends.refl _⟩\n[GOAL]\ncase refine'_1\nΓ : Type ?u.10721\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₂ l₁\n⊢ BlankExtends l₁ l₂\ncase refine'_2\nΓ : Type ?u.10721\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : ¬List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₁ l₂\n⊢ BlankExtends l₂ l₁\n[PROOFSTEP]\nexact (BlankExtends.refl _).above_of_le h' hl\n[GOAL]\ncase refine'_2\nΓ : Type ?u.10721\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nh : BlankRel l₁ l₂\nhl : ¬List.length l₁ ≤ List.length l₂\nh' : BlankExtends l₁ l₂\n⊢ BlankExtends l₂ l₁\n[PROOFSTEP]\nexact (BlankExtends.refl _).above_of_le h' (le_of_not_ge hl)\n[GOAL]\nΓ : Type ?u.13118\ninst✝ : Inhabited Γ\nα : Sort ?u.13130\nl : ListBlank Γ\nf : List Γ → α\nH : ∀ (a b : List Γ), BlankExtends a b → f a = f b\n⊢ ∀ (a b : List Γ), Setoid.r a b → f a = f b\n[PROOFSTEP]\nrintro a b (h | h) <;> [exact H _ _ h; exact (H _ _ h).symm]\n[GOAL]\nΓ : Type ?u.13118\ninst✝ : Inhabited Γ\nα : Sort ?u.13130\nl : ListBlank Γ\nf : List Γ → α\nH : ∀ (a b : List Γ), BlankExtends a b → f a = f b\n⊢ ∀ (a b : List Γ), Setoid.r a b → f a = f b\n[PROOFSTEP]\nrintro a b (h | h)\n[GOAL]\ncase inl\nΓ : Type ?u.13118\ninst✝ : Inhabited Γ\nα : Sort ?u.13130\nl : ListBlank Γ\nf : List Γ → α\nH : ∀ (a b : List Γ), BlankExtends a b → f a = f b\na b : List Γ\nh : BlankExtends a b\n⊢ f a = f b\n[PROOFSTEP]\nexact H _ _ h\n[GOAL]\ncase inr\nΓ : Type ?u.13118\ninst✝ : Inhabited Γ\nα : Sort ?u.13130\nl : ListBlank Γ\nf : List Γ → α\nH : ∀ (a b : List Γ), BlankExtends a b → f a = f b\na b : List Γ\nh : BlankExtends b a\n⊢ f a = f b\n[PROOFSTEP]\nexact (H _ _ h).symm\n[GOAL]\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ Γ\n[PROOFSTEP]\napply l.liftOn List.headI\n[GOAL]\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ ∀ (a b : List Γ), BlankExtends a b → List.headI a = List.headI b\n[PROOFSTEP]\nrintro a _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\na : List Γ\ni : ℕ\n⊢ List.headI a = List.headI (a ++ List.replicate i default)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase intro.nil\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\n⊢ List.headI [] = List.headI ([] ++ List.replicate i default)\n[PROOFSTEP]\ncases i\n[GOAL]\ncase intro.nil.zero\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ List.headI [] = List.headI ([] ++ List.replicate Nat.zero default)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.nil.succ\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn✝ : ℕ\n⊢ List.headI [] = List.headI ([] ++ List.replicate (Nat.succ n✝) default)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.cons\nΓ : Type ?u.14152\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\nhead✝ : Γ\ntail✝ : List Γ\n⊢ List.headI (head✝ :: tail✝) = List.headI (head✝ :: tail✝ ++ List.replicate i default)\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ ListBlank Γ\n[PROOFSTEP]\napply l.liftOn (fun l ↦ ListBlank.mk l.tail)\n[GOAL]\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ ∀ (a b : List Γ), BlankExtends a b → mk (List.tail a) = mk (List.tail b)\n[PROOFSTEP]\nrintro a _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\na : List Γ\ni : ℕ\n⊢ mk (List.tail a) = mk (List.tail (a ++ List.replicate i default))\n[PROOFSTEP]\nrefine' Quotient.sound' (Or.inl _)\n[GOAL]\ncase intro\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\na : List Γ\ni : ℕ\n⊢ BlankExtends (List.tail a) (List.tail (a ++ List.replicate i default))\n[PROOFSTEP]\ncases a\n[GOAL]\ncase intro.nil\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\n⊢ BlankExtends (List.tail []) (List.tail ([] ++ List.replicate i default))\n[PROOFSTEP]\ncases' i with i <;> [exact ⟨0, rfl⟩; exact ⟨i, rfl⟩]\n[GOAL]\ncase intro.nil\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\n⊢ BlankExtends (List.tail []) (List.tail ([] ++ List.replicate i default))\n[PROOFSTEP]\ncases' i with i\n[GOAL]\ncase intro.nil.zero\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ BlankExtends (List.tail []) (List.tail ([] ++ List.replicate Nat.zero default))\n[PROOFSTEP]\nexact ⟨0, rfl⟩\n[GOAL]\ncase intro.nil.succ\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\n⊢ BlankExtends (List.tail []) (List.tail ([] ++ List.replicate (Nat.succ i) default))\n[PROOFSTEP]\nexact ⟨i, rfl⟩\n[GOAL]\ncase intro.cons\nΓ : Type ?u.14936\ninst✝ : Inhabited Γ\nl : ListBlank Γ\ni : ℕ\nhead✝ : Γ\ntail✝ : List Γ\n⊢ BlankExtends (List.tail (head✝ :: tail✝)) (List.tail (head✝ :: tail✝ ++ List.replicate i default))\n[PROOFSTEP]\nexact ⟨i, rfl⟩\n[GOAL]\nΓ : Type ?u.15941\ninst✝ : Inhabited Γ\na : Γ\nl : ListBlank Γ\n⊢ ListBlank Γ\n[PROOFSTEP]\napply l.liftOn (fun l ↦ ListBlank.mk (List.cons a l))\n[GOAL]\nΓ : Type ?u.15941\ninst✝ : Inhabited Γ\na : Γ\nl : ListBlank Γ\n⊢ ∀ (a_1 b : List Γ), BlankExtends a_1 b → mk (a :: a_1) = mk (a :: b)\n[PROOFSTEP]\nrintro _ _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.15941\ninst✝ : Inhabited Γ\na : Γ\nl : ListBlank Γ\na✝ : List Γ\ni : ℕ\n⊢ mk (a :: a✝) = mk (a :: (a✝ ++ List.replicate i default))\n[PROOFSTEP]\nexact Quotient.sound' (Or.inl ⟨i, rfl⟩)\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\n⊢ ∀ (l : ListBlank Γ), cons (head l) (tail l) = l\n[PROOFSTEP]\napply Quotient.ind'\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\n⊢ ∀ (a : List Γ), cons (head (Quotient.mk'' a)) (tail (Quotient.mk'' a)) = Quotient.mk'' a\n[PROOFSTEP]\nrefine' fun l ↦ Quotient.sound' (Or.inr _)\n[GOAL]\ncase h\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : List Γ\n⊢ BlankExtends l (head (Quotient.mk'' l) :: List.tail l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase h.nil\nΓ : Type u_1\ninst✝ : Inhabited Γ\n⊢ BlankExtends [] (head (Quotient.mk'' []) :: List.tail [])\n[PROOFSTEP]\nexact ⟨1, rfl⟩\n[GOAL]\ncase h.cons\nΓ : Type u_1\ninst✝ : Inhabited Γ\nhead✝ : Γ\ntail✝ : List Γ\n⊢ BlankExtends (head✝ :: tail✝) (head (Quotient.mk'' (head✝ :: tail✝)) :: List.tail (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n⊢ Γ\n[PROOFSTEP]\napply l.liftOn (fun l ↦ List.getI l n)\n[GOAL]\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n⊢ ∀ (a b : List Γ), BlankExtends a b → List.getI a n = List.getI b n\n[PROOFSTEP]\nrintro l _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\n⊢ List.getI l n = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\ncases' lt_or_le n _ with h h\n[GOAL]\ncase intro.inl\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\nh : n < ?m.17919\n⊢ List.getI l n = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\nrw [List.getI_append _ _ _ h]\n[GOAL]\ncase intro.inr\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\nh : List.length l ≤ n\n⊢ List.getI l n = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\nrw [List.getI_eq_default _ h]\n[GOAL]\ncase intro.inr\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\nh : List.length l ≤ n\n⊢ default = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\ncases' le_or_lt _ n with h₂ h₂\n[GOAL]\ncase intro.inr.inl\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\nh : List.length l ≤ n\nh₂ : ?m.18386 ≤ n\n⊢ default = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\nrw [List.getI_eq_default _ h₂]\n[GOAL]\ncase intro.inr.inr\nΓ : Type ?u.17656\ninst✝ : Inhabited Γ\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\ni : ℕ\nh : List.length l ≤ n\nh₂ : n < List.length (l ++ List.replicate i default)\n⊢ default = List.getI (l ++ List.replicate i default) n\n[PROOFSTEP]\nrw [List.getI_eq_get _ h₂, List.get_append_right' h, List.get_replicate]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ nth l 0 = head l\n[PROOFSTEP]\nconv => lhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n| nth l 0 = head l\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n| nth l 0 = head l\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n| nth l 0 = head l\n[PROOFSTEP]\nlhs\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n| nth l 0\n[PROOFSTEP]\nrw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\n⊢ nth (cons (head l) (tail l)) 0 = head l\n[PROOFSTEP]\nexact Quotient.inductionOn' l.tail fun l ↦ rfl\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n⊢ nth l (n + 1) = nth (tail l) n\n[PROOFSTEP]\nconv => lhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n| nth l (n + 1) = nth (tail l) n\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n| nth l (n + 1) = nth (tail l) n\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n| nth l (n + 1) = nth (tail l) n\n[PROOFSTEP]\nlhs\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n| nth l (n + 1)\n[PROOFSTEP]\nrw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl : ListBlank Γ\nn : ℕ\n⊢ nth (cons (head l) (tail l)) (n + 1) = nth (tail l) n\n[PROOFSTEP]\nexact Quotient.inductionOn' l.tail fun l ↦ rfl\n[GOAL]\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\n⊢ (∀ (i_1 : ℕ), nth L₁ i_1 = nth L₂ i_1) → L₁ = L₂\n[PROOFSTEP]\nrefine' ListBlank.induction_on L₁ fun l₁ ↦ ListBlank.induction_on L₂ fun l₂ H ↦ _\n[GOAL]\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\nwlog h : l₁.length ≤ l₂.length\n[GOAL]\ncase inr\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\ncases le_total l₁.length l₂.length <;> [skip; symm]\n[GOAL]\ncase inr\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\ncases le_total l₁.length l₂.length\n[GOAL]\ncase inr.inl\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\nskip\n[GOAL]\ncase inr.inr\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\nsymm\n[GOAL]\ncase inr.inl\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\napply this\n[GOAL]\ncase inr.inr\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ mk l₂ = mk l₁\n[PROOFSTEP]\napply this\n[GOAL]\ncase inr.inl.L₁\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ListBlank Γ\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inl.L₁\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ListBlank Γ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inl.L₂\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ListBlank Γ\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inl.L₂\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ListBlank Γ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inl.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inl.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inl.h\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ List.length l₁ ≤ List.length l₂\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inl.h\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₁ ≤ List.length l₂\n⊢ List.length l₁ ≤ List.length l₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.L₁\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ListBlank Γ\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inr.L₁\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ListBlank Γ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.L₂\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ListBlank Γ\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inr.L₂\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ListBlank Γ\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ∀ (i_1 : ℕ), nth (mk l₂) i_1 = nth (mk l₁) i_1\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inr.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ∀ (i_1 : ℕ), nth (mk l₂) i_1 = nth (mk l₁) i_1\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.h\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ List.length l₂ ≤ List.length l₁\n[PROOFSTEP]\ntry assumption\n[GOAL]\ncase inr.inr.h\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ List.length l₂ ≤ List.length l₁\n[PROOFSTEP]\nassumption\n[GOAL]\ncase inr.inr.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\n⊢ ∀ (i_1 : ℕ), nth (mk l₂) i_1 = nth (mk l₁) i_1\n[PROOFSTEP]\nintro\n[GOAL]\ncase inr.inr.H\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nthis :\n  ∀ {Γ : Type u_1} [i : Inhabited Γ] {L₁ L₂ : ListBlank Γ} (l₁ l₂ : List Γ),\n    (∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1) → List.length l₁ ≤ List.length l₂ → mk l₁ = mk l₂\nh : ¬List.length l₁ ≤ List.length l₂\nh✝ : List.length l₂ ≤ List.length l₁\ni✝ : ℕ\n⊢ nth (mk l₂) i✝ = nth (mk l₁) i✝\n[PROOFSTEP]\nrw [H]\n[GOAL]\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nh : List.length l₁ ≤ List.length l₂\n⊢ mk l₁ = mk l₂\n[PROOFSTEP]\nrefine' Quotient.sound' (Or.inl ⟨l₂.length - l₁.length, _⟩)\n[GOAL]\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nh : List.length l₁ ≤ List.length l₂\n⊢ l₂ = l₁ ++ List.replicate (List.length l₂ - List.length l₁) default\n[PROOFSTEP]\nrefine' List.ext_get _ fun i h h₂ ↦ Eq.symm _\n[GOAL]\ncase refine'_1\nΓ : Type u_1\ni : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i_1 : ℕ), nth (mk l₁) i_1 = nth (mk l₂) i_1\nh : List.length l₁ ≤ List.length l₂\n⊢ List.length l₂ = List.length (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default)\n[PROOFSTEP]\nsimp only [add_tsub_cancel_of_le h, List.length_append, List.length_replicate]\n[GOAL]\ncase refine'_2\nΓ : Type u_1\ni✝ : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i : ℕ), nth (mk l₁) i = nth (mk l₂) i\nh✝ : List.length l₁ ≤ List.length l₂\ni : ℕ\nh : i < List.length l₂\nh₂ : i < List.length (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default)\n⊢ List.get (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default) { val := i, isLt := h₂ } =\n    List.get l₂ { val := i, isLt := h }\n[PROOFSTEP]\nsimp only [ListBlank.nth_mk] at H \n[GOAL]\ncase refine'_2\nΓ : Type u_1\ni✝ : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i : ℕ), List.getI l₁ i = List.getI l₂ i\nh✝ : List.length l₁ ≤ List.length l₂\ni : ℕ\nh : i < List.length l₂\nh₂ : i < List.length (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default)\n⊢ List.get (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default) { val := i, isLt := h₂ } =\n    List.get l₂ { val := i, isLt := h }\n[PROOFSTEP]\ncases' lt_or_le i l₁.length with h' h'\n[GOAL]\ncase refine'_2.inl\nΓ : Type u_1\ni✝ : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i : ℕ), List.getI l₁ i = List.getI l₂ i\nh✝ : List.length l₁ ≤ List.length l₂\ni : ℕ\nh : i < List.length l₂\nh₂ : i < List.length (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default)\nh' : i < List.length l₁\n⊢ List.get (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default) { val := i, isLt := h₂ } =\n    List.get l₂ { val := i, isLt := h }\n[PROOFSTEP]\nsimp only [List.get_append _ h', List.get?_eq_get h, List.get?_eq_get h', ← List.getI_eq_get _ h, ←\n  List.getI_eq_get _ h', H]\n[GOAL]\ncase refine'_2.inr\nΓ : Type u_1\ni✝ : Inhabited Γ\nL₁ L₂ : ListBlank Γ\nl₁ l₂ : List Γ\nH : ∀ (i : ℕ), List.getI l₁ i = List.getI l₂ i\nh✝ : List.length l₁ ≤ List.length l₂\ni : ℕ\nh : i < List.length l₂\nh₂ : i < List.length (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default)\nh' : List.length l₁ ≤ i\n⊢ List.get (l₁ ++ List.replicate (List.length l₂ - List.length l₁) default) { val := i, isLt := h₂ } =\n    List.get l₂ { val := i, isLt := h }\n[PROOFSTEP]\nsimp only [List.get_append_right' h', List.get_replicate, List.get?_eq_get h, List.get?_len_le h', ←\n  List.getI_eq_default _ h', H, List.getI_eq_get _ h]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\nn i : ℕ\nL : ListBlank Γ\n⊢ nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i\n[PROOFSTEP]\ninduction' n with n IH generalizing i L\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni✝ : ℕ\nL✝ : ListBlank Γ\ni : ℕ\nL : ListBlank Γ\n⊢ nth (modifyNth f Nat.zero L) i = if i = Nat.zero then f (nth L i) else nth L i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero.zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni : ℕ\nL✝ L : ListBlank Γ\n⊢ nth (modifyNth f Nat.zero L) Nat.zero = if Nat.zero = Nat.zero then f (nth L Nat.zero) else nth L Nat.zero\n[PROOFSTEP]\nsimp only [ListBlank.nth_zero, if_true, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.nth_succ, if_false,\n  ListBlank.tail_cons, Nat.zero_eq]\n[GOAL]\ncase zero.succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni : ℕ\nL✝ L : ListBlank Γ\nn✝ : ℕ\n⊢ nth (modifyNth f Nat.zero L) (Nat.succ n✝) =\n    if Nat.succ n✝ = Nat.zero then f (nth L (Nat.succ n✝)) else nth L (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [ListBlank.nth_zero, if_true, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.nth_succ, if_false,\n  ListBlank.tail_cons, Nat.zero_eq]\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni✝ : ℕ\nL✝ : ListBlank Γ\nn : ℕ\nIH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i\ni : ℕ\nL : ListBlank Γ\n⊢ nth (modifyNth f (Nat.succ n) L) i = if i = Nat.succ n then f (nth L i) else nth L i\n[PROOFSTEP]\ncases i\n[GOAL]\ncase succ.zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni : ℕ\nL✝ : ListBlank Γ\nn : ℕ\nIH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i\nL : ListBlank Γ\n⊢ nth (modifyNth f (Nat.succ n) L) Nat.zero = if Nat.zero = Nat.succ n then f (nth L Nat.zero) else nth L Nat.zero\n[PROOFSTEP]\nrw [if_neg (Nat.succ_ne_zero _).symm]\n[GOAL]\ncase succ.zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni : ℕ\nL✝ : ListBlank Γ\nn : ℕ\nIH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i\nL : ListBlank Γ\n⊢ nth (modifyNth f (Nat.succ n) L) Nat.zero = nth L Nat.zero\n[PROOFSTEP]\nsimp only [ListBlank.nth_zero, ListBlank.head_cons, ListBlank.modifyNth, Nat.zero_eq]\n[GOAL]\ncase succ.succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\ni : ℕ\nL✝ : ListBlank Γ\nn : ℕ\nIH : ∀ (i : ℕ) (L : ListBlank Γ), nth (modifyNth f n L) i = if i = n then f (nth L i) else nth L i\nL : ListBlank Γ\nn✝ : ℕ\n⊢ nth (modifyNth f (Nat.succ n) L) (Nat.succ n✝) =\n    if Nat.succ n✝ = Nat.succ n then f (nth L (Nat.succ n✝)) else nth L (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [IH, ListBlank.modifyNth, ListBlank.nth_succ, ListBlank.tail_cons, Nat.succ.injEq]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : List Γ\n⊢ List.headI (List.map f.f l) = Turing.PointedMap.f f (List.headI l)\n[PROOFSTEP]\ncases l <;> [exact (PointedMap.map_pt f).symm; rfl]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : List Γ\n⊢ List.headI (List.map f.f l) = Turing.PointedMap.f f (List.headI l)\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\n⊢ List.headI (List.map f.f []) = Turing.PointedMap.f f (List.headI [])\n[PROOFSTEP]\nexact (PointedMap.map_pt f).symm\n[GOAL]\ncase cons\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nhead✝ : Γ\ntail✝ : List Γ\n⊢ List.headI (List.map f.f (head✝ :: tail✝)) = Turing.PointedMap.f f (List.headI (head✝ :: tail✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type ?u.27995\nΓ' : Type ?u.27994\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ ListBlank Γ'\n[PROOFSTEP]\napply l.liftOn (fun l ↦ ListBlank.mk (List.map f l))\n[GOAL]\nΓ : Type ?u.27995\nΓ' : Type ?u.27994\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ ∀ (a b : List Γ), BlankExtends a b → mk (List.map f.f a) = mk (List.map f.f b)\n[PROOFSTEP]\nrintro l _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.27995\nΓ' : Type ?u.27994\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nl : List Γ\ni : ℕ\n⊢ mk (List.map f.f l) = mk (List.map f.f (l ++ List.replicate i default))\n[PROOFSTEP]\nrefine' Quotient.sound' (Or.inl ⟨i, _⟩)\n[GOAL]\ncase intro\nΓ : Type ?u.27995\nΓ' : Type ?u.27994\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nl : List Γ\ni : ℕ\n⊢ List.map f.f (l ++ List.replicate i default) = List.map f.f l ++ List.replicate i default\n[PROOFSTEP]\nsimp only [PointedMap.map_pt, List.map_append, List.map_replicate]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ head (map f l) = PointedMap.f f (head l)\n[PROOFSTEP]\nconv => lhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| head (map f l) = PointedMap.f f (head l)\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| head (map f l) = PointedMap.f f (head l)\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| head (map f l) = PointedMap.f f (head l)\n[PROOFSTEP]\nlhs\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| head (map f l)\n[PROOFSTEP]\nrw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ head (map f (cons (head l) (tail l))) = PointedMap.f f (head l)\n[PROOFSTEP]\nexact Quotient.inductionOn' l fun a ↦ rfl\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ tail (map f l) = map f (tail l)\n[PROOFSTEP]\nconv => lhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| tail (map f l) = map f (tail l)\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| tail (map f l) = map f (tail l)\n[PROOFSTEP]\nlhs; rw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| tail (map f l) = map f (tail l)\n[PROOFSTEP]\nlhs\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n| tail (map f l)\n[PROOFSTEP]\nrw [← ListBlank.cons_head_tail l]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\n⊢ tail (map f (cons (head l) (tail l))) = map f (tail l)\n[PROOFSTEP]\nexact Quotient.inductionOn' l fun a ↦ rfl\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\na : Γ\n⊢ map f (cons a l) = cons (PointedMap.f f a) (map f l)\n[PROOFSTEP]\nrefine' (ListBlank.cons_head_tail _).symm.trans _\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\na : Γ\n⊢ cons (head (map f (cons a l))) (tail (map f (cons a l))) = cons (PointedMap.f f a) (map f l)\n[PROOFSTEP]\nsimp only [ListBlank.head_map, ListBlank.head_cons, ListBlank.tail_map, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl : ListBlank Γ\nn : ℕ\n⊢ nth (map f l) n = PointedMap.f f (nth l n)\n[PROOFSTEP]\nrefine'\n  l.inductionOn fun l ↦\n    _\n      -- Porting note: Added `suffices` to get `simp` to work.\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\n⊢ nth (map f (Quotient.mk (BlankRel.setoid Γ) l)) n = PointedMap.f f (nth (Quotient.mk (BlankRel.setoid Γ) l) n)\n[PROOFSTEP]\nsuffices ((mk l).map f).nth n = f ((mk l).nth n) by exact this\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\nthis : nth (map f (mk l)) n = PointedMap.f f (nth (mk l) n)\n⊢ nth (map f (Quotient.mk (BlankRel.setoid Γ) l)) n = PointedMap.f f (nth (Quotient.mk (BlankRel.setoid Γ) l) n)\n[PROOFSTEP]\nexact this\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\n⊢ nth (map f (mk l)) n = PointedMap.f f (nth (mk l) n)\n[PROOFSTEP]\nsimp only [List.get?_map, ListBlank.map_mk, ListBlank.nth_mk, List.getI_eq_iget_get?]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\n⊢ Option.iget (Option.map f.f (List.get? l n)) = PointedMap.f f (Option.iget (List.get? l n))\n[PROOFSTEP]\ncases l.get? n\n[GOAL]\ncase none\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\n⊢ Option.iget (Option.map f.f none) = PointedMap.f f (Option.iget none)\n[PROOFSTEP]\nexact f.2.symm\n[GOAL]\ncase some\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nl✝ : ListBlank Γ\nn : ℕ\nl : List Γ\nval✝ : Γ\n⊢ Option.iget (Option.map f.f (some val✝)) = PointedMap.f f (Option.iget (some val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nΓ : ι → Type u_2\ninst✝ : (i : ι) → Inhabited (Γ i)\ni : ι\nL : ListBlank ((i : ι) → Γ i)\nn : ℕ\n⊢ ListBlank.nth (ListBlank.map (proj i) L) n = ListBlank.nth L n i\n[PROOFSTEP]\nrw [ListBlank.nth_map]\n[GOAL]\nι : Type u_1\nΓ : ι → Type u_2\ninst✝ : (i : ι) → Inhabited (Γ i)\ni : ι\nL : ListBlank ((i : ι) → Γ i)\nn : ℕ\n⊢ PointedMap.f (proj i) (ListBlank.nth L n) = ListBlank.nth L n i\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nF : PointedMap Γ Γ'\nf : Γ → Γ\nf' : Γ' → Γ'\nH : ∀ (x : Γ), PointedMap.f F (f x) = f' (PointedMap.f F x)\nn : ℕ\nL : ListBlank Γ\n⊢ map F (modifyNth f n L) = modifyNth f' n (map F L)\n[PROOFSTEP]\ninduction' n with n IH generalizing L\n[GOAL]\ncase zero\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nF : PointedMap Γ Γ'\nf : Γ → Γ\nf' : Γ' → Γ'\nH : ∀ (x : Γ), PointedMap.f F (f x) = f' (PointedMap.f F x)\nL✝ L : ListBlank Γ\n⊢ map F (modifyNth f Nat.zero L) = modifyNth f' Nat.zero (map F L)\n[PROOFSTEP]\nsimp only [*, ListBlank.head_map, ListBlank.modifyNth, ListBlank.map_cons, ListBlank.tail_map]\n[GOAL]\ncase succ\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nF : PointedMap Γ Γ'\nf : Γ → Γ\nf' : Γ' → Γ'\nH : ∀ (x : Γ), PointedMap.f F (f x) = f' (PointedMap.f F x)\nL✝ : ListBlank Γ\nn : ℕ\nIH : ∀ (L : ListBlank Γ), map F (modifyNth f n L) = modifyNth f' n (map F L)\nL : ListBlank Γ\n⊢ map F (modifyNth f (Nat.succ n) L) = modifyNth f' (Nat.succ n) (map F L)\n[PROOFSTEP]\nsimp only [*, ListBlank.head_map, ListBlank.modifyNth, ListBlank.map_cons, ListBlank.tail_map]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\n⊢ append l₁ (mk l₂) = mk (l₁ ++ l₂)\n[PROOFSTEP]\ninduction l₁\n[GOAL]\ncase nil\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₂ : List Γ\n⊢ append [] (mk l₂) = mk ([] ++ l₂)\n[PROOFSTEP]\nsimp only [*, ListBlank.append, List.nil_append, List.cons_append, ListBlank.cons_mk]\n[GOAL]\ncase cons\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₂ : List Γ\nhead✝ : Γ\ntail✝ : List Γ\ntail_ih✝ : append tail✝ (mk l₂) = mk (tail✝ ++ l₂)\n⊢ append (head✝ :: tail✝) (mk l₂) = mk (head✝ :: tail✝ ++ l₂)\n[PROOFSTEP]\nsimp only [*, ListBlank.append, List.nil_append, List.cons_append, ListBlank.cons_mk]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nl₃ : ListBlank Γ\n⊢ append (l₁ ++ l₂) l₃ = append l₁ (append l₂ l₃)\n[PROOFSTEP]\nrefine'\n  l₃.inductionOn fun l ↦\n    _\n      -- Porting note: Added `suffices` to get `simp` to work.\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nl₃ : ListBlank Γ\nl : List Γ\n⊢ append (l₁ ++ l₂) (Quotient.mk (BlankRel.setoid Γ) l) = append l₁ (append l₂ (Quotient.mk (BlankRel.setoid Γ) l))\n[PROOFSTEP]\nsuffices append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l)) by exact this\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nl₃ : ListBlank Γ\nl : List Γ\nthis : append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l))\n⊢ append (l₁ ++ l₂) (Quotient.mk (BlankRel.setoid Γ) l) = append l₁ (append l₂ (Quotient.mk (BlankRel.setoid Γ) l))\n[PROOFSTEP]\nexact this\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nl₁ l₂ : List Γ\nl₃ : ListBlank Γ\nl : List Γ\n⊢ append (l₁ ++ l₂) (mk l) = append l₁ (append l₂ (mk l))\n[PROOFSTEP]\nsimp only [ListBlank.append_mk, List.append_assoc]\n[GOAL]\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\n⊢ ListBlank Γ'\n[PROOFSTEP]\napply l.liftOn (fun l ↦ ListBlank.mk (List.bind l f))\n[GOAL]\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\n⊢ ∀ (a b : List Γ), BlankExtends a b → mk (List.bind a f) = mk (List.bind b f)\n[PROOFSTEP]\nrintro l _ ⟨i, rfl⟩\n[GOAL]\ncase intro\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\nl : List Γ\ni : ℕ\n⊢ mk (List.bind l f) = mk (List.bind (l ++ List.replicate i default) f)\n[PROOFSTEP]\ncases' hf with n e\n[GOAL]\ncase intro.intro\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\ni n : ℕ\ne : f default = List.replicate n default\n⊢ mk (List.bind l f) = mk (List.bind (l ++ List.replicate i default) f)\n[PROOFSTEP]\nrefine' Quotient.sound' (Or.inl ⟨i * n, _⟩)\n[GOAL]\ncase intro.intro\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\ni n : ℕ\ne : f default = List.replicate n default\n⊢ List.bind (l ++ List.replicate i default) f = List.bind l f ++ List.replicate (i * n) default\n[PROOFSTEP]\nrw [List.append_bind, mul_comm]\n[GOAL]\ncase intro.intro\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\ni n : ℕ\ne : f default = List.replicate n default\n⊢ List.bind l f ++ List.bind (List.replicate i default) f = List.bind l f ++ List.replicate (n * i) default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase intro.intro.e_a\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\ni n : ℕ\ne : f default = List.replicate n default\n⊢ List.bind (List.replicate i default) f = List.replicate (n * i) default\n[PROOFSTEP]\ninduction' i with i IH\n[GOAL]\ncase intro.intro.e_a.zero\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\nn : ℕ\ne : f default = List.replicate n default\n⊢ List.bind (List.replicate Nat.zero default) f = List.replicate (n * Nat.zero) default\ncase intro.intro.e_a.succ\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\nn : ℕ\ne : f default = List.replicate n default\ni : ℕ\nIH : List.bind (List.replicate i default) f = List.replicate (n * i) default\n⊢ List.bind (List.replicate (Nat.succ i) default) f = List.replicate (n * Nat.succ i) default\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.e_a.succ\nΓ : Type ?u.36140\nΓ' : Type ?u.36152\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nl : List Γ\nn : ℕ\ne : f default = List.replicate n default\ni : ℕ\nIH : List.bind (List.replicate i default) f = List.replicate (n * i) default\n⊢ List.bind (List.replicate (Nat.succ i) default) f = List.replicate (n * Nat.succ i) default\n[PROOFSTEP]\nsimp only [IH, e, List.replicate_add, Nat.mul_succ, add_comm, List.replicate_succ, List.cons_bind]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\na : Γ\nl : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\n⊢ bind (cons a l) f hf = append (f a) (bind l f hf)\n[PROOFSTEP]\nrefine'\n  l.inductionOn fun l ↦\n    _\n      -- Porting note: Added `suffices` to get `simp` to work.\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\na : Γ\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\nl : List Γ\n⊢ bind (cons a (Quotient.mk (BlankRel.setoid Γ) l)) f hf = append (f a) (bind (Quotient.mk (BlankRel.setoid Γ) l) f hf)\n[PROOFSTEP]\nsuffices ((mk l).cons a).bind f hf = ((mk l).bind f hf).append (f a) by exact this\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\na : Γ\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\nl : List Γ\nthis : bind (cons a (mk l)) f hf = append (f a) (bind (mk l) f hf)\n⊢ bind (cons a (Quotient.mk (BlankRel.setoid Γ) l)) f hf = append (f a) (bind (Quotient.mk (BlankRel.setoid Γ) l) f hf)\n[PROOFSTEP]\nexact this\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\na : Γ\nl✝ : ListBlank Γ\nf : Γ → List Γ'\nhf : ∃ n, f default = List.replicate n default\nl : List Γ\n⊢ bind (cons a (mk l)) f hf = append (f a) (bind (mk l) f hf)\n[PROOFSTEP]\nsimp only [ListBlank.append_mk, ListBlank.bind_mk, ListBlank.cons_mk, List.cons_bind]\n[GOAL]\nΓ : Type ?u.39827\ninst✝ : Inhabited Γ\n⊢ Tape Γ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase head\nΓ : Type ?u.39827\ninst✝ : Inhabited Γ\n⊢ Γ\n[PROOFSTEP]\napply default\n[GOAL]\ncase left\nΓ : Type ?u.39827\ninst✝ : Inhabited Γ\n⊢ ListBlank Γ\n[PROOFSTEP]\napply default\n[GOAL]\ncase right\nΓ : Type ?u.39827\ninst✝ : Inhabited Γ\n⊢ ListBlank Γ\n[PROOFSTEP]\napply default\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\n⊢ move Dir.right (move Dir.left T) = T\n[PROOFSTEP]\ncases T\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝ : Inhabited Γ\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ move Dir.right (move Dir.left { head := head✝, left := left✝, right := right✝ }) =\n    { head := head✝, left := left✝, right := right✝ }\n[PROOFSTEP]\nsimp [Tape.move]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\n⊢ move Dir.left (move Dir.right T) = T\n[PROOFSTEP]\ncases T\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝ : Inhabited Γ\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ move Dir.left (move Dir.right { head := head✝, left := left✝, right := right✝ }) =\n    { head := head✝, left := left✝, right := right✝ }\n[PROOFSTEP]\nsimp [Tape.move]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\n⊢ mk' T.left (right₀ T) = T\n[PROOFSTEP]\ncases T\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝ : Inhabited Γ\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ mk' { head := head✝, left := left✝, right := right✝ }.left\n      (right₀ { head := head✝, left := left✝, right := right✝ }) =\n    { head := head✝, left := left✝, right := right✝ }\n[PROOFSTEP]\nsimp only [Tape.right₀, Tape.mk', ListBlank.head_cons, ListBlank.tail_cons, eq_self_iff_true, and_self_iff]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nL R : ListBlank Γ\n⊢ move Dir.left (mk' L R) = mk' (ListBlank.tail L) (ListBlank.cons (ListBlank.head L) R)\n[PROOFSTEP]\nsimp only [Tape.move, Tape.mk', ListBlank.head_cons, eq_self_iff_true, ListBlank.cons_head_tail, and_self_iff,\n  ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nL R : ListBlank Γ\n⊢ move Dir.right (mk' L R) = mk' (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R)\n[PROOFSTEP]\nsimp only [Tape.move, Tape.mk', ListBlank.head_cons, eq_self_iff_true, ListBlank.cons_head_tail, and_self_iff,\n  ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\nn : ℕ\n⊢ ListBlank.nth (right₀ T) n = nth T ↑n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\n⊢ ListBlank.nth (right₀ T) Nat.zero = nth T ↑Nat.zero\n[PROOFSTEP]\nsimp only [Tape.nth, Tape.right₀, Int.ofNat_zero, ListBlank.nth_zero, ListBlank.nth_succ, ListBlank.head_cons,\n  ListBlank.tail_cons, Nat.zero_eq]\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\nn✝ : ℕ\n⊢ ListBlank.nth (right₀ T) (Nat.succ n✝) = nth T ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp only [Tape.nth, Tape.right₀, Int.ofNat_zero, ListBlank.nth_zero, ListBlank.nth_succ, ListBlank.head_cons,\n  ListBlank.tail_cons, Nat.zero_eq]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nL R : ListBlank Γ\nn : ℕ\n⊢ nth (mk' L R) ↑n = ListBlank.nth R n\n[PROOFSTEP]\nrw [← Tape.right₀_nth, Tape.mk'_right₀]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\na : Γ\nL R : ListBlank Γ\nn : ℕ\n⊢ nth (move Dir.left { head := a, left := L, right := R }) (↑(n + 1) + 1) =\n    nth { head := a, left := L, right := R } (↑(n + 1) + 1 - 1)\n[PROOFSTEP]\nrw [add_sub_cancel]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\na : Γ\nL R : ListBlank Γ\nn : ℕ\n⊢ nth (move Dir.left { head := a, left := L, right := R }) (↑(n + 1) + 1) =\n    nth { head := a, left := L, right := R } ↑(n + 1)\n[PROOFSTEP]\nchange (R.cons a).nth (n + 1) = R.nth n\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\na : Γ\nL R : ListBlank Γ\nn : ℕ\n⊢ ListBlank.nth (ListBlank.cons a R) (n + 1) = ListBlank.nth R n\n[PROOFSTEP]\nrw [ListBlank.nth_succ, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n⊢ nth (move Dir.right T) i = nth T (i + 1)\n[PROOFSTEP]\nconv => rhs; rw [← T.move_right_left]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n| nth (move Dir.right T) i = nth T (i + 1)\n[PROOFSTEP]\nrhs; rw [← T.move_right_left]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n| nth (move Dir.right T) i = nth T (i + 1)\n[PROOFSTEP]\nrhs; rw [← T.move_right_left]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n| nth (move Dir.right T) i = nth T (i + 1)\n[PROOFSTEP]\nrhs\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n| nth T (i + 1)\n[PROOFSTEP]\nrw [← T.move_right_left]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℤ\n⊢ nth (move Dir.right T) i = nth (move Dir.left (move Dir.right T)) (i + 1)\n[PROOFSTEP]\nrw [Tape.move_left_nth, add_sub_cancel]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\ni : ℕ\n⊢ ((move Dir.right)^[i] T).head = nth T ↑i\n[PROOFSTEP]\ninduction i generalizing T\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nT : Tape Γ\n⊢ ((move Dir.right)^[Nat.zero] T).head = nth T ↑Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nn✝ : ℕ\nn_ih✝ : ∀ (T : Tape Γ), ((move Dir.right)^[n✝] T).head = nth T ↑n✝\nT : Tape Γ\n⊢ ((move Dir.right)^[Nat.succ n✝] T).head = nth T ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp only [*, Tape.move_right_nth, Int.ofNat_succ, iterate_succ, Function.comp_apply]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\n⊢ ∀ (T : Tape Γ), write T.head T = T\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝ : Inhabited Γ\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ write { head := head✝, left := left✝, right := right✝ }.head { head := head✝, left := left✝, right := right✝ } =\n    { head := head✝, left := left✝, right := right✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\na b : Γ\nL R : ListBlank Γ\n⊢ write b (mk' L (ListBlank.cons a R)) = mk' L (ListBlank.cons b R)\n[PROOFSTEP]\nsimp only [Tape.write, Tape.mk', ListBlank.head_cons, ListBlank.tail_cons, eq_self_iff_true, and_self_iff]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\n⊢ ∀ (T : Tape Γ), (map f T).head = PointedMap.f f T.head\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mk\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ (map f { head := head✝, left := left✝, right := right✝ }).head =\n    PointedMap.f f { head := head✝, left := left✝, right := right✝ }.head\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nb : Γ\n⊢ ∀ (T : Tape Γ), map f (write b T) = write (PointedMap.f f b) (map f T)\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase mk\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nb head✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ map f (write b { head := head✝, left := left✝, right := right✝ }) =\n    write (PointedMap.f f b) (map f { head := head✝, left := left✝, right := right✝ })\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\nL R : ListBlank Γ\nn : ℕ\n⊢ write (f (ListBlank.nth R n)) ((move Dir.right)^[n] (mk' L R)) =\n    (move Dir.right)^[n] (mk' L (ListBlank.modifyNth f n R))\n[PROOFSTEP]\ninduction' n with n IH generalizing L R\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\nL✝ R✝ L R : ListBlank Γ\n⊢ write (f (ListBlank.nth R Nat.zero)) ((move Dir.right)^[Nat.zero] (mk' L R)) =\n    (move Dir.right)^[Nat.zero] (mk' L (ListBlank.modifyNth f Nat.zero R))\n[PROOFSTEP]\nsimp only [ListBlank.nth_zero, ListBlank.modifyNth, iterate_zero_apply, Nat.zero_eq]\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\nL✝ R✝ L R : ListBlank Γ\n⊢ write (f (ListBlank.head R)) (mk' L R) = mk' L (ListBlank.cons (f (ListBlank.head R)) (ListBlank.tail R))\n[PROOFSTEP]\nrw [← Tape.write_mk', ListBlank.cons_head_tail]\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝ : Inhabited Γ\nf : Γ → Γ\nL✝ R✝ : ListBlank Γ\nn : ℕ\nIH :\n  ∀ (L R : ListBlank Γ),\n    write (f (ListBlank.nth R n)) ((move Dir.right)^[n] (mk' L R)) =\n      (move Dir.right)^[n] (mk' L (ListBlank.modifyNth f n R))\nL R : ListBlank Γ\n⊢ write (f (ListBlank.nth R (Nat.succ n))) ((move Dir.right)^[Nat.succ n] (mk' L R)) =\n    (move Dir.right)^[Nat.succ n] (mk' L (ListBlank.modifyNth f (Nat.succ n) R))\n[PROOFSTEP]\nsimp only [ListBlank.head_cons, ListBlank.nth_succ, ListBlank.modifyNth, Tape.move_right_mk', ListBlank.tail_cons,\n  iterate_succ_apply, IH]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nT : Tape Γ\nd : Dir\n⊢ map f (move d T) = move d (map f T)\n[PROOFSTEP]\ncases T\n[GOAL]\ncase mk\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nd : Dir\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ map f (move d { head := head✝, left := left✝, right := right✝ }) =\n    move d (map f { head := head✝, left := left✝, right := right✝ })\n[PROOFSTEP]\ncases d\n[GOAL]\ncase mk.left\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ map f (move Dir.left { head := head✝, left := left✝, right := right✝ }) =\n    move Dir.left (map f { head := head✝, left := left✝, right := right✝ })\n[PROOFSTEP]\nsimp only [Tape.move, Tape.map, ListBlank.head_map, eq_self_iff_true, ListBlank.map_cons, and_self_iff,\n  ListBlank.tail_map]\n[GOAL]\ncase mk.right\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nhead✝ : Γ\nleft✝ right✝ : ListBlank Γ\n⊢ map f (move Dir.right { head := head✝, left := left✝, right := right✝ }) =\n    move Dir.right (map f { head := head✝, left := left✝, right := right✝ })\n[PROOFSTEP]\nsimp only [Tape.move, Tape.map, ListBlank.head_map, eq_self_iff_true, ListBlank.map_cons, and_self_iff,\n  ListBlank.tail_map]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nL R : ListBlank Γ\n⊢ map f (mk' L R) = mk' (ListBlank.map f L) (ListBlank.map f R)\n[PROOFSTEP]\nsimp only [Tape.mk', Tape.map, ListBlank.head_map, eq_self_iff_true, and_self_iff, ListBlank.tail_map]\n[GOAL]\nΓ : Type u_1\nΓ' : Type u_2\ninst✝¹ : Inhabited Γ\ninst✝ : Inhabited Γ'\nf : PointedMap Γ Γ'\nL R : List Γ\n⊢ map f (mk₂ L R) = mk₂ (List.map f.f L) (List.map f.f R)\n[PROOFSTEP]\nsimp only [Tape.mk₂, Tape.map_mk', ListBlank.map_mk]\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b c : σ\nh : f a = f b\n⊢ (∃ b_1, b_1 ∈ f b ∧ ReflTransGen (fun a b => b ∈ f a) b_1 c) ↔ ∃ b, b ∈ f a ∧ ReflTransGen (fun a b => b ∈ f a) b c\n[PROOFSTEP]\nrw [h]\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b c : σ\nh₁ : Reaches₁ f a c\nh₂ : b ∈ f a\n⊢ Reaches f b c\n[PROOFSTEP]\nrcases TransGen.head'_iff.1 h₁ with ⟨b', hab, hbc⟩\n[GOAL]\ncase intro.intro\nσ : Type u_1\nf : σ → Option σ\na b c : σ\nh₁ : Reaches₁ f a c\nh₂ : b ∈ f a\nb' : σ\nhab : b' ∈ f a\nhbc : ReflTransGen (fun a b => b ∈ f a) b' c\n⊢ Reaches f b c\n[PROOFSTEP]\ncases Option.mem_unique hab h₂\n[GOAL]\ncase intro.intro.refl\nσ : Type u_1\nf : σ → Option σ\na b c : σ\nh₁ : Reaches₁ f a c\nh₂ hab : b ∈ f a\nhbc : ReflTransGen (fun a b => b ∈ f a) b c\n⊢ Reaches f b c\n[PROOFSTEP]\nexact hbc\n[GOAL]\nσ : Type ?u.63381\nf : σ → Option σ\nb : σ\nC : σ → Sort u_1\na : σ\nh : b ∈ eval f a\nH : (a : σ) → b ∈ eval f a → ((a' : σ) → f a = some a' → C a') → C a\na' : σ\nha' : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) a'\nh' : (a'' : σ) → Sum.inr a'' ∈ Part.some (Option.elim (f a') (Sum.inl a') Sum.inr) → C a''\nb' : σ\ne : f a' = some b'\n⊢ Sum.inr b' = Option.elim (f a') (Sum.inl a') Sum.inr\n[PROOFSTEP]\nrw [e]\n[GOAL]\nσ : Type ?u.63381\nf : σ → Option σ\nb : σ\nC : σ → Sort u_1\na : σ\nh : b ∈ eval f a\nH : (a : σ) → b ∈ eval f a → ((a' : σ) → f a = some a' → C a') → C a\na' : σ\nha' : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) a'\nh' : (a'' : σ) → Sum.inr a'' ∈ Part.some (Option.elim (f a') (Sum.inl a') Sum.inr) → C a''\nb' : σ\ne : f a' = some b'\n⊢ Sum.inr b' = Option.elim (some b') (Sum.inl a') Sum.inr\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\n⊢ b ∈ eval f a ↔ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, fun ⟨h₁, h₂⟩ ↦ _⟩\n[GOAL]\ncase refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nh : b ∈ eval f a\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrefine' @evalInduction _ _ _ (fun a ↦ Reaches f a b ∧ f b = none) _ h fun a h IH ↦ _\n[GOAL]\ncase refine'_1\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\n⊢ (fun a => Reaches f a b ∧ f b = none) a\n[PROOFSTEP]\ncases' e : f a with a'\n[GOAL]\ncase refine'_1.none\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\ne : f a = none\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrw [Part.mem_unique h (PFun.mem_fix_iff.2 <| Or.inl <| Part.mem_some_iff.2 <| by rw [e] <;> rfl)]\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\ne : f a = none\n⊢ Sum.inl ?m.64287 = Option.elim (f a) (Sum.inl a) Sum.inr\n[PROOFSTEP]\nrw [e]\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\ne : f a = none\n⊢ Sum.inl ?m.64287 = Option.elim none (Sum.inl a) Sum.inr\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.none\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\ne : f a = none\n⊢ Reaches f a a ∧ f a = none\n[PROOFSTEP]\nexact ⟨ReflTransGen.refl, e⟩\n[GOAL]\ncase refine'_1.some\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝ : b ∈ eval f a✝\na : σ\nh : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrcases PFun.mem_fix_iff.1 h with (h | ⟨_, h, _⟩)\n[GOAL]\ncase refine'_1.some.inl\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nh : Sum.inl b ∈ Part.some (Option.elim (f a) (Sum.inl a) Sum.inr)\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrw [e] at h \n[GOAL]\ncase refine'_1.some.inr.intro.intro\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nw✝ : σ\nh : Sum.inr w✝ ∈ Part.some (Option.elim (f a) (Sum.inl a) Sum.inr)\nright✝ : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) w✝\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nrw [e] at h \n[GOAL]\ncase refine'_1.some.inl\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nh : Sum.inl b ∈ Part.some (Option.elim (some a') (Sum.inl a) Sum.inr)\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\ncases Part.mem_some_iff.1 h\n[GOAL]\ncase refine'_1.some.inr.intro.intro\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nw✝ : σ\nh : Sum.inr w✝ ∈ Part.some (Option.elim (some a') (Sum.inl a) Sum.inr)\nright✝ : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) w✝\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\ncases Part.mem_some_iff.1 h\n[GOAL]\ncase refine'_1.some.inr.intro.intro.refl\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nh : Sum.inr a' ∈ Part.some (Option.elim (some a') (Sum.inl a) Sum.inr)\nright✝ : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) a'\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\ncases' IH a' e with h₁ h₂\n[GOAL]\ncase refine'_1.some.inr.intro.intro.refl.intro\nσ : Type u_1\nf : σ → Option σ\na✝ b : σ\nh✝¹ : b ∈ eval f a✝\na : σ\nh✝ : b ∈ eval f a\nIH : ∀ (a' : σ), f a = some a' → (fun a => Reaches f a b ∧ f b = none) a'\na' : σ\ne : f a = some a'\nh : Sum.inr a' ∈ Part.some (Option.elim (some a') (Sum.inl a) Sum.inr)\nright✝ : b ∈ PFun.fix (fun s => Part.some (Option.elim (f s) (Sum.inl s) Sum.inr)) a'\nh₁ : Reaches f a' b\nh₂ : f b = none\n⊢ Reaches f a b ∧ f b = none\n[PROOFSTEP]\nexact ⟨ReflTransGen.head e h₁, h₂⟩\n[GOAL]\ncase refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\n⊢ b ∈ eval f a\n[PROOFSTEP]\nrefine' ReflTransGen.head_induction_on h₁ _ fun h _ IH ↦ _\n[GOAL]\ncase refine'_2.refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\n⊢ b ∈ eval f b\n[PROOFSTEP]\nrefine' PFun.mem_fix_iff.2 (Or.inl _)\n[GOAL]\ncase refine'_2.refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\n⊢ Sum.inl b ∈ Part.some (Option.elim (f b) (Sum.inl b) Sum.inr)\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase refine'_2.refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\n⊢ Sum.inl b ∈ Part.some (Option.elim none (Sum.inl b) Sum.inr)\n[PROOFSTEP]\napply Part.mem_some\n[GOAL]\ncase refine'_2.refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝¹ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\na✝ c✝ : σ\nh : c✝ ∈ f a✝\nx✝ : ReflTransGen (fun a b => b ∈ f a) c✝ b\nIH : b ∈ eval f c✝\n⊢ b ∈ eval f a✝\n[PROOFSTEP]\nrefine' PFun.mem_fix_iff.2 (Or.inr ⟨_, _, IH⟩)\n[GOAL]\ncase refine'_2.refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝¹ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\na✝ c✝ : σ\nh : c✝ ∈ f a✝\nx✝ : ReflTransGen (fun a b => b ∈ f a) c✝ b\nIH : b ∈ eval f c✝\n⊢ Sum.inr c✝ ∈ Part.some (Option.elim (f a✝) (Sum.inl a✝) Sum.inr)\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase refine'_2.refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nx✝¹ : Reaches f a b ∧ f b = none\nh₁ : Reaches f a b\nh₂ : f b = none\na✝ c✝ : σ\nh : c✝ ∈ f a✝\nx✝ : ReflTransGen (fun a b => b ∈ f a) c✝ b\nIH : b ∈ eval f c✝\n⊢ Sum.inr c✝ ∈ Part.some (Option.elim (some c✝) (Sum.inl a✝) Sum.inr)\n[PROOFSTEP]\napply Part.mem_some\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nh : b ∈ eval f a\nc : σ\nx✝ : Reaches₁ f b c\nbc : Reaches₁ f b c := x✝\n⊢ False\n[PROOFSTEP]\nlet ⟨_, b0⟩ := mem_eval.1 h\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nh : b ∈ eval f a\nc : σ\nx✝ : Reaches₁ f b c\nbc : Reaches₁ f b c := x✝\nleft✝ : Reaches f a b\nb0 : f b = none\n⊢ False\n[PROOFSTEP]\nlet ⟨b', h', _⟩ := TransGen.head'_iff.1 bc\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nh : b ∈ eval f a\nc : σ\nx✝ : Reaches₁ f b c\nbc : Reaches₁ f b c := x✝\nleft✝ : Reaches f a b\nb0 : f b = none\nb' : σ\nh' : b' ∈ f b\nright✝ : ReflTransGen (fun a b => b ∈ f a) b' c\n⊢ False\n[PROOFSTEP]\ncases b0.symm.trans h'\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nh : b ∈ eval f a\nc : σ\nleft✝ : Reaches f a b\nb0 : f b = none\nb' : σ\nh' : b' ∈ f b\n⊢ False\n[PROOFSTEP]\ncases b0.symm.trans h'\n[GOAL]\nσ : Type u_1\nf : σ → Option σ\na b : σ\nab : Reaches f a b\n⊢ eval f a = eval f b\n[PROOFSTEP]\nrefine' Part.ext fun _ ↦ ⟨fun h ↦ _, fun h ↦ _⟩\n[GOAL]\ncase refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nab : Reaches f a b\nx✝ : σ\nh : x✝ ∈ eval f a\n⊢ x✝ ∈ eval f b\n[PROOFSTEP]\nhave ⟨ac, c0⟩ := mem_eval.1 h\n[GOAL]\ncase refine'_1\nσ : Type u_1\nf : σ → Option σ\na b : σ\nab : Reaches f a b\nx✝ : σ\nh : x✝ ∈ eval f a\nac : Reaches f a x✝\nc0 : f x✝ = none\n⊢ x✝ ∈ eval f b\n[PROOFSTEP]\nexact mem_eval.2 ⟨(or_iff_left_of_imp fun cb ↦ (eval_maximal h).1 cb ▸ ReflTransGen.refl).1 (reaches_total ab ac), c0⟩\n[GOAL]\ncase refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nab : Reaches f a b\nx✝ : σ\nh : x✝ ∈ eval f b\n⊢ x✝ ∈ eval f a\n[PROOFSTEP]\nhave ⟨bc, c0⟩ := mem_eval.1 h\n[GOAL]\ncase refine'_2\nσ : Type u_1\nf : σ → Option σ\na b : σ\nab : Reaches f a b\nx✝ : σ\nh : x✝ ∈ eval f b\nbc : Reaches f b x✝\nc0 : f x✝ = none\n⊢ x✝ ∈ eval f a\n[PROOFSTEP]\nexact mem_eval.2 ⟨ab.trans bc, c0⟩\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ : σ₁\nab : Reaches₁ f₁ a₁ b₁\n⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\ninduction' ab with c₁ ac c₁ d₁ _ cd IH\n[GOAL]\ncase single\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ : σ₁\nac : c₁ ∈ f₁ a₁\n⊢ ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nhave := H aa\n[GOAL]\ncase single\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ : σ₁\nac : c₁ ∈ f₁ a₁\nthis :\n  match f₁ a₁ with\n  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n  | none => f₂ a₂ = none\n⊢ ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nrwa [show f₁ a₁ = _ from ac] at this \n[GOAL]\ncase tail\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ d₁ : σ₁\na✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁\ncd : d₁ ∈ f₁ c₁\nIH : ∃ b₂, tr c₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nrcases IH with ⟨c₂, cc, ac₂⟩\n[GOAL]\ncase tail.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ d₁ : σ₁\na✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁\ncd : d₁ ∈ f₁ c₁\nc₂ : σ₂\ncc : tr c₁ c₂\nac₂ : Reaches₁ f₂ a₂ c₂\n⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nhave := H cc\n[GOAL]\ncase tail.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ d₁ : σ₁\na✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁\ncd : d₁ ∈ f₁ c₁\nc₂ : σ₂\ncc : tr c₁ c₂\nac₂ : Reaches₁ f₂ a₂ c₂\nthis :\n  match f₁ c₁ with\n  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n  | none => f₂ c₂ = none\n⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nrw [show f₁ c₁ = _ from cd] at this \n[GOAL]\ncase tail.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ d₁ : σ₁\na✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁\ncd : d₁ ∈ f₁ c₁\nc₂ : σ₂\ncc : tr c₁ c₂\nac₂ : Reaches₁ f₂ a₂ c₂\nthis :\n  match some d₁ with\n  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n  | none => f₂ c₂ = none\n⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nrcases this with ⟨d₂, dd, cd₂⟩\n[GOAL]\ncase tail.intro.intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ c₁ d₁ : σ₁\na✝ : TransGen (fun a b => b ∈ f₁ a) a₁ c₁\ncd : d₁ ∈ f₁ c₁\nc₂ : σ₂\ncc : tr c₁ c₂\nac₂ : Reaches₁ f₂ a₂ c₂\nd₂ : σ₂\ndd : tr d₁ d₂\ncd₂ : Reaches₁ f₂ c₂ d₂\n⊢ ∃ b₂, tr d₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n[PROOFSTEP]\nexact ⟨_, dd, ac₂.trans cd₂⟩\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ : σ₁\nab : Reaches f₁ a₁ b₁\n⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches f₂ a₂ b₂\n[PROOFSTEP]\nrcases reflTransGen_iff_eq_or_transGen.1 ab with (rfl | ab)\n[GOAL]\ncase inl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₂ : σ₂\nb₁ : σ₁\naa : tr b₁ a₂\nab : Reaches f₁ b₁ b₁\n⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches f₂ a₂ b₂\n[PROOFSTEP]\nexact ⟨_, aa, ReflTransGen.refl⟩\n[GOAL]\ncase inr\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ : σ₁\nab✝ : Reaches f₁ a₁ b₁\nab : TransGen (fun a b => b ∈ f₁ a) a₁ b₁\n⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches f₂ a₂ b₂\n[PROOFSTEP]\nhave ⟨b₂, bb, h⟩ := tr_reaches₁ H aa ab\n[GOAL]\ncase inr\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₁ : σ₁\nab✝ : Reaches f₁ a₁ b₁\nab : TransGen (fun a b => b ∈ f₁ a) a₁ b₁\nb₂ : σ₂\nbb : tr b₁ b₂\nh : Reaches₁ f₂ a₂ b₂\n⊢ ∃ b₂, tr b₁ b₂ ∧ Reaches f₂ a₂ b₂\n[PROOFSTEP]\nexact ⟨b₂, bb, h.to_reflTransGen⟩\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ : σ₂\nab : Reaches f₂ a₂ b₂\n⊢ ∃ c₁ c₂, Reaches f₂ b₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\ninduction' ab with c₂ d₂ _ cd IH\n[GOAL]\ncase refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ : σ₂\n⊢ ∃ c₁ c₂, Reaches f₂ a₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nexact ⟨_, _, ReflTransGen.refl, aa, ReflTransGen.refl⟩\n[GOAL]\ncase tail\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\nIH : ∃ c₁ c₂_1, Reaches f₂ c₂ c₂_1 ∧ tr c₁ c₂_1 ∧ Reaches f₁ a₁ c₁\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nrcases IH with ⟨e₁, e₂, ce, ee, ae⟩\n[GOAL]\ncase tail.intro.intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\ne₂ : σ₂\nce : Reaches f₂ c₂ e₂\nee : tr e₁ e₂\nae : Reaches f₁ a₁ e₁\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nrcases ReflTransGen.cases_head ce with (rfl | ⟨d', cd', de⟩)\n[GOAL]\ncase tail.intro.intro.intro.intro.inl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nhave := H ee\n[GOAL]\ncase tail.intro.intro.intro.intro.inl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\nthis :\n  match f₁ e₁ with\n  | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n  | none => f₂ c₂ = none\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nrevert this\n[GOAL]\ncase tail.intro.intro.intro.intro.inl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\n⊢ (match f₁ e₁ with\n    | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n    | none => f₂ c₂ = none) →\n    ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\ncases' eg : f₁ e₁ with g₁\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.none\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\neg : f₁ e₁ = none\n⊢ (match none with\n    | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n    | none => f₂ c₂ = none) →\n    ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nsimp only [Respects, and_imp, exists_imp]\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\ng₁ : σ₁\neg : f₁ e₁ = some g₁\n⊢ (match some g₁ with\n    | some b₁ => ∃ b₂, tr b₁ b₂ ∧ Reaches₁ f₂ c₂ b₂\n    | none => f₂ c₂ = none) →\n    ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nsimp only [Respects, and_imp, exists_imp]\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.none\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\neg : f₁ e₁ = none\n⊢ f₂ c₂ = none → ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nintro c0\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.none\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\neg : f₁ e₁ = none\nc0 : f₂ c₂ = none\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\ncases cd.symm.trans c0\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\ng₁ : σ₁\neg : f₁ e₁ = some g₁\n⊢ ∀ (x : σ₂), tr g₁ x → Reaches₁ f₂ c₂ x → ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nintro g₂ gg cg\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\ng₁ : σ₁\neg : f₁ e₁ = some g₁\ng₂ : σ₂\ngg : tr g₁ g₂\ncg : Reaches₁ f₂ c₂ g₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nrcases TransGen.head'_iff.1 cg with ⟨d', cd', dg⟩\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.some.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\ng₁ : σ₁\neg : f₁ e₁ = some g₁\ng₂ : σ₂\ngg : tr g₁ g₂\ncg : Reaches₁ f₂ c₂ g₂\nd' : σ₂\ncd' : d' ∈ f₂ c₂\ndg : ReflTransGen (fun a b => b ∈ f₂ a) d' g₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\ncases Option.mem_unique cd cd'\n[GOAL]\ncase tail.intro.intro.intro.intro.inl.some.intro.intro.refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\nae : Reaches f₁ a₁ e₁\nce : Reaches f₂ c₂ c₂\nee : tr e₁ c₂\ng₁ : σ₁\neg : f₁ e₁ = some g₁\ng₂ : σ₂\ngg : tr g₁ g₂\ncg : Reaches₁ f₂ c₂ g₂\ncd' : d₂ ∈ f₂ c₂\ndg : ReflTransGen (fun a b => b ∈ f₂ a) d₂ g₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nexact ⟨_, _, dg, gg, ae.tail eg⟩\n[GOAL]\ncase tail.intro.intro.intro.intro.inr.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\ne₂ : σ₂\nce : Reaches f₂ c₂ e₂\nee : tr e₁ e₂\nae : Reaches f₁ a₁ e₁\nd' : σ₂\ncd' : d' ∈ f₂ c₂\nde : ReflTransGen (fun a b => b ∈ f₂ a) d' e₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\ncases Option.mem_unique cd cd'\n[GOAL]\ncase tail.intro.intro.intro.intro.inr.intro.intro.refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nb₂ c₂ d₂ : σ₂\na✝ : ReflTransGen (fun a b => b ∈ f₂ a) a₂ c₂\ncd : d₂ ∈ f₂ c₂\ne₁ : σ₁\ne₂ : σ₂\nce : Reaches f₂ c₂ e₂\nee : tr e₁ e₂\nae : Reaches f₁ a₁ e₁\ncd' : d₂ ∈ f₂ c₂\nde : ReflTransGen (fun a b => b ∈ f₂ a) d₂ e₂\n⊢ ∃ c₁ c₂, Reaches f₂ d₂ c₂ ∧ tr c₁ c₂ ∧ Reaches f₁ a₁ c₁\n[PROOFSTEP]\nexact ⟨_, _, de, ee, ae⟩\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ b₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nab : b₁ ∈ eval f₁ a₁\n⊢ ∃ b₂, tr b₁ b₂ ∧ b₂ ∈ eval f₂ a₂\n[PROOFSTEP]\ncases' mem_eval.1 ab with ab b0\n[GOAL]\ncase intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ b₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₁ ∈ eval f₁ a₁\nab : Reaches f₁ a₁ b₁\nb0 : f₁ b₁ = none\n⊢ ∃ b₂, tr b₁ b₂ ∧ b₂ ∈ eval f₂ a₂\n[PROOFSTEP]\nrcases tr_reaches H aa ab with ⟨b₂, bb, ab⟩\n[GOAL]\ncase intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ b₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nab✝¹ : b₁ ∈ eval f₁ a₁\nab✝ : Reaches f₁ a₁ b₁\nb0 : f₁ b₁ = none\nb₂ : σ₂\nbb : tr b₁ b₂\nab : Reaches f₂ a₂ b₂\n⊢ ∃ b₂, tr b₁ b₂ ∧ b₂ ∈ eval f₂ a₂\n[PROOFSTEP]\nrefine' ⟨_, bb, mem_eval.2 ⟨ab, _⟩⟩\n[GOAL]\ncase intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ b₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nab✝¹ : b₁ ∈ eval f₁ a₁\nab✝ : Reaches f₁ a₁ b₁\nb0 : f₁ b₁ = none\nb₂ : σ₂\nbb : tr b₁ b₂\nab : Reaches f₂ a₂ b₂\n⊢ f₂ b₂ = none\n[PROOFSTEP]\nhave := H bb\n[GOAL]\ncase intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ b₁ : σ₁\na₂ : σ₂\naa : tr a₁ a₂\nab✝¹ : b₁ ∈ eval f₁ a₁\nab✝ : Reaches f₁ a₁ b₁\nb0 : f₁ b₁ = none\nb₂ : σ₂\nbb : tr b₁ b₂\nab : Reaches f₂ a₂ b₂\nthis :\n  match f₁ b₁ with\n  | some b₁ => ∃ b₂_1, tr b₁ b₂_1 ∧ Reaches₁ f₂ b₂ b₂_1\n  | none => f₂ b₂ = none\n⊢ f₂ b₂ = none\n[PROOFSTEP]\nrwa [b0] at this \n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab : b₂ ∈ eval f₂ a₂\n⊢ ∃ b₁, tr b₁ b₂ ∧ b₁ ∈ eval f₁ a₁\n[PROOFSTEP]\ncases' mem_eval.1 ab with ab b0\n[GOAL]\ncase intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\n⊢ ∃ b₁, tr b₁ b₂ ∧ b₁ ∈ eval f₁ a₁\n[PROOFSTEP]\nrcases tr_reaches_rev H aa ab with ⟨c₁, c₂, bc, cc, ac⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nc₂ : σ₂\nbc : Reaches f₂ b₂ c₂\ncc : tr c₁ c₂\nac : Reaches f₁ a₁ c₁\n⊢ ∃ b₁, tr b₁ b₂ ∧ b₁ ∈ eval f₁ a₁\n[PROOFSTEP]\ncases (reflTransGen_iff_eq (Option.eq_none_iff_forall_not_mem.1 b0)).1 bc\n[GOAL]\ncase intro.intro.intro.intro.intro.refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\n⊢ ∃ b₁, tr b₁ b₂ ∧ b₁ ∈ eval f₁ a₁\n[PROOFSTEP]\nrefine' ⟨_, cc, mem_eval.2 ⟨ac, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\n⊢ f₁ c₁ = none\n[PROOFSTEP]\nhave := H cc\n[GOAL]\ncase intro.intro.intro.intro.intro.refl\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nthis :\n  match f₁ c₁ with\n  | some b₁ => ∃ b₂_1, tr b₁ b₂_1 ∧ Reaches₁ f₂ b₂ b₂_1\n  | none => f₂ b₂ = none\n⊢ f₁ c₁ = none\n[PROOFSTEP]\ncases' hfc : f₁ c₁ with d₁\n[GOAL]\ncase intro.intro.intro.intro.intro.refl.none\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nthis :\n  match f₁ c₁ with\n  | some b₁ => ∃ b₂_1, tr b₁ b₂_1 ∧ Reaches₁ f₂ b₂ b₂_1\n  | none => f₂ b₂ = none\nhfc : f₁ c₁ = none\n⊢ none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.intro.intro.intro.refl.some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nthis :\n  match f₁ c₁ with\n  | some b₁ => ∃ b₂_1, tr b₁ b₂_1 ∧ Reaches₁ f₂ b₂ b₂_1\n  | none => f₂ b₂ = none\nd₁ : σ₁\nhfc : f₁ c₁ = some d₁\n⊢ some d₁ = none\n[PROOFSTEP]\nrw [hfc] at this \n[GOAL]\ncase intro.intro.intro.intro.intro.refl.some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nd₁ : σ₁\nthis :\n  match some d₁ with\n  | some b₁ => ∃ b₂_1, tr b₁ b₂_1 ∧ Reaches₁ f₂ b₂ b₂_1\n  | none => f₂ b₂ = none\nhfc : f₁ c₁ = some d₁\n⊢ some d₁ = none\n[PROOFSTEP]\nrcases this with ⟨d₂, _, bd⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refl.some.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nd₁ : σ₁\nhfc : f₁ c₁ = some d₁\nd₂ : σ₂\nleft✝ : tr d₁ d₂\nbd : Reaches₁ f₂ b₂ d₂\n⊢ some d₁ = none\n[PROOFSTEP]\nrcases TransGen.head'_iff.1 bd with ⟨e, h, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refl.some.intro.intro.intro.intro\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂ → Prop\nH : Respects f₁ f₂ tr\na₁ : σ₁\nb₂ a₂ : σ₂\naa : tr a₁ a₂\nab✝ : b₂ ∈ eval f₂ a₂\nab : Reaches f₂ a₂ b₂\nb0 : f₂ b₂ = none\nc₁ : σ₁\nac : Reaches f₁ a₁ c₁\nbc : Reaches f₂ b₂ b₂\ncc : tr c₁ b₂\nd₁ : σ₁\nhfc : f₁ c₁ = some d₁\nd₂ : σ₂\nleft✝ : tr d₁ d₂\nbd : Reaches₁ f₂ b₂ d₂\ne : σ₂\nh : e ∈ f₂ b₂\nright✝ : ReflTransGen (fun a b => b ∈ f₂ a) e d₂\n⊢ some d₁ = none\n[PROOFSTEP]\ncases b0.symm.trans h\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\na₂ b₂ : σ₂\nh : f₂ a₂ = f₂ b₂\n⊢ FRespects f₂ tr a₂ none ↔ FRespects f₂ tr b₂ none\n[PROOFSTEP]\nunfold FRespects\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\na₂ b₂ : σ₂\nh : f₂ a₂ = f₂ b₂\n⊢ (match none with\n    | some b₁ => Reaches₁ f₂ a₂ (tr b₁)\n    | none => f₂ a₂ = none) ↔\n    match none with\n    | some b₁ => Reaches₁ f₂ b₂ (tr b₁)\n    | none => f₂ b₂ = none\n[PROOFSTEP]\nrw [h]\n[GOAL]\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\na₁ : σ₁\n⊢ (∀ ⦃a₂ : σ₂⦄,\n      (fun a b => tr a = b) a₁ a₂ →\n        match f₁ a₁ with\n        | some b₁ => ∃ b₂, (fun a b => tr a = b) b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n        | none => f₂ a₂ = none) ↔\n    FRespects f₂ tr (tr a₁) (f₁ a₁)\n[PROOFSTEP]\ncases f₁ a₁\n[GOAL]\ncase none\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\na₁ : σ₁\n⊢ (∀ ⦃a₂ : σ₂⦄,\n      (fun a b => tr a = b) a₁ a₂ →\n        match none with\n        | some b₁ => ∃ b₂, (fun a b => tr a = b) b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n        | none => f₂ a₂ = none) ↔\n    FRespects f₂ tr (tr a₁) none\n[PROOFSTEP]\nsimp only [FRespects, Respects, exists_eq_left', forall_eq']\n[GOAL]\ncase some\nσ₁ : Type u_1\nσ₂ : Type u_2\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\na₁ val✝ : σ₁\n⊢ (∀ ⦃a₂ : σ₂⦄,\n      (fun a b => tr a = b) a₁ a₂ →\n        match some val✝ with\n        | some b₁ => ∃ b₂, (fun a b => tr a = b) b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂\n        | none => f₂ a₂ = none) ↔\n    FRespects f₂ tr (tr a₁) (some val✝)\n[PROOFSTEP]\nsimp only [FRespects, Respects, exists_eq_left', forall_eq']\n[GOAL]\nσ₁ σ₂ : Type u_1\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\nH : Respects f₁ f₂ fun a b => tr a = b\na₁ : σ₁\nb₂ : σ₂\nh : b₂ ∈ tr <$> eval f₁ a₁\n⊢ b₂ ∈ eval f₂ (tr a₁)\n[PROOFSTEP]\nrcases(Part.mem_map_iff _).1 h with ⟨b₁, ab, bb⟩\n[GOAL]\ncase intro.intro\nσ₁ σ₂ : Type u_1\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\nH : Respects f₁ f₂ fun a b => tr a = b\na₁ : σ₁\nb₂ : σ₂\nh : b₂ ∈ tr <$> eval f₁ a₁\nb₁ : σ₁\nab : b₁ ∈ eval f₁ a₁\nbb : tr b₁ = b₂\n⊢ b₂ ∈ eval f₂ (tr a₁)\n[PROOFSTEP]\nrcases tr_eval H rfl ab with ⟨_, rfl, h⟩\n[GOAL]\ncase intro.intro.intro.intro\nσ₁ σ₂ : Type u_1\nf₁ : σ₁ → Option σ₁\nf₂ : σ₂ → Option σ₂\ntr : σ₁ → σ₂\nH : Respects f₁ f₂ fun a b => tr a = b\na₁ : σ₁\nb₂ : σ₂\nh✝ : b₂ ∈ tr <$> eval f₁ a₁\nb₁ : σ₁\nab : b₁ ∈ eval f₁ a₁\nbb : tr b₁ = b₂\nh : tr b₁ ∈ eval f₂ (tr a₁)\n⊢ b₂ ∈ eval f₂ (tr a₁)\n[PROOFSTEP]\nrwa [bb] at h \n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\n⊢ Inhabited Machine₀\n[PROOFSTEP]\nunfold Machine\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\n⊢ Inhabited (Λ → Γ → Option (Λ × Stmt₀))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\nS : Set Λ\nss : Supports M S\n⊢ ∀ {c c' : Cfg₀}, c' ∈ step M c → c.q ∈ S → c'.q ∈ S\n[PROOFSTEP]\nintro ⟨q, T⟩ c' h₁ h₂\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\nS : Set Λ\nss : Supports M S\nq : Λ\nT : Tape Γ\nc' : Cfg₀\nh₁ : c' ∈ step M { q := q, Tape := T }\nh₂ : { q := q, Tape := T }.q ∈ S\n⊢ c'.q ∈ S\n[PROOFSTEP]\nrcases Option.map_eq_some'.1 h₁ with ⟨⟨q', a⟩, h, rfl⟩\n[GOAL]\ncase intro.mk.intro\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\nS : Set Λ\nss : Supports M S\nq : Λ\nT : Tape Γ\nh₂ : { q := q, Tape := T }.q ∈ S\nq' : Λ\na : Stmt₀\nh : M q T.head = some (q', a)\nh₁ :\n  (fun x =>\n        match x with\n        | (q', a) =>\n          { q := q',\n            Tape :=\n              match a with\n              | Stmt.move d => Tape.move d T\n              | Stmt.write a => Tape.write a T })\n      (q', a) ∈\n    step M { q := q, Tape := T }\n⊢ ((fun x =>\n          match x with\n          | (q', a) =>\n            { q := q',\n              Tape :=\n                match a with\n                | Stmt.move d => Tape.move d T\n                | Stmt.write a => Tape.write a T })\n        (q', a)).q ∈\n    S\n[PROOFSTEP]\nexact ss.2 h h₂\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\n⊢ Supports M Set.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\n⊢ default ∈ Set.univ\n[PROOFSTEP]\nintros\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\n⊢ ∀ {q : Λ} {a : Γ} {q' : Λ} {s : Stmt₀}, (q', s) ∈ M q a → q ∈ Set.univ → q' ∈ Set.univ\n[PROOFSTEP]\nintros\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\n⊢ default ∈ Set.univ\n[PROOFSTEP]\napply Set.mem_univ\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : Machine₀\nq✝ : Λ\na✝² : Γ\nq'✝ : Λ\ns✝ : Stmt₀\na✝¹ : (q'✝, s✝) ∈ M q✝ a✝²\na✝ : q✝ ∈ Set.univ\n⊢ q'✝ ∈ Set.univ\n[PROOFSTEP]\napply Set.mem_univ\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\n⊢ Option.map (Cfg.map f₁ g₁) (step M { q := q, Tape := T }) =\n    step (map M f₁ f₂ g₁ g₂) (Cfg.map f₁ g₁ { q := q, Tape := T })\n[PROOFSTEP]\nunfold step Machine.map Cfg.map\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\n⊢ Option.map\n      (fun x =>\n        match x with\n        | { q := q, Tape := T } => { q := g₁ q, Tape := Tape.map f₁ T })\n      (match { q := q, Tape := T } with\n      | { q := q, Tape := T } =>\n        Option.map\n          (fun x =>\n            match x with\n            | (q', a) =>\n              { q := q',\n                Tape :=\n                  match a with\n                  | Stmt.move d => Tape.move d T\n                  | Stmt.write a => Tape.write a T })\n          (M q T.head)) =\n    match\n      match { q := q, Tape := T } with\n      | { q := q, Tape := T } => { q := g₁ q, Tape := Tape.map f₁ T } with\n    | { q := q, Tape := T } =>\n      Option.map\n        (fun x =>\n          match x with\n          | (q', a) =>\n            { q := q',\n              Tape :=\n                match a with\n                | Stmt.move d => Tape.move d T\n                | Stmt.write a => Tape.write a T })\n        (match q, T.head with\n        | q, l => Option.map (Prod.map g₁ (Stmt.map f₁)) (M (g₂ q) (PointedMap.f f₂ l)))\n[PROOFSTEP]\nsimp only [Turing.Tape.map_fst, g₂₁ q h, f₂₁ _]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\n⊢ Option.map (fun x => { q := g₁ x.q, Tape := Tape.map f₁ x.Tape })\n      (Option.map\n        (fun x =>\n          { q := x.fst,\n            Tape :=\n              match x.snd with\n              | Stmt.move d => Tape.move d T\n              | Stmt.write a => Tape.write a T })\n        (M q T.head)) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | Stmt.move d => Tape.move d (Tape.map f₁ T)\n            | Stmt.write a => Tape.write a (Tape.map f₁ T) })\n      (Option.map (Prod.map g₁ (Stmt.map f₁)) (M q T.head))\n[PROOFSTEP]\nrcases M q T.1 with (_ | ⟨q', d | a⟩)\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\n⊢ Option.map (fun x => { q := g₁ x.q, Tape := Tape.map f₁ x.Tape })\n      (Option.map\n        (fun x =>\n          { q := x.fst,\n            Tape :=\n              match x.snd with\n              | Stmt.move d => Tape.move d T\n              | Stmt.write a => Tape.write a T })\n        none) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | Stmt.move d => Tape.move d (Tape.map f₁ T)\n            | Stmt.write a => Tape.write a (Tape.map f₁ T) })\n      (Option.map (Prod.map g₁ (Stmt.map f₁)) none)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.mk.move\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\nq' : Λ\nd : Dir\n⊢ Option.map (fun x => { q := g₁ x.q, Tape := Tape.map f₁ x.Tape })\n      (Option.map\n        (fun x =>\n          { q := x.fst,\n            Tape :=\n              match x.snd with\n              | Stmt.move d => Tape.move d T\n              | Stmt.write a => Tape.write a T })\n        (some (q', Stmt.move d))) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | Stmt.move d => Tape.move d (Tape.map f₁ T)\n            | Stmt.write a => Tape.write a (Tape.map f₁ T) })\n      (Option.map (Prod.map g₁ (Stmt.map f₁)) (some (q', Stmt.move d)))\n[PROOFSTEP]\nsimp only [step, Cfg.map, Option.map_some', Tape.map_move f₁]\n[GOAL]\ncase some.mk.move\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\nq' : Λ\nd : Dir\n⊢ some { q := g₁ q', Tape := Tape.move d (Tape.map f₁ T) } =\n    some\n      { q := (Prod.map g₁ (Stmt.map f₁) (q', Stmt.move d)).fst,\n        Tape :=\n          match (Prod.map g₁ (Stmt.map f₁) (q', Stmt.move d)).snd with\n          | Stmt.move d => Tape.move d (Tape.map f₁ T)\n          | Stmt.write a => Tape.write a (Tape.map f₁ T) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.mk.write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\nq' : Λ\na : Γ\n⊢ Option.map (fun x => { q := g₁ x.q, Tape := Tape.map f₁ x.Tape })\n      (Option.map\n        (fun x =>\n          { q := x.fst,\n            Tape :=\n              match x.snd with\n              | Stmt.move d => Tape.move d T\n              | Stmt.write a => Tape.write a T })\n        (some (q', Stmt.write a))) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | Stmt.move d => Tape.move d (Tape.map f₁ T)\n            | Stmt.write a => Tape.write a (Tape.map f₁ T) })\n      (Option.map (Prod.map g₁ (Stmt.map f₁)) (some (q', Stmt.write a)))\n[PROOFSTEP]\nsimp only [step, Cfg.map, Option.map_some', Tape.map_write]\n[GOAL]\ncase some.mk.write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁ : Λ → Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (g₁ q) = q\nq : Λ\nT : Tape Γ\nh : { q := q, Tape := T }.q ∈ S\nq' : Λ\na : Γ\n⊢ some { q := g₁ q', Tape := Tape.write (PointedMap.f f₁ a) (Tape.map f₁ T) } =\n    some\n      { q := (Prod.map g₁ (Stmt.map f₁) (q', Stmt.write a)).fst,\n        Tape :=\n          match (Prod.map g₁ (Stmt.map f₁) (q', Stmt.write a)).snd with\n          | Stmt.move d => Tape.move d (Tape.map f₁ T)\n          | Stmt.write a => Tape.write a (Tape.map f₁ T) }\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\n⊢ Respects (step M) (step (map M f₁ f₂ g₁.f g₂)) fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b\n[PROOFSTEP]\nintro c _ ⟨cs, rfl⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\n⊢ match step M c with\n  | some b₁ =>\n    ∃ b₂,\n      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂\n  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none\n[PROOFSTEP]\ncases e : step M c\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\ne : step M c = none\n⊢ match none with\n  | some b₁ =>\n    ∃ b₂,\n      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂\n  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none\n[PROOFSTEP]\nrw [← M.map_step f₁ f₂ g₁ g₂ f₂₁ g₂₁ _ cs, e]\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\ne : step M c = none\n⊢ match none with\n  | some b₁ =>\n    ∃ b₂,\n      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂\n  | none => Option.map (Cfg.map f₁ g₁.f) none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\nval✝ : Cfg Γ Λ\ne : step M c = some val✝\n⊢ match some val✝ with\n  | some b₁ =>\n    ∃ b₂,\n      (fun a b => a.q ∈ S ∧ Cfg.map f₁ g₁.f a = b) b₁ b₂ ∧ Reaches₁ (step (map M f₁ f₂ g₁.f g₂)) (Cfg.map f₁ g₁.f c) b₂\n  | none => step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c) = none\n[PROOFSTEP]\nrefine' ⟨_, ⟨step_supports M ss e cs, rfl⟩, TransGen.single _⟩\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\nval✝ : Cfg Γ Λ\ne : step M c = some val✝\n⊢ Cfg.map f₁ g₁.f val✝ ∈ step (map M f₁ f₂ g₁.f g₂) (Cfg.map f₁ g₁.f c)\n[PROOFSTEP]\nrw [← M.map_step f₁ f₂ g₁ g₂ f₂₁ g₂₁ _ cs, e]\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΓ' : Type u_2\ninst✝² : Inhabited Γ'\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nΛ' : Type u_4\ninst✝ : Inhabited Λ'\nM : Machine Γ Λ\nf₁ : PointedMap Γ Γ'\nf₂ : PointedMap Γ' Γ\ng₁✝ : Λ → Λ'\ng₂✝ : Λ' → Λ\ng₁ : PointedMap Λ Λ'\ng₂ : Λ' → Λ\nS : Set Λ\nss : Supports M S\nf₂₁ : Function.RightInverse f₁.f f₂.f\ng₂₁ : ∀ (q : Λ), q ∈ S → g₂ (PointedMap.f g₁ q) = q\nc : Cfg Γ Λ\na₂✝ : Cfg Γ' Λ'\ncs : c.q ∈ S\nval✝ : Cfg Γ Λ\ne : step M c = some val✝\n⊢ Cfg.map f₁ g₁.f val✝ ∈ Option.map (Cfg.map f₁ g₁.f) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq : Stmt₁\n⊢ q ∈ stmts₁ q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\na✝¹ : Dir\na✝ : Stmt₁\n⊢ move a✝¹ a✝ ∈ stmts₁ (move a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\n⊢ write a✝¹ a✝ ∈ stmts₁ (write a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\n⊢ load a✝¹ a✝ ∈ stmts₁ (load a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\n⊢ branch a✝² a✝¹ a✝ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\na✝ : Γ → σ → Λ\n⊢ goto a✝ ∈ stmts₁ (goto a✝)\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\n⊢ halt ∈ stmts₁ halt\n[PROOFSTEP]\nsimp only [stmts₁, Finset.mem_insert_self, Finset.mem_singleton_self]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\n⊢ q₁ ∈ stmts₁ q₂ → stmts₁ q₁ ⊆ stmts₁ q₂\n[PROOFSTEP]\nintro h₁₂ q₀ h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\n⊢ q₀ ∈ stmts₁ q₂\n[PROOFSTEP]\ninduction' q₂ with _ q IH _ q IH _ q IH\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (move a✝ q)\n⊢ q₀ ∈ stmts₁ (move a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (write a✝ q)\n⊢ q₀ ∈ stmts₁ (write a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (load a✝ q)\n⊢ q₀ ∈ stmts₁ (load a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n⊢ q₀ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ ∈ stmts₁ (goto a✝)\n⊢ q₀ ∈ stmts₁ (goto a✝)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ ∈ stmts₁ halt\n⊢ q₀ ∈ stmts₁ halt\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (move a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (write a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (load a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ ∈ {goto a✝}\n⊢ q₀ ∈ {goto a✝}\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ ∈ {halt}\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h₁₂ \n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = move a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\niterate 3 \n  rcases h₁₂ with (rfl | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = move a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase move.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Dir\nq : Stmt₁\nh₁₂ : move a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (move a✝ q)\nIH : move a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase move.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Dir\nq : Stmt₁\nh₁₂ : move a✝ q ∈ stmts₁ q₂\nIH : move a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (move a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase move.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (move a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase write.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nh₁₂ : write a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (write a✝ q)\nIH : write a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase write.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nh₁₂ : write a✝ q ∈ stmts₁ q₂\nIH : write a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (write a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase write.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (write a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase load.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Γ → σ → σ\nq : Stmt₁\nh₁₂ : load a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (load a✝ q)\nIH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase load.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\na✝ : Γ → σ → σ\nq : Stmt₁\nh₁₂ : load a✝ q ∈ stmts₁ q₂\nIH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (load a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase load.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  rcases h₁₂ with (rfl | h₁₂ | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_left _ <| IH₁ h₁₂)\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_right _ <| IH₂ h₁₂)\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁✝ q₂✝ : Stmt₁\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ = branch p q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  rcases h₁₂ with (rfl | h₁₂ | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_left _ <| IH₁ h₁₂)\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_right _ <| IH₂ h₁₂)\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁✝ q₂✝ : Stmt₁\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ = branch p q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂ | h₁₂)\n[GOAL]\ncase inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂✝ q₀ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nh₁₂ : branch p q₁ q₂ ∈ stmts₁ q₂✝\nh₀₁ : q₀ ∈ stmts₁ (branch p q₁ q₂)\nIH₁ : branch p q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : branch p q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂✝ q₀ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nh₁₂ : branch p q₁ q₂ ∈ stmts₁ q₂✝\nIH₁ : branch p q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : branch p q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase inr.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁✝ q₂✝ : Stmt₁\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ ∈ stmts₁ q₁\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_left _ <| IH₁ h₁₂)\n[GOAL]\ncase inr.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁✝ q₂✝ : Stmt₁\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch p q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_right _ <| IH₂ h₁₂)\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : Γ → σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase goto l => subst h₁₂; exact h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nl : Γ → σ → Λ\nh₁₂ : q₁ = goto l\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\ncase goto l => subst h₁₂; exact h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nl : Γ → σ → Λ\nh₁₂ : q₁ = goto l\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\nsubst h₁₂\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\nl : Γ → σ → Λ\nh₁₂ : goto l ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (goto l)\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase halt => subst h₁₂; exact h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase halt => subst h₁₂; exact h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₁ q₂ : Stmt₁\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₁\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nsubst h₁₂\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nq₂ q₀ : Stmt₁\nh₁₂ : halt ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh : q₁ ∈ stmts₁ q₂\nhs : SupportsStmt S q₂\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ninduction' q₂ with _ q IH _ q IH _ q IH\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (move a✝ q)\nhs : SupportsStmt S (move a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (write a✝ q)\nhs : SupportsStmt S (write a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (load a✝ q)\nhs : SupportsStmt S (load a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (branch a✝² a✝¹ a✝)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nh : q₁ ∈ stmts₁ (goto a✝)\nhs : SupportsStmt S (goto a✝)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nh : q₁ ∈ stmts₁ halt\nhs : SupportsStmt S halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = move a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\niterate 3 rcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = move a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = move a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase move.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂ : Stmt₁\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nhs : SupportsStmt S q\nh : move a✝ q ∈ stmts₁ q₂\nIH : move a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (move a✝ q)\n⊢ SupportsStmt S (move a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase move.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Dir\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = write a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase write.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂ : Stmt₁\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nhs : SupportsStmt S q\nh : write a✝ q ∈ stmts₁ q₂\nIH : write a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (write a✝ q)\n⊢ SupportsStmt S (write a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase write.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase load.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂ : Stmt₁\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nhs : SupportsStmt S q\nh : load a✝ q ∈ stmts₁ q₂\nIH : load a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (load a✝ q)\n⊢ SupportsStmt S (load a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase load.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ => rcases h with (rfl | h | h); exacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₁\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ = branch p q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ => rcases h with (rfl | h | h); exacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₁\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ = branch p q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\nrcases h with (rfl | h | h)\n[GOAL]\ncase inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂✝ : Stmt₁\nhs✝ : SupportsStmt S q₂✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : branch p q₁ q₂ ∈ stmts₁ q₂✝\nIH₁ : branch p q₁ q₂ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S (branch p q₁ q₂)\nIH₂ : branch p q₁ q₂ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S (branch p q₁ q₂)\n⊢ SupportsStmt S (branch p q₁ q₂)\ncase inr.inl\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₁\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ ∈ stmts₁ q₁\n⊢ SupportsStmt S q₁✝\ncase inr.inr\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₁\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\nexacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), a✝ a v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase goto l => subst h; exact hs\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nl : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), l a v ∈ S\nh : q₁ = goto l\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase goto l => subst h; exact hs\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nl : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), l a v ∈ S\nh : q₁ = goto l\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsubst h\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂ : Stmt₁\nhs✝ : SupportsStmt S q₂\nl : Γ → σ → Λ\nhs : ∀ (a : Γ) (v : σ), l a v ∈ S\nh : goto l ∈ stmts₁ q₂\n⊢ SupportsStmt S (goto l)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase halt => subst h; trivial\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase halt => subst h; trivial\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsubst h\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nS : Finset Λ\nq₂ : Stmt₁\nhs✝ : SupportsStmt S q₂\nhs : True\nh : halt ∈ stmts₁ q₂\n⊢ SupportsStmt S halt\n[PROOFSTEP]\ntrivial\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nM : Λ → Stmt₁\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh₁ : q₁ ∈ stmts₁ q₂\n⊢ some q₂ ∈ stmts M S → some q₁ ∈ stmts M S\n[PROOFSTEP]\nsimp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq, forall_eq', exists_imp,\n  and_imp]\n[GOAL]\nΓ : Type u_1\ninst✝ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\nM : Λ → Stmt₁\nS : Finset Λ\nq₁ q₂ : Stmt₁\nh₁ : q₁ ∈ stmts₁ q₂\n⊢ ∀ (x : Λ), x ∈ S → q₂ ∈ stmts₁ (M x) → ∃ a, a ∈ S ∧ q₁ ∈ stmts₁ (M a)\n[PROOFSTEP]\nexact fun l ls h₂ ↦ ⟨_, ls, stmts₁_trans h₂ h₁⟩\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nq : Stmt₁\nss : Supports M S\n⊢ some q ∈ stmts M S → SupportsStmt S q\n[PROOFSTEP]\nsimp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq, forall_eq', exists_imp,\n  and_imp]\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nq : Stmt₁\nss : Supports M S\n⊢ ∀ (x : Λ), x ∈ S → q ∈ stmts₁ (M x) → SupportsStmt S q\n[PROOFSTEP]\nexact fun l ls h ↦ stmts₁_supportsStmt_mono h (ss.2 _ ls)\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : Tape Γ\nc' : Cfg₁\nh₁ : c' ∈ step M { l := some l₁, var := v, Tape := T }\nh₂ : { l := some l₁, var := v, Tape := T }.l ∈ ↑Finset.insertNone S\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nreplace h₂ := ss.2 _ (Finset.some_mem_insertNone.1 h₂)\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : Tape Γ\nc' : Cfg₁\nh₁ : c' ∈ step M { l := some l₁, var := v, Tape := T }\nh₂ : SupportsStmt S (M l₁)\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nsimp only [step, Option.mem_def, Option.some.injEq] at h₁ \n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : Tape Γ\nc' : Cfg₁\nh₂ : SupportsStmt S (M l₁)\nh₁ : stepAux (M l₁) v T = c'\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nsubst c'\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : Tape Γ\nh₂ : SupportsStmt S (M l₁)\n⊢ (stepAux (M l₁) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nrevert h₂\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (M l₁) → (stepAux (M l₁) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ninduction' M l₁ with _ q IH _ q IH _ q IH generalizing v T\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Dir\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (move a✝ q) → (stepAux (move a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (write a✝ q) → (stepAux (write a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (load a✝ q) → (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (branch a✝² a✝¹ a✝) → (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S (goto a✝) → (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\n⊢ SupportsStmt S halt → (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Dir\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (move a✝ q)\n⊢ (stepAux (move a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase write\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (write a✝ q)\n⊢ (stepAux (write a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\niterate 3 exact IH _ _ hs\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Dir\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (move a✝ q)\n⊢ (stepAux (move a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase write\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (write a✝ q)\n⊢ (stepAux (write a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (write a✝ q)\n⊢ (stepAux (write a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase branch p q₁' q₂' IH₁ IH₂ =>\n  unfold stepAux; cases p T.1 v\n  · exact IH₂ _ _ hs.2\n  · exact IH₁ _ _ hs.1\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\np : Γ → σ → Bool\nq₁' q₂' : Stmt₁\nIH₁ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (stepAux (branch p q₁' q₂') v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase branch p q₁' q₂' IH₁ IH₂ =>\n  unfold stepAux; cases p T.1 v\n  · exact IH₂ _ _ hs.2\n  · exact IH₁ _ _ hs.1\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\np : Γ → σ → Bool\nq₁' q₂' : Stmt₁\nIH₁ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (stepAux (branch p q₁' q₂') v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nunfold stepAux\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\np : Γ → σ → Bool\nq₁' q₂' : Stmt₁\nIH₁ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif p T.head v then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncases p T.1 v\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\np : Γ → σ → Bool\nq₁' q₂' : Stmt₁\nIH₁ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif false then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH₂ _ _ hs.2\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\np : Γ → σ → Bool\nq₁' q₂' : Stmt₁\nIH₁ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : Tape Γ), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif true then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH₁ _ _ hs.1\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase goto => exact Finset.some_mem_insertNone.2 (hs _ _)\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase goto => exact Finset.some_mem_insertNone.2 (hs _ _)\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact Finset.some_mem_insertNone.2 (hs _ _)\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase halt => apply Multiset.mem_cons_self\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase halt => apply Multiset.mem_cons_self\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\nσ : Type u_3\ninst✝ : Inhabited Λ\nM : Λ → Stmt₁\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : Tape Γ\nv : σ\nT : Tape Γ\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\napply Multiset.mem_cons_self\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nl₁ : Option Λ\nv : σ\nT : Tape Γ\n⊢ FRespects (TM0.step (tr M)) (fun c₁ => trCfg M c₁) (trCfg M { l := l₁, var := v, Tape := T })\n    (TM1.step M { l := l₁, var := v, Tape := T })\n[PROOFSTEP]\ncases' l₁ with l₁\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv : σ\nT : Tape Γ\n⊢ FRespects (TM0.step (tr M)) (fun c₁ => trCfg M c₁) (trCfg M { l := none, var := v, Tape := T })\n    (TM1.step M { l := none, var := v, Tape := T })\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv : σ\nT : Tape Γ\nl₁ : Λ\n⊢ FRespects (TM0.step (tr M)) (fun c₁ => trCfg M c₁) (trCfg M { l := some l₁, var := v, Tape := T })\n    (TM1.step M { l := some l₁, var := v, Tape := T })\n[PROOFSTEP]\nsimp only [trCfg, TM1.step, FRespects, Option.map]\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv : σ\nT : Tape Γ\nl₁ : Λ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (M l₁), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (M l₁) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (M l₁) v T).var),\n      Tape := (TM1.stepAux (M l₁) v T).Tape }\n[PROOFSTEP]\ninduction' M l₁ with _ q IH _ q IH _ q IH generalizing v T\n[GOAL]\ncase some.move\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Dir\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.move a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.move a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.move a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.move a✝ q) v T).Tape }\ncase some.write\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.write a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.write a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.write a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.write a✝ q) v T).Tape }\ncase some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.load a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.load a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.load a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.load a✝ q) v T).Tape }\ncase some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝¹, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝¹ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝¹ v T).var),\n        Tape := (TM1.stepAux a✝¹ v T).Tape }\na_ih✝ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝ v T).var),\n        Tape := (TM1.stepAux a✝ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch a✝² a✝¹ a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).Tape }\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\ncase move d q IH => exact TransGen.head rfl (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nd : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Dir\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.move IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).Tape }\n[PROOFSTEP]\ncase move d q IH => exact TransGen.head rfl (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nd : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Dir\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.move IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.move IH✝ q) v T).Tape }\n[PROOFSTEP]\nexact TransGen.head rfl (IH _ _)\n[GOAL]\ncase some.write\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.write a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.write a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.write a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.write a✝ q) v T).Tape }\ncase some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.load a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.load a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.load a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.load a✝ q) v T).Tape }\ncase some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝¹, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝¹ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝¹ v T).var),\n        Tape := (TM1.stepAux a✝¹ v T).Tape }\na_ih✝ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝ v T).var),\n        Tape := (TM1.stepAux a✝ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch a✝² a✝¹ a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).Tape }\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\ncase write a q IH => exact TransGen.head rfl (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\na : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.write IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).Tape }\n[PROOFSTEP]\ncase write a q IH => exact TransGen.head rfl (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\na : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.write IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.write IH✝ q) v T).Tape }\n[PROOFSTEP]\nexact TransGen.head rfl (IH _ _)\n[GOAL]\ncase some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.load a✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.load a✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.load a✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.load a✝ q) v T).Tape }\ncase some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝¹, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝¹ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝¹ v T).var),\n        Tape := (TM1.stepAux a✝¹ v T).Tape }\na_ih✝ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝ v T).var),\n        Tape := (TM1.stepAux a✝ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch a✝² a✝¹ a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).Tape }\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\ncase load a q IH => exact (reaches₁_eq (by rfl)).2 (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\na : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.load IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).Tape }\n[PROOFSTEP]\ncase load a q IH => exact (reaches₁_eq (by rfl)).2 (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\na : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.load IH✝ q), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.load IH✝ q) v T).Tape }\n[PROOFSTEP]\nexact (reaches₁_eq (by rfl)).2 (IH _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\na : σ\nq✝ : Tape Γ\nl₁ : Λ\nIH✝ : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q v T).var),\n        Tape := (TM1.stepAux q v T).Tape }\nv : σ\nT : Tape Γ\n⊢ TM0.step (tr M) { q := (some (TM1.Stmt.load IH✝ q), v), Tape := T } =\n    TM0.step (tr M) { q := (some q, IH✝ T.head v), Tape := T }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝¹, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝¹ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝¹ v T).var),\n        Tape := (TM1.stepAux a✝¹ v T).Tape }\na_ih✝ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some a✝, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux a✝ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux a✝ v T).var),\n        Tape := (TM1.stepAux a✝ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch a✝² a✝¹ a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch a✝² a✝¹ a✝) v T).Tape }\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  unfold TM1.stepAux; cases e : p T.1 v\n  · exact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₂ _ _)\n  · exact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₁ _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).Tape }\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  unfold TM1.stepAux; cases e : p T.1 v\n  · exact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₂ _ _)\n  · exact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₁ _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.branch p q₁ q₂) v T).Tape }\n[PROOFSTEP]\nunfold TM1.stepAux\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T }\n    {\n      q :=\n        (match (bif p T.head v then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).l with\n          | some x => some (M x)\n          | none => none,\n          (bif p T.head v then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).var),\n      Tape := (bif p T.head v then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).Tape }\n[PROOFSTEP]\ncases e : p T.1 v\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = false\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T }\n    {\n      q :=\n        (match (bif false then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).l with\n          | some x => some (M x)\n          | none => none,\n          (bif false then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).var),\n      Tape := (bif false then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).Tape }\n[PROOFSTEP]\nexact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₂ _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = false\n⊢ TM0.step (tr M) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T } =\n    TM0.step (tr M) { q := (some q₂, v), Tape := T }\n[PROOFSTEP]\nsimp only [TM0.step, tr, trAux, e]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = false\n⊢ Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | move d => Tape.move d T\n            | write a => Tape.write a T })\n      (some (bif false then trAux M T.head q₁ v else trAux M T.head q₂ v)) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | move d => Tape.move d T\n            | write a => Tape.write a T })\n      (some (trAux M T.head q₂ v))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = true\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T }\n    {\n      q :=\n        (match (bif true then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).l with\n          | some x => some (M x)\n          | none => none,\n          (bif true then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).var),\n      Tape := (bif true then TM1.stepAux q₁ v T else TM1.stepAux q₂ v T).Tape }\n[PROOFSTEP]\nexact (reaches₁_eq (by simp only [TM0.step, tr, trAux, e]; rfl)).2 (IH₁ _ _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = true\n⊢ TM0.step (tr M) { q := (some (TM1.Stmt.branch p q₁ q₂), v), Tape := T } =\n    TM0.step (tr M) { q := (some q₁, v), Tape := T }\n[PROOFSTEP]\nsimp only [TM0.step, tr, trAux, e]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₁, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₁ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₁ v T).var),\n        Tape := (TM1.stepAux q₁ v T).Tape }\nIH₂ :\n  ∀ (v : σ) (T : Tape Γ),\n    Reaches₁ (TM0.step (tr M)) { q := (some q₂, v), Tape := T }\n      {\n        q :=\n          (match (TM1.stepAux q₂ v T).l with\n            | some x => some (M x)\n            | none => none,\n            (TM1.stepAux q₂ v T).var),\n        Tape := (TM1.stepAux q₂ v T).Tape }\nv : σ\nT : Tape Γ\ne : p T.head v = true\n⊢ Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | move d => Tape.move d T\n            | write a => Tape.write a T })\n      (some (bif true then trAux M T.head q₁ v else trAux M T.head q₂ v)) =\n    Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | move d => Tape.move d T\n            | write a => Tape.write a T })\n      (some (trAux M T.head q₁ v))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\niterate 2 exact TransGen.single (congr_arg some (congr (congr_arg TM0.Cfg.mk rfl) (Tape.write_self T)))\n[GOAL]\ncase some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\na✝ : Γ → σ → Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some (TM1.Stmt.goto a✝), v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux (TM1.Stmt.goto a✝) v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux (TM1.Stmt.goto a✝) v T).var),\n      Tape := (TM1.stepAux (TM1.Stmt.goto a✝) v T).Tape }\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\nexact TransGen.single (congr_arg some (congr (congr_arg TM0.Cfg.mk rfl) (Tape.write_self T)))\n[GOAL]\ncase some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nx✝ : Cfg₁\nv✝ : σ\nT✝ : Tape Γ\nl₁ : Λ\nv : σ\nT : Tape Γ\n⊢ Reaches₁ (TM0.step (tr M)) { q := (some TM1.Stmt.halt, v), Tape := T }\n    {\n      q :=\n        (match (TM1.stepAux TM1.Stmt.halt v T).l with\n          | some x => some (M x)\n          | none => none,\n          (TM1.stepAux TM1.Stmt.halt v T).var),\n      Tape := (TM1.stepAux TM1.Stmt.halt v T).Tape }\n[PROOFSTEP]\nexact TransGen.single (congr_arg some (congr (congr_arg TM0.Cfg.mk rfl) (Tape.write_self T)))\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nl : List Γ\n⊢ Part.map (fun c => Tape.right₀ c.Tape)\n      ((fun a => trCfg M a) <$> eval (TM1.step M) { l := some default, var := default, Tape := Tape.mk₁ l }) =\n    TM1.eval M l\n[PROOFSTEP]\nrw [Part.map_eq_map, Part.map_map, TM1.eval]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nM : Λ → Stmt₁\nl : List Γ\n⊢ Part.map ((fun c => Tape.right₀ c.Tape) ∘ fun a => trCfg M a)\n      (eval (TM1.step M) { l := some default, var := default, Tape := Tape.mk₁ l }) =\n    Part.map (fun c => Tape.right₀ c.Tape) (eval (TM1.step M) (TM1.init l))\n[PROOFSTEP]\ncongr with ⟨⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ TM0.Supports (tr M) ↑(trStmts M S)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ default ∈ ↑(trStmts M S)\n[PROOFSTEP]\napply Finset.mem_product.2\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ default.fst ∈ TM1.stmts M S ∧ default.snd ∈ Finset.univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left.left\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ default.fst ∈ TM1.stmts M S\n[PROOFSTEP]\nsimp only [default, TM1.stmts, Finset.mem_insertNone, Option.mem_def, Option.some_inj, forall_eq', Finset.mem_biUnion]\n[GOAL]\ncase left.left\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ ∃ a, a ∈ S ∧ M default ∈ TM1.stmts₁ (M a)\n[PROOFSTEP]\nexact ⟨_, ss.1, TM1.stmts₁_self⟩\n[GOAL]\ncase left.right\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ default.snd ∈ Finset.univ\n[PROOFSTEP]\napply Finset.mem_univ\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\n⊢ ∀ {q : Λ'₁₀} {a : Γ} {q' : Λ'₁₀} {s : Stmt₀}, (q', s) ∈ tr M q a → q ∈ ↑(trStmts M S) → q' ∈ ↑(trStmts M S)\n[PROOFSTEP]\nintro q a q' s h₁ h₂\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\nq : Λ'₁₀\na : Γ\nq' : Λ'₁₀\ns : Stmt₀\nh₁ : (q', s) ∈ tr M q a\nh₂ : q ∈ ↑(trStmts M S)\n⊢ q' ∈ ↑(trStmts M S)\n[PROOFSTEP]\nrcases q with ⟨_ | q, v⟩\n[GOAL]\ncase right.mk.none\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nq' : Λ'₁₀\ns : Stmt₀\nv : σ\nh₁ : (q', s) ∈ tr M (none, v) a\nh₂ : (none, v) ∈ ↑(trStmts M S)\n⊢ q' ∈ ↑(trStmts M S)\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase right.mk.some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nq' : Λ'₁₀\ns : Stmt₀\nv : σ\nq : Stmt₁\nh₁ : (q', s) ∈ tr M (some q, v) a\nh₂ : (some q, v) ∈ ↑(trStmts M S)\n⊢ q' ∈ ↑(trStmts M S)\n[PROOFSTEP]\ncases' q' with q' v'\n[GOAL]\ncase right.mk.some.mk\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nh₂ : (some q, v) ∈ ↑(trStmts M S)\nq' : Option Stmt₁\nv' : σ\nh₁ : ((q', v'), s) ∈ tr M (some q, v) a\n⊢ (q', v') ∈ ↑(trStmts M S)\n[PROOFSTEP]\nsimp only [trStmts, Finset.mem_coe] at h₂ ⊢\n[GOAL]\ncase right.mk.some.mk\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nq' : Option Stmt₁\nv' : σ\nh₁ : ((q', v'), s) ∈ tr M (some q, v) a\nh₂ : (some q, v) ∈ TM1.stmts M S ×ˢ Finset.univ\n⊢ (q', v') ∈ TM1.stmts M S ×ˢ Finset.univ\n[PROOFSTEP]\nrw [Finset.mem_product] at h₂ ⊢\n[GOAL]\ncase right.mk.some.mk\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nq' : Option Stmt₁\nv' : σ\nh₁ : ((q', v'), s) ∈ tr M (some q, v) a\nh₂ : (some q, v).fst ∈ TM1.stmts M S ∧ (some q, v).snd ∈ Finset.univ\n⊢ (q', v').fst ∈ TM1.stmts M S ∧ (q', v').snd ∈ Finset.univ\n[PROOFSTEP]\nsimp only [Finset.mem_univ, and_true_iff] at h₂ ⊢\n[GOAL]\ncase right.mk.some.mk\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nq' : Option Stmt₁\nv' : σ\nh₁ : ((q', v'), s) ∈ tr M (some q, v) a\nh₂ : some q ∈ TM1.stmts M S\n⊢ q' ∈ TM1.stmts M S\n[PROOFSTEP]\ncases q'\n[GOAL]\ncase right.mk.some.mk.none\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nv' : σ\nh₂ : some q ∈ TM1.stmts M S\nh₁ : ((none, v'), s) ∈ tr M (some q, v) a\n⊢ none ∈ TM1.stmts M S\n[PROOFSTEP]\nexact Multiset.mem_cons_self _ _\n[GOAL]\ncase right.mk.some.mk.some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nv' : σ\nh₂ : some q ∈ TM1.stmts M S\nval✝ : Stmt₁\nh₁ : ((some val✝, v'), s) ∈ tr M (some q, v) a\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nsimp only [tr, Option.mem_def] at h₁ \n[GOAL]\ncase right.mk.some.mk.some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nv' : σ\nh₂ : some q ∈ TM1.stmts M S\nval✝ : Stmt₁\nh₁ : some (trAux M a q v) = some ((some val✝, v'), s)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nhave := TM1.stmts_supportsStmt ss h₂\n[GOAL]\ncase right.mk.some.mk.some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nv' : σ\nh₂ : some q ∈ TM1.stmts M S\nval✝ : Stmt₁\nh₁ : some (trAux M a q v) = some ((some val✝, v'), s)\nthis : TM1.SupportsStmt S q\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrevert this\n[GOAL]\ncase right.mk.some.mk.some\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv : σ\nq : Stmt₁\nv' : σ\nh₂ : some q ∈ TM1.stmts M S\nval✝ : Stmt₁\nh₁ : some (trAux M a q v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S q → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ninduction q generalizing v\n[GOAL]\ncase right.mk.some.mk.some.move\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Dir\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.move a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.move a✝¹ a✝) v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S (TM1.Stmt.move a✝¹ a✝) → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.write a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.write a✝¹ a✝) v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S (TM1.Stmt.write a✝¹ a✝) → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load a✝¹ a✝) v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S (TM1.Stmt.load a✝¹ a✝) → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ),\n    some a✝¹ ∈ TM1.stmts M S →\n      some (trAux M a a✝¹ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝¹ → some val✝ ∈ TM1.stmts M S\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch a✝² a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch a✝² a✝¹ a✝) v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S (TM1.Stmt.branch a✝² a✝¹ a✝) → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S (TM1.Stmt.goto a✝) → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\n⊢ TM1.SupportsStmt S TM1.Stmt.halt → some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase right.mk.some.mk.some.move\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Dir\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.move a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.move a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.write a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.write a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ),\n    some a✝¹ ∈ TM1.stmts M S →\n      some (trAux M a a✝¹ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝¹ → some val✝ ∈ TM1.stmts M S\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch a✝² a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch a✝² a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch a✝² a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase move d q =>\n  cases h₁; refine' TM1.stmts_trans _ h₂\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Dir\nd : Stmt₁\nq :\n  ∀ (v : σ),\n    some d ∈ TM1.stmts M S →\n      some (trAux M a d v) = some ((some val✝, v'), s) → TM1.SupportsStmt S d → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.move a✝ d) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.move a✝ d) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝ d)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase move d q =>\n  cases h₁; refine' TM1.stmts_trans _ h₂\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Dir\nd : Stmt₁\nq :\n  ∀ (v : σ),\n    some d ∈ TM1.stmts M S →\n      some (trAux M a d v) = some ((some val✝, v'), s) → TM1.SupportsStmt S d → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.move a✝ d) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.move a✝ d) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝ d)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Dir\nh₂ : some (TM1.Stmt.move a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), move a✝) → TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrefine' TM1.stmts_trans _ h₂\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Dir\nh₂ : some (TM1.Stmt.move a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), move a✝) → TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ val✝ ∈ TM1.stmts₁ (TM1.Stmt.move a✝ val✝)\n[PROOFSTEP]\nunfold TM1.stmts₁\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Dir\nh₂ : some (TM1.Stmt.move a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.move a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), move a✝) → TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ val✝ ∈ insert (TM1.Stmt.move a✝ val✝) (TM1.stmts₁ val✝)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\ncase right.mk.some.mk.some.write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.write a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.write a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ),\n    some a✝¹ ∈ TM1.stmts M S →\n      some (trAux M a a✝¹ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝¹ → some val✝ ∈ TM1.stmts M S\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch a✝² a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch a✝² a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch a✝² a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase write b q =>\n  cases h₁; refine' TM1.stmts_trans _ h₂\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Γ\nb : Stmt₁\nq :\n  ∀ (v : σ),\n    some b ∈ TM1.stmts M S →\n      some (trAux M a b v) = some ((some val✝, v'), s) → TM1.SupportsStmt S b → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.write a✝ b) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.write a✝ b) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝ b)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase write b q =>\n  cases h₁; refine' TM1.stmts_trans _ h₂\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Γ\nb : Stmt₁\nq :\n  ∀ (v : σ),\n    some b ∈ TM1.stmts M S →\n      some (trAux M a b v) = some ((some val✝, v'), s) → TM1.SupportsStmt S b → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.write a✝ b) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.write a✝ b) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝ b)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Γ\nh₂ : some (TM1.Stmt.write a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), write (a✝ a v')) →\n        TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrefine' TM1.stmts_trans _ h₂\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Γ\nh₂ : some (TM1.Stmt.write a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), write (a✝ a v')) →\n        TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ val✝ ∈ TM1.stmts₁ (TM1.Stmt.write a✝ val✝)\n[PROOFSTEP]\nunfold TM1.stmts₁\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Γ\nh₂ : some (TM1.Stmt.write a✝ val✝) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.write a✝ val✝)\nq :\n  ∀ (v : σ),\n    some val✝ ∈ TM1.stmts M S →\n      some (trAux M a val✝ v) = some ((some val✝, v'), write (a✝ a v')) →\n        TM1.SupportsStmt S val✝ → some val✝ ∈ TM1.stmts M S\n⊢ val✝ ∈ insert (TM1.Stmt.write a✝ val✝) (TM1.stmts₁ val✝)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\ncase right.mk.some.mk.some.load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ),\n    some a✝¹ ∈ TM1.stmts M S →\n      some (trAux M a a✝¹ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝¹ → some val✝ ∈ TM1.stmts M S\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch a✝² a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch a✝² a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch a✝² a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase load b q IH =>\n  refine' IH _ (TM1.stmts_trans _ h₂) h₁ hs\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nb : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ),\n    some q ∈ TM1.stmts M S →\n      some (trAux M a q v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load b q) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load b q) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load b q)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase load b q IH =>\n  refine' IH _ (TM1.stmts_trans _ h₂) h₁ hs\n  unfold TM1.stmts₁\n  exact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nb : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ),\n    some q ∈ TM1.stmts M S →\n      some (trAux M a q v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load b q) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load b q) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load b q)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrefine' IH _ (TM1.stmts_trans _ h₂) h₁ hs\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nb : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ),\n    some q ∈ TM1.stmts M S →\n      some (trAux M a q v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load b q) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load b q) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load b q)\n⊢ q ∈ TM1.stmts₁ (TM1.Stmt.load b q)\n[PROOFSTEP]\nunfold TM1.stmts₁\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nb : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ),\n    some q ∈ TM1.stmts M S →\n      some (trAux M a q v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.load b q) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.load b q) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.load b q)\n⊢ q ∈ insert (TM1.Stmt.load b q) (TM1.stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem TM1.stmts₁_self\n[GOAL]\ncase right.mk.some.mk.some.branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ),\n    some a✝¹ ∈ TM1.stmts M S →\n      some (trAux M a a✝¹ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝¹ → some val✝ ∈ TM1.stmts M S\na_ih✝ :\n  ∀ (v : σ),\n    some a✝ ∈ TM1.stmts M S →\n      some (trAux M a a✝ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S a✝ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch a✝² a✝¹ a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch a✝² a✝¹ a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch a✝² a✝¹ a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  cases h : p a v <;> rw [trAux, h] at h₁ \n  · refine' IH₂ _ (TM1.stmts_trans _ h₂) h₁ hs.2\n    unfold TM1.stmts₁\n    exact Finset.mem_insert_of_mem (Finset.mem_union_right _ TM1.stmts₁_self)\n  · refine' IH₁ _ (TM1.stmts_trans _ h₂) h₁ hs.1\n    unfold TM1.stmts₁\n    exact Finset.mem_insert_of_mem (Finset.mem_union_left _ TM1.stmts₁_self)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch p q₁ q₂) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  cases h : p a v <;> rw [trAux, h] at h₁ \n  · refine' IH₂ _ (TM1.stmts_trans _ h₂) h₁ hs.2\n    unfold TM1.stmts₁\n    exact Finset.mem_insert_of_mem (Finset.mem_union_right _ TM1.stmts₁_self)\n  · refine' IH₁ _ (TM1.stmts_trans _ h₂) h₁ hs.1\n    unfold TM1.stmts₁\n    exact Finset.mem_insert_of_mem (Finset.mem_union_left _ TM1.stmts₁_self)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch p q₁ q₂) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncases h : p a v\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch p q₁ q₂) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = false\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrw [trAux, h] at h₁ \n[GOAL]\ncase true\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.branch p q₁ q₂) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = true\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrw [trAux, h] at h₁ \n[GOAL]\ncase false\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif false then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = false\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrefine' IH₂ _ (TM1.stmts_trans _ h₂) h₁ hs.2\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif false then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = false\n⊢ q₂ ∈ TM1.stmts₁ (TM1.Stmt.branch p q₁ q₂)\n[PROOFSTEP]\nunfold TM1.stmts₁\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif false then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = false\n⊢ q₂ ∈ insert (TM1.Stmt.branch p q₁ q₂) (TM1.stmts₁ q₁ ∪ TM1.stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_right _ TM1.stmts₁_self)\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif true then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = true\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\nrefine' IH₁ _ (TM1.stmts_trans _ h₂) h₁ hs.1\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif true then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = true\n⊢ q₁ ∈ TM1.stmts₁ (TM1.Stmt.branch p q₁ q₂)\n[PROOFSTEP]\nunfold TM1.stmts₁\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ),\n    some q₁ ∈ TM1.stmts M S →\n      some (trAux M a q₁ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₁ → some val✝ ∈ TM1.stmts M S\nIH₂ :\n  ∀ (v : σ),\n    some q₂ ∈ TM1.stmts M S →\n      some (trAux M a q₂ v) = some ((some val✝, v'), s) → TM1.SupportsStmt S q₂ → some val✝ ∈ TM1.stmts M S\nv : σ\nh₂ : some (TM1.Stmt.branch p q₁ q₂) ∈ TM1.stmts M S\nh₁ : some (bif true then trAux M a q₁ v else trAux M a q₂ v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.branch p q₁ q₂)\nh : p a v = true\n⊢ q₁ ∈ insert (TM1.Stmt.branch p q₁ q₂) (TM1.stmts₁ q₁ ∪ TM1.stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_left _ TM1.stmts₁_self)\n[GOAL]\ncase right.mk.some.mk.some.goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\na✝ : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto a✝) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto a✝) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto a✝)\n⊢ some val✝ ∈ TM1.stmts M S\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase goto l =>\n  cases h₁\n  exact Finset.some_mem_insertNone.2 (Finset.mem_biUnion.2 ⟨_, hs _ _, TM1.stmts₁_self⟩)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nl : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto l) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto l) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto l)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase goto l =>\n  cases h₁\n  exact Finset.some_mem_insertNone.2 (Finset.mem_biUnion.2 ⟨_, hs _ _, TM1.stmts₁_self⟩)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nl : Γ → σ → Λ\nv : σ\nh₂ : some (TM1.Stmt.goto l) ∈ TM1.stmts M S\nh₁ : some (trAux M a (TM1.Stmt.goto l) v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S (TM1.Stmt.goto l)\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncases h₁\n[GOAL]\ncase refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\nv' : σ\nl : Γ → σ → Λ\nh₂ : some (TM1.Stmt.goto l) ∈ TM1.stmts M S\nhs : TM1.SupportsStmt S (TM1.Stmt.goto l)\n⊢ some (M (l a v')) ∈ TM1.stmts M S\n[PROOFSTEP]\nexact Finset.some_mem_insertNone.2 (Finset.mem_biUnion.2 ⟨_, hs _ _, TM1.stmts₁_self⟩)\n[GOAL]\ncase right.mk.some.mk.some.halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase halt => cases h₁\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncase halt => cases h₁\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nM : Λ → Stmt₁\ninst✝ : Fintype σ\nS : Finset Λ\nss : TM1.Supports M S\na : Γ\ns : Stmt₀\nv' : σ\nval✝ : Stmt₁\nv : σ\nh₂ : some TM1.Stmt.halt ∈ TM1.stmts M S\nh₁ : some (trAux M a TM1.Stmt.halt v) = some ((some val✝, v'), s)\nhs : TM1.SupportsStmt S TM1.Stmt.halt\n⊢ some val✝ ∈ TM1.stmts M S\n[PROOFSTEP]\ncases h₁\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nletI := Classical.decEq Γ\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nlet n := Fintype.card Γ\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nobtain ⟨F⟩ := Fintype.truncEquivFin Γ\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\nx✝ : Trunc (Γ ≃ Fin (Fintype.card Γ))\nF : Γ ≃ Fin (Fintype.card Γ)\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nlet G : Fin n ↪ Fin n → Bool :=\n  ⟨fun a b ↦ a = b, fun a b h ↦ Bool.of_decide_true <| (congr_fun h b).trans <| Bool.decide_true rfl⟩\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\nx✝ : Trunc (Γ ≃ Fin (Fintype.card Γ))\nF : Γ ≃ Fin (Fintype.card Γ)\nG : Fin n ↪ Fin n → Bool :=\n  { toFun := fun a b => decide (a = b),\n    inj' := (_ : ∀ (a b : Fin n), (fun a b => decide (a = b)) a = (fun a b => decide (a = b)) b → a = b) }\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nlet H := (F.toEmbedding.trans G).trans (Equiv.vectorEquivFin _ _).symm.toEmbedding\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\nx✝ : Trunc (Γ ≃ Fin (Fintype.card Γ))\nF : Γ ≃ Fin (Fintype.card Γ)\nG : Fin n ↪ Fin n → Bool :=\n  { toFun := fun a b => decide (a = b),\n    inj' := (_ : ∀ (a b : Fin n), (fun a b => decide (a = b)) a = (fun a b => decide (a = b)) b → a = b) }\nH : Γ ↪ Vector Bool n :=\n  Function.Embedding.trans (Function.Embedding.trans (Equiv.toEmbedding F) G)\n    (Equiv.toEmbedding (Equiv.vectorEquivFin Bool n).symm)\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nclassical\nlet enc := H.setValue default (Vector.replicate n false)\nexact ⟨_, enc, Function.invFun enc, H.setValue_eq _ _, Function.leftInverse_invFun enc.2⟩\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\nx✝ : Trunc (Γ ≃ Fin (Fintype.card Γ))\nF : Γ ≃ Fin (Fintype.card Γ)\nG : Fin n ↪ Fin n → Bool :=\n  { toFun := fun a b => decide (a = b),\n    inj' := (_ : ∀ (a b : Fin n), (fun a b => decide (a = b)) a = (fun a b => decide (a = b)) b → a = b) }\nH : Γ ↪ Vector Bool n :=\n  Function.Embedding.trans (Function.Embedding.trans (Equiv.toEmbedding F) G)\n    (Equiv.toEmbedding (Equiv.vectorEquivFin Bool n).symm)\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nlet enc := H.setValue default (Vector.replicate n false)\n[GOAL]\ncase mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\ninst✝ : Fintype Γ\nthis : DecidableEq Γ := Classical.decEq Γ\nn : ℕ := Fintype.card Γ\nx✝ : Trunc (Γ ≃ Fin (Fintype.card Γ))\nF : Γ ≃ Fin (Fintype.card Γ)\nG : Fin n ↪ Fin n → Bool :=\n  { toFun := fun a b => decide (a = b),\n    inj' := (_ : ∀ (a b : Fin n), (fun a b => decide (a = b)) a = (fun a b => decide (a = b)) b → a = b) }\nH : Γ ↪ Vector Bool n :=\n  Function.Embedding.trans (Function.Embedding.trans (Equiv.toEmbedding F) G)\n    (Equiv.toEmbedding (Equiv.vectorEquivFin Bool n).symm)\nenc : Γ ↪ Vector Bool n := Function.Embedding.setValue H default (Vector.replicate n false)\n⊢ ∃ n enc dec, enc default = Vector.replicate n false ∧ ∀ (a : Γ), dec (enc a) = a\n[PROOFSTEP]\nexact ⟨_, enc, Function.invFun enc, H.setValue_eq _ _, Function.leftInverse_invFun enc.2⟩\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT : Tape Bool\n⊢ stepAux (move d q) v T = stepAux q v ((Tape.move d)^[n] T)\n[PROOFSTEP]\nsuffices : ∀ i, stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT : Tape Bool\nthis : ∀ (i : ℕ), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\n⊢ stepAux (move d q) v T = stepAux q v ((Tape.move d)^[n] T)\ncase this\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT : Tape Bool\n⊢ ∀ (i : ℕ), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\n[PROOFSTEP]\nexact this n\n[GOAL]\ncase this\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT : Tape Bool\n⊢ ∀ (i : ℕ), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase this\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT : Tape Bool\ni : ℕ\n⊢ stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\n[PROOFSTEP]\ninduction' i with i IH generalizing T\n[GOAL]\ncase this.zero\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT✝ T : Tape Bool\n⊢ stepAux ((Stmt.move d)^[Nat.zero] q) v T = stepAux q v ((Tape.move d)^[Nat.zero] T)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase this.succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT✝ : Tape Bool\ni : ℕ\nIH : ∀ (T : Tape Bool), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\nT : Tape Bool\n⊢ stepAux ((Stmt.move d)^[Nat.succ i] q) v T = stepAux q v ((Tape.move d)^[Nat.succ i] T)\n[PROOFSTEP]\nrw [iterate_succ', iterate_succ]\n[GOAL]\ncase this.succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT✝ : Tape Bool\ni : ℕ\nIH : ∀ (T : Tape Bool), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\nT : Tape Bool\n⊢ stepAux ((Stmt.move d ∘ (Stmt.move d)^[i]) q) v T = stepAux q v (((Tape.move d)^[i] ∘ Tape.move d) T)\n[PROOFSTEP]\nsimp only [stepAux, Function.comp_apply]\n[GOAL]\ncase this.succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nd : Dir\nq : Stmt Bool Λ' σ\nv : σ\nT✝ : Tape Bool\ni : ℕ\nIH : ∀ (T : Tape Bool), stepAux ((Stmt.move d)^[i] q) v T = stepAux q v ((Tape.move d)^[i] T)\nT : Tape Bool\n⊢ stepAux ((Stmt.move d)^[i] q) v (Tape.move d T) = stepAux q v ((Tape.move d)^[i] (Tape.move d T))\n[PROOFSTEP]\nrw [IH]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S (move d q) = SupportsStmt S q\n[PROOFSTEP]\nsuffices ∀ {i}, SupportsStmt S ((Stmt.move d)^[i] q) = _ from this\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nq : Stmt Bool Λ' σ\n⊢ ∀ {i : ℕ}, SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q\n[PROOFSTEP]\nintro i\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nq : Stmt Bool Λ' σ\ni : ℕ\n⊢ SupportsStmt S ((Stmt.move d)^[i] q) = SupportsStmt S q\n[PROOFSTEP]\ninduction i generalizing q\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S ((Stmt.move d)^[Nat.zero] q) = SupportsStmt S q\n[PROOFSTEP]\nsimp only [*, iterate]\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nn✝ : ℕ\nn_ih✝ : ∀ {q : Stmt Bool Λ' σ}, SupportsStmt S ((Stmt.move d)^[n✝] q) = SupportsStmt S q\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S ((Stmt.move d)^[Nat.succ n✝] q) = SupportsStmt S q\n[PROOFSTEP]\nsimp only [*, iterate]\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nd : Dir\nn✝ : ℕ\nn_ih✝ : ∀ {q : Stmt Bool Λ' σ}, SupportsStmt S ((Stmt.move d)^[n✝] q) = SupportsStmt S q\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S (Stmt.move d q) = SupportsStmt S q\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nl : List Bool\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S (write l q) = SupportsStmt S q\n[PROOFSTEP]\ninduction' l with _ l IH\n[GOAL]\ncase nil\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nq : Stmt Bool Λ' σ\n⊢ SupportsStmt S (write [] q) = SupportsStmt S q\n[PROOFSTEP]\nsimp only [write, SupportsStmt, *]\n[GOAL]\ncase cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nq : Stmt Bool Λ' σ\nhead✝ : Bool\nl : List Bool\nIH : SupportsStmt S (write l q) = SupportsStmt S q\n⊢ SupportsStmt S (write (head✝ :: l) q) = SupportsStmt S q\n[PROOFSTEP]\nsimp only [write, SupportsStmt, *]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝ : Γ → Stmt Bool Λ' σ\ni : ℕ\nf : Vector Bool i → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool i), SupportsStmt S (f v)\n⊢ SupportsStmt S (readAux i f)\n[PROOFSTEP]\ninduction' i with i IH\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni : ℕ\nf✝ : Vector Bool i → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i), SupportsStmt S (f✝ v)\nf : Vector Bool Nat.zero → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool Nat.zero), SupportsStmt S (f v)\n⊢ SupportsStmt S (readAux Nat.zero f)\n[PROOFSTEP]\nexact hf _\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\n⊢ SupportsStmt S (readAux (Nat.succ i) f)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase succ.left\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\n⊢ SupportsStmt S (Stmt.move Dir.right (readAux i fun v => f (true ::ᵥ v)))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase succ.right\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\n⊢ SupportsStmt S (Stmt.move Dir.right (readAux i fun v => f (false ::ᵥ v)))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase succ.left.hf\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\n⊢ ∀ (v : Vector Bool i), SupportsStmt S (f (true ::ᵥ v))\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.right.hf\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\n⊢ ∀ (v : Vector Bool i), SupportsStmt S (f (false ::ᵥ v))\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.left.hf\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\nv✝ : Vector Bool i\n⊢ SupportsStmt S (f (true ::ᵥ v✝))\n[PROOFSTEP]\napply hf\n[GOAL]\ncase succ.right.hf\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝¹ : Γ → Stmt Bool Λ' σ\ni✝ : ℕ\nf✝ : Vector Bool i✝ → Stmt Bool Λ' σ\nhf✝ : ∀ (v : Vector Bool i✝), SupportsStmt S (f✝ v)\ni : ℕ\nIH :\n  ∀ (f : Vector Bool i → Stmt Bool Λ' σ), (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nf : Vector Bool (Nat.succ i) → Stmt Bool Λ' σ\nhf : ∀ (v : Vector Bool (Nat.succ i)), SupportsStmt S (f v)\nv✝ : Vector Bool i\n⊢ SupportsStmt S (f (false ::ᵥ v✝))\n[PROOFSTEP]\napply hf\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝ : Γ → Stmt Bool Λ' σ\nthis :\n  ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ),\n    (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nhf : ∀ (a : Γ), SupportsStmt S (f✝ a)\n⊢ ∀ (v : Vector Bool n), SupportsStmt S (move Dir.left (f✝ (dec v)))\n[PROOFSTEP]\nintro\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nS : Finset Λ'\nf✝ : Γ → Stmt Bool Λ' σ\nthis :\n  ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ),\n    (∀ (v : Vector Bool i), SupportsStmt S (f v)) → SupportsStmt S (readAux i f)\nhf : ∀ (a : Γ), SupportsStmt S (f✝ a)\nv✝ : Vector Bool n\n⊢ SupportsStmt S (move Dir.left (f✝ (dec v✝)))\n[PROOFSTEP]\nsimp only [supportsStmt_move, hf]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nL R : ListBlank Γ\n⊢ Tape Bool\n[PROOFSTEP]\nrefine' Tape.mk' (L.bind (fun x ↦ (enc x).toList.reverse) ⟨n, _⟩) (R.bind (fun x ↦ (enc x).toList) ⟨n, _⟩)\n[GOAL]\ncase refine'_1\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nL R : ListBlank Γ\n⊢ (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n default\n[PROOFSTEP]\nsimp only [enc0, Vector.replicate, List.reverse_replicate, Bool.default_bool, Vector.toList_mk]\n[GOAL]\ncase refine'_2\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nL R : ListBlank Γ\n⊢ (fun x => Vector.toList (enc x)) default = List.replicate n default\n[PROOFSTEP]\nsimp only [enc0, Vector.replicate, List.reverse_replicate, Bool.default_bool, Vector.toList_mk]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nL R : ListBlank Γ\n⊢ trTape enc0 (Tape.mk' L R) = trTape' enc0 L R\n[PROOFSTEP]\nsimp only [trTape, Tape.mk'_left, Tape.mk'_right₀]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\n⊢ (Tape.move Dir.left)^[n] (trTape' enc0 L R) = trTape' enc0 (ListBlank.tail L) (ListBlank.cons (ListBlank.head L) R)\n[PROOFSTEP]\nobtain ⟨a, L, rfl⟩ := L.exists_cons\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\n⊢ (Tape.move Dir.left)^[n] (trTape' enc0 (ListBlank.cons a L) R) =\n    trTape' enc0 (ListBlank.tail (ListBlank.cons a L)) (ListBlank.cons (ListBlank.head (ListBlank.cons a L)) R)\n[PROOFSTEP]\nsimp only [trTape', ListBlank.cons_bind, ListBlank.head_cons, ListBlank.tail_cons]\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\n⊢ (Tape.move Dir.left)^[n]\n      (Tape.mk'\n        (ListBlank.append (List.reverse (Vector.toList (enc a)))\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default))) =\n    Tape.mk'\n      (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n        (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n      (ListBlank.append (Vector.toList (enc a))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nsuffices\n  ∀ {L' R' l₁ l₂} (_ : Vector.toList (enc a) = List.reverseAux l₁ l₂),\n    (Tape.move Dir.left)^[l₁.length] (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      Tape.mk' L' (ListBlank.append (Vector.toList (enc a)) R')\n  by simpa only [List.length_reverse, Vector.toList_length] using this (List.reverse_reverse _).symm\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nthis :\n  ∀ {L' R' : ListBlank Bool} {l₁ l₂ : List Bool},\n    Vector.toList (enc a) = List.reverseAux l₁ l₂ →\n      (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n        Tape.mk' L' (ListBlank.append (Vector.toList (enc a)) R')\n⊢ (Tape.move Dir.left)^[n]\n      (Tape.mk'\n        (ListBlank.append (List.reverse (Vector.toList (enc a)))\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default))) =\n    Tape.mk'\n      (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n        (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n      (ListBlank.append (Vector.toList (enc a))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nsimpa only [List.length_reverse, Vector.toList_length] using this (List.reverse_reverse _).symm\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\n⊢ ∀ {L' R' : ListBlank Bool} {l₁ l₂ : List Bool},\n    Vector.toList (enc a) = List.reverseAux l₁ l₂ →\n      (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n        Tape.mk' L' (ListBlank.append (Vector.toList (enc a)) R')\n[PROOFSTEP]\nintro _ _ l₁ l₂ e\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁ l₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux l₁ l₂\n⊢ (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L'✝) (ListBlank.append l₂ R'✝)) =\n    Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\n[PROOFSTEP]\ninduction' l₁ with b l₁ IH generalizing l₂\n[GOAL]\ncase intro.intro.nil\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁ l₂✝ : List Bool\ne✝ : Vector.toList (enc a) = List.reverseAux l₁ l₂✝\nl₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux [] l₂\n⊢ (Tape.move Dir.left)^[List.length []] (Tape.mk' (ListBlank.append [] L'✝) (ListBlank.append l₂ R'✝)) =\n    Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\n[PROOFSTEP]\ncases e\n[GOAL]\ncase intro.intro.nil.refl\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁ l₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux l₁ l₂\n⊢ (Tape.move Dir.left)^[List.length []] (Tape.mk' (ListBlank.append [] L'✝) (ListBlank.append (enc a).1 R'✝)) =\n    Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁✝ l₂✝ : List Bool\ne✝ : Vector.toList (enc a) = List.reverseAux l₁✝ l₂✝\nb : Bool\nl₁ : List Bool\nIH :\n  ∀ {l₂ : List Bool},\n    Vector.toList (enc a) = List.reverseAux l₁ l₂ →\n      (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L'✝) (ListBlank.append l₂ R'✝)) =\n        Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\nl₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux (b :: l₁) l₂\n⊢ (Tape.move Dir.left)^[List.length (b :: l₁)] (Tape.mk' (ListBlank.append (b :: l₁) L'✝) (ListBlank.append l₂ R'✝)) =\n    Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\n[PROOFSTEP]\nsimp only [List.length, List.cons_append, iterate_succ_apply]\n[GOAL]\ncase intro.intro.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁✝ l₂✝ : List Bool\ne✝ : Vector.toList (enc a) = List.reverseAux l₁✝ l₂✝\nb : Bool\nl₁ : List Bool\nIH :\n  ∀ {l₂ : List Bool},\n    Vector.toList (enc a) = List.reverseAux l₁ l₂ →\n      (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L'✝) (ListBlank.append l₂ R'✝)) =\n        Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\nl₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux (b :: l₁) l₂\n⊢ (Tape.move Dir.left)^[List.length l₁]\n      (Tape.move Dir.left (Tape.mk' (ListBlank.append (b :: l₁) L'✝) (ListBlank.append l₂ R'✝))) =\n    Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\n[PROOFSTEP]\nconvert IH e\n[GOAL]\ncase h.e'_2.h.e'_4\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nR : ListBlank Γ\na : Γ\nL : ListBlank Γ\nL'✝ R'✝ : ListBlank Bool\nl₁✝ l₂✝ : List Bool\ne✝ : Vector.toList (enc a) = List.reverseAux l₁✝ l₂✝\nb : Bool\nl₁ : List Bool\nIH :\n  ∀ {l₂ : List Bool},\n    Vector.toList (enc a) = List.reverseAux l₁ l₂ →\n      (Tape.move Dir.left)^[List.length l₁] (Tape.mk' (ListBlank.append l₁ L'✝) (ListBlank.append l₂ R'✝)) =\n        Tape.mk' L'✝ (ListBlank.append (Vector.toList (enc a)) R'✝)\nl₂ : List Bool\ne : Vector.toList (enc a) = List.reverseAux (b :: l₁) l₂\n⊢ Tape.move Dir.left (Tape.mk' (ListBlank.append (b :: l₁) L'✝) (ListBlank.append l₂ R'✝)) =\n    Tape.mk' (ListBlank.append l₁ L'✝) (ListBlank.append (b :: l₂) R'✝)\n[PROOFSTEP]\nsimp only [ListBlank.tail_cons, ListBlank.append, Tape.move_left_mk', ListBlank.head_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\n⊢ (Tape.move Dir.right)^[n] (trTape' enc0 L R) = trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R)\n[PROOFSTEP]\nsuffices ∀ i L, (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L) = L\n  by\n  refine' (Eq.symm _).trans (this n _)\n  simp only [trTape'_move_left, ListBlank.cons_head_tail, ListBlank.head_cons, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\nthis : ∀ (i : ℕ) (L : Tape (?m.366455 i)), (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L) = L\n⊢ (Tape.move Dir.right)^[n] (trTape' enc0 L R) = trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R)\n[PROOFSTEP]\nrefine' (Eq.symm _).trans (this n _)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\nthis : ∀ (i : ℕ) (L : Tape Bool), (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L) = L\n⊢ (Tape.move Dir.right)^[n]\n      ((Tape.move Dir.left)^[n] (trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R))) =\n    (Tape.move Dir.right)^[n] (trTape' enc0 L R)\n[PROOFSTEP]\nsimp only [trTape'_move_left, ListBlank.cons_head_tail, ListBlank.head_cons, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\n⊢ ∀ (i : ℕ) (L : Tape Bool), (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L) = L\n[PROOFSTEP]\nintro i _\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\ni : ℕ\nL✝ : Tape Bool\n⊢ (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L✝) = L✝\n[PROOFSTEP]\ninduction' i with i IH\n[GOAL]\ncase zero\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\nL✝ : Tape Bool\n⊢ (Tape.move Dir.right)^[Nat.zero] ((Tape.move Dir.left)^[Nat.zero] L✝) = L✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nL R : ListBlank Γ\nL✝ : Tape Bool\ni : ℕ\nIH : (Tape.move Dir.right)^[i] ((Tape.move Dir.left)^[i] L✝) = L✝\n⊢ (Tape.move Dir.right)^[Nat.succ i] ((Tape.move Dir.left)^[Nat.succ i] L✝) = L✝\n[PROOFSTEP]\nrw [iterate_succ_apply, iterate_succ_apply', Tape.move_left_right, IH]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\na b : Γ\nL R : ListBlank Γ\n⊢ stepAux (write (Vector.toList (enc a)) q) v (trTape' enc0 L (ListBlank.cons b R)) =\n    stepAux q v (trTape' enc0 (ListBlank.cons a L) R)\n[PROOFSTEP]\nsimp only [trTape', ListBlank.cons_bind]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\na b : Γ\nL R : ListBlank Γ\n⊢ stepAux (write (Vector.toList (enc a)) q) v\n      (Tape.mk'\n        (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n          (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n        (ListBlank.append (Vector.toList (enc b))\n          (ListBlank.bind R (fun x => Vector.toList (enc x))\n            (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))) =\n    stepAux q v\n      (Tape.mk'\n        (ListBlank.append (List.reverse (Vector.toList (enc a)))\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nsuffices\n  ∀ {L' R'} (l₁ l₂ l₂' : List Bool) (_ : l₂'.length = l₂.length),\n    stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n      stepAux q v (Tape.mk' (L'.append (List.reverseAux l₂ l₁)) R')\n  by refine' this [] _ _ ((enc b).2.trans (enc a).2.symm)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\na b : Γ\nL R : ListBlank Γ\nthis :\n  ∀ {L' R' : ListBlank Bool} (l₁ l₂ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n⊢ stepAux (write (Vector.toList (enc a)) q) v\n      (Tape.mk'\n        (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n          (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n        (ListBlank.append (Vector.toList (enc b))\n          (ListBlank.bind R (fun x => Vector.toList (enc x))\n            (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))) =\n    stepAux q v\n      (Tape.mk'\n        (ListBlank.append (List.reverse (Vector.toList (enc a)))\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nrefine' this [] _ _ ((enc b).2.trans (enc a).2.symm)\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\na b : Γ\nL R : ListBlank Γ\n⊢ ∀ {L' R' : ListBlank Bool} (l₁ l₂ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\nclear a b L R\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\n⊢ ∀ {L' R' : ListBlank Bool} (l₁ l₂ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\nintro L' R' l₁ l₂ l₂' e\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁ l₂ l₂' : List Bool\ne : List.length l₂' = List.length l₂\n⊢ stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\ninduction' l₂ with a l₂ IH generalizing l₁ l₂'\n[GOAL]\ncase nil\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂ l₂'✝ : List Bool\ne✝ : List.length l₂'✝ = List.length l₂\nl₁ l₂' : List Bool\ne : List.length l₂' = List.length []\n⊢ stepAux (write [] q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux [] l₁) L') R')\n[PROOFSTEP]\ncases List.length_eq_zero.1 e\n[GOAL]\ncase nil.refl\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂ l₂' : List Bool\ne✝ : List.length l₂' = List.length l₂\nl₁ : List Bool\ne : List.length [] = List.length []\n⊢ stepAux (write [] q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append [] R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux [] l₁) L') R')\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ l₂'✝ : List Bool\ne✝ : List.length l₂'✝ = List.length l₂✝\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ l₂' : List Bool\ne : List.length l₂' = List.length (a :: l₂)\n⊢ stepAux (write (a :: l₂) q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\ncases' l₂' with b l₂'\n[GOAL]\ncase cons.nil\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ l₂' : List Bool\ne✝ : List.length l₂' = List.length l₂✝\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\ne : List.length [] = List.length (a :: l₂)\n⊢ stepAux (write (a :: l₂) q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append [] R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\nsimp only [List.length_nil, List.length_cons, Nat.succ_inj'] at e \n[GOAL]\ncase cons.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ l₂'✝ : List Bool\ne✝ : List.length l₂'✝ = List.length l₂✝\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nb : Bool\nl₂' : List Bool\ne : List.length (b :: l₂') = List.length (a :: l₂)\n⊢ stepAux (write (a :: l₂) q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append (b :: l₂') R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\nsimp only [List.length_nil, List.length_cons, Nat.succ_inj'] at e \n[GOAL]\ncase cons.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ l₂'✝ : List Bool\ne✝ : List.length l₂'✝ = List.length l₂✝\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nb : Bool\nl₂' : List Bool\ne : List.length l₂' = List.length l₂\n⊢ stepAux (write (a :: l₂) q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append (b :: l₂') R')) =\n    stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\nrw [List.reverseAux, ← IH (a :: l₁) l₂' e]\n[GOAL]\ncase cons.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nq : Stmt Bool Λ' σ\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ l₂'✝ : List Bool\ne✝ : List.length l₂'✝ = List.length l₂✝\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ l₂' : List Bool),\n    List.length l₂' = List.length l₂ →\n      stepAux (write l₂ q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂' R')) =\n        stepAux q v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nb : Bool\nl₂' : List Bool\ne : List.length l₂' = List.length l₂\n⊢ stepAux (write (a :: l₂) q) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append (b :: l₂') R')) =\n    stepAux (write l₂ q) v (Tape.mk' (ListBlank.append (a :: l₁) L') (ListBlank.append l₂' R'))\n[PROOFSTEP]\nsimp only [stepAux, ListBlank.append, Tape.write_mk', Tape.move_right_mk', ListBlank.head_cons, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL R : ListBlank Γ\n⊢ stepAux (read dec f) v (trTape' enc0 L R) = stepAux (f (ListBlank.head R)) v (trTape' enc0 L R)\n[PROOFSTEP]\nsuffices\n  ∀ f, stepAux (readAux n f) v (trTape' enc0 L R) = stepAux (f (enc R.head)) v (trTape' enc0 (L.cons R.head) R.tail)\n  by\n  rw [read, this, stepAux_move, encdec, trTape'_move_left enc0]\n  simp only [ListBlank.head_cons, ListBlank.cons_head_tail, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL R : ListBlank Γ\nthis :\n  ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v (trTape' enc0 L R) =\n      stepAux (f (enc (ListBlank.head R))) v (trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R))\n⊢ stepAux (read dec f) v (trTape' enc0 L R) = stepAux (f (ListBlank.head R)) v (trTape' enc0 L R)\n[PROOFSTEP]\nrw [read, this, stepAux_move, encdec, trTape'_move_left enc0]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL R : ListBlank Γ\nthis :\n  ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v (trTape' enc0 L R) =\n      stepAux (f (enc (ListBlank.head R))) v (trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R))\n⊢ stepAux (f (ListBlank.head R)) v\n      (trTape' enc0 (ListBlank.tail (ListBlank.cons (ListBlank.head R) L))\n        (ListBlank.cons (ListBlank.head (ListBlank.cons (ListBlank.head R) L)) (ListBlank.tail R))) =\n    stepAux (f (ListBlank.head R)) v (trTape' enc0 L R)\n[PROOFSTEP]\nsimp only [ListBlank.head_cons, ListBlank.cons_head_tail, ListBlank.tail_cons]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL R : ListBlank Γ\n⊢ ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v (trTape' enc0 L R) =\n      stepAux (f (enc (ListBlank.head R))) v (trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R))\n[PROOFSTEP]\nobtain ⟨a, R, rfl⟩ := R.exists_cons\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\n⊢ ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v (trTape' enc0 L (ListBlank.cons a R)) =\n      stepAux (f (enc (ListBlank.head (ListBlank.cons a R)))) v\n        (trTape' enc0 (ListBlank.cons (ListBlank.head (ListBlank.cons a R)) L) (ListBlank.tail (ListBlank.cons a R)))\n[PROOFSTEP]\nsimp only [ListBlank.head_cons, ListBlank.tail_cons, trTape', ListBlank.cons_bind, ListBlank.append_assoc]\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\n⊢ ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v\n        (Tape.mk'\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n          (ListBlank.append (Vector.toList (enc a))\n            (ListBlank.bind R (fun x => Vector.toList (enc x))\n              (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))) =\n      stepAux (f (enc a)) v\n        (Tape.mk'\n          (ListBlank.append (List.reverse (Vector.toList (enc a)))\n            (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n              (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n          (ListBlank.bind R (fun x => Vector.toList (enc x))\n            (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nsuffices\n  ∀ i f L' R' l₁ l₂ h,\n    stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f ⟨l₂, h⟩) v (Tape.mk' (ListBlank.append (l₂.reverseAux l₁) L') R')\n  by\n  intro f\n  exact this n f (L.bind (fun x => (enc x).1.reverse) _) (R.bind (fun x => (enc x).1) _) [] _ (enc a).2\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\nthis :\n  ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ) (L' R' : ListBlank Bool) (l₁ l₂ : List Bool) (h : List.length l₂ = i),\n    stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := h }) v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n⊢ ∀ (f : Vector Bool n → Stmt Bool Λ' σ),\n    stepAux (readAux n f) v\n        (Tape.mk'\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n          (ListBlank.append (Vector.toList (enc a))\n            (ListBlank.bind R (fun x => Vector.toList (enc x))\n              (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))) =\n      stepAux (f (enc a)) v\n        (Tape.mk'\n          (ListBlank.append (List.reverse (Vector.toList (enc a)))\n            (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n              (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n          (ListBlank.bind R (fun x => Vector.toList (enc x))\n            (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nintro f\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf✝ : Γ → Stmt Bool Λ' σ\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\nthis :\n  ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ) (L' R' : ListBlank Bool) (l₁ l₂ : List Bool) (h : List.length l₂ = i),\n    stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := h }) v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nf : Vector Bool n → Stmt Bool Λ' σ\n⊢ stepAux (readAux n f) v\n      (Tape.mk'\n        (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n          (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default))\n        (ListBlank.append (Vector.toList (enc a))\n          (ListBlank.bind R (fun x => Vector.toList (enc x))\n            (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))) =\n    stepAux (f (enc a)) v\n      (Tape.mk'\n        (ListBlank.append (List.reverse (Vector.toList (enc a)))\n          (ListBlank.bind L (fun x => List.reverse (Vector.toList (enc x)))\n            (_ : ∃ n_1, (fun x => List.reverse (Vector.toList (enc x))) default = List.replicate n_1 default)))\n        (ListBlank.bind R (fun x => Vector.toList (enc x))\n          (_ : ∃ n_1, (fun x => Vector.toList (enc x)) default = List.replicate n_1 default)))\n[PROOFSTEP]\nexact this n f (L.bind (fun x => (enc x).1.reverse) _) (R.bind (fun x => (enc x).1) _) [] _ (enc a).2\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nf : Γ → Stmt Bool Λ' σ\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\n⊢ ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ) (L' R' : ListBlank Bool) (l₁ l₂ : List Bool) (h : List.length l₂ = i),\n    stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := h }) v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\nclear f L a R\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\n⊢ ∀ (i : ℕ) (f : Vector Bool i → Stmt Bool Λ' σ) (L' R' : ListBlank Bool) (l₁ l₂ : List Bool) (h : List.length l₂ = i),\n    stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := h }) v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\nintro i f L' R' l₁ l₂ _\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\ni : ℕ\nf : Vector Bool i → Stmt Bool Λ' σ\nL' R' : ListBlank Bool\nl₁ l₂ : List Bool\nh✝ : List.length l₂ = i\n⊢ stepAux (readAux i f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n    stepAux (f { val := l₂, property := h✝ }) v (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\nsubst i\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁ l₂ : List Bool\nf : Vector Bool (List.length l₂) → Stmt Bool Λ' σ\n⊢ stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n    stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n      (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\n[PROOFSTEP]\ninduction' l₂ with a l₂ IH generalizing l₁\n[GOAL]\ncase intro.intro.nil\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂ : List Bool\nf✝ : Vector Bool (List.length l₂) → Stmt Bool Λ' σ\nl₁ : List Bool\nf : Vector Bool (List.length []) → Stmt Bool Λ' σ\n⊢ stepAux (readAux (List.length []) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append [] R')) =\n    stepAux (f { val := [], property := (_ : List.length [] = List.length []) }) v\n      (Tape.mk' (ListBlank.append (List.reverseAux [] l₁) L') R')\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.intro.cons\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ stepAux (readAux (List.length (a :: l₂)) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append (a :: l₂) R')) =\n    stepAux (f { val := a :: l₂, property := (_ : List.length (a :: l₂) = List.length (a :: l₂)) }) v\n      (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\ntrans stepAux (readAux l₂.length fun v ↦ f (a ::ᵥ v)) v (Tape.mk' ((L'.append l₁).cons a) (R'.append l₂))\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ stepAux (readAux (List.length (a :: l₂)) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append (a :: l₂) R')) =\n    stepAux (readAux (List.length l₂) fun v => f (a ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n[PROOFSTEP]\ndsimp [readAux, stepAux]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ (bif ListBlank.head (ListBlank.cons a (ListBlank.append l₂ R')) then\n      stepAux (readAux (List.length l₂) fun v => f (true ::ᵥ v)) v\n        (Tape.move Dir.right (Tape.mk' (ListBlank.append l₁ L') (ListBlank.cons a (ListBlank.append l₂ R'))))\n    else\n      stepAux (readAux (List.length l₂) fun v => f (false ::ᵥ v)) v\n        (Tape.move Dir.right (Tape.mk' (ListBlank.append l₁ L') (ListBlank.cons a (ListBlank.append l₂ R'))))) =\n    stepAux (readAux (List.length l₂) fun v => f (a ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n[PROOFSTEP]\nsimp\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ (bif a then\n      stepAux (readAux (List.length l₂) fun v => f (true ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n    else\n      stepAux (readAux (List.length l₂) fun v => f (false ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))) =\n    stepAux (readAux (List.length l₂) fun v => f (a ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n[PROOFSTEP]\ncases a\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (false :: l₂)) → Stmt Bool Λ' σ\n⊢ (bif false then\n      stepAux (readAux (List.length l₂) fun v => f (true ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons false (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n    else\n      stepAux (readAux (List.length l₂) fun v => f (false ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons false (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))) =\n    stepAux (readAux (List.length l₂) fun v => f (false ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons false (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (true :: l₂)) → Stmt Bool Λ' σ\n⊢ (bif true then\n      stepAux (readAux (List.length l₂) fun v => f (true ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons true (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n    else\n      stepAux (readAux (List.length l₂) fun v => f (false ::ᵥ v)) v\n        (Tape.mk' (ListBlank.cons true (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))) =\n    stepAux (readAux (List.length l₂) fun v => f (true ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons true (ListBlank.append l₁ L')) (ListBlank.append l₂ R'))\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ stepAux (readAux (List.length l₂) fun v => f (a ::ᵥ v)) v\n      (Tape.mk' (ListBlank.cons a (ListBlank.append l₁ L')) (ListBlank.append l₂ R')) =\n    stepAux (f { val := a :: l₂, property := (_ : List.length (a :: l₂) = List.length (a :: l₂)) }) v\n      (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\nrw [← ListBlank.append, IH]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nv : σ\nL' R' : ListBlank Bool\nl₁✝ l₂✝ : List Bool\nf✝ : Vector Bool (List.length l₂✝) → Stmt Bool Λ' σ\na : Bool\nl₂ : List Bool\nIH :\n  ∀ (l₁ : List Bool) (f : Vector Bool (List.length l₂) → Stmt Bool Λ' σ),\n    stepAux (readAux (List.length l₂) f) v (Tape.mk' (ListBlank.append l₁ L') (ListBlank.append l₂ R')) =\n      stepAux (f { val := l₂, property := (_ : List.length l₂ = List.length l₂) }) v\n        (Tape.mk' (ListBlank.append (List.reverseAux l₂ l₁) L') R')\nl₁ : List Bool\nf : Vector Bool (List.length (a :: l₂)) → Stmt Bool Λ' σ\n⊢ stepAux (f (a ::ᵥ { val := l₂, property := (_ : List.length l₂ = List.length l₂) })) v\n      (Tape.mk' (ListBlank.append (List.reverseAux l₂ (a :: l₁)) L') R') =\n    stepAux (f { val := a :: l₂, property := (_ : List.length (a :: l₂) = List.length (a :: l₂)) }) v\n      (Tape.mk' (ListBlank.append (List.reverseAux (a :: l₂) l₁) L') R')\n[PROOFSTEP]\nrfl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nl₁ : Option Λ\nv : σ\nT : Tape Γ\n⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁) (trCfg enc enc₀ { l := l₁, var := v, Tape := T })\n    (step M { l := l₁, var := v, Tape := T })\n[PROOFSTEP]\nobtain ⟨L, R, rfl⟩ := T.exists_mk'\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nl₁ : Option Λ\nv : σ\nL R : ListBlank Γ\n⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)\n    (trCfg enc enc₀ { l := l₁, var := v, Tape := Tape.mk' L R }) (step M { l := l₁, var := v, Tape := Tape.mk' L R })\n[PROOFSTEP]\ncases' l₁ with l₁\n[GOAL]\ncase intro.intro.none\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\n⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)\n    (trCfg enc enc₀ { l := none, var := v, Tape := Tape.mk' L R })\n    (step M { l := none, var := v, Tape := Tape.mk' L R })\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase intro.intro.some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\nl₁ : Λ\n⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)\n    (trCfg enc enc₀ { l := some l₁, var := v, Tape := Tape.mk' L R })\n    (step M { l := some l₁, var := v, Tape := Tape.mk' L R })\n[PROOFSTEP]\nsuffices\n  ∀ q R,\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n  by\n  refine' TransGen.head' rfl _\n  rw [trTape_mk']\n  exact this _ R\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\nl₁ : Λ\nthis :\n  ∀ (q : Stmt₁) (R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n⊢ FRespects (step (tr enc dec M)) (fun c₁ => trCfg enc enc₀ c₁)\n    (trCfg enc enc₀ { l := some l₁, var := v, Tape := Tape.mk' L R })\n    (step M { l := some l₁, var := v, Tape := Tape.mk' L R })\n[PROOFSTEP]\nrefine' TransGen.head' rfl _\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\nl₁ : Λ\nthis :\n  ∀ (q : Stmt₁) (R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)\n    (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape enc₀ (Tape.mk' L R)))\n    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))\n[PROOFSTEP]\nrw [trTape_mk']\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\nl₁ : Λ\nthis :\n  ∀ (q : Stmt₁) (R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a) (stepAux (tr enc dec M (Λ'.normal l₁)) v (trTape' enc₀ L R))\n    ((fun c₁ => trCfg enc enc₀ c₁) (stepAux (M l₁) v (Tape.mk' L R)))\n[PROOFSTEP]\nexact this _ R\n[GOAL]\ncase intro.intro.some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL R : ListBlank Γ\nl₁ : Λ\n⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n[PROOFSTEP]\nclear R l₁\n[GOAL]\ncase intro.intro.some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL : ListBlank Γ\n⊢ ∀ (q : Stmt₁) (R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n[PROOFSTEP]\nintro q R\n[GOAL]\ncase intro.intro.some\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv : σ\nL : ListBlank Γ\nq : Stmt₁\nR : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\n[PROOFSTEP]\ninduction' q generalizing v L R\n[GOAL]\ncase intro.intro.some.move\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Dir\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.move a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.write\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝ : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase move d q IH =>\n  cases d <;>\n      simp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons, Tape.move_left_mk',\n        ListBlank.cons_head_tail, ListBlank.tail_cons, trTape'_move_left enc0, trTape'_move_right enc0] <;>\n    apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nd : Dir\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move d q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.move d q) v (Tape.mk' L R)))\n[PROOFSTEP]\ncase move d q IH =>\n  cases d <;>\n      simp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons, Tape.move_left_mk',\n        ListBlank.cons_head_tail, ListBlank.tail_cons, trTape'_move_left enc0, trTape'_move_right enc0] <;>\n    apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nd : Dir\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move d q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.move d q) v (Tape.mk' L R)))\n[PROOFSTEP]\ncases d\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move Dir.left q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.move Dir.left q) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons, Tape.move_left_mk', ListBlank.cons_head_tail,\n  ListBlank.tail_cons, trTape'_move_left enc0, trTape'_move_right enc0]\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.move Dir.right q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.move Dir.right q) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, iterate, stepAux_move, stepAux, ListBlank.head_cons, Tape.move_left_mk', ListBlank.cons_head_tail,\n  ListBlank.tail_cons, trTape'_move_left enc0, trTape'_move_right enc0]\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (stepAux (trNormal dec q) v (trTape' enc0 (ListBlank.tail L) (ListBlank.cons (ListBlank.head L) R)))\n    (trCfg enc enc0 (stepAux q v (Tape.mk' (ListBlank.tail L) (ListBlank.cons (ListBlank.head L) R))))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (stepAux (trNormal dec q) v (trTape' enc0 (ListBlank.cons (ListBlank.head R) L) (ListBlank.tail R)))\n    (trCfg enc enc0 (stepAux q v (Tape.move Dir.right (Tape.mk' L R))))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase intro.intro.some.write\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.write a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝ : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase write f q IH =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n  refine' ReflTransGen.head rfl _\n  obtain ⟨a, R, rfl⟩ := R.exists_cons\n  rw [tr, Tape.mk'_head, stepAux_write, ListBlank.head_cons, stepAux_move, trTape'_move_left enc0, ListBlank.head_cons,\n    ListBlank.tail_cons, Tape.write_mk']\n  apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write f q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.write f q) v (Tape.mk' L R)))\n[PROOFSTEP]\ncase write f q IH =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n  refine' ReflTransGen.head rfl _\n  obtain ⟨a, R, rfl⟩ := R.exists_cons\n  rw [tr, Tape.mk'_head, stepAux_write, ListBlank.head_cons, stepAux_move, trTape'_move_left enc0, ListBlank.head_cons,\n    ListBlank.tail_cons, Tape.write_mk']\n  apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.write f q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.write f q) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.write (f (ListBlank.head R) v) q), var := v, Tape := trTape' enc0 L R }\n    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))\n[PROOFSTEP]\nrefine' ReflTransGen.head rfl _\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)\n    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head R) v) q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux q v (Tape.write (f (Tape.mk' L R).head v) (Tape.mk' L R))))\n[PROOFSTEP]\nobtain ⟨a, R, rfl⟩ := R.exists_cons\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\n⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)\n    (stepAux (tr enc dec M (Λ'.write (f (ListBlank.head (ListBlank.cons a R)) v) q)) v\n      (trTape' enc0 L (ListBlank.cons a R)))\n    (trCfg enc enc0\n      (stepAux q v (Tape.write (f (Tape.mk' L (ListBlank.cons a R)).head v) (Tape.mk' L (ListBlank.cons a R)))))\n[PROOFSTEP]\nrw [tr, Tape.mk'_head, stepAux_write, ListBlank.head_cons, stepAux_move, trTape'_move_left enc0, ListBlank.head_cons,\n  ListBlank.tail_cons, Tape.write_mk']\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL : ListBlank Γ\na : Γ\nR : ListBlank Γ\n⊢ ReflTransGen (fun a b => b ∈ step (tr enc dec M) a)\n    (stepAux (trNormal dec q) v (trTape' enc0 L (ListBlank.cons (f a v) R)))\n    (trCfg enc enc0 (stepAux q v (Tape.mk' L (ListBlank.cons (f a v) R))))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase intro.intro.some.load\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝ : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase load a q IH =>\n  simp only [trNormal, stepAux_read dec enc0 encdec]\n  apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))\n[PROOFSTEP]\ncase load a q IH =>\n  simp only [trNormal, stepAux_read dec enc0 encdec]\n  apply IH\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.load a q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, stepAux_read dec enc0 encdec]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (stepAux (Stmt.load (fun x s => a (ListBlank.head R) s) (trNormal dec q)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.load a q) v (Tape.mk' L R)))\n[PROOFSTEP]\napply IH\n[GOAL]\ncase intro.intro.some.branch\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝¹) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝¹ v (Tape.mk' L R)))\na_ih✝ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec a✝) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux a✝ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch a✝² a✝¹ a✝) v (Tape.mk' L R)))\ncase intro.intro.some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝ : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n  cases p R.head v <;> [apply IH₂; apply IH₁]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch p q₁ q₂)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch p q₁ q₂) v (Tape.mk' L R)))\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n  cases p R.head v <;> [apply IH₂; apply IH₁]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.branch p q₁ q₂)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.branch p q₁ q₂) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, stepAux_read dec enc0 encdec, stepAux]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (bif p (ListBlank.head R) v then stepAux (trNormal dec q₁) v (trTape' enc0 L R)\n    else stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n    (trCfg enc enc0 (bif p (Tape.mk' L R).head v then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))\n[PROOFSTEP]\ncases p R.head v <;> [apply IH₂; apply IH₁]\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (bif p (ListBlank.head R) v then stepAux (trNormal dec q₁) v (trTape' enc0 L R)\n    else stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n    (trCfg enc enc0 (bif p (Tape.mk' L R).head v then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))\n[PROOFSTEP]\ncases p R.head v\n[GOAL]\ncase false\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (bif false then stepAux (trNormal dec q₁) v (trTape' enc0 L R) else stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n    (trCfg enc enc0 (bif false then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))\n[PROOFSTEP]\napply IH₂\n[GOAL]\ncase true\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₁) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₁ v (Tape.mk' L R)))\nIH₂ :\n  ∀ (v : σ) (L R : ListBlank Γ),\n    Reaches (step (tr enc dec M)) (stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n      (trCfg enc enc0 (stepAux q₂ v (Tape.mk' L R)))\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M))\n    (bif true then stepAux (trNormal dec q₁) v (trTape' enc0 L R) else stepAux (trNormal dec q₂) v (trTape' enc0 L R))\n    (trCfg enc enc0 (bif true then stepAux q₁ v (Tape.mk' L R) else stepAux q₂ v (Tape.mk' L R)))\n[PROOFSTEP]\napply IH₁\n[GOAL]\ncase intro.intro.some.goto\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\na✝ : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto a✝)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto a✝) v (Tape.mk' L R)))\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase goto l =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux, trCfg, trTape_mk']\n  apply ReflTransGen.refl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nl : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto l)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto l) v (Tape.mk' L R)))\n[PROOFSTEP]\ncase goto l =>\n  simp only [trNormal, stepAux_read dec enc0 encdec, stepAux, trCfg, trTape_mk']\n  apply ReflTransGen.refl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nl : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec (Stmt.goto l)) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux (Stmt.goto l) v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, stepAux_read dec enc0 encdec, stepAux, trCfg, trTape_mk']\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nl : Γ → σ → Λ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) { l := some (Λ'.normal (l (ListBlank.head R) v)), var := v, Tape := trTape' enc0 L R }\n    { l := Option.map Λ'.normal (some (l (Tape.mk' L R).head v)), var := v, Tape := trTape' enc0 L R }\n[PROOFSTEP]\napply ReflTransGen.refl\n[GOAL]\ncase intro.intro.some.halt\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase\n  halt =>\n  simp only [trNormal, stepAux, trCfg, stepAux_move, trTape'_move_left enc0, trTape'_move_right enc0, trTape_mk']\n  apply ReflTransGen.refl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\ncase\n  halt =>\n  simp only [trNormal, stepAux, trCfg, stepAux_move, trTape'_move_left enc0, trTape'_move_right enc0, trTape_mk']\n  apply ReflTransGen.refl\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) (stepAux (trNormal dec Stmt.halt) v (trTape' enc0 L R))\n    (trCfg enc enc0 (stepAux Stmt.halt v (Tape.mk' L R)))\n[PROOFSTEP]\nsimp only [trNormal, stepAux, trCfg, stepAux_move, trTape'_move_left enc0, trTape'_move_right enc0, trTape_mk']\n[GOAL]\nΓ : Type u_1\ninst✝² : Inhabited Γ\nΛ : Type u_2\ninst✝¹ : Inhabited Λ\nσ : Type u_3\ninst✝ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\nenc₀ : enc default = Vector.replicate n false\nx✝ : Cfg₁\nv✝ : σ\nL✝ R✝ : ListBlank Γ\nv : σ\nL R : ListBlank Γ\n⊢ Reaches (step (tr enc dec M)) { l := none, var := v, Tape := trTape' enc0 L R }\n    { l := Option.map Λ'.normal none, var := v, Tape := trTape' enc0 L R }\n[PROOFSTEP]\napply ReflTransGen.refl\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q)\n[PROOFSTEP]\nsuffices\n  ∀ q,\n    SupportsStmt S q →\n      (∀ q' ∈ writes q, q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ q' ∈ writes q, SupportsStmt (trSupp M S) (tr enc dec M q')\n  by\n  rcases Finset.mem_biUnion.1 h with ⟨l, hl, h⟩\n  have := this _ (ss.2 _ hl) fun q' hq ↦ Finset.mem_biUnion.2 ⟨_, hl, Finset.mem_insert_of_mem hq⟩\n  rcases Finset.mem_insert.1 h with (rfl | h)\n  exacts [this.1, this.2 _ h]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nthis :\n  ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q)\n[PROOFSTEP]\nrcases Finset.mem_biUnion.1 h with ⟨l, hl, h⟩\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh✝ : q ∈ trSupp M S\nthis :\n  ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nl : Λ\nhl : l ∈ S\nh : q ∈ insert (Λ'.normal l) (writes (M l))\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q)\n[PROOFSTEP]\nhave := this _ (ss.2 _ hl) fun q' hq ↦ Finset.mem_biUnion.2 ⟨_, hl, Finset.mem_insert_of_mem hq⟩\n[GOAL]\ncase intro.intro\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh✝ : q ∈ trSupp M S\nthis✝ :\n  ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nl : Λ\nhl : l ∈ S\nh : q ∈ insert (Λ'.normal l) (writes (M l))\nthis :\n  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q)\n[PROOFSTEP]\nrcases Finset.mem_insert.1 h with (rfl | h)\n[GOAL]\ncase intro.intro.inl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nthis✝ :\n  ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nl : Λ\nhl : l ∈ S\nthis :\n  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')\nh✝ : Λ'.normal l ∈ trSupp M S\nh : Λ'.normal l ∈ insert (Λ'.normal l) (writes (M l))\n⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.normal l))\ncase intro.intro.inr\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh✝¹ : q ∈ trSupp M S\nthis✝ :\n  ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nl : Λ\nhl : l ∈ S\nh✝ : q ∈ insert (Λ'.normal l) (writes (M l))\nthis :\n  SupportsStmt (trSupp M S) (trNormal dec (M l)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (M l) → SupportsStmt (trSupp M S) (tr enc dec M q')\nh : q ∈ writes (M l)\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q)\n[PROOFSTEP]\nexacts [this.1, this.2 _ h]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\n⊢ ∀ (q : Stmt₁),\n    SupportsStmt S q →\n      (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n        SupportsStmt (trSupp M S) (trNormal dec q) ∧\n          ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nintro q hs hw\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nq : Stmt₁\nhs : SupportsStmt S q\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ninduction q\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Dir\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.move a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  SupportsStmt S a✝¹ →\n    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝ : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase move d q IH =>\n  unfold writes at hw ⊢\n  replace IH := IH hs hw; refine' ⟨_, IH.2⟩\n  cases d <;> simp only [trNormal, iterate, supportsStmt_move, IH]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nd : Dir\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move d q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase move d q IH =>\n  unfold writes at hw ⊢\n  replace IH := IH hs hw; refine' ⟨_, IH.2⟩\n  cases d <;> simp only [trNormal, iterate, supportsStmt_move, IH]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nd : Dir\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move d q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.move d q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nunfold writes at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nd : Dir\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move d q)\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nreplace IH := IH hs hw\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nd : Dir\nq : Stmt₁\nhs : SupportsStmt S (Stmt.move d q)\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrefine' ⟨_, IH.2⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nd : Dir\nq : Stmt₁\nhs : SupportsStmt S (Stmt.move d q)\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move d q))\n[PROOFSTEP]\ncases d\n[GOAL]\ncase left\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nq : Stmt₁\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move Dir.left q)\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move Dir.left q))\n[PROOFSTEP]\nsimp only [trNormal, iterate, supportsStmt_move, IH]\n[GOAL]\ncase right\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nq : Stmt₁\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.move Dir.right q)\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.move Dir.right q))\n[PROOFSTEP]\nsimp only [trNormal, iterate, supportsStmt_move, IH]\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Γ → σ → Γ\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.write a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  SupportsStmt S a✝¹ →\n    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝ : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase write f q IH =>\n  unfold writes at hw ⊢\n  simp only [Finset.mem_image, Finset.mem_union, Finset.mem_univ, exists_prop, true_and_iff] at hw ⊢\n  replace IH := IH hs fun q hq ↦ hw q (Or.inr hq)\n  refine' ⟨supportsStmt_read _ fun a _ s ↦ hw _ (Or.inl ⟨_, rfl⟩), fun q' hq ↦ _⟩\n  rcases hq with (⟨a, q₂, rfl⟩ | hq)\n  · simp only [tr, supportsStmt_write, supportsStmt_move, IH.1]\n  · exact IH.2 _ hq\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase write f q IH =>\n  unfold writes at hw ⊢\n  simp only [Finset.mem_image, Finset.mem_union, Finset.mem_univ, exists_prop, true_and_iff] at hw ⊢\n  replace IH := IH hs fun q hq ↦ hw q (Or.inr hq)\n  refine' ⟨supportsStmt_read _ fun a _ s ↦ hw _ (Or.inl ⟨_, rfl⟩), fun q' hq ↦ _⟩\n  rcases hq with (⟨a, q₂, rfl⟩ | hq)\n  · simp only [tr, supportsStmt_write, supportsStmt_move, IH.1]\n  · exact IH.2 _ hq\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.write f q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nunfold writes at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧\n    ∀ (q' : Λ'),\n      q' ∈ Finset.image (fun a => Λ'.write a q) Finset.univ ∪ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nsimp only [Finset.mem_image, Finset.mem_union, Finset.mem_univ, exists_prop, true_and_iff] at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧\n    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nreplace IH := IH hs fun q hq ↦ hw q (Or.inr hq)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.write f q)) ∧\n    ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrefine' ⟨supportsStmt_read _ fun a _ s ↦ hw _ (Or.inl ⟨_, rfl⟩), fun q' hq ↦ _⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nq' : Λ'\nhq : (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrcases hq with (⟨a, q₂, rfl⟩ | hq)\n[GOAL]\ncase inl.intro.refl\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\na : Γ\n⊢ SupportsStmt (trSupp M S) (tr enc dec M (Λ'.write a q))\n[PROOFSTEP]\nsimp only [tr, supportsStmt_write, supportsStmt_move, IH.1]\n[GOAL]\ncase inr\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\nf : Γ → σ → Γ\nq : Stmt₁\nhs : SupportsStmt S (Stmt.write f q)\nhw : ∀ (q' : Λ'), (∃ a, Λ'.write a q = q') ∨ q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nq' : Λ'\nhq : q' ∈ writes q\n⊢ SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nexact IH.2 _ hq\n[GOAL]\ncase load\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝¹ : Γ → σ → σ\na✝ : Stmt₁\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  SupportsStmt S a✝¹ →\n    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝ : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase load a q IH =>\n  unfold writes at hw ⊢\n  replace IH := IH hs hw\n  refine' ⟨supportsStmt_read _ fun _ ↦ IH.1, IH.2⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase load a q IH =>\n  unfold writes at hw ⊢\n  replace IH := IH hs hw\n  refine' ⟨supportsStmt_read _ fun _ ↦ IH.1, IH.2⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a q)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.load a q) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nunfold writes at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\na : Γ → σ → σ\nq : Stmt₁\nIH :\n  SupportsStmt S q →\n    (∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q) ∧\n        ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.load a q)\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nreplace IH := IH hs hw\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq✝ : Λ'\nh : q✝ ∈ trSupp M S\na : Γ → σ → σ\nq : Stmt₁\nhs : SupportsStmt S (Stmt.load a q)\nhw : ∀ (q' : Λ'), q' ∈ writes q → q' ∈ trSupp M S\nIH :\n  SupportsStmt (trSupp M S) (trNormal dec q) ∧ ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.load a q)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrefine' ⟨supportsStmt_read _ fun _ ↦ IH.1, IH.2⟩\n[GOAL]\ncase branch\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝² : Γ → σ → Bool\na✝¹ a✝ : Stmt₁\na_ih✝¹ :\n  SupportsStmt S a✝¹ →\n    (∀ (q' : Λ'), q' ∈ writes a✝¹ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝¹) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝¹ → SupportsStmt (trSupp M S) (tr enc dec M q')\na_ih✝ :\n  SupportsStmt S a✝ →\n    (∀ (q' : Λ'), q' ∈ writes a✝ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec a✝) ∧\n        ∀ (q' : Λ'), q' ∈ writes a✝ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch a✝² a✝¹ a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch a✝² a✝¹ a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch a✝² a✝¹ a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝ : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  unfold writes at hw ⊢\n  simp only [Finset.mem_union] at hw ⊢\n  replace IH₁ := IH₁ hs.1 fun q hq ↦ hw q (Or.inl hq)\n  replace IH₂ := IH₂ hs.2 fun q hq ↦ hw q (Or.inr hq)\n  exact ⟨supportsStmt_read _ fun _ ↦ ⟨IH₁.1, IH₂.1⟩, fun q ↦ Or.rec (IH₁.2 _) (IH₂.2 _)⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  SupportsStmt S q₁ →\n    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\nIH₂ :\n  SupportsStmt S q₂ →\n    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase branch p q₁ q₂ IH₁ IH₂ =>\n  unfold writes at hw ⊢\n  simp only [Finset.mem_union] at hw ⊢\n  replace IH₁ := IH₁ hs.1 fun q hq ↦ hw q (Or.inl hq)\n  replace IH₂ := IH₂ hs.2 fun q hq ↦ hw q (Or.inr hq)\n  exact ⟨supportsStmt_read _ fun _ ↦ ⟨IH₁.1, IH₂.1⟩, fun q ↦ Or.rec (IH₁.2 _) (IH₂.2 _)⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  SupportsStmt S q₁ →\n    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\nIH₂ :\n  SupportsStmt S q₂ →\n    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.branch p q₁ q₂) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nunfold writes at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  SupportsStmt S q₁ →\n    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\nIH₂ :\n  SupportsStmt S q₂ →\n    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ ∪ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nsimp only [Finset.mem_union] at hw ⊢\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₁ :\n  SupportsStmt S q₁ →\n    (∀ (q' : Λ'), q' ∈ writes q₁ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\nIH₂ :\n  SupportsStmt S q₂ →\n    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nreplace IH₁ := IH₁ hs.1 fun q hq ↦ hw q (Or.inl hq)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nIH₂ :\n  SupportsStmt S q₂ →\n    (∀ (q' : Λ'), q' ∈ writes q₂ → q' ∈ trSupp M S) →\n      SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n        ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S\nIH₁ :\n  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nreplace IH₂ := IH₂ hs.2 fun q hq ↦ hw q (Or.inr hq)\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\np : Γ → σ → Bool\nq₁ q₂ : Stmt₁\nhs : SupportsStmt S (Stmt.branch p q₁ q₂)\nhw : ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → q' ∈ trSupp M S\nIH₁ :\n  SupportsStmt (trSupp M S) (trNormal dec q₁) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ → SupportsStmt (trSupp M S) (tr enc dec M q')\nIH₂ :\n  SupportsStmt (trSupp M S) (trNormal dec q₂) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.branch p q₁ q₂)) ∧\n    ∀ (q' : Λ'), q' ∈ writes q₁ ∨ q' ∈ writes q₂ → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nexact ⟨supportsStmt_read _ fun _ ↦ ⟨IH₁.1, IH₂.1⟩, fun q ↦ Or.rec (IH₁.2 _) (IH₂.2 _)⟩\n[GOAL]\ncase goto\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\na✝ : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto a✝)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto a✝)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto a✝) → SupportsStmt (trSupp M S) (tr enc dec M q')\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase goto l =>\n  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩\n  refine' supportsStmt_read _ fun a _ s ↦ _\n  exact Finset.mem_biUnion.2 ⟨_, hs _ _, Finset.mem_insert_self _ _⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nl : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto l)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase goto l =>\n  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩\n  refine' supportsStmt_read _ fun a _ s ↦ _\n  exact Finset.mem_biUnion.2 ⟨_, hs _ _, Finset.mem_insert_self _ _⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nl : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto l)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧\n    ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nsimp only [writes, Finset.not_mem_empty]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nl : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto l)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l)) ∧\n    ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrefine' ⟨_, fun _ ↦ False.elim⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nl : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto l)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec (Stmt.goto l))\n[PROOFSTEP]\nrefine' supportsStmt_read _ fun a _ s ↦ _\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nl : Γ → σ → Λ\nhs : SupportsStmt S (Stmt.goto l)\nhw : ∀ (q' : Λ'), q' ∈ writes (Stmt.goto l) → q' ∈ trSupp M S\na : Γ\nx✝ : Bool\ns : σ\n⊢ (fun x s => Λ'.normal (l a s)) x✝ s ∈ trSupp M S\n[PROOFSTEP]\nexact Finset.mem_biUnion.2 ⟨_, hs _ _, Finset.mem_insert_self _ _⟩\n[GOAL]\ncase halt\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase halt =>\n  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩\n  simp only [SupportsStmt, supportsStmt_move, trNormal]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\ncase halt =>\n  simp only [writes, Finset.not_mem_empty]; refine' ⟨_, fun _ ↦ False.elim⟩\n  simp only [SupportsStmt, supportsStmt_move, trNormal]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧\n    ∀ (q' : Λ'), q' ∈ writes Stmt.halt → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nsimp only [writes, Finset.not_mem_empty]\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt) ∧ ∀ (q' : Λ'), False → SupportsStmt (trSupp M S) (tr enc dec M q')\n[PROOFSTEP]\nrefine' ⟨_, fun _ ↦ False.elim⟩\n[GOAL]\nΓ : Type u_1\ninst✝³ : Inhabited Γ\nΛ : Type u_2\ninst✝² : Inhabited Λ\nσ : Type u_3\ninst✝¹ : Inhabited σ\nn : ℕ\nenc : Γ → Vector Bool n\ndec : Vector Bool n → Γ\nenc0 : enc default = Vector.replicate n false\nM : Λ → Stmt₁\nencdec : ∀ (a : Γ), dec (enc a) = a\ninst✝ : Fintype Γ\nS : Finset Λ\nss : Supports M S\nq : Λ'\nh : q ∈ trSupp M S\nhs : SupportsStmt S Stmt.halt\nhw : ∀ (q' : Λ'), q' ∈ writes Stmt.halt → q' ∈ trSupp M S\n⊢ SupportsStmt (trSupp M S) (trNormal dec Stmt.halt)\n[PROOFSTEP]\nsimp only [SupportsStmt, supportsStmt_move, trNormal]\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\n⊢ FRespects (TM1.step (tr M)) (fun a => trCfg M a) (trCfg M { q := q, Tape := T }) (TM0.step M { q := q, Tape := T })\n[PROOFSTEP]\ncases' e : M q T.1 with val\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\ne : M q T.head = none\n⊢ FRespects (TM1.step (tr M)) (fun a => trCfg M a) (trCfg M { q := q, Tape := T }) (TM0.step M { q := q, Tape := T })\n[PROOFSTEP]\nsimp only [TM0.step, trCfg, e]\n[GOAL]\ncase none\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\ne : M q T.head = none\n⊢ FRespects (TM1.step (tr M))\n    (fun a =>\n      { l := bif Option.isSome (M a.q a.Tape.head) then some (Λ'.normal a.q) else none, var := (), Tape := a.Tape })\n    { l := bif Option.isSome none then some (Λ'.normal q) else none, var := (), Tape := T }\n    (Option.map\n      (fun x =>\n        { q := x.fst,\n          Tape :=\n            match x.snd with\n            | TM0.Stmt.move d => Tape.move d T\n            | TM0.Stmt.write a => Tape.write a T })\n      none)\n[PROOFSTEP]\nexact Eq.refl none\n[GOAL]\ncase some\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nval : Λ × TM0.Stmt Γ\ne : M q T.head = some val\n⊢ FRespects (TM1.step (tr M)) (fun a => trCfg M a) (trCfg M { q := q, Tape := T }) (TM0.step M { q := q, Tape := T })\n[PROOFSTEP]\ncases' val with q' s\n[GOAL]\ncase some.mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\ne : M q T.head = some (q', s)\n⊢ FRespects (TM1.step (tr M)) (fun a => trCfg M a) (trCfg M { q := q, Tape := T }) (TM0.step M { q := q, Tape := T })\n[PROOFSTEP]\nsimp only [FRespects, TM0.step, trCfg, e, Option.isSome, cond, Option.map_some']\n[GOAL]\ncase some.mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\ne : M q T.head = some (q', s)\n⊢ Reaches₁ (TM1.step (tr M)) { l := some (Λ'.normal q), var := (), Tape := T }\n    {\n      l :=\n        match\n          match\n            M q'\n              (match s with\n                | TM0.Stmt.move d => Tape.move d T\n                | TM0.Stmt.write a => Tape.write a T).head with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nrevert e\n[GOAL]\ncase some.mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\n⊢ M q T.head = some (q', s) →\n    Reaches₁ (TM1.step (tr M)) { l := some (Λ'.normal q), var := (), Tape := T }\n      {\n        l :=\n          match\n            match\n              M q'\n                (match s with\n                  | TM0.Stmt.move d => Tape.move d T\n                  | TM0.Stmt.write a => Tape.write a T).head with\n            | some val => true\n            | none => false with\n          | true => some (Λ'.normal q')\n          | false => none,\n        var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nhave :\n  TM1.step (tr M) ⟨some (Λ'.act s q'), (), T⟩ =\n    some\n      ⟨some (Λ'.normal q'), (),\n        match s with\n        | TM0.Stmt.move d => T.move d\n        | TM0.Stmt.write a => T.write a⟩ :=\n  by cases' s with d a <;> rfl\n[GOAL]\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\n⊢ TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\ncases' s with d a\n[GOAL]\ncase move\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\nd : Dir\n⊢ TM1.step (tr M) { l := some (Λ'.act (TM0.Stmt.move d) q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match TM0.Stmt.move d with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase write\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\na : Γ\n⊢ TM1.step (tr M) { l := some (Λ'.act (TM0.Stmt.write a) q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match TM0.Stmt.write a with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n⊢ M q T.head = some (q', s) →\n    Reaches₁ (TM1.step (tr M)) { l := some (Λ'.normal q), var := (), Tape := T }\n      {\n        l :=\n          match\n            match\n              M q'\n                (match s with\n                  | TM0.Stmt.move d => Tape.move d T\n                  | TM0.Stmt.write a => Tape.write a T).head with\n            | some val => true\n            | none => false with\n          | true => some (Λ'.normal q')\n          | false => none,\n        var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nintro e\n[GOAL]\ncase some.mk\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\n⊢ Reaches₁ (TM1.step (tr M)) { l := some (Λ'.normal q), var := (), Tape := T }\n    {\n      l :=\n        match\n          match\n            M q'\n              (match s with\n                | TM0.Stmt.move d => Tape.move d T\n                | TM0.Stmt.write a => Tape.write a T).head with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nrefine' TransGen.head _ (TransGen.head' this _)\n[GOAL]\ncase some.mk.refine'_1\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\n⊢ { l := some (Λ'.act s q'), var := (), Tape := T } ∈ TM1.step (tr M) { l := some (Λ'.normal q), var := (), Tape := T }\n[PROOFSTEP]\nsimp only [TM1.step, TM1.stepAux]\n[GOAL]\ncase some.mk.refine'_1\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\n⊢ { l := some (Λ'.act s q'), var := (), Tape := T } ∈\n    some\n      (bif Option.isNone (M q T.head) then { l := none, var := (), Tape := T }\n      else\n        {\n          l :=\n            some\n              (match M q T.head with\n              | none => default\n              | some (q', s) => Λ'.act s q'),\n          var := (), Tape := T })\n[PROOFSTEP]\nrw [e]\n[GOAL]\ncase some.mk.refine'_1\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\n⊢ { l := some (Λ'.act s q'), var := (), Tape := T } ∈\n    some\n      (bif Option.isNone (some (q', s)) then { l := none, var := (), Tape := T }\n      else\n        {\n          l :=\n            some\n              (match some (q', s) with\n              | none => default\n              | some (q', s) => Λ'.act s q'),\n          var := (), Tape := T })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.mk.refine'_2\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\n⊢ ReflTransGen (fun a b => b ∈ TM1.step (tr M) a)\n    { l := some (Λ'.normal q'), var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n    {\n      l :=\n        match\n          match\n            M q'\n              (match s with\n                | TM0.Stmt.move d => Tape.move d T\n                | TM0.Stmt.write a => Tape.write a T).head with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\ncases e' : M q' _\n[GOAL]\ncase some.mk.refine'_2.none\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\ne' :\n  M q'\n      (match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T).head =\n    none\n⊢ ReflTransGen (fun a b => b ∈ TM1.step (tr M) a)\n    { l := some (Λ'.normal q'), var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n    {\n      l :=\n        match\n          match none with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\napply ReflTransGen.single\n[GOAL]\ncase some.mk.refine'_2.none.hab\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\ne' :\n  M q'\n      (match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T).head =\n    none\n⊢ {\n      l :=\n        match\n          match none with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T } ∈\n    TM1.step (tr M)\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nsimp only [TM1.step, TM1.stepAux]\n[GOAL]\ncase some.mk.refine'_2.none.hab\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\ne' :\n  M q'\n      (match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T).head =\n    none\n⊢ { l := none, var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T } ∈\n    some\n      (bif\n          Option.isNone\n            (M q'\n              (match s with\n                | TM0.Stmt.move d => Tape.move d T\n                | TM0.Stmt.write a => Tape.write a T).head) then\n        { l := none, var := (),\n          Tape :=\n            match s with\n            | TM0.Stmt.move d => Tape.move d T\n            | TM0.Stmt.write a => Tape.write a T }\n      else\n        {\n          l :=\n            some\n              (match\n                M q'\n                  (match s with\n                    | TM0.Stmt.move d => Tape.move d T\n                    | TM0.Stmt.write a => Tape.write a T).head with\n              | none => default\n              | some (q', s) => Λ'.act s q'),\n          var := (),\n          Tape :=\n            match s with\n            | TM0.Stmt.move d => Tape.move d T\n            | TM0.Stmt.write a => Tape.write a T })\n[PROOFSTEP]\nrw [e']\n[GOAL]\ncase some.mk.refine'_2.none.hab\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\ne' :\n  M q'\n      (match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T).head =\n    none\n⊢ { l := none, var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T } ∈\n    some\n      (bif Option.isNone none then\n        { l := none, var := (),\n          Tape :=\n            match s with\n            | TM0.Stmt.move d => Tape.move d T\n            | TM0.Stmt.write a => Tape.write a T }\n      else\n        {\n          l :=\n            some\n              (match none with\n              | none => default\n              | some (q', s) => Λ'.act s q'),\n          var := (),\n          Tape :=\n            match s with\n            | TM0.Stmt.move d => Tape.move d T\n            | TM0.Stmt.write a => Tape.write a T })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.mk.refine'_2.some\nΓ : Type u_1\ninst✝¹ : Inhabited Γ\nΛ : Type u_2\ninst✝ : Inhabited Λ\nM : TM0.Machine Γ Λ\nx✝ : Cfg₀\nq : Λ\nT : Tape Γ\nq' : Λ\ns : TM0.Stmt Γ\nthis :\n  TM1.step (tr M) { l := some (Λ'.act s q'), var := (), Tape := T } =\n    some\n      { l := some (Λ'.normal q'), var := (),\n        Tape :=\n          match s with\n          | TM0.Stmt.move d => Tape.move d T\n          | TM0.Stmt.write a => Tape.write a T }\ne : M q T.head = some (q', s)\nval✝ : Λ × TM0.Stmt Γ\ne' :\n  M q'\n      (match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T).head =\n    some val✝\n⊢ ReflTransGen (fun a b => b ∈ TM1.step (tr M) a)\n    { l := some (Λ'.normal q'), var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n    {\n      l :=\n        match\n          match some val✝ with\n          | some val => true\n          | none => false with\n        | true => some (Λ'.normal q')\n        | false => none,\n      var := (),\n      Tape :=\n        match s with\n        | TM0.Stmt.move d => Tape.move d T\n        | TM0.Stmt.write a => Tape.write a T }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq : Stmt₂\n⊢ q ∈ stmts₁ q\n[PROOFSTEP]\ncases q\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nk✝ : K\na✝¹ : σ → Γ k✝\na✝ : Stmt₂\n⊢ push k✝ a✝¹ a✝ ∈ stmts₁ (push k✝ a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nk✝ : K\na✝¹ : σ → Option (Γ k✝) → σ\na✝ : Stmt₂\n⊢ peek k✝ a✝¹ a✝ ∈ stmts₁ (peek k✝ a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nk✝ : K\na✝¹ : σ → Option (Γ k✝) → σ\na✝ : Stmt₂\n⊢ pop k✝ a✝¹ a✝ ∈ stmts₁ (pop k✝ a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\na✝¹ : σ → σ\na✝ : Stmt₂\n⊢ load a✝¹ a✝ ∈ stmts₁ (load a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\n⊢ branch a✝² a✝¹ a✝ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\na✝ : σ → Λ\n⊢ goto a✝ ∈ stmts₁ (goto a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\n⊢ halt ∈ stmts₁ halt\n[PROOFSTEP]\nsimp only [Finset.mem_insert_self, Finset.mem_singleton_self, stmts₁]\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\n⊢ q₁ ∈ stmts₁ q₂ → stmts₁ q₁ ⊆ stmts₁ q₂\n[PROOFSTEP]\nintro h₁₂ q₀ h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\n⊢ q₀ ∈ stmts₁ q₂\n[PROOFSTEP]\ninduction' q₂ with _ _ q IH _ _ q IH _ _ q IH _ q IH\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (push k✝ a✝ q)\n⊢ q₀ ∈ stmts₁ (push k✝ a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (peek k✝ a✝ q)\n⊢ q₀ ∈ stmts₁ (peek k✝ a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (pop k✝ a✝ q)\n⊢ q₀ ∈ stmts₁ (pop k✝ a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ (load a✝ q)\n⊢ q₀ ∈ stmts₁ (load a✝ q)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n⊢ q₀ ∈ stmts₁ (branch a✝² a✝¹ a✝)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ ∈ stmts₁ (goto a✝)\n⊢ q₀ ∈ stmts₁ (goto a✝)\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ ∈ stmts₁ halt\n⊢ q₀ ∈ stmts₁ halt\n[PROOFSTEP]\nsimp only [stmts₁] at h₁₂ ⊢\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ insert (load a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ ∈ {goto a✝}\n⊢ q₀ ∈ {goto a✝}\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ ∈ {halt}\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nsimp only [Finset.mem_insert, Finset.mem_singleton, Finset.mem_union] at h₁₂ \n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\niterate 4 \n  rcases h₁₂ with (rfl | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase push.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nh₁₂ : push k✝ a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (push k✝ a✝ q)\nIH : push k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase push.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nh₁₂ : push k✝ a✝ q ∈ stmts₁ q₂\nIH : push k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase push.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (push k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase peek.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nh₁₂ : peek k✝ a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (peek k✝ a✝ q)\nIH : peek k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase peek.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nh₁₂ : peek k✝ a✝ q ∈ stmts₁ q₂\nIH : peek k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase peek.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (peek k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase pop.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nh₁₂ : pop k✝ a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (pop k✝ a✝ q)\nIH : pop k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase pop.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nh₁₂ : pop k✝ a✝ q ∈ stmts₁ q₂\nIH : pop k✝ a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase pop.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (pop k✝ a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂)\n[GOAL]\ncase load.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\na✝ : σ → σ\nq : Stmt₂\nh₁₂ : load a✝ q ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (load a✝ q)\nIH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase load.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\na✝ : σ → σ\nq : Stmt₂\nh₁₂ : load a✝ q ∈ stmts₁ q₂\nIH : load a✝ q ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₀₁ : q₀ ∈ insert (load a✝ q) (stmts₁ q)\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase load.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → q₀ ∈ stmts₁ q\nh₁₂ : q₁ ∈ stmts₁ q\n⊢ q₀ ∈ insert (load a✝ q) (stmts₁ q)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (IH h₁₂)\n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → q₀ ∈ stmts₁ a✝¹\na_ih✝ : q₁ ∈ stmts₁ a✝ → q₀ ∈ stmts₁ a✝\nh₁₂ : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ q₀ ∈ insert (branch a✝² a✝¹ a✝) (stmts₁ a✝¹ ∪ stmts₁ a✝)\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase branch f q₁ q₂ IH₁ IH₂ =>\n  rcases h₁₂ with (rfl | h₁₂ | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_left _ (IH₁ h₁₂))\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_right _ (IH₂ h₁₂))\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁✝ q₂✝ : Stmt₂\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ = branch f q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\ncase branch f q₁ q₂ IH₁ IH₂ =>\n  rcases h₁₂ with (rfl | h₁₂ | h₁₂)\n  · unfold stmts₁ at h₀₁ \n    exact h₀₁\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_left _ (IH₁ h₁₂))\n  · exact Finset.mem_insert_of_mem (Finset.mem_union_right _ (IH₂ h₁₂))\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁✝ q₂✝ : Stmt₂\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ = branch f q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nrcases h₁₂ with (rfl | h₁₂ | h₁₂)\n[GOAL]\ncase inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂✝ q₀ : Stmt₂\nf : σ → Bool\nq₁ q₂ : Stmt₂\nh₁₂ : branch f q₁ q₂ ∈ stmts₁ q₂✝\nh₀₁ : q₀ ∈ stmts₁ (branch f q₁ q₂)\nIH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nunfold stmts₁ at h₀₁ \n[GOAL]\ncase inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂✝ q₀ : Stmt₂\nf : σ → Bool\nq₁ q₂ : Stmt₂\nh₁₂ : branch f q₁ q₂ ∈ stmts₁ q₂✝\nIH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase inr.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁✝ q₂✝ : Stmt₂\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ ∈ stmts₁ q₁\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_left _ (IH₁ h₁₂))\n[GOAL]\ncase inr.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁✝ q₂✝ : Stmt₂\nh₁₂✝ : q₁✝ ∈ stmts₁ q₂✝\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → q₀ ∈ stmts₁ q₁\nIH₂ : q₁✝ ∈ stmts₁ q₂ → q₀ ∈ stmts₁ q₂\nh₁₂ : q₁✝ ∈ stmts₁ q₂\n⊢ q₀ ∈ insert (branch f q₁ q₂) (stmts₁ q₁ ∪ stmts₁ q₂)\n[PROOFSTEP]\nexact Finset.mem_insert_of_mem (Finset.mem_union_right _ (IH₂ h₁₂))\n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\na✝ : σ → Λ\nh₁₂ : q₁ = goto a✝\n⊢ q₀ ∈ {goto a✝}\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase goto l => subst h₁₂; exact h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nl : σ → Λ\nh₁₂ : q₁ = goto l\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\ncase goto l => subst h₁₂; exact h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nl : σ → Λ\nh₁₂ : q₁ = goto l\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\nsubst h₁₂\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nl : σ → Λ\nh₁₂ : goto l ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ (goto l)\n⊢ q₀ ∈ {goto l}\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase halt => subst h₁₂; exact h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\ncase halt => subst h₁₂; exact h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₁ q₂ : Stmt₂\nh₁₂✝ : q₁ ∈ stmts₁ q₂\nq₀ : Stmt₂\nh₀₁ : q₀ ∈ stmts₁ q₁\nh₁₂ : q₁ = halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nsubst h₁₂\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nq₂ q₀ : Stmt₂\nh₁₂ : halt ∈ stmts₁ q₂\nh₀₁ : q₀ ∈ stmts₁ halt\n⊢ q₀ ∈ {halt}\n[PROOFSTEP]\nexact h₀₁\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh : q₁ ∈ stmts₁ q₂\nhs : SupportsStmt S q₂\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ninduction' q₂ with _ _ q IH _ _ q IH _ _ q IH _ q IH\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (push k✝ a✝ q)\nhs : SupportsStmt S (push k✝ a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (peek k✝ a✝ q)\nhs : SupportsStmt S (peek k✝ a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (pop k✝ a✝ q)\nhs : SupportsStmt S (pop k✝ a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (load a✝ q)\nhs : SupportsStmt S (load a✝ q)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nh : q₁ ∈ stmts₁ (branch a✝² a✝¹ a✝)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nh : q₁ ∈ stmts₁ (goto a✝)\nhs : SupportsStmt S (goto a✝)\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nh : q₁ ∈ stmts₁ halt\nhs : SupportsStmt S halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsimp only [stmts₁, SupportsStmt, Finset.mem_insert, Finset.mem_union, Finset.mem_singleton] at h hs \n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\niterate 4 rcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase push\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = push k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase push.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nhs : SupportsStmt S q\nh : push k✝ a✝ q ∈ stmts₁ q₂\nIH : push k✝ a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (push k✝ a✝ q)\n⊢ SupportsStmt S (push k✝ a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase push.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase peek\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = peek k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase peek.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nhs : SupportsStmt S q\nh : peek k✝ a✝ q ∈ stmts₁ q₂\nIH : peek k✝ a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (peek k✝ a✝ q)\n⊢ SupportsStmt S (peek k✝ a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase peek.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase pop\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = pop k✝ a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase pop.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nhs : SupportsStmt S q\nh : pop k✝ a✝ q ∈ stmts₁ q₂\nIH : pop k✝ a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (pop k✝ a✝ q)\n⊢ SupportsStmt S (pop k✝ a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase pop.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h) <;> [exact hs; exact IH h hs]\n[GOAL]\ncase load\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ = load a✝ q ∨ q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nrcases h with (rfl | h)\n[GOAL]\ncase load.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nhs : SupportsStmt S q\nh : load a✝ q ∈ stmts₁ q₂\nIH : load a✝ q ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S (load a✝ q)\n⊢ SupportsStmt S (load a✝ q)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase load.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → σ\nq : Stmt₂\nIH : q₁ ∈ stmts₁ q → SupportsStmt S q → SupportsStmt S q₁\nhs : SupportsStmt S q\nh : q₁ ∈ stmts₁ q\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nexact IH h hs\n[GOAL]\ncase branch\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : q₁ ∈ stmts₁ a✝¹ → SupportsStmt S a✝¹ → SupportsStmt S q₁\na_ih✝ : q₁ ∈ stmts₁ a✝ → SupportsStmt S a✝ → SupportsStmt S q₁\nhs : SupportsStmt S a✝¹ ∧ SupportsStmt S a✝\nh : q₁ = branch a✝² a✝¹ a✝ ∨ q₁ ∈ stmts₁ a✝¹ ∨ q₁ ∈ stmts₁ a✝\n⊢ SupportsStmt S q₁\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase branch f q₁ q₂ IH₁ IH₂ => rcases h with (rfl | h | h); exacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₂\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ = branch f q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\ncase branch f q₁ q₂ IH₁ IH₂ => rcases h with (rfl | h | h); exacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₂\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ = branch f q₁ q₂ ∨ q₁✝ ∈ stmts₁ q₁ ∨ q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\nrcases h with (rfl | h | h)\n[GOAL]\ncase inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂✝ : Stmt₂\nhs✝ : SupportsStmt S q₂✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : branch f q₁ q₂ ∈ stmts₁ q₂✝\nIH₁ : branch f q₁ q₂ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S (branch f q₁ q₂)\nIH₂ : branch f q₁ q₂ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S (branch f q₁ q₂)\n⊢ SupportsStmt S (branch f q₁ q₂)\ncase inr.inl\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₂\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ ∈ stmts₁ q₁\n⊢ SupportsStmt S q₁✝\ncase inr.inr\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁✝ q₂✝ : Stmt₂\nh✝ : q₁✝ ∈ stmts₁ q₂✝\nhs✝ : SupportsStmt S q₂✝\nf : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ : q₁✝ ∈ stmts₁ q₁ → SupportsStmt S q₁ → SupportsStmt S q₁✝\nIH₂ : q₁✝ ∈ stmts₁ q₂ → SupportsStmt S q₂ → SupportsStmt S q₁✝\nhs : SupportsStmt S q₁ ∧ SupportsStmt S q₂\nh : q₁✝ ∈ stmts₁ q₂\n⊢ SupportsStmt S q₁✝\n[PROOFSTEP]\nexacts [hs, IH₁ h hs.1, IH₂ h hs.2]\n[GOAL]\ncase goto\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\na✝ : σ → Λ\nhs : ∀ (v : σ), a✝ v ∈ S\nh : q₁ = goto a✝\n⊢ SupportsStmt S q₁\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase goto l => subst h; exact hs\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nl : σ → Λ\nhs : ∀ (v : σ), l v ∈ S\nh : q₁ = goto l\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase goto l => subst h; exact hs\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nl : σ → Λ\nhs : ∀ (v : σ), l v ∈ S\nh : q₁ = goto l\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsubst h\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\nl : σ → Λ\nhs : ∀ (v : σ), l v ∈ S\nh : goto l ∈ stmts₁ q₂\n⊢ SupportsStmt S (goto l)\n[PROOFSTEP]\nexact hs\n[GOAL]\ncase halt\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase halt => subst h; trivial\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\ncase halt => subst h; trivial\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh✝ : q₁ ∈ stmts₁ q₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : q₁ = halt\n⊢ SupportsStmt S q₁\n[PROOFSTEP]\nsubst h\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nS : Finset Λ\nq₂ : Stmt₂\nhs✝ : SupportsStmt S q₂\nhs : True\nh : halt ∈ stmts₁ q₂\n⊢ SupportsStmt S halt\n[PROOFSTEP]\ntrivial\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nM : Λ → Stmt₂\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh₁ : q₁ ∈ stmts₁ q₂\n⊢ some q₂ ∈ stmts M S → some q₁ ∈ stmts M S\n[PROOFSTEP]\nsimp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq, forall_eq', exists_imp,\n  and_imp]\n[GOAL]\nK : Type u_1\ninst✝ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\nM : Λ → Stmt₂\nS : Finset Λ\nq₁ q₂ : Stmt₂\nh₁ : q₁ ∈ stmts₁ q₂\n⊢ ∀ (x : Λ), x ∈ S → q₂ ∈ stmts₁ (M x) → ∃ a, a ∈ S ∧ q₁ ∈ stmts₁ (M a)\n[PROOFSTEP]\nexact fun l ls h₂ ↦ ⟨_, ls, stmts₁_trans h₂ h₁⟩\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nq : Stmt₂\nss : Supports M S\n⊢ some q ∈ stmts M S → SupportsStmt S q\n[PROOFSTEP]\nsimp only [stmts, Finset.mem_insertNone, Finset.mem_biUnion, Option.mem_def, Option.some.injEq, forall_eq', exists_imp,\n  and_imp]\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nq : Stmt₂\nss : Supports M S\n⊢ ∀ (x : Λ), x ∈ S → q ∈ stmts₁ (M x) → SupportsStmt S q\n[PROOFSTEP]\nexact fun l ls h ↦ stmts₁_supportsStmt_mono h (ss.2 _ ls)\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : (k : K) → List (Γ k)\nc' : Cfg₂\nh₁ : c' ∈ step M { l := some l₁, var := v, stk := T }\nh₂ : { l := some l₁, var := v, stk := T }.l ∈ ↑Finset.insertNone S\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nreplace h₂ := ss.2 _ (Finset.some_mem_insertNone.1 h₂)\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : (k : K) → List (Γ k)\nc' : Cfg₂\nh₁ : c' ∈ step M { l := some l₁, var := v, stk := T }\nh₂ : SupportsStmt S (M l₁)\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nsimp only [step, Option.mem_def, Option.some.injEq] at h₁ \n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : (k : K) → List (Γ k)\nc' : Cfg₂\nh₂ : SupportsStmt S (M l₁)\nh₁ : stepAux (M l₁) v T = c'\n⊢ c'.l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nsubst c'\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : (k : K) → List (Γ k)\nh₂ : SupportsStmt S (M l₁)\n⊢ (stepAux (M l₁) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nrevert h₂\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (M l₁) → (stepAux (M l₁) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ninduction' M l₁ with _ _ q IH _ _ q IH _ _ q IH _ q IH generalizing v T\n[GOAL]\ncase push\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (push k✝ a✝ q) → (stepAux (push k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase peek\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (peek k✝ a✝ q) → (stepAux (peek k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase pop\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (pop k✝ a✝ q) → (stepAux (pop k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (load a✝ q) → (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (branch a✝² a✝¹ a✝) → (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S (goto a✝) → (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\n⊢ SupportsStmt S halt → (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nintro hs\n[GOAL]\ncase push\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (push k✝ a✝ q)\n⊢ (stepAux (push k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase peek\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (peek k✝ a✝ q)\n⊢ (stepAux (peek k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase pop\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (pop k✝ a✝ q)\n⊢ (stepAux (pop k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\niterate 4 exact IH _ _ hs\n[GOAL]\ncase push\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Γ k✝\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (push k✝ a✝ q)\n⊢ (stepAux (push k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase peek\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (peek k✝ a✝ q)\n⊢ (stepAux (peek k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase pop\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (pop k✝ a✝ q)\n⊢ (stepAux (pop k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase peek\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (peek k✝ a✝ q)\n⊢ (stepAux (peek k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase pop\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (pop k✝ a✝ q)\n⊢ (stepAux (pop k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase pop\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nk✝ : K\na✝ : σ → Option (Γ k✝) → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (pop k✝ a✝ q)\n⊢ (stepAux (pop k✝ a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase load\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → σ\nq : Stmt₂\nIH : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q → (stepAux q v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (load a✝ q)\n⊢ (stepAux (load a✝ q) v T).l ∈ ↑Finset.insertNone S\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH _ _ hs\n[GOAL]\ncase branch\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝² : σ → Bool\na✝¹ a✝ : Stmt₂\na_ih✝¹ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝¹ → (stepAux a✝¹ v T).l ∈ ↑Finset.insertNone S\na_ih✝ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S a✝ → (stepAux a✝ v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch a✝² a✝¹ a✝)\n⊢ (stepAux (branch a✝² a✝¹ a✝) v T).l ∈ ↑Finset.insertNone S\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase branch p q₁' q₂' IH₁ IH₂ =>\n  unfold stepAux; cases p v\n  · exact IH₂ _ _ hs.2\n  · exact IH₁ _ _ hs.1\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\np : σ → Bool\nq₁' q₂' : Stmt₂\nIH₁ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (stepAux (branch p q₁' q₂') v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase branch p q₁' q₂' IH₁ IH₂ =>\n  unfold stepAux; cases p v\n  · exact IH₂ _ _ hs.2\n  · exact IH₁ _ _ hs.1\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\np : σ → Bool\nq₁' q₂' : Stmt₂\nIH₁ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (stepAux (branch p q₁' q₂') v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nunfold stepAux\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\np : σ → Bool\nq₁' q₂' : Stmt₂\nIH₁ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif p v then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncases p v\n[GOAL]\ncase false\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\np : σ → Bool\nq₁' q₂' : Stmt₂\nIH₁ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif false then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH₂ _ _ hs.2\n[GOAL]\ncase true\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\np : σ → Bool\nq₁' q₂' : Stmt₂\nIH₁ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₁' → (stepAux q₁' v T).l ∈ ↑Finset.insertNone S\nIH₂ : ∀ (v : σ) (T : (k : K) → List (Γ k)), SupportsStmt S q₂' → (stepAux q₂' v T).l ∈ ↑Finset.insertNone S\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (branch p q₁' q₂')\n⊢ (bif true then stepAux q₁' v T else stepAux q₂' v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact IH₁ _ _ hs.1\n[GOAL]\ncase goto\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase goto => exact Finset.some_mem_insertNone.2 (hs _)\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase goto => exact Finset.some_mem_insertNone.2 (hs _)\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\na✝ : σ → Λ\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S (goto a✝)\n⊢ (stepAux (goto a✝) v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\nexact Finset.some_mem_insertNone.2 (hs _)\n[GOAL]\ncase halt\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase halt => apply Multiset.mem_cons_self\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\ncase halt => apply Multiset.mem_cons_self\n[GOAL]\nK : Type u_1\ninst✝¹ : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\nσ : Type u_4\ninst✝ : Inhabited Λ\nM : Λ → Stmt₂\nS : Finset Λ\nss : Supports M S\nl₁ : Λ\nv✝ : σ\nT✝ : (k : K) → List (Γ k)\nv : σ\nT : (k : K) → List (Γ k)\nhs : SupportsStmt S halt\n⊢ (stepAux halt v T).l ∈ ↑Finset.insertNone S\n[PROOFSTEP]\napply Multiset.mem_cons_self\n[GOAL]\nK : Type u_1\nΓ : K → Type u_2\nL : ListBlank ((k : K) → Option (Γ k))\nk : K\nS : List (Γ k)\nn : ℕ\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\n⊢ ListBlank.nth L n k = List.get? (List.reverse S) n\n[PROOFSTEP]\nrw [← proj_map_nth, hL, ← List.map_reverse, ListBlank.nth_mk, List.getI_eq_iget_get?, List.get?_map]\n[GOAL]\nK : Type u_1\nΓ : K → Type u_2\nL : ListBlank ((k : K) → Option (Γ k))\nk : K\nS : List (Γ k)\nn : ℕ\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\n⊢ Option.iget (Option.map some (List.get? (List.reverse S) n)) = List.get? (List.reverse S) n\n[PROOFSTEP]\ncases S.reverse.get? n\n[GOAL]\ncase none\nK : Type u_1\nΓ : K → Type u_2\nL : ListBlank ((k : K) → Option (Γ k))\nk : K\nS : List (Γ k)\nn : ℕ\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\n⊢ Option.iget (Option.map some none) = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nK : Type u_1\nΓ : K → Type u_2\nL : ListBlank ((k : K) → Option (Γ k))\nk : K\nS : List (Γ k)\nn : ℕ\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nval✝ : Γ k\n⊢ Option.iget (Option.map some (some val✝)) = some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ default.snd = default\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ ListBlank.map { f := Prod.snd, map_pt' := (_ : default.snd = default.snd) } (addBottom L) = L\n[PROOFSTEP]\nsimp only [addBottom, ListBlank.map_cons]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ ListBlank.cons (ListBlank.head L)\n      (ListBlank.map { f := Prod.snd, map_pt' := (_ : default.snd = default.snd) }\n        (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }\n          (ListBlank.tail L))) =\n    L\n[PROOFSTEP]\nconvert ListBlank.cons_head_tail L\n[GOAL]\ncase h.e'_2.h.e'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ ListBlank.map { f := Prod.snd, map_pt' := (_ : default.snd = default.snd) }\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.tail L)) =\n    ListBlank.tail L\n[PROOFSTEP]\ngeneralize ListBlank.tail L = L'\n[GOAL]\ncase h.e'_2.h.e'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL L' : ListBlank ((k : K) → Option (Γ k))\n⊢ ListBlank.map { f := Prod.snd, map_pt' := (_ : default.snd = default.snd) }\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } L') =\n    L'\n[PROOFSTEP]\nrefine' L'.induction_on fun l ↦ _\n[GOAL]\ncase h.e'_2.h.e'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL L' : ListBlank ((k : K) → Option (Γ k))\nl : List ((k : K) → Option (Γ k))\n⊢ ListBlank.map { f := Prod.snd, map_pt' := (_ : default.snd = default.snd) }\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.mk l)) =\n    ListBlank.mk l\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n⊢ ListBlank.modifyNth (fun a => (a.fst, f a.snd)) n (addBottom L) = addBottom (ListBlank.modifyNth f n L)\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ ListBlank.modifyNth (fun a => (a.fst, f a.snd)) Nat.zero (addBottom L) = addBottom (ListBlank.modifyNth f Nat.zero L)\n[PROOFSTEP]\nsimp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\n⊢ ListBlank.modifyNth (fun a => (a.fst, f a.snd)) (Nat.succ n✝) (addBottom L) =\n    addBottom (ListBlank.modifyNth f (Nat.succ n✝) L)\n[PROOFSTEP]\nsimp only [addBottom, ListBlank.head_cons, ListBlank.modifyNth, ListBlank.tail_cons]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\n⊢ ListBlank.cons (true, ListBlank.head L)\n      (ListBlank.modifyNth (fun a => (a.fst, f a.snd)) n✝\n        (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }\n          (ListBlank.tail L))) =\n    ListBlank.cons (true, ListBlank.head L)\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }\n        (ListBlank.modifyNth f n✝ (ListBlank.tail L)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase succ.e_l\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\n⊢ ListBlank.modifyNth (fun a => (a.fst, f a.snd)) n✝\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.tail L)) =\n    ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }\n      (ListBlank.modifyNth f n✝ (ListBlank.tail L))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase succ.e_l\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\n⊢ ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }\n      (ListBlank.modifyNth f n✝ (ListBlank.tail L)) =\n    ListBlank.modifyNth (fun a => (a.fst, f a.snd)) n✝\n      (ListBlank.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (ListBlank.tail L))\n[PROOFSTEP]\napply ListBlank.map_modifyNth\n[GOAL]\ncase succ.e_l.H\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\n⊢ ∀ (x : (k : K) → Option (Γ k)),\n    PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (f x) =\n      ((PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x).fst,\n        f (PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x).snd)\n[PROOFSTEP]\nintro\n[GOAL]\ncase succ.e_l.H\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nf : ((k : K) → Option (Γ k)) → (k : K) → Option (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nn✝ : ℕ\nx✝ : (k : K) → Option (Γ k)\n⊢ PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } (f x✝) =\n    ((PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x✝).fst,\n      f (PointedMap.f { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) } x✝).snd)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n⊢ (ListBlank.nth (addBottom L) n).snd = ListBlank.nth L n\n[PROOFSTEP]\nconv => rhs; rw [← addBottom_map L, ListBlank.nth_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n| (ListBlank.nth (addBottom L) n).snd = ListBlank.nth L n\n[PROOFSTEP]\nrhs; rw [← addBottom_map L, ListBlank.nth_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n| (ListBlank.nth (addBottom L) n).snd = ListBlank.nth L n\n[PROOFSTEP]\nrhs; rw [← addBottom_map L, ListBlank.nth_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n| (ListBlank.nth (addBottom L) n).snd = ListBlank.nth L n\n[PROOFSTEP]\nrhs\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n| ListBlank.nth L n\n[PROOFSTEP]\nrw [← addBottom_map L, ListBlank.nth_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n⊢ (ListBlank.nth (addBottom L) (n + 1)).fst = false\n[PROOFSTEP]\nrw [ListBlank.nth_succ, addBottom, ListBlank.tail_cons, ListBlank.nth_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ (ListBlank.head (addBottom L)).fst = true\n[PROOFSTEP]\nrw [addBottom, ListBlank.head_cons]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nS : Finset Λ\nk : K\ns : StAct k\nq : Stmt₂\n⊢ TM2.SupportsStmt S (stRun s q) ↔ TM2.SupportsStmt S q\n[PROOFSTEP]\ncases s\n[GOAL]\ncase push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nS : Finset Λ\nk : K\nq : Stmt₂\na✝ : σ → Γ k\n⊢ TM2.SupportsStmt S (stRun (push a✝) q) ↔ TM2.SupportsStmt S q\n[PROOFSTEP]\nrfl\n[GOAL]\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nS : Finset Λ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ TM2.SupportsStmt S (stRun (peek a✝) q) ↔ TM2.SupportsStmt S q\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nS : Finset Λ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ TM2.SupportsStmt S (stRun (pop a✝) q) ↔ TM2.SupportsStmt S q\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nf : σ → Option (Γ k) → σ\n⊢ TM2.stepAux (stRun (StAct.peek f) q) v S =\n    TM2.stepAux q (stVar v (S k) (StAct.peek f)) (update S k (stWrite v (S k) (StAct.peek f)))\n[PROOFSTEP]\nunfold stWrite\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nf : σ → Option (Γ k) → σ\n⊢ TM2.stepAux (stRun (StAct.peek f) q) v S =\n    TM2.stepAux q (stVar v (S k) (StAct.peek f))\n      (update S k\n        (match StAct.peek f with\n        | StAct.push f => f v :: S k\n        | StAct.peek a => S k\n        | StAct.pop a => List.tail (S k)))\n[PROOFSTEP]\nrw [Function.update_eq_self]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nf : σ → Option (Γ k) → σ\n⊢ TM2.stepAux (stRun (StAct.peek f) q) v S = TM2.stepAux q (stVar v (S k) (StAct.peek f)) S\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\ns : StAct k\nq : Stmt₂\n⊢ trNormal (stRun s q) = goto fun x x => go k s q\n[PROOFSTEP]\ncases s\n[GOAL]\ncase push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Γ k\n⊢ trNormal (stRun (StAct.push a✝) q) = goto fun x x => go k (StAct.push a✝) q\n[PROOFSTEP]\nrfl\n[GOAL]\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ trNormal (stRun (StAct.peek a✝) q) = goto fun x x => go k (StAct.peek a✝) q\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ trNormal (stRun (StAct.pop a✝) q) = goto fun x x => go k (StAct.pop a✝) q\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\ns : StAct k\nq : Stmt₂\n⊢ trStmts₁ (stRun s q) = {go k s q, ret q} ∪ trStmts₁ q\n[PROOFSTEP]\ncases s\n[GOAL]\ncase push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Γ k\n⊢ trStmts₁ (stRun (StAct.push a✝) q) = {go k (StAct.push a✝) q, ret q} ∪ trStmts₁ q\n[PROOFSTEP]\nsimp only [trStmts₁]\n[GOAL]\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ trStmts₁ (stRun (StAct.peek a✝) q) = {go k (StAct.peek a✝) q, ret q} ∪ trStmts₁ q\n[PROOFSTEP]\nsimp only [trStmts₁]\n[GOAL]\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : Stmt₂\na✝ : σ → Option (Γ k) → σ\n⊢ trStmts₁ (stRun (StAct.pop a✝) q) = {go k (StAct.pop a✝) q, ret q} ∪ trStmts₁ q\n[PROOFSTEP]\nsimp only [trStmts₁]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\n⊢ let v' := stVar v (S k) o;\n  let Sk' := stWrite v (S k) o;\n  let S' := update S k Sk';\n  ∃ L',\n    (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S' k)))) ∧\n      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q v' ((Tape.move Dir.right)^[List.length (S' k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ndsimp only\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) o) k_1)))) ∧\n      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q (stVar v (S k) o)\n          ((Tape.move Dir.right)^[List.length (update S k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) o) k_1)))) ∧\n      TM1.stepAux (trStAct q o) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q (stVar v (S k) o)\n          ((Tape.move Dir.right)^[List.length (stWrite v (S k) o)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncases o\n[GOAL]\ncase push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Γ k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.push a✝)) k_1)))) ∧\n      TM1.stepAux (trStAct q (StAct.push a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q (stVar v (S k) (StAct.push a✝))\n          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.push a✝))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nsimp only [stWrite, stVar, trStAct, TM1.stepAux]\n[GOAL]\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.peek a✝)) k_1)))) ∧\n      TM1.stepAux (trStAct q (StAct.peek a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q (stVar v (S k) (StAct.peek a✝))\n          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.peek a✝))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nsimp only [stWrite, stVar, trStAct, TM1.stepAux]\n[GOAL]\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (stWrite v (S k) (StAct.pop a✝)) k_1)))) ∧\n      TM1.stepAux (trStAct q (StAct.pop a✝)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n        TM1.stepAux q (stVar v (S k) (StAct.pop a✝))\n          ((Tape.move Dir.right)^[List.length (stWrite v (S k) (StAct.pop a✝))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nsimp only [stWrite, stVar, trStAct, TM1.stepAux]\n[GOAL]\ncase push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Γ k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (a✝ v :: S k) k_1)))) ∧\n      TM1.stepAux q v\n          (Tape.move Dir.right\n            (Tape.write\n              (((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst,\n                update ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.snd k (some (a✝ v)))\n              ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q v ((Tape.move Dir.right)^[List.length (a✝ v :: S k)] (Tape.mk' ∅ (addBottom L')))\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K), ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (S k) k_1)))) ∧\n      TM1.stepAux q\n          (a✝ v\n            (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n              k))\n          (Tape.move Dir.right\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q (a✝ v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L')))\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail (S k)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (a✝ v none) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (a✝ v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.snd k\n                  none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (a✝ v (List.head? (S k)))\n          ((Tape.move Dir.right)^[List.length (List.tail (S k))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase push f =>\n  have := Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k (some (f v)))\n  refine'\n    ⟨_, fun k' ↦ _, by\n      -- Porting note: `rw [...]` to `erw [...]; rfl`.\n              -- https://github.com/leanprover-community/mathlib4/issues/5164\n      erw [Tape.move_right_n_head, List.length, Tape.mk'_nth_nat, this,\n        addBottom_modifyNth fun a ↦ update a k (some (f v)), Nat.add_one, iterate_succ']\n      rfl⟩\n  refine' ListBlank.ext fun i ↦ _\n  rw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n  by_cases h' : k' = k\n  · subst k'\n    split_ifs with h <;>\n      simp only [List.reverse_cons, Function.update_same, ListBlank.nth_mk, List.map]\n        -- Porting note: `le_refl` is required.\n    ·\n      rw [List.getI_eq_get, List.get_append_right'] <;>\n        simp only [h, List.get_singleton, List.length_map, List.length_reverse, Nat.succ_pos', List.length_append,\n          lt_add_iff_pos_right, List.length, le_refl]\n    rw [← proj_map_nth, hL, ListBlank.nth_mk]\n    cases' lt_or_gt_of_ne h with h h\n    · rw [List.getI_append]\n      simpa only [List.length_map, List.length_reverse] using h\n    · rw [gt_iff_lt] at h \n      rw [List.getI_eq_default, List.getI_eq_default] <;>\n        simp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append,\n          List.length_map]\n  · split_ifs <;> rw [Function.update_noteq h', ← proj_map_nth, hL]\n    rw [Function.update_noteq h']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k_1)))) ∧\n      TM1.stepAux q v\n          (Tape.move Dir.right\n            (Tape.write\n              (((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst,\n                update ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.snd k (some (f v)))\n              ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q v ((Tape.move Dir.right)^[List.length (f v :: S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase push f =>\n  have := Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k (some (f v)))\n  refine'\n    ⟨_, fun k' ↦ _, by\n      -- Porting note: `rw [...]` to `erw [...]; rfl`.\n              -- https://github.com/leanprover-community/mathlib4/issues/5164\n      erw [Tape.move_right_n_head, List.length, Tape.mk'_nth_nat, this,\n        addBottom_modifyNth fun a ↦ update a k (some (f v)), Nat.add_one, iterate_succ']\n      rfl⟩\n  refine' ListBlank.ext fun i ↦ _\n  rw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n  by_cases h' : k' = k\n  · subst k'\n    split_ifs with h <;>\n      simp only [List.reverse_cons, Function.update_same, ListBlank.nth_mk, List.map]\n        -- Porting note: `le_refl` is required.\n    ·\n      rw [List.getI_eq_get, List.get_append_right'] <;>\n        simp only [h, List.get_singleton, List.length_map, List.length_reverse, Nat.succ_pos', List.length_append,\n          lt_add_iff_pos_right, List.length, le_refl]\n    rw [← proj_map_nth, hL, ListBlank.nth_mk]\n    cases' lt_or_gt_of_ne h with h h\n    · rw [List.getI_append]\n      simpa only [List.length_map, List.length_reverse] using h\n    · rw [gt_iff_lt] at h \n      rw [List.getI_eq_default, List.getI_eq_default] <;>\n        simp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append,\n          List.length_map]\n  · split_ifs <;> rw [Function.update_noteq h', ← proj_map_nth, hL]\n    rw [Function.update_noteq h']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k_1)))) ∧\n      TM1.stepAux q v\n          (Tape.move Dir.right\n            (Tape.write\n              (((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst,\n                update ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.snd k (some (f v)))\n              ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q v ((Tape.move Dir.right)^[List.length (f v :: S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nhave := Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k (some (f v)))\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k_1)))) ∧\n      TM1.stepAux q v\n          (Tape.move Dir.right\n            (Tape.write\n              (((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst,\n                update ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.snd k (some (f v)))\n              ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q v ((Tape.move Dir.right)^[List.length (f v :: S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nrefine'\n  ⟨_, fun k' ↦ _, by\n    -- Porting note: `rw [...]` to `erw [...]; rfl`.\n            -- https://github.com/leanprover-community/mathlib4/issues/5164\n    erw [Tape.move_right_n_head, List.length, Tape.mk'_nth_nat, this,\n      addBottom_modifyNth fun a ↦ update a k (some (f v)), Nat.add_one, iterate_succ']\n    rfl⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ TM1.stepAux q v\n      (Tape.move Dir.right\n        (Tape.write\n          (((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst,\n            update ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.snd k (some (f v)))\n          ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n    TM1.stepAux q v ((Tape.move Dir.right)^[List.length (f v :: S k)] (Tape.mk' ∅ (addBottom ?m.655566)))\n[PROOFSTEP]\nerw [Tape.move_right_n_head, List.length, Tape.mk'_nth_nat, this, addBottom_modifyNth fun a ↦ update a k (some (f v)),\n  Nat.add_one, iterate_succ']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ TM1.stepAux q v\n      (Tape.move Dir.right\n        ((Tape.move Dir.right)^[List.length (S k)]\n          (Tape.mk' ∅ (addBottom (ListBlank.modifyNth (fun a => update a k (some (f v))) (List.length (S k)) L))))) =\n    TM1.stepAux q v\n      ((Tape.move Dir.right ∘ (Tape.move Dir.right)^[List.length (S k)]) (Tape.mk' ∅ (addBottom ?m.655566)))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\n⊢ ListBlank ((k : K) → Option (Γ k))\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\n⊢ ListBlank.map (proj k') (ListBlank.modifyNth (fun a => update a k (some (f v))) (List.length (S k)) L) =\n    ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))\n[PROOFSTEP]\nrefine' ListBlank.ext fun i ↦ _\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\n⊢ ListBlank.nth (ListBlank.map (proj k') (ListBlank.modifyNth (fun a => update a k (some (f v))) (List.length (S k)) L))\n      i =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nrw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\n⊢ ite (i = List.length (S k)) (update (ListBlank.nth L i) k (some (f v))) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nby_cases h' : k' = k\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\nh' : k' = k\n⊢ ite (i = List.length (S k)) (update (ListBlank.nth L i) k (some (f v))) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nsubst k'\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\n⊢ ite (i = List.length (S k)) (update (ListBlank.nth L i) k (some (f v))) (ListBlank.nth L i) k =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k)))) i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : i = List.length (S k)\n⊢ update (ListBlank.nth L i) k (some (f v)) k =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k)))) i\n[PROOFSTEP]\nsimp only [List.reverse_cons, Function.update_same, ListBlank.nth_mk, List.map]\n  -- Porting note: `le_refl` is required.\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : ¬i = List.length (S k)\n⊢ ListBlank.nth L i k = ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k)))) i\n[PROOFSTEP]\nsimp only [List.reverse_cons, Function.update_same, ListBlank.nth_mk, List.map]\n  -- Porting note: `le_refl` is required.\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : i = List.length (S k)\n⊢ some (f v) = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\nrw [List.getI_eq_get, List.get_append_right']\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : i = List.length (S k)\n⊢ some (f v) =\n    List.get [some (f v)]\n      { val := i - List.length (List.reverse (List.map some (S k))),\n        isLt := (_ : i - List.length (List.reverse (List.map some (S k))) < List.length [some (f v)]) }\n[PROOFSTEP]\nsimp only [h, List.get_singleton, List.length_map, List.length_reverse, Nat.succ_pos', List.length_append,\n  lt_add_iff_pos_right, List.length, le_refl]\n[GOAL]\ncase pos.h₁\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : i = List.length (S k)\n⊢ List.length (List.reverse (List.map some (S k))) ≤ i\n[PROOFSTEP]\nsimp only [h, List.get_singleton, List.length_map, List.length_reverse, Nat.succ_pos', List.length_append,\n  lt_add_iff_pos_right, List.length, le_refl]\n[GOAL]\ncase pos.h₂\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : i = List.length (S k)\n⊢ i < List.length (List.reverse (List.map some (S k)) ++ [some (f v)])\n[PROOFSTEP]\nsimp only [h, List.get_singleton, List.length_map, List.length_reverse, Nat.succ_pos', List.length_append,\n  lt_add_iff_pos_right, List.length, le_refl]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : ¬i = List.length (S k)\n⊢ ListBlank.nth L i k = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\nrw [← proj_map_nth, hL, ListBlank.nth_mk]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh : ¬i = List.length (S k)\n⊢ List.getI (List.reverse (List.map some (S k))) i = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\ncases' lt_or_gt_of_ne h with h h\n[GOAL]\ncase neg.inl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : i < List.length (S k)\n⊢ List.getI (List.reverse (List.map some (S k))) i = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\nrw [List.getI_append]\n[GOAL]\ncase neg.inl.h\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : i < List.length (S k)\n⊢ i < List.length (List.reverse (List.map some (S k)))\n[PROOFSTEP]\nsimpa only [List.length_map, List.length_reverse] using h\n[GOAL]\ncase neg.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : i > List.length (S k)\n⊢ List.getI (List.reverse (List.map some (S k))) i = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\nrw [gt_iff_lt] at h \n[GOAL]\ncase neg.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : List.length (S k) < i\n⊢ List.getI (List.reverse (List.map some (S k))) i = List.getI (List.reverse (List.map some (S k)) ++ [some (f v)]) i\n[PROOFSTEP]\nrw [List.getI_eq_default, List.getI_eq_default]\n[GOAL]\ncase neg.inr.hn\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : List.length (S k) < i\n⊢ List.length (List.reverse (List.map some (S k)) ++ [some (f v)]) ≤ i\n[PROOFSTEP]\nsimp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append, List.length_map]\n[GOAL]\ncase neg.inr.hn\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\ni : ℕ\nh✝ : ¬i = List.length (S k)\nh : List.length (S k) < i\n⊢ List.length (List.reverse (List.map some (S k))) ≤ i\n[PROOFSTEP]\nsimp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append, List.length_map]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\nh' : ¬k' = k\n⊢ ite (i = List.length (S k)) (update (ListBlank.nth L i) k (some (f v))) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : i = List.length (S k)\n⊢ update (ListBlank.nth L i) k (some (f v)) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h', ← proj_map_nth, hL]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : ¬i = List.length (S k)\n⊢ ListBlank.nth L i k' = ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h', ← proj_map_nth, hL]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Γ k\nthis :\n  ∀ (L R : ListBlank Γ') (n : ℕ),\n    Tape.write ((ListBlank.nth R n).fst, update (ListBlank.nth R n).snd k (some (f v)))\n        ((Tape.move Dir.right)^[n] (Tape.mk' L R)) =\n      (Tape.move Dir.right)^[n] (Tape.mk' L (ListBlank.modifyNth (fun a => (a.fst, update a.snd k (some (f v)))) n R))\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : i = List.length (S k)\n⊢ ListBlank.nth (ListBlank.mk (List.reverse (List.map some (S k')))) i =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (f v :: S k) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h']\n[GOAL]\ncase peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K), ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (S k) k_1)))) ∧\n      TM1.stepAux q\n          (a✝ v\n            (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n              k))\n          (Tape.move Dir.right\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q (a✝ v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L')))\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail (S k)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (a✝ v none) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (a✝ v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.snd k\n                  none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (a✝ v (List.head? (S k)))\n          ((Tape.move Dir.right)^[List.length (List.tail (S k))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase peek f =>\n  rw [Function.update_eq_self]\n  use L, hL; rw [Tape.move_left_right]; congr\n  cases e : S k; · rfl\n  rw [List.length_cons, iterate_succ', Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n    addBottom_nth_snd, stk_nth_val _ (hL k), e, List.reverse_cons, ← List.length_reverse, List.get?_concat_length]\n  rfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K), ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (S k) k_1)))) ∧\n      TM1.stepAux q\n          (f v\n            (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n              k))\n          (Tape.move Dir.right\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q (f v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase peek f =>\n  rw [Function.update_eq_self]\n  use L, hL; rw [Tape.move_left_right]; congr\n  cases e : S k; · rfl\n  rw [List.length_cons, iterate_succ', Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n    addBottom_nth_snd, stk_nth_val _ (hL k), e, List.reverse_cons, ← List.length_reverse, List.get?_concat_length]\n  rfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K), ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (S k) k_1)))) ∧\n      TM1.stepAux q\n          (f v\n            (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n              k))\n          (Tape.move Dir.right\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q (f v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nrw [Function.update_eq_self]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧\n      TM1.stepAux q\n          (f v\n            (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n              k))\n          (Tape.move Dir.right\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n        TM1.stepAux q (f v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nuse L, hL\n[GOAL]\ncase right\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ TM1.stepAux q\n      (f v\n        (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head k))\n      (Tape.move Dir.right\n        (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))))) =\n    TM1.stepAux q (f v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n[PROOFSTEP]\nrw [Tape.move_left_right]\n[GOAL]\ncase right\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ TM1.stepAux q\n      (f v\n        (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head k))\n      ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))) =\n    TM1.stepAux q (f v (List.head? (S k))) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase right.e_a.e_a\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head k =\n    List.head? (S k)\n[PROOFSTEP]\ncases e : S k\n[GOAL]\ncase right.e_a.e_a.nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\ne : S k = []\n⊢ Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))).head k =\n    List.head? []\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right.e_a.e_a.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhead✝ : Γ k\ntail✝ : List (Γ k)\ne : S k = head✝ :: tail✝\n⊢ Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (head✝ :: tail✝)] (Tape.mk' ∅ (addBottom L)))).head\n      k =\n    List.head? (head✝ :: tail✝)\n[PROOFSTEP]\nrw [List.length_cons, iterate_succ', Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n  addBottom_nth_snd, stk_nth_val _ (hL k), e, List.reverse_cons, ← List.length_reverse, List.get?_concat_length]\n[GOAL]\ncase right.e_a.e_a.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhead✝ : Γ k\ntail✝ : List (Γ k)\ne : S k = head✝ :: tail✝\n⊢ some head✝ = List.head? (head✝ :: tail✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\na✝ : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail (S k)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (a✝ v none) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (a✝ v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.snd k\n                  none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (a✝ v (List.head? (S k)))\n          ((Tape.move Dir.right)^[List.length (List.tail (S k))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase pop f =>\n  cases' e : S k with hd tl\n  · simp only [Tape.mk'_head, ListBlank.head_cons, Tape.move_left_mk', List.length, Tape.write_mk', List.head?,\n      iterate_zero_apply, List.tail_nil]\n    rw [← e, Function.update_eq_self]\n    exact ⟨L, hL, by rw [addBottom_head_fst, cond]⟩\n  · refine'\n      ⟨_, fun k' ↦ _, by\n        erw [List.length_cons, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_succ_fst, cond, iterate_succ',\n          Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n          Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k none), addBottom_modifyNth fun a ↦ update a k none,\n          addBottom_nth_snd, stk_nth_val _ (hL k), e,\n          show (List.cons hd tl).reverse.get? tl.length = some hd by\n            rw [List.reverse_cons, ← List.length_reverse, List.get?_concat_length],\n          List.head?, List.tail]⟩\n    refine' ListBlank.ext fun i ↦ _\n    rw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n    by_cases h' : k' = k\n    · subst k'\n      split_ifs with h <;> simp only [Function.update_same, ListBlank.nth_mk, List.tail]\n      · rw [List.getI_eq_default]\n        · rfl\n        rw [h, List.length_reverse, List.length_map]\n      rw [← proj_map_nth, hL, ListBlank.nth_mk, e, List.map, List.reverse_cons]\n      cases' lt_or_gt_of_ne h with h h\n      · rw [List.getI_append]\n        simpa only [List.length_map, List.length_reverse] using h\n      · rw [gt_iff_lt] at h \n        rw [List.getI_eq_default, List.getI_eq_default] <;>\n          simp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append,\n            List.length_map]\n    · split_ifs <;> rw [Function.update_noteq h', ← proj_map_nth, hL]\n      rw [Function.update_noteq h']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail (S k)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (f v none) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (f v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.snd k\n                  none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (f v (List.head? (S k)))\n          ((Tape.move Dir.right)^[List.length (List.tail (S k))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncase pop f =>\n  cases' e : S k with hd tl\n  · simp only [Tape.mk'_head, ListBlank.head_cons, Tape.move_left_mk', List.length, Tape.write_mk', List.head?,\n      iterate_zero_apply, List.tail_nil]\n    rw [← e, Function.update_eq_self]\n    exact ⟨L, hL, by rw [addBottom_head_fst, cond]⟩\n  · refine'\n      ⟨_, fun k' ↦ _, by\n        erw [List.length_cons, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_succ_fst, cond, iterate_succ',\n          Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n          Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k none), addBottom_modifyNth fun a ↦ update a k none,\n          addBottom_nth_snd, stk_nth_val _ (hL k), e,\n          show (List.cons hd tl).reverse.get? tl.length = some hd by\n            rw [List.reverse_cons, ← List.length_reverse, List.get?_concat_length],\n          List.head?, List.tail]⟩\n    refine' ListBlank.ext fun i ↦ _\n    rw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n    by_cases h' : k' = k\n    · subst k'\n      split_ifs with h <;> simp only [Function.update_same, ListBlank.nth_mk, List.tail]\n      · rw [List.getI_eq_default]\n        · rfl\n        rw [h, List.length_reverse, List.length_map]\n      rw [← proj_map_nth, hL, ListBlank.nth_mk, e, List.map, List.reverse_cons]\n      cases' lt_or_gt_of_ne h with h h\n      · rw [List.getI_append]\n        simpa only [List.length_map, List.length_reverse] using h\n      · rw [gt_iff_lt] at h \n        rw [List.getI_eq_default, List.getI_eq_default] <;>\n          simp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append,\n            List.length_map]\n    · split_ifs <;> rw [Function.update_noteq h', ← proj_map_nth, hL]\n      rw [Function.update_noteq h']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail (S k)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (f v none) ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (f v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))).head.snd k\n                  none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (f v (List.head? (S k)))\n          ((Tape.move Dir.right)^[List.length (List.tail (S k))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\ncases' e : S k with hd tl\n[GOAL]\ncase nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\ne : S k = []\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k (List.tail []) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (f v none) ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (f v\n              (Prod.snd (Tape.move Dir.left ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update (Tape.move Dir.left ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))).head.snd\n                  k none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length []] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (f v (List.head? []))\n          ((Tape.move Dir.right)^[List.length (List.tail [])] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nsimp only [Tape.mk'_head, ListBlank.head_cons, Tape.move_left_mk', List.length, Tape.write_mk', List.head?,\n  iterate_zero_apply, List.tail_nil]\n[GOAL]\ncase nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\ne : S k = []\n⊢ ∃ L',\n    (∀ (k_1 : K), ListBlank.map (proj k_1) L' = ListBlank.mk (List.reverse (List.map some (update S k [] k_1)))) ∧\n      (bif (ListBlank.head (addBottom L)).fst then TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L))\n        else\n          TM1.stepAux q (f v (Prod.snd (ListBlank.head ∅) k))\n            (Tape.mk' (ListBlank.tail ∅)\n              (ListBlank.cons ((ListBlank.head ∅).fst, update (ListBlank.head ∅).snd k none) (addBottom L)))) =\n        TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L'))\n[PROOFSTEP]\nrw [← e, Function.update_eq_self]\n[GOAL]\ncase nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\ne : S k = []\n⊢ ∃ L',\n    (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧\n      (bif (ListBlank.head (addBottom L)).fst then TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L))\n        else\n          TM1.stepAux q (f v (Prod.snd (ListBlank.head ∅) k))\n            (Tape.mk' (ListBlank.tail ∅)\n              (ListBlank.cons ((ListBlank.head ∅).fst, update (ListBlank.head ∅).snd k none) (addBottom L)))) =\n        TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L'))\n[PROOFSTEP]\nexact ⟨L, hL, by rw [addBottom_head_fst, cond]⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\ne : S k = []\n⊢ (bif (ListBlank.head (addBottom L)).fst then TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L))\n    else\n      TM1.stepAux q (f v (Prod.snd (ListBlank.head ∅) k))\n        (Tape.mk' (ListBlank.tail ∅)\n          (ListBlank.cons ((ListBlank.head ∅).fst, update (ListBlank.head ∅).snd k none) (addBottom L)))) =\n    TM1.stepAux q (f v none) (Tape.mk' ∅ (addBottom L))\n[PROOFSTEP]\nrw [addBottom_head_fst, cond]\n[GOAL]\ncase cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\n⊢ ∃ L',\n    (∀ (k_1 : K),\n        ListBlank.map (proj k_1) L' =\n          ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k_1)))) ∧\n      (bif ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L))).head.fst then\n          TM1.stepAux q (f v none) ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))\n        else\n          TM1.stepAux q\n            (f v\n              (Prod.snd\n                (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head\n                k))\n            (Tape.write\n              ((Tape.move Dir.left\n                      ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n                update\n                  (Tape.move Dir.left\n                        ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head.snd\n                  k none)\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))))) =\n        TM1.stepAux q (f v (List.head? (hd :: tl)))\n          ((Tape.move Dir.right)^[List.length (List.tail (hd :: tl))] (Tape.mk' ∅ (addBottom L')))\n[PROOFSTEP]\nrefine'\n  ⟨_, fun k' ↦ _, by\n    erw [List.length_cons, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_succ_fst, cond, iterate_succ',\n      Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n      Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k none), addBottom_modifyNth fun a ↦ update a k none,\n      addBottom_nth_snd, stk_nth_val _ (hL k), e,\n      show (List.cons hd tl).reverse.get? tl.length = some hd by\n        rw [List.reverse_cons, ← List.length_reverse, List.get?_concat_length],\n      List.head?, List.tail]⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\n⊢ (bif ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L))).head.fst then\n      TM1.stepAux q (f v none) ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))\n    else\n      TM1.stepAux q\n        (f v\n          (Prod.snd\n            (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head k))\n        (Tape.write\n          ((Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head.fst,\n            update\n              (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))).head.snd\n              k none)\n          (Tape.move Dir.left ((Tape.move Dir.right)^[List.length (hd :: tl)] (Tape.mk' ∅ (addBottom L)))))) =\n    TM1.stepAux q (f v (List.head? (hd :: tl)))\n      ((Tape.move Dir.right)^[List.length (List.tail (hd :: tl))] (Tape.mk' ∅ (addBottom ?m.672274)))\n[PROOFSTEP]\nerw [List.length_cons, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_succ_fst, cond, iterate_succ',\n  Function.comp, Tape.move_right_left, Tape.move_right_n_head, Tape.mk'_nth_nat,\n  Tape.write_move_right_n fun a : Γ' ↦ (a.1, update a.2 k none), addBottom_modifyNth fun a ↦ update a k none,\n  addBottom_nth_snd, stk_nth_val _ (hL k), e,\n  show (List.cons hd tl).reverse.get? tl.length = some hd by\n    rw [List.reverse_cons, ← List.length_reverse, List.get?_concat_length],\n  List.head?, List.tail]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\n⊢ List.get? (List.reverse (hd :: tl)) (List.length tl) = some hd\n[PROOFSTEP]\nrw [List.reverse_cons, ← List.length_reverse, List.get?_concat_length]\n[GOAL]\ncase cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\n⊢ ListBlank.map (proj k') (ListBlank.modifyNth (fun a => update a k none) (List.length tl) L) =\n    ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))\n[PROOFSTEP]\nrefine' ListBlank.ext fun i ↦ _\n[GOAL]\ncase cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\n⊢ ListBlank.nth (ListBlank.map (proj k') (ListBlank.modifyNth (fun a => update a k none) (List.length tl) L)) i =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nrw [ListBlank.nth_map, ListBlank.nth_modifyNth, proj, PointedMap.mk_val]\n[GOAL]\ncase cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\n⊢ ite (i = List.length tl) (update (ListBlank.nth L i) k none) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nby_cases h' : k' = k\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\nh' : k' = k\n⊢ ite (i = List.length tl) (update (ListBlank.nth L i) k none) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nsubst k'\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\n⊢ ite (i = List.length tl) (update (ListBlank.nth L i) k none) (ListBlank.nth L i) k =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k)))) i\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : i = List.length tl\n⊢ update (ListBlank.nth L i) k none k =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k)))) i\n[PROOFSTEP]\nsimp only [Function.update_same, ListBlank.nth_mk, List.tail]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : ¬i = List.length tl\n⊢ ListBlank.nth L i k =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k)))) i\n[PROOFSTEP]\nsimp only [Function.update_same, ListBlank.nth_mk, List.tail]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : i = List.length tl\n⊢ none = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\nrw [List.getI_eq_default]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : i = List.length tl\n⊢ none = default\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos.hn\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : i = List.length tl\n⊢ List.length (List.reverse (List.map some tl)) ≤ i\n[PROOFSTEP]\nrw [h, List.length_reverse, List.length_map]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : ¬i = List.length tl\n⊢ ListBlank.nth L i k = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\nrw [← proj_map_nth, hL, ListBlank.nth_mk, e, List.map, List.reverse_cons]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh : ¬i = List.length tl\n⊢ List.getI (List.reverse (List.map some tl) ++ [some hd]) i = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\ncases' lt_or_gt_of_ne h with h h\n[GOAL]\ncase neg.inl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : i < List.length tl\n⊢ List.getI (List.reverse (List.map some tl) ++ [some hd]) i = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\nrw [List.getI_append]\n[GOAL]\ncase neg.inl.h\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : i < List.length tl\n⊢ i < List.length (List.reverse (List.map some tl))\n[PROOFSTEP]\nsimpa only [List.length_map, List.length_reverse] using h\n[GOAL]\ncase neg.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : i > List.length tl\n⊢ List.getI (List.reverse (List.map some tl) ++ [some hd]) i = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\nrw [gt_iff_lt] at h \n[GOAL]\ncase neg.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : List.length tl < i\n⊢ List.getI (List.reverse (List.map some tl) ++ [some hd]) i = List.getI (List.reverse (List.map some tl)) i\n[PROOFSTEP]\nrw [List.getI_eq_default, List.getI_eq_default]\n[GOAL]\ncase neg.inr.hn\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : List.length tl < i\n⊢ List.length (List.reverse (List.map some tl)) ≤ i\n[PROOFSTEP]\nsimp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append, List.length_map]\n[GOAL]\ncase neg.inr.hn\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\ni : ℕ\nh✝ : ¬i = List.length tl\nh : List.length tl < i\n⊢ List.length (List.reverse (List.map some tl) ++ [some hd]) ≤ i\n[PROOFSTEP]\nsimp only [Nat.add_one_le_iff, h, List.length, le_of_lt, List.length_reverse, List.length_append, List.length_map]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\nh' : ¬k' = k\n⊢ ite (i = List.length tl) (update (ListBlank.nth L i) k none) (ListBlank.nth L i) k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : i = List.length tl\n⊢ update (ListBlank.nth L i) k none k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h', ← proj_map_nth, hL]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : ¬i = List.length tl\n⊢ ListBlank.nth L i k' =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h', ← proj_map_nth, hL]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nk : K\nq : TM1.Stmt Γ' Λ' σ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nf : σ → Option (Γ k) → σ\nhd : Γ k\ntl : List (Γ k)\ne : S k = hd :: tl\nk' : K\ni : ℕ\nh' : ¬k' = k\nh✝ : i = List.length tl\n⊢ ListBlank.nth (ListBlank.mk (List.reverse (List.map some (S k')))) i =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update S k (List.tail (hd :: tl)) k')))) i\n[PROOFSTEP]\nrw [Function.update_noteq h']\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn : ℕ\nH : n ≤ List.length S\n⊢ Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn : ℕ\nH✝ : n ≤ List.length S\nH : Nat.zero ≤ List.length S\n⊢ Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[Nat.zero] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[Nat.succ n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\napply (IH (le_of_lt H)).tail\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[Nat.succ n] (Tape.mk' ∅ (addBottom L)) } ∈\n    TM1.step (tr M) { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nrw [iterate_succ_apply']\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ { l := some (go k o q), var := v,\n      Tape := Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))) } ∈\n    TM1.step (tr M) { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nsimp only [TM1.step, TM1.stepAux, tr, Tape.mk'_nth_nat, Tape.move_right_n_head, addBottom_nth_snd, Option.mem_def]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ some\n      (bif Option.isNone (ListBlank.nth L n k) then\n        TM1.stepAux (trStAct (goto fun x x => ret q) o) v ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)))\n      else\n        { l := some (go k o q), var := v,\n          Tape := Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))) }) =\n    some\n      { l := some (go k o q), var := v,\n        Tape := Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))) }\n[PROOFSTEP]\nrw [stk_nth_val _ hL, List.get?_eq_get]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ some\n      (bif Option.isNone (some (List.get (List.reverse S) { val := n, isLt := ?succ })) then\n        TM1.stepAux (trStAct (goto fun x x => ret q) o) v ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)))\n      else\n        { l := some (go k o q), var := v,\n          Tape := Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))) }) =\n    some\n      { l := some (go k o q), var := v,\n        Tape := Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))) }\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ n < List.length (List.reverse S)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\no : StAct k\nq : Stmt₂\nv : σ\nS : List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhL : ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some S))\nn✝ : ℕ\nH✝ : n✝ ≤ List.length S\nn : ℕ\nIH :\n  n ≤ List.length S →\n    Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n      { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\nH : Nat.succ n ≤ List.length S\n⊢ n < List.length (List.reverse S)\n[PROOFSTEP]\nrwa [List.length_reverse]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\n⊢ Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\n⊢ Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[Nat.zero] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\nIH :\n  Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n⊢ Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[Nat.succ n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n[PROOFSTEP]\nrefine' Reaches₀.head _ IH\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\nIH :\n  Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n⊢ { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) } ∈\n    TM1.step (tr M)\n      { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[Nat.succ n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nsimp only [Option.mem_def, TM1.step]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\nIH :\n  Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n⊢ some (TM1.stepAux (tr M (ret q)) v ((Tape.move Dir.right)^[Nat.succ n] (Tape.mk' ∅ (addBottom L)))) =\n    some { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nrw [Option.some_inj, tr, TM1.stepAux, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_succ_fst, TM1.stepAux,\n  iterate_succ', Function.comp_apply, Tape.move_right_left]\n[GOAL]\ncase succ\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : Stmt₂\nv : σ\nL : ListBlank ((k : K) → Option (Γ k))\nn : ℕ\nIH :\n  Reaches₀ (TM1.step (tr M))\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n    { l := some (ret q), var := v, Tape := Tape.mk' ∅ (addBottom L) }\n⊢ (bif false then\n      TM1.stepAux (trNormal q) v (Tape.move Dir.right ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L))))\n    else TM1.stepAux (goto fun x x => ret q) v ((Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)))) =\n    { l := some (ret q), var := v, Tape := (Tape.move Dir.right)^[n] (Tape.mk' ∅ (addBottom L)) }\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (stRun o q) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (stRun o q)) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nsimp only [trNormal_run, step_run]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nhave hgo := tr_respects_aux₁ M o q v (hT k) _ le_rfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nobtain ⟨T', hT', hrun⟩ := tr_respects_aux₂ hT o\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite ?m.705248 (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct ?m.705247 o) ?m.705248 ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux ?m.705247 (stVar ?m.705248 (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite ?m.705248 (S k) o) k)]\n        (Tape.mk' ∅ (addBottom T')))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nhave := hgo.tail' rfl\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite ?m.705248 (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct ?m.705247 o) ?m.705248 ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux ?m.705247 (stVar ?m.705248 (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite ?m.705248 (S k) o) k)]\n        (Tape.mk' ∅ (addBottom T')))\nthis :\n  Reaches₁ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    (TM1.stepAux (tr M (go k o q)) v ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nrw [tr, TM1.stepAux, Tape.move_right_n_head, Tape.mk'_nth_nat, addBottom_nth_snd, stk_nth_val _ (hT k),\n  List.get?_len_le (le_of_eq (List.length_reverse _)), Option.isNone, cond, hrun, TM1.stepAux] at this \n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite v (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct (goto fun x x => ret q) o) v\n      ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom T')))\nthis :\n  Reaches₁ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    (match\n      match none with\n      | some val => false\n      | none => true with\n    | true =>\n      TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n        ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)]\n          (Tape.mk' ∅ (addBottom T')))\n    | false =>\n      TM1.stepAux (goto fun x x => go k o q) v\n        (Tape.move Dir.right ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)))))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nobtain ⟨c, gc, rc⟩ := IH hT'\n[GOAL]\ncase intro.intro.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite v (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct (goto fun x x => ret q) o) v\n      ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom T')))\nthis :\n  Reaches₁ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    (match\n      match none with\n      | some val => false\n      | none => true with\n    | true =>\n      TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n        ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)]\n          (Tape.mk' ∅ (addBottom T')))\n    | false =>\n      TM1.stepAux (goto fun x x => go k o q) v\n        (Tape.move Dir.right ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)))))\nc : TM1.Cfg Γ' Λ' σ\ngc : TrCfg (TM2.stepAux q ?m.709134 fun k_1 => update (fun k => S k) k (stWrite v (S k) o) k_1) c\nrc : Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) ?m.709134 (Tape.mk' ∅ (addBottom T'))) c\n⊢ ∃ b,\n    TrCfg (TM2.stepAux q (stVar v (S k) o) (update S k (stWrite v (S k) o))) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (goto fun x x => go k o q) v (Tape.mk' ∅ (addBottom T))) b\n[PROOFSTEP]\nrefine' ⟨c, gc, (this.to₀.trans (tr_respects_aux₃ M _) c (TransGen.head' rfl _)).to_reflTransGen⟩\n[GOAL]\ncase intro.intro.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite v (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct (goto fun x x => ret q) o) v\n      ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom T')))\nthis :\n  Reaches₁ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    (match\n      match none with\n      | some val => false\n      | none => true with\n    | true =>\n      TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n        ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)]\n          (Tape.mk' ∅ (addBottom T')))\n    | false =>\n      TM1.stepAux (goto fun x x => go k o q) v\n        (Tape.move Dir.right ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)))))\nc : TM1.Cfg Γ' Λ' σ\ngc : TrCfg (TM2.stepAux q (stVar v (S k) o) fun k_1 => update (fun k => S k) k (stWrite v (S k) o) k_1) c\nrc : Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) (stVar v (S k) o) (Tape.mk' ∅ (addBottom T'))) c\n⊢ ReflTransGen (fun a b => b ∈ TM1.step (tr M) a)\n    (TM1.stepAux (tr M (ret q)) (stVar v (S k) o) (Tape.mk' ∅ (addBottom T'))) c\n[PROOFSTEP]\nrw [tr, TM1.stepAux, Tape.mk'_head, addBottom_head_fst]\n[GOAL]\ncase intro.intro.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nq : TM2.Stmt (fun k => Γ k) Λ σ\nv : σ\nT : ListBlank ((i : K) → Option (Γ i))\nk : K\nS : (k : K) → List (Γ k)\nhT : ∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))\no : StAct k\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} {T : ListBlank ((k : K) → Option (Γ k))},\n    (∀ (k : K), ListBlank.map (proj k) T = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom T))) b\nhgo :\n  Reaches₀ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    { l := some (go k o q), var := v, Tape := (Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)) }\nT' : ListBlank ((k : K) → Option (Γ k))\nhT' :\n  ∀ (k_1 : K),\n    ListBlank.map (proj k_1) T' =\n      ListBlank.mk (List.reverse (List.map some (update (fun k => S k) k (stWrite v (S k) o) k_1)))\nhrun :\n  TM1.stepAux (trStAct (goto fun x x => ret q) o) v\n      ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T))) =\n    TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n      ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)] (Tape.mk' ∅ (addBottom T')))\nthis :\n  Reaches₁ (TM1.step (tr M)) { l := some (go k o q), var := v, Tape := Tape.mk' ∅ (addBottom T) }\n    (match\n      match none with\n      | some val => false\n      | none => true with\n    | true =>\n      TM1.stepAux (goto fun x x => ret q) (stVar v (S k) o)\n        ((Tape.move Dir.right)^[List.length (update (fun k => S k) k (stWrite v (S k) o) k)]\n          (Tape.mk' ∅ (addBottom T')))\n    | false =>\n      TM1.stepAux (goto fun x x => go k o q) v\n        (Tape.move Dir.right ((Tape.move Dir.right)^[List.length (S k)] (Tape.mk' ∅ (addBottom T)))))\nc : TM1.Cfg Γ' Λ' σ\ngc : TrCfg (TM2.stepAux q (stVar v (S k) o) fun k_1 => update (fun k => S k) k (stWrite v (S k) o) k_1) c\nrc : Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) (stVar v (S k) o) (Tape.mk' ∅ (addBottom T'))) c\n⊢ ReflTransGen (fun a b => b ∈ TM1.step (tr M) a)\n    (bif true then TM1.stepAux (trNormal q) (stVar v (S k) o) (Tape.mk' ∅ (addBottom T'))\n    else TM1.stepAux (move Dir.left (goto fun x x => ret q)) (stVar v (S k) o) (Tape.mk' ∅ (addBottom T')))\n    c\n[PROOFSTEP]\nexact rc\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\n⊢ Respects (TM2.step M) (TM1.step (tr M)) TrCfg\n[PROOFSTEP]\nintro c₁ c₂ h\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nc₁ : Cfg₂\nc₂ : TM1.Cfg Γ' Λ' σ\nh : TrCfg c₁ c₂\n⊢ match TM2.step M c₁ with\n  | some b₁ => ∃ b₂, TrCfg b₁ b₂ ∧ Reaches₁ (TM1.step (tr M)) c₂ b₂\n  | none => TM1.step (tr M) c₂ = none\n[PROOFSTEP]\ncases' h with l v S L hT\n[GOAL]\ncase mk\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Option Λ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ match TM2.step M { l := l, var := v, stk := S } with\n  | some b₁ =>\n    ∃ b₂,\n      TrCfg b₁ b₂ ∧\n        Reaches₁ (TM1.step (tr M)) { l := Option.map normal l, var := v, Tape := Tape.mk' ∅ (addBottom L) } b₂\n  | none => TM1.step (tr M) { l := Option.map normal l, var := v, Tape := Tape.mk' ∅ (addBottom L) } = none\n[PROOFSTEP]\ncases' l with l\n[GOAL]\ncase mk.none\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ match TM2.step M { l := none, var := v, stk := S } with\n  | some b₁ =>\n    ∃ b₂,\n      TrCfg b₁ b₂ ∧\n        Reaches₁ (TM1.step (tr M)) { l := Option.map normal none, var := v, Tape := Tape.mk' ∅ (addBottom L) } b₂\n  | none => TM1.step (tr M) { l := Option.map normal none, var := v, Tape := Tape.mk' ∅ (addBottom L) } = none\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.some\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\n⊢ match TM2.step M { l := some l, var := v, stk := S } with\n  | some b₁ =>\n    ∃ b₂,\n      TrCfg b₁ b₂ ∧\n        Reaches₁ (TM1.step (tr M)) { l := Option.map normal (some l), var := v, Tape := Tape.mk' ∅ (addBottom L) } b₂\n  | none => TM1.step (tr M) { l := Option.map normal (some l), var := v, Tape := Tape.mk' ∅ (addBottom L) } = none\n[PROOFSTEP]\nsimp only [TM2.step, Respects, Option.map_some']\n[GOAL]\ncase mk.some\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\n⊢ ∃ b₂,\n    TrCfg (TM2.stepAux (M l) v S) b₂ ∧\n      Reaches₁ (TM1.step (tr M)) { l := some (normal l), var := v, Tape := Tape.mk' ∅ (addBottom L) } b₂\n[PROOFSTEP]\nrsuffices ⟨b, c, r⟩ : ∃ b, _ ∧ Reaches (TM1.step (tr M)) _ _\n[GOAL]\ncase mk.some.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\nb : ?m.714525\nc : ?m.714852 b\nr : Reaches (TM1.step (tr M)) (?m.714853 b) (?m.714854 b)\n⊢ ∃ b₂,\n    TrCfg (TM2.stepAux (M l) v S) b₂ ∧\n      Reaches₁ (TM1.step (tr M)) { l := some (normal l), var := v, Tape := Tape.mk' ∅ (addBottom L) } b₂\n[PROOFSTEP]\nexact ⟨b, c, TransGen.head' rfl r⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (M l) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (tr M (normal l)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nsimp only [tr]\n  -- Porting note: `refine'` failed because of implicit lambda, so `induction` is used.\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (M l) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (M l)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\ngeneralize M l = N\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\nN : Stmt₂\n⊢ ∃ b, TrCfg (TM2.stepAux N v S) b ∧ Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal N) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\ninduction N using stmtStRec generalizing v S L hT with\n| H₁ k s q IH => exact tr_respects_aux M hT s @IH\n| H₂ a _ IH => exact IH _ hT\n| H₃ p q₁ q₂ IH₁ IH₂ =>\n  unfold TM2.stepAux trNormal TM1.stepAux\n  simp only []\n  cases p v <;> [exact IH₂ _ hT; exact IH₁ _ hT]\n| H₄ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n| H₅ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\nl : Λ\nN : Stmt₂\n⊢ ∃ b, TrCfg (TM2.stepAux N v S) b ∧ Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal N) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\ninduction N using stmtStRec generalizing v S L hT with\n| H₁ k s q IH => exact tr_respects_aux M hT s @IH\n| H₂ a _ IH => exact IH _ hT\n| H₃ p q₁ q₂ IH₁ IH₂ =>\n  unfold TM2.stepAux trNormal TM1.stepAux\n  simp only []\n  cases p v <;> [exact IH₂ _ hT; exact IH₁ _ hT]\n| H₄ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n| H₅ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\ncase H₁\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nk : K\ns : StAct k\nq : Stmt₂\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (stRun s q) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (stRun s q)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\n\n| H₁ k s q IH => exact tr_respects_aux M hT s @IH\n[GOAL]\ncase H₁\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nk : K\ns : StAct k\nq : Stmt₂\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (stRun s q) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (stRun s q)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nexact tr_respects_aux M hT s @IH\n[GOAL]\ncase H₂\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\na : σ → σ\nq✝ : Stmt₂\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q✝ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q✝) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.load a q✝) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.load a q✝)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\n\n| H₂ a _ IH => exact IH _ hT\n[GOAL]\ncase H₂\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\na : σ → σ\nq✝ : Stmt₂\nIH :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q✝ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q✝) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.load a q✝) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.load a q✝)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nexact IH _ hT\n[GOAL]\ncase H₃\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.branch p q₁ q₂) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.branch p q₁ q₂)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\n\n| H₃ p q₁ q₂ IH₁ IH₂ =>\n  unfold TM2.stepAux trNormal TM1.stepAux\n  simp only []\n  cases p v <;> [exact IH₂ _ hT; exact IH₁ _ hT]\n[GOAL]\ncase H₃\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.branch p q₁ q₂) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.branch p q₁ q₂)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nunfold TM2.stepAux trNormal TM1.stepAux\n[GOAL]\ncase H₃\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (bif p v then TM2.stepAux q₁ v S else TM2.stepAux q₂ v S) b ∧\n      Reaches (TM1.step (tr M))\n        (bif (fun x => p) (Tape.mk' ∅ (addBottom L)).head v then TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))\n        else TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L)))\n        b\n[PROOFSTEP]\nsimp only []\n[GOAL]\ncase H₃\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (bif p v then TM2.stepAux q₁ v S else TM2.stepAux q₂ v S) b ∧\n      Reaches (TM1.step (tr M))\n        (bif p v then TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))\n        else TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L)))\n        b\n[PROOFSTEP]\ncases p v <;> [exact IH₂ _ hT; exact IH₁ _ hT]\n[GOAL]\ncase H₃\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (bif p v then TM2.stepAux q₁ v S else TM2.stepAux q₂ v S) b ∧\n      Reaches (TM1.step (tr M))\n        (bif p v then TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))\n        else TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L)))\n        b\n[PROOFSTEP]\ncases p v\n[GOAL]\ncase H₃.false\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (bif false then TM2.stepAux q₁ v S else TM2.stepAux q₂ v S) b ∧\n      Reaches (TM1.step (tr M))\n        (bif false then TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))\n        else TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L)))\n        b\n[PROOFSTEP]\nexact IH₂ _ hT\n[GOAL]\ncase H₃.true\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\np : σ → Bool\nq₁ q₂ : Stmt₂\nIH₁ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₁ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))) b\nIH₂ :\n  ∀ {v : σ} {S : (k : K) → List (Γ k)} (L : ListBlank ((k : K) → Option (Γ k))),\n    (∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))) →\n      ∃ b,\n        TrCfg (TM2.stepAux q₂ v S) b ∧\n          Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L))) b\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (bif true then TM2.stepAux q₁ v S else TM2.stepAux q₂ v S) b ∧\n      Reaches (TM1.step (tr M))\n        (bif true then TM1.stepAux (trNormal q₁) v (Tape.mk' ∅ (addBottom L))\n        else TM1.stepAux (trNormal q₂) v (Tape.mk' ∅ (addBottom L)))\n        b\n[PROOFSTEP]\nexact IH₁ _ hT\n[GOAL]\ncase H₄\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nl✝ : σ → Λ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.goto l✝) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.goto l✝)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\n\n| H₄ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\ncase H₄\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nl✝ : σ → Λ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux (TM2.Stmt.goto l✝) v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal (TM2.Stmt.goto l✝)) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nexact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\ncase H₅\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux TM2.Stmt.halt v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal TM2.Stmt.halt) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\n\n| H₅ => exact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\ncase H₅\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nl : Λ\nv : σ\nS : (k : K) → List (Γ k)\nL : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L = ListBlank.mk (List.reverse (List.map some (S k)))\n⊢ ∃ b,\n    TrCfg (TM2.stepAux TM2.Stmt.halt v S) b ∧\n      Reaches (TM1.step (tr M)) (TM1.stepAux (trNormal TM2.Stmt.halt) v (Tape.mk' ∅ (addBottom L))) b\n[PROOFSTEP]\nexact ⟨_, ⟨_, hT⟩, ReflTransGen.refl⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ TrCfg (TM2.init k L) (TM1.init (trInit k L))\n[PROOFSTEP]\nrw [(_ : TM1.init _ = _)]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ TrCfg (TM2.init k L) ?m.724426\n[PROOFSTEP]\nrefine' ⟨ListBlank.mk (L.reverse.map fun a ↦ update default k (some a)), fun k' ↦ _⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\n⊢ ListBlank.map (proj k') (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L))) =\n    ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))\n[PROOFSTEP]\nrefine' ListBlank.ext fun i ↦ _\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\n⊢ ListBlank.nth\n      (ListBlank.map (proj k') (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L)))) i =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nrw [ListBlank.map_mk, ListBlank.nth_mk, List.getI_eq_iget_get?, List.map_map]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\n⊢ Option.iget (List.get? (List.map ((proj k').f ∘ fun a => update default k (some a)) (List.reverse L)) i) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nhave :\n  ((proj k').f ∘ fun a => update (β := fun k => Option (Γ k)) default k (some a)) = fun a =>\n    (proj k').f (update (β := fun k => Option (Γ k)) default k (some a)) :=\n  rfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\n⊢ Option.iget (List.get? (List.map ((proj k').f ∘ fun a => update default k (some a)) (List.reverse L)) i) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nrw [this, List.get?_map, proj, PointedMap.mk_val]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\n⊢ Option.iget (Option.map (fun a => update default k (some a) k') (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nsimp only []\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\n⊢ Option.iget (Option.map (fun a => update default k (some a) k') (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nby_cases h : k' = k\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : k' = k\n⊢ Option.iget (Option.map (fun a => update default k (some a) k') (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nsubst k'\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\ni : ℕ\nthis : ((proj k).f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k) (update default k (some a))\n⊢ Option.iget (Option.map (fun a => update default k (some a) k) (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k)))) i\n[PROOFSTEP]\nsimp only [Function.update_same]\n[GOAL]\ncase pos\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\ni : ℕ\nthis : ((proj k).f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k) (update default k (some a))\n⊢ Option.iget (Option.map (fun a => some a) (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some L))) i\n[PROOFSTEP]\nrw [ListBlank.nth_mk, List.getI_eq_iget_get?, ← List.map_reverse, List.get?_map]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : ¬k' = k\n⊢ Option.iget (Option.map (fun a => update default k (some a) k') (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some (update (fun x => []) k L k')))) i\n[PROOFSTEP]\nsimp only [Function.update_noteq h]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : ¬k' = k\n⊢ Option.iget (Option.map (fun a => default k') (List.get? (List.reverse L) i)) =\n    ListBlank.nth (ListBlank.mk (List.reverse (List.map some []))) i\n[PROOFSTEP]\nrw [ListBlank.nth_mk, List.getI_eq_iget_get?, List.map, List.reverse_nil]\n[GOAL]\ncase neg\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : ¬k' = k\n⊢ Option.iget (Option.map (fun a => default k') (List.get? (List.reverse L) i)) = Option.iget (List.get? [] i)\n[PROOFSTEP]\ncases L.reverse.get? i\n[GOAL]\ncase neg.none\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : ¬k' = k\n⊢ Option.iget (Option.map (fun a => default k') none) = Option.iget (List.get? [] i)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg.some\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nk' : K\ni : ℕ\nthis : ((proj k').f ∘ fun a => update default k (some a)) = fun a => PointedMap.f (proj k') (update default k (some a))\nh : ¬k' = k\nval✝ : Γ k\n⊢ Option.iget (Option.map (fun a => default k') (some val✝)) = Option.iget (List.get? [] i)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ TM1.init (trInit k L) =\n    { l := Option.map normal (some default), var := default,\n      Tape := Tape.mk' ∅ (addBottom (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L)))) }\n[PROOFSTEP]\nrw [trInit, TM1.init]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ { l := some default, var := default,\n      Tape :=\n        Tape.mk₁\n          (let L' := List.map (fun a => (false, update (fun x => none) k (some a))) (List.reverse L);\n          (true, (List.headI L').snd) :: List.tail L') } =\n    { l := Option.map normal (some default), var := default,\n      Tape := Tape.mk' ∅ (addBottom (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L)))) }\n[PROOFSTEP]\ndsimp only\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ { l := some default, var := default,\n      Tape :=\n        Tape.mk₁\n          ((true, (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) (List.reverse L))).snd) ::\n            List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) (List.reverse L))) } =\n    { l := Option.map normal (some default), var := default,\n      Tape := Tape.mk' ∅ (addBottom (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L)))) }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_Tape.e_l.e_head.e_snd\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) (List.reverse L))).snd =\n    ListBlank.head (ListBlank.mk (List.map (fun a => update default k (some a)) (List.reverse L)))\n[PROOFSTEP]\ncases L.reverse\n[GOAL]\ncase e_Tape.e_l.e_tail\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) (List.reverse L)) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) (List.reverse L)))\n[PROOFSTEP]\ncases L.reverse\n[GOAL]\ncase e_Tape.e_l.e_head.e_snd.nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) [])).snd =\n    ListBlank.head (ListBlank.mk (List.map (fun a => update default k (some a)) []))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase e_Tape.e_l.e_head.e_snd.nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) [])).snd =\n    ListBlank.head (ListBlank.mk (List.map (fun a => update default k (some a)) []))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_Tape.e_l.e_head.e_snd.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) (head✝ :: tail✝))).snd =\n    ListBlank.head (ListBlank.mk (List.map (fun a => update default k (some a)) (head✝ :: tail✝)))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase e_Tape.e_l.e_head.e_snd.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ (List.headI (List.map (fun a => (false, update (fun x => none) k (some a))) (head✝ :: tail✝))).snd =\n    ListBlank.head (ListBlank.mk (List.map (fun a => update default k (some a)) (head✝ :: tail✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_Tape.e_l.e_tail.nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) []) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) []))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase e_Tape.e_l.e_tail.nil\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) []) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) []))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_Tape.e_l.e_tail.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) (head✝ :: tail✝)) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) (head✝ :: tail✝)))\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase e_Tape.e_l.e_tail.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) (head✝ :: tail✝)) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) (head✝ :: tail✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase e_Tape.e_l.e_tail.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ List.tail (List.map (fun a => (false, update (fun x => none) k (some a))) (head✝ :: tail✝)) =\n    List.map { f := Prod.mk false, map_pt' := (_ : (false, default) = (false, default)) }.f\n      (List.tail (List.map (fun a => update default k (some a)) (head✝ :: tail✝)))\n[PROOFSTEP]\nsimp only [List.map_map, List.tail_cons, List.map]\n[GOAL]\ncase e_Tape.e_l.e_tail.cons\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nhead✝ : Γ k\ntail✝ : List (Γ k)\n⊢ List.map (fun a => (false, update (fun x => none) k (some a))) tail✝ =\n    List.map (Prod.mk false ∘ fun a => update default k (some a)) tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nL₁ : ListBlank Γ'\nL₂ : List (Γ k)\nH₁ : L₁ ∈ TM1.eval (tr M) (trInit k L)\nH₂ : L₂ ∈ TM2.eval M k L\n⊢ ∃ S L',\n    addBottom L' = L₁ ∧\n      (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧ S k = L₂\n[PROOFSTEP]\nobtain ⟨c₁, h₁, rfl⟩ := (Part.mem_map_iff _).1 H₁\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL L₂ : List (Γ k)\nH₂ : L₂ ∈ TM2.eval M k L\nc₁ : TM1.Cfg Γ' Λ' σ\nh₁ : c₁ ∈ eval (TM1.step (tr M)) (TM1.init (trInit k L))\nH₁ : Tape.right₀ c₁.Tape ∈ TM1.eval (tr M) (trInit k L)\n⊢ ∃ S L',\n    addBottom L' = Tape.right₀ c₁.Tape ∧\n      (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧ S k = L₂\n[PROOFSTEP]\nobtain ⟨c₂, h₂, rfl⟩ := (Part.mem_map_iff _).1 H₂\n[GOAL]\ncase intro.intro.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nc₁ : TM1.Cfg Γ' Λ' σ\nh₁ : c₁ ∈ eval (TM1.step (tr M)) (TM1.init (trInit k L))\nH₁ : Tape.right₀ c₁.Tape ∈ TM1.eval (tr M) (trInit k L)\nc₂ : Cfg₂\nh₂ : c₂ ∈ eval (TM2.step M) (TM2.init k L)\nH₂ : TM2.Cfg.stk c₂ k ∈ TM2.eval M k L\n⊢ ∃ S L',\n    addBottom L' = Tape.right₀ c₁.Tape ∧\n      (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧\n        S k = TM2.Cfg.stk c₂ k\n[PROOFSTEP]\nobtain ⟨_, ⟨L', hT⟩, h₃⟩ := Turing.tr_eval (tr_respects M) (trCfg_init k L) h₂\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.mk\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nc₁ : TM1.Cfg Γ' Λ' σ\nh₁ : c₁ ∈ eval (TM1.step (tr M)) (TM1.init (trInit k L))\nH₁ : Tape.right₀ c₁.Tape ∈ TM1.eval (tr M) (trInit k L)\nq✝ : Option Λ\nv✝ : σ\nS✝ : (k : K) → List (Γ k)\nL' : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S✝ k)))\nh₂ : { l := q✝, var := v✝, stk := S✝ } ∈ eval (TM2.step M) (TM2.init k L)\nH₂ : TM2.Cfg.stk { l := q✝, var := v✝, stk := S✝ } k ∈ TM2.eval M k L\nh₃ :\n  { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') } ∈\n    eval (TM1.step (tr M)) (TM1.init (trInit k L))\n⊢ ∃ S L',\n    addBottom L' = Tape.right₀ c₁.Tape ∧\n      (∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S k)))) ∧\n        S k = TM2.Cfg.stk { l := q✝, var := v✝, stk := S✝ } k\n[PROOFSTEP]\ncases Part.mem_unique h₁ h₃\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.mk.refl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nq✝ : Option Λ\nv✝ : σ\nS✝ : (k : K) → List (Γ k)\nL' : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S✝ k)))\nh₂ : { l := q✝, var := v✝, stk := S✝ } ∈ eval (TM2.step M) (TM2.init k L)\nH₂ : TM2.Cfg.stk { l := q✝, var := v✝, stk := S✝ } k ∈ TM2.eval M k L\nh₃ :\n  { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') } ∈\n    eval (TM1.step (tr M)) (TM1.init (trInit k L))\nh₁ :\n  { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') } ∈\n    eval (TM1.step (tr M)) (TM1.init (trInit k L))\nH₁ :\n  Tape.right₀ { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') }.Tape ∈\n    TM1.eval (tr M) (trInit k L)\n⊢ ∃ S L'_1,\n    addBottom L'_1 = Tape.right₀ { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') }.Tape ∧\n      (∀ (k : K), ListBlank.map (proj k) L'_1 = ListBlank.mk (List.reverse (List.map some (S k)))) ∧\n        S k = TM2.Cfg.stk { l := q✝, var := v✝, stk := S✝ } k\n[PROOFSTEP]\nexact ⟨_, L', by simp only [Tape.mk'_right₀], hT, rfl⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nk : K\nL : List (Γ k)\nq✝ : Option Λ\nv✝ : σ\nS✝ : (k : K) → List (Γ k)\nL' : ListBlank ((k : K) → Option (Γ k))\nhT : ∀ (k : K), ListBlank.map (proj k) L' = ListBlank.mk (List.reverse (List.map some (S✝ k)))\nh₂ : { l := q✝, var := v✝, stk := S✝ } ∈ eval (TM2.step M) (TM2.init k L)\nH₂ : TM2.Cfg.stk { l := q✝, var := v✝, stk := S✝ } k ∈ TM2.eval M k L\nh₃ :\n  { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') } ∈\n    eval (TM1.step (tr M)) (TM1.init (trInit k L))\nh₁ :\n  { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') } ∈\n    eval (TM1.step (tr M)) (TM1.init (trInit k L))\nH₁ :\n  Tape.right₀ { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') }.Tape ∈\n    TM1.eval (tr M) (trInit k L)\n⊢ addBottom L' = Tape.right₀ { l := Option.map normal q✝, var := v✝, Tape := Tape.mk' ∅ (addBottom L') }.Tape\n[PROOFSTEP]\nsimp only [Tape.mk'_right₀]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh : l' ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nsuffices\n  ∀ (q) (_ : TM2.SupportsStmt S q) (_ : ∀ x ∈ trStmts₁ q, x ∈ trSupp M S),\n    TM1.SupportsStmt (trSupp M S) (trNormal q) ∧ ∀ l' ∈ trStmts₁ q, TM1.SupportsStmt (trSupp M S) (tr M l')\n  by\n  rcases Finset.mem_biUnion.1 h with ⟨l, lS, h⟩\n  have := this _ (ss.2 l lS) fun x hx ↦ Finset.mem_biUnion.2 ⟨_, lS, Finset.mem_insert_of_mem hx⟩\n  rcases Finset.mem_insert.1 h with (rfl | h) <;> [exact this.1; exact this.2 _ h]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh : l' ∈ trSupp M S\nthis :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrcases Finset.mem_biUnion.1 h with ⟨l, lS, h⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh✝ : l' ∈ trSupp M S\nthis :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ\nlS : l ∈ S\nh : l' ∈ insert (normal l) (trStmts₁ (M l))\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nhave := this _ (ss.2 l lS) fun x hx ↦ Finset.mem_biUnion.2 ⟨_, lS, Finset.mem_insert_of_mem hx⟩\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh✝ : l' ∈ trSupp M S\nthis✝ :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ\nlS : l ∈ S\nh : l' ∈ insert (normal l) (trStmts₁ (M l))\nthis :\n  TM1.SupportsStmt (trSupp M S) (trNormal (M l)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (M l) → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrcases Finset.mem_insert.1 h with (rfl | h) <;> [exact this.1; exact this.2 _ h]\n[GOAL]\ncase intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh✝ : l' ∈ trSupp M S\nthis✝ :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ\nlS : l ∈ S\nh : l' ∈ insert (normal l) (trStmts₁ (M l))\nthis :\n  TM1.SupportsStmt (trSupp M S) (trNormal (M l)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (M l) → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrcases Finset.mem_insert.1 h with (rfl | h)\n[GOAL]\ncase intro.intro.inl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nthis✝ :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ\nlS : l ∈ S\nthis :\n  TM1.SupportsStmt (trSupp M S) (trNormal (M l)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (M l) → TM1.SupportsStmt (trSupp M S) (tr M l')\nh✝ : normal l ∈ trSupp M S\nh : normal l ∈ insert (normal l) (trStmts₁ (M l))\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (normal l))\n[PROOFSTEP]\nexact this.1\n[GOAL]\ncase intro.intro.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh✝¹ : l' ∈ trSupp M S\nthis✝ :\n  ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ\nlS : l ∈ S\nh✝ : l' ∈ insert (normal l) (trStmts₁ (M l))\nthis :\n  TM1.SupportsStmt (trSupp M S) (trNormal (M l)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (M l) → TM1.SupportsStmt (trSupp M S) (tr M l')\nh : l' ∈ trStmts₁ (M l)\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nexact this.2 _ h\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl' : Λ'\nh : l' ∈ trSupp M S\n⊢ ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nclear h l'\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ ∀ (q : Stmt₂),\n    TM2.SupportsStmt S q →\n      (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrefine' stmtStRec _ _ _ _ _\n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ ∀ (k : K) (s : StAct k) (q : Stmt₂),\n    (TM2.SupportsStmt S q →\n        (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n          TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n            ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')) →\n      TM2.SupportsStmt S (stRun s q) →\n        (∀ (x : Λ'), x ∈ trStmts₁ (stRun s q) → x ∈ trSupp M S) →\n          TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q)) ∧\n            ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nintro _ s _ IH ss' sub\n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (stRun s q✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ (stRun s q✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrw [TM2to1.supports_run] at ss' \n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), x ∈ trStmts₁ (stRun s q✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nsimp only [TM2to1.trStmts₁_run, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton] at sub \n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nhave hgo := sub _ (Or.inl <| Or.inl rfl)\n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nhave hret := sub _ (Or.inl <| Or.inr rfl)\n[GOAL]\ncase refine'_1\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\ncases' IH ss' fun x hx ↦ sub x <| Or.inr hx with IH₁ IH₂\n[GOAL]\ncase refine'_1.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (stRun s q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrefine' ⟨by simp only [trNormal_run, TM1.SupportsStmt]; intros; exact hgo, fun l h ↦ _⟩\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (stRun s q✝))\n[PROOFSTEP]\nsimp only [trNormal_run, TM1.SupportsStmt]\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ Γ' → σ → go k✝ s q✝ ∈ trSupp M S\n[PROOFSTEP]\nintros\n[GOAL]\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\na✝ : Γ'\nv✝ : σ\n⊢ go k✝ s q✝ ∈ trSupp M S\n[PROOFSTEP]\nexact hgo\n[GOAL]\ncase refine'_1.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ trStmts₁ (stRun s q✝)\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nrw [trStmts₁_run] at h \n[GOAL]\ncase refine'_1.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ {go k✝ s q✝, ret q✝} ∪ trStmts₁ q✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nsimp only [TM2to1.trStmts₁_run, Finset.mem_union, Finset.mem_insert, Finset.mem_singleton] at h \n[GOAL]\ncase refine'_1.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : (l = go k✝ s q✝ ∨ l = ret q✝) ∨ l ∈ trStmts₁ q✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nrcases h with (⟨rfl | rfl⟩ | h)\n[GOAL]\ncase refine'_1.intro.inl.inl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ s q✝))\n[PROOFSTEP]\ncases s\n[GOAL]\ncase refine'_1.intro.inl.inl.push\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\na✝ : σ → Γ k✝\nsub : ∀ (x : Λ'), (x = go k✝ (StAct.push a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ (StAct.push a✝) q✝ ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.push a✝) q✝))\n[PROOFSTEP]\nexact ⟨fun _ _ ↦ hret, fun _ _ ↦ hgo⟩\n[GOAL]\ncase refine'_1.intro.inl.inl.peek\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\na✝ : σ → Option (Γ k✝) → σ\nsub : ∀ (x : Λ'), (x = go k✝ (StAct.peek a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ (StAct.peek a✝) q✝ ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.peek a✝) q✝))\n[PROOFSTEP]\nexact ⟨fun _ _ ↦ hret, fun _ _ ↦ hgo⟩\n[GOAL]\ncase refine'_1.intro.inl.inl.pop\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\na✝ : σ → Option (Γ k✝) → σ\nsub : ∀ (x : Λ'), (x = go k✝ (StAct.pop a✝) q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ (StAct.pop a✝) q✝ ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (go k✝ (StAct.pop a✝) q✝))\n[PROOFSTEP]\nexact ⟨⟨fun _ _ ↦ hret, fun _ _ ↦ hret⟩, fun _ _ ↦ hgo⟩\n[GOAL]\ncase refine'_1.intro.inl.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (tr M (ret q✝))\n[PROOFSTEP]\nunfold TM1.SupportsStmt TM2to1.tr\n[GOAL]\ncase refine'_1.intro.inl.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ match\n    match ret q✝ with\n    | normal q => trNormal (M q)\n    | go k s q =>\n      branch (fun a x => Option.isNone (Prod.snd a k)) (trStAct (goto fun x x => ret q) s)\n        (move Dir.right (goto fun x x => go k s q))\n    | ret q => branch (fun a x => a.fst) (trNormal q) (move Dir.left (goto fun x x => ret q)) with\n  | move a q => TM1.SupportsStmt (trSupp M S) q\n  | write a q => TM1.SupportsStmt (trSupp M S) q\n  | load a q => TM1.SupportsStmt (trSupp M S) q\n  | branch a q₁ q₂ => TM1.SupportsStmt (trSupp M S) q₁ ∧ TM1.SupportsStmt (trSupp M S) q₂\n  | goto l => ∀ (a : Γ') (v : σ), l a v ∈ trSupp M S\n  | halt => True\n[PROOFSTEP]\nexact ⟨IH₁, fun _ _ ↦ hret⟩\n[GOAL]\ncase refine'_1.intro.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nk✝ : K\ns : StAct k✝\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S q✝\nsub : ∀ (x : Λ'), (x = go k✝ s q✝ ∨ x = ret q✝) ∨ x ∈ trStmts₁ q✝ → x ∈ trSupp M S\nhgo : go k✝ s q✝ ∈ trSupp M S\nhret : ret q✝ ∈ trSupp M S\nIH₁ : TM1.SupportsStmt (trSupp M S) (trNormal q✝)\nIH₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ trStmts₁ q✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nexact IH₂ _ h\n[GOAL]\ncase refine'_2\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ ∀ (a : σ → σ) (q : Stmt₂),\n    (TM2.SupportsStmt S q →\n        (∀ (x : Λ'), x ∈ trStmts₁ q → x ∈ trSupp M S) →\n          TM1.SupportsStmt (trSupp M S) (trNormal q) ∧\n            ∀ (l' : Λ'), l' ∈ trStmts₁ q → TM1.SupportsStmt (trSupp M S) (tr M l')) →\n      TM2.SupportsStmt S (TM2.Stmt.load a q) →\n        (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.load a q) → x ∈ trSupp M S) →\n          TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a q)) ∧\n            ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.load a q) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nintro _ _ IH ss' sub\n[GOAL]\ncase refine'_2\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\na✝ : σ → σ\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.load a✝ q✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.load a✝ q✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a✝ q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.load a✝ q✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nunfold TM2to1.trStmts₁ at ss' sub ⊢\n[GOAL]\ncase refine'_2\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\na✝ : σ → σ\nq✝ : Stmt₂\nIH :\n  TM2.SupportsStmt S q✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.load a✝ q✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q✝ → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.load a✝ q✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ q✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nexact IH ss' sub\n[GOAL]\ncase refine'_3\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ ∀ (p : σ → Bool) (q₁ q₂ : Stmt₂),\n    (TM2.SupportsStmt S q₁ →\n        (∀ (x : Λ'), x ∈ trStmts₁ q₁ → x ∈ trSupp M S) →\n          TM1.SupportsStmt (trSupp M S) (trNormal q₁) ∧\n            ∀ (l' : Λ'), l' ∈ trStmts₁ q₁ → TM1.SupportsStmt (trSupp M S) (tr M l')) →\n      (TM2.SupportsStmt S q₂ →\n          (∀ (x : Λ'), x ∈ trStmts₁ q₂ → x ∈ trSupp M S) →\n            TM1.SupportsStmt (trSupp M S) (trNormal q₂) ∧\n              ∀ (l' : Λ'), l' ∈ trStmts₁ q₂ → TM1.SupportsStmt (trSupp M S) (tr M l')) →\n        TM2.SupportsStmt S (TM2.Stmt.branch p q₁ q₂) →\n          (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.branch p q₁ q₂) → x ∈ trSupp M S) →\n            TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p q₁ q₂)) ∧\n              ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p q₁ q₂) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nintro _ _ _ IH₁ IH₂ ss' sub\n[GOAL]\ncase refine'_3\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nunfold TM2to1.trStmts₁ at sub \n[GOAL]\ncase refine'_3\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\ncases' IH₁ ss'.1 fun x hx ↦ sub x <| Finset.mem_union_left _ hx with IH₁₁ IH₁₂\n[GOAL]\ncase refine'_3.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\ncases' IH₂ ss'.2 fun x hx ↦ sub x <| Finset.mem_union_right _ hx with IH₂₁ IH₂₂\n[GOAL]\ncase refine'_3.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.branch p✝ q₁✝ q₂✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrefine' ⟨⟨IH₁₁, IH₂₁⟩, fun l h ↦ _⟩\n[GOAL]\ncase refine'_3.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ trStmts₁ (TM2.Stmt.branch p✝ q₁✝ q₂✝)\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nrw [trStmts₁] at h \n[GOAL]\ncase refine'_3.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nrcases Finset.mem_union.1 h with (h | h) <;> [exact IH₁₂ _ h; exact IH₂₂ _ h]\n[GOAL]\ncase refine'_3.intro.intro\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh : l ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nrcases Finset.mem_union.1 h with (h | h)\n[GOAL]\ncase refine'_3.intro.intro.inl\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh✝ : l ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝\nh : l ∈ trStmts₁ q₁✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nexact IH₁₂ _ h\n[GOAL]\ncase refine'_3.intro.intro.inr\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\np✝ : σ → Bool\nq₁✝ q₂✝ : Stmt₂\nIH₁ :\n  TM2.SupportsStmt S q₁✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₁✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₁✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂ :\n  TM2.SupportsStmt S q₂✝ →\n    (∀ (x : Λ'), x ∈ trStmts₁ q₂✝ → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal q₂✝) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nss' : TM2.SupportsStmt S (TM2.Stmt.branch p✝ q₁✝ q₂✝)\nsub : ∀ (x : Λ'), x ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝ → x ∈ trSupp M S\nIH₁₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₁✝)\nIH₁₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₁✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nIH₂₁ : TM1.SupportsStmt (trSupp M S) (trNormal q₂✝)\nIH₂₂ : ∀ (l' : Λ'), l' ∈ trStmts₁ q₂✝ → TM1.SupportsStmt (trSupp M S) (tr M l')\nl : Λ'\nh✝ : l ∈ trStmts₁ q₁✝ ∪ trStmts₁ q₂✝\nh : l ∈ trStmts₁ q₂✝\n⊢ TM1.SupportsStmt (trSupp M S) (tr M l)\n[PROOFSTEP]\nexact IH₂₂ _ h\n[GOAL]\ncase refine'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ ∀ (l : σ → Λ),\n    TM2.SupportsStmt S (TM2.Stmt.goto l) →\n      (∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l) → x ∈ trSupp M S) →\n        TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l)) ∧\n          ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.goto l) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nintro _ ss'\n  _\n    -- goto\n[GOAL]\ncase refine'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl✝ : σ → Λ\nss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)\nx✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝)) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ (TM2.Stmt.goto l✝) → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nsimp only [trStmts₁, Finset.not_mem_empty]\n[GOAL]\ncase refine'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl✝ : σ → Λ\nss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)\nx✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝)) ∧\n    ∀ (l' : Λ'), False → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nrefine' ⟨_, fun _ ↦ False.elim⟩\n[GOAL]\ncase refine'_4\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nl✝ : σ → Λ\nss' : TM2.SupportsStmt S (TM2.Stmt.goto l✝)\nx✝ : ∀ (x : Λ'), x ∈ trStmts₁ (TM2.Stmt.goto l✝) → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal (TM2.Stmt.goto l✝))\n[PROOFSTEP]\nexact fun _ v ↦ Finset.mem_biUnion.2 ⟨_, ss' v, Finset.mem_insert_self _ _⟩\n[GOAL]\ncase refine'_5\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\n⊢ TM2.SupportsStmt S TM2.Stmt.halt →\n    (∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S) →\n      TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧\n        ∀ (l' : Λ'), l' ∈ trStmts₁ TM2.Stmt.halt → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nintro _\n  _\n    -- halt\n[GOAL]\ncase refine'_5\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nx✝¹ : TM2.SupportsStmt S TM2.Stmt.halt\nx✝ : ∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧\n    ∀ (l' : Λ'), l' ∈ trStmts₁ TM2.Stmt.halt → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nsimp only [trStmts₁, Finset.not_mem_empty]\n[GOAL]\ncase refine'_5\nK : Type u_1\ninst✝² : DecidableEq K\nΓ : K → Type u_2\nΛ : Type u_3\ninst✝¹ : Inhabited Λ\nσ : Type u_4\ninst✝ : Inhabited σ\nM : Λ → Stmt₂\nS : Finset Λ\nss : TM2.Supports M S\nx✝¹ : TM2.SupportsStmt S TM2.Stmt.halt\nx✝ : ∀ (x : Λ'), x ∈ trStmts₁ TM2.Stmt.halt → x ∈ trSupp M S\n⊢ TM1.SupportsStmt (trSupp M S) (trNormal TM2.Stmt.halt) ∧ ∀ (l' : Λ'), False → TM1.SupportsStmt (trSupp M S) (tr M l')\n[PROOFSTEP]\nexact ⟨trivial, fun _ ↦ False.elim⟩\n", "meta": {"mathlib_filename": "Mathlib.Computability.TuringMachine", "llama_tokens": 358268, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526660244838, "lm_q2_score": 0.5, "lm_q1q2_score": 0.2849263330122419}}
{"text": "[GOAL]\nα : Type u_1\nβ : α → Type u_2\nγ : Type u_3\nfγ : (a : α) × (β a → γ) → γ\nfγ_injective : Function.Injective fγ\na₁ : α\nf₁ : β a₁ → WType fun a => β a\na₂ : α\nf₂ : β a₂ → WType fun a => β a\nh : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₂ f₂)\n⊢ mk a₁ f₁ = mk a₂ f₂\n[PROOFSTEP]\nobtain ⟨rfl, h⟩ := Sigma.mk.inj_iff.mp (fγ_injective h)\n[GOAL]\ncase intro\nα : Type u_1\nβ : α → Type u_2\nγ : Type u_3\nfγ : (a : α) × (β a → γ) → γ\nfγ_injective : Function.Injective fγ\na₁ : α\nf₁ f₂ : β a₁ → WType fun a => β a\nh✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)\nh : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)\n⊢ mk a₁ f₁ = mk a₁ f₂\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase intro.e_f.h\nα : Type u_1\nβ : α → Type u_2\nγ : Type u_3\nfγ : (a : α) × (β a → γ) → γ\nfγ_injective : Function.Injective fγ\na₁ : α\nf₁ f₂ : β a₁ → WType fun a => β a\nh✝ : elim γ fγ (mk a₁ f₁) = elim γ fγ (mk a₁ f₂)\nh : HEq (fun b => elim γ fγ (f₁ b)) fun b => elim γ fγ (f₂ b)\nx : β a₁\n⊢ f₁ x = f₂ x\n[PROOFSTEP]\nexact elim_injective γ fγ fγ_injective (congr_fun (eq_of_heq h) x : _)\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\n⊢ ¬Finite (WType β)\n[PROOFSTEP]\nintro hf\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\n⊢ False\n[PROOFSTEP]\nhave hba : b ≠ a := fun h => ha.elim (IsEmpty.elim' (show IsEmpty (β a) from h ▸ he))\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\n⊢ False\n[PROOFSTEP]\nrefine'\n  not_injective_infinite_finite\n    (fun n : ℕ => show WType β from Nat.recOn n ⟨b, IsEmpty.elim' he⟩ fun _ ih => ⟨a, fun _ => ih⟩) _\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\n⊢ Function.Injective fun n =>\n    let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n    this\n[PROOFSTEP]\nintro n m h\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn m : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\n⊢ n = m\n[PROOFSTEP]\ninduction' n with n ih generalizing m\n[GOAL]\ncase zero\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn m✝ : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m✝\nm : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      Nat.zero =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\n⊢ Nat.zero = m\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase zero.zero\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn m : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      Nat.zero =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      Nat.zero\n⊢ Nat.zero = Nat.zero\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase zero.succ\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn m✝ : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m✝\nm : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      Nat.zero =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ m)\n⊢ Nat.zero = Nat.succ m\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn✝ m✝ : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n✝ =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m✝\nn : ℕ\nih :\n  ∀ ⦃m : ℕ⦄,\n    (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          n =\n        (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          m →\n      n = m\nm : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ n) =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\n⊢ Nat.succ n = m\n[PROOFSTEP]\ncases' m with m\n[GOAL]\ncase succ.zero\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn✝ m : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n✝ =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\nn : ℕ\nih :\n  ∀ ⦃m : ℕ⦄,\n    (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          n =\n        (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          m →\n      n = m\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ n) =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      Nat.zero\n⊢ Nat.succ n = Nat.zero\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn✝ m✝ : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n✝ =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m✝\nn : ℕ\nih :\n  ∀ ⦃m : ℕ⦄,\n    (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          n =\n        (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          m →\n      n = m\nm : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ n) =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ m)\n⊢ Nat.succ n = Nat.succ m\n[PROOFSTEP]\nrefine' congr_arg Nat.succ (ih _)\n[GOAL]\ncase succ.succ\nα : Type u_1\nβ : α → Type u_2\na b : α\nha : Nonempty (β a)\nhe : IsEmpty (β b)\nhf : Finite (WType β)\nhba : b ≠ a\nn✝ m✝ : ℕ\nh✝ :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n✝ =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m✝\nn : ℕ\nih :\n  ∀ ⦃m : ℕ⦄,\n    (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          n =\n        (fun n =>\n            let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n            this)\n          m →\n      n = m\nm : ℕ\nh :\n  (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ n) =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      (Nat.succ m)\n⊢ (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      n =\n    (fun n =>\n        let_fun this := Nat.recOn n (mk b (IsEmpty.elim' he)) fun x ih => mk a fun x => ih;\n        this)\n      m\n[PROOFSTEP]\nsimp_all [Function.funext_iff]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝ : (a : α) → Fintype (β a)\nt : WType β\n⊢ 0 < depth t\n[PROOFSTEP]\ncases t\n[GOAL]\ncase mk\nα : Type u_1\nβ : α → Type u_2\ninst✝ : (a : α) → Fintype (β a)\na✝ : α\nf✝ : β a✝ → WType β\n⊢ 0 < depth (mk a✝ f✝)\n[PROOFSTEP]\napply Nat.succ_pos\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝¹ : (a : α) → Fintype (β a)\ninst✝ : (a : α) → Encodable (β a)\nf : WType.WType' β 0 → Empty :=\n  fun x =>\n    match x with\n    | { val := x, property := h } => False.elim (_ : False)\n⊢ Empty → WType.WType' β 0\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝¹ : (a : α) → Fintype (β a)\ninst✝ : (a : α) → Encodable (β a)\nf : WType.WType' β 0 → Empty :=\n  fun x =>\n    match x with\n    | { val := x, property := h } => False.elim (_ : False)\nx : Empty\n⊢ WType.WType' β 0\n[PROOFSTEP]\ncases x\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝¹ : (a : α) → Fintype (β a)\ninst✝ : (a : α) → Encodable (β a)\nn : ℕ\nt : WType β\nh : depth t ≤ n + 1\n⊢ (a : α) × (β a → WType.WType' β n)\n[PROOFSTEP]\ncases' t with a f\n[GOAL]\ncase mk\nα : Type u_1\nβ : α → Type u_2\ninst✝¹ : (a : α) → Fintype (β a)\ninst✝ : (a : α) → Encodable (β a)\nn : ℕ\na : α\nf : β a → WType β\nh : depth (mk a f) ≤ n + 1\n⊢ (a : α) × (β a → WType.WType' β n)\n[PROOFSTEP]\nhave h₀ : ∀ i : β a, WType.depth (f i) ≤ n := fun i =>\n  Nat.le_of_lt_succ (lt_of_lt_of_le (WType.depth_lt_depth_mk a f i) h)\n[GOAL]\ncase mk\nα : Type u_1\nβ : α → Type u_2\ninst✝¹ : (a : α) → Fintype (β a)\ninst✝ : (a : α) → Encodable (β a)\nn : ℕ\na : α\nf : β a → WType β\nh : depth (mk a f) ≤ n + 1\nh₀ : ∀ (i : β a), depth (f i) ≤ n\n⊢ (a : α) × (β a → WType.WType' β n)\n[PROOFSTEP]\nexact ⟨a, fun i : β a => ⟨f i, h₀ i⟩⟩\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nn : ℕ\nh : Encodable (WType.WType' β n)\n⊢ ∀ (b : WType.WType' β (n + 1)), WType.finv n (WType.f n b) = b\n[PROOFSTEP]\nrintro ⟨⟨_, _⟩, _⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nn : ℕ\nh : Encodable (WType.WType' β n)\na✝ : α\nf✝ : β a✝ → WType β\nproperty✝ : depth (mk a✝ f✝) ≤ n + 1\n⊢ WType.finv n (WType.f n { val := mk a✝ f✝, property := property✝ }) = { val := mk a✝ f✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\n⊢ Encodable (WType β)\n[PROOFSTEP]\nhaveI h' : ∀ n, Encodable (WType' β n) := fun n => Nat.rec encodable_zero encodable_succ n\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nh' : (n : ℕ) → Encodable (WType.WType' β n)\n⊢ Encodable (WType β)\n[PROOFSTEP]\nlet f : WType β → Σ n, WType' β n := fun t => ⟨t.depth, ⟨t, le_rfl⟩⟩\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nh' : (n : ℕ) → Encodable (WType.WType' β n)\nf : WType β → (n : ℕ) × WType.WType' β n :=\n  fun t => { fst := depth t, snd := { val := t, property := (_ : depth t ≤ depth t) } }\n⊢ Encodable (WType β)\n[PROOFSTEP]\nlet finv : (Σ n, WType' β n) → WType β := fun p => p.2.1\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nh' : (n : ℕ) → Encodable (WType.WType' β n)\nf : WType β → (n : ℕ) × WType.WType' β n :=\n  fun t => { fst := depth t, snd := { val := t, property := (_ : depth t ≤ depth t) } }\nfinv : (n : ℕ) × WType.WType' β n → WType β := fun p => ↑p.snd\n⊢ Encodable (WType β)\n[PROOFSTEP]\nhave : ∀ t, finv (f t) = t := fun t => rfl\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\ninst✝² : (a : α) → Fintype (β a)\ninst✝¹ : (a : α) → Encodable (β a)\ninst✝ : Encodable α\nh' : (n : ℕ) → Encodable (WType.WType' β n)\nf : WType β → (n : ℕ) × WType.WType' β n :=\n  fun t => { fst := depth t, snd := { val := t, property := (_ : depth t ≤ depth t) } }\nfinv : (n : ℕ) × WType.WType' β n → WType β := fun p => ↑p.snd\nthis : ∀ (t : WType β), finv (f t) = t\n⊢ Encodable (WType β)\n[PROOFSTEP]\nexact Encodable.ofLeftInverse f finv this\n", "meta": {"mathlib_filename": "Mathlib.Data.W.Basic", "llama_tokens": 6270, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5774953651858117, "lm_q2_score": 0.49218813572079556, "lm_q1q2_score": 0.28423636717820466}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCancelAddCommMonoid M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nhb : card t • b < ∑ x in s, w x\n⊢ ∑ i in t, b < ∑ i in t, ∑ x in filter (fun x => f x = i) s, w x\n[PROOFSTEP]\nsimpa only [sum_fiberwise_of_maps_to hf, sum_const]\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCancelAddCommMonoid M\nht : ∀ (y : β), ¬y ∈ t → ∑ x in filter (fun x => f x = y) s, w x ≤ 0\nhb : card t • b < ∑ x in s, w x\n⊢ ∑ _y in t, b < ∑ x in s, w x\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCancelAddCommMonoid M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nht : Finset.Nonempty t\nhb : card t • b ≤ ∑ x in s, w x\n⊢ ∑ i in t, b ≤ ∑ i in t, ∑ x in filter (fun x => f x = i) s, w x\n[PROOFSTEP]\nsimpa only [sum_fiberwise_of_maps_to hf, sum_const]\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCancelAddCommMonoid M\nhf : ∀ (y : β), ¬y ∈ t → ∑ x in filter (fun x => f x = y) s, w x ≤ 0\nht : Finset.Nonempty t\nhb : card t • b ≤ ∑ x in s, w x\n⊢ ∑ _y in t, b ≤ ∑ x in s, w x\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nht : card t • b < ↑(card s)\n⊢ ∃ y, y ∈ t ∧ b < ↑(card (filter (fun x => f x = y) s))\n[PROOFSTEP]\nsimp_rw [cast_card] at ht ⊢\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nht : card t • b < ∑ a in s, 1\n⊢ ∃ y, y ∈ t ∧ b < ∑ a in filter (fun x => f x = y) s, 1\n[PROOFSTEP]\nexact exists_lt_sum_fiber_of_maps_to_of_nsmul_lt_sum hf ht\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nht : ↑(card s) < card t • b\n⊢ ∃ y, y ∈ t ∧ ↑(card (filter (fun x => f x = y) s)) < b\n[PROOFSTEP]\nsimp_rw [cast_card] at ht ⊢\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nht : ∑ a in s, 1 < card t • b\n⊢ ∃ y, y ∈ t ∧ ∑ a in filter (fun x => f x = y) s, 1 < b\n[PROOFSTEP]\nexact exists_sum_fiber_lt_of_sum_fiber_nonneg_of_sum_lt_nsmul (fun _ _ => sum_nonneg fun _ _ => zero_le_one) ht\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nht : Finset.Nonempty t\nhb : card t • b ≤ ↑(card s)\n⊢ ∃ y, y ∈ t ∧ b ≤ ↑(card (filter (fun x => f x = y) s))\n[PROOFSTEP]\nsimp_rw [cast_card] at hb ⊢\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nhf : ∀ (a : α), a ∈ s → f a ∈ t\nht : Finset.Nonempty t\nhb : card t • b ≤ ∑ a in s, 1\n⊢ ∃ y, y ∈ t ∧ b ≤ ∑ a in filter (fun x => f x = y) s, 1\n[PROOFSTEP]\nexact exists_le_sum_fiber_of_maps_to_of_nsmul_le_sum hf ht hb\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nht : Finset.Nonempty t\nhb : ↑(card s) ≤ card t • b\n⊢ ∃ y, y ∈ t ∧ ↑(card (filter (fun x => f x = y) s)) ≤ b\n[PROOFSTEP]\nsimp_rw [cast_card] at hb ⊢\n[GOAL]\nα : Type u\nβ : Type v\nM : Type w\ninst✝¹ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nw : α → M\nb : M\nn : ℕ\ninst✝ : LinearOrderedCommSemiring M\nht : Finset.Nonempty t\nhb : ∑ a in s, 1 ≤ card t • b\n⊢ ∃ y, y ∈ t ∧ ∑ a in filter (fun x => f x = y) s, 1 ≤ b\n[PROOFSTEP]\nrefine' exists_sum_fiber_le_of_sum_fiber_nonneg_of_sum_le_nsmul (fun _ _ => sum_nonneg fun _ _ => zero_le_one) ht hb\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.Pigeonhole", "llama_tokens": 2170, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6113819591324416, "lm_q2_score": 0.46490157137338844, "lm_q1q2_score": 0.28423243351001287}}
{"text": "[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\n⊢ IsClique G s ↔ induce s G = ⊤\n[PROOFSTEP]\nrw [isClique_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\n⊢ Set.Pairwise s G.Adj ↔ induce s G = ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\n⊢ Set.Pairwise s G.Adj → induce s G = ⊤\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : Set.Pairwise s G.Adj\n⊢ induce s G = ⊤\n[PROOFSTEP]\next ⟨v, hv⟩ ⟨w, hw⟩\n[GOAL]\ncase mp.Adj.h.mk.h.mk.a\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : Set.Pairwise s G.Adj\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\n⊢ Adj (induce s G) { val := v, property := hv } { val := w, property := hw } ↔\n    Adj ⊤ { val := v, property := hv } { val := w, property := hw }\n[PROOFSTEP]\nsimp only [comap_Adj, Subtype.coe_mk, top_adj, Ne.def, Subtype.mk_eq_mk]\n[GOAL]\ncase mp.Adj.h.mk.h.mk.a\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : Set.Pairwise s G.Adj\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\n⊢ Adj G (↑(Function.Embedding.subtype fun x => x ∈ s) { val := v, property := hv })\n      (↑(Function.Embedding.subtype fun x => x ∈ s) { val := w, property := hw }) ↔\n    ¬v = w\n[PROOFSTEP]\nexact ⟨Adj.ne, h hv hw⟩\n[GOAL]\ncase mpr\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\n⊢ induce s G = ⊤ → Set.Pairwise s G.Adj\n[PROOFSTEP]\nintro h v hv w hw hne\n[GOAL]\ncase mpr\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\n⊢ Adj G v w\n[PROOFSTEP]\nhave h2 : (G.induce s).Adj ⟨v, hv⟩ ⟨w, hw⟩ = _ := rfl\n[GOAL]\ncase mpr\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 :\n  Adj (induce s G) { val := v, property := hv } { val := w, property := hw } =\n    Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n⊢ Adj G v w\n[PROOFSTEP]\nconv_lhs at h2 => rw [h]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 :\n  Adj (induce s G) { val := v, property := hv } { val := w, property := hw } =\n    Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n| Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 :\n  Adj (induce s G) { val := v, property := hv } { val := w, property := hw } =\n    Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n| Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 :\n  Adj (induce s G) { val := v, property := hv } { val := w, property := hw } =\n    Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n| Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 :\n  Adj ⊤ { val := v, property := hv } { val := w, property := hw } =\n    Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n⊢ Adj G v w\n[PROOFSTEP]\nsimp only [top_adj, ne_eq, Subtype.mk.injEq, eq_iff_iff] at h2 \n[GOAL]\ncase mpr\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : induce s G = ⊤\nv : α\nhv : v ∈ s\nw : α\nhw : w ∈ s\nhne : v ≠ w\nh2 : ¬v = w ↔ Adj (induce s G) { val := v, property := hv } { val := w, property := hw }\n⊢ Adj G v w\n[PROOFSTEP]\nexact h2.1 hne\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : G ≤ H\n⊢ IsClique G s → IsClique H s\n[PROOFSTEP]\nsimp_rw [isClique_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : G ≤ H\n⊢ Set.Pairwise s G.Adj → Set.Pairwise s H.Adj\n[PROOFSTEP]\nexact Set.Pairwise.mono' h\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : t ⊆ s\n⊢ IsClique G s → IsClique G t\n[PROOFSTEP]\nsimp_rw [isClique_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns t : Set α\nh : t ⊆ s\n⊢ Set.Pairwise s G.Adj → Set.Pairwise t G.Adj\n[PROOFSTEP]\nexact Set.Pairwise.mono h\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\nh : G ≤ H\n⊢ IsNClique G n s → IsNClique H n s\n[PROOFSTEP]\nsimp_rw [isNClique_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\nh : G ≤ H\n⊢ IsClique G ↑s ∧ Finset.card s = n → IsClique H ↑s ∧ Finset.card s = n\n[PROOFSTEP]\nexact And.imp_left (IsClique.mono h)\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\n⊢ IsNClique ⊥ n s ↔ n ≤ 1 ∧ Finset.card s = n\n[PROOFSTEP]\nrw [isNClique_iff, isClique_bot_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\n⊢ Set.Subsingleton ↑s ∧ Finset.card s = n ↔ n ≤ 1 ∧ Finset.card s = n\n[PROOFSTEP]\nrefine' and_congr_left _\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\n⊢ Finset.card s = n → (Set.Subsingleton ↑s ↔ n ≤ 1)\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ns : Finset α\n⊢ Set.Subsingleton ↑s ↔ Finset.card s ≤ 1\n[PROOFSTEP]\nexact card_le_one.symm\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\n⊢ IsNClique G 3 {a, b, c} ↔ Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsimp only [isNClique_iff, isClique_iff, Set.pairwise_insert_of_symmetric G.symm, coe_insert]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hab : a = b\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hbc : b = c\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hbc : b = c\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : b = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hac : a = c\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : ¬b = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hac : a = c\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : b = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hac : a = c\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : ¬b = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nby_cases hac : a = c\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : b = c\nhac : a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : b = c\nhac : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : ¬b = c\nhac : a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : a = b\nhbc : ¬b = c\nhac : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : b = c\nhac : a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : b = c\nhac : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : ¬b = c\nhac : a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : ¬b = c\nhac : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nc : α\nhac : c = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b : α), b ∈ ↑{c} → c ≠ b → Adj G c b) ∧\n        ∀ (b : α), b ∈ insert c ↑{c} → c ≠ b → Adj G c b) ∧\n      Finset.card {c, c, c} = 3 ↔\n    Adj G c c ∧ Adj G c c ∧ Adj G c c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nc : α\nhac : ¬c = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b : α), b ∈ ↑{c} → c ≠ b → Adj G c b) ∧\n        ∀ (b : α), b ∈ insert c ↑{c} → c ≠ b → Adj G c b) ∧\n      Finset.card {c, c, c} = 3 ↔\n    Adj G c c ∧ Adj G c c ∧ Adj G c c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nc : α\nhbc : ¬c = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b : α), b ∈ ↑{c} → c ≠ b → Adj G c b) ∧\n        ∀ (b : α), b ∈ insert c ↑{c} → c ≠ b → Adj G c b) ∧\n      Finset.card {c, c, c} = 3 ↔\n    Adj G c c ∧ Adj G c c ∧ Adj G c c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nb c : α\nhbc hac : ¬b = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n      Finset.card {b, b, c} = 3 ↔\n    Adj G b b ∧ Adj G b c ∧ Adj G b c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nc : α\nhab : ¬c = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b : α), b ∈ ↑{c} → c ≠ b → Adj G c b) ∧\n        ∀ (b : α), b ∈ insert c ↑{c} → c ≠ b → Adj G c b) ∧\n      Finset.card {c, c, c} = 3 ↔\n    Adj G c c ∧ Adj G c c ∧ Adj G c c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na c : α\nhac hab : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b : α), b ∈ ↑{c} → c ≠ b → Adj G c b) ∧\n        ∀ (b : α), b ∈ insert c ↑{c} → a ≠ b → Adj G a b) ∧\n      Finset.card {a, c, c} = 3 ↔\n    Adj G a c ∧ Adj G a c ∧ Adj G c c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase pos\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\nb c : α\nhbc : ¬b = c\nhab : ¬c = b\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → c ≠ b_1 → Adj G c b_1) ∧\n      Finset.card {c, b, c} = 3 ↔\n    Adj G c b ∧ Adj G c c ∧ Adj G b c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\ncase neg\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nhab : ¬a = b\nhbc : ¬b = c\nhac : ¬a = c\n⊢ ((Set.Pairwise (↑{c}) G.Adj ∧ ∀ (b_1 : α), b_1 ∈ ↑{c} → b ≠ b_1 → Adj G b b_1) ∧\n        ∀ (b_1 : α), b_1 ∈ insert b ↑{c} → a ≠ b_1 → Adj G a b_1) ∧\n      Finset.card {a, b, c} = 3 ↔\n    Adj G a b ∧ Adj G a c ∧ Adj G b c\n[PROOFSTEP]\nsimp [G.ne_of_adj, and_rotate, *]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\n⊢ IsNClique G 3 s ↔ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}\n[PROOFSTEP]\nrefine' ⟨fun h ↦ _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\nh : IsNClique G 3 s\n⊢ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}\n[PROOFSTEP]\nobtain ⟨a, b, c, -, -, -, hs⟩ := card_eq_three.1 h.card_eq\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na✝ b✝ c✝ : α\nh : IsNClique G 3 s\na b c : α\nhs : s = {a, b, c}\n⊢ ∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}\n[PROOFSTEP]\nrefine' ⟨a, b, c, _⟩\n[GOAL]\ncase refine'_1.intro.intro.intro.intro.intro.intro\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na✝ b✝ c✝ : α\nh : IsNClique G 3 s\na b c : α\nhs : s = {a, b, c}\n⊢ Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}\n[PROOFSTEP]\nrwa [hs, eq_self_iff_true, and_true, is3Clique_triple_iff.symm, ← hs]\n[GOAL]\ncase refine'_2\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ns : Finset α\ninst✝ : DecidableEq α\na b c : α\n⊢ (∃ a b c, Adj G a b ∧ Adj G a c ∧ Adj G b c ∧ s = {a, b, c}) → IsNClique G 3 s\n[PROOFSTEP]\nrintro ⟨a, b, c, hab, hbc, hca, rfl⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.intro\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\ninst✝ : DecidableEq α\na✝ b✝ c✝ a b c : α\nhab : Adj G a b\nhbc : Adj G a c\nhca : Adj G b c\n⊢ IsNClique G 3 {a, b, c}\n[PROOFSTEP]\nexact is3Clique_triple_iff.2 ⟨hab, hbc, hca⟩\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\n⊢ ¬CliqueFree G n\n[PROOFSTEP]\nsimp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\n⊢ ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\n[PROOFSTEP]\nuse Finset.univ.map f.toEmbedding\n[GOAL]\ncase h\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\n⊢ induce (↑(map f.toEmbedding univ)) G = ⊤ ∧ Finset.card (map f.toEmbedding univ) = n\n[PROOFSTEP]\nsimp only [card_map, Finset.card_fin, eq_self_iff_true, and_true_iff]\n[GOAL]\ncase h\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\n⊢ induce (↑(map f.toEmbedding univ)) G = ⊤\n[PROOFSTEP]\next ⟨v, hv⟩ ⟨w, hw⟩\n[GOAL]\ncase h.Adj.h.mk.h.mk.a\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\nv : α\nhv : v ∈ ↑(map f.toEmbedding univ)\nw : α\nhw : w ∈ ↑(map f.toEmbedding univ)\n⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := v, property := hv } { val := w, property := hw } ↔\n    Adj ⊤ { val := v, property := hv } { val := w, property := hw }\n[PROOFSTEP]\nsimp only [coe_map, Set.mem_image, coe_univ, Set.mem_univ, true_and_iff] at hv hw \n[GOAL]\ncase h.Adj.h.mk.h.mk.a\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\nv : α\nhv✝ : v ∈ ↑(map f.toEmbedding univ)\nw : α\nhw✝ : w ∈ ↑(map f.toEmbedding univ)\nhv : ∃ x, ↑f.toEmbedding x = v\nhw : ∃ x, ↑f.toEmbedding x = w\n⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := v, property := hv✝ } { val := w, property := hw✝ } ↔\n    Adj ⊤ { val := v, property := hv✝ } { val := w, property := hw✝ }\n[PROOFSTEP]\nobtain ⟨v', rfl⟩ := hv\n[GOAL]\ncase h.Adj.h.mk.h.mk.a.intro\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\nw : α\nhw✝ : w ∈ ↑(map f.toEmbedding univ)\nhw : ∃ x, ↑f.toEmbedding x = w\nv' : Fin n\nhv : ↑f.toEmbedding v' ∈ ↑(map f.toEmbedding univ)\n⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := ↑f.toEmbedding v', property := hv }\n      { val := w, property := hw✝ } ↔\n    Adj ⊤ { val := ↑f.toEmbedding v', property := hv } { val := w, property := hw✝ }\n[PROOFSTEP]\nobtain ⟨w', rfl⟩ := hw\n[GOAL]\ncase h.Adj.h.mk.h.mk.a.intro.intro\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nf : ⊤ ↪g G\nv' : Fin n\nhv : ↑f.toEmbedding v' ∈ ↑(map f.toEmbedding univ)\nw' : Fin n\nhw : ↑f.toEmbedding w' ∈ ↑(map f.toEmbedding univ)\n⊢ Adj (induce (↑(map f.toEmbedding univ)) G) { val := ↑f.toEmbedding v', property := hv }\n      { val := ↑f.toEmbedding w', property := hw } ↔\n    Adj ⊤ { val := ↑f.toEmbedding v', property := hv } { val := ↑f.toEmbedding w', property := hw }\n[PROOFSTEP]\nsimp only [coe_sort_coe, RelEmbedding.coe_toEmbedding, comap_Adj, Function.Embedding.coe_subtype, f.map_adj_iff,\n  top_adj, ne_eq, Subtype.mk.injEq, RelEmbedding.inj]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ¬CliqueFree G n\n⊢ ⊤ ↪g G\n[PROOFSTEP]\nsimp only [CliqueFree, isNClique_iff, isClique_iff_induce_eq, not_forall, Classical.not_not] at h \n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\n⊢ ⊤ ↪g G\n[PROOFSTEP]\nobtain ⟨ha, hb⟩ := h.choose_spec\n[GOAL]\ncase intro\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\n⊢ ⊤ ↪g G\n[PROOFSTEP]\nhave : (⊤ : SimpleGraph (Fin h.choose.card)) ≃g (⊤ : SimpleGraph h.choose) :=\n  by\n  apply Iso.completeGraph\n  simpa using (Fintype.equivFin h.choose).symm\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\n⊢ ⊤ ≃g ⊤\n[PROOFSTEP]\napply Iso.completeGraph\n[GOAL]\ncase f\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\n⊢ Fin (Finset.card (Exists.choose h)) ≃ { x // x ∈ Exists.choose h }\n[PROOFSTEP]\nsimpa using (Fintype.equivFin h.choose).symm\n[GOAL]\ncase intro\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\nthis : ⊤ ≃g ⊤\n⊢ ⊤ ↪g G\n[PROOFSTEP]\nrw [← ha] at this \n[GOAL]\ncase intro\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\nthis : ⊤ ≃g induce (↑(Exists.choose h)) G\n⊢ ⊤ ↪g G\n[PROOFSTEP]\nconvert (Embedding.induce ↑h.choose.toSet).comp this.toEmbedding\n[GOAL]\ncase h.e'_1.h.e'_1\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\nh : ∃ x, induce (↑x) G = ⊤ ∧ Finset.card x = n\nha : induce (↑(Exists.choose h)) G = ⊤\nhb : Finset.card (Exists.choose h) = n\nthis : ⊤ ≃g induce (↑(Exists.choose h)) G\n⊢ n = Finset.card (Exists.choose h)\n[PROOFSTEP]\nexact hb.symm\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n✝ : ℕ\ns : Finset α\nn : ℕ\n⊢ CliqueFree G n ↔ IsEmpty (⊤ ↪g G)\n[PROOFSTEP]\nrw [← not_iff_not, not_cliqueFree_iff, not_isEmpty_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nf : ⊤ ↪g G\n⊢ ¬CliqueFree G (Fintype.card α)\n[PROOFSTEP]\nrw [not_cliqueFree_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nf : ⊤ ↪g G\n⊢ Nonempty (⊤ ↪g G)\n[PROOFSTEP]\nexact ⟨(Iso.completeGraph (Fintype.equivFin α)).symm.toEmbedding.trans f⟩\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\nh : 2 ≤ n\n⊢ CliqueFree ⊥ n\n[PROOFSTEP]\nintro t ht\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\nh : 2 ≤ n\nt : Finset α\nht : IsNClique ⊥ n t\n⊢ False\n[PROOFSTEP]\nhave := le_trans h (isNClique_bot_iff.1 ht).1\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\nh : 2 ≤ n\nt : Finset α\nht : IsNClique ⊥ n t\nthis : 2 ≤ 1\n⊢ False\n[PROOFSTEP]\nsimp only at this \n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\nh : m ≤ n\n⊢ CliqueFree G m → CliqueFree G n\n[PROOFSTEP]\nintro hG s hs\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns✝ : Finset α\nh : m ≤ n\nhG : CliqueFree G m\ns : Finset α\nhs : IsNClique G n s\n⊢ False\n[PROOFSTEP]\nobtain ⟨t, hts, ht⟩ := s.exists_smaller_set _ (h.trans hs.card_eq.ge)\n[GOAL]\ncase intro.intro\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns✝ : Finset α\nh : m ≤ n\nhG : CliqueFree G m\ns : Finset α\nhs : IsNClique G n s\nt : Finset α\nhts : t ⊆ s\nht : Finset.card t = m\n⊢ False\n[PROOFSTEP]\nexact hG _ ⟨hs.clique.subset hts, ht⟩\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nhc : Fintype.card α < n\n⊢ CliqueFree G n\n[PROOFSTEP]\nby_contra h\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nhc : Fintype.card α < n\nh : ¬CliqueFree G n\n⊢ False\n[PROOFSTEP]\nrefine' Nat.lt_le_antisymm hc _\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nhc : Fintype.card α < n\nh : ¬CliqueFree G n\n⊢ n ≤ Fintype.card α\n[PROOFSTEP]\nrw [cliqueFree_iff, not_isEmpty_iff] at h \n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nm n : ℕ\ns : Finset α\ninst✝ : Fintype α\nhc : Fintype.card α < n\nh : Nonempty (⊤ ↪g G)\n⊢ n ≤ Fintype.card α\n[PROOFSTEP]\nsimpa only [Fintype.card_fin] using Fintype.card_le_of_embedding h.some.toEmbedding\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\nn : ℕ\na b c : α\ns : Finset α\n⊢ cliqueSet G n = ∅ ↔ CliqueFree G n\n[PROOFSTEP]\nsimp_rw [CliqueFree, Set.eq_empty_iff_forall_not_mem, mem_cliqueSet_iff]\n[GOAL]\nα : Type u_1\nG H : SimpleGraph α\ninst✝² : Fintype α\ninst✝¹ : DecidableEq α\ninst✝ : DecidableRel G.Adj\nn : ℕ\na b c : α\ns : Finset α\n⊢ cliqueFinset G n = ∅ ↔ CliqueFree G n\n[PROOFSTEP]\nsimp_rw [CliqueFree, eq_empty_iff_forall_not_mem, mem_cliqueFinset_iff]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Clique", "llama_tokens": 12391, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5506073655352404, "lm_q2_score": 0.5156199157230156, "lm_q1q2_score": 0.28390412341375226}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f)) (cons (a ::ₘ m) a' b' (cons m a b f))\n[PROOFSTEP]\napply hfunext rfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\n⊢ ∀ (a_1 a'_1 : α),\n    HEq a_1 a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a ::ₘ m) a' b' (cons m a b f) a'_1)\n[PROOFSTEP]\nsimp only [heq_iff_eq]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\n⊢ ∀ (a_1 a'_1 : α),\n    a_1 = a'_1 → HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a_1) (cons (a ::ₘ m) a' b' (cons m a b f) a'_1)\n[PROOFSTEP]\nrintro a'' _ rfl\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a'') (cons (a ::ₘ m) a' b' (cons m a b f) a'')\n[PROOFSTEP]\nrefine' hfunext (by rw [Multiset.cons_swap]) fun ha₁ ha₂ _ => _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\n⊢ (a'' ∈ a ::ₘ a' ::ₘ m) = (a'' ∈ a' ::ₘ a ::ₘ m)\n[PROOFSTEP]\nrw [Multiset.cons_swap]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\nha₁ : a'' ∈ a ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a'' ha₁) (cons (a ::ₘ m) a' b' (cons m a b f) a'' ha₂)\n[PROOFSTEP]\nrcases ne_or_eq a'' a with (h₁ | rfl)\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\nha₁ : a'' ∈ a ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\nh₁ : a'' ≠ a\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a'' ha₁) (cons (a ::ₘ m) a' b' (cons m a b f) a'' ha₂)\ncase inr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na' : α\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\na'' : α\nb : δ a''\nh : a'' ≠ a'\nha₁ : a'' ∈ a'' ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a'' ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a' ::ₘ m) a'' b (cons m a' b' f) a'' ha₁) (cons (a'' ::ₘ m) a' b' (cons m a'' b f) a'' ha₂)\n[PROOFSTEP]\nrcases eq_or_ne a'' a' with (rfl | h₂)\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na : α\nb : δ a\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\na'' : α\nh₁ : a'' ≠ a\nb' : δ a''\nh : a ≠ a''\nha₁ : a'' ∈ a ::ₘ a'' ::ₘ m\nha₂ : a'' ∈ a'' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a'' ::ₘ m) a b (cons m a'' b' f) a'' ha₁) (cons (a ::ₘ m) a'' b' (cons m a b f) a'' ha₂)\ncase inl.inr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\nha₁ : a'' ∈ a ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\nh₁ : a'' ≠ a\nh₂ : a'' ≠ a'\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a'' ha₁) (cons (a ::ₘ m) a' b' (cons m a b f) a'' ha₂)\ncase inr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na' : α\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\na'' : α\nb : δ a''\nh : a'' ≠ a'\nha₁ : a'' ∈ a'' ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a'' ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a' ::ₘ m) a'' b (cons m a' b' f) a'' ha₁) (cons (a'' ::ₘ m) a' b' (cons m a'' b f) a'' ha₂)\n[PROOFSTEP]\nall_goals simp [*, Pi.cons_same, Pi.cons_ne]\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na : α\nb : δ a\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\na'' : α\nh₁ : a'' ≠ a\nb' : δ a''\nh : a ≠ a''\nha₁ : a'' ∈ a ::ₘ a'' ::ₘ m\nha₂ : a'' ∈ a'' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a'' ::ₘ m) a b (cons m a'' b' f) a'' ha₁) (cons (a ::ₘ m) a'' b' (cons m a b f) a'' ha₂)\n[PROOFSTEP]\nsimp [*, Pi.cons_same, Pi.cons_ne]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na a' : α\nb : δ a\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\nh : a ≠ a'\na'' : α\nha₁ : a'' ∈ a ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a ::ₘ m\nx✝ : HEq ha₁ ha₂\nh₁ : a'' ≠ a\nh₂ : a'' ≠ a'\n⊢ HEq (cons (a' ::ₘ m) a b (cons m a' b' f) a'' ha₁) (cons (a ::ₘ m) a' b' (cons m a b f) a'' ha₂)\n[PROOFSTEP]\nsimp [*, Pi.cons_same, Pi.cons_ne]\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na' : α\nb' : δ a'\nm : Multiset α\nf : (a : α) → a ∈ m → δ a\na'' : α\nb : δ a''\nh : a'' ≠ a'\nha₁ : a'' ∈ a'' ::ₘ a' ::ₘ m\nha₂ : a'' ∈ a' ::ₘ a'' ::ₘ m\nx✝ : HEq ha₁ ha₂\n⊢ HEq (cons (a' ::ₘ m) a'' b (cons m a' b' f) a'' ha₁) (cons (a'' ::ₘ m) a' b' (cons m a'' b f) a'' ha₂)\n[PROOFSTEP]\nsimp [*, Pi.cons_same, Pi.cons_ne]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\na : α\nf : (a' : α) → a' ∈ a ::ₘ m → δ a'\n⊢ (Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) = f\n[PROOFSTEP]\next a' h'\n[GOAL]\ncase h.h\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\na : α\nf : (a' : α) → a' ∈ a ::ₘ m → δ a'\na' : α\nh' : a' ∈ a ::ₘ m\n⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'\n[PROOFSTEP]\nby_cases h : a' = a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\na : α\nf : (a' : α) → a' ∈ a ::ₘ m → δ a'\na' : α\nh' : a' ∈ a ::ₘ m\nh : a' = a\n⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\na' : α\nf : (a'_1 : α) → a'_1 ∈ a' ::ₘ m → δ a'_1\nh' : a' ∈ a' ::ₘ m\n⊢ Pi.cons m a' (f a' (_ : a' ∈ a' ::ₘ m)) (fun a'_1 ha' => f a'_1 (_ : a'_1 ∈ a' ::ₘ m)) a' h' = f a' h'\n[PROOFSTEP]\nrw [Pi.cons_same]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\na : α\nf : (a' : α) → a' ∈ a ::ₘ m → δ a'\na' : α\nh' : a' ∈ a ::ₘ m\nh : ¬a' = a\n⊢ Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) (fun a' ha' => f a' (_ : a' ∈ a ::ₘ m)) a' h' = f a' h'\n[PROOFSTEP]\nrw [Pi.cons_ne _ h]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na : α\nb : δ a\ns : Multiset α\nhs : ¬a ∈ s\nf₁ f₂ : (a : α) → a ∈ s → δ a\neq : cons s a b f₁ = cons s a b f₂\na' : α\nh' : a' ∈ s\nne : a ≠ a'\nthis : a' ∈ a ::ₘ s\n⊢ f₁ a' h' = cons s a b f₁ a' this\n[PROOFSTEP]\nrw [Pi.cons_ne this ne.symm]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na : α\nb : δ a\ns : Multiset α\nhs : ¬a ∈ s\nf₁ f₂ : (a : α) → a ∈ s → δ a\neq : cons s a b f₁ = cons s a b f₂\na' : α\nh' : a' ∈ s\nne : a ≠ a'\nthis : a' ∈ a ::ₘ s\n⊢ cons s a b f₁ a' this = cons s a b f₂ a' this\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\na : α\nb : δ a\ns : Multiset α\nhs : ¬a ∈ s\nf₁ f₂ : (a : α) → a ∈ s → δ a\neq : cons s a b f₁ = cons s a b f₂\na' : α\nh' : a' ∈ s\nne : a ≠ a'\nthis : a' ∈ a ::ₘ s\n⊢ cons s a b f₂ a' this = f₂ a' h'\n[PROOFSTEP]\nrw [Pi.cons_ne this ne.symm]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\n⊢ ∀ (a a' : α) (m : Multiset α) (b : Multiset ((a : α) → a ∈ m → β a)),\n    HEq (bind (t a) fun b_1 => map (Pi.cons (a' ::ₘ m) a b_1) (bind (t a') fun b_2 => map (Pi.cons m a' b_2) b))\n      (bind (t a') fun b_1 => map (Pi.cons (a ::ₘ m) a' b_1) (bind (t a) fun b_2 => map (Pi.cons m a b_2) b))\n[PROOFSTEP]\nintro a a' m n\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\n⊢ HEq (bind (t a) fun b => map (Pi.cons (a' ::ₘ m) a b) (bind (t a') fun b => map (Pi.cons m a' b) n))\n    (bind (t a') fun b => map (Pi.cons (a ::ₘ m) a' b) (bind (t a) fun b => map (Pi.cons m a b) n))\n[PROOFSTEP]\nby_cases eq : a = a'\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : a = a'\n⊢ HEq (bind (t a) fun b => map (Pi.cons (a' ::ₘ m) a b) (bind (t a') fun b => map (Pi.cons m a' b) n))\n    (bind (t a') fun b => map (Pi.cons (a ::ₘ m) a' b) (bind (t a) fun b => map (Pi.cons m a b) n))\n[PROOFSTEP]\nsubst eq\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\n⊢ HEq (bind (t a) fun b => map (Pi.cons (a ::ₘ m) a b) (bind (t a) fun b => map (Pi.cons m a b) n))\n    (bind (t a) fun b => map (Pi.cons (a ::ₘ m) a b) (bind (t a) fun b => map (Pi.cons m a b) n))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\n⊢ HEq (bind (t a) fun b => map (Pi.cons (a' ::ₘ m) a b) (bind (t a') fun b => map (Pi.cons m a' b) n))\n    (bind (t a') fun b => map (Pi.cons (a ::ₘ m) a' b) (bind (t a) fun b => map (Pi.cons m a b) n))\n[PROOFSTEP]\nsimp [map_bind, bind_bind (t a') (t a)]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\n⊢ HEq (bind (t a) fun b => bind (t a') fun a_1 => map (fun x => Pi.cons (a' ::ₘ m) a b (Pi.cons m a' a_1 x)) n)\n    (bind (t a) fun b => bind (t a') fun a_1 => map (fun x => Pi.cons (a ::ₘ m) a' a_1 (Pi.cons m a b x)) n)\n[PROOFSTEP]\napply bind_hcongr\n[GOAL]\ncase neg.h\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\n⊢ ((a_1 : α) → a_1 ∈ a ::ₘ a' ::ₘ m → β a_1) = ((a_1 : α) → a_1 ∈ a' ::ₘ a ::ₘ m → β a_1)\n[PROOFSTEP]\nrw [cons_swap a a']\n[GOAL]\ncase neg.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\n⊢ ∀ (a_1 : β a),\n    a_1 ∈ t a →\n      HEq (bind (t a') fun a_3 => map (fun x => Pi.cons (a' ::ₘ m) a a_1 (Pi.cons m a' a_3 x)) n)\n        (bind (t a') fun a_3 => map (fun x => Pi.cons (a ::ₘ m) a' a_3 (Pi.cons m a a_1 x)) n)\n[PROOFSTEP]\nintro b _\n[GOAL]\ncase neg.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝ : b ∈ t a\n⊢ HEq (bind (t a') fun a_1 => map (fun x => Pi.cons (a' ::ₘ m) a b (Pi.cons m a' a_1 x)) n)\n    (bind (t a') fun a_1 => map (fun x => Pi.cons (a ::ₘ m) a' a_1 (Pi.cons m a b x)) n)\n[PROOFSTEP]\napply bind_hcongr\n[GOAL]\ncase neg.hf.h\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝ : b ∈ t a\n⊢ ((a_1 : α) → a_1 ∈ a ::ₘ a' ::ₘ m → β a_1) = ((a_1 : α) → a_1 ∈ a' ::ₘ a ::ₘ m → β a_1)\n[PROOFSTEP]\nrw [cons_swap a a']\n[GOAL]\ncase neg.hf.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝ : b ∈ t a\n⊢ ∀ (a_1 : β a'),\n    a_1 ∈ t a' →\n      HEq (map (fun x => Pi.cons (a' ::ₘ m) a b (Pi.cons m a' a_1 x)) n)\n        (map (fun x => Pi.cons (a ::ₘ m) a' a_1 (Pi.cons m a b x)) n)\n[PROOFSTEP]\nintro b' _\n[GOAL]\ncase neg.hf.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝¹ : b ∈ t a\nb' : β a'\na✝ : b' ∈ t a'\n⊢ HEq (map (fun x => Pi.cons (a' ::ₘ m) a b (Pi.cons m a' b' x)) n)\n    (map (fun x => Pi.cons (a ::ₘ m) a' b' (Pi.cons m a b x)) n)\n[PROOFSTEP]\napply map_hcongr\n[GOAL]\ncase neg.hf.hf.h\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝¹ : b ∈ t a\nb' : β a'\na✝ : b' ∈ t a'\n⊢ ((a_1 : α) → a_1 ∈ a ::ₘ a' ::ₘ m → β a_1) = ((a_1 : α) → a_1 ∈ a' ::ₘ a ::ₘ m → β a_1)\n[PROOFSTEP]\nrw [cons_swap a a']\n[GOAL]\ncase neg.hf.hf.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝¹ : b ∈ t a\nb' : β a'\na✝ : b' ∈ t a'\n⊢ ∀ (a_1 : (a : α) → a ∈ m → β a),\n    a_1 ∈ n → HEq (Pi.cons (a' ::ₘ m) a b (Pi.cons m a' b' a_1)) (Pi.cons (a ::ₘ m) a' b' (Pi.cons m a b a_1))\n[PROOFSTEP]\nintro f _\n[GOAL]\ncase neg.hf.hf.hf\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\na a' : α\nm : Multiset α\nn : Multiset ((a : α) → a ∈ m → β a)\neq : ¬a = a'\nb : β a\na✝² : b ∈ t a\nb' : β a'\na✝¹ : b' ∈ t a'\nf : (a : α) → a ∈ m → β a\na✝ : f ∈ n\n⊢ HEq (Pi.cons (a' ::ₘ m) a b (Pi.cons m a' b' f)) (Pi.cons (a ::ₘ m) a' b' (Pi.cons m a b f))\n[PROOFSTEP]\nexact Pi.cons_swap eq\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\n⊢ ↑card (pi 0 t) = prod (map (fun a => ↑card (t a)) 0)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    ↑card (pi s t) = prod (map (fun a => ↑card (t a)) s) →\n      ↑card (pi (a ::ₘ s) t) = prod (map (fun a => ↑card (t a)) (a ::ₘ s))\n[PROOFSTEP]\nsimp (config := { contextual := true }) [mul_comm]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns : Multiset α\nt : (a : α) → Multiset (β a)\n⊢ ∀ ⦃a : α⦄ {s : Multiset α},\n    (Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)) →\n      Nodup (a ::ₘ s) → (∀ (a_3 : α), a_3 ∈ a ::ₘ s → Nodup (t a_3)) → Nodup (pi (a ::ₘ s) t)\n[PROOFSTEP]\nintro a s ih hs ht\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\n⊢ Nodup (pi (a ::ₘ s) t)\n[PROOFSTEP]\nhave has : a ∉ s := by simp at hs ; exact hs.1\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\n⊢ ¬a ∈ s\n[PROOFSTEP]\nsimp at hs \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhs : ¬a ∈ s ∧ Nodup s\n⊢ ¬a ∈ s\n[PROOFSTEP]\nexact hs.1\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\n⊢ Nodup (pi (a ::ₘ s) t)\n[PROOFSTEP]\nhave hs : Nodup s := by simp at hs ; exact hs.2\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\n⊢ Nodup s\n[PROOFSTEP]\nsimp at hs \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : ¬a ∈ s ∧ Nodup s\n⊢ Nodup s\n[PROOFSTEP]\nexact hs.2\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\n⊢ Nodup (pi (a ::ₘ s) t)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\n⊢ (∀ (a_1 : β a), a_1 ∈ t a → Nodup (Multiset.map (Pi.cons s a a_1) (pi s t))) ∧\n    Pairwise (fun a_1 b => Disjoint (Multiset.map (Pi.cons s a a_1) (pi s t)) (Multiset.map (Pi.cons s a b) (pi s t)))\n      (t a)\n[PROOFSTEP]\nrefine' ⟨fun b _ => ((ih hs) fun a' h' => ht a' <| mem_cons_of_mem h').map (Pi.cons_injective has), _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\n⊢ Pairwise (fun a_1 b => Disjoint (Multiset.map (Pi.cons s a a_1) (pi s t)) (Multiset.map (Pi.cons s a b) (pi s t)))\n    (t a)\n[PROOFSTEP]\nrefine' (ht a <| mem_cons_self _ _).pairwise _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\n⊢ ∀ (a_1 : β a),\n    a_1 ∈ t a →\n      ∀ (b : β a),\n        b ∈ t a → a_1 ≠ b → Disjoint (Multiset.map (Pi.cons s a a_1) (pi s t)) (Multiset.map (Pi.cons s a b) (pi s t))\n[PROOFSTEP]\nexact fun b₁ _ b₂ _ neb =>\n  disjoint_map_map.2 fun f _ g _ eq =>\n    have : Pi.cons s a b₁ f a (mem_cons_self _ _) = Pi.cons s a b₂ g a (mem_cons_self _ _) := by rw [eq]\n    neb <| show b₁ = b₂ by rwa [Pi.cons_same, Pi.cons_same] at this \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\nb₁ : β a\nx✝³ : b₁ ∈ t a\nb₂ : β a\nx✝² : b₂ ∈ t a\nneb : b₁ ≠ b₂\nf : (a : α) → a ∈ s → β a\nx✝¹ : f ∈ pi s t\ng : (a : α) → a ∈ s → β a\nx✝ : g ∈ pi s t\neq : Pi.cons s a b₁ f = Pi.cons s a b₂ g\n⊢ Pi.cons s a b₁ f a (_ : a ∈ a ::ₘ s) = Pi.cons s a b₂ g a (_ : a ∈ a ::ₘ s)\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\ns✝ : Multiset α\nt : (a : α) → Multiset (β a)\na : α\ns : Multiset α\nih : Nodup s → (∀ (a : α), a ∈ s → Nodup (t a)) → Nodup (pi s t)\nhs✝ : Nodup (a ::ₘ s)\nht : ∀ (a_1 : α), a_1 ∈ a ::ₘ s → Nodup (t a_1)\nhas : ¬a ∈ s\nhs : Nodup s\nb₁ : β a\nx✝³ : b₁ ∈ t a\nb₂ : β a\nx✝² : b₂ ∈ t a\nneb : b₁ ≠ b₂\nf : (a : α) → a ∈ s → β a\nx✝¹ : f ∈ pi s t\ng : (a : α) → a ∈ s → β a\nx✝ : g ∈ pi s t\neq : Pi.cons s a b₁ f = Pi.cons s a b₂ g\nthis : Pi.cons s a b₁ f a (_ : a ∈ a ::ₘ s) = Pi.cons s a b₂ g a (_ : a ∈ a ::ₘ s)\n⊢ b₁ = b₂\n[PROOFSTEP]\nrwa [Pi.cons_same, Pi.cons_same] at this \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\n⊢ ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\n[PROOFSTEP]\nintro f\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m → β a\n⊢ f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\n[PROOFSTEP]\ninduction' m using Multiset.induction_on with a m ih\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m → β a\nf : (a : α) → a ∈ 0 → β a\n⊢ f ∈ pi 0 t ↔ ∀ (a : α) (h : a ∈ 0), f a h ∈ t a\n[PROOFSTEP]\nhave : f = Pi.empty β := funext (fun _ => funext fun h => (not_mem_zero _ h).elim)\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m → β a\nf : (a : α) → a ∈ 0 → β a\nthis : f = Pi.empty β\n⊢ f ∈ pi 0 t ↔ ∀ (a : α) (h : a ∈ 0), f a h ∈ t a\n[PROOFSTEP]\nsimp only [this, pi_zero, mem_singleton, true_iff]\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m → β a\nf : (a : α) → a ∈ 0 → β a\nthis : f = Pi.empty β\n⊢ ∀ (a : α) (h : a ∈ 0), Pi.empty β a h ∈ t a\n[PROOFSTEP]\nintro _ h\n[GOAL]\ncase empty\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m → β a\nf : (a : α) → a ∈ 0 → β a\nthis : f = Pi.empty β\na✝ : α\nh : a✝ ∈ 0\n⊢ Pi.empty β a✝ h ∈ t a✝\n[PROOFSTEP]\nexact (not_mem_zero _ h).elim\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\n⊢ f ∈ pi (a ::ₘ m) t ↔ ∀ (a_1 : α) (h : a_1 ∈ a ::ₘ m), f a_1 h ∈ t a_1\n[PROOFSTEP]\nsimp_rw [pi_cons, mem_bind, mem_map, ih]\n[GOAL]\ncase cons\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\n⊢ (∃ a_1, a_1 ∈ t a ∧ ∃ a_2, (∀ (a : α) (h : a ∈ m), a_2 a h ∈ t a) ∧ Pi.cons m a a_1 a_2 = f) ↔\n    ∀ (a_1 : α) (h : a_1 ∈ a ::ₘ m), f a_1 h ∈ t a_1\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.mp\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\n⊢ (∃ a_1, a_1 ∈ t a ∧ ∃ a_2, (∀ (a : α) (h : a ∈ m), a_2 a h ∈ t a) ∧ Pi.cons m a a_1 a_2 = f) →\n    ∀ (a_2 : α) (h : a_2 ∈ a ::ₘ m), f a_2 h ∈ t a_2\n[PROOFSTEP]\nrintro ⟨b, hb, f', hf', rfl⟩ a' ha'\n[GOAL]\ncase cons.mp.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nb : β a\nhb : b ∈ t a\nf' : (a : α) → a ∈ m → β a\nhf' : ∀ (a : α) (h : a ∈ m), f' a h ∈ t a\na' : α\nha' : a' ∈ a ::ₘ m\n⊢ Pi.cons m a b f' a' ha' ∈ t a'\n[PROOFSTEP]\nby_cases h : a' = a\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nb : β a\nhb : b ∈ t a\nf' : (a : α) → a ∈ m → β a\nhf' : ∀ (a : α) (h : a ∈ m), f' a h ∈ t a\na' : α\nha' : a' ∈ a ::ₘ m\nh : a' = a\n⊢ Pi.cons m a b f' a' ha' ∈ t a'\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m✝ → β a\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf' : (a : α) → a ∈ m → β a\nhf' : ∀ (a : α) (h : a ∈ m), f' a h ∈ t a\na' : α\nb : β a'\nhb : b ∈ t a'\nha' : a' ∈ a' ::ₘ m\n⊢ Pi.cons m a' b f' a' ha' ∈ t a'\n[PROOFSTEP]\nrwa [Pi.cons_same]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nb : β a\nhb : b ∈ t a\nf' : (a : α) → a ∈ m → β a\nhf' : ∀ (a : α) (h : a ∈ m), f' a h ∈ t a\na' : α\nha' : a' ∈ a ::ₘ m\nh : ¬a' = a\n⊢ Pi.cons m a b f' a' ha' ∈ t a'\n[PROOFSTEP]\nrw [Pi.cons_ne _ h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nb : β a\nhb : b ∈ t a\nf' : (a : α) → a ∈ m → β a\nhf' : ∀ (a : α) (h : a ∈ m), f' a h ∈ t a\na' : α\nha' : a' ∈ a ::ₘ m\nh : ¬a' = a\n⊢ f' a' (_ : a' ∈ m) ∈ t a'\n[PROOFSTEP]\napply hf'\n[GOAL]\ncase cons.mpr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\n⊢ (∀ (a_1 : α) (h : a_1 ∈ a ::ₘ m), f a_1 h ∈ t a_1) →\n    ∃ a_2, a_2 ∈ t a ∧ ∃ a_3, (∀ (a : α) (h : a ∈ m), a_3 a h ∈ t a) ∧ Pi.cons m a a_2 a_3 = f\n[PROOFSTEP]\nintro hf\n[GOAL]\ncase cons.mpr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\nhf : ∀ (a_1 : α) (h : a_1 ∈ a ::ₘ m), f a_1 h ∈ t a_1\n⊢ ∃ a_1, a_1 ∈ t a ∧ ∃ a_2, (∀ (a : α) (h : a ∈ m), a_2 a h ∈ t a) ∧ Pi.cons m a a_1 a_2 = f\n[PROOFSTEP]\nrefine' ⟨_, hf a (mem_cons_self _ _), _, fun a ha => hf a (mem_cons_of_mem ha), _⟩\n[GOAL]\ncase cons.mpr\nα : Type u_1\ninst✝ : DecidableEq α\nβ : α → Type u\nδ : α → Sort v\nm✝ : Multiset α\nt : (a : α) → Multiset (β a)\nf✝ : (a : α) → a ∈ m✝ → β a\na : α\nm : Multiset α\nih : ∀ (f : (a : α) → a ∈ m → β a), f ∈ pi m t ↔ ∀ (a : α) (h : a ∈ m), f a h ∈ t a\nf : (a_1 : α) → a_1 ∈ a ::ₘ m → β a_1\nhf : ∀ (a_1 : α) (h : a_1 ∈ a ::ₘ m), f a_1 h ∈ t a_1\n⊢ (Pi.cons m a (f a (_ : a ∈ a ::ₘ m)) fun a_1 ha => f a_1 (_ : a_1 ∈ a ::ₘ m)) = f\n[PROOFSTEP]\nrw [pi.cons_eta]\n", "meta": {"mathlib_filename": "Mathlib.Data.Multiset.Pi", "llama_tokens": 15306, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5583270090337583, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.28352507933486504}}
{"text": "[GOAL]\n⊢ Set.Nonempty (interior { carrier := Icc 0 1, isCompact' := (_ : IsCompact (Icc 0 1)) }.carrier)\n[PROOFSTEP]\nsimp_rw [interior_Icc, nonempty_Ioo, zero_lt_one]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\n⊢ Set.Nonempty\n    (interior\n      { carrier := Set.pi univ fun x => Icc 0 1, isCompact' := (_ : IsCompact (Set.pi univ fun x => Icc 0 1)) }.carrier)\n[PROOFSTEP]\nsimp only [interior_pi_set, Set.toFinite, interior_Icc, univ_pi_nonempty_iff, nonempty_Ioo, imp_true_iff, zero_lt_one]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\n⊢ ↑(parallelepiped (Pi.basisFun ℝ ι)) = ↑(PositiveCompacts.piIcc01 ι)\n[PROOFSTEP]\nrefine' Eq.trans _ ((uIcc_of_le _).trans (Set.pi_univ_Icc _ _).symm)\n[GOAL]\ncase refine'_1\nι : Type u_1\ninst✝ : Fintype ι\n⊢ ↑(parallelepiped (Pi.basisFun ℝ ι)) = uIcc (fun i => 0) fun i => 1\n[PROOFSTEP]\nclassical convert parallelepiped_single (ι := ι) 1\n[GOAL]\ncase refine'_1\nι : Type u_1\ninst✝ : Fintype ι\n⊢ ↑(parallelepiped (Pi.basisFun ℝ ι)) = uIcc (fun i => 0) fun i => 1\n[PROOFSTEP]\nconvert parallelepiped_single (ι := ι) 1\n[GOAL]\ncase refine'_2\nι : Type u_1\ninst✝ : Fintype ι\n⊢ (fun i => 0) ≤ fun i => 1\n[PROOFSTEP]\nexact zero_le_one\n[GOAL]\n⊢ addHaarMeasure Icc01 = volume\n[PROOFSTEP]\nconvert (addHaarMeasure_unique volume Icc01).symm\n[GOAL]\ncase h.e'_2\n⊢ addHaarMeasure Icc01 = ↑↑volume ↑Icc01 • addHaarMeasure Icc01\n[PROOFSTEP]\nsimp [Icc01]\n[GOAL]\nι : Type u_1\ninst✝ : Fintype ι\n⊢ addHaarMeasure (piIcc01 ι) = volume\n[PROOFSTEP]\nconvert (addHaarMeasure_unique volume (piIcc01 ι)).symm\n[GOAL]\ncase h.e'_2\nι : Type u_1\ninst✝ : Fintype ι\n⊢ addHaarMeasure (piIcc01 ι) = ↑↑volume ↑(piIcc01 ι) • addHaarMeasure (piIcc01 ι)\n[PROOFSTEP]\nsimp only [piIcc01, volume_pi_pi fun _ => Icc (0 : ℝ) 1, PositiveCompacts.coe_mk, Compacts.coe_mk,\n  Finset.prod_const_one, ENNReal.ofReal_one, Real.volume_Icc, one_smul, sub_zero]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nby_contra h\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\n⊢ False\n[PROOFSTEP]\napply lt_irrefl ∞\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\n⊢ ⊤ < ⊤\n[PROOFSTEP]\ncalc\n  ∞ = ∑' _ : ℕ, μ s := (ENNReal.tsum_const_eq_top_of_ne_zero h).symm\n  _ = ∑' n : ℕ, μ ({u n} + s) := by congr 1; ext1 n; simp only [image_add_left, measure_preimage_add, singleton_add]\n  _ = μ (⋃ n, {u n} + s) :=\n    (Eq.symm <|\n      measure_iUnion hs fun n => by simpa only [image_add_left, singleton_add] using measurable_id.const_add _ h's)\n  _ = μ (range u + s) := by rw [← iUnion_add, iUnion_singleton_eq_range]\n  _ < ∞ := Bounded.measure_lt_top (hu.add sb)\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\n⊢ ∑' (x : ℕ), ↑↑μ s = ∑' (n : ℕ), ↑↑μ ({u n} + s)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\n⊢ (fun x => ↑↑μ s) = fun n => ↑↑μ ({u n} + s)\n[PROOFSTEP]\next1 n\n[GOAL]\ncase e_f.h\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\nn : ℕ\n⊢ ↑↑μ s = ↑↑μ ({u n} + s)\n[PROOFSTEP]\nsimp only [image_add_left, measure_preimage_add, singleton_add]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\nn : ℕ\n⊢ MeasurableSet ({u n} + s)\n[PROOFSTEP]\nsimpa only [image_add_left, singleton_add] using measurable_id.const_add _ h's\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nsb : Metric.Bounded s\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nh : ¬↑↑μ s = 0\n⊢ ↑↑μ (⋃ (n : ℕ), {u n} + s) = ↑↑μ (range u + s)\n[PROOFSTEP]\nrw [← iUnion_add, iUnion_singleton_eq_range]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\nsuffices H : ∀ R, μ (s ∩ closedBall 0 R) = 0\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n⊢ ↑↑μ s = 0\n[PROOFSTEP]\napply le_antisymm _ (zero_le _)\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n⊢ ↑↑μ s ≤ 0\n[PROOFSTEP]\ncalc\n  μ s ≤ ∑' n : ℕ, μ (s ∩ closedBall 0 n) :=\n    by\n    conv_lhs => rw [← iUnion_inter_closedBall_nat s 0]\n    exact measure_iUnion_le _\n  _ = 0 := by simp only [H, tsum_zero]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n⊢ ↑↑μ s ≤ ∑' (n : ℕ), ↑↑μ (s ∩ closedBall 0 ↑n)\n[PROOFSTEP]\nconv_lhs => rw [← iUnion_inter_closedBall_nat s 0]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n| ↑↑μ s\n[PROOFSTEP]\nrw [← iUnion_inter_closedBall_nat s 0]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n| ↑↑μ s\n[PROOFSTEP]\nrw [← iUnion_inter_closedBall_nat s 0]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n| ↑↑μ s\n[PROOFSTEP]\nrw [← iUnion_inter_closedBall_nat s 0]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n⊢ ↑↑μ (⋃ (n : ℕ), s ∩ closedBall 0 ↑n) ≤ ∑' (n : ℕ), ↑↑μ (s ∩ closedBall 0 ↑n)\n[PROOFSTEP]\nexact measure_iUnion_le _\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nH : ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n⊢ ∑' (n : ℕ), ↑↑μ (s ∩ closedBall 0 ↑n) = 0\n[PROOFSTEP]\nsimp only [H, tsum_zero]\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\n⊢ ∀ (R : ℝ), ↑↑μ (s ∩ closedBall 0 R) = 0\n[PROOFSTEP]\nintro R\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nR : ℝ\n⊢ ↑↑μ (s ∩ closedBall 0 R) = 0\n[PROOFSTEP]\napply\n  addHaar_eq_zero_of_disjoint_translates_aux μ u (bounded_closedBall.mono (inter_subset_right _ _)) hu _\n    (h's.inter measurableSet_closedBall)\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nR : ℝ\n⊢ Pairwise (Disjoint on fun n => {u n} + s ∩ closedBall 0 R)\n[PROOFSTEP]\nrefine pairwise_disjoint_mono hs fun n => ?_\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set E\nu : ℕ → E\nhu : Metric.Bounded (range u)\nhs : Pairwise (Disjoint on fun n => {u n} + s)\nh's : MeasurableSet s\nR : ℝ\nn : ℕ\n⊢ {u n} + s ∩ closedBall 0 R ≤ {u n} + s\n[PROOFSTEP]\nexact add_subset_add Subset.rfl (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nobtain ⟨x, hx⟩ : ∃ x, x ∉ s := by simpa only [Submodule.eq_top_iff', not_exists, Ne.def, not_forall] using hs\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\n⊢ ∃ x, ¬x ∈ s\n[PROOFSTEP]\nsimpa only [Submodule.eq_top_iff', not_exists, Ne.def, not_forall] using hs\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nobtain ⟨c, cpos, cone⟩ : ∃ c : ℝ, 0 < c ∧ c < 1 := ⟨1 / 2, by norm_num, by norm_num⟩\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nhave A : Bounded (range fun n : ℕ => c ^ n • x) :=\n  haveI : Tendsto (fun n : ℕ => c ^ n • x) atTop (𝓝 ((0 : ℝ) • x)) :=\n    (tendsto_pow_atTop_nhds_0_of_lt_1 cpos.le cone).smul_const x\n  bounded_range_of_tendsto _ this\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\napply addHaar_eq_zero_of_disjoint_translates μ _ A _ (Submodule.closed_of_finiteDimensional s).measurableSet\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\n⊢ Pairwise (Disjoint on fun n => {c ^ n • x} + ↑s)\n[PROOFSTEP]\nintro m n hmn\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\n⊢ (Disjoint on fun n => {c ^ n • x} + ↑s) m n\n[PROOFSTEP]\nsimp only [Function.onFun, image_add_left, singleton_add, disjoint_left, mem_preimage, SetLike.mem_coe]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\n⊢ ∀ ⦃a : E⦄, -(c ^ m • x) + a ∈ s → ¬-(c ^ n • x) + a ∈ s\n[PROOFSTEP]\nintro y hym hyn\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\n⊢ False\n[PROOFSTEP]\nhave A : (c ^ n - c ^ m) • x ∈ s := by\n  convert s.sub_mem hym hyn using 1\n  simp only [sub_smul, neg_sub_neg, add_sub_add_right_eq_sub]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\n⊢ (c ^ n - c ^ m) • x ∈ s\n[PROOFSTEP]\nconvert s.sub_mem hym hyn using 1\n[GOAL]\ncase h.e'_4\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\n⊢ (c ^ n - c ^ m) • x = -(c ^ m • x) + y - (-(c ^ n • x) + y)\n[PROOFSTEP]\nsimp only [sub_smul, neg_sub_neg, add_sub_add_right_eq_sub]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\n⊢ False\n[PROOFSTEP]\nhave H : c ^ n - c ^ m ≠ 0 := by simpa only [sub_eq_zero, Ne.def] using (strictAnti_pow cpos cone).injective.ne hmn.symm\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\n⊢ c ^ n - c ^ m ≠ 0\n[PROOFSTEP]\nsimpa only [sub_eq_zero, Ne.def] using (strictAnti_pow cpos cone).injective.ne hmn.symm\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\nH : c ^ n - c ^ m ≠ 0\n⊢ False\n[PROOFSTEP]\nhave : x ∈ s := by\n  convert s.smul_mem (c ^ n - c ^ m)⁻¹ A\n  rw [smul_smul, inv_mul_cancel H, one_smul]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\nH : c ^ n - c ^ m ≠ 0\n⊢ x ∈ s\n[PROOFSTEP]\nconvert s.smul_mem (c ^ n - c ^ m)⁻¹ A\n[GOAL]\ncase h.e'_4\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\nH : c ^ n - c ^ m ≠ 0\n⊢ x = (c ^ n - c ^ m)⁻¹ • (c ^ n - c ^ m) • x\n[PROOFSTEP]\nrw [smul_smul, inv_mul_cancel H, one_smul]\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Submodule ℝ E\nhs : s ≠ ⊤\nx : E\nhx : ¬x ∈ s\nc : ℝ\ncpos : 0 < c\ncone : c < 1\nA✝ : Metric.Bounded (range fun n => c ^ n • x)\nm n : ℕ\nhmn : m ≠ n\ny : E\nhym : -(c ^ m • x) + y ∈ s\nhyn : -(c ^ n • x) + y ∈ s\nA : (c ^ n - c ^ m) • x ∈ s\nH : c ^ n - c ^ m ≠ 0\nthis : x ∈ s\n⊢ False\n[PROOFSTEP]\nexact hx this\n[GOAL]\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : AffineSubspace ℝ E\nhs : s ≠ ⊤\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nrcases s.eq_bot_or_nonempty with (rfl | hne)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : ⊥ ≠ ⊤\n⊢ ↑↑μ ↑⊥ = 0\n[PROOFSTEP]\nrw [AffineSubspace.bot_coe, measure_empty]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : AffineSubspace ℝ E\nhs : s ≠ ⊤\nhne : Set.Nonempty ↑s\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nrw [Ne.def, ← AffineSubspace.direction_eq_top_iff_of_nonempty hne] at hs \n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : AffineSubspace ℝ E\nhs : ¬AffineSubspace.direction s = ⊤\nhne : Set.Nonempty ↑s\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nrcases hne with ⟨x, hx : x ∈ s⟩\n[GOAL]\ncase inr.intro\nE : Type u_1\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\ninst✝¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : AffineSubspace ℝ E\nhs : ¬AffineSubspace.direction s = ⊤\nx : E\nhx : x ∈ s\n⊢ ↑↑μ ↑s = 0\n[PROOFSTEP]\nsimpa only [AffineSubspace.coe_direction_eq_vsub_set_right hx, vsub_eq_sub, sub_eq_add_neg, image_add_right, neg_neg,\n  measure_preimage_add_right] using addHaar_submodule μ s.direction hs\n[GOAL]\nι : Type u_1\ninst✝¹ : Finite ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nμ : Measure (ι → ℝ)\ninst✝ : IsAddHaarMeasure μ\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\ncases nonempty_fintype ι\n[GOAL]\ncase intro\nι : Type u_1\ninst✝¹ : Finite ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nμ : Measure (ι → ℝ)\ninst✝ : IsAddHaarMeasure μ\nval✝ : Fintype ι\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nhave := addHaarMeasure_unique μ (piIcc01 ι)\n[GOAL]\ncase intro\nι : Type u_1\ninst✝¹ : Finite ι\nf : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det f ≠ 0\nμ : Measure (ι → ℝ)\ninst✝ : IsAddHaarMeasure μ\nval✝ : Fintype ι\nthis : μ = ↑↑μ ↑(piIcc01 ι) • addHaarMeasure (piIcc01 ι)\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nrw [this, addHaarMeasure_eq_volume_pi, Measure.map_smul, Real.map_linearMap_volume_pi_eq_smul_volume_pi hf, smul_comm]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nlet ι := Fin (finrank ℝ E)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nhaveI : FiniteDimensional ℝ (ι → ℝ) := by infer_instance\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\n⊢ FiniteDimensional ℝ (ι → ℝ)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis : FiniteDimensional ℝ (ι → ℝ)\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nhave : finrank ℝ E = finrank ℝ (ι → ℝ) := by simp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis : FiniteDimensional ℝ (ι → ℝ)\n⊢ finrank ℝ E = finrank ℝ (ι → ℝ)\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nhave e : E ≃ₗ[ℝ] ι → ℝ := LinearEquiv.ofFinrankEq E (ι → ℝ) this\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nobtain ⟨g, hg⟩ : ∃ g, g = (e : E →ₗ[ℝ] ι → ℝ).comp (f.comp (e.symm : (ι → ℝ) →ₗ[ℝ] E)) := ⟨_, rfl⟩\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nhave gdet : LinearMap.det g = LinearMap.det f := by rw [hg]; exact LinearMap.det_conj f e\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\n⊢ ↑LinearMap.det g = ↑LinearMap.det f\n[PROOFSTEP]\nrw [hg]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\n⊢ ↑LinearMap.det (LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))) = ↑LinearMap.det f\n[PROOFSTEP]\nexact LinearMap.det_conj f e\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ\n[PROOFSTEP]\nrw [← gdet] at hf ⊢\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhave fg : f = (e.symm : (ι → ℝ) →ₗ[ℝ] E).comp (g.comp (e : E →ₗ[ℝ] ι → ℝ)) :=\n  by\n  ext x\n  simp only [LinearEquiv.coe_coe, Function.comp_apply, LinearMap.coe_comp, LinearEquiv.symm_apply_apply, hg]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\n⊢ f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nx : E\n⊢ ↑f x = ↑(LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)) x\n[PROOFSTEP]\nsimp only [LinearEquiv.coe_coe, Function.comp_apply, LinearMap.coe_comp, LinearEquiv.symm_apply_apply, hg]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\n⊢ map (↑f) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nsimp only [fg, LinearEquiv.coe_coe, LinearMap.coe_comp]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\n⊢ map (↑(LinearEquiv.symm e) ∘ ↑g ∘ ↑e) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhave Ce : Continuous e := (e : E →ₗ[ℝ] ι → ℝ).continuous_of_finiteDimensional\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\n⊢ map (↑(LinearEquiv.symm e) ∘ ↑g ∘ ↑e) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhave Cg : Continuous g := LinearMap.continuous_of_finiteDimensional g\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\n⊢ map (↑(LinearEquiv.symm e) ∘ ↑g ∘ ↑e) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhave Cesymm : Continuous e.symm := (e.symm : (ι → ℝ) →ₗ[ℝ] E).continuous_of_finiteDimensional\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\n⊢ map (↑(LinearEquiv.symm e) ∘ ↑g ∘ ↑e) μ = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nrw [← map_map Cesymm.measurable (Cg.comp Ce).measurable, ← map_map Cg.measurable Ce.measurable]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝ : FiniteDimensional ℝ (ι → ℝ)\nthis : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\n⊢ map (↑(LinearEquiv.symm e)) (map (↑g) (map (↑e) μ)) = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhaveI : IsAddHaarMeasure (map e μ) := (e : E ≃+ (ι → ℝ)).isAddHaarMeasure_map μ Ce Cesymm\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝¹ : FiniteDimensional ℝ (ι → ℝ)\nthis✝ : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\nthis : IsAddHaarMeasure (map (↑e) μ)\n⊢ map (↑(LinearEquiv.symm e)) (map (↑g) (map (↑e) μ)) = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nhave ecomp : e.symm ∘ e = id := by ext x; simp only [id.def, Function.comp_apply, LinearEquiv.symm_apply_apply]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝¹ : FiniteDimensional ℝ (ι → ℝ)\nthis✝ : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\nthis : IsAddHaarMeasure (map (↑e) μ)\n⊢ ↑(LinearEquiv.symm e) ∘ ↑e = id\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝¹ : FiniteDimensional ℝ (ι → ℝ)\nthis✝ : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\nthis : IsAddHaarMeasure (map (↑e) μ)\nx : E\n⊢ (↑(LinearEquiv.symm e) ∘ ↑e) x = id x\n[PROOFSTEP]\nsimp only [id.def, Function.comp_apply, LinearEquiv.symm_apply_apply]\n[GOAL]\ncase intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nι : Type := Fin (finrank ℝ E)\nthis✝¹ : FiniteDimensional ℝ (ι → ℝ)\nthis✝ : finrank ℝ E = finrank ℝ (ι → ℝ)\ne : E ≃ₗ[ℝ] ι → ℝ\ng : (ι → ℝ) →ₗ[ℝ] ι → ℝ\nhf : ↑LinearMap.det g ≠ 0\nhg : g = LinearMap.comp (↑e) (LinearMap.comp f ↑(LinearEquiv.symm e))\ngdet : ↑LinearMap.det g = ↑LinearMap.det f\nfg : f = LinearMap.comp (↑(LinearEquiv.symm e)) (LinearMap.comp g ↑e)\nCe : Continuous ↑e\nCg : Continuous ↑g\nCesymm : Continuous ↑(LinearEquiv.symm e)\nthis : IsAddHaarMeasure (map (↑e) μ)\necomp : ↑(LinearEquiv.symm e) ∘ ↑e = id\n⊢ map (↑(LinearEquiv.symm e)) (map (↑g) (map (↑e) μ)) = ENNReal.ofReal |(↑LinearMap.det g)⁻¹| • μ\n[PROOFSTEP]\nrw [map_linearMap_addHaar_pi_eq_smul_addHaar hf (map e μ), Measure.map_smul, map_map Cesymm.measurable Ce.measurable,\n  ecomp, Measure.map_id]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\ns : Set E\n⊢ ↑↑(map (↑f) μ) s = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| * ↑↑μ s\n[PROOFSTEP]\nrw [map_linearMap_addHaar_eq_smul_addHaar μ hf]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\nhf : ↑LinearMap.det f ≠ 0\ns : Set E\n⊢ ↑↑(ENNReal.ofReal |(↑LinearMap.det f)⁻¹| • μ) s = ENNReal.ofReal |(↑LinearMap.det f)⁻¹| * ↑↑μ s\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E ≃ₗ[ℝ] E\ns : Set E\n⊢ ↑↑μ (↑f ⁻¹' s) = ENNReal.ofReal |↑LinearMap.det ↑(LinearEquiv.symm f)| * ↑↑μ s\n[PROOFSTEP]\nhave A : LinearMap.det (f : E →ₗ[ℝ] E) ≠ 0 := (LinearEquiv.isUnit_det' f).ne_zero\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E ≃ₗ[ℝ] E\ns : Set E\nA : ↑LinearMap.det ↑f ≠ 0\n⊢ ↑↑μ (↑f ⁻¹' s) = ENNReal.ofReal |↑LinearMap.det ↑(LinearEquiv.symm f)| * ↑↑μ s\n[PROOFSTEP]\nconvert addHaar_preimage_linearMap μ A s\n[GOAL]\ncase h.e'_3.h.e'_5.h.e'_1.h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E ≃ₗ[ℝ] E\ns : Set E\nA : ↑LinearMap.det ↑f ≠ 0\n⊢ ↑LinearMap.det ↑(LinearEquiv.symm f) = (↑LinearMap.det ↑f)⁻¹\n[PROOFSTEP]\nsimp only [LinearEquiv.det_coe_symm]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\n⊢ ↑↑μ (↑f '' s) = ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\nrcases ne_or_eq (LinearMap.det f) 0 with (hf | hf)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f ≠ 0\n⊢ ↑↑μ (↑f '' s) = ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\nlet g := (f.equivOfDetNeZero hf).toContinuousLinearEquiv\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f ≠ 0\ng : E ≃L[ℝ] E := LinearEquiv.toContinuousLinearEquiv (LinearMap.equivOfDetNeZero f hf)\n⊢ ↑↑μ (↑f '' s) = ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\nchange μ (g '' s) = _\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f ≠ 0\ng : E ≃L[ℝ] E := LinearEquiv.toContinuousLinearEquiv (LinearMap.equivOfDetNeZero f hf)\n⊢ ↑↑μ (↑g '' s) = ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\nrw [ContinuousLinearEquiv.image_eq_preimage g s, addHaar_preimage_continuousLinearEquiv]\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f ≠ 0\ng : E ≃L[ℝ] E := LinearEquiv.toContinuousLinearEquiv (LinearMap.equivOfDetNeZero f hf)\n⊢ ENNReal.ofReal |↑LinearMap.det ↑↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm g))| * ↑↑μ s =\n    ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\ncongr\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f = 0\n⊢ ↑↑μ (↑f '' s) = ENNReal.ofReal |↑LinearMap.det f| * ↑↑μ s\n[PROOFSTEP]\nsimp only [hf, zero_mul, ENNReal.ofReal_zero, abs_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f = 0\n⊢ ↑↑μ ((fun a => ↑f a) '' s) = 0\n[PROOFSTEP]\nhave : μ (LinearMap.range f) = 0 := addHaar_submodule μ _ (LinearMap.range_lt_top_of_det_eq_zero hf).ne\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nf : E →ₗ[ℝ] E\ns : Set E\nhf : ↑LinearMap.det f = 0\nthis : ↑↑μ ↑(LinearMap.range f) = 0\n⊢ ↑↑μ ((fun a => ↑f a) '' s) = 0\n[PROOFSTEP]\nexact le_antisymm (le_trans (measure_mono (image_subset_range _ _)) this.le) (zero_le _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\n⊢ map ((fun x x_1 => x • x_1) r) μ = ENNReal.ofReal |(r ^ finrank ℝ E)⁻¹| • μ\n[PROOFSTEP]\nlet f : E →ₗ[ℝ] E := r • (1 : E →ₗ[ℝ] E)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\n⊢ map ((fun x x_1 => x • x_1) r) μ = ENNReal.ofReal |(r ^ finrank ℝ E)⁻¹| • μ\n[PROOFSTEP]\nchange Measure.map f μ = _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\n⊢ map (↑f) μ = ENNReal.ofReal |(r ^ finrank ℝ E)⁻¹| • μ\n[PROOFSTEP]\nhave hf : LinearMap.det f ≠ 0 :=\n  by\n  simp only [mul_one, LinearMap.det_smul, Ne.def, MonoidHom.map_one]\n  intro h\n  exact hr (pow_eq_zero h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\n⊢ ↑LinearMap.det f ≠ 0\n[PROOFSTEP]\nsimp only [mul_one, LinearMap.det_smul, Ne.def, MonoidHom.map_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\n⊢ ¬r ^ finrank ℝ E = 0\n[PROOFSTEP]\nintro h\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\nh : r ^ finrank ℝ E = 0\n⊢ False\n[PROOFSTEP]\nexact hr (pow_eq_zero h)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\nf : E →ₗ[ℝ] E := r • 1\nhf : ↑LinearMap.det f ≠ 0\n⊢ map (↑f) μ = ENNReal.ofReal |(r ^ finrank ℝ E)⁻¹| • μ\n[PROOFSTEP]\nsimp only [map_linearMap_addHaar_eq_smul_addHaar μ hf, mul_one, LinearMap.det_smul, map_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : r ≠ 0\ns : Set E\n⊢ ↑↑(map ((fun x x_1 => x • x_1) r) μ) s = ENNReal.ofReal |(r ^ finrank ℝ E)⁻¹| * ↑↑μ s\n[PROOFSTEP]\nrw [map_addHaar_smul μ hr, smul_toOuterMeasure, OuterMeasure.coe_smul, Pi.smul_apply, smul_eq_mul]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\ns : Set E\n⊢ ↑↑μ (r • s) = ENNReal.ofReal |r ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nrcases ne_or_eq r 0 with (h | rfl)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\ns : Set E\nh : r ≠ 0\n⊢ ↑↑μ (r • s) = ENNReal.ofReal |r ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nrw [← preimage_smul_inv₀ h, addHaar_preimage_smul μ (inv_ne_zero h), inv_pow, inv_inv]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ↑↑μ (0 • s) = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | hs)\n[GOAL]\ncase inr.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\n⊢ ↑↑μ (0 • ∅) = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ ∅\n[PROOFSTEP]\nsimp only [measure_empty, mul_zero, smul_set_empty]\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\n⊢ ↑↑μ (0 • s) = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nrw [zero_smul_set hs, ← singleton_zero]\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\n⊢ ↑↑μ {0} = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nby_cases h : finrank ℝ E = 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\nh : finrank ℝ E = 0\n⊢ ↑↑μ {0} = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nhaveI : Subsingleton E := finrank_zero_iff.1 h\n[GOAL]\ncase pos\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\nh : finrank ℝ E = 0\nthis : Subsingleton E\n⊢ ↑↑μ {0} = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nsimp only [h, one_mul, ENNReal.ofReal_one, abs_one, Subsingleton.eq_univ_of_nonempty hs, pow_zero,\n  Subsingleton.eq_univ_of_nonempty (singleton_nonempty (0 : E))]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\nh : ¬finrank ℝ E = 0\n⊢ ↑↑μ {0} = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nhaveI : Nontrivial E := nontrivial_of_finrank_pos (bot_lt_iff_ne_bot.2 h)\n[GOAL]\ncase neg\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : Set.Nonempty s\nh : ¬finrank ℝ E = 0\nthis : Nontrivial E\n⊢ ↑↑μ {0} = ENNReal.ofReal |0 ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nsimp only [h, zero_mul, ENNReal.ofReal_zero, abs_zero, Ne.def, not_false_iff, zero_pow', measure_singleton]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhr : 0 ≤ r\ns : Set E\n⊢ ↑↑μ (r • s) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ s\n[PROOFSTEP]\nrw [addHaar_smul, abs_pow, abs_of_nonneg hr]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : NullMeasurableSet s\nr : ℝ\n⊢ NullMeasurableSet (r • s)\n[PROOFSTEP]\nobtain rfl | hs' := s.eq_empty_or_nonempty\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\nr : ℝ\nhs : NullMeasurableSet ∅\n⊢ NullMeasurableSet (r • ∅)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : NullMeasurableSet s\nr : ℝ\nhs' : Set.Nonempty s\n⊢ NullMeasurableSet (r • s)\n[PROOFSTEP]\nobtain rfl | hr := eq_or_ne r 0\n[GOAL]\ncase inr.inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : NullMeasurableSet s\nhs' : Set.Nonempty s\n⊢ NullMeasurableSet (0 • s)\n[PROOFSTEP]\nsimpa [zero_smul_set hs'] using nullMeasurableSet_singleton _\n[GOAL]\ncase inr.inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nhs : NullMeasurableSet s\nr : ℝ\nhs' : Set.Nonempty s\nhr : r ≠ 0\n⊢ NullMeasurableSet (r • s)\n[PROOFSTEP]\nobtain ⟨t, ht, hst⟩ := hs\n[GOAL]\ncase inr.inr.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nr : ℝ\nhs' : Set.Nonempty s\nhr : r ≠ 0\nt : Set E\nht : MeasurableSet t\nhst : s =ᶠ[ae μ] t\n⊢ NullMeasurableSet (r • s)\n[PROOFSTEP]\nrefine' ⟨_, ht.const_smul_of_ne_zero hr, _⟩\n[GOAL]\ncase inr.inr.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nr : ℝ\nhs' : Set.Nonempty s\nhr : r ≠ 0\nt : Set E\nht : MeasurableSet t\nhst : s =ᶠ[ae μ] t\n⊢ r • s =ᶠ[ae μ] r • t\n[PROOFSTEP]\nrw [← measure_symmDiff_eq_zero_iff] at hst ⊢\n[GOAL]\ncase inr.inr.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nr : ℝ\nhs' : Set.Nonempty s\nhr : r ≠ 0\nt : Set E\nht : MeasurableSet t\nhst : ↑↑μ (s ∆ t) = 0\n⊢ ↑↑μ ((r • s) ∆ (r • t)) = 0\n[PROOFSTEP]\nrw [← smul_set_symmDiff₀ hr, addHaar_smul μ, hst, mul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\ns : Set E\n⊢ ↑↑μ (↑(AffineMap.homothety x r) '' s) = ↑↑μ ((fun y => y + x) '' (r • (fun y => y + -x) '' s))\n[PROOFSTEP]\nsimp only [← image_smul, image_image, ← sub_eq_add_neg]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\ns : Set E\n⊢ ↑↑μ ((fun a => ↑(AffineMap.homothety x r) a) '' s) = ↑↑μ ((fun x_1 => r • (x_1 - x) + x) '' s)\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\ns : Set E\n⊢ ↑↑μ ((fun y => y + x) '' (r • (fun y => y + -x) '' s)) = ENNReal.ofReal |r ^ finrank ℝ E| * ↑↑μ s\n[PROOFSTEP]\nsimp only [image_add_right, measure_preimage_add_right, addHaar_smul]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\n⊢ ↑↑μ (ball x r) = ↑↑μ (ball 0 r)\n[PROOFSTEP]\nhave : ball (0 : E) r = (· + ·) x ⁻¹' ball x r := by simp [preimage_add_ball]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\n⊢ ball 0 r = (fun x x_1 => x + x_1) x ⁻¹' ball x r\n[PROOFSTEP]\nsimp [preimage_add_ball]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\nthis : ball 0 r = (fun x x_1 => x + x_1) x ⁻¹' ball x r\n⊢ ↑↑μ (ball x r) = ↑↑μ (ball 0 r)\n[PROOFSTEP]\nrw [this, measure_preimage_add]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (closedBall 0 r)\n[PROOFSTEP]\nhave : closedBall (0 : E) r = (· + ·) x ⁻¹' closedBall x r := by simp [preimage_add_closedBall]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\n⊢ closedBall 0 r = (fun x x_1 => x + x_1) x ⁻¹' closedBall x r\n[PROOFSTEP]\nsimp [preimage_add_closedBall]\n[GOAL]\nE✝ : Type u_1\ninst✝¹² : NormedAddCommGroup E✝\ninst✝¹¹ : NormedSpace ℝ E✝\ninst✝¹⁰ : MeasurableSpace E✝\ninst✝⁹ : BorelSpace E✝\ninst✝⁸ : FiniteDimensional ℝ E✝\nμ✝ : Measure E✝\ninst✝⁷ : IsAddHaarMeasure μ✝\nF : Type u_2\ninst✝⁶ : NormedAddCommGroup F\ninst✝⁵ : NormedSpace ℝ F\ninst✝⁴ : CompleteSpace F\ns : Set E✝\nE : Type u_3\ninst✝³ : NormedAddCommGroup E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nx : E\nr : ℝ\nthis : closedBall 0 r = (fun x x_1 => x + x_1) x ⁻¹' closedBall x r\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (closedBall 0 r)\n[PROOFSTEP]\nrw [this, measure_preimage_add]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\n⊢ ↑↑μ (ball x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 s)\n[PROOFSTEP]\nhave : ball (0 : E) (r * s) = r • ball (0 : E) s := by\n  simp only [_root_.smul_ball hr.ne' (0 : E) s, Real.norm_eq_abs, abs_of_nonneg hr.le, smul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\n⊢ ball 0 (r * s) = r • ball 0 s\n[PROOFSTEP]\nsimp only [_root_.smul_ball hr.ne' (0 : E) s, Real.norm_eq_abs, abs_of_nonneg hr.le, smul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\nthis : ball 0 (r * s) = r • ball 0 s\n⊢ ↑↑μ (ball x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 s)\n[PROOFSTEP]\nsimp only [this, addHaar_smul, abs_of_nonneg hr.le, addHaar_ball_center, abs_pow]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : 0 < r\n⊢ ↑↑μ (ball x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrw [← addHaar_ball_mul_of_pos μ x hr, mul_one]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns✝ : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nhr : 0 ≤ r\ns : ℝ\n⊢ ↑↑μ (ball x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 s)\n[PROOFSTEP]\nrcases hr.eq_or_lt with (rfl | h)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns✝ : Set E\ninst✝ : Nontrivial E\nx : E\ns : ℝ\nhr : 0 ≤ 0\n⊢ ↑↑μ (ball x (0 * s)) = ENNReal.ofReal (0 ^ finrank ℝ E) * ↑↑μ (ball 0 s)\n[PROOFSTEP]\nsimp only [zero_pow (finrank_pos (K := ℝ) (V := E)), measure_empty, zero_mul, ENNReal.ofReal_zero, ball_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns✝ : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nhr : 0 ≤ r\ns : ℝ\nh : 0 < r\n⊢ ↑↑μ (ball x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 s)\n[PROOFSTEP]\nexact addHaar_ball_mul_of_pos μ x h s\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ ↑↑μ (ball x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrw [← addHaar_ball_mul μ x hr, mul_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\n⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)\n[PROOFSTEP]\nhave : closedBall (0 : E) (r * s) = r • closedBall (0 : E) s := by\n  simp [smul_closedBall' hr.ne' (0 : E), abs_of_nonneg hr.le]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\n⊢ closedBall 0 (r * s) = r • closedBall 0 s\n[PROOFSTEP]\nsimp [smul_closedBall' hr.ne' (0 : E), abs_of_nonneg hr.le]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 < r\ns : ℝ\nthis : closedBall 0 (r * s) = r • closedBall 0 s\n⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)\n[PROOFSTEP]\nsimp only [this, addHaar_smul, abs_of_nonneg hr.le, addHaar_closedBall_center, abs_pow]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 ≤ r\ns : ℝ\nhs : 0 ≤ s\n⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)\n[PROOFSTEP]\nhave : closedBall (0 : E) (r * s) = r • closedBall (0 : E) s := by simp [smul_closedBall r (0 : E) hs, abs_of_nonneg hr]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 ≤ r\ns : ℝ\nhs : 0 ≤ s\n⊢ closedBall 0 (r * s) = r • closedBall 0 s\n[PROOFSTEP]\nsimp [smul_closedBall r (0 : E) hs, abs_of_nonneg hr]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nx : E\nr : ℝ\nhr : 0 ≤ r\ns : ℝ\nhs : 0 ≤ s\nthis : closedBall 0 (r * s) = r • closedBall 0 s\n⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)\n[PROOFSTEP]\nsimp only [this, addHaar_smul, abs_of_nonneg hr, addHaar_closedBall_center, abs_pow]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ ↑↑μ (closedBall x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)\n[PROOFSTEP]\nrw [← addHaar_closedBall_mul μ x hr zero_le_one, mul_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ↑↑μ (closedBall 0 1) = ↑↑μ (ball 0 1)\n[PROOFSTEP]\napply le_antisymm _ (measure_mono ball_subset_closedBall)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nhave A :\n  Tendsto (fun r : ℝ => ENNReal.ofReal (r ^ finrank ℝ E) * μ (closedBall (0 : E) 1)) (𝓝[<] 1)\n    (𝓝 (ENNReal.ofReal ((1 : ℝ) ^ finrank ℝ E) * μ (closedBall (0 : E) 1))) :=\n  by\n  refine' ENNReal.Tendsto.mul _ (by simp) tendsto_const_nhds (by simp)\n  exact ENNReal.tendsto_ofReal ((tendsto_id'.2 nhdsWithin_le_nhds).pow _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1)\n    (𝓝 (ENNReal.ofReal (1 ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)))\n[PROOFSTEP]\nrefine' ENNReal.Tendsto.mul _ (by simp) tendsto_const_nhds (by simp)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ENNReal.ofReal (1 ^ finrank ℝ E) ≠ 0 ∨ ↑↑μ (closedBall 0 1) ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ↑↑μ (closedBall 0 1) ≠ 0 ∨ ENNReal.ofReal (1 ^ finrank ℝ E) ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E)) (𝓝[Iio 1] 1) (𝓝 (ENNReal.ofReal (1 ^ finrank ℝ E)))\n[PROOFSTEP]\nexact ENNReal.tendsto_ofReal ((tendsto_id'.2 nhdsWithin_le_nhds).pow _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA :\n  Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1)\n    (𝓝 (ENNReal.ofReal (1 ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)))\n⊢ ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nsimp only [one_pow, one_mul, ENNReal.ofReal_one] at A \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\n⊢ ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrefine' le_of_tendsto A _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\n⊢ ∀ᶠ (c : ℝ) in 𝓝[Iio 1] 1, ENNReal.ofReal (c ^ finrank ℝ E) * ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrefine' mem_nhdsWithin_Iio_iff_exists_Ioo_subset.2 ⟨(0 : ℝ), by simp, fun r hr => _⟩\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\n⊢ 0 ∈ Iio 1\n[PROOFSTEP]\nsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\nr : ℝ\nhr : r ∈ Ioo 0 1\n⊢ r ∈ {x | (fun c => ENNReal.ofReal (c ^ finrank ℝ E) * ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)) x}\n[PROOFSTEP]\ndsimp\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\nr : ℝ\nhr : r ∈ Ioo 0 1\n⊢ ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrw [← addHaar_closedBall' μ (0 : E) hr.1.le]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nA : Tendsto (fun r => ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1)) (𝓝[Iio 1] 1) (𝓝 (↑↑μ (closedBall 0 1)))\nr : ℝ\nhr : r ∈ Ioo 0 1\n⊢ ↑↑μ (closedBall 0 r) ≤ ↑↑μ (ball 0 1)\n[PROOFSTEP]\nexact measure_mono (closedBall_subset_ball hr.2)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : 0 ≤ r\n⊢ ↑↑μ (closedBall x r) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (ball 0 1)\n[PROOFSTEP]\nrw [addHaar_closedBall' μ x hr, addHaar_closed_unit_ball_eq_addHaar_unit_ball]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (ball x r)\n[PROOFSTEP]\nby_cases h : r < 0\n[GOAL]\ncase pos\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nh : r < 0\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (ball x r)\n[PROOFSTEP]\nrw [Metric.closedBall_eq_empty.mpr h, Metric.ball_eq_empty.mpr h.le]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nh : ¬r < 0\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (ball x r)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nh : 0 ≤ r\n⊢ ↑↑μ (closedBall x r) = ↑↑μ (ball x r)\n[PROOFSTEP]\nrw [addHaar_closedBall μ x h, addHaar_ball μ x h]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : r ≠ 0\n⊢ ↑↑μ (sphere x r) = 0\n[PROOFSTEP]\nrcases hr.lt_or_lt with (h | h)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : r ≠ 0\nh : r < 0\n⊢ ↑↑μ (sphere x r) = 0\n[PROOFSTEP]\nsimp only [empty_diff, measure_empty, ← closedBall_diff_ball, closedBall_eq_empty.2 h]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nx : E\nr : ℝ\nhr : r ≠ 0\nh : 0 < r\n⊢ ↑↑μ (sphere x r) = 0\n[PROOFSTEP]\nrw [← closedBall_diff_ball, measure_diff ball_subset_closedBall measurableSet_ball measure_ball_lt_top.ne,\n  addHaar_ball_of_pos μ _ h, addHaar_closedBall μ _ h.le, tsub_self]\n[GOAL]\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\n⊢ ↑↑μ (sphere x r) = 0\n[PROOFSTEP]\nrcases eq_or_ne r 0 with (rfl | h)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\n⊢ ↑↑μ (sphere x 0) = 0\n[PROOFSTEP]\nrw [sphere_zero, measure_singleton]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace ℝ E\ninst✝⁷ : MeasurableSpace E\ninst✝⁶ : BorelSpace E\ninst✝⁵ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁴ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝³ : NormedAddCommGroup F\ninst✝² : NormedSpace ℝ F\ninst✝¹ : CompleteSpace F\ns : Set E\ninst✝ : Nontrivial E\nx : E\nr : ℝ\nh : r ≠ 0\n⊢ ↑↑μ (sphere x r) = 0\n[PROOFSTEP]\nexact addHaar_sphere_of_ne_zero μ x h\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ↑↑μ ({x} + r • s) / ↑↑μ ({y} + r • t) =\n    ENNReal.ofReal (|r| ^ finrank ℝ E) * ↑↑μ s * (ENNReal.ofReal (|r| ^ finrank ℝ E) * ↑↑μ t)⁻¹\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, addHaar_smul, image_add_left, measure_preimage_add, abs_pow, singleton_add]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) * ↑↑μ s * (ENNReal.ofReal (|r| ^ finrank ℝ E) * ↑↑μ t)⁻¹ =\n    ENNReal.ofReal (|r| ^ finrank ℝ E) * (ENNReal.ofReal (|r| ^ finrank ℝ E))⁻¹ * (↑↑μ s * (↑↑μ t)⁻¹)\n[PROOFSTEP]\nrw [ENNReal.mul_inv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) * ↑↑μ s * ((ENNReal.ofReal (|r| ^ finrank ℝ E))⁻¹ * (↑↑μ t)⁻¹) =\n    ENNReal.ofReal (|r| ^ finrank ℝ E) * (ENNReal.ofReal (|r| ^ finrank ℝ E))⁻¹ * (↑↑μ s * (↑↑μ t)⁻¹)\n[PROOFSTEP]\nring\n[GOAL]\ncase ha\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) ≠ 0 ∨ ↑↑μ t ≠ ⊤\n[PROOFSTEP]\nsimp only [pow_pos (abs_pos.mpr hr), ENNReal.ofReal_eq_zero, not_le, Ne.def, true_or_iff]\n[GOAL]\ncase hb\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) ≠ ⊤ ∨ ↑↑μ t ≠ 0\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_ne_top, true_or_iff, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) * (ENNReal.ofReal (|r| ^ finrank ℝ E))⁻¹ * (↑↑μ s * (↑↑μ t)⁻¹) = ↑↑μ s / ↑↑μ t\n[PROOFSTEP]\nrw [ENNReal.mul_inv_cancel, one_mul, div_eq_mul_inv]\n[GOAL]\ncase h0\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) ≠ 0\n[PROOFSTEP]\nsimp only [pow_pos (abs_pos.mpr hr), ENNReal.ofReal_eq_zero, not_le, Ne.def]\n[GOAL]\ncase ht\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ : Set E\nr : ℝ\nhr : r ≠ 0\nx y : E\ns t : Set E\n⊢ ENNReal.ofReal (|r| ^ finrank ℝ E) ≠ ⊤\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_ne_top, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ IsUnifLocDoublingMeasure μ\n[PROOFSTEP]\nrefine' ⟨⟨(2 : ℝ≥0) ^ finrank ℝ E, _⟩⟩\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\n⊢ ∀ᶠ (ε : ℝ) in 𝓝[Ioi 0] 0, ∀ (x : E), ↑↑μ (closedBall x (2 * ε)) ≤ ↑(2 ^ finrank ℝ E) * ↑↑μ (closedBall x ε)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with r hr x\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nr : ℝ\nhr : r ∈ Ioi 0\nx : E\n⊢ ↑↑μ (closedBall x (2 * r)) ≤ ↑(2 ^ finrank ℝ E) * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nrw [addHaar_closedBall_mul μ x zero_le_two (le_of_lt hr), addHaar_closedBall_center μ x, ENNReal.ofReal,\n  Real.toNNReal_pow zero_le_two]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns : Set E\nr : ℝ\nhr : r ∈ Ioi 0\nx : E\n⊢ ↑(Real.toNNReal 2 ^ finrank ℝ E) * ↑↑μ (closedBall 0 r) ≤ ↑(2 ^ finrank ℝ E) * ↑↑μ (closedBall 0 r)\n[PROOFSTEP]\nsimp only [Real.toNNReal_ofNat, le_refl]\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\n⊢ ↑↑(Basis.addHaar b) (parallelepiped v) = ENNReal.ofReal |↑(Basis.det b) v|\n[PROOFSTEP]\nhave : FiniteDimensional ℝ G := FiniteDimensional.of_fintype_basis b\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\nthis : FiniteDimensional ℝ G\n⊢ ↑↑(Basis.addHaar b) (parallelepiped v) = ENNReal.ofReal |↑(Basis.det b) v|\n[PROOFSTEP]\nhave A : parallelepiped v = b.constr ℕ v '' parallelepiped b :=\n  by\n  rw [image_parallelepiped]\n    -- porting note: was `congr 1 with i` but Lean 4 `congr` applies `ext` first\n  refine congr_arg _ <| funext fun i ↦ ?_\n  exact (b.constr_basis ℕ v i).symm\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\nthis : FiniteDimensional ℝ G\n⊢ parallelepiped v = ↑(↑(Basis.constr b ℕ) v) '' parallelepiped ↑b\n[PROOFSTEP]\nrw [image_parallelepiped]\n  -- porting note: was `congr 1 with i` but Lean 4 `congr` applies `ext` first\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\nthis : FiniteDimensional ℝ G\n⊢ parallelepiped v = parallelepiped (↑(↑(Basis.constr b ℕ) v) ∘ ↑b)\n[PROOFSTEP]\nrefine congr_arg _ <| funext fun i ↦ ?_\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\nthis : FiniteDimensional ℝ G\ni : ι\n⊢ v i = (↑(↑(Basis.constr b ℕ) v) ∘ ↑b) i\n[PROOFSTEP]\nexact (b.constr_basis ℕ v i).symm\n[GOAL]\nE : Type u_1\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace ℝ E\ninst✝¹² : MeasurableSpace E\ninst✝¹¹ : BorelSpace E\ninst✝¹⁰ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝⁹ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace ℝ F\ninst✝⁶ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁵ : Fintype ι\ninst✝⁴ : DecidableEq ι\ninst✝³ : NormedAddCommGroup G\ninst✝² : NormedSpace ℝ G\ninst✝¹ : MeasurableSpace G\ninst✝ : BorelSpace G\nb : Basis ι ℝ G\nv : ι → G\nthis : FiniteDimensional ℝ G\nA : parallelepiped v = ↑(↑(Basis.constr b ℕ) v) '' parallelepiped ↑b\n⊢ ↑↑(Basis.addHaar b) (parallelepiped v) = ENNReal.ofReal |↑(Basis.det b) v|\n[PROOFSTEP]\nrw [A, addHaar_image_linearMap, b.addHaar_self, mul_one, ← LinearMap.det_toMatrix b, ←\n  Basis.toMatrix_eq_toMatrix_constr, Basis.det_apply]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\nv : Fin n → G\n⊢ ↑↑(AlternatingMap.measure ω) (parallelepiped v) = ENNReal.ofReal |↑ω v|\n[PROOFSTEP]\nconv_rhs => rw [ω.eq_smul_basis_det (finBasisOfFinrankEq ℝ G _i.out)]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\nv : Fin n → G\n| ENNReal.ofReal |↑ω v|\n[PROOFSTEP]\nrw [ω.eq_smul_basis_det (finBasisOfFinrankEq ℝ G _i.out)]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\nv : Fin n → G\n| ENNReal.ofReal |↑ω v|\n[PROOFSTEP]\nrw [ω.eq_smul_basis_det (finBasisOfFinrankEq ℝ G _i.out)]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\nv : Fin n → G\n| ENNReal.ofReal |↑ω v|\n[PROOFSTEP]\nrw [ω.eq_smul_basis_det (finBasisOfFinrankEq ℝ G _i.out)]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\nv : Fin n → G\n⊢ ↑↑(AlternatingMap.measure ω) (parallelepiped v) =\n    ENNReal.ofReal\n      |↑(↑ω ↑(finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n)) •\n              Basis.det (finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n)))\n          v|\n[PROOFSTEP]\nsimp only [addHaar_parallelepiped, AlternatingMap.measure, coe_nnreal_smul_apply, AlternatingMap.smul_apply,\n  Algebra.id.smul_eq_mul, abs_mul, ENNReal.ofReal_mul (abs_nonneg _), Real.ennnorm_eq_ofReal_abs]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\n⊢ IsAddLeftInvariant (AlternatingMap.measure ω)\n[PROOFSTEP]\nrw [AlternatingMap.measure]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\n⊢ IsAddLeftInvariant\n    (‖↑ω ↑(finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n))‖₊ •\n      Basis.addHaar (finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\n⊢ IsLocallyFiniteMeasure (AlternatingMap.measure ω)\n[PROOFSTEP]\nrw [AlternatingMap.measure]\n[GOAL]\nE : Type u_1\ninst✝¹⁵ : NormedAddCommGroup E\ninst✝¹⁴ : NormedSpace ℝ E\ninst✝¹³ : MeasurableSpace E\ninst✝¹² : BorelSpace E\ninst✝¹¹ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝¹⁰ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝⁹ : NormedAddCommGroup F\ninst✝⁸ : NormedSpace ℝ F\ninst✝⁷ : CompleteSpace F\ns : Set E\nι : Type u_3\nG : Type u_4\ninst✝⁶ : Fintype ι\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : NormedAddCommGroup G\ninst✝³ : NormedSpace ℝ G\ninst✝² : MeasurableSpace G\ninst✝¹ : BorelSpace G\ninst✝ : FiniteDimensional ℝ G\nn : ℕ\n_i : Fact (finrank ℝ G = n)\nω : AlternatingMap ℝ G ℝ (Fin n)\n⊢ IsLocallyFiniteMeasure\n    (‖↑ω ↑(finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n))‖₊ •\n      Basis.addHaar (finBasisOfFinrankEq ℝ G (_ : finrank ℝ G = n)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave A : Tendsto (fun r : ℝ => μ (s ∩ ({ x } + r • t)) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 0) :=\n  by\n  apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds h (eventually_of_forall fun b => zero_le _)\n  filter_upwards [self_mem_nhdsWithin]\n  rintro r (rpos : 0 < r)\n  apply mul_le_mul_right' (measure_mono (inter_subset_inter_right _ _)) _\n  intro y hy\n  have : y - x ∈ r • closedBall (0 : E) 1 := by\n    apply smul_set_mono t_bound\n    simpa [neg_add_eq_sub] using hy\n  simpa only [smul_closedBall _ _ zero_le_one, Real.norm_of_nonneg rpos.le, mem_closedBall_iff_norm, mul_one, sub_zero,\n    smul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\napply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds h (eventually_of_forall fun b => zero_le _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0,\n    ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ (closedBall x b) ≤ ↑↑μ (s ∩ closedBall x b) / ↑↑μ (closedBall x b)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\n⊢ ∀ (a : ℝ),\n    a ∈ Ioi 0 → ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ (closedBall x a) ≤ ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) ≤ ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)\n[PROOFSTEP]\napply mul_le_mul_right' (measure_mono (inter_subset_inter_right _ _)) _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\n⊢ {x} + r • t ⊆ closedBall x r\n[PROOFSTEP]\nintro y hy\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\ny : E\nhy : y ∈ {x} + r • t\n⊢ y ∈ closedBall x r\n[PROOFSTEP]\nhave : y - x ∈ r • closedBall (0 : E) 1 := by\n  apply smul_set_mono t_bound\n  simpa [neg_add_eq_sub] using hy\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\ny : E\nhy : y ∈ {x} + r • t\n⊢ y - x ∈ r • closedBall 0 1\n[PROOFSTEP]\napply smul_set_mono t_bound\n[GOAL]\ncase a\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\ny : E\nhy : y ∈ {x} + r • t\n⊢ y - x ∈ r • t\n[PROOFSTEP]\nsimpa [neg_add_eq_sub] using hy\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nr : ℝ\nrpos : 0 < r\ny : E\nhy : y ∈ {x} + r • t\nthis : y - x ∈ r • closedBall 0 1\n⊢ y ∈ closedBall x r\n[PROOFSTEP]\nsimpa only [smul_closedBall _ _ zero_le_one, Real.norm_of_nonneg rpos.le, mem_closedBall_iff_norm, mul_one, sub_zero,\n  smul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave B :\n  Tendsto (fun r : ℝ => μ (closedBall x r) / μ ({ x } + r • u)) (𝓝[>] 0) (𝓝 (μ (closedBall x 1) / μ ({ x } + u))) :=\n  by\n  apply tendsto_const_nhds.congr' _\n  filter_upwards [self_mem_nhdsWithin]\n  rintro r (rpos : 0 < r)\n  have : closedBall x r = { x } + r • closedBall (0 : E) 1 := by\n    simp only [_root_.smul_closedBall, Real.norm_of_nonneg rpos.le, zero_le_one, add_zero, mul_one,\n      singleton_add_closedBall, smul_zero]\n  simp only [this, addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne']\n  simp only [addHaar_closedBall_center, image_add_left, measure_preimage_add, singleton_add]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\n[PROOFSTEP]\napply tendsto_const_nhds.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ (fun x_1 => ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)) =ᶠ[𝓝[Ioi 0] 0] fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u) = ↑↑μ (closedBall x a) / ↑↑μ ({x} + a • u)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u) = ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nhave : closedBall x r = { x } + r • closedBall (0 : E) 1 := by\n  simp only [_root_.smul_closedBall, Real.norm_of_nonneg rpos.le, zero_le_one, add_zero, mul_one,\n    singleton_add_closedBall, smul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ closedBall x r = {x} + r • closedBall 0 1\n[PROOFSTEP]\nsimp only [_root_.smul_closedBall, Real.norm_of_nonneg rpos.le, zero_le_one, add_zero, mul_one,\n  singleton_add_closedBall, smul_zero]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\nthis : closedBall x r = {x} + r • closedBall 0 1\n⊢ ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u) = ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nsimp only [this, addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne']\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\nthis : closedBall x r = {x} + r • closedBall 0 1\n⊢ ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u) = ↑↑μ (closedBall 0 1) / ↑↑μ u\n[PROOFSTEP]\nsimp only [addHaar_closedBall_center, image_add_left, measure_preimage_add, singleton_add]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave C :\n  Tendsto (fun r : ℝ => μ (s ∩ ({ x } + r • t)) / μ (closedBall x r) * (μ (closedBall x r) / μ ({ x } + r • u)))\n    (𝓝[>] 0) (𝓝 (0 * (μ (closedBall x 1) / μ ({ x } + u)))) :=\n  by\n  apply ENNReal.Tendsto.mul A _ B (Or.inr ENNReal.zero_ne_top)\n  simp only [ne_eq, not_true, singleton_add, image_add_left, measure_preimage_add, false_or, ENNReal.div_eq_top, h'u,\n    false_or_iff, not_and, and_false_iff]\n  intro aux\n  exact (measure_closedBall_lt_top.ne aux).elim\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 (0 * (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u))))\n[PROOFSTEP]\napply ENNReal.Tendsto.mul A _ B (Or.inr ENNReal.zero_ne_top)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\n⊢ 0 ≠ 0 ∨ ↑↑μ (closedBall x 1) / ↑↑μ ({x} + u) ≠ ⊤\n[PROOFSTEP]\nsimp only [ne_eq, not_true, singleton_add, image_add_left, measure_preimage_add, false_or, ENNReal.div_eq_top, h'u,\n  false_or_iff, not_and, and_false_iff]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\n⊢ ↑↑μ (closedBall x 1) = ⊤ → ¬¬↑↑μ u = ⊤\n[PROOFSTEP]\nintro aux\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\naux : ↑↑μ (closedBall x 1) = ⊤\n⊢ ¬¬↑↑μ u = ⊤\n[PROOFSTEP]\nexact (measure_closedBall_lt_top.ne aux).elim\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 (0 * (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u))))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nsimp only [zero_mul] at C \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\napply C.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u))) =ᶠ[𝓝[Ioi 0] 0]\n    fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ),\n    a ∈ Ioi 0 →\n      ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ (closedBall x a) * (↑↑μ (closedBall x a) / ↑↑μ ({x} + a • u)) =\n        ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ ({x} + a • u)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\ncalc\n  μ (s ∩ ({ x } + r • t)) / μ (closedBall x r) * (μ (closedBall x r) / μ ({ x } + r • u)) =\n      μ (closedBall x r) * (μ (closedBall x r))⁻¹ * (μ (s ∩ ({ x } + r • t)) / μ ({ x } + r • u)) :=\n    by simp only [div_eq_mul_inv]; ring\n  _ = μ (s ∩ ({ x } + r • t)) / μ ({ x } + r • u) := by\n    rw [ENNReal.mul_inv_cancel (measure_closedBall_pos μ x rpos).ne' measure_closedBall_lt_top.ne, one_mul]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) =\n    ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r))⁻¹ * (↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u))\n[PROOFSTEP]\nsimp only [div_eq_mul_inv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) * (↑↑μ (closedBall x r))⁻¹ * (↑↑μ (closedBall x r) * (↑↑μ ({x} + r • u))⁻¹) =\n    ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r))⁻¹ * (↑↑μ (s ∩ ({x} + r • t)) * (↑↑μ ({x} + r • u))⁻¹)\n[PROOFSTEP]\nring\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nt_bound : t ⊆ closedBall 0 1\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (closedBall x 1) / ↑↑μ ({x} + u)))\nC :\n  Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r) / ↑↑μ ({x} + r • u)))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (closedBall x r) * (↑↑μ (closedBall x r))⁻¹ * (↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nrw [ENNReal.mul_inv_cancel (measure_closedBall_pos μ x rpos).ne' measure_closedBall_lt_top.ne, one_mul]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nset t' := R⁻¹ • t with ht'\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nset u' := R⁻¹ • u with hu'\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave A : Tendsto (fun r : ℝ => μ (s ∩ ({ x } + r • t')) / μ ({ x } + r • u')) (𝓝[>] 0) (𝓝 0) :=\n  by\n  apply tendsto_addHaar_inter_smul_zero_of_density_zero_aux1 μ s x h t' u'\n  ·\n    simp only [h'u, (pow_pos Rpos _).ne', abs_nonpos_iff, addHaar_smul, not_false_iff, ENNReal.ofReal_eq_zero,\n      inv_eq_zero, inv_pow, Ne.def, or_self_iff, mul_eq_zero]\n  · refine (smul_set_mono t_bound).trans_eq ?_\n    rw [smul_closedBall _ _ Rpos.le, smul_zero, Real.norm_of_nonneg (inv_nonneg.2 Rpos.le), inv_mul_cancel Rpos.ne']\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\napply tendsto_addHaar_inter_smul_zero_of_density_zero_aux1 μ s x h t' u'\n[GOAL]\ncase h'u\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\n⊢ ↑↑μ u' ≠ 0\n[PROOFSTEP]\nsimp only [h'u, (pow_pos Rpos _).ne', abs_nonpos_iff, addHaar_smul, not_false_iff, ENNReal.ofReal_eq_zero, inv_eq_zero,\n  inv_pow, Ne.def, or_self_iff, mul_eq_zero]\n[GOAL]\ncase t_bound\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\n⊢ t' ⊆ closedBall 0 1\n[PROOFSTEP]\nrefine (smul_set_mono t_bound).trans_eq ?_\n[GOAL]\ncase t_bound\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\n⊢ R⁻¹ • closedBall 0 R = closedBall 0 1\n[PROOFSTEP]\nrw [smul_closedBall _ _ Rpos.le, smul_zero, Real.norm_of_nonneg (inv_nonneg.2 Rpos.le), inv_mul_cancel Rpos.ne']\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave B : Tendsto (fun r : ℝ => R * r) (𝓝[>] 0) (𝓝[>] (R * 0)) :=\n  by\n  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within\n  · exact (tendsto_const_nhds.mul tendsto_id).mono_left nhdsWithin_le_nhds\n  · filter_upwards [self_mem_nhdsWithin]\n    intro r rpos\n    rw [mul_zero]\n    exact mul_pos Rpos rpos\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi (R * 0)] (R * 0))\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within\n[GOAL]\ncase h1\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝 (R * 0))\n[PROOFSTEP]\nexact (tendsto_const_nhds.mul tendsto_id).mono_left nhdsWithin_le_nhds\n[GOAL]\ncase h2\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ᶠ (x : ℝ) in 𝓝[Ioi 0] 0, R * x ∈ Ioi (R * 0)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → R * a ∈ Ioi (R * 0)\n[PROOFSTEP]\nintro r rpos\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : r ∈ Ioi 0\n⊢ R * r ∈ Ioi (R * 0)\n[PROOFSTEP]\nrw [mul_zero]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : r ∈ Ioi 0\n⊢ R * r ∈ Ioi 0\n[PROOFSTEP]\nexact mul_pos Rpos rpos\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi (R * 0)] (R * 0))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nrw [mul_zero] at B \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\napply (A.comp B).congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\n⊢ ((fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) ∘ fun r => R * r) =ᶠ[𝓝[Ioi 0] 0] fun r =>\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\n⊢ ∀ (a : ℝ),\n    a ∈ Ioi 0 →\n      ((fun r => ↑↑μ (s ∩ ({x} + r • R⁻¹ • t)) / ↑↑μ ({x} + r • R⁻¹ • u)) ∘ fun r => R * r) a =\n        ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ ({x} + a • u)\n[PROOFSTEP]\nrintro r -\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\n⊢ ((fun r => ↑↑μ (s ∩ ({x} + r • R⁻¹ • t)) / ↑↑μ ({x} + r • R⁻¹ • u)) ∘ fun r => R * r) r =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nhave T : (R * r) • t' = r • t := by rw [mul_comm, ht', smul_smul, mul_assoc, mul_inv_cancel Rpos.ne', mul_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\n⊢ (R * r) • t' = r • t\n[PROOFSTEP]\nrw [mul_comm, ht', smul_smul, mul_assoc, mul_inv_cancel Rpos.ne', mul_one]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\nT : (R * r) • t' = r • t\n⊢ ((fun r => ↑↑μ (s ∩ ({x} + r • R⁻¹ • t)) / ↑↑μ ({x} + r • R⁻¹ • u)) ∘ fun r => R * r) r =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nhave U : (R * r) • u' = r • u := by rw [mul_comm, hu', smul_smul, mul_assoc, mul_inv_cancel Rpos.ne', mul_one]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\nT : (R * r) • t' = r • t\n⊢ (R * r) • u' = r • u\n[PROOFSTEP]\nrw [mul_comm, hu', smul_smul, mul_assoc, mul_inv_cancel Rpos.ne', mul_one]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\nT : (R * r) • t' = r • t\nU : (R * r) • u' = r • u\n⊢ ((fun r => ↑↑μ (s ∩ ({x} + r • R⁻¹ • t)) / ↑↑μ ({x} + r • R⁻¹ • u)) ∘ fun r => R * r) r =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt u : Set E\nh'u : ↑↑μ u ≠ 0\nR : ℝ\nRpos : 0 < R\nt_bound : t ⊆ closedBall 0 R\nt' : Set E := R⁻¹ • t\nht' : t' = R⁻¹ • t\nu' : Set E := R⁻¹ • u\nhu' : u' = R⁻¹ • u\nA : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • u')) (𝓝[Ioi 0] 0) (𝓝 0)\nB : Tendsto (fun r => R * r) (𝓝[Ioi 0] 0) (𝓝[Ioi 0] 0)\nr : ℝ\nT : (R * r) • t' = r • t\nU : (R * r) • u' = r • u\n⊢ ↑↑μ (s ∩ ({x} + (R * r) • R⁻¹ • t)) / ↑↑μ ({x} + (R * r) • R⁻¹ • u) = ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • u)\n[PROOFSTEP]\nrw [T, U]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nrefine' tendsto_order.2 ⟨fun a' ha' => (ENNReal.not_lt_zero ha').elim, fun ε (εpos : 0 < ε) => _⟩\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ ({x} + b • t) < ε\n[PROOFSTEP]\nrcases eq_or_ne (μ t) 0 with (h't | h't)\n[GOAL]\ncase inl\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ ({x} + b • t) < ε\n[PROOFSTEP]\napply eventually_of_forall fun r => ?_\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) < ε\n[PROOFSTEP]\nsuffices H : μ (s ∩ ({ x } + r • t)) = 0\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\nH : ↑↑μ (s ∩ ({x} + r • t)) = 0\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) < ε\n[PROOFSTEP]\nrw [H]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\nH : ↑↑μ (s ∩ ({x} + r • t)) = 0\n⊢ 0 / ↑↑μ ({x} + r • t) < ε\n[PROOFSTEP]\nsimpa only [ENNReal.zero_div] using εpos\n[GOAL]\ncase H\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\n⊢ ↑↑μ (s ∩ ({x} + r • t)) = 0\n[PROOFSTEP]\napply le_antisymm _ (zero_le _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\n⊢ ↑↑μ (s ∩ ({x} + r • t)) ≤ 0\n[PROOFSTEP]\ncalc\n  μ (s ∩ ({ x } + r • t)) ≤ μ ({ x } + r • t) := measure_mono (inter_subset_right _ _)\n  _ = 0 := by simp only [h't, addHaar_smul, image_add_left, measure_preimage_add, singleton_add, mul_zero]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t = 0\nr : ℝ\n⊢ ↑↑μ ({x} + r • t) = 0\n[PROOFSTEP]\nsimp only [h't, addHaar_smul, image_add_left, measure_preimage_add, singleton_add, mul_zero]\n[GOAL]\ncase inr\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ ({x} + b • t) < ε\n[PROOFSTEP]\nobtain ⟨n, npos, hn⟩ : ∃ n : ℕ, 0 < n ∧ μ (t \\ closedBall 0 n) < ε / 2 * μ t :=\n  by\n  have A : Tendsto (fun n : ℕ => μ (t \\ closedBall 0 n)) atTop (𝓝 (μ (⋂ n : ℕ, t \\ closedBall 0 n))) :=\n    by\n    have N : ∃ n : ℕ, μ (t \\ closedBall 0 n) ≠ ∞ := ⟨0, ((measure_mono (diff_subset t _)).trans_lt h''t.lt_top).ne⟩\n    refine' tendsto_measure_iInter (fun n ↦ ht.diff measurableSet_closedBall) (fun m n hmn ↦ _) N\n    exact diff_subset_diff Subset.rfl (closedBall_subset_closedBall (Nat.cast_le.2 hmn))\n  have : ⋂ n : ℕ, t \\ closedBall 0 n = ∅ := by\n    simp_rw [diff_eq, ← inter_iInter, iInter_eq_compl_iUnion_compl, compl_compl, iUnion_closedBall_nat, compl_univ,\n      inter_empty]\n  simp only [this, measure_empty] at A \n  have I : 0 < ε / 2 * μ t := ENNReal.mul_pos (ENNReal.half_pos εpos.ne').ne' h't\n  exact (Eventually.and (Ioi_mem_atTop 0) ((tendsto_order.1 A).2 _ I)).exists\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\n⊢ ∃ n, 0 < n ∧ ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n[PROOFSTEP]\nhave A : Tendsto (fun n : ℕ => μ (t \\ closedBall 0 n)) atTop (𝓝 (μ (⋂ n : ℕ, t \\ closedBall 0 n))) :=\n  by\n  have N : ∃ n : ℕ, μ (t \\ closedBall 0 n) ≠ ∞ := ⟨0, ((measure_mono (diff_subset t _)).trans_lt h''t.lt_top).ne⟩\n  refine' tendsto_measure_iInter (fun n ↦ ht.diff measurableSet_closedBall) (fun m n hmn ↦ _) N\n  exact diff_subset_diff Subset.rfl (closedBall_subset_closedBall (Nat.cast_le.2 hmn))\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\n⊢ Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 (↑↑μ (⋂ (n : ℕ), t \\ closedBall 0 ↑n)))\n[PROOFSTEP]\nhave N : ∃ n : ℕ, μ (t \\ closedBall 0 n) ≠ ∞ := ⟨0, ((measure_mono (diff_subset t _)).trans_lt h''t.lt_top).ne⟩\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nN : ∃ n, ↑↑μ (t \\ closedBall 0 ↑n) ≠ ⊤\n⊢ Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 (↑↑μ (⋂ (n : ℕ), t \\ closedBall 0 ↑n)))\n[PROOFSTEP]\nrefine' tendsto_measure_iInter (fun n ↦ ht.diff measurableSet_closedBall) (fun m n hmn ↦ _) N\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nN : ∃ n, ↑↑μ (t \\ closedBall 0 ↑n) ≠ ⊤\nm n : ℕ\nhmn : m ≤ n\n⊢ t \\ closedBall 0 ↑n ≤ t \\ closedBall 0 ↑m\n[PROOFSTEP]\nexact diff_subset_diff Subset.rfl (closedBall_subset_closedBall (Nat.cast_le.2 hmn))\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nA : Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 (↑↑μ (⋂ (n : ℕ), t \\ closedBall 0 ↑n)))\n⊢ ∃ n, 0 < n ∧ ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n[PROOFSTEP]\nhave : ⋂ n : ℕ, t \\ closedBall 0 n = ∅ := by\n  simp_rw [diff_eq, ← inter_iInter, iInter_eq_compl_iUnion_compl, compl_compl, iUnion_closedBall_nat, compl_univ,\n    inter_empty]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nA : Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 (↑↑μ (⋂ (n : ℕ), t \\ closedBall 0 ↑n)))\n⊢ ⋂ (n : ℕ), t \\ closedBall 0 ↑n = ∅\n[PROOFSTEP]\nsimp_rw [diff_eq, ← inter_iInter, iInter_eq_compl_iUnion_compl, compl_compl, iUnion_closedBall_nat, compl_univ,\n  inter_empty]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nA : Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 (↑↑μ (⋂ (n : ℕ), t \\ closedBall 0 ↑n)))\nthis : ⋂ (n : ℕ), t \\ closedBall 0 ↑n = ∅\n⊢ ∃ n, 0 < n ∧ ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n[PROOFSTEP]\nsimp only [this, measure_empty] at A \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nthis : ⋂ (n : ℕ), t \\ closedBall 0 ↑n = ∅\nA : Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 0)\n⊢ ∃ n, 0 < n ∧ ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n[PROOFSTEP]\nhave I : 0 < ε / 2 * μ t := ENNReal.mul_pos (ENNReal.half_pos εpos.ne').ne' h't\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nthis : ⋂ (n : ℕ), t \\ closedBall 0 ↑n = ∅\nA : Tendsto (fun n => ↑↑μ (t \\ closedBall 0 ↑n)) atTop (𝓝 0)\nI : 0 < ε / 2 * ↑↑μ t\n⊢ ∃ n, 0 < n ∧ ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n[PROOFSTEP]\nexact (Eventually.and (Ioi_mem_atTop 0) ((tendsto_order.1 A).2 _ I)).exists\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ ({x} + b • t) < ε\n[PROOFSTEP]\nhave L : Tendsto (fun r : ℝ => μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n))) / μ ({ x } + r • t)) (𝓝[>] 0) (𝓝 0) :=\n  tendsto_addHaar_inter_smul_zero_of_density_zero_aux2 μ s x h _ t h't n (Nat.cast_pos.2 npos) (inter_subset_right _ _)\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (s ∩ ({x} + b • t)) / ↑↑μ ({x} + b • t) < ε\n[PROOFSTEP]\nfilter_upwards [(tendsto_order.1 L).2 _ (ENNReal.half_pos εpos.ne'), self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ),\n    ↑↑μ (s ∩ ({x} + a • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + a • t) < ε / 2 →\n      a ∈ Ioi 0 → ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t) < ε\n[PROOFSTEP]\nrintro r hr (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) < ε\n[PROOFSTEP]\nhave I : μ (s ∩ ({ x } + r • t)) ≤ μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n))) + μ ({ x } + r • (t \\ closedBall 0 n)) :=\n  calc\n    μ (s ∩ ({ x } + r • t)) = μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n)) ∪ s ∩ ({ x } + r • (t \\ closedBall 0 n))) := by\n      rw [← inter_union_distrib_left, ← add_union, ← smul_set_union, inter_union_diff]\n    _ ≤ μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n))) + μ (s ∩ ({ x } + r • (t \\ closedBall 0 n))) :=\n      (measure_union_le _ _)\n    _ ≤ μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n))) + μ ({ x } + r • (t \\ closedBall 0 n)) :=\n      add_le_add le_rfl (measure_mono (inter_subset_right _ _))\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\n⊢ ↑↑μ (s ∩ ({x} + r • t)) = ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n)) ∪ s ∩ ({x} + r • (t \\ closedBall 0 ↑n)))\n[PROOFSTEP]\nrw [← inter_union_distrib_left, ← add_union, ← smul_set_union, inter_union_diff]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\nI : ↑↑μ (s ∩ ({x} + r • t)) ≤ ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) + ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n))\n⊢ ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) < ε\n[PROOFSTEP]\ncalc\n  μ (s ∩ ({ x } + r • t)) / μ ({ x } + r • t) ≤\n      (μ (s ∩ ({ x } + r • (t ∩ closedBall 0 n))) + μ ({ x } + r • (t \\ closedBall 0 n))) / μ ({ x } + r • t) :=\n    mul_le_mul_right' I _\n  _ < ε / 2 + ε / 2 := by\n    rw [ENNReal.add_div]\n    apply ENNReal.add_lt_add hr _\n    rwa [addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne', ENNReal.div_lt_iff (Or.inl h't) (Or.inl h''t)]\n  _ = ε := ENNReal.add_halves _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\nI : ↑↑μ (s ∩ ({x} + r • t)) ≤ ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) + ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n))\n⊢ (↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) + ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) <\n    ε / 2 + ε / 2\n[PROOFSTEP]\nrw [ENNReal.add_div]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\nI : ↑↑μ (s ∩ ({x} + r • t)) ≤ ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) + ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n))\n⊢ ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) +\n      ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n)) / ↑↑μ ({x} + r • t) <\n    ε / 2 + ε / 2\n[PROOFSTEP]\napply ENNReal.add_lt_add hr _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nt : Set E\nht : MeasurableSet t\nh''t : ↑↑μ t ≠ ⊤\nε : ℝ≥0∞\nεpos : 0 < ε\nh't : ↑↑μ t ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : ↑↑μ (t \\ closedBall 0 ↑n) < ε / 2 * ↑↑μ t\nL : Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nhr : ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) / ↑↑μ ({x} + r • t) < ε / 2\nrpos : 0 < r\nI : ↑↑μ (s ∩ ({x} + r • t)) ≤ ↑↑μ (s ∩ ({x} + r • (t ∩ closedBall 0 ↑n))) + ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n))\n⊢ ↑↑μ ({x} + r • (t \\ closedBall 0 ↑n)) / ↑↑μ ({x} + r • t) < ε / 2\n[PROOFSTEP]\nrwa [addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne', ENNReal.div_lt_iff (Or.inl h't) (Or.inl h''t)]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave I : ∀ u v, μ u ≠ 0 → μ u ≠ ∞ → MeasurableSet v → μ u / μ u - μ (vᶜ ∩ u) / μ u = μ (v ∩ u) / μ u :=\n  by\n  intro u v uzero utop vmeas\n  simp_rw [div_eq_mul_inv]\n  rw [← ENNReal.sub_mul]; swap\n  · simp only [uzero, ENNReal.inv_eq_top, imp_true_iff, Ne.def, not_false_iff]\n  congr 1\n  apply ENNReal.sub_eq_of_add_eq (ne_top_of_le_ne_top utop (measure_mono (inter_subset_right _ _)))\n  rw [inter_comm _ u, inter_comm _ u]\n  exact measure_inter_add_diff u vmeas\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n[PROOFSTEP]\nintro u v uzero utop vmeas\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ ↑↑μ u * (↑↑μ u)⁻¹ - ↑↑μ (vᶜ ∩ u) * (↑↑μ u)⁻¹ = ↑↑μ (v ∩ u) * (↑↑μ u)⁻¹\n[PROOFSTEP]\nrw [← ENNReal.sub_mul]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ (↑↑μ u - ↑↑μ (vᶜ ∩ u)) * (↑↑μ u)⁻¹ = ↑↑μ (v ∩ u) * (↑↑μ u)⁻¹\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ 0 < ↑↑μ (vᶜ ∩ u) → ↑↑μ (vᶜ ∩ u) < ↑↑μ u → (↑↑μ u)⁻¹ ≠ ⊤\n[PROOFSTEP]\nswap\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ 0 < ↑↑μ (vᶜ ∩ u) → ↑↑μ (vᶜ ∩ u) < ↑↑μ u → (↑↑μ u)⁻¹ ≠ ⊤\n[PROOFSTEP]\nsimp only [uzero, ENNReal.inv_eq_top, imp_true_iff, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ (↑↑μ u - ↑↑μ (vᶜ ∩ u)) * (↑↑μ u)⁻¹ = ↑↑μ (v ∩ u) * (↑↑μ u)⁻¹\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ ↑↑μ u - ↑↑μ (vᶜ ∩ u) = ↑↑μ (v ∩ u)\n[PROOFSTEP]\napply ENNReal.sub_eq_of_add_eq (ne_top_of_le_ne_top utop (measure_mono (inter_subset_right _ _)))\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ ↑↑μ (v ∩ u) + ↑↑μ (vᶜ ∩ u) = ↑↑μ u\n[PROOFSTEP]\nrw [inter_comm _ u, inter_comm _ u]\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nu v : Set E\nuzero : ↑↑μ u ≠ 0\nutop : ↑↑μ u ≠ ⊤\nvmeas : MeasurableSet v\n⊢ ↑↑μ (u ∩ v) + ↑↑μ (u ∩ vᶜ) = ↑↑μ u\n[PROOFSTEP]\nexact measure_inter_add_diff u vmeas\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave L : Tendsto (fun r => μ (sᶜ ∩ closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 0) :=\n  by\n  have A : Tendsto (fun r => μ (closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 1) :=\n    by\n    apply tendsto_const_nhds.congr' _\n    filter_upwards [self_mem_nhdsWithin]\n    intro r hr\n    rw [div_eq_mul_inv, ENNReal.mul_inv_cancel]\n    · exact (measure_closedBall_pos μ _ hr).ne'\n    · exact measure_closedBall_lt_top.ne\n  have B := ENNReal.Tendsto.sub A h (Or.inl ENNReal.one_ne_top)\n  simp only [tsub_self] at B \n  apply B.congr' _\n  filter_upwards [self_mem_nhdsWithin]\n  rintro r (rpos : 0 < r)\n  convert I (closedBall x r) sᶜ (measure_closedBall_pos μ _ rpos).ne' measure_closedBall_lt_top.ne hs.compl\n  rw [compl_compl]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n⊢ Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave A : Tendsto (fun r => μ (closedBall x r) / μ (closedBall x r)) (𝓝[>] 0) (𝓝 1) :=\n  by\n  apply tendsto_const_nhds.congr' _\n  filter_upwards [self_mem_nhdsWithin]\n  intro r hr\n  rw [div_eq_mul_inv, ENNReal.mul_inv_cancel]\n  · exact (measure_closedBall_pos μ _ hr).ne'\n  · exact measure_closedBall_lt_top.ne\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n⊢ Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\napply tendsto_const_nhds.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n⊢ (fun x => 1) =ᶠ[𝓝[Ioi 0] 0] fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → 1 = ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a)\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nr : ℝ\nhr : r ∈ Ioi 0\n⊢ 1 = ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)\n[PROOFSTEP]\nrw [div_eq_mul_inv, ENNReal.mul_inv_cancel]\n[GOAL]\ncase h.h0\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nr : ℝ\nhr : r ∈ Ioi 0\n⊢ ↑↑μ (closedBall x r) ≠ 0\n[PROOFSTEP]\nexact (measure_closedBall_pos μ _ hr).ne'\n[GOAL]\ncase h.ht\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nr : ℝ\nhr : r ∈ Ioi 0\n⊢ ↑↑μ (closedBall x r) ≠ ⊤\n[PROOFSTEP]\nexact measure_closedBall_lt_top.ne\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\n⊢ Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave B := ENNReal.Tendsto.sub A h (Or.inl ENNReal.one_ne_top)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 (1 - 1))\n⊢ Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nsimp only [tsub_self] at B \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\napply B.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ (fun a =>\n      ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a)) =ᶠ[𝓝[Ioi 0] 0]\n    fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ),\n    a ∈ Ioi 0 →\n      ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a) =\n        ↑↑μ (sᶜ ∩ closedBall x a) / ↑↑μ (closedBall x a)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r) - ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r) =\n    ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)\n[PROOFSTEP]\nconvert I (closedBall x r) sᶜ (measure_closedBall_pos μ _ rpos).ne' measure_closedBall_lt_top.ne hs.compl\n[GOAL]\ncase h.e'_2.h.e'_6.h.e'_5.h.e'_3.h.e'_3\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nA : Tendsto (fun r => ↑↑μ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nB :\n  Tendsto (fun a => ↑↑μ (closedBall x a) / ↑↑μ (closedBall x a) - ↑↑μ (s ∩ closedBall x a) / ↑↑μ (closedBall x a))\n    (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ s = sᶜᶜ\n[PROOFSTEP]\nrw [compl_compl]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave L' : Tendsto (fun r : ℝ => μ (sᶜ ∩ ({ x } + r • t)) / μ ({ x } + r • t)) (𝓝[>] 0) (𝓝 0) :=\n  tendsto_addHaar_inter_smul_zero_of_density_zero μ sᶜ x L t ht h''t\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave L'' : Tendsto (fun r : ℝ => μ ({ x } + r • t) / μ ({ x } + r • t)) (𝓝[>] 0) (𝓝 1) :=\n  by\n  apply tendsto_const_nhds.congr' _\n  filter_upwards [self_mem_nhdsWithin]\n  rintro r (rpos : 0 < r)\n  rw [addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne', ENNReal.div_self h't h''t]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\napply tendsto_const_nhds.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ (fun x => 1) =ᶠ[𝓝[Ioi 0] 0] fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → 1 = ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nr : ℝ\nrpos : 0 < r\n⊢ 1 = ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)\n[PROOFSTEP]\nrw [addHaar_singleton_add_smul_div_singleton_add_smul μ rpos.ne', ENNReal.div_self h't h''t]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave := ENNReal.Tendsto.sub L'' L' (Or.inl ENNReal.one_ne_top)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 (1 - 0))\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nsimp only [tsub_zero] at this \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\napply this.congr' _\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\n⊢ (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) =ᶠ[𝓝[Ioi 0] 0]\n    fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\n⊢ ∀ (a : ℝ),\n    a ∈ Ioi 0 →\n      ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t) =\n        ↑↑μ (s ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)\n[PROOFSTEP]\nrintro r (rpos : 0 < r)\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t) - ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) =\n    ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)\n[PROOFSTEP]\nrefine' I ({ x } + r • t) s _ _ hs\n[GOAL]\ncase h.refine'_1\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ ({x} + r • t) ≠ 0\n[PROOFSTEP]\nsimp only [h't, abs_of_nonneg rpos.le, pow_pos rpos, addHaar_smul, image_add_left, ENNReal.ofReal_eq_zero, not_le,\n  or_false_iff, Ne.def, measure_preimage_add, abs_pow, singleton_add, mul_eq_zero]\n[GOAL]\ncase h.refine'_2\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nhs : MeasurableSet s\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nI :\n  ∀ (u v : Set E), ↑↑μ u ≠ 0 → ↑↑μ u ≠ ⊤ → MeasurableSet v → ↑↑μ u / ↑↑μ u - ↑↑μ (vᶜ ∩ u) / ↑↑μ u = ↑↑μ (v ∩ u) / ↑↑μ u\nL : Tendsto (fun r => ↑↑μ (sᶜ ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 0)\nL' : Tendsto (fun r => ↑↑μ (sᶜ ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 0)\nL'' : Tendsto (fun r => ↑↑μ ({x} + r • t) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nthis :\n  Tendsto (fun a => ↑↑μ ({x} + a • t) / ↑↑μ ({x} + a • t) - ↑↑μ (sᶜ ∩ ({x} + a • t)) / ↑↑μ ({x} + a • t)) (𝓝[Ioi 0] 0)\n    (𝓝 1)\nr : ℝ\nrpos : 0 < r\n⊢ ↑↑μ ({x} + r • t) ≠ ⊤\n[PROOFSTEP]\nsimp [h''t, ENNReal.ofReal_ne_top, addHaar_smul, image_add_left, ENNReal.mul_eq_top, Ne.def, not_false_iff,\n  measure_preimage_add, singleton_add, and_false_iff, false_and_iff, or_self_iff]\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nhave : Tendsto (fun r : ℝ => μ (toMeasurable μ s ∩ ({ x } + r • t)) / μ ({ x } + r • t)) (𝓝[>] 0) (𝓝 1) :=\n  by\n  apply tendsto_addHaar_inter_smul_one_of_density_one_aux μ _ (measurableSet_toMeasurable _ _) _ _ t ht h't h''t\n  apply tendsto_of_tendsto_of_tendsto_of_le_of_le' h tendsto_const_nhds\n  · refine' eventually_of_forall fun r => mul_le_mul_right' _ _\n    exact measure_mono (inter_subset_inter_left _ (subset_toMeasurable _ _))\n  · filter_upwards [self_mem_nhdsWithin]\n    rintro r -\n    apply ENNReal.div_le_of_le_mul\n    rw [one_mul]\n    exact measure_mono (inter_subset_right _ _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\napply tendsto_addHaar_inter_smul_one_of_density_one_aux μ _ (measurableSet_toMeasurable _ _) _ _ t ht h't h''t\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\napply tendsto_of_tendsto_of_tendsto_of_le_of_le' h tendsto_const_nhds\n[GOAL]\ncase hgf\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0,\n    ↑↑μ (s ∩ closedBall x b) / ↑↑μ (closedBall x b) ≤ ↑↑μ (toMeasurable μ s ∩ closedBall x b) / ↑↑μ (closedBall x b)\n[PROOFSTEP]\nrefine' eventually_of_forall fun r => mul_le_mul_right' _ _\n[GOAL]\ncase hgf\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nr : ℝ\n⊢ ↑↑μ (s ∩ closedBall x r) ≤ ↑↑μ (toMeasurable μ s ∩ closedBall x r)\n[PROOFSTEP]\nexact measure_mono (inter_subset_inter_left _ (subset_toMeasurable _ _))\n[GOAL]\ncase hfh\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (toMeasurable μ s ∩ closedBall x b) / ↑↑μ (closedBall x b) ≤ 1\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → ↑↑μ (toMeasurable μ s ∩ closedBall x a) / ↑↑μ (closedBall x a) ≤ 1\n[PROOFSTEP]\nrintro r -\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nr : ℝ\n⊢ ↑↑μ (toMeasurable μ s ∩ closedBall x r) / ↑↑μ (closedBall x r) ≤ 1\n[PROOFSTEP]\napply ENNReal.div_le_of_le_mul\n[GOAL]\ncase h.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nr : ℝ\n⊢ ↑↑μ (toMeasurable μ s ∩ closedBall x r) ≤ 1 * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\ncase h.h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nr : ℝ\n⊢ ↑↑μ (toMeasurable μ s ∩ closedBall x r) ≤ ↑↑μ (closedBall x r)\n[PROOFSTEP]\nexact measure_mono (inter_subset_right _ _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nthis : Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n⊢ Tendsto (fun r => ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\n[PROOFSTEP]\nrefine this.congr fun r => ?_\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nthis : Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nr : ℝ\n⊢ ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t) = ↑↑μ (s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nthis : Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nr : ℝ\n⊢ ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) = ↑↑μ (s ∩ ({x} + r • t))\n[PROOFSTEP]\napply measure_toMeasurable_inter_of_sigmaFinite\n[GOAL]\ncase e_a.hs\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nthis : Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nr : ℝ\n⊢ MeasurableSet ({x} + r • t)\n[PROOFSTEP]\nsimp only [image_add_left, singleton_add]\n[GOAL]\ncase e_a.hs\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nh''t : ↑↑μ t ≠ ⊤\nthis : Tendsto (fun r => ↑↑μ (toMeasurable μ s ∩ ({x} + r • t)) / ↑↑μ ({x} + r • t)) (𝓝[Ioi 0] 0) (𝓝 1)\nr : ℝ\n⊢ MeasurableSet ((fun x_1 => -x + x_1) ⁻¹' (r • t))\n[PROOFSTEP]\napply (continuous_add_left (-x)).measurable (ht.const_smul₀ r)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\n⊢ ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • t))\n[PROOFSTEP]\nobtain ⟨t', t'_meas, t't, t'pos, t'top⟩ : ∃ t', MeasurableSet t' ∧ t' ⊆ t ∧ 0 < μ t' ∧ μ t' < ⊤ :=\n  exists_subset_measure_lt_top ht h't.bot_lt\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\n⊢ ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • t))\n[PROOFSTEP]\nfilter_upwards [(tendsto_order.1\n        (tendsto_addHaar_inter_smul_one_of_density_one μ s x h t' t'_meas t'pos.ne' t'top.ne)).1\n    0 zero_lt_one]\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\n⊢ ∀ (a : ℝ), 0 < ↑↑μ (s ∩ ({x} + a • t')) / ↑↑μ ({x} + a • t') → Set.Nonempty (s ∩ ({x} + a • t))\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\nr : ℝ\nhr : 0 < ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • t')\n⊢ Set.Nonempty (s ∩ ({x} + r • t))\n[PROOFSTEP]\nhave : μ (s ∩ ({ x } + r • t')) ≠ 0 := fun h' => by simp only [ENNReal.not_lt_zero, ENNReal.zero_div, h'] at hr \n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\nr : ℝ\nhr : 0 < ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • t')\nh' : ↑↑μ (s ∩ ({x} + r • t')) = 0\n⊢ False\n[PROOFSTEP]\nsimp only [ENNReal.not_lt_zero, ENNReal.zero_div, h'] at hr \n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\nr : ℝ\nhr : 0 < ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • t')\nthis : ↑↑μ (s ∩ ({x} + r • t')) ≠ 0\n⊢ Set.Nonempty (s ∩ ({x} + r • t))\n[PROOFSTEP]\nhave : (s ∩ ({ x } + r • t')).Nonempty := nonempty_of_measure_ne_zero this\n[GOAL]\ncase h\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\nr : ℝ\nhr : 0 < ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • t')\nthis✝ : ↑↑μ (s ∩ ({x} + r • t')) ≠ 0\nthis : Set.Nonempty (s ∩ ({x} + r • t'))\n⊢ Set.Nonempty (s ∩ ({x} + r • t))\n[PROOFSTEP]\napply this.mono (inter_subset_inter Subset.rfl _)\n[GOAL]\nE : Type u_1\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : MeasurableSpace E\ninst✝⁵ : BorelSpace E\ninst✝⁴ : FiniteDimensional ℝ E\nμ : Measure E\ninst✝³ : IsAddHaarMeasure μ\nF : Type u_2\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ninst✝ : CompleteSpace F\ns✝ s : Set E\nx : E\nh : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nt : Set E\nht : MeasurableSet t\nh't : ↑↑μ t ≠ 0\nt' : Set E\nt'_meas : MeasurableSet t'\nt't : t' ⊆ t\nt'pos : 0 < ↑↑μ t'\nt'top : ↑↑μ t' < ⊤\nr : ℝ\nhr : 0 < ↑↑μ (s ∩ ({x} + r • t')) / ↑↑μ ({x} + r • t')\nthis✝ : ↑↑μ (s ∩ ({x} + r • t')) ≠ 0\nthis : Set.Nonempty (s ∩ ({x} + r • t'))\n⊢ {x} + r • t' ⊆ {x} + r • t\n[PROOFSTEP]\nexact add_subset_add Subset.rfl (smul_set_mono t't)\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar", "llama_tokens": 117564, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526514141572, "lm_q2_score": 0.4960938294709195, "lm_q1q2_score": 0.2827003840742062}}
{"text": "[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type ?u.69019\nf : J → C\ninst✝ : HasProduct f\nj j' : J\nw : j = j'\n⊢ f j = f j'\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type u_1\nf : J → C\ninst✝ : HasProduct f\nj j' : J\nw : j = j'\n⊢ π f j ≫ eqToHom (_ : f j = f j') = π f j'\n[PROOFSTEP]\ncases w\n[GOAL]\ncase refl\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type u_1\nf : J → C\ninst✝ : HasProduct f\nj : J\n⊢ π f j ≫ eqToHom (_ : f j = f j) = π f j\n[PROOFSTEP]\nsimp\n  -- The `simpNF` linter incorrectly identifies these as simp lemmas that could never apply.\n  -- https://github.com/leanprover-community/mathlib4/issues/5049\n  -- They are used by `simp` in `Sigma.whisker_equiv` below.\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type ?u.69987\nf : J → C\ninst✝ : HasCoproduct f\nj j' : J\nw : j = j'\n⊢ f j = f j'\n[PROOFSTEP]\nsimp [w]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type u_1\nf : J → C\ninst✝ : HasCoproduct f\nj j' : J\nw : j = j'\n⊢ eqToHom (_ : f j = f j') ≫ ι f j' = ι f j\n[PROOFSTEP]\ncases w\n[GOAL]\ncase refl\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type u_1\nf : J → C\ninst✝ : HasCoproduct f\nj : J\n⊢ eqToHom (_ : f j = f j) ≫ ι f j = ι f j\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : β → C\ninst✝² : HasProduct f\ninst✝¹ : HasProduct g\np : (b : β) → f b ⟶ g b\ninst✝ : ∀ (i : β), Mono (p i)\n⊢ ∀ (j : Discrete β), Mono (NatTrans.app (Discrete.natTrans fun X => p X.as) j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : β → C\ninst✝² : HasProduct f\ninst✝¹ : HasProduct g\np : (b : β) → f b ⟶ g b\ninst✝ : ∀ (i : β), Mono (p i)\n⊢ ∀ (j : Discrete β), Mono (p j.as)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : β → C\ninst✝² : HasCoproduct f\ninst✝¹ : HasCoproduct g\np : (b : β) → f b ⟶ g b\ninst✝ : ∀ (i : β), Epi (p i)\n⊢ ∀ (j : Discrete β), Epi (NatTrans.app (Discrete.natTrans fun X => p X.as) j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nf g : β → C\ninst✝² : HasCoproduct f\ninst✝¹ : HasCoproduct g\np : (b : β) → f b ⟶ g b\ninst✝ : ∀ (i : β), Epi (p i)\n⊢ ∀ (j : Discrete β), Epi (p j.as)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type ?u.78866\nK : Type ?u.78950\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasProduct f\ninst✝ : HasProduct g\nk : K\n⊢ g (↑e (↑e.symm k)) = g k\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nJ : Type ?u.94443\nK : Type ?u.94527\nf : J → C\ng : K → C\ne : J ≃ K\nw : (j : J) → g (↑e j) ≅ f j\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct g\nk : K\n⊢ g k = g (↑e (↑e.symm k))\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nf : β → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun b => G.obj (f b)\nP : C\ng : (j : β) → P ⟶ f j\n⊢ G.map (Pi.lift g) ≫ piComparison G f = Pi.lift fun j => G.map (g j)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nf : β → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun b => G.obj (f b)\nP : C\ng : (j : β) → P ⟶ f j\nj : β\n⊢ (G.map (Pi.lift g) ≫ piComparison G f) ≫ Pi.π (fun b => G.obj (f b)) j =\n    (Pi.lift fun j => G.map (g j)) ≫ Pi.π (fun b => G.obj (f b)) j\n[PROOFSTEP]\nsimp only [Discrete.functor_obj, Category.assoc, piComparison_comp_π, ← G.map_comp, limit.lift_π, Fan.mk_pt,\n  Fan.mk_π_app]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nf : β → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun b => G.obj (f b)\nP : C\ng : (j : β) → f j ⟶ P\n⊢ sigmaComparison G f ≫ G.map (Sigma.desc g) = Sigma.desc fun j => G.map (g j)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nβ : Type w\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nf : β → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun b => G.obj (f b)\nP : C\ng : (j : β) → f j ⟶ P\nj : β\n⊢ Sigma.ι (fun b => G.obj (f b)) j ≫ sigmaComparison G f ≫ G.map (Sigma.desc g) =\n    Sigma.ι (fun b => G.obj (f b)) j ≫ Sigma.desc fun j => G.map (g j)\n[PROOFSTEP]\nsimp only [Discrete.functor_obj, ι_comp_sigmaComparison_assoc, ← G.map_comp, colimit.ι_desc, Cofan.mk_pt,\n  Cofan.mk_ι_app]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ ((Functor.const (Discrete β)).obj (f default)).obj { as := j } = (Discrete.functor f).obj { as := j }\n[PROOFSTEP]\ndsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ f default = f j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ default = j\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cone (Discrete.functor f)\nj : Discrete β\n⊢ (fun s => NatTrans.app s.π default) s ≫\n      NatTrans.app\n        { pt := f default,\n            π :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                        (Discrete.functor f).obj { as := j }) }.π\n        j =\n    NatTrans.app s.π j\n[PROOFSTEP]\nhave h := Subsingleton.elim j default\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cone (Discrete.functor f)\nj : Discrete β\nh : j = default\n⊢ (fun s => NatTrans.app s.π default) s ≫\n      NatTrans.app\n        { pt := f default,\n            π :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                        (Discrete.functor f).obj { as := j }) }.π\n        j =\n    NatTrans.app s.π j\n[PROOFSTEP]\nsubst h\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cone (Discrete.functor f)\n⊢ (fun s => NatTrans.app s.π default) s ≫\n      NatTrans.app\n        { pt := f default,\n            π :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                        (Discrete.functor f).obj { as := j }) }.π\n        default =\n    NatTrans.app s.π default\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cone (Discrete.functor f)\nm :\n  s.pt ⟶\n    { pt := f default,\n        π :=\n          Discrete.natTrans fun x =>\n            match x with\n            | { as := j } =>\n              eqToHom\n                (_ :\n                  ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                    (Discrete.functor f).obj { as := j }) }.pt\nw :\n  ∀ (j : Discrete β),\n    m ≫\n        NatTrans.app\n          { pt := f default,\n              π :=\n                Discrete.natTrans fun x =>\n                  match x with\n                  | { as := j } =>\n                    eqToHom\n                      (_ :\n                        ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                          (Discrete.functor f).obj { as := j }) }.π\n          j =\n      NatTrans.app s.π j\n⊢ m = (fun s => NatTrans.app s.π default) s\n[PROOFSTEP]\nspecialize w default\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cone (Discrete.functor f)\nm :\n  s.pt ⟶\n    { pt := f default,\n        π :=\n          Discrete.natTrans fun x =>\n            match x with\n            | { as := j } =>\n              eqToHom\n                (_ :\n                  ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                    (Discrete.functor f).obj { as := j }) }.pt\nw :\n  m ≫\n      NatTrans.app\n        { pt := f default,\n            π :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      ((Functor.const (Discrete β)).obj (f default)).obj { as := j } =\n                        (Discrete.functor f).obj { as := j }) }.π\n        default =\n    NatTrans.app s.π default\n⊢ m = (fun s => NatTrans.app s.π default) s\n[PROOFSTEP]\nsimpa using w\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ (Discrete.functor f).obj { as := j } = ((Functor.const (Discrete β)).obj (f default)).obj { as := j }\n[PROOFSTEP]\ndsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ f j = f default\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\nx✝ : Discrete β\nj : β\n⊢ j = default\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\nj : Discrete β\n⊢ NatTrans.app\n        { pt := f default,\n            ι :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      (Discrete.functor f).obj { as := j } =\n                        ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.ι\n        j ≫\n      (fun s => NatTrans.app s.ι default) s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\nhave h := Subsingleton.elim j default\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\nj : Discrete β\nh : j = default\n⊢ NatTrans.app\n        { pt := f default,\n            ι :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      (Discrete.functor f).obj { as := j } =\n                        ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.ι\n        j ≫\n      (fun s => NatTrans.app s.ι default) s =\n    NatTrans.app s.ι j\n[PROOFSTEP]\nsubst h\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\n⊢ NatTrans.app\n        { pt := f default,\n            ι :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      (Discrete.functor f).obj { as := j } =\n                        ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.ι\n        default ≫\n      (fun s => NatTrans.app s.ι default) s =\n    NatTrans.app s.ι default\n[PROOFSTEP]\napply Category.id_comp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\nm :\n  { pt := f default,\n        ι :=\n          Discrete.natTrans fun x =>\n            match x with\n            | { as := j } =>\n              eqToHom\n                (_ :\n                  (Discrete.functor f).obj { as := j } =\n                    ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.pt ⟶\n    s.pt\nw :\n  ∀ (j : Discrete β),\n    NatTrans.app\n          { pt := f default,\n              ι :=\n                Discrete.natTrans fun x =>\n                  match x with\n                  | { as := j } =>\n                    eqToHom\n                      (_ :\n                        (Discrete.functor f).obj { as := j } =\n                          ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\n⊢ m = (fun s => NatTrans.app s.ι default) s\n[PROOFSTEP]\nspecialize w default\n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\nm :\n  { pt := f default,\n        ι :=\n          Discrete.natTrans fun x =>\n            match x with\n            | { as := j } =>\n              eqToHom\n                (_ :\n                  (Discrete.functor f).obj { as := j } =\n                    ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.pt ⟶\n    s.pt\nw :\n  NatTrans.app\n        { pt := f default,\n            ι :=\n              Discrete.natTrans fun x =>\n                match x with\n                | { as := j } =>\n                  eqToHom\n                    (_ :\n                      (Discrete.functor f).obj { as := j } =\n                        ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.ι\n        default ≫\n      m =\n    NatTrans.app s.ι default\n⊢ m = (fun s => NatTrans.app s.ι default) s\n[PROOFSTEP]\nerw [Category.id_comp] at w \n[GOAL]\nβ : Type w\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : Unique β\nf : β → C\ns : Cocone (Discrete.functor f)\nm :\n  { pt := f default,\n        ι :=\n          Discrete.natTrans fun x =>\n            match x with\n            | { as := j } =>\n              eqToHom\n                (_ :\n                  (Discrete.functor f).obj { as := j } =\n                    ((Functor.const (Discrete β)).obj (f default)).obj { as := j }) }.pt ⟶\n    s.pt\nw : m = NatTrans.app s.ι default\n⊢ m = (fun s => NatTrans.app s.ι default) s\n[PROOFSTEP]\nexact w\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct (f ∘ ↑ε)\nb : β\n⊢ (reindex ε f).hom ≫ π f (↑ε b) = π (f ∘ ↑ε) b\n[PROOFSTEP]\ndsimp [Pi.reindex]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct (f ∘ ↑ε)\nb : β\n⊢ (HasLimit.isoOfEquivalence (Discrete.equivalence ε)\n          (Discrete.natIso fun x =>\n            Iso.refl ((Discrete.functor f).obj ((Discrete.functor (Discrete.mk ∘ ↑ε)).obj x)))).hom ≫\n      π f (↑ε b) =\n    π (f ∘ ↑ε) b\n[PROOFSTEP]\nsimp only [HasLimit.isoOfEquivalence_hom_π, Discrete.equivalence_inverse, Discrete.functor_obj, Function.comp_apply,\n  Functor.id_obj, Discrete.equivalence_functor, Functor.comp_obj, Discrete.natIso_inv_app, Iso.refl_inv,\n  Category.id_comp]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct (f ∘ ↑ε)\nb : β\n⊢ limit.π (Discrete.functor (f ∘ ↑ε)) { as := ↑ε.symm (↑ε b) } ≫\n      (Discrete.functor f).map (NatTrans.app (Equivalence.counit (Discrete.equivalence ε)) { as := ↑ε b }) =\n    π (f ∘ ↑ε) b\n[PROOFSTEP]\nexact limit.w (Discrete.functor (f ∘ ε)) (Discrete.eqToHom' (ε.symm_apply_apply b))\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct (f ∘ ↑ε)\nb : β\n⊢ (reindex ε f).inv ≫ π (f ∘ ↑ε) b = π f (↑ε b)\n[PROOFSTEP]\nsimp [Iso.inv_comp_eq]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\n⊢ ι (f ∘ ↑ε) b ≫ (reindex ε f).hom = ι f (↑ε b)\n[PROOFSTEP]\ndsimp [Sigma.reindex]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\n⊢ ι (f ∘ ↑ε) b ≫\n      (HasColimit.isoOfEquivalence (Discrete.equivalence ε)\n          (Discrete.natIso fun x =>\n            Iso.refl ((Discrete.functor f).obj ((Discrete.functor (Discrete.mk ∘ ↑ε)).obj x)))).hom =\n    ι f (↑ε b)\n[PROOFSTEP]\nsimp only [HasColimit.isoOfEquivalence_hom_π, Functor.id_obj, Discrete.functor_obj, Function.comp_apply,\n  Discrete.equivalence_functor, Discrete.equivalence_inverse, Functor.comp_obj, Discrete.natIso_inv_app, Iso.refl_inv,\n  Category.id_comp]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\n⊢ (Discrete.functor (f ∘ ↑ε)).map (NatTrans.app (Equivalence.unit (Discrete.equivalence ε)) { as := b }) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) } =\n    ι f (↑ε b)\n[PROOFSTEP]\nhave h := colimit.w (Discrete.functor f) (Discrete.eqToHom' (ε.apply_symm_apply (ε b)))\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ (Discrete.functor (f ∘ ↑ε)).map (NatTrans.app (Equivalence.unit (Discrete.equivalence ε)) { as := b }) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) } =\n    ι f (↑ε b)\n[PROOFSTEP]\nsimp only [Discrete.functor_obj] at h \n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ (Discrete.functor (f ∘ ↑ε)).map (NatTrans.app (Equivalence.unit (Discrete.equivalence ε)) { as := b }) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) } =\n    ι f (↑ε b)\n[PROOFSTEP]\nerw [← h, eqToHom_map, eqToHom_map, eqToHom_trans_assoc]\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ eqToHom (_ : f (↑ε b) = f (↑ε b)) ≫ colimit.ι (Discrete.functor f) { as := ↑ε b } = ι f (↑ε b)\ncase p\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ { as := b } = { as := ↑ε.symm (↑ε b) }\ncase p\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ { as := b } = { as := ↑ε.symm (↑ε b) }\ncase p\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ { as := b } = { as := ↑ε.symm (↑ε b) }\n[PROOFSTEP]\nall_goals {simp\n}\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ eqToHom (_ : f (↑ε b) = f (↑ε b)) ≫ colimit.ι (Discrete.functor f) { as := ↑ε b } = ι f (↑ε b)\n[PROOFSTEP]\n{simp\n}\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ eqToHom (_ : f (↑ε b) = f (↑ε b)) ≫ colimit.ι (Discrete.functor f) { as := ↑ε b } = ι f (↑ε b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase p\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ { as := b } = { as := ↑ε.symm (↑ε b) }\n[PROOFSTEP]\n{simp\n}\n[GOAL]\ncase p\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\nh :\n  (Discrete.functor f).map (Discrete.eqToHom' (_ : ↑ε (↑ε.symm (↑ε b)) = ↑ε b)) ≫\n      colimit.ι (Discrete.functor f) { as := ↑ε b } =\n    colimit.ι (Discrete.functor f) { as := ↑ε (↑ε.symm (↑ε b)) }\n⊢ { as := b } = { as := ↑ε.symm (↑ε b) }\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type w\nC : Type u\ninst✝² : Category.{v, u} C\nγ : Type v\nε : β ≃ γ\nf : γ → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct (f ∘ ↑ε)\nb : β\n⊢ ι f (↑ε b) ≫ (reindex ε f).inv = ι (f ∘ ↑ε) b\n[PROOFSTEP]\nsimp [Iso.comp_inv_eq]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Products", "llama_tokens": 9589, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5926665999540698, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.2824528414032058}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nP Q : IsKernelPair f a b\n⊢ P = Q\n[PROOFSTEP]\ncases P\n[GOAL]\ncase mk\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nQ : IsKernelPair f a b\ntoCommSq✝ : CommSq a b f f\nisLimit'✝ : Nonempty (IsLimit (PullbackCone.mk a b (_ : a ≫ f = b ≫ f)))\n⊢ (_ : IsPullback a b f f) = Q\n[PROOFSTEP]\ncases Q\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ntoCommSq✝¹ : CommSq a b f f\nisLimit'✝¹ : Nonempty (IsLimit (PullbackCone.mk a b (_ : a ≫ f = b ≫ f)))\ntoCommSq✝ : CommSq a b f f\nisLimit'✝ : Nonempty (IsLimit (PullbackCone.mk a b (_ : a ≫ f = b ≫ f)))\n⊢ (_ : IsPullback a b f f) = (_ : IsPullback a b f f)\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nS : C\nk : IsKernelPair f a b\np q : S ⟶ X\nw : p ≫ f = q ≫ f\n⊢ lift k p q w ≫ a = p ∧ lift k p q w ≫ b = q\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\n⊢ { l //\n    l ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s ∧\n      l ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s ∧\n        ∀ {m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt},\n          m ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s →\n            m ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s → m = l }\n[PROOFSTEP]\nlet s' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) := PullbackCone.mk s.fst s.snd (s.condition_assoc _)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\n⊢ { l //\n    l ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s ∧\n      l ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s ∧\n        ∀ {m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt},\n          m ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s →\n            m ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s → m = l }\n[PROOFSTEP]\nrefine'\n  ⟨big_k.isLimit.lift s', big_k.isLimit.fac _ WalkingCospan.left, big_k.isLimit.fac _ WalkingCospan.right, fun m₁ m₂ =>\n    _⟩\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\nm✝ : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt\nm₁ : m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s\nm₂ : m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s\n⊢ m✝ = IsLimit.lift (IsPullback.isLimit big_k) s'\n[PROOFSTEP]\napply big_k.isLimit.hom_ext\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\nm✝ : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt\nm₁ : m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s\nm₂ : m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s\n⊢ ∀ (j : WalkingCospan),\n    m✝ ≫ NatTrans.app (IsPullback.cone big_k).π j =\n      IsLimit.lift (IsPullback.isLimit big_k) s' ≫ NatTrans.app (IsPullback.cone big_k).π j\n[PROOFSTEP]\nrefine' (PullbackCone.mk a b _ : PullbackCone (f₁ ≫ f₂) _).equalizer_ext _ _\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\nm✝ : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt\nm₁ : m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s\nm₂ : m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s\n⊢ a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂\n[PROOFSTEP]\napply reassoc_of% comm\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\nm✝ : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt\nm₁ : m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s\nm₂ : m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s\n⊢ m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =\n    IsLimit.lift (IsPullback.isLimit big_k) s' ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂))\n[PROOFSTEP]\napply m₁.trans (big_k.isLimit.fac s' WalkingCospan.left).symm\n[GOAL]\ncase refine'_3\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ncomm : a ≫ f₁ = b ≫ f₁\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\ns : PullbackCone f₁ f₁\ns' : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂) :=\n  PullbackCone.mk (PullbackCone.fst s) (PullbackCone.snd s)\n    (_ : PullbackCone.fst s ≫ f₁ ≫ f₂ = PullbackCone.snd s ≫ f₁ ≫ f₂)\nm✝ : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)).pt\nm₁ : m✝ ≫ PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.fst s\nm₂ : m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ = b ≫ f₁)) = PullbackCone.snd s\n⊢ m✝ ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =\n    IsLimit.lift (IsPullback.isLimit big_k) s' ≫ PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂))\n[PROOFSTEP]\napply m₂.trans (big_k.isLimit.fac s' WalkingCospan.right).symm\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nbig_k : IsKernelPair (f₁ ≫ f₂) a b\n⊢ a ≫ f₁ = b ≫ f₁\n[PROOFSTEP]\nrw [← cancel_mono f₂, assoc, assoc, big_k.w]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\n⊢ a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂\n[PROOFSTEP]\nrw [small_k.w_assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\n⊢ IsLimit (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂))\n[PROOFSTEP]\nrefine'\n  PullbackCone.isLimitAux _ (fun s => small_k.lift s.fst s.snd (by rw [← cancel_mono f₂, assoc, s.condition, assoc]))\n    (by simp) (by simp) _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\n⊢ PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁\n[PROOFSTEP]\nrw [← cancel_mono f₂, assoc, s.condition, assoc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\n⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)),\n    (fun s =>\n            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n          s ≫\n        PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =\n      PullbackCone.fst s\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\n⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)),\n    (fun s =>\n            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n          s ≫\n        PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =\n      PullbackCone.snd s\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\n⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)) (m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt),\n    (∀ (j : WalkingCospan),\n        m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j) →\n      m =\n        (fun s =>\n            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n          s\n[PROOFSTEP]\nintro s m hm\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ m =\n    (fun s =>\n        lift small_k (PullbackCone.fst s) (PullbackCone.snd s) (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n      s\n[PROOFSTEP]\napply small_k.isLimit.hom_ext\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ ∀ (j : WalkingCospan),\n    m ≫ NatTrans.app (IsPullback.cone small_k).π j =\n      (fun s =>\n            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n          s ≫\n        NatTrans.app (IsPullback.cone small_k).π j\n[PROOFSTEP]\napply PullbackCone.equalizer_ext small_k.cone _ _\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ m ≫ PullbackCone.fst (IsPullback.cone small_k) =\n    (fun s =>\n          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n        s ≫\n      PullbackCone.fst (IsPullback.cone small_k)\n[PROOFSTEP]\nexact (hm WalkingCospan.left).trans (by simp)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ NatTrans.app s.π WalkingCospan.left =\n    (fun s =>\n          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n        s ≫\n      PullbackCone.fst (IsPullback.cone small_k)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ m ≫ PullbackCone.snd (IsPullback.cone small_k) =\n    (fun s =>\n          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n        s ≫\n      PullbackCone.snd (IsPullback.cone small_k)\n[PROOFSTEP]\nexact (hm WalkingCospan.right).trans (by simp)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nf₁ : X ⟶ Y\nf₂ : Y ⟶ Z\ninst✝ : Mono f₂\nsmall_k : IsKernelPair f₁ a b\ns : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)\nm : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt\nhm :\n  ∀ (j : WalkingCospan), m ≫ NatTrans.app (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π j = NatTrans.app s.π j\n⊢ NatTrans.app s.π WalkingCospan.right =\n    (fun s =>\n          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)\n            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))\n        s ≫\n      PullbackCone.snd (IsPullback.cone small_k)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\n⊢ IsColimit (Cofork.ofπ f (_ : a ≫ f = b ≫ f))\n[PROOFSTEP]\nlet t := k.isLimit.lift (PullbackCone.mk _ _ r.w)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\n⊢ IsColimit (Cofork.ofπ f (_ : a ≫ f = b ≫ f))\n[PROOFSTEP]\nhave ht : t ≫ a = r.left := k.isLimit.fac _ WalkingCospan.left\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\n⊢ IsColimit (Cofork.ofπ f (_ : a ≫ f = b ≫ f))\n[PROOFSTEP]\nhave kt : t ≫ b = r.right := k.isLimit.fac _ WalkingCospan.right\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\nkt : t ≫ b = RegularEpi.right\n⊢ IsColimit (Cofork.ofπ f (_ : a ≫ f = b ≫ f))\n[PROOFSTEP]\nrefine'\n  Cofork.IsColimit.mk _\n    (fun s => Cofork.IsColimit.desc r.isColimit s.π (by rw [← ht, assoc, s.condition, reassoc_of% kt])) (fun s => _)\n    (fun s m w => _)\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\nkt : t ≫ b = RegularEpi.right\ns : Cofork a b\n⊢ RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s\n[PROOFSTEP]\nrw [← ht, assoc, s.condition, reassoc_of% kt]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\nkt : t ≫ b = RegularEpi.right\ns : Cofork a b\n⊢ Cofork.π (Cofork.ofπ f (_ : a ≫ f = b ≫ f)) ≫\n      (fun s =>\n          Cofork.IsColimit.desc RegularEpi.isColimit (Cofork.π s)\n            (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n        s =\n    Cofork.π s\n[PROOFSTEP]\napply Cofork.IsColimit.π_desc' r.isColimit\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\nkt : t ≫ b = RegularEpi.right\ns : Cofork a b\nm : (Cofork.ofπ f (_ : a ≫ f = b ≫ f)).pt ⟶ s.pt\nw : Cofork.π (Cofork.ofπ f (_ : a ≫ f = b ≫ f)) ≫ m = Cofork.π s\n⊢ m =\n    (fun s =>\n        Cofork.IsColimit.desc RegularEpi.isColimit (Cofork.π s)\n          (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n      s\n[PROOFSTEP]\napply Cofork.IsColimit.hom_ext r.isColimit\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nk : IsKernelPair f a b\nr : RegularEpi f\nt : (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)).pt ⟶\n  (IsPullback.cone k).pt :=\n  IsLimit.lift (IsPullback.isLimit k)\n    (PullbackCone.mk RegularEpi.left RegularEpi.right (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f))\nht : t ≫ a = RegularEpi.left\nkt : t ≫ b = RegularEpi.right\ns : Cofork a b\nm : (Cofork.ofπ f (_ : a ≫ f = b ≫ f)).pt ⟶ s.pt\nw : Cofork.π (Cofork.ofπ f (_ : a ≫ f = b ≫ f)) ≫ m = Cofork.π s\n⊢ Cofork.π (Cofork.ofπ f (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)) ≫ m =\n    Cofork.π (Cofork.ofπ f (_ : RegularEpi.left ≫ f = RegularEpi.right ≫ f)) ≫\n      (fun s =>\n          Cofork.IsColimit.desc RegularEpi.isColimit (Cofork.π s)\n            (_ : RegularEpi.left ≫ Cofork.π s = RegularEpi.right ≫ Cofork.π s))\n        s\n[PROOFSTEP]\nexact w.trans (Cofork.IsColimit.π_desc' r.isColimit _ _).symm\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\n⊢ f ≫ 𝟙 Z = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\n⊢ f ≫ 𝟙 Z = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\n⊢ IsKernelPair pullback.fst\n    (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n    (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n[PROOFSTEP]\nrefine'\n  ⟨⟨by rw [pullback.lift_fst, pullback.lift_fst]⟩,\n    ⟨PullbackCone.isLimitAux _\n        (fun s => pullback.lift (s.fst ≫ pullback.fst) (h.lift (s.fst ≫ pullback.snd) (s.snd ≫ pullback.snd) _) _)\n        (fun s => _) (fun s => _) (fun s m hm => _)⟩⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\n⊢ pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫ pullback.fst =\n    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫ pullback.fst\n[PROOFSTEP]\nrw [pullback.lift_fst, pullback.lift_fst]\n[GOAL]\ncase refine'_1\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g\n[PROOFSTEP]\nsimp_rw [Category.assoc, ← pullback.condition, ← Category.assoc, s.condition]\n[GOAL]\ncase refine'_2\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n    lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n        (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n      a₁ ≫ g\n[PROOFSTEP]\nsimp only [assoc, lift_fst_assoc, pullback.condition]\n[GOAL]\ncase refine'_3\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ (fun s =>\n          pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n            (_ :\n              (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                  a₁ ≫ g))\n        s ≫\n      PullbackCone.fst\n        (PullbackCone.mk\n          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n          (_ :\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                pullback.fst =\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                pullback.fst)) =\n    PullbackCone.fst s\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_3.h₀\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        PullbackCone.fst\n          (PullbackCone.mk\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n            (_ :\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                  pullback.fst =\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                  pullback.fst))) ≫\n      pullback.fst =\n    PullbackCone.fst s ≫ pullback.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3.h₁\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        PullbackCone.fst\n          (PullbackCone.mk\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n            (_ :\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                  pullback.fst =\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                  pullback.fst))) ≫\n      pullback.snd =\n    PullbackCone.fst s ≫ pullback.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_4\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ (fun s =>\n          pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n            (_ :\n              (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                  a₁ ≫ g))\n        s ≫\n      PullbackCone.snd\n        (PullbackCone.mk\n          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n          (_ :\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                pullback.fst =\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                pullback.fst)) =\n    PullbackCone.snd s\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_4.h₀\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        PullbackCone.snd\n          (PullbackCone.mk\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n            (_ :\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                  pullback.fst =\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                  pullback.fst))) ≫\n      pullback.fst =\n    PullbackCone.snd s ≫ pullback.fst\n[PROOFSTEP]\nsimp [s.condition]\n[GOAL]\ncase refine'_4.h₁\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\n⊢ ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        PullbackCone.snd\n          (PullbackCone.mk\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n            (_ :\n              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                  pullback.fst =\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                  pullback.fst))) ≫\n      pullback.snd =\n    PullbackCone.snd s ≫ pullback.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_5\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\nm :\n  s.pt ⟶\n    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n        (_ :\n          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n              pullback.fst =\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n              pullback.fst)).pt\nhm :\n  ∀ (j : WalkingCospan),\n    m ≫\n        NatTrans.app\n          (PullbackCone.mk\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n              (_ :\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                    pullback.fst =\n                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                    pullback.fst)).π\n          j =\n      NatTrans.app s.π j\n⊢ m =\n    (fun s =>\n        pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n          (_ :\n            (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                a₁ ≫ g))\n      s\n[PROOFSTEP]\napply pullback.hom_ext\n[GOAL]\ncase refine'_5.h₀\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\nm :\n  s.pt ⟶\n    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n        (_ :\n          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n              pullback.fst =\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n              pullback.fst)).pt\nhm :\n  ∀ (j : WalkingCospan),\n    m ≫\n        NatTrans.app\n          (PullbackCone.mk\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n              (_ :\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                    pullback.fst =\n                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                    pullback.fst)).π\n          j =\n      NatTrans.app s.π j\n⊢ m ≫ pullback.fst =\n    (fun s =>\n          pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n            (_ :\n              (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                  a₁ ≫ g))\n        s ≫\n      pullback.fst\n[PROOFSTEP]\nsimpa using hm WalkingCospan.left =≫ pullback.fst\n[GOAL]\ncase refine'_5.h₁\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\nm :\n  s.pt ⟶\n    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n        (_ :\n          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n              pullback.fst =\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n              pullback.fst)).pt\nhm :\n  ∀ (j : WalkingCospan),\n    m ≫\n        NatTrans.app\n          (PullbackCone.mk\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n              (_ :\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                    pullback.fst =\n                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                    pullback.fst)).π\n          j =\n      NatTrans.app s.π j\n⊢ m ≫ pullback.snd =\n    (fun s =>\n          pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n            (_ :\n              (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                  a₁ ≫ g))\n        s ≫\n      pullback.snd\n[PROOFSTEP]\napply PullbackCone.IsLimit.hom_ext h.isLimit\n[GOAL]\ncase refine'_5.h₁.h₀\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\nm :\n  s.pt ⟶\n    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n        (_ :\n          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n              pullback.fst =\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n              pullback.fst)).pt\nhm :\n  ∀ (j : WalkingCospan),\n    m ≫\n        NatTrans.app\n          (PullbackCone.mk\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n              (_ :\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                    pullback.fst =\n                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                    pullback.fst)).π\n          j =\n      NatTrans.app s.π j\n⊢ (m ≫ pullback.snd) ≫ PullbackCone.fst (IsPullback.cone h) =\n    ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        pullback.snd) ≫\n      PullbackCone.fst (IsPullback.cone h)\n[PROOFSTEP]\nsimpa using hm WalkingCospan.left =≫ pullback.snd\n[GOAL]\ncase refine'_5.h₁.h₁\nC : Type u\ninst✝² : Category.{v, u} C\nR X✝ Y✝ Z✝ : C\nf✝ : X✝ ⟶ Y✝\na b : R ⟶ X✝\nX Y Z A : C\ng : Y ⟶ Z\na₁ a₂ : A ⟶ Y\nh : IsKernelPair g a₁ a₂\nf : X ⟶ Z\ninst✝¹ : HasPullback f g\ninst✝ : HasPullback f (a₁ ≫ g)\ns : PullbackCone pullback.fst pullback.fst\nm :\n  s.pt ⟶\n    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n        (_ :\n          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n              pullback.fst =\n            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n              pullback.fst)).pt\nhm :\n  ∀ (j : WalkingCospan),\n    m ≫\n        NatTrans.app\n          (PullbackCone.mk\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))\n              (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))\n              (_ :\n                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫\n                    pullback.fst =\n                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫\n                    pullback.fst)).π\n          j =\n      NatTrans.app s.π j\n⊢ (m ≫ pullback.snd) ≫ PullbackCone.snd (IsPullback.cone h) =\n    ((fun s =>\n            pullback.lift (PullbackCone.fst s ≫ pullback.fst)\n              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))\n              (_ :\n                (PullbackCone.fst s ≫ pullback.fst) ≫ f =\n                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)\n                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫\n                    a₁ ≫ g))\n          s ≫\n        pullback.snd) ≫\n      PullbackCone.snd (IsPullback.cone h)\n[PROOFSTEP]\nsimpa using hm WalkingCospan.right =≫ pullback.snd\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\n⊢ Mono f\n[PROOFSTEP]\nobtain ⟨l, h₁, h₂⟩ := Limits.PullbackCone.IsLimit.lift' h.isLimit (𝟙 _) (𝟙 _) (by simp [h.w])\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\n⊢ 𝟙 X ≫ f = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp [h.w]\n[GOAL]\ncase mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l ≫ PullbackCone.fst (IsPullback.cone h) = 𝟙 X\nh₂ : l ≫ PullbackCone.snd (IsPullback.cone h) = 𝟙 X\n⊢ Mono f\n[PROOFSTEP]\nrw [IsPullback.cone_fst, ← IsIso.eq_comp_inv, Category.id_comp] at h₁ \n[GOAL]\ncase mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l = inv a\nh₂ : l ≫ PullbackCone.snd (IsPullback.cone h) = 𝟙 X\n⊢ Mono f\n[PROOFSTEP]\nrw [h₁, IsIso.inv_comp_eq, Category.comp_id] at h₂ \n[GOAL]\ncase mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l = inv a\nh₂ : PullbackCone.snd (IsPullback.cone h) = a\n⊢ Mono f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.intro.right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l = inv a\nh₂ : PullbackCone.snd (IsPullback.cone h) = a\n⊢ ∀ {Z : C} (g h : Z ⟶ X), g ≫ f = h ≫ f → g = h\n[PROOFSTEP]\nintro Z g₁ g₂ e\n[GOAL]\ncase mk.intro.right_cancellation\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z✝ : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l = inv a\nh₂ : PullbackCone.snd (IsPullback.cone h) = a\nZ : C\ng₁ g₂ : Z ⟶ X\ne : g₁ ≫ f = g₂ ≫ f\n⊢ g₁ = g₂\n[PROOFSTEP]\nobtain ⟨l', rfl, rfl⟩ := Limits.PullbackCone.IsLimit.lift' h.isLimit _ _ e\n[GOAL]\ncase mk.intro.right_cancellation.mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z✝ : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : IsIso a\nl : X ⟶ (IsPullback.cone h).pt\nh₁ : l = inv a\nh₂ : PullbackCone.snd (IsPullback.cone h) = a\nZ : C\nl' : Z ⟶ (IsPullback.cone h).pt\ne : (l' ≫ PullbackCone.fst (IsPullback.cone h)) ≫ f = (l' ≫ PullbackCone.snd (IsPullback.cone h)) ≫ f\n⊢ l' ≫ PullbackCone.fst (IsPullback.cone h) = l' ≫ PullbackCone.snd (IsPullback.cone h)\n[PROOFSTEP]\nrw [IsPullback.cone_fst, h₂]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : Mono f\n⊢ IsIso a\n[PROOFSTEP]\nrw [←\n  show _ = a from\n    (Category.comp_id _).symm.trans\n      ((IsKernelPair.id_of_mono f).isLimit.conePointUniqueUpToIso_inv_comp h.isLimit WalkingCospan.left)]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\nh : IsKernelPair f a b\ninst✝ : Mono f\n⊢ IsIso\n    (IsLimit.conePointUniqueUpToIso (IsPullback.isLimit (_ : IsKernelPair f (𝟙 X) (𝟙 X))) (IsPullback.isLimit h)).inv\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ IsKernelPair f a a\n[PROOFSTEP]\nchange IsPullback _ _ _ _\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ IsPullback a a f f\n[PROOFSTEP]\nconvert (IsPullback.of_horiz_isIso ⟨(rfl : a ≫ 𝟙 X = _)⟩).paste_vert (IsKernelPair.id_of_mono f)\n[GOAL]\ncase h.e'_8\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ a = a ≫ 𝟙 X\ncase h.e'_9\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ f = 𝟙 X ≫ f\n[PROOFSTEP]\nall_goals {simp\n}\n[GOAL]\ncase h.e'_8\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ a = a ≫ 𝟙 X\n[PROOFSTEP]\n{simp\n}\n[GOAL]\ncase h.e'_8\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ a = a ≫ 𝟙 X\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_9\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ f = 𝟙 X ≫ f\n[PROOFSTEP]\n{simp\n}\n[GOAL]\ncase h.e'_9\nC : Type u\ninst✝² : Category.{v, u} C\nR X Y Z : C\nf : X ⟶ Y\na b : R ⟶ X\ninst✝¹ : IsIso a\ninst✝ : Mono f\n⊢ f = 𝟙 X ≫ f\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.KernelPair", "llama_tokens": 24843, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6992544335934766, "lm_q2_score": 0.40356685373537454, "lm_q1q2_score": 0.28219591172583075}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\ninst✝ : Abelian D\nJ : GrothendieckTopology C\nj : ℕ\nF : Discrete (Fin j) ⥤ Sheaf J D\n⊢ HasLimit F\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.Abelian", "llama_tokens": 103, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6926419831347362, "lm_q2_score": 0.4073334000459302, "lm_q1q2_score": 0.28213621400482797}}
{"text": "[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\n⊢ ∀ ⦃X Y : Discrete WalkingPair⦄ (f : X ⟶ Y),\n    ((Functor.const (Discrete WalkingPair)).obj (of R (↑M × ↑N))).map f ≫\n        (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N)) Y =\n      (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N)) X ≫\n        (pair M N).map f\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ ⟨⟨⟨⟩⟩⟩\n[GOAL]\ncase mk.left.mk.left.up.up.refl\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\n⊢ ((Functor.const (Discrete WalkingPair)).obj (of R (↑M × ↑N))).map\n        { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } } ≫\n      (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N))\n        { as := WalkingPair.left } =\n    (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N))\n        { as := WalkingPair.left } ≫\n      (pair M N).map { down := { down := (_ : { as := WalkingPair.left }.as = { as := WalkingPair.left }.as) } }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.right.mk.right.up.up.refl\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\n⊢ ((Functor.const (Discrete WalkingPair)).obj (of R (↑M × ↑N))).map\n        { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } } ≫\n      (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N))\n        { as := WalkingPair.right } =\n    (fun j => Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N))\n        { as := WalkingPair.right } ≫\n      (pair M N).map { down := { down := (_ : { as := WalkingPair.right }.as = { as := WalkingPair.right }.as) } }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\n⊢ ∀ (s : Cone (pair M N)) (j : Discrete WalkingPair),\n    (fun s =>\n            LinearMap.prod (NatTrans.app s.π { as := WalkingPair.left }) (NatTrans.app s.π { as := WalkingPair.right }))\n          s ≫\n        NatTrans.app\n          { pt := of R (↑M × ↑N),\n              π :=\n                NatTrans.mk fun j =>\n                  Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.π\n          j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nrintro s (⟨⟩ | ⟨⟩)\n[GOAL]\ncase mk.left\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ns : Cone (pair M N)\n⊢ (fun s => LinearMap.prod (NatTrans.app s.π { as := WalkingPair.left }) (NatTrans.app s.π { as := WalkingPair.right }))\n        s ≫\n      NatTrans.app\n        { pt := of R (↑M × ↑N),\n            π :=\n              NatTrans.mk fun j =>\n                Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.π\n        { as := WalkingPair.left } =\n    NatTrans.app s.π { as := WalkingPair.left }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.right\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ns : Cone (pair M N)\n⊢ (fun s => LinearMap.prod (NatTrans.app s.π { as := WalkingPair.left }) (NatTrans.app s.π { as := WalkingPair.right }))\n        s ≫\n      NatTrans.app\n        { pt := of R (↑M × ↑N),\n            π :=\n              NatTrans.mk fun j =>\n                Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.π\n        { as := WalkingPair.right } =\n    NatTrans.app s.π { as := WalkingPair.right }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ns : Cone (pair M N)\nm :\n  s.pt ⟶\n    { pt := of R (↑M × ↑N),\n        π :=\n          NatTrans.mk fun j =>\n            Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.pt\nw :\n  ∀ (j : Discrete WalkingPair),\n    m ≫\n        NatTrans.app\n          { pt := of R (↑M × ↑N),\n              π :=\n                NatTrans.mk fun j =>\n                  Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.π\n          j =\n      NatTrans.app s.π j\n⊢ m =\n    (fun s =>\n        LinearMap.prod (NatTrans.app s.π { as := WalkingPair.left }) (NatTrans.app s.π { as := WalkingPair.right }))\n      s\n[PROOFSTEP]\nsimp_rw [← w ⟨WalkingPair.left⟩, ← w ⟨WalkingPair.right⟩]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nM N : ModuleCat R\ns : Cone (pair M N)\nm :\n  s.pt ⟶\n    { pt := of R (↑M × ↑N),\n        π :=\n          NatTrans.mk fun j =>\n            Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.pt\nw :\n  ∀ (j : Discrete WalkingPair),\n    m ≫\n        NatTrans.app\n          { pt := of R (↑M × ↑N),\n              π :=\n                NatTrans.mk fun j =>\n                  Discrete.casesOn j fun j => WalkingPair.casesOn j (LinearMap.fst R ↑M ↑N) (LinearMap.snd R ↑M ↑N) }.π\n          j =\n      NatTrans.app s.π j\n⊢ m = LinearMap.prod (m ≫ LinearMap.fst R ↑M ↑N) (m ≫ LinearMap.snd R ↑M ↑N)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Fan f\nx y : ↑s.pt\n⊢ (fun x j => ↑(NatTrans.app s.π { as := j }) x) (x + y) =\n    (fun x j => ↑(NatTrans.app s.π { as := j }) x) x + (fun x j => ↑(NatTrans.app s.π { as := j }) x) y\n[PROOFSTEP]\nsimp only [Functor.const_obj_obj, map_add]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Fan f\nx y : ↑s.pt\n⊢ (fun j => ↑(NatTrans.app s.π { as := j }) x + ↑(NatTrans.app s.π { as := j }) y) =\n    (fun j => ↑(NatTrans.app s.π { as := j }) x) + fun j => ↑(NatTrans.app s.π { as := j }) y\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Fan f\nr : R\nx : ↑s.pt\n⊢ AddHom.toFun\n      { toFun := fun x j => ↑(NatTrans.app s.π { as := j }) x,\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑s.pt),\n              (fun x j => ↑(NatTrans.app s.π { as := j }) x) (x + y) =\n                (fun x j => ↑(NatTrans.app s.π { as := j }) x) x + (fun x j => ↑(NatTrans.app s.π { as := j }) x) y) }\n      (r • x) =\n    ↑(RingHom.id R) r •\n      AddHom.toFun\n        { toFun := fun x j => ↑(NatTrans.app s.π { as := j }) x,\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑s.pt),\n                (fun x j => ↑(NatTrans.app s.π { as := j }) x) (x + y) =\n                  (fun x j => ↑(NatTrans.app s.π { as := j }) x) x + (fun x j => ↑(NatTrans.app s.π { as := j }) x) y) }\n        x\n[PROOFSTEP]\nsimp only [Functor.const_obj_obj, map_smul]\n[GOAL]\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Fan f\nr : R\nx : ↑s.pt\n⊢ (fun j => r • ↑(NatTrans.app s.π { as := j }) x) = ↑(RingHom.id R) r • fun j => ↑(NatTrans.app s.π { as := j }) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Cone (Discrete.functor f)\nm : s.pt ⟶ { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.pt\nw :\n  ∀ (j : Discrete J),\n    m ≫ NatTrans.app { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.π j =\n      NatTrans.app s.π j\n⊢ m = lift f s\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Cone (Discrete.functor f)\nm : s.pt ⟶ { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.pt\nw :\n  ∀ (j : Discrete J),\n    m ≫ NatTrans.app { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.π j =\n      NatTrans.app s.π j\nx : ↑s.pt\n⊢ ↑m x = ↑(lift f s) x\n[PROOFSTEP]\nfunext j\n[GOAL]\ncase h.h\nR : Type u\ninst✝ : Ring R\nJ : Type w\nf : J → ModuleCat R\ns : Cone (Discrete.functor f)\nm : s.pt ⟶ { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.pt\nw :\n  ∀ (j : Discrete J),\n    m ≫ NatTrans.app { pt := of R ((j : J) → ↑(f j)), π := Discrete.natTrans fun j => LinearMap.proj j.as }.π j =\n      NatTrans.app s.π j\nx : ↑s.pt\nj : J\n⊢ ↑m x j = ↑(lift f s) x j\n[PROOFSTEP]\nexact congr_arg (fun g : s.pt ⟶ f j => (g : s.pt → f j) x) (w ⟨j⟩)\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Biproducts", "llama_tokens": 3486, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6442251064863697, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.28205689033908166}}
{"text": "[GOAL]\nα : Type v\ninst✝ : Fintype α\n⊢ Small.{w, v} α\n[PROOFSTEP]\nrw [small_congr (Fintype.equivFin α)]\n[GOAL]\nα : Type v\ninst✝ : Fintype α\n⊢ Small.{w, 0} (Fin (Fintype.card α))\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Small", "llama_tokens": 105, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5774953651858118, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.28198139768053615}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasZeroObject C\ninst✝ : HasZeroMorphisms C\nE✝ X✝ : C\nf : 0 ⟶ X✝\ne : E✝ ⟶ X✝\nx✝ : Epi e\n⊢ 0 ≫ e = f\n[PROOFSTEP]\next\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nP Q : C\ni : P ≅ Q\nhP : Projective P\nE✝ X✝ : C\nf : Q ⟶ X✝\ne : E✝ ⟶ X✝\ne_epi : Epi e\nf' : P ⟶ E✝\nhf' : f' ≫ e = i.hom ≫ f\n⊢ (i.inv ≫ f') ≫ e = f\n[PROOFSTEP]\nsimp [hf']\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nP Q : C\ninst✝² : HasBinaryCoproduct P Q\ninst✝¹ : Projective P\ninst✝ : Projective Q\nE✝ X✝ : C\nf : P ⨿ Q ⟶ X✝\ne : E✝ ⟶ X✝\nepi : Epi e\n⊢ coprod.desc (factorThru (coprod.inl ≫ f) e) (factorThru (coprod.inr ≫ f) e) ≫ e = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nβ : Type v\ng : β → C\ninst✝¹ : HasCoproduct g\ninst✝ : ∀ (b : β), Projective (g b)\nE✝ X✝ : C\nf : ∐ g ⟶ X✝\ne : E✝ ⟶ X✝\nepi : Epi e\n⊢ (Sigma.desc fun b => factorThru (Sigma.ι g b ≫ f) e) ≫ e = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Projective P\ninst✝ : Projective Q\nE✝ X✝ : C\nf : P ⊞ Q ⟶ X✝\ne : E✝ ⟶ X✝\nepi : Epi e\n⊢ biprod.desc (factorThru (biprod.inl ≫ f) e) (factorThru (biprod.inr ≫ f) e) ≫ e = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nβ : Type v\ng : β → C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBiproduct g\ninst✝ : ∀ (b : β), Projective (g b)\nE✝ X✝ : C\nf : ⨁ g ⟶ X✝\ne : E✝ ⟶ X✝\nepi : Epi e\n⊢ (biproduct.desc fun b => factorThru (biproduct.ι g b ≫ f) e) ≫ e = f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesEpimorphisms G\nP : C\nhP : Projective P\nE✝ X✝ : D\nf : F.obj P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nrcases hP.factors (adj.unit.app P ≫ G.map f) (G.map g) with ⟨f', hf'⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesEpimorphisms G\nP : C\nhP : Projective P\nE✝ X✝ : D\nf : F.obj P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nf' : P ⟶ G.obj E✝\nhf' : f' ≫ G.map g = NatTrans.app adj.unit P ≫ G.map f\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nuse F.map f' ≫ adj.counit.app _\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesEpimorphisms G\nP : C\nhP : Projective P\nE✝ X✝ : D\nf : F.obj P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nf' : P ⟶ G.obj E✝\nhf' : f' ≫ G.map g = NatTrans.app adj.unit P ≫ G.map f\n⊢ (F.map f' ≫ NatTrans.app adj.counit E✝) ≫ g = f\n[PROOFSTEP]\nrw [Category.assoc, ← Adjunction.counit_naturality, ← Category.assoc, ← F.map_comp, hf']\n[GOAL]\ncase h\nC : Type u\ninst✝² : Category.{v, u} C\nD : Type u'\ninst✝¹ : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesEpimorphisms G\nP : C\nhP : Projective P\nE✝ X✝ : D\nf : F.obj P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nf' : P ⟶ G.obj E✝\nhf' : f' ≫ G.map g = NatTrans.app adj.unit P ≫ G.map f\n⊢ F.map (NatTrans.app adj.unit P ≫ G.map f) ≫ NatTrans.app adj.counit X✝ = 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\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full F\ninst✝ : Faithful F\nP : C\nhP : Projective (F.obj P)\nE✝ X✝ : C\nf : P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nhaveI := Adjunction.leftAdjointPreservesColimits.{0, 0} adj\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full F\ninst✝ : Faithful F\nP : C\nhP : Projective (F.obj P)\nE✝ X✝ : C\nf : P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nthis : PreservesColimitsOfSize.{0, 0, v, v', u, u'} F\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nrcases(@hP).1 (F.map f) (F.map g) with ⟨f', hf'⟩\n[GOAL]\ncase intro\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full F\ninst✝ : Faithful F\nP : C\nhP : Projective (F.obj P)\nE✝ X✝ : C\nf : P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nthis : PreservesColimitsOfSize.{0, 0, v, v', u, u'} F\nf' : F.obj P ⟶ F.obj E✝\nhf' : f' ≫ F.map g = F.map f\n⊢ ∃ f', f' ≫ g = f\n[PROOFSTEP]\nuse adj.unit.app _ ≫ G.map f' ≫ (inv <| adj.unit.app _)\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full F\ninst✝ : Faithful F\nP : C\nhP : Projective (F.obj P)\nE✝ X✝ : C\nf : P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nthis : PreservesColimitsOfSize.{0, 0, v, v', u, u'} F\nf' : F.obj P ⟶ F.obj E✝\nhf' : f' ≫ F.map g = F.map f\n⊢ (NatTrans.app adj.unit P ≫ G.map f' ≫ inv (NatTrans.app adj.unit E✝)) ≫ g = f\n[PROOFSTEP]\nrefine' Faithful.map_injective (F := F) _\n[GOAL]\ncase h\nC : Type u\ninst✝³ : Category.{v, u} C\nD : Type u'\ninst✝² : Category.{v', u'} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full F\ninst✝ : Faithful F\nP : C\nhP : Projective (F.obj P)\nE✝ X✝ : C\nf : P ⟶ X✝\ng : E✝ ⟶ X✝\nx✝ : Epi g\nthis : PreservesColimitsOfSize.{0, 0, v, v', u, u'} F\nf' : F.obj P ⟶ F.obj E✝\nhf' : f' ≫ F.map g = F.map f\n⊢ F.map ((NatTrans.app adj.unit P ≫ G.map f' ≫ inv (NatTrans.app adj.unit E✝)) ≫ g) = F.map f\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\n⊢ EnoughProjectives C ↔ EnoughProjectives D\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\n⊢ EnoughProjectives C → EnoughProjectives D\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\n⊢ EnoughProjectives D → EnoughProjectives C\n[PROOFSTEP]\nall_goals intro H; constructor; intro X; constructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\n⊢ EnoughProjectives C → EnoughProjectives D\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives C\n⊢ EnoughProjectives D\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.presentation\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives C\n⊢ ∀ (X : D), Nonempty (ProjectivePresentation X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase mp.presentation\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives C\nX : D\n⊢ Nonempty (ProjectivePresentation X)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\n⊢ EnoughProjectives D → EnoughProjectives C\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives D\n⊢ EnoughProjectives C\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.presentation\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives D\n⊢ ∀ (X : C), Nonempty (ProjectivePresentation X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase mpr.presentation\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives D\nX : C\n⊢ Nonempty (ProjectivePresentation X)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.presentation.val\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives C\nX : D\n⊢ ProjectivePresentation X\n[PROOFSTEP]\nexact F.symm.projectivePresentationOfMapProjectivePresentation _ (Nonempty.some (H.presentation (F.inverse.obj X)))\n[GOAL]\ncase mpr.presentation.val\nC : Type u\ninst✝¹ : Category.{v, u} C\nD : Type u'\ninst✝ : Category.{v', u'} D\nF✝ F : C ≌ D\nH : EnoughProjectives D\nX : C\n⊢ ProjectivePresentation X\n[PROOFSTEP]\nexact F.projectivePresentationOfMapProjectivePresentation X (Nonempty.some (H.presentation (F.functor.obj X)))\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n⊢ lift h f g hfg w ≫ f = h\n[PROOFSTEP]\nsimp only [Exact.lift]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n⊢ factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n        (factorThruImageSubobject f) ≫\n      f =\n    h\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rfl\n  rw [← imageSubobject_arrow_comp f]\n    -- See the porting note on `Exact.epi`.\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n      (factorThruImageSubobject f) ≫\n    f\n[PROOFSTEP]\n  congr\n  rfl\n  rw [← imageSubobject_arrow_comp f]\n    -- See the porting note on `Exact.epi`.\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n      (factorThruImageSubobject f) ≫\n    f\n[PROOFSTEP]\n  congr\n  rfl\n  rw [← imageSubobject_arrow_comp f]\n    -- See the porting note on `Exact.epi`.\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n      (factorThruImageSubobject f) ≫\n    f\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n    (factorThruImageSubobject f)\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| f\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n| f\n[PROOFSTEP]\nrw [← imageSubobject_arrow_comp f]\n  -- See the porting note on `Exact.epi`.\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\n⊢ factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n        (factorThruImageSubobject f) ≫\n      factorThruImageSubobject f ≫ Subobject.arrow (imageSubobject f) =\n    h\n[PROOFSTEP]\nhaveI := hfg.epi\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasEqualizers C\ninst✝¹ : HasImages C\nP Q R S : C\ninst✝ : Projective P\nh : P ⟶ R\nf : Q ⟶ R\ng : R ⟶ S\nhfg : Exact f g\nw : h ≫ g = 0\nthis : Epi (imageToKernel f g (_ : f ≫ g = 0))\n⊢ factorThru (factorThru (factorThruKernelSubobject g h w) (imageToKernel f g (_ : f ≫ g = 0)))\n        (factorThruImageSubobject f) ≫\n      factorThruImageSubobject f ≫ Subobject.arrow (imageSubobject f) =\n    h\n[PROOFSTEP]\nrw [← Category.assoc, factorThru_comp, ← imageToKernel_arrow f g, ← Category.assoc,\n  CategoryTheory.Projective.factorThru_comp, factorThruKernelSubobject_comp_arrow]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.Projective", "llama_tokens": 6204, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.596433160611502, "lm_q2_score": 0.4726834766204328, "lm_q1q2_score": 0.28192409992955775}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.873, u_1} C\nX Y : C\nf : Y ⟶ X\n⊢ ∀ {Y_1 Z : C} {f_1 : Y_1 ⟶ X},\n    (fun Z => {g | ∃ e, e ≫ f = g}) Y_1 f_1 → ∀ (g : Z ⟶ Y_1), (fun Z => {g | ∃ e, e ≫ f = g}) Z (g ≫ f_1)\n[PROOFSTEP]\nrintro W Z g ⟨e, rfl⟩ q\n[GOAL]\ncase intro\nC : Type u_1\ninst✝ : Category.{?u.873, u_1} C\nX Y : C\nf : Y ⟶ X\nW Z : C\ne : W ⟶ Y\nq : Z ⟶ W\n⊢ setOf (fun g => ∃ e, e ≫ f = g) (q ≫ e ≫ f)\n[PROOFSTEP]\nrefine ⟨q ≫ e, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.873, u_1} C\nX Y : C\nf : Y ⟶ X\nW Z : C\ne : W ⟶ Y\nq : Z ⟶ W\n⊢ (q ≫ e) ≫ f = q ≫ e ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\n⊢ generate (Presieve.singleton f) = generateSingleton f\n[PROOFSTEP]\next Z g\n[GOAL]\ncase h\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\n⊢ (generate (Presieve.singleton f)).arrows g ↔ (generateSingleton f).arrows g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\n⊢ (generate (Presieve.singleton f)).arrows g → (generateSingleton f).arrows g\n[PROOFSTEP]\nrintro ⟨W, i, p, ⟨⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y✝ : C\nf : Y✝ ⟶ X\nZ Y : C\ni : Z ⟶ Y✝\n⊢ (generateSingleton f).arrows (i ≫ f)\n[PROOFSTEP]\nexact ⟨i, rfl⟩\n[GOAL]\ncase h.mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\n⊢ (generateSingleton f).arrows g → (generate (Presieve.singleton f)).arrows g\n[PROOFSTEP]\nrintro ⟨g, h⟩\n[GOAL]\ncase h.mpr.intro\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nZ : C\ng✝ : Z ⟶ X\ng : Z ⟶ Y\nh : g ≫ f = g✝\n⊢ (generate (Presieve.singleton f)).arrows g✝\n[PROOFSTEP]\nexact ⟨Y, g, f, ⟨⟩, h⟩\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\n⊢ Epi f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\n⊢ ∀ {Z : C} (g h : X ⟶ Z), f ≫ g = f ≫ h → g = h\n[PROOFSTEP]\nintro W m₁ m₂ h\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\nW : C\nm₁ m₂ : X ⟶ W\nh : f ≫ m₁ = f ≫ m₂\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₂ = EffectiveEpi.desc f (f ≫ m₂) (fun {Z} g₁ g₂ h => by simp only [← Category.assoc, h]) :=\n  EffectiveEpi.uniq _ _ _ _ rfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\nW : C\nm₁ m₂ : X ⟶ W\nh✝ : f ≫ m₁ = f ≫ m₂\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\n⊢ g₁ ≫ f ≫ m₂ = g₂ ≫ f ≫ m₂\n[PROOFSTEP]\nsimp only [← Category.assoc, h]\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\nW : C\nm₁ m₂ : X ⟶ W\nh : f ≫ m₁ = f ≫ m₂\nthis : m₂ = EffectiveEpi.desc f (f ≫ m₂) (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ f ≫ m₂ = g₂ ≫ f ≫ m₂)\n⊢ m₁ = m₂\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝¹ : Category.{?u.7498, u_1} C\nX Y : C\nf : Y ⟶ X\ninst✝ : EffectiveEpi f\nW : C\nm₁ m₂ : X ⟶ W\nh : f ≫ m₁ = f ≫ m₂\nthis : m₂ = EffectiveEpi.desc f (f ≫ m₂) (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ f ≫ m₂ = g₂ ≫ f ≫ m₂)\n⊢ m₁ = EffectiveEpi.desc f (f ≫ m₂) (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ f ≫ m₂ = g₂ ≫ f ≫ m₂)\n[PROOFSTEP]\nexact EffectiveEpi.uniq _ _ _ _ h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\n⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\n⊢ ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n    g₁ ≫ f = g₂ ≫ f →\n      g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n        g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nintro Z g₁ g₂ h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nlet Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\n⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nlet Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nlet g₁' : Z' ⟶ Y' := Over.homMk g₁\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }\ng₁' : Z' ⟶ Y' := Over.homMk g₁\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nlet g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }\ng₁' : Z' ⟶ Y' := Over.homMk g₁\n⊢ g₂ ≫ Y'.obj.hom = Z'.obj.hom\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }\ng₁' : Z' ⟶ Y' := Over.homMk g₁\ng₂' : Z' ⟶ Y' := Over.homMk g₂\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nchange F.map g₁' ≫ _ = F.map g₂' ≫ _\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nZ : C\ng₁ g₂ : Z ⟶ Y\nh : g₁ ≫ f = g₂ ≫ f\nY' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }\ng₁' : Z' ⟶ Y' := Over.homMk g₁\ng₂' : Z' ⟶ Y' := Over.homMk g₂\n⊢ F.map g₁' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n    F.map g₂' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n[PROOFSTEP]\nsimp only [S.w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\n⊢ ∀ (s : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows))\n    (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫\n        (fun S =>\n            EffectiveEpiStruct.desc Hf\n              (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })\n              (_ :\n                ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),\n                  let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };\n                  let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };\n                  let g₁' := Over.homMk g₁;\n                  let g₂' := Over.homMk g₂;\n                  F.map g₁' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n                    F.map g₂' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))\n          s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nrintro S ⟨T, g, hT⟩\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\n⊢ NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι\n        { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) } ≫\n      (fun S =>\n          EffectiveEpiStruct.desc Hf\n            (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })\n            (_ :\n              ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),\n                let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };\n                let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };\n                let g₁' := Over.homMk g₁;\n                let g₂' := Over.homMk g₂;\n                F.map g₁' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n                  F.map g₂' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))\n        S =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\n⊢ T.hom ≫\n      EffectiveEpiStruct.desc Hf (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) })\n        (_ :\n          ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n            g₁ ≫ f = g₂ ≫ f →\n              g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n                g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) }) =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nnth_rewrite 1 [← hT, Category.assoc, Hf.fac]\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nlet y : D := ⟨Over.mk f, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\n⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\ny : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nlet x : D := ⟨Over.mk T.hom, g, hT⟩\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\ny : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nx : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nlet g' : x ⟶ y := Over.homMk g\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\ny : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nx : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }\ng' : x ⟶ y := Over.homMk g\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nchange F.map g' ≫ _ = _\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\ny : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nx : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }\ng' : x ⟶ y := Over.homMk g\n⊢ F.map g' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nrw [S.w]\n[GOAL]\ncase mk.intro\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nT : Over X\ng : (𝟭 C).obj T.left ⟶ Y\nhT : g ≫ f = T.hom\ny : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\nx : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }\ng' : x ⟶ y := Over.homMk g\n⊢ NatTrans.app S.ι x = NatTrans.app S.ι { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\n⊢ ∀ (s : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows))\n    (m : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ s.pt),\n    (∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n        NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app s.ι j) →\n      m =\n        (fun S =>\n            EffectiveEpiStruct.desc Hf\n              (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })\n              (_ :\n                ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),\n                  let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };\n                  let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };\n                  let g₁' := Over.homMk g₁;\n                  let g₂' := Over.homMk g₂;\n                  F.map g₁' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n                    F.map g₂' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))\n          s\n[PROOFSTEP]\nintro S m hm\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nm : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app S.ι j\n⊢ m =\n    (fun S =>\n        EffectiveEpiStruct.desc Hf\n          (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })\n          (_ :\n            ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),\n              let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };\n              let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };\n              let g₁' := Over.homMk g₁;\n              let g₂' := Over.homMk g₂;\n              F.map g₁' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =\n                F.map g₂' ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))\n      S\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nm : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app S.ι j\n⊢ m =\n    EffectiveEpiStruct.desc Hf (NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) })\n      (_ :\n        ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n          g₁ ≫ f = g₂ ≫ f →\n            g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =\n              g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) })\n[PROOFSTEP]\ngeneralize_proofs h1 h2\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nm : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app S.ι j\nh1 : ∃ e, e ≫ f = f\nh2 :\n  ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n    g₁ ≫ f = g₂ ≫ f →\n      g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 } =\n        g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 }\n⊢ m = EffectiveEpiStruct.desc Hf (NatTrans.app S.ι { obj := Over.mk f, property := h1 }) h2\n[PROOFSTEP]\napply Hf.uniq _ h2\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nm : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app S.ι j\nh1 : ∃ e, e ≫ f = f\nh2 :\n  ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n    g₁ ≫ f = g₂ ≫ f →\n      g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 } =\n        g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 }\n⊢ f ≫ m = NatTrans.app S.ι { obj := Over.mk f, property := h1 }\n[PROOFSTEP]\nexact hm ⟨Over.mk f, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.8526, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : EffectiveEpiStruct f\nD : Type (max u_1 ?u.8526) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows\nS : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)\nm : (Presieve.cocone (Sieve.generateSingleton f).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m = NatTrans.app S.ι j\nh1 : ∃ e, e ≫ f = f\nh2 :\n  ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),\n    g₁ ≫ f = g₂ ≫ f →\n      g₁ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 } =\n        g₂ ≫ NatTrans.app S.ι { obj := Over.mk f, property := h1 }\n⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ ∀ ⦃X_1 Y_1 : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom⦄ (f_1 : X_1 ⟶ Y_1),\n    (Presieve.diagram (Sieve.generateSingleton f).arrows).map f_1 ≫\n        (fun x =>\n            match x with\n            | { obj := T, property := hT } => Exists.choose hT ≫ e)\n          Y_1 =\n      (fun x =>\n            match x with\n            | { obj := T, property := hT } => Exists.choose hT ≫ e)\n          X_1 ≫\n        ((Functor.const (FullSubcategory fun f_2 => (Sieve.generateSingleton f).arrows f_2.hom)).obj W).map f_1\n[PROOFSTEP]\nrintro ⟨A, hA⟩ ⟨B, hB⟩ (q : A ⟶ B)\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nA : Over X\nhA : (Sieve.generateSingleton f).arrows A.hom\nB : Over X\nhB : (Sieve.generateSingleton f).arrows B.hom\nq : A ⟶ B\n⊢ (Presieve.diagram (Sieve.generateSingleton f).arrows).map q ≫\n      (fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e)\n        { obj := B, property := hB } =\n    (fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e)\n        { obj := A, property := hA } ≫\n      ((Functor.const (FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom)).obj W).map q\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nA : Over X\nhA : (Sieve.generateSingleton f).arrows A.hom\nB : Over X\nhB : (Sieve.generateSingleton f).arrows B.hom\nq : A ⟶ B\n⊢ q.left ≫ Exists.choose hB ≫ e = (Exists.choose hA ≫ e) ≫ 𝟙 W\n[PROOFSTEP]\nsimp only [← Category.assoc, Category.comp_id]\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nA : Over X\nhA : (Sieve.generateSingleton f).arrows A.hom\nB : Over X\nhB : (Sieve.generateSingleton f).arrows B.hom\nq : A ⟶ B\n⊢ (q.left ≫ Exists.choose hB) ≫ e = Exists.choose hA ≫ e\n[PROOFSTEP]\napply h\n[GOAL]\ncase mk.mk.a\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nA : Over X\nhA : (Sieve.generateSingleton f).arrows A.hom\nB : Over X\nhB : (Sieve.generateSingleton f).arrows B.hom\nq : A ⟶ B\n⊢ (q.left ≫ Exists.choose hB) ≫ f = Exists.choose hA ≫ f\n[PROOFSTEP]\nrw [Category.assoc, hB.choose_spec, hA.choose_spec, Over.w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\n⊢ ∀ {W : C} (e : Y ⟶ W) (h : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e),\n    f ≫\n        (fun {W} e h => IsColimit.desc Hf (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e))) e\n          (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) =\n      e\n[PROOFSTEP]\nintro W e h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ f ≫\n      (fun {W} e h => IsColimit.desc Hf (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e))) e\n        (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) =\n    e\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ f ≫\n      IsColimit.desc Hf\n        { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e } =\n    e\n[PROOFSTEP]\nhave := Hf.fac (aux e h) ⟨Over.mk f, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nthis :\n  NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι\n        { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } ≫\n      IsColimit.desc Hf (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)) =\n    NatTrans.app (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)).ι\n      { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }\n⊢ f ≫\n      IsColimit.desc Hf\n        { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e } =\n    e\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nthis :\n  f ≫\n      IsColimit.desc Hf\n        { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e } =\n    Exists.choose (_ : ∃ e, e ≫ f = f) ≫ e\n⊢ f ≫\n      IsColimit.desc Hf\n        { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e } =\n    e\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nthis :\n  f ≫\n      IsColimit.desc Hf\n        { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e } =\n    Exists.choose (_ : ∃ e, e ≫ f = f) ≫ e\n⊢ Exists.choose (_ : ∃ e, e ≫ f = f) ≫ e = e\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ Exists.choose (_ : ∃ e, e ≫ f = f) ≫ e = e\n[PROOFSTEP]\nnth_rewrite 2 [← Category.id_comp e]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ Exists.choose (_ : ∃ e, e ≫ f = f) ≫ e = 𝟙 Y ≫ e\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\n⊢ Exists.choose (_ : ∃ e, e ≫ f = f) ≫ f = 𝟙 Y ≫ f\n[PROOFSTEP]\ngeneralize_proofs hh\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nhh : ∃ e, e ≫ f = f\n⊢ Exists.choose hh ≫ f = 𝟙 Y ≫ f\n[PROOFSTEP]\nrw [hh.choose_spec, Category.id_comp]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\n⊢ ∀ {W : C} (e : Y ⟶ W) (h : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) (m : X ⟶ W),\n    f ≫ m = e →\n      m =\n        (fun {W} e h => IsColimit.desc Hf (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e))) e\n          (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)\n[PROOFSTEP]\nintro W e h m hm\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\n⊢ m =\n    (fun {W} e h => IsColimit.desc Hf (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e))) e\n      (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\n⊢ m =\n    IsColimit.desc Hf\n      { pt := W, ι := NatTrans.mk fun x => Exists.choose (_ : (Sieve.generateSingleton f).arrows x.obj.hom) ≫ e }\n[PROOFSTEP]\napply Hf.uniq (aux e h)\n[GOAL]\ncase x\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\n⊢ ∀ (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι j ≫ m =\n      NatTrans.app (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)).ι j\n[PROOFSTEP]\nrintro ⟨A, g, hA⟩\n[GOAL]\ncase x.mk.intro\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\nA : Over X\ng : (𝟭 C).obj A.left ⟶ Y\nhA : g ≫ f = A.hom\n⊢ NatTrans.app (Presieve.cocone (Sieve.generateSingleton f).arrows).ι\n        { obj := A, property := (_ : ∃ e, e ≫ f = A.hom) } ≫\n      m =\n    NatTrans.app (aux e (_ : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e)).ι\n      { obj := A, property := (_ : ∃ e, e ≫ f = A.hom) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase x.mk.intro\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\nA : Over X\ng : (𝟭 C).obj A.left ⟶ Y\nhA : g ≫ f = A.hom\n⊢ A.hom ≫ m = Exists.choose (_ : ∃ e, e ≫ f = A.hom) ≫ e\n[PROOFSTEP]\nnth_rewrite 1 [← hA, Category.assoc, hm]\n[GOAL]\ncase x.mk.intro\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\nA : Over X\ng : (𝟭 C).obj A.left ⟶ Y\nhA : g ≫ f = A.hom\n⊢ g ≫ e = Exists.choose (_ : ∃ e, e ≫ f = A.hom) ≫ e\n[PROOFSTEP]\napply h\n[GOAL]\ncase x.mk.intro.a\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\nA : Over X\ng : (𝟭 C).obj A.left ⟶ Y\nhA : g ≫ f = A.hom\n⊢ g ≫ f = Exists.choose (_ : ∃ e, e ≫ f = A.hom) ≫ f\n[PROOFSTEP]\ngeneralize_proofs hh\n[GOAL]\ncase x.mk.intro.a\nC : Type u_1\ninst✝ : Category.{?u.20742, u_1} C\nX Y : C\nf : Y ⟶ X\nHf : IsColimit (Presieve.cocone (Sieve.generateSingleton f).arrows)\naux : {W : C} →\n  (e : Y ⟶ W) →\n    (∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e) →\n      Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } => Exists.choose hT ≫ e }\nW : C\ne : Y ⟶ W\nh : ∀ {Z : C} (g₁ g₂ : Z ⟶ Y), g₁ ≫ f = g₂ ≫ f → g₁ ≫ e = g₂ ≫ e\nm : X ⟶ W\nhm : f ≫ m = e\nA : Over X\ng : (𝟭 C).obj A.left ⟶ Y\nhA : g ≫ f = A.hom\nhh : ∃ e, e ≫ f = A.hom\n⊢ g ≫ f = Exists.choose hh ≫ f\n[PROOFSTEP]\nrwa [hh.choose_spec]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\n⊢ Presieve.EffectiveEpimorphic (Presieve.singleton f) ↔ EffectiveEpi f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\n⊢ Presieve.EffectiveEpimorphic (Presieve.singleton f) → EffectiveEpi f\n[PROOFSTEP]\nintro (h : Nonempty _)\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (IsColimit (Presieve.cocone (generate (Presieve.singleton f)).arrows))\n⊢ EffectiveEpi f\n[PROOFSTEP]\nrw [Sieve.generateSingleton_eq] at h \n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (IsColimit (Presieve.cocone (generateSingleton f).arrows))\n⊢ EffectiveEpi f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.effectiveEpi\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (IsColimit (Presieve.cocone (generateSingleton f).arrows))\n⊢ Nonempty (EffectiveEpiStruct f)\n[PROOFSTEP]\napply Nonempty.map (effectiveEpiStructOfIsColimit _) h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\n⊢ EffectiveEpi f → Presieve.EffectiveEpimorphic (Presieve.singleton f)\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (EffectiveEpiStruct f)\n⊢ Presieve.EffectiveEpimorphic (Presieve.singleton f)\n[PROOFSTEP]\nshow Nonempty _\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (EffectiveEpiStruct f)\n⊢ Nonempty (IsColimit (Presieve.cocone (generate (Presieve.singleton f)).arrows))\n[PROOFSTEP]\nrw [Sieve.generateSingleton_eq]\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_2, u_1} C\nX Y : C\nf : Y ⟶ X\nh : Nonempty (EffectiveEpiStruct f)\n⊢ Nonempty (IsColimit (Presieve.cocone (generateSingleton f).arrows))\n[PROOFSTEP]\napply Nonempty.map (isColimitOfEffectiveEpiStruct _) h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.36898, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\n⊢ ∀ {Y Z : C} {f : Y ⟶ B},\n    (fun Y => {f | ∃ a g, g ≫ π a = f}) Y f → ∀ (g : Z ⟶ Y), (fun Y => {f | ∃ a g, g ≫ π a = f}) Z (g ≫ f)\n[PROOFSTEP]\nrintro Y₁ Y₂ g₁ ⟨a, q, rfl⟩ e\n[GOAL]\ncase intro.intro\nC : Type u_1\ninst✝ : Category.{?u.36898, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY₁ Y₂ : C\na : α\nq : Y₁ ⟶ X a\ne : Y₂ ⟶ Y₁\n⊢ setOf (fun f => ∃ a g, g ≫ π a = f) (e ≫ q ≫ π a)\n[PROOFSTEP]\nrefine ⟨a, e ≫ q, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.36898, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY₁ Y₂ : C\na : α\nq : Y₁ ⟶ X a\ne : Y₂ ⟶ Y₁\n⊢ (e ≫ q) ≫ π a = e ≫ q ≫ π a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\n⊢ generate (Presieve.ofArrows X π) = generateFamily X π\n[PROOFSTEP]\next Y g\n[GOAL]\ncase h\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY : C\ng : Y ⟶ B\n⊢ (generate (Presieve.ofArrows X π)).arrows g ↔ (generateFamily X π).arrows g\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY : C\ng : Y ⟶ B\n⊢ (generate (Presieve.ofArrows X π)).arrows g → (generateFamily X π).arrows g\n[PROOFSTEP]\nrintro ⟨W, g, f, ⟨a⟩, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro.mk\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY✝ Y : C\na : α\ng : Y✝ ⟶ X a\n⊢ (generateFamily X π).arrows (g ≫ π a)\n[PROOFSTEP]\nexact ⟨a, g, rfl⟩\n[GOAL]\ncase h.mpr\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY : C\ng : Y ⟶ B\n⊢ (generateFamily X π).arrows g → (generate (Presieve.ofArrows X π)).arrows g\n[PROOFSTEP]\nrintro ⟨a, g, rfl⟩\n[GOAL]\ncase h.mpr.intro.intro\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nY : C\na : α\ng : Y ⟶ X a\n⊢ (generate (Presieve.ofArrows X π)).arrows (g ≫ π a)\n[PROOFSTEP]\nrefine ⟨_, g, π a, ⟨a⟩, rfl⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.43458, u_1} C\nα : Unit → C\n⊢ ∀ {W : C} (e : (a : Unit) → α a ⟶ W)\n    (h :\n      ∀ {Z : C} (a₁ a₂ : Unit) (g₁ : Z ⟶ α a₁) (g₂ : Z ⟶ α a₂), g₁ ≫ 𝟙 (α ()) = g₂ ≫ 𝟙 (α ()) → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (a : Unit),\n    𝟙 (α ()) ≫\n        (fun {W} e x => e ()) e\n          (_ :\n            ∀ {Z : C} (a₁ a₂ : Unit) (g₁ : Z ⟶ α a₁) (g₂ : Z ⟶ α a₂),\n              g₁ ≫ 𝟙 (α ()) = g₂ ≫ 𝟙 (α ()) → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n      e a\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.43458, u_1} C\nα : Unit → C\n⊢ ∀ {W : C} (e : (a : Unit) → α a ⟶ W)\n    (h :\n      ∀ {Z : C} (a₁ a₂ : Unit) (g₁ : Z ⟶ α a₁) (g₂ : Z ⟶ α a₂), g₁ ≫ 𝟙 (α ()) = g₂ ≫ 𝟙 (α ()) → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (m : α () ⟶ W),\n    (∀ (a : Unit), 𝟙 (α ()) ≫ m = e a) →\n      m =\n        (fun {W} e x => e ()) e\n          (_ :\n            ∀ {Z : C} (a₁ a₂ : Unit) (g₁ : Z ⟶ α a₁) (g₂ : Z ⟶ α a₂),\n              g₁ ≫ 𝟙 (α ()) = g₂ ≫ 𝟙 (α ()) → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.51706, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ π a ≫\n      EffectiveEpiFamily.desc X π e\n        (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n    e a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.52695, u_1} C\nB W Q : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nq : W ⟶ Q\n⊢ π a ≫\n      EffectiveEpiFamily.desc X π e\n          (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) ≫\n        q =\n    e a ≫ q\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\n⊢ m₁ = m₂\n[PROOFSTEP]\nhave : m₂ = EffectiveEpiFamily.desc X π (fun a => π a ≫ m₂) (fun a₁ a₂ g₁ g₂ h => by simp only [← Category.assoc, h]) :=\n  by apply EffectiveEpiFamily.uniq; intro; rfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh✝ : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\nZ✝ : C\na₁ a₂ : α\ng₁ : Z✝ ⟶ X a₁\ng₂ : Z✝ ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\n⊢ g₁ ≫ (fun a => π a ≫ m₂) a₁ = g₂ ≫ (fun a => π a ≫ m₂) a₂\n[PROOFSTEP]\nsimp only [← Category.assoc, h]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\n⊢ m₂ =\n    desc X π (fun a => π a ≫ m₂)\n      (_ :\n        ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ π a₁ ≫ m₂ = g₂ ≫ π a₂ ≫ m₂)\n[PROOFSTEP]\napply EffectiveEpiFamily.uniq\n[GOAL]\ncase hm\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\n⊢ ∀ (a : α), π a ≫ m₂ = π a ≫ m₂\n[PROOFSTEP]\nintro\n[GOAL]\ncase hm\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\na✝ : α\n⊢ π a✝ ≫ m₂ = π a✝ ≫ m₂\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\nthis :\n  m₂ =\n    desc X π (fun a => π a ≫ m₂)\n      (_ :\n        ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ π a₁ ≫ m₂ = g₂ ≫ π a₂ ≫ m₂)\n⊢ m₁ = m₂\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_3, u_1} C\nB W : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝ : EffectiveEpiFamily X π\nm₁ m₂ : B ⟶ W\nh : ∀ (a : α), π a ≫ m₁ = π a ≫ m₂\nthis :\n  m₂ =\n    desc X π (fun a => π a ≫ m₂)\n      (_ :\n        ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ π a₁ ≫ m₂ = g₂ ≫ π a₂ ≫ m₂)\n⊢ m₁ =\n    desc X π (fun a => π a ≫ m₂)\n      (_ :\n        ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ π a₁ ≫ m₂ = g₂ ≫ π a₂ ≫ m₂)\n[PROOFSTEP]\nexact EffectiveEpiFamily.uniq _ _ _ _ _ h\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\n⊢ Epi (Sigma.desc π)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\n⊢ ∀ {Z : C} (g h : B ⟶ Z), Sigma.desc π ≫ g = Sigma.desc π ≫ h → g = h\n[PROOFSTEP]\nintro Z g h H\n[GOAL]\ncase left_cancellation\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\nZ : C\ng h : B ⟶ Z\nH : Sigma.desc π ≫ g = Sigma.desc π ≫ h\n⊢ g = h\n[PROOFSTEP]\napply EffectiveEpiFamily.hom_ext X π\n[GOAL]\ncase left_cancellation.h\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\nZ : C\ng h : B ⟶ Z\nH : Sigma.desc π ≫ g = Sigma.desc π ≫ h\n⊢ ∀ (a : α), π a ≫ g = π a ≫ h\n[PROOFSTEP]\nintro a\n[GOAL]\ncase left_cancellation.h\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\nZ : C\ng h : B ⟶ Z\nH : Sigma.desc π ≫ g = Sigma.desc π ≫ h\na : α\n⊢ π a ≫ g = π a ≫ h\n[PROOFSTEP]\nsuffices (Sigma.ι _ a ≫ Sigma.desc π) ≫ g = (Sigma.ι _ a ≫ Sigma.desc π) ≫ h by simpa only [colimit.ι_desc] using this\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\nZ : C\ng h : B ⟶ Z\nH : Sigma.desc π ≫ g = Sigma.desc π ≫ h\na : α\nthis : (Sigma.ι (fun b => X b) a ≫ Sigma.desc π) ≫ g = (Sigma.ι (fun b => X b) a ≫ Sigma.desc π) ≫ h\n⊢ π a ≫ g = π a ≫ h\n[PROOFSTEP]\nsimpa only [colimit.ι_desc] using this\n[GOAL]\ncase left_cancellation.h\nC : Type u_1\ninst✝² : Category.{?u.55691, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\ninst✝¹ : EffectiveEpiFamily X π\ninst✝ : HasCoproduct X\nZ : C\ng h : B ⟶ Z\nH : Sigma.desc π ≫ g = Sigma.desc π ≫ h\na : α\n⊢ (Sigma.ι (fun b => X b) a ≫ Sigma.desc π) ≫ g = (Sigma.ι (fun b => X b) a ≫ Sigma.desc π) ≫ h\n[PROOFSTEP]\nsimp only [Category.assoc, H]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\na : α\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a)).left) ≫ π a = (Over.mk (π a)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\n⊢ ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n    g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n      g₁ ≫\n          (fun a =>\n              NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n            a₁ =\n        g₂ ≫\n          (fun a =>\n              NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n            a₂\n[PROOFSTEP]\nintro Z a₁ a₂ g₁ g₂ h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\n⊢ g₁ ≫\n      (fun a => NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n        a₁ =\n    g₂ ≫\n      (fun a => NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n        a₂\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nlet A₁ : D := ⟨Over.mk (π a₁), a₁, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a₁)).left) ≫ π a₁ = (Over.mk (π a₁)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nlet A₂ : D := ⟨Over.mk (π a₂), a₂, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a₂)).left) ≫ π a₂ = (Over.mk (π a₂)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\nA₂ : D := { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₂)).hom) }\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nlet Z' : D := ⟨Over.mk (g₁ ≫ π a₁), a₁, g₁, rfl⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\nA₂ : D := { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₂)).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (g₁ ≫ π a₁)).hom) }\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nlet i₁ : Z' ⟶ A₁ := Over.homMk g₁\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\nA₂ : D := { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₂)).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (g₁ ≫ π a₁)).hom) }\ni₁ : Z' ⟶ A₁ := Over.homMk g₁\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nlet i₂ : Z' ⟶ A₂ := Over.homMk g₂\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\nA₂ : D := { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₂)).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (g₁ ≫ π a₁)).hom) }\ni₁ : Z' ⟶ A₁ := Over.homMk g₁\ni₂ : Z' ⟶ A₂ := Over.homMk g₂\n⊢ g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nchange F.map i₁ ≫ _ = F.map i₂ ≫ _\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nZ : C\na₁ a₂ : α\ng₁ : Z ⟶ X a₁\ng₂ : Z ⟶ X a₂\nh : g₁ ≫ π a₁ = g₂ ≫ π a₂\nA₁ : D := { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₁)).hom) }\nA₂ : D := { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = (Over.mk (π a₂)).hom) }\nZ' : D := { obj := Over.mk (g₁ ≫ π a₁), property := (_ : ∃ a g, g ≫ π a = (Over.mk (g₁ ≫ π a₁)).hom) }\ni₁ : Z' ⟶ A₁ := Over.homMk g₁\ni₂ : Z' ⟶ A₂ := Over.homMk g₂\n⊢ F.map i₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n    F.map i₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }\n[PROOFSTEP]\nsimp only [S.w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\n⊢ ∀ (s : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows))\n    (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫\n        (fun S =>\n            EffectiveEpiFamilyStruct.desc H\n              (fun a =>\n                NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n              (_ :\n                ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                  g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n                    g₁ ≫\n                        (fun a =>\n                            NatTrans.app S.ι\n                              { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                          a₁ =\n                      g₂ ≫\n                        (fun a =>\n                            NatTrans.app S.ι\n                              { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                          a₂))\n          s =\n      NatTrans.app s.ι j\n[PROOFSTEP]\nintro S ⟨T, a, (g : T.left ⟶ X a), hT⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\n⊢ NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι\n        { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) } ≫\n      (fun S =>\n          EffectiveEpiFamilyStruct.desc H\n            (fun a =>\n              NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n            (_ :\n              ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n                  g₁ ≫\n                      (fun a =>\n                          NatTrans.app S.ι\n                            { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                        a₁ =\n                    g₂ ≫\n                      (fun a =>\n                          NatTrans.app S.ι\n                            { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                        a₂))\n        S =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\n⊢ T.hom ≫\n      EffectiveEpiFamilyStruct.desc H\n        (fun a => NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) })\n        (_ :\n          ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n            g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n              g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n                g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) }) =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nnth_rewrite 1 [← hT, Category.assoc, H.fac]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nlet A : D := ⟨Over.mk (π a), a, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a)).left) ≫ π a = (Over.mk (π a)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\nA : D := { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nlet B : D := ⟨Over.mk T.hom, a, g, hT⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B✝\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\nA : D := { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\nB : D := { obj := Over.mk T.hom, property := (_ : ∃ a g, g ≫ π a = (Over.mk T.hom).hom) }\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nlet i : B ⟶ A := Over.homMk g\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B✝\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\nA : D := { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\nB : D := { obj := Over.mk T.hom, property := (_ : ∃ a g, g ≫ π a = (Over.mk T.hom).hom) }\ni : B ⟶ A := Over.homMk g\n⊢ g ≫ NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nchange F.map i ≫ _ = _\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B✝\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\nA : D := { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\nB : D := { obj := Over.mk T.hom, property := (_ : ∃ a g, g ≫ π a = (Over.mk T.hom).hom) }\ni : B ⟶ A := Over.homMk g\n⊢ F.map i ≫ NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) } =\n    NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nrw [S.w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nT : Over B✝\na : α\ng : T.left ⟶ X a\nhT : g ≫ π a = T.hom\nA : D := { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\nB : D := { obj := Over.mk T.hom, property := (_ : ∃ a g, g ≫ π a = (Over.mk T.hom).hom) }\ni : B ⟶ A := Over.homMk g\n⊢ NatTrans.app S.ι B = NatTrans.app S.ι { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\n⊢ ∀ (s : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows))\n    (m : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ s.pt),\n    (∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n        NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app s.ι j) →\n      m =\n        (fun S =>\n            EffectiveEpiFamilyStruct.desc H\n              (fun a =>\n                NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n              (_ :\n                ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                  g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n                    g₁ ≫\n                        (fun a =>\n                            NatTrans.app S.ι\n                              { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                          a₁ =\n                      g₂ ≫\n                        (fun a =>\n                            NatTrans.app S.ι\n                              { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                          a₂))\n          s\n[PROOFSTEP]\nintro S m hm\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nm : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app S.ι j\n⊢ m =\n    (fun S =>\n        EffectiveEpiFamilyStruct.desc H\n          (fun a =>\n            NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n          (_ :\n            ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n              g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n                g₁ ≫\n                    (fun a =>\n                        NatTrans.app S.ι\n                          { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                      a₁ =\n                  g₂ ≫\n                    (fun a =>\n                        NatTrans.app S.ι\n                          { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) })\n                      a₂))\n      S\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nm : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app S.ι j\n⊢ m =\n    EffectiveEpiFamilyStruct.desc H\n      (fun a => NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) })\n      (_ :\n        ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n          g₁ ≫ π a₁ = g₂ ≫ π a₂ →\n            g₁ ≫ NatTrans.app S.ι { obj := Over.mk (π a₁), property := (_ : ∃ a g, g ≫ π a = π a₁) } =\n              g₂ ≫ NatTrans.app S.ι { obj := Over.mk (π a₂), property := (_ : ∃ a g, g ≫ π a = π a₂) })\n[PROOFSTEP]\napply H.uniq\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nm : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app S.ι j\n⊢ ∀ (a : α), π a ≫ m = NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) }\n[PROOFSTEP]\nintro a\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nm : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app S.ι j\na : α\n⊢ π a ≫ m = NatTrans.app S.ι { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = π a) }\n[PROOFSTEP]\nexact hm ⟨Over.mk (π a), a, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.59810, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : EffectiveEpiFamilyStruct X π\nD : Type (max u_1 ?u.59810) := FullSubcategory fun T => (Sieve.generateFamily X π).arrows T.hom\nF : D ⥤ C := Presieve.diagram (Sieve.generateFamily X π).arrows\nS : Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows)\nm : (Presieve.cocone (Sieve.generateFamily X π).arrows).pt ⟶ S.pt\nhm :\n  ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m = NatTrans.app S.ι j\na : α\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a)).left) ≫ π a = (Over.mk (π a)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\n⊢ ∀ ⦃X_1 Y : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom⦄ (f : X_1 ⟶ Y),\n    (Presieve.diagram (Sieve.generateFamily X π).arrows).map f ≫\n        (fun x =>\n            match x with\n            | { obj := T, property := hT } =>\n              Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT))\n          Y =\n      (fun x =>\n            match x with\n            | { obj := T, property := hT } =>\n              Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT))\n          X_1 ≫\n        ((Functor.const (FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom)).obj W).map f\n[PROOFSTEP]\nintro ⟨A, a, (g₁ : A.left ⟶ _), ha⟩ ⟨B, b, (g₂ : B.left ⟶ _), hb⟩ (q : A ⟶ B)\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\n⊢ (Presieve.diagram (Sieve.generateFamily X π).arrows).map q ≫\n      (fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT))\n        { obj := B, property := (_ : ∃ a g, g ≫ π a = B.hom) } =\n    (fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT))\n        { obj := A, property := (_ : ∃ a g, g ≫ π a = A.hom) } ≫\n      ((Functor.const (FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom)).obj W).map q\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\n⊢ q.left ≫\n      Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) = B.hom) ≫\n        e (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) =\n    (Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom)) = A.hom) ≫\n        e (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom))) ≫\n      𝟙 W\n[PROOFSTEP]\nrw [Category.comp_id, ← Category.assoc]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\n⊢ (q.left ≫ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) = B.hom)) ≫\n      e (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) =\n    Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom)) = A.hom) ≫\n      e (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom))\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\n⊢ (q.left ≫ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) = B.hom)) ≫\n      π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) =\n    Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom)) = A.hom) ≫\n      π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom))\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\n⊢ q.left ≫\n      Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) = B.hom) ≫\n        π (Exists.choose (_ : ∃ a g, g ≫ π a = B.hom)) =\n    Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom)) = A.hom) ≫\n      π (Exists.choose (_ : ∃ a g, g ≫ π a = A.hom))\n[PROOFSTEP]\ngeneralize_proofs h1 h2 h3 h4\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB✝ : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B✝\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nA : Over B✝\na : α\ng₁ : A.left ⟶ X a\nha : g₁ ≫ π a = A.hom\nB : Over B✝\nb : α\ng₂ : B.left ⟶ X b\nhb : g₂ ≫ π b = B.hom\nq : A ⟶ B\nh1 : ∃ a g, g ≫ π a = B.hom\nh2 : ∃ g, g ≫ π (Exists.choose h1) = B.hom\nh3 : ∃ a g, g ≫ π a = A.hom\nh4 : ∃ g, g ≫ π (Exists.choose h3) = A.hom\n⊢ q.left ≫ Exists.choose h2 ≫ π (Exists.choose h1) = Exists.choose h4 ≫ π (Exists.choose h3)\n[PROOFSTEP]\nrw [h2.choose_spec, h4.choose_spec, Over.w]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\n⊢ ∀ {W : C} (e : (a : α) → X a ⟶ W)\n    (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) (a : α),\n    π a ≫\n        (fun {W} e h =>\n            IsColimit.desc H\n              (aux e\n                (_ :\n                  ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                    g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)))\n          e (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n      e a\n[PROOFSTEP]\nintro W e h a\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ π a ≫\n      (fun {W} e h =>\n          IsColimit.desc H\n            (aux e\n              (_ :\n                ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)))\n        e (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) =\n    e a\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ π a ≫\n      IsColimit.desc H\n        { pt := W,\n          ι :=\n            NatTrans.mk fun x =>\n              Exists.choose\n                  (_ : ∃ g, g ≫ π (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) = x.obj.hom) ≫\n                e (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) } =\n    e a\n[PROOFSTEP]\nhave := H.fac (aux e h) ⟨Over.mk (π a), a, 𝟙 _, by simp⟩\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ 𝟙 ((𝟭 C).obj (Over.mk (π a)).left) ≫ π a = (Over.mk (π a)).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nthis :\n  NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι\n        { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) } ≫\n      IsColimit.desc H\n        (aux e\n          (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)) =\n    NatTrans.app\n      (aux e\n          (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)).ι\n      { obj := Over.mk (π a), property := (_ : ∃ a_1 g, g ≫ π a_1 = (Over.mk (π a)).hom) }\n⊢ π a ≫\n      IsColimit.desc H\n        { pt := W,\n          ι :=\n            NatTrans.mk fun x =>\n              Exists.choose\n                  (_ : ∃ g, g ≫ π (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) = x.obj.hom) ≫\n                e (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) } =\n    e a\n[PROOFSTEP]\ndsimp at this \n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nthis :\n  π a ≫\n      IsColimit.desc H\n        { pt := W,\n          ι :=\n            NatTrans.mk fun x =>\n              Exists.choose\n                  (_ : ∃ g, g ≫ π (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) = x.obj.hom) ≫\n                e (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) } =\n    Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      e (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a))\n⊢ π a ≫\n      IsColimit.desc H\n        { pt := W,\n          ι :=\n            NatTrans.mk fun x =>\n              Exists.choose\n                  (_ : ∃ g, g ≫ π (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) = x.obj.hom) ≫\n                e (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) } =\n    e a\n[PROOFSTEP]\nrw [this]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nthis :\n  π a ≫\n      IsColimit.desc H\n        { pt := W,\n          ι :=\n            NatTrans.mk fun x =>\n              Exists.choose\n                  (_ : ∃ g, g ≫ π (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) = x.obj.hom) ≫\n                e (Exists.choose (_ : (Sieve.generateFamily X π).arrows x.obj.hom)) } =\n    Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      e (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a))\n⊢ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      e (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) =\n    e a\n[PROOFSTEP]\nclear this\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      e (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) =\n    e a\n[PROOFSTEP]\nconv_rhs => rw [← Category.id_comp (e a)]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n| e a\n[PROOFSTEP]\nrw [← Category.id_comp (e a)]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n| e a\n[PROOFSTEP]\nrw [← Category.id_comp (e a)]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n| e a\n[PROOFSTEP]\nrw [← Category.id_comp (e a)]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      e (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) =\n    𝟙 (X a) ≫ e a\n[PROOFSTEP]\napply h\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\n⊢ Exists.choose (_ : ∃ g, g ≫ π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) = π a) ≫\n      π (Exists.choose (_ : ∃ a_1 g, g ≫ π a_1 = π a)) =\n    𝟙 (X a) ≫ π a\n[PROOFSTEP]\ngeneralize_proofs h1 h2\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\na : α\nh1 : ∃ a_1 g, g ≫ π a_1 = π a\nh2 : ∃ g, g ≫ π (Exists.choose h1) = π a\n⊢ Exists.choose h2 ≫ π (Exists.choose h1) = 𝟙 (X a) ≫ π a\n[PROOFSTEP]\nrw [h2.choose_spec, Category.id_comp]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\n⊢ ∀ {W : C} (e : (a : α) → X a ⟶ W)\n    (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n    (m : B ⟶ W),\n    (∀ (a : α), π a ≫ m = e a) →\n      m =\n        (fun {W} e h =>\n            IsColimit.desc H\n              (aux e\n                (_ :\n                  ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),\n                    g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)))\n          e (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\nintro W e h m hm\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ m =\n    (fun {W} e h =>\n        IsColimit.desc H\n          (aux e\n            (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)))\n      e (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)\n[PROOFSTEP]\napply H.uniq (aux e h)\n[GOAL]\ncase x\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\n⊢ ∀ (j : FullSubcategory fun f => (Sieve.generateFamily X π).arrows f.hom),\n    NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι j ≫ m =\n      NatTrans.app\n        (aux e\n            (_ :\n              ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)).ι\n        j\n[PROOFSTEP]\nrintro ⟨T, a, (g : T.left ⟶ _), ha⟩\n[GOAL]\ncase x.mk.intro.intro\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\nT : Over B\na : α\ng : T.left ⟶ X a\nha : g ≫ π a = T.hom\n⊢ NatTrans.app (Presieve.cocone (Sieve.generateFamily X π).arrows).ι\n        { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) } ≫\n      m =\n    NatTrans.app\n      (aux e\n          (_ : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂)).ι\n      { obj := T, property := (_ : ∃ a g, g ≫ π a = T.hom) }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase x.mk.intro.intro\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\nT : Over B\na : α\ng : T.left ⟶ X a\nha : g ≫ π a = T.hom\n⊢ T.hom ≫ m =\n    Exists.choose (_ : ∃ g_1, g_1 ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom)) = T.hom) ≫\n      e (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom))\n[PROOFSTEP]\nnth_rewrite 1 [← ha, Category.assoc, hm]\n[GOAL]\ncase x.mk.intro.intro\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\nT : Over B\na : α\ng : T.left ⟶ X a\nha : g ≫ π a = T.hom\n⊢ g ≫ e a =\n    Exists.choose (_ : ∃ g_1, g_1 ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom)) = T.hom) ≫\n      e (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom))\n[PROOFSTEP]\napply h\n[GOAL]\ncase x.mk.intro.intro.a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\nT : Over B\na : α\ng : T.left ⟶ X a\nha : g ≫ π a = T.hom\n⊢ g ≫ π a =\n    Exists.choose (_ : ∃ g_1, g_1 ≫ π (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom)) = T.hom) ≫\n      π (Exists.choose (_ : ∃ a g, g ≫ π a = T.hom))\n[PROOFSTEP]\ngeneralize_proofs h1 h2\n[GOAL]\ncase x.mk.intro.intro.a\nC : Type u_1\ninst✝ : Category.{?u.74817, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nH : IsColimit (Presieve.cocone (Sieve.generateFamily X π).arrows)\naux : {W : C} →\n  (e : (a : α) → X a ⟶ W) →\n    (∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) →\n      Cocone (Presieve.diagram (Sieve.generateFamily X π).arrows) :=\n  fun {W} e h =>\n    { pt := W,\n      ι :=\n        NatTrans.mk fun x =>\n          match x with\n          | { obj := T, property := hT } =>\n            Exists.choose (_ : ∃ g, g ≫ π (Exists.choose hT) = T.hom) ≫ e (Exists.choose hT) }\nW : C\ne : (a : α) → X a ⟶ W\nh : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂), g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂\nm : B ⟶ W\nhm : ∀ (a : α), π a ≫ m = e a\nT : Over B\na : α\ng : T.left ⟶ X a\nha : g ≫ π a = T.hom\nh1 : ∃ a g, g ≫ π a = T.hom\nh2 : ∃ g, g ≫ π (Exists.choose h1) = T.hom\n⊢ g ≫ π a = Exists.choose h2 ≫ π (Exists.choose h1)\n[PROOFSTEP]\nrwa [h2.choose_spec]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\n⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows X π) ↔ EffectiveEpiFamily X π\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\n⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows X π) → EffectiveEpiFamily X π\n[PROOFSTEP]\nintro (h : Nonempty _)\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (IsColimit (Presieve.cocone (generate (Presieve.ofArrows X π)).arrows))\n⊢ EffectiveEpiFamily X π\n[PROOFSTEP]\nrw [Sieve.generateFamily_eq] at h \n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (IsColimit (Presieve.cocone (generateFamily X π).arrows))\n⊢ EffectiveEpiFamily X π\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.effectiveEpiFamily\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (IsColimit (Presieve.cocone (generateFamily X π).arrows))\n⊢ Nonempty (EffectiveEpiFamilyStruct X π)\n[PROOFSTEP]\napply Nonempty.map (effectiveEpiFamilyStructOfIsColimit _ _) h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\n⊢ EffectiveEpiFamily X π → Presieve.EffectiveEpimorphic (Presieve.ofArrows X π)\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (EffectiveEpiFamilyStruct X π)\n⊢ Presieve.EffectiveEpimorphic (Presieve.ofArrows X π)\n[PROOFSTEP]\nshow Nonempty _\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (EffectiveEpiFamilyStruct X π)\n⊢ Nonempty (IsColimit (Presieve.cocone (generate (Presieve.ofArrows X π)).arrows))\n[PROOFSTEP]\nrw [Sieve.generateFamily_eq]\n[GOAL]\ncase mpr.mk\nC : Type u_1\ninst✝ : Category.{u_3, u_1} C\nB : C\nα : Type u_2\nX : α → C\nπ : (a : α) → X a ⟶ B\nh : Nonempty (EffectiveEpiFamilyStruct X π)\n⊢ Nonempty (IsColimit (Presieve.cocone (generateFamily X π).arrows))\n[PROOFSTEP]\napply Nonempty.map (isColimitOfEffectiveEpiFamilyStruct _ _) h\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.EffectiveEpimorphic", "llama_tokens": 55249, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6370308082623216, "lm_q2_score": 0.44167300566462553, "lm_q1q2_score": 0.28135931178618534}}
{"text": "[GOAL]\nB : Type u₁\ninst✝⁵ : Quiver B\ninst✝⁴ : (a b : B) → Quiver (a ⟶ b)\nC : Type u₂\ninst✝³ : Quiver C\ninst✝² : (a b : C) → Quiver (a ⟶ b)\nD : Type u₃\ninst✝¹ : Quiver D\ninst✝ : (a b : D) → Quiver (a ⟶ b)\nF✝ F : PrelaxFunctor B C\nG : PrelaxFunctor C D\nsrc✝ : B ⥤q D := ↑F ⋙q ↑G\na✝ b✝ : B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\n⊢ { obj := src✝.obj, map := fun {X Y} => src✝.map }.map f✝ ⟶ { obj := src✝.obj, map := fun {X Y} => src✝.map }.map g✝\n[PROOFSTEP]\nexact G.map₂ (F.map₂ η)\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na : B\n⊢ (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map (𝟙 a) ⟶\n    𝟙 ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).obj a)\n[PROOFSTEP]\nexact (G.mapFunctor _ _).map (F.mapId a) ≫ G.mapId (F.obj a)\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\n⊢ (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map (f ≫ g) ⟶\n    (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ≫\n      (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g\n[PROOFSTEP]\nexact (G.mapFunctor _ _).map (F.mapComp f g) ≫ G.mapComp (F.map f) (F.map g)\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ f'✝ : a✝ ⟶ b✝\nη : f✝ ⟶ f'✝\ng : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ▷ g) ≫\n      (fun {a b c} f g =>\n          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n        f'✝ g =\n    (fun {a b c} f g =>\n          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n        f✝ g ≫\n      PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ▷\n        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ f'✝ : a✝ ⟶ b✝\nη : f✝ ⟶ f'✝\ng : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ▷ g)) ≫\n      PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f'✝ g) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map f'✝) ((↑F.toPrelaxFunctor).map g) =\n    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f✝ g) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map f✝) ((↑F.toPrelaxFunctor).map g)) ≫\n      PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η) ▷\n        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g)\n[PROOFSTEP]\nrw [← map₂_comp_assoc, mapComp_naturality_left, map₂_comp_assoc, mapComp_naturality_left, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nη : a✝ ⟶ b✝\n⊢ ∀ {g g' : b✝ ⟶ c✝} (η_1 : g ⟶ g'),\n    PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ◁ η_1) ≫\n        (fun {a b c} f g =>\n            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n          η g' =\n      (fun {a b c} f g =>\n            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n          η g ≫\n        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map η ◁\n          PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η_1\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nη : a✝ ⟶ b✝\n⊢ ∀ {g g' : b✝ ⟶ c✝} (η_1 : g ⟶ g'),\n    PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ◁ η_1)) ≫\n        PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g') ≫\n          mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g') =\n      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g) ≫\n          mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g)) ≫\n        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map η) ◁\n          PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η_1)\n[PROOFSTEP]\nintros\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ : B\nη : a✝ ⟶ b✝\ng✝ g'✝ : b✝ ⟶ c✝\nη✝ : g✝ ⟶ g'✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (η ◁ η✝)) ≫\n      PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g'✝) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g'✝) =\n    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F η g✝) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map η) ((↑F.toPrelaxFunctor).map g✝)) ≫\n      (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map η) ◁\n        PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor η✝)\n[PROOFSTEP]\nrw [← map₂_comp_assoc, mapComp_naturality_right, map₂_comp_assoc, mapComp_naturality_right, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (α_ f g h).hom ≫\n      (fun {a b c} f g =>\n            (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n          f (g ≫ h) ≫\n        (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n          (fun {a b c} f g =>\n              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n                mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n            g h =\n    (fun {a b c} f g =>\n          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n        (f ≫ g) h ≫\n      (fun {a b c} f g =>\n              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n                mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n            f g ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫\n        (α_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)\n            ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g)\n            ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h)).hom\n[PROOFSTEP]\ndsimp\n  -- porting note: if you use the `map₂_associator_aux` hack in the definition of\n        -- `map₂_associator` then the `simp only` call below does not seem to apply `map₂_associator`\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom) ≫\n      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f (g ≫ h)) ≫\n          mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map (g ≫ h))) ≫\n        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ◁\n          (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F g h) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)) =\n    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F (f ≫ g) h) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map (f ≫ g)) ((↑F.toPrelaxFunctor).map h)) ≫\n      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g)) ▷\n          (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h) ≫\n        (α_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))\n            ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g))\n            ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h))).hom\n[PROOFSTEP]\nsimp only [map₂_associator, ← map₂_comp_assoc, ← mapComp_naturality_right_assoc, whiskerLeft_comp, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor\n        (mapComp F (f ≫ g) h ≫\n          mapComp F f g ▷ (↑F.toPrelaxFunctor).map h ≫\n            (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom) ≫\n      mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g ≫ (↑F.toPrelaxFunctor).map h) ≫\n        (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ◁\n          mapComp G ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h) =\n    PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F (f ≫ g) h) ≫\n      mapComp G ((↑F.toPrelaxFunctor).map (f ≫ g)) ((↑F.toPrelaxFunctor).map h) ≫\n        (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f g) ≫\n              mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g)) ▷\n            (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h) ≫\n          (α_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))\n              ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map g))\n              ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map h))).hom\n[PROOFSTEP]\nsimp only [map₂_associator, map₂_comp, mapComp_naturality_left_assoc, comp_whiskerRight, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ : B\nf : a✝ ⟶ b✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (λ_ f).hom =\n    (fun {a b c} f g =>\n          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n        (𝟙 a✝) f ≫\n      (fun a =>\n              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj a)).map (mapId F a) ≫\n                mapId G ((↑F.toPrelaxFunctor).obj a))\n            a✝ ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ≫\n        (λ_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ : B\nf : a✝ ⟶ b✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (λ_ f).hom) =\n    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F (𝟙 a✝) f) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map (𝟙 a✝)) ((↑F.toPrelaxFunctor).map f)) ≫\n      (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapId F a✝) ≫ mapId G ((↑F.toPrelaxFunctor).obj a✝)) ▷\n          (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ≫\n        (λ_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))).hom\n[PROOFSTEP]\nsimp only [map₂_leftUnitor, map₂_comp, mapComp_naturality_left_assoc, comp_whiskerRight, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ : B\nf : a✝ ⟶ b✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (ρ_ f).hom =\n    (fun {a b c} f g =>\n          (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj c)).map (mapComp F f g) ≫\n            mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g))\n        f (𝟙 b✝) ≫\n      (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n          (fun a =>\n              (mapFunctor G ((↑F.toPrelaxFunctor).obj a) ((↑F.toPrelaxFunctor).obj a)).map (mapId F a) ≫\n                mapId G ((↑F.toPrelaxFunctor).obj a))\n            b✝ ≫\n        (ρ_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ F : OplaxFunctor B C\nG : OplaxFunctor C D\nsrc✝ : PrelaxFunctor B D := PrelaxFunctor.comp F.toPrelaxFunctor G.toPrelaxFunctor\na✝ b✝ : B\nf : a✝ ⟶ b✝\n⊢ PrelaxFunctor.map₂ G.toPrelaxFunctor (PrelaxFunctor.map₂ F.toPrelaxFunctor (ρ_ f).hom) =\n    (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapComp F f (𝟙 b✝)) ≫\n        mapComp G ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map (𝟙 b✝))) ≫\n      (↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f) ◁\n          (PrelaxFunctor.map₂ G.toPrelaxFunctor (mapId F b✝) ≫ mapId G ((↑F.toPrelaxFunctor).obj b✝)) ≫\n        (ρ_ ((↑G.toPrelaxFunctor).map ((↑F.toPrelaxFunctor).map f))).hom\n[PROOFSTEP]\nsimp only [map₂_rightUnitor, map₂_comp, mapComp_naturality_right_assoc, whiskerLeft_comp, assoc]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf : a✝ ⟶ b✝\ng h : b✝ ⟶ c✝\nη : g ⟶ h\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (f ◁ η) =\n    ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') f g).hom ≫\n      (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n          PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ≫\n        ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') f h).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf : a✝ ⟶ b✝\ng h : b✝ ⟶ c✝\nη : g ⟶ h\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (f ◁ η) =\n    (OplaxFunctor.PseudoCore.mapCompIso F' f g).hom ≫\n      (↑F.toPrelaxFunctor).map f ◁ PrelaxFunctor.map₂ F.toPrelaxFunctor η ≫\n        (OplaxFunctor.PseudoCore.mapCompIso F' f h).inv\n[PROOFSTEP]\nrw [F'.mapCompIso_hom f g, ← F.mapComp_naturality_right_assoc, ← F'.mapCompIso_hom f h, hom_inv_id, comp_id]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ▷ h) =\n    ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') f✝ h).hom ≫\n      PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫\n        ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') g✝ h).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (η ▷ h) =\n    (OplaxFunctor.PseudoCore.mapCompIso F' f✝ h).hom ≫\n      PrelaxFunctor.map₂ F.toPrelaxFunctor η ▷ (↑F.toPrelaxFunctor).map h ≫\n        (OplaxFunctor.PseudoCore.mapCompIso F' g✝ h).inv\n[PROOFSTEP]\nrw [F'.mapCompIso_hom _ h, ← F.mapComp_naturality_left_assoc, ← F'.mapCompIso_hom _ h, hom_inv_id, comp_id]\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (α_ f g h).hom =\n    ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') (f ≫ g) h).hom ≫\n      ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') f g).hom ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫\n        (α_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)\n              ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g)\n              ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h)).hom ≫\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n              ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') g h).inv ≫\n            ((fun {a b c} => OplaxFunctor.PseudoCore.mapCompIso F') f (g ≫ h)).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝² : Bicategory B\nC : Type u₂\ninst✝¹ : Bicategory C\nD : Type u₃\ninst✝ : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\nF' : OplaxFunctor.PseudoCore F\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom =\n    (OplaxFunctor.PseudoCore.mapCompIso F' (f ≫ g) h).hom ≫\n      (OplaxFunctor.PseudoCore.mapCompIso F' f g).hom ▷ (↑F.toPrelaxFunctor).map h ≫\n        (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom ≫\n          (↑F.toPrelaxFunctor).map f ◁ (OplaxFunctor.PseudoCore.mapCompIso F' g h).inv ≫\n            (OplaxFunctor.PseudoCore.mapCompIso F' f (g ≫ h)).inv\n[PROOFSTEP]\nrw [F'.mapCompIso_hom (f ≫ g) h, F'.mapCompIso_hom f g, ← F.map₂_associator_assoc, ← F'.mapCompIso_hom f (g ≫ h), ←\n  F'.mapCompIso_hom g h, hom_inv_whiskerLeft_assoc, hom_inv_id, comp_id]\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf : a✝ ⟶ b✝\ng h : b✝ ⟶ c✝\nη : g ⟶ h\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (f ◁ η) =\n    ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) f g).hom ≫\n      (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n          PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ≫\n        ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) f h).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf : a✝ ⟶ b✝\ng h : b✝ ⟶ c✝\nη : g ⟶ h\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (f ◁ η) =\n    OplaxFunctor.mapComp F f g ≫\n      (↑F.toPrelaxFunctor).map f ◁ PrelaxFunctor.map₂ F.toPrelaxFunctor η ≫ inv (OplaxFunctor.mapComp F f h)\n[PROOFSTEP]\nrw [← assoc, IsIso.eq_comp_inv, F.mapComp_naturality_right]\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (η ▷ h) =\n    ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) f✝ h).hom ≫\n      PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } η ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫\n        ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) g✝ h).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ : B\nf✝ g✝ : a✝ ⟶ b✝\nη : f✝ ⟶ g✝\nh : b✝ ⟶ c✝\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (η ▷ h) =\n    OplaxFunctor.mapComp F f✝ h ≫\n      PrelaxFunctor.map₂ F.toPrelaxFunctor η ▷ (↑F.toPrelaxFunctor).map h ≫ inv (OplaxFunctor.mapComp F g✝ h)\n[PROOFSTEP]\nrw [← assoc, IsIso.eq_comp_inv, F.mapComp_naturality_left]\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ { toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ } (α_ f g h).hom =\n    ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) (f ≫ g) h).hom ≫\n      ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) f g).hom ▷\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h ≫\n        (α_ ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f)\n              ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map g)\n              ((↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map h)).hom ≫\n          (↑{ toPrefunctor := ↑src✝, map₂ := fun {a b} {f g} => PrelaxFunctor.map₂ src✝ }).map f ◁\n              ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) g h).inv ≫\n            ((fun {a b c} f g => asIso (OplaxFunctor.mapComp F f g)) f (g ≫ h)).inv\n[PROOFSTEP]\ndsimp\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom =\n    OplaxFunctor.mapComp F (f ≫ g) h ≫\n      OplaxFunctor.mapComp F f g ▷ (↑F.toPrelaxFunctor).map h ≫\n        (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom ≫\n          (↑F.toPrelaxFunctor).map f ◁ inv (OplaxFunctor.mapComp F g h) ≫ inv (OplaxFunctor.mapComp F f (g ≫ h))\n[PROOFSTEP]\nsimp only [← assoc]\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom =\n    (((OplaxFunctor.mapComp F (f ≫ g) h ≫ OplaxFunctor.mapComp F f g ▷ (↑F.toPrelaxFunctor).map h) ≫\n          (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom) ≫\n        (↑F.toPrelaxFunctor).map f ◁ inv (OplaxFunctor.mapComp F g h)) ≫\n      inv (OplaxFunctor.mapComp F f (g ≫ h))\n[PROOFSTEP]\nrw [IsIso.eq_comp_inv, ← inv_whiskerLeft, IsIso.eq_comp_inv]\n[GOAL]\nB : Type u₁\ninst✝⁴ : Bicategory B\nC : Type u₂\ninst✝³ : Bicategory C\nD : Type u₃\ninst✝² : Bicategory D\nF✝ : Pseudofunctor B C\nF : OplaxFunctor B C\ninst✝¹ : ∀ (a : B), IsIso (OplaxFunctor.mapId F a)\ninst✝ : ∀ {a b c : B} (f : a ⟶ b) (g : b ⟶ c), IsIso (OplaxFunctor.mapComp F f g)\nsrc✝ : PrelaxFunctor B C := F.toPrelaxFunctor\na✝ b✝ c✝ d✝ : B\nf : a✝ ⟶ b✝\ng : b✝ ⟶ c✝\nh : c✝ ⟶ d✝\n⊢ (PrelaxFunctor.map₂ F.toPrelaxFunctor (α_ f g h).hom ≫ OplaxFunctor.mapComp F f (g ≫ h)) ≫\n      (↑F.toPrelaxFunctor).map f ◁ OplaxFunctor.mapComp F g h =\n    (OplaxFunctor.mapComp F (f ≫ g) h ≫ OplaxFunctor.mapComp F f g ▷ (↑F.toPrelaxFunctor).map h) ≫\n      (α_ ((↑F.toPrelaxFunctor).map f) ((↑F.toPrelaxFunctor).map g) ((↑F.toPrelaxFunctor).map h)).hom\n[PROOFSTEP]\nsimp only [assoc, F.map₂_associator]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Bicategory.Functor", "llama_tokens": 13398, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5583269943353745, "lm_q2_score": 0.5039061705290805, "lm_q1q2_score": 0.28134441761855017}}
{"text": "[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf g : CentroidHom α\nh : (fun f => f.toFun) f = (fun f => f.toFun) g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\ng : CentroidHom α\ntoAddMonoidHom✝ : α →+ α\nmap_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b\nmap_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b\nh :\n  (fun f => f.toFun)\n      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ } =\n    (fun f => f.toFun) g\n⊢ { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\ntoAddMonoidHom✝¹ : α →+ α\nmap_mul_left'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝¹) b\nmap_mul_right'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝¹) a * b\ntoAddMonoidHom✝ : α →+ α\nmap_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b\nmap_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b\nh :\n  (fun f => f.toFun)\n      { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =\n    (fun f => f.toFun)\n      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }\n⊢ { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =\n    { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase mk.mk.e_toAddMonoidHom.h\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\ntoAddMonoidHom✝¹ : α →+ α\nmap_mul_left'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝¹) b\nmap_mul_right'✝¹ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝¹) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝¹) a * b\ntoAddMonoidHom✝ : α →+ α\nmap_mul_left'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = a * ZeroHom.toFun (↑toAddMonoidHom✝) b\nmap_mul_right'✝ : ∀ (a b : α), ZeroHom.toFun (↑toAddMonoidHom✝) (a * b) = ZeroHom.toFun (↑toAddMonoidHom✝) a * b\nh :\n  (fun f => f.toFun)\n      { toAddMonoidHom := toAddMonoidHom✝¹, map_mul_left' := map_mul_left'✝¹, map_mul_right' := map_mul_right'✝¹ } =\n    (fun f => f.toFun)\n      { toAddMonoidHom := toAddMonoidHom✝, map_mul_left' := map_mul_left'✝, map_mul_right' := map_mul_right'✝ }\nx : α\n⊢ ↑toAddMonoidHom✝¹ x = ↑toAddMonoidHom✝ x\n[PROOFSTEP]\nexact congrFun h x\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nf' : α → α\nh : f' = ↑f\nsrc✝ : α →+ α := AddMonoidHom.copy f.toAddMonoidHom f' h\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nsimp_rw [h, map_mul_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nf' : α → α\nh : f' = ↑f\nsrc✝ : α →+ α := AddMonoidHom.copy f.toAddMonoidHom f' h\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := { toFun := f', map_zero' := (_ : ZeroHom.toFun (↑src✝) 0 = 0) },\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nsimp_rw [h, map_mul_right]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\ng f₁ f₂ : CentroidHom α\nhg : Injective ↑g\nh : comp g f₁ = comp g f₂\na : α\n⊢ ↑g (↑f₁ a) = ↑g (↑f₂ a)\n[PROOFSTEP]\nrw [← comp_apply, h, comp_apply]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f + ↑g\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nshow f (a * b) + g (a * b) = a * (f b + g b)\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f + ↑g\na b : α\n⊢ ↑f (a * b) + ↑g (a * b) = a * (↑f b + ↑g b)\n[PROOFSTEP]\nsimp [map_mul_left, mul_add]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f + ↑g\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nshow f (a * b) + g (a * b) = (f a + g a) * b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f + ↑g\na b : α\n⊢ ↑f (a * b) + ↑g (a * b) = (↑f a + ↑g a) * b\n[PROOFSTEP]\nsimp [map_mul_right, add_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nn : ℕ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nchange n • f (a * b) = a * n • f b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nn : ℕ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ n • ↑f (a * b) = a * n • ↑f b\n[PROOFSTEP]\nrw [map_mul_left f, ← mul_smul_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nn : ℕ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nchange n • f (a * b) = n • f a * b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nn : ℕ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ n • ↑f (a * b) = n • ↑f a * b\n[PROOFSTEP]\nrw [map_mul_right f, ← smul_mul_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn : ℕ\nsrc✝ : AddMonoid.End α := toEnd f ^ n\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n\na b : α\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.zero\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ↑(toEnd f ^ Nat.succ n) (a * b) = a * ↑(toEnd f ^ Nat.succ n) b\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ↑(toEnd f * toEnd f ^ n) (a * b) = a * ↑(toEnd f * toEnd f ^ n) b\n[PROOFSTEP]\nexact (congr_arg f.toEnd ih).trans (f.map_mul_left' _ _)\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn : ℕ\nsrc✝ : AddMonoid.End α := toEnd f ^ n\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\ninduction' n with n ih\n[GOAL]\ncase zero\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n\na b : α\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.zero\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nexact rfl\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        a *\n      b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        a *\n      b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ↑(toEnd f ^ Nat.succ n) (a * b) = ↑(toEnd f ^ Nat.succ n) a * b\n[PROOFSTEP]\nrw [pow_succ]\n[GOAL]\ncase succ\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nf : CentroidHom α\nn✝ : ℕ\nsrc✝¹ : AddMonoid.End α := toEnd f ^ n✝\na b : α\nn : ℕ\nih :\n  let src := toEnd f ^ n;\n  ZeroHom.toFun\n      (↑{ toZeroHom := ↑src,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src) (x + y) = ZeroHom.toFun (↑src) x + ZeroHom.toFun (↑src) y) })\n        a *\n      b\nsrc✝ : AddMonoid.End α := toEnd f ^ Nat.succ n\n⊢ ↑(toEnd f * toEnd f ^ n) (a * b) = ↑(toEnd f * toEnd f ^ n) a * b\n[PROOFSTEP]\nexact (congr_arg f.toEnd ih).trans (f.map_mul_right' _ _)\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nT S : CentroidHom α\na b : α\n⊢ (↑T ∘ ↑S) (a * b) = (↑S ∘ ↑T) (a * b)\n[PROOFSTEP]\nsimp\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocSemiring α\nT S : CentroidHom α\na b : α\n⊢ ↑T (↑S (a * b)) = ↑S (↑T (a * b))\n[PROOFSTEP]\nrw [map_mul_right, map_mul_left, ← map_mul_right, ← map_mul_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf : CentroidHom α\nsrc✝ : α →+ α := -↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nchange -f (a * b) = a * (-f b)\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf : CentroidHom α\nsrc✝ : α →+ α := -↑f\na b : α\n⊢ -↑f (a * b) = a * -↑f b\n[PROOFSTEP]\nsimp [map_mul_left]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf : CentroidHom α\nsrc✝ : α →+ α := -↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nchange -f (a * b) = (-f a) * b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf : CentroidHom α\nsrc✝ : α →+ α := -↑f\na b : α\n⊢ -↑f (a * b) = -↑f a * b\n[PROOFSTEP]\nsimp [map_mul_right]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f - ↑g\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nchange (FunLike.coe f - FunLike.coe g) (a * b) = a * (FunLike.coe f - FunLike.coe g) b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f - ↑g\na b : α\n⊢ (↑f - ↑g) (a * b) = a * (↑f - ↑g) b\n[PROOFSTEP]\nsimp [map_mul_left, mul_sub]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f - ↑g\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nchange (FunLike.coe f - FunLike.coe g) (a * b) = ((FunLike.coe f - FunLike.coe g) a) * b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nf g : CentroidHom α\nsrc✝ : α →+ α := ↑f - ↑g\na b : α\n⊢ (↑f - ↑g) (a * b) = (↑f - ↑g) a * b\n[PROOFSTEP]\nsimp [map_mul_right, sub_mul]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nn : ℤ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    a *\n      ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        b\n[PROOFSTEP]\nchange n • f (a * b) = a * n • f b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nn : ℤ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ n • ↑f (a * b) = a * n • ↑f b\n[PROOFSTEP]\nrw [map_mul_left f, ← mul_smul_comm]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nn : ℤ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ ZeroHom.toFun\n      (↑{ toZeroHom := ↑src✝,\n          map_add' :=\n            (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n      (a * b) =\n    ZeroHom.toFun\n        (↑{ toZeroHom := ↑src✝,\n            map_add' :=\n              (_ : ∀ (x y : α), ZeroHom.toFun (↑src✝) (x + y) = ZeroHom.toFun (↑src✝) x + ZeroHom.toFun (↑src✝) y) })\n        a *\n      b\n[PROOFSTEP]\nchange n • f (a * b) = n • f a * b\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalNonAssocRing α\nn : ℤ\nf : CentroidHom α\nsrc✝ : α →+ α := SMul.smul n ↑f\na b : α\n⊢ n • ↑f (a * b) = n • ↑f a * b\n[PROOFSTEP]\nrw [map_mul_right f, ← smul_mul_assoc]\n[GOAL]\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalRing α\nh : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0\nsrc✝ : Ring (CentroidHom α) := instRing\nf g : CentroidHom α\n⊢ f * g = g * f\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalRing α\nh : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0\nsrc✝ : Ring (CentroidHom α) := instRing\nf g : CentroidHom α\na✝ : α\n⊢ ↑(f * g) a✝ = ↑(g * f) a✝\n[PROOFSTEP]\nrefine' sub_eq_zero.1 ((or_self_iff _).1 <| (h _ _) fun r ↦ _)\n[GOAL]\ncase h\nF : Type u_1\nα : Type u_2\ninst✝ : NonUnitalRing α\nh : ∀ (a b : α), (∀ (r : α), a * r * b = 0) → a = 0 ∨ b = 0\nsrc✝ : Ring (CentroidHom α) := instRing\nf g : CentroidHom α\na✝ r : α\n⊢ (↑(f * g) a✝ - ↑(g * f) a✝) * r * (↑(f * g) a✝ - ↑(g * f) a✝) = 0\n[PROOFSTEP]\nrw [mul_assoc, sub_mul, sub_eq_zero, ← map_mul_right, ← map_mul_right, coe_mul, coe_mul, comp_mul_comm]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Hom.Centroid", "llama_tokens": 10593, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7090191337850932, "lm_q2_score": 0.3960681662740417, "lm_q1q2_score": 0.2808199081714713}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ a :: l ∈ subchain s ↔ a ∈ s ∧ l ∈ subchain s ∧ ∀ (b : α), b ∈ head? l → a < b\n[PROOFSTEP]\nsimp only [subchain, mem_setOf_eq, forall_mem_cons, chain'_cons', and_left_comm, and_comm, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ [a] ∈ subchain s ↔ a ∈ s\n[PROOFSTEP]\nsimp [cons_mem_subchain_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\ncases' (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha ha\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : chainHeight s = ⊤\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nrw [chainHeight_eq_iSup_subtype] at ha \n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : chainHeight s < ⊤\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nrw [chainHeight_eq_iSup_subtype] at ha \n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : ⨆ (l : ↑(subchain s)), ↑(length ↑l) = ⊤\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nobtain ⟨_, ⟨⟨l, h₁, h₂⟩, rfl⟩, h₃⟩ := not_bddAbove_iff'.mp ((WithTop.iSup_coe_eq_top _).mp ha) n\n[GOAL]\ncase inl.intro.intro.intro.mk.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : ⨆ (l : ↑(subchain s)), ↑(length ↑l) = ⊤\nl : List α\nh₁ : Chain' (fun x x_1 => x < x_1) l\nh₂ : ∀ (i : α), i ∈ l → i ∈ s\nh₃ :\n  ¬(fun x => ↑(length ↑x)) { val := l, property := (_ : Chain' (fun x x_1 => x < x_1) l ∧ ∀ (i : α), i ∈ l → i ∈ s) } ≤\n      n\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nexact\n  ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩,\n    (l.length_take n).trans <| min_eq_left <| le_of_not_ge h₃⟩\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : ⨆ (l : ↑(subchain s)), ↑(length ↑l) < ⊤\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nrw [ENat.iSup_coe_lt_top] at ha \n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : BddAbove (range fun l => length ↑l)\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nobtain ⟨⟨l, h₁, h₂⟩, e : l.length = _⟩ := Nat.sSup_mem (Set.range_nonempty _) ha\n[GOAL]\ncase inr.intro.mk.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : BddAbove (range fun l => length ↑l)\nl : List α\nh₁ : Chain' (fun x x_1 => x < x_1) l\nh₂ : ∀ (i : α), i ∈ l → i ∈ s\ne : length l = sSup (range fun l => length ↑l)\n⊢ ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nrefine' ⟨l.take n, ⟨h₁.take _, fun x h ↦ h₂ _ <| take_subset _ _ h⟩, (l.length_take n).trans <| min_eq_left <| _⟩\n[GOAL]\ncase inr.intro.mk.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nn : ℕ\nhn : ↑n ≤ chainHeight s\nha : BddAbove (range fun l => length ↑l)\nl : List α\nh₁ : Chain' (fun x x_1 => x < x_1) l\nh₂ : ∀ (i : α), i ∈ l → i ∈ s\ne : length l = sSup (range fun l => length ↑l)\n⊢ n ≤ length l\n[PROOFSTEP]\nrwa [e, ← Nat.cast_le (α := ℕ∞), sSup_range, ENat.coe_iSup ha, ← chainHeight_eq_iSup_subtype]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\n⊢ TFAE [↑n ≤ chainHeight s, ∃ l, l ∈ subchain s ∧ length l = n, ∃ l, l ∈ subchain s ∧ n ≤ length l]\n[PROOFSTEP]\ntfae_have 1 → 2\n[GOAL]\ncase tfae_1_to_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\n⊢ ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nexact s.exists_chain_of_le_chainHeight\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\n⊢ TFAE [↑n ≤ chainHeight s, ∃ l, l ∈ subchain s ∧ length l = n, ∃ l, l ∈ subchain s ∧ n ≤ length l]\n[PROOFSTEP]\ntfae_have 2 → 3\n[GOAL]\ncase tfae_2_to_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\n⊢ (∃ l, l ∈ subchain s ∧ length l = n) → ∃ l, l ∈ subchain s ∧ n ≤ length l\n[PROOFSTEP]\nrintro ⟨l, hls, he⟩\n[GOAL]\ncase tfae_2_to_3.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\nl : List α\nhls : l ∈ subchain s\nhe : length l = n\n⊢ ∃ l, l ∈ subchain s ∧ n ≤ length l\n[PROOFSTEP]\nexact ⟨l, hls, he.ge⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\ntfae_2_to_3 : (∃ l, l ∈ subchain s ∧ length l = n) → ∃ l, l ∈ subchain s ∧ n ≤ length l\n⊢ TFAE [↑n ≤ chainHeight s, ∃ l, l ∈ subchain s ∧ length l = n, ∃ l, l ∈ subchain s ∧ n ≤ length l]\n[PROOFSTEP]\ntfae_have 3 → 1\n[GOAL]\ncase tfae_3_to_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\ntfae_2_to_3 : (∃ l, l ∈ subchain s ∧ length l = n) → ∃ l, l ∈ subchain s ∧ n ≤ length l\n⊢ (∃ l, l ∈ subchain s ∧ n ≤ length l) → ↑n ≤ chainHeight s\n[PROOFSTEP]\nrintro ⟨l, hs, hn⟩\n[GOAL]\ncase tfae_3_to_1.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\ntfae_2_to_3 : (∃ l, l ∈ subchain s ∧ length l = n) → ∃ l, l ∈ subchain s ∧ n ≤ length l\nl : List α\nhs : l ∈ subchain s\nhn : n ≤ length l\n⊢ ↑n ≤ chainHeight s\n[PROOFSTEP]\nexact le_iSup₂_of_le l hs (WithTop.coe_le_coe.2 hn)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn : ℕ\ntfae_1_to_2 : ↑n ≤ chainHeight s → ∃ l, l ∈ subchain s ∧ length l = n\ntfae_2_to_3 : (∃ l, l ∈ subchain s ∧ length l = n) → ∃ l, l ∈ subchain s ∧ n ≤ length l\ntfae_3_to_1 : (∃ l, l ∈ subchain s ∧ n ≤ length l) → ↑n ≤ chainHeight s\n⊢ TFAE [↑n ≤ chainHeight s, ∃ l, l ∈ subchain s ∧ length l = n, ∃ l, l ∈ subchain s ∧ n ≤ length l]\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ chainHeight s = ⊤ ↔ ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\n[PROOFSTEP]\nrefine' ⟨fun h n ↦ le_chainHeight_iff.1 (le_top.trans_eq h.symm), fun h ↦ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\n⊢ chainHeight s = ⊤\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nh : chainHeight s ≠ ⊤\n⊢ ∃ n, ∀ (l : List α), l ∈ subchain s → length l ≠ n\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := WithTop.ne_top_iff_exists.1 h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nh : chainHeight s ≠ ⊤\nn : ℕ\nhn : ↑n = chainHeight s\n⊢ ∃ n, ∀ (l : List α), l ∈ subchain s → length l ≠ n\n[PROOFSTEP]\nexact\n  ⟨n + 1, fun l hs ↦\n    (Nat.lt_succ_iff.2 <| Nat.cast_le.1 <| (length_le_chainHeight_of_mem_subchain hs).trans_eq hn.symm).ne⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ 1 ≤ chainHeight s ↔ Set.Nonempty s\n[PROOFSTEP]\nrw [← Nat.cast_one, Set.le_chainHeight_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ (∃ l, l ∈ subchain s ∧ length l = 1) ↔ Set.Nonempty s\n[PROOFSTEP]\nsimp only [length_eq_one, @and_comm (_ ∈ _), @eq_comm _ _ [_], exists_exists_eq_and, singleton_mem_subchain_iff,\n  Set.Nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ chainHeight s = 0 ↔ s = ∅\n[PROOFSTEP]\nrw [← not_iff_not, ← Ne.def, ← ENat.one_le_iff_ne_zero, one_le_chainHeight_iff, nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\nn m : ℕ\n⊢ ↑n ≤ chainHeight s + ↑m ↔ ∃ l, l ∈ subchain s ∧ n ≤ length l + m\n[PROOFSTEP]\nsimp_rw [← tsub_le_iff_right, ← ENat.coe_sub, (le_chainHeight_TFAE s (n - m)).out 0 2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m ↔\n    ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\n[PROOFSTEP]\nrefine'\n  ⟨fun e l h ↦ le_chainHeight_add_nat_iff.1 ((add_le_add_right (length_le_chainHeight_of_mem_subchain h) _).trans e),\n    fun H ↦ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nby_cases s.chainHeight = ⊤\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nby_cases s.chainHeight = ⊤\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : chainHeight s = ⊤\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nsuffices t.chainHeight = ⊤ by\n  rw [this, top_add]\n  exact le_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : chainHeight s = ⊤\nthis : chainHeight t = ⊤\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nrw [this, top_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : chainHeight s = ⊤\nthis : chainHeight t = ⊤\n⊢ chainHeight s + ↑n ≤ ⊤\n[PROOFSTEP]\nexact le_top\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : chainHeight s = ⊤\n⊢ chainHeight t = ⊤\n[PROOFSTEP]\nrw [chainHeight_eq_top_iff] at h ⊢\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\n⊢ ∀ (n : ℕ), ∃ l, l ∈ subchain t ∧ length l = n\n[PROOFSTEP]\nintro k\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\nk : ℕ\n⊢ ∃ l, l ∈ subchain t ∧ length l = k\n[PROOFSTEP]\nhave := (le_chainHeight_TFAE t k).out 1 2\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\nk : ℕ\nthis : (∃ l, l ∈ subchain t ∧ length l = k) ↔ ∃ l, l ∈ subchain t ∧ k ≤ length l\n⊢ ∃ l, l ∈ subchain t ∧ length l = k\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\nk : ℕ\nthis : (∃ l, l ∈ subchain t ∧ length l = k) ↔ ∃ l, l ∈ subchain t ∧ k ≤ length l\n⊢ ∃ l, l ∈ subchain t ∧ k ≤ length l\n[PROOFSTEP]\nobtain ⟨l, hs, hl⟩ := h (k + m)\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl✝ : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\nk : ℕ\nthis : (∃ l, l ∈ subchain t ∧ length l = k) ↔ ∃ l, l ∈ subchain t ∧ k ≤ length l\nl : List α\nhs : l ∈ subchain s\nhl : length l = k + m\n⊢ ∃ l, l ∈ subchain t ∧ k ≤ length l\n[PROOFSTEP]\nobtain ⟨l', ht, hl'⟩ := H l hs\n[GOAL]\ncase pos.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl✝ : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ∀ (n : ℕ), ∃ l, l ∈ subchain s ∧ length l = n\nk : ℕ\nthis : (∃ l, l ∈ subchain t ∧ length l = k) ↔ ∃ l, l ∈ subchain t ∧ k ≤ length l\nl : List α\nhs : l ∈ subchain s\nhl : length l = k + m\nl' : List β\nht : l' ∈ subchain t\nhl' : length l + n ≤ length l' + m\n⊢ ∃ l, l ∈ subchain t ∧ k ≤ length l\n[PROOFSTEP]\nexact ⟨l', ht, (add_le_add_iff_right m).1 <| _root_.trans (hl.symm.trans_le le_self_add) hl'⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ¬chainHeight s = ⊤\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := WithTop.ne_top_iff_exists.1 h\n[GOAL]\ncase neg.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ¬chainHeight s = ⊤\nk : ℕ\nhk : ↑k = chainHeight s\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nobtain ⟨l, hs, hl⟩ := le_chainHeight_iff.1 hk.le\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl✝ : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ¬chainHeight s = ⊤\nk : ℕ\nhk : ↑k = chainHeight s\nl : List α\nhs : l ∈ subchain s\nhl : length l = k\n⊢ chainHeight s + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nrw [← hk, ← hl]\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl✝ : List α\na : α\ns : Set α\nt : Set β\nn m : ℕ\nH : ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l + n ≤ length l' + m\nh : ¬chainHeight s = ⊤\nk : ℕ\nhk : ↑k = chainHeight s\nl : List α\nhs : l ∈ subchain s\nhl : length l = k\n⊢ ↑(length l) + ↑n ≤ chainHeight t + ↑m\n[PROOFSTEP]\nexact le_chainHeight_add_nat_iff.2 (H l hs)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\n⊢ TFAE\n    [chainHeight s ≤ chainHeight t, ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l = length l',\n      ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l']\n[PROOFSTEP]\ntfae_have 1 ↔ 3\n[GOAL]\ncase tfae_1_iff_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\n⊢ chainHeight s ≤ chainHeight t ↔ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n[PROOFSTEP]\nconvert ← chainHeight_add_le_chainHeight_add s t 0 0\n[GOAL]\ncase h.e'_1.h.e'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\n⊢ chainHeight s + ↑0 = chainHeight s\n[PROOFSTEP]\napply add_zero\n[GOAL]\ncase h.e'_1.h.e'_4\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\n⊢ chainHeight t + ↑0 = chainHeight t\n[PROOFSTEP]\napply add_zero\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\ntfae_1_iff_3 :\n  chainHeight s ≤ chainHeight t ↔ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n⊢ TFAE\n    [chainHeight s ≤ chainHeight t, ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l = length l',\n      ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l']\n[PROOFSTEP]\ntfae_have 2 ↔ 3\n[GOAL]\ncase tfae_2_iff_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\ntfae_1_iff_3 :\n  chainHeight s ≤ chainHeight t ↔ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n⊢ (∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l = length l') ↔\n    ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n[PROOFSTEP]\nrefine' forall₂_congr fun l hl ↦ _\n[GOAL]\ncase tfae_2_iff_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl✝ : List α\na : α\ns : Set α\nt : Set β\ntfae_1_iff_3 :\n  chainHeight s ≤ chainHeight t ↔ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\nl : List α\nhl : l ∈ subchain s\n⊢ (∃ l', l' ∈ subchain t ∧ length l = length l') ↔ ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n[PROOFSTEP]\nsimp_rw [← (le_chainHeight_TFAE t l.length).out 1 2, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t✝ : Set α\nl : List α\na : α\ns : Set α\nt : Set β\ntfae_1_iff_3 :\n  chainHeight s ≤ chainHeight t ↔ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\ntfae_2_iff_3 :\n  (∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l = length l') ↔\n    ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l'\n⊢ TFAE\n    [chainHeight s ≤ chainHeight t, ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l = length l',\n      ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain t ∧ length l ≤ length l']\n[PROOFSTEP]\ntfae_finish\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ chainHeight (f '' s) = chainHeight s\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ chainHeight (f '' s) ≤ chainHeight s\n[PROOFSTEP]\nrw [chainHeight_le_chainHeight_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ chainHeight s ≤ chainHeight (f '' s)\n[PROOFSTEP]\nrw [chainHeight_le_chainHeight_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ length l = length l'\n[PROOFSTEP]\nsuffices ∀ l ∈ (f '' s).subchain, ∃ l' ∈ s.subchain, map f l' = l\n  by\n  intro l hl\n  obtain ⟨l', h₁, rfl⟩ := this l hl\n  exact ⟨l', h₁, length_map _ _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nthis : ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = l\n⊢ ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ length l = length l'\n[PROOFSTEP]\nintro l hl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nthis : ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = l\nl : List β\nhl : l ∈ subchain (f '' s)\n⊢ ∃ l', l' ∈ subchain s ∧ length l = length l'\n[PROOFSTEP]\nobtain ⟨l', h₁, rfl⟩ := this l hl\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nthis : ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = l\nl' : List α\nh₁ : l' ∈ subchain s\nhl : map f l' ∈ subchain (f '' s)\n⊢ ∃ l'_1, l'_1 ∈ subchain s ∧ length (map f l') = length l'_1\n[PROOFSTEP]\nexact ⟨l', h₁, length_map _ _⟩\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ ∀ (l : List β), l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = l\n[PROOFSTEP]\nintro l\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List β\n⊢ l ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = l\n[PROOFSTEP]\ninduction' l with x xs hx\n[GOAL]\ncase a.nil\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ [] ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = []\n[PROOFSTEP]\nexact fun _ ↦ ⟨nil, ⟨trivial, fun x h ↦ (not_mem_nil x h).elim⟩, rfl⟩\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : β\nxs : List β\nhx : xs ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = xs\n⊢ x :: xs ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = x :: xs\n[PROOFSTEP]\nintro h\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : β\nxs : List β\nhx : xs ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = xs\nh : x :: xs ∈ subchain (f '' s)\n⊢ ∃ l', l' ∈ subchain s ∧ map f l' = x :: xs\n[PROOFSTEP]\nrw [cons_mem_subchain_iff] at h \n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : β\nxs : List β\nhx : xs ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = xs\nh : x ∈ f '' s ∧ xs ∈ subchain (f '' s) ∧ ∀ (b : β), b ∈ head? xs → x < b\n⊢ ∃ l', l' ∈ subchain s ∧ map f l' = x :: xs\n[PROOFSTEP]\nobtain ⟨⟨x, hx', rfl⟩, h₁, h₂⟩ := h\n[GOAL]\ncase a.cons.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nxs : List β\nhx : xs ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = xs\nx : α\nhx' : x ∈ s\nh₁ : xs ∈ subchain (f '' s)\nh₂ : ∀ (b : β), b ∈ head? xs → f x < b\n⊢ ∃ l', l' ∈ subchain s ∧ map f l' = f x :: xs\n[PROOFSTEP]\nobtain ⟨l', h₃, rfl⟩ := hx h₁\n[GOAL]\ncase a.cons.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : α\nhx' : x ∈ s\nl' : List α\nh₃ : l' ∈ subchain s\nhx : map f l' ∈ subchain (f '' s) → ∃ l'_1, l'_1 ∈ subchain s ∧ map f l'_1 = map f l'\nh₁ : map f l' ∈ subchain (f '' s)\nh₂ : ∀ (b : β), b ∈ head? (map f l') → f x < b\n⊢ ∃ l'_1, l'_1 ∈ subchain s ∧ map f l'_1 = f x :: map f l'\n[PROOFSTEP]\nrefine' ⟨x :: l', Set.cons_mem_subchain_iff.mpr ⟨hx', h₃, _⟩, rfl⟩\n[GOAL]\ncase a.cons.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : α\nhx' : x ∈ s\nl' : List α\nh₃ : l' ∈ subchain s\nhx : map f l' ∈ subchain (f '' s) → ∃ l'_1, l'_1 ∈ subchain s ∧ map f l'_1 = map f l'\nh₁ : map f l' ∈ subchain (f '' s)\nh₂ : ∀ (b : β), b ∈ head? (map f l') → f x < b\n⊢ ∀ (b : α), b ∈ head? l' → x < b\n[PROOFSTEP]\ncases l'\n[GOAL]\ncase a.cons.intro.intro.intro.intro.intro.intro.nil\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : α\nhx' : x ∈ s\nh₃ : [] ∈ subchain s\nhx : map f [] ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = map f []\nh₁ : map f [] ∈ subchain (f '' s)\nh₂ : ∀ (b : β), b ∈ head? (map f []) → f x < b\n⊢ ∀ (b : α), b ∈ head? [] → x < b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.cons.intro.intro.intro.intro.intro.intro.cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nx : α\nhx' : x ∈ s\nhead✝ : α\ntail✝ : List α\nh₃ : head✝ :: tail✝ ∈ subchain s\nhx : map f (head✝ :: tail✝) ∈ subchain (f '' s) → ∃ l', l' ∈ subchain s ∧ map f l' = map f (head✝ :: tail✝)\nh₁ : map f (head✝ :: tail✝) ∈ subchain (f '' s)\nh₂ : ∀ (b : β), b ∈ head? (map f (head✝ :: tail✝)) → f x < b\n⊢ ∀ (b : α), b ∈ head? (head✝ :: tail✝) → x < b\n[PROOFSTEP]\nsimpa [← hf] using h₂\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\n⊢ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain (f '' s) ∧ length l = length l'\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\n⊢ ∃ l', l' ∈ subchain (f '' s) ∧ length l = length l'\n[PROOFSTEP]\nrefine' ⟨l.map f, ⟨_, _⟩, _⟩\n[GOAL]\ncase a.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\n⊢ Chain' (fun x x_1 => x < x_1) (map f l)\n[PROOFSTEP]\nsimp_rw [chain'_map, ← hf]\n[GOAL]\ncase a.refine'_1\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\n⊢ Chain' (fun a b => a < b) l\n[PROOFSTEP]\nexact hl.1\n[GOAL]\ncase a.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\n⊢ ∀ (i : β), i ∈ map f l → i ∈ f '' s\n[PROOFSTEP]\nintro _ e\n[GOAL]\ncase a.refine'_2\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\ni✝ : β\ne : i✝ ∈ map f l\n⊢ i✝ ∈ f '' s\n[PROOFSTEP]\nobtain ⟨a, ha, rfl⟩ := mem_map.mp e\n[GOAL]\ncase a.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na✝ : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\na : α\nha : a ∈ l\ne : f a ∈ map f l\n⊢ f a ∈ f '' s\n[PROOFSTEP]\nexact Set.mem_image_of_mem _ (hl.2 _ ha)\n[GOAL]\ncase a.refine'_3\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns✝ t : Set α\nl✝ : List α\na : α\nf : α → β\nhf : ∀ {x y : α}, x < y ↔ f x < f y\ns : Set α\nl : List α\nhl : l ∈ subchain s\n⊢ length l = length (map f l)\n[PROOFSTEP]\nrw [length_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ chainHeight (↑ofDual ⁻¹' s) = chainHeight s\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ chainHeight (↑ofDual ⁻¹' s) ≤ chainHeight s\n[PROOFSTEP]\nrw [chainHeight_le_chainHeight_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ ∀ (l : List αᵒᵈ), l ∈ subchain (↑ofDual ⁻¹' s) → ∃ l', l' ∈ subchain s ∧ length l = length l'\n[PROOFSTEP]\nrintro l ⟨h₁, h₂⟩\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nl : List αᵒᵈ\nh₁ : Chain' (fun x x_1 => x < x_1) l\nh₂ : ∀ (i : αᵒᵈ), i ∈ l → i ∈ ↑ofDual ⁻¹' s\n⊢ ∃ l', l' ∈ subchain s ∧ length l = length l'\n[PROOFSTEP]\nexact ⟨l.reverse, ⟨chain'_reverse.mpr h₁, fun i h ↦ h₂ i (mem_reverse.mp h)⟩, (length_reverse _).symm⟩\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ chainHeight s ≤ chainHeight (↑ofDual ⁻¹' s)\n[PROOFSTEP]\nrw [chainHeight_le_chainHeight_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl : List α\na : α\n⊢ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain (↑ofDual ⁻¹' s) ∧ length l = length l'\n[PROOFSTEP]\nrintro l ⟨h₁, h₂⟩\n[GOAL]\ncase a.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LT α\ninst✝ : LT β\ns t : Set α\nl✝ : List α\na : α\nl : List α\nh₁ : Chain' (fun x x_1 => x < x_1) l\nh₂ : ∀ (i : α), i ∈ l → i ∈ s\n⊢ ∃ l', l' ∈ subchain (↑ofDual ⁻¹' s) ∧ length l = length l'\n[PROOFSTEP]\nexact ⟨l.reverse, ⟨chain'_reverse.mpr h₁, fun i h ↦ h₂ i (mem_reverse.mp h)⟩, (length_reverse _).symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight s = ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight s ≤ ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i)\n[PROOFSTEP]\nrefine' iSup₂_le _\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ ∀ (i : List α), i ∈ subchain s → ↑(length i) ≤ ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i)\n[PROOFSTEP]\nrintro (_ | ⟨x, xs⟩) h\n[GOAL]\ncase a.nil\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nh : [] ∈ subchain s\n⊢ ↑(length []) ≤ ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i)\n[PROOFSTEP]\nexact zero_le _\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\n⊢ ↑(length (x :: xs)) ≤ ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i)\n[PROOFSTEP]\napply le_trans _ (le_iSup₂ x (cons_mem_subchain_iff.mp h).1)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\n⊢ ↑(length (x :: xs)) ≤ chainHeight (s ∩ Ici x)\n[PROOFSTEP]\napply length_le_chainHeight_of_mem_subchain\n[GOAL]\ncase hl\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\n⊢ x :: xs ∈ subchain (s ∩ Ici x)\n[PROOFSTEP]\nrefine' ⟨h.1, fun i hi ↦ ⟨h.2 i hi, _⟩⟩\n[GOAL]\ncase hl\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\ni : α\nhi : i ∈ x :: xs\n⊢ i ∈ Ici x\n[PROOFSTEP]\ncases hi\n[GOAL]\ncase hl.head\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\n⊢ x ∈ Ici x\n[PROOFSTEP]\nexact left_mem_Ici\n[GOAL]\ncase hl.tail\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\ni : α\na✝ : Mem i xs\n⊢ i ∈ Ici x\n[PROOFSTEP]\nrename_i hi\n[GOAL]\ncase hl.tail\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\ni : α\nhi : Mem i xs\n⊢ i ∈ Ici x\n[PROOFSTEP]\ncases' chain'_iff_pairwise.mp h.1 with _ _ h'\n[GOAL]\ncase hl.tail.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nx : α\nxs : List α\nh : x :: xs ∈ subchain s\ni : α\nhi : Mem i xs\na✝ : List.Pairwise (fun x x_1 => x < x_1) xs\nh' : ∀ (a' : α), a' ∈ xs → x < a'\n⊢ i ∈ Ici x\n[PROOFSTEP]\nexact (h' _ hi).le\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Ici i) ≤ chainHeight s\n[PROOFSTEP]\nexact iSup₂_le fun i _ ↦ chainHeight_mono <| Set.inter_subset_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight s = ⨆ (i : α) (_ : i ∈ s), chainHeight (s ∩ Iic i)\n[PROOFSTEP]\nsimp_rw [← chainHeight_dual (_ ∩ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight s = ⨆ (i : α) (_ : i ∈ s), chainHeight (↑ofDual ⁻¹' (s ∩ Iic i))\n[PROOFSTEP]\nrw [← chainHeight_dual, chainHeight_eq_iSup_Ici]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ ⨆ (i : αᵒᵈ) (_ : i ∈ ↑ofDual ⁻¹' s), chainHeight (↑ofDual ⁻¹' s ∩ Ici i) =\n    ⨆ (i : α) (_ : i ∈ s), chainHeight (↑ofDual ⁻¹' (s ∩ Iic i))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ chainHeight (insert a s) = chainHeight s + 1\n[PROOFSTEP]\nrw [← add_zero (insert a s).chainHeight]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ chainHeight (insert a s) + 0 = chainHeight s + 1\n[PROOFSTEP]\nchange (insert a s).chainHeight + (0 : ℕ) = s.chainHeight + (1 : ℕ)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ chainHeight (insert a s) + ↑0 = chainHeight s + ↑1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ chainHeight (insert a s) + ↑0 ≤ chainHeight s + ↑1\n[PROOFSTEP]\nrw [chainHeight_add_le_chainHeight_add]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ chainHeight s + ↑1 ≤ chainHeight (insert a s) + ↑0\n[PROOFSTEP]\nrw [chainHeight_add_le_chainHeight_add]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ ∀ (l : List α), l ∈ subchain (insert a s) → ∃ l', l' ∈ subchain s ∧ length l + 0 ≤ length l' + 1\n[PROOFSTEP]\nrintro (_ | ⟨y, ys⟩) h\n[GOAL]\ncase a.nil\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nh : [] ∈ subchain (insert a s)\n⊢ ∃ l', l' ∈ subchain s ∧ length [] + 0 ≤ length l' + 1\n[PROOFSTEP]\nexact ⟨[], nil_mem_subchain _, zero_le _⟩\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\ny : α\nys : List α\nh : y :: ys ∈ subchain (insert a s)\n⊢ ∃ l', l' ∈ subchain s ∧ length (y :: ys) + 0 ≤ length l' + 1\n[PROOFSTEP]\nhave h' := cons_mem_subchain_iff.mp h\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\ny : α\nys : List α\nh : y :: ys ∈ subchain (insert a s)\nh' : y ∈ insert a s ∧ ys ∈ subchain (insert a s) ∧ ∀ (b : α), b ∈ head? ys → y < b\n⊢ ∃ l', l' ∈ subchain s ∧ length (y :: ys) + 0 ≤ length l' + 1\n[PROOFSTEP]\nrefine' ⟨ys, ⟨h'.2.1.1, fun i hi ↦ _⟩, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\ny : α\nys : List α\nh : y :: ys ∈ subchain (insert a s)\nh' : y ∈ insert a s ∧ ys ∈ subchain (insert a s) ∧ ∀ (b : α), b ∈ head? ys → y < b\n⊢ length (y :: ys) + 0 ≤ length ys + 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\ny : α\nys : List α\nh : y :: ys ∈ subchain (insert a s)\nh' : y ∈ insert a s ∧ ys ∈ subchain (insert a s) ∧ ∀ (b : α), b ∈ head? ys → y < b\ni : α\nhi : i ∈ ys\n⊢ i ∈ s\n[PROOFSTEP]\napply (h'.2.1.2 i hi).resolve_left\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\ny : α\nys : List α\nh : y :: ys ∈ subchain (insert a s)\nh' : y ∈ insert a s ∧ ys ∈ subchain (insert a s) ∧ ∀ (b : α), b ∈ head? ys → y < b\ni : α\nhi : i ∈ ys\n⊢ ¬i = a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\ny : α\nys : List α\ni : α\nhi : i ∈ ys\nhx : ∀ (b : α), b ∈ s → i < b\nh : y :: ys ∈ subchain (insert i s)\nh' : y ∈ insert i s ∧ ys ∈ subchain (insert i s) ∧ ∀ (b : α), b ∈ head? ys → y < b\n⊢ False\n[PROOFSTEP]\ncases' chain'_iff_pairwise.mp h.1 with _ _ hy\n[GOAL]\ncase a.cons.cons\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\ny : α\nys : List α\ni : α\nhi : i ∈ ys\nhx : ∀ (b : α), b ∈ s → i < b\nh : y :: ys ∈ subchain (insert i s)\nh' : y ∈ insert i s ∧ ys ∈ subchain (insert i s) ∧ ∀ (b : α), b ∈ head? ys → y < b\na✝ : List.Pairwise (fun x x_1 => x < x_1) ys\nhy : ∀ (a' : α), a' ∈ ys → y < a'\n⊢ False\n[PROOFSTEP]\ncases' h'.1 with h' h'\n[GOAL]\ncase a.cons.cons.inl\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\ny : α\nys : List α\ni : α\nhi : i ∈ ys\nhx : ∀ (b : α), b ∈ s → i < b\nh : y :: ys ∈ subchain (insert i s)\nh'✝ : y ∈ insert i s ∧ ys ∈ subchain (insert i s) ∧ ∀ (b : α), b ∈ head? ys → y < b\na✝ : List.Pairwise (fun x x_1 => x < x_1) ys\nhy : ∀ (a' : α), a' ∈ ys → y < a'\nh' : y = i\n⊢ False\ncase a.cons.cons.inr\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\ny : α\nys : List α\ni : α\nhi : i ∈ ys\nhx : ∀ (b : α), b ∈ s → i < b\nh : y :: ys ∈ subchain (insert i s)\nh'✝ : y ∈ insert i s ∧ ys ∈ subchain (insert i s) ∧ ∀ (b : α), b ∈ head? ys → y < b\na✝ : List.Pairwise (fun x x_1 => x < x_1) ys\nhy : ∀ (a' : α), a' ∈ ys → y < a'\nh' : y ∈ s\n⊢ False\n[PROOFSTEP]\nexacts [(hy _ hi).ne h', not_le_of_gt (hy _ hi) (hx _ h').le]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\n⊢ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain (insert a s) ∧ length l + 1 ≤ length l' + 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ ∃ l', l' ∈ subchain (insert a s) ∧ length l + 1 ≤ length l' + 0\n[PROOFSTEP]\nrefine' ⟨a :: l, ⟨_, _⟩, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ length l + 1 ≤ length (a :: l) + 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.refine'_1\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ Chain' (fun x x_1 => x < x_1) (a :: l)\n[PROOFSTEP]\nrw [chain'_cons']\n[GOAL]\ncase a.refine'_1\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ (∀ (y : α), y ∈ head? l → a < y) ∧ Chain' (fun x x_1 => x < x_1) l\n[PROOFSTEP]\nexact ⟨fun y hy ↦ hx _ (hl.2 _ (mem_of_mem_head? hy)), hl.1⟩\n[GOAL]\ncase a.refine'_2\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ ∀ (i : α), i ∈ a :: l → i ∈ insert a s\n[PROOFSTEP]\nrintro x (_ | _)\n[GOAL]\ncase a.refine'_2.head\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\n⊢ a ∈ insert a s\ncase a.refine'_2.tail\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nhx : ∀ (b : α), b ∈ s → a < b\nl : List α\nhl : l ∈ subchain s\nx : α\na✝ : Mem x l\n⊢ x ∈ insert a s\n[PROOFSTEP]\nexacts [Or.inl (Set.mem_singleton a), Or.inr (hl.2 x ‹_›)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nha : ∀ (b : α), b ∈ s → b < a\n⊢ chainHeight (insert a s) = chainHeight s + 1\n[PROOFSTEP]\nrw [← chainHeight_dual, ← chainHeight_dual s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\na : α\nha : ∀ (b : α), b ∈ s → b < a\n⊢ chainHeight (↑ofDual ⁻¹' insert a s) = chainHeight (↑ofDual ⁻¹' s) + 1\n[PROOFSTEP]\nexact chainHeight_insert_of_forall_gt _ ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight (s ∪ t) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nclassical\nrefine' iSup₂_le fun l hl ↦ _\nlet l₁ := l.filter (· ∈ s)\nlet l₂ := l.filter (· ∈ t)\nhave hl₁ : ↑l₁.length ≤ s.chainHeight :=\n  by\n  apply Set.length_le_chainHeight_of_mem_subchain\n  exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\nhave hl₂ : ↑l₂.length ≤ t.chainHeight :=\n  by\n  apply Set.length_le_chainHeight_of_mem_subchain\n  exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\nrefine' le_trans _ (add_le_add hl₁ hl₂)\nsimp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.coe_filter]\nrw [Multiset.filter_add_filter, Multiset.filter_eq_self.mpr, Multiset.card_add, Nat.cast_add]\nexacts [le_add_right rfl.le, hl.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\n⊢ chainHeight (s ∪ t) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nrefine' iSup₂_le fun l hl ↦ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\n⊢ ↑(length l) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nlet l₁ := l.filter (· ∈ s)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\n⊢ ↑(length l) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nlet l₂ := l.filter (· ∈ t)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\n⊢ ↑(length l) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nhave hl₁ : ↑l₁.length ≤ s.chainHeight :=\n  by\n  apply Set.length_le_chainHeight_of_mem_subchain\n  exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\n⊢ ↑(length l₁) ≤ chainHeight s\n[PROOFSTEP]\napply Set.length_le_chainHeight_of_mem_subchain\n[GOAL]\ncase hl\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\n⊢ l₁ ∈ subchain s\n[PROOFSTEP]\nexact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\ni : α\nh : i ∈ l₁\n⊢ i ∈ s\n[PROOFSTEP]\nsimpa using (of_mem_filter h : _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\n⊢ ↑(length l) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nhave hl₂ : ↑l₂.length ≤ t.chainHeight :=\n  by\n  apply Set.length_le_chainHeight_of_mem_subchain\n  exact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\n⊢ ↑(length l₂) ≤ chainHeight t\n[PROOFSTEP]\napply Set.length_le_chainHeight_of_mem_subchain\n[GOAL]\ncase hl\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\n⊢ l₂ ∈ subchain t\n[PROOFSTEP]\nexact ⟨hl.1.sublist (filter_sublist _), fun i h ↦ by simpa using (of_mem_filter h : _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\ni : α\nh : i ∈ l₂\n⊢ i ∈ t\n[PROOFSTEP]\nsimpa using (of_mem_filter h : _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\nhl₂ : ↑(length l₂) ≤ chainHeight t\n⊢ ↑(length l) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nrefine' le_trans _ (add_le_add hl₁ hl₂)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\nhl₂ : ↑(length l₂) ≤ chainHeight t\n⊢ ↑(length l) ≤ ↑(length l₁) + ↑(length l₂)\n[PROOFSTEP]\nsimp_rw [← Nat.cast_add, ← Multiset.coe_card, ← Multiset.card_add, ← Multiset.coe_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\nhl₂ : ↑(length l₂) ≤ chainHeight t\n⊢ ↑(↑Multiset.card ↑l) ≤ ↑(↑Multiset.card (Multiset.filter (fun b => b ∈ s) ↑l + Multiset.filter (fun b => b ∈ t) ↑l))\n[PROOFSTEP]\nrw [Multiset.filter_add_filter, Multiset.filter_eq_self.mpr, Multiset.card_add, Nat.cast_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\nhl₂ : ↑(length l₂) ≤ chainHeight t\n⊢ ↑(↑Multiset.card ↑l) ≤ ↑(↑Multiset.card ↑l) + ↑(↑Multiset.card (Multiset.filter (fun a => a ∈ s ∧ a ∈ t) ↑l))\nα : Type u_1\nβ : Type u_2\ns t : Set α\ninst✝ : Preorder α\nl : List α\nhl : l ∈ subchain (s ∪ t)\nl₁ : List α := filter (fun x => decide (x ∈ s)) l\nl₂ : List α := filter (fun x => decide (x ∈ t)) l\nhl₁ : ↑(length l₁) ≤ chainHeight s\nhl₂ : ↑(length l₂) ≤ chainHeight t\n⊢ ∀ (a : α), a ∈ ↑l → a ∈ s ∨ a ∈ t\n[PROOFSTEP]\nexacts [le_add_right rfl.le, hl.2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\n⊢ chainHeight (s ∪ t) = chainHeight s + chainHeight t\n[PROOFSTEP]\ncases h : t.chainHeight\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nh : chainHeight t = none\n⊢ chainHeight (s ∪ t) = chainHeight s + none\n[PROOFSTEP]\nrw [WithTop.none_eq_top, add_top, eq_top_iff, ← WithTop.none_eq_top, ← h]\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nh : chainHeight t = none\n⊢ chainHeight t ≤ chainHeight (s ∪ t)\n[PROOFSTEP]\nexact Set.chainHeight_mono (Set.subset_union_right _ _)\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\n⊢ chainHeight (s ∪ t) = chainHeight s + some val✝\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase some.a\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\n⊢ chainHeight (s ∪ t) ≤ chainHeight s + some val✝\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase some.a\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\n⊢ chainHeight (s ∪ t) ≤ chainHeight s + chainHeight t\n[PROOFSTEP]\nexact chainHeight_union_le\n[GOAL]\ncase some.a\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\n⊢ chainHeight s + some val✝ ≤ chainHeight (s ∪ t)\n[PROOFSTEP]\nrw [WithTop.some_eq_coe, ← add_zero (s ∪ t).chainHeight, ← WithTop.coe_zero, ENat.some_eq_coe,\n  chainHeight_add_le_chainHeight_add]\n[GOAL]\ncase some.a\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\n⊢ ∀ (l : List α), l ∈ subchain s → ∃ l', l' ∈ subchain (s ∪ t) ∧ length l + val✝ ≤ length l' + 0\n[PROOFSTEP]\nintro l hl\n[GOAL]\ncase some.a\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nval✝ : ℕ\nh : chainHeight t = some val✝\nl : List α\nhl : l ∈ subchain s\n⊢ ∃ l', l' ∈ subchain (s ∪ t) ∧ length l + val✝ ≤ length l' + 0\n[PROOFSTEP]\nobtain ⟨l', hl', rfl⟩ := exists_chain_of_le_chainHeight t h.symm.le\n[GOAL]\ncase some.a.intro.intro\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\n⊢ ∃ l'_1, l'_1 ∈ subchain (s ∪ t) ∧ length l + length l' ≤ length l'_1 + 0\n[PROOFSTEP]\nrefine' ⟨l ++ l', ⟨Chain'.append hl.1 hl'.1 fun x hx y hy ↦ _, fun i hi ↦ _⟩, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\n⊢ length l + length l' ≤ length (l ++ l') + 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.a.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\nx : α\nhx : x ∈ getLast? l\ny : α\nhy : y ∈ head? l'\n⊢ x < y\n[PROOFSTEP]\nexact H x (hl.2 _ <| mem_of_mem_getLast? hx) y (hl'.2 _ <| mem_of_mem_head? hy)\n[GOAL]\ncase some.a.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\ni : α\nhi : i ∈ l ++ l'\n⊢ i ∈ s ∪ t\n[PROOFSTEP]\nrw [mem_append] at hi \n[GOAL]\ncase some.a.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\ni : α\nhi : i ∈ l ∨ i ∈ l'\n⊢ i ∈ s ∪ t\n[PROOFSTEP]\ncases' hi with hi hi\n[GOAL]\ncase some.a.intro.intro.refine'_2.inl\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\ni : α\nhi : i ∈ l\n⊢ i ∈ s ∪ t\ncase some.a.intro.intro.refine'_2.inr\nα : Type u_1\nβ : Type u_2\ns✝ t✝ : Set α\ninst✝ : Preorder α\ns t : Set α\nH : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a < b\nl : List α\nhl : l ∈ subchain s\nl' : List α\nhl' : l' ∈ subchain t\nh : chainHeight t = some (length l')\ni : α\nhi : i ∈ l'\n⊢ i ∈ s ∪ t\n[PROOFSTEP]\nexacts [Or.inl (hl.2 _ hi), Or.inr (hl'.2 _ hi)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\n⊢ WellFoundedGT ↑s\n[PROOFSTEP]\nhaveI : IsTrans { x // x ∈ s } (↑· < ↑·) := inferInstance\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\n⊢ WellFoundedGT ↑s\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := WithTop.ne_top_iff_exists.1 hs\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\n⊢ WellFoundedGT ↑s\n[PROOFSTEP]\nrefine' ⟨RelEmbedding.wellFounded_iff_no_descending_seq.2 ⟨fun f ↦ _⟩⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\n⊢ False\n[PROOFSTEP]\nrefine' n.lt_succ_self.not_le (WithTop.coe_le_coe.1 <| hn.symm ▸ _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\n⊢ ↑(Nat.succ n) ≤ chainHeight s\n[PROOFSTEP]\nrefine'\n  le_iSup₂_of_le _\n    ⟨chain'_map_of_chain' ((↑) : { x // x ∈ s } → α) (fun _ _ ↦ id)\n        (chain'_iff_pairwise.2 <| pairwise_ofFn.2 fun i j ↦ f.map_rel_iff.2),\n      fun i h ↦ _⟩\n    _\n[GOAL]\ncase intro.refine'_1\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\n⊢ ℕ\n[PROOFSTEP]\nexact n.succ\n[GOAL]\ncase intro.refine'_2\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\ni : α\nh : i ∈ map Subtype.val (ofFn fun i => ↑f ↑i)\n⊢ i ∈ s\n[PROOFSTEP]\nobtain ⟨a, -, rfl⟩ := mem_map.1 h\n[GOAL]\ncase intro.refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\na : { x // x ∈ s }\nh : ↑a ∈ map Subtype.val (ofFn fun i => ↑f ↑i)\n⊢ ↑a ∈ s\n[PROOFSTEP]\nexact a.prop\n[GOAL]\ncase intro.refine'_3\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\n⊢ ↑(Nat.succ n) ≤ ↑(length (map Subtype.val (ofFn fun i => ↑f ↑i)))\n[PROOFSTEP]\nrw [length_map, length_ofFn]\n[GOAL]\ncase intro.refine'_3\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\nthis : IsTrans { x // x ∈ s } fun x x_1 => x < x_1\nn : ℕ\nhn : ↑n = chainHeight s\nf : (fun x x_1 => x > x_1) ↪r fun x x_1 => x > x_1\n⊢ ↑(Nat.succ n) ≤ ↑(Nat.succ n)\n[PROOFSTEP]\nexact le_rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns✝ t : Set α\ninst✝ : Preorder α\ns : Set α\nhs : chainHeight s ≠ ⊤\n⊢ chainHeight (↑ofDual ⁻¹' s) ≠ ⊤\n[PROOFSTEP]\nrwa [chainHeight_dual]\n", "meta": {"mathlib_filename": "Mathlib.Order.Height", "llama_tokens": 27991, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526514141571, "lm_q2_score": 0.4921881357207956, "lm_q1q2_score": 0.2804747141350864}}
{"text": "[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\n⊢ ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₁ := (compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂)).continuous\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\n⊢ ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₂ := (ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ)).continuous\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\n⊢ ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₃ := continuousOn_coordChange 𝕜₁ e₁' e₁\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\n⊢ ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nhave h₄ := continuousOn_coordChange 𝕜₂ e₂ e₂'\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ ContinuousOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂') (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nrefine' ((h₁.comp_continuousOn (h₄.mono _)).clm_comp (h₂.comp_continuousOn (h₃.mono _))).congr _\n[GOAL]\ncase refine'_1\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₂.baseSet ∩ e₂'.baseSet\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\ncase refine'_2\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet) ⊆ e₁'.baseSet ∩ e₁.baseSet\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\ncase refine'_3\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\n⊢ EqOn (continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂')\n    (fun x =>\n      comp ((↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂)) ∘ fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) x)\n        ((↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ)) ∘ fun b =>\n            ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b))\n          x))\n    (e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet))\n[PROOFSTEP]\nintro b _\n[GOAL]\ncase refine'_3\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\nb : B\na✝ : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\n⊢ continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂' b =\n    (fun x =>\n        comp ((↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂)) ∘ fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) x)\n          ((↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ)) ∘ fun b =>\n              ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b))\n            x))\n      b\n[PROOFSTEP]\next L v\n[GOAL]\ncase refine'_3.h.h\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\nb : B\na✝ : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ ↑(↑(continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂' b) L) v =\n    ↑(↑((fun x =>\n                comp ((↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂)) ∘ fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) x)\n                  ((↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ)) ∘ fun b =>\n                      ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b))\n                    x))\n              b)\n          L)\n      v\n[PROOFSTEP]\ndsimp [continuousLinearMapCoordChange]\n[GOAL]\ncase refine'_3.h.h\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : VectorBundle 𝕜₂ F₂ E₂\ninst✝³ : MemTrivializationAtlas e₁\ninst✝² : MemTrivializationAtlas e₁'\ninst✝¹ : MemTrivializationAtlas e₂\ninst✝ : MemTrivializationAtlas e₂'\nh₁ : Continuous ↑(compSL F₁ F₂ F₂ σ (RingHom.id 𝕜₂))\nh₂ : Continuous ↑(ContinuousLinearMap.flip (compSL F₁ F₁ F₂ (RingHom.id 𝕜₁) σ))\nh₃ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b)) (e₁'.baseSet ∩ e₁.baseSet)\nh₄ : ContinuousOn (fun b => ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)) (e₂.baseSet ∩ e₂'.baseSet)\nb : B\na✝ : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b)\n      (↑L (↑(ContinuousLinearEquiv.symm (ContinuousLinearEquiv.symm (Trivialization.coordChangeL 𝕜₁ e₁' e₁ b))) v)) =\n    ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b) (↑L (↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b) v))\n[PROOFSTEP]\nrw [ContinuousLinearEquiv.symm_symm]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\n⊢ (fun p =>\n        { proj := p.fst,\n          snd :=\n            comp (Trivialization.symmL 𝕜₂ e₂ p.fst) (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n      ((fun p =>\n          (p.proj,\n            comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj) (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n        { proj := x, snd := L }) =\n    { proj := x, snd := L }\n[PROOFSTEP]\nsimp only [TotalSpace.mk_inj]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\n⊢ comp\n      (Trivialization.symmL 𝕜₂ e₂\n        ((fun p =>\n              (p.proj,\n                comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj)\n                  (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n            { proj := x, snd := L }).fst)\n      (comp\n        (comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ { proj := x, snd := L }.proj)\n          (comp L (Trivialization.symmL 𝕜₁ e₁ { proj := x, snd := L }.proj)))\n        (Trivialization.continuousLinearMapAt 𝕜₁ e₁\n          ((fun p =>\n                (p.proj,\n                  comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj)\n                    (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n              { proj := x, snd := L }).fst)) =\n    L\n[PROOFSTEP]\next (v : E₁ x)\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\nv : E₁ x\n⊢ ↑(comp\n          (Trivialization.symmL 𝕜₂ e₂\n            ((fun p =>\n                  (p.proj,\n                    comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj)\n                      (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n                { proj := x, snd := L }).fst)\n          (comp\n            (comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ { proj := x, snd := L }.proj)\n              (comp L (Trivialization.symmL 𝕜₁ e₁ { proj := x, snd := L }.proj)))\n            (Trivialization.continuousLinearMapAt 𝕜₁ e₁\n              ((fun p =>\n                    (p.proj,\n                      comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj)\n                        (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n                  { proj := x, snd := L }).fst)))\n      v =\n    ↑L v\n[PROOFSTEP]\ndsimp only [comp_apply]\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\nv : E₁ x\n⊢ ↑(Trivialization.symmL 𝕜₂ e₂ x)\n      (↑(Trivialization.continuousLinearMapAt 𝕜₂ e₂ x)\n        (↑L (↑(Trivialization.symmL 𝕜₁ e₁ x) (↑(Trivialization.continuousLinearMapAt 𝕜₁ e₁ x) v)))) =\n    ↑L v\n[PROOFSTEP]\nrw [Trivialization.symmL_continuousLinearMapAt, Trivialization.symmL_continuousLinearMapAt]\n[GOAL]\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\nv : E₁ x\n⊢ x ∈ e₁.baseSet\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : TotalSpace (F₁ →SL[σ] F₂) (Bundle.ContinuousLinearMap σ E₁ E₂)\nx : B\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\nx✝ : { proj := x, snd := L } ∈ TotalSpace.proj ⁻¹' (e₁.baseSet ∩ e₂.baseSet)\nh₁ : { proj := x, snd := L }.proj ∈ e₁.baseSet\nh₂ : { proj := x, snd := L }.proj ∈ e₂.baseSet\nv : E₁ x\n⊢ x ∈ e₂.baseSet\n[PROOFSTEP]\nexacts [h₁, h₂]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\n⊢ (fun p =>\n        (p.proj,\n          comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ p.proj) (comp p.snd (Trivialization.symmL 𝕜₁ e₁ p.proj))))\n      ((fun p =>\n          { proj := p.fst,\n            snd :=\n              comp (Trivialization.symmL 𝕜₂ e₂ p.fst) (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n        (x, f)) =\n    (x, f)\n[PROOFSTEP]\nsimp only [Prod.mk_inj_left]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\n⊢ comp\n      (Trivialization.continuousLinearMapAt 𝕜₂ e₂\n        ((fun p =>\n              { proj := p.fst,\n                snd :=\n                  comp (Trivialization.symmL 𝕜₂ e₂ p.fst)\n                    (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n            (x, f)).proj)\n      (comp\n        (comp (Trivialization.symmL 𝕜₂ e₂ (x, f).fst) (comp f (Trivialization.continuousLinearMapAt 𝕜₁ e₁ (x, f).fst)))\n        (Trivialization.symmL 𝕜₁ e₁\n          ((fun p =>\n                { proj := p.fst,\n                  snd :=\n                    comp (Trivialization.symmL 𝕜₂ e₂ p.fst)\n                      (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n              (x, f)).proj)) =\n    f\n[PROOFSTEP]\next v\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\nv : F₁\n⊢ ↑(comp\n          (Trivialization.continuousLinearMapAt 𝕜₂ e₂\n            ((fun p =>\n                  { proj := p.fst,\n                    snd :=\n                      comp (Trivialization.symmL 𝕜₂ e₂ p.fst)\n                        (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n                (x, f)).proj)\n          (comp\n            (comp (Trivialization.symmL 𝕜₂ e₂ (x, f).fst)\n              (comp f (Trivialization.continuousLinearMapAt 𝕜₁ e₁ (x, f).fst)))\n            (Trivialization.symmL 𝕜₁ e₁\n              ((fun p =>\n                    { proj := p.fst,\n                      snd :=\n                        comp (Trivialization.symmL 𝕜₂ e₂ p.fst)\n                          (comp p.snd (Trivialization.continuousLinearMapAt 𝕜₁ e₁ p.fst)) })\n                  (x, f)).proj)))\n      v =\n    ↑f v\n[PROOFSTEP]\ndsimp only [comp_apply]\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\nv : F₁\n⊢ ↑(Trivialization.continuousLinearMapAt 𝕜₂ e₂ x)\n      (↑(Trivialization.symmL 𝕜₂ e₂ x)\n        (↑f (↑(Trivialization.continuousLinearMapAt 𝕜₁ e₁ x) (↑(Trivialization.symmL 𝕜₁ e₁ x) v)))) =\n    ↑f v\n[PROOFSTEP]\nrw [Trivialization.continuousLinearMapAt_symmL, Trivialization.continuousLinearMapAt_symmL]\n[GOAL]\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\nv : F₁\n⊢ x ∈ e₁.baseSet\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nx✝¹ : B × (F₁ →SL[σ] F₂)\nx : B\nf : F₁ →SL[σ] F₂\nx✝ : (x, f) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ\nh₁ : (x, f).fst ∈ e₁.baseSet\nh₂ : (x, f).fst ∈ e₂.baseSet\nright✝ : (x, f).snd ∈ univ\nv : F₁\n⊢ x ∈ e₂.baseSet\n[PROOFSTEP]\nexacts [h₁, h₂]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝⁴ : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝³ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝² : Trivialization.IsLinear 𝕜₂ e₂'\ninst✝¹ : ∀ (x : B), ContinuousAdd (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nx : B\nx✝ : x ∈ (continuousLinearMap σ e₁ e₂).baseSet\nL L' : Bundle.ContinuousLinearMap σ E₁ E₂ x\n⊢ comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ x) (comp (L + L') (Trivialization.symmL 𝕜₁ e₁ x)) =\n    (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L }).snd +\n      (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L' }).snd\n[PROOFSTEP]\nsimp_rw [add_comp, comp_add]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝⁴ : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝³ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝² : Trivialization.IsLinear 𝕜₂ e₂'\ninst✝¹ : ∀ (x : B), ContinuousAdd (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nx : B\nx✝ : x ∈ (continuousLinearMap σ e₁ e₂).baseSet\nL L' : Bundle.ContinuousLinearMap σ E₁ E₂ x\n⊢ comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ x) (comp L (Trivialization.symmL 𝕜₁ e₁ x)) +\n      comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ x) (comp L' (Trivialization.symmL 𝕜₁ e₁ x)) =\n    (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L }).snd +\n      (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L' }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝⁴ : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝³ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝² : Trivialization.IsLinear 𝕜₂ e₂'\ninst✝¹ : ∀ (x : B), ContinuousAdd (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nx : B\nx✝ : x ∈ (continuousLinearMap σ e₁ e₂).baseSet\nc : 𝕜₂\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\n⊢ comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ x) (comp (c • L) (Trivialization.symmL 𝕜₁ e₁ x)) =\n    c • (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L }).snd\n[PROOFSTEP]\nsimp_rw [smul_comp, comp_smulₛₗ, RingHom.id_apply]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²² : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝²¹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝²⁰ : NormedAddCommGroup F₁\ninst✝¹⁹ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁸ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁷ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁶ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹⁵ : NormedAddCommGroup F₂\ninst✝¹⁴ : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹³ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹² : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝¹¹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝¹⁰ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁹ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁸ : FiberBundle F₁ E₁\ninst✝⁷ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁶ : FiberBundle F₂ E₂\ninst✝⁵ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝⁴ : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝³ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝² : Trivialization.IsLinear 𝕜₂ e₂'\ninst✝¹ : ∀ (x : B), ContinuousAdd (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nx : B\nx✝ : x ∈ (continuousLinearMap σ e₁ e₂).baseSet\nc : 𝕜₂\nL : Bundle.ContinuousLinearMap σ E₁ E₂ x\n⊢ c • comp (Trivialization.continuousLinearMapAt 𝕜₂ e₂ x) (comp L (Trivialization.symmL 𝕜₁ e₁ x)) =\n    c • (↑(continuousLinearMap σ e₁ e₂) { proj := x, snd := L }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet\nL : F₁ →SL[σ] F₂\n⊢ Pretrivialization.symm (continuousLinearMap σ e₁ e₂) b L =\n    comp (Trivialization.symmL 𝕜₂ e₂ b) (comp L (Trivialization.continuousLinearMapAt 𝕜₁ e₁ b))\n[PROOFSTEP]\nrw [symm_apply]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet\nL : F₁ →SL[σ] F₂\n⊢ cast\n      (_ :\n        Bundle.ContinuousLinearMap σ E₁ E₂ (↑(LocalEquiv.symm (continuousLinearMap σ e₁ e₂).toLocalEquiv) (b, L)).proj =\n          Bundle.ContinuousLinearMap σ E₁ E₂ b)\n      (↑(LocalEquiv.symm (continuousLinearMap σ e₁ e₂).toLocalEquiv) (b, L)).snd =\n    comp (Trivialization.symmL 𝕜₂ e₂ b) (comp L (Trivialization.continuousLinearMapAt 𝕜₁ e₁ b))\ncase hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet\nL : F₁ →SL[σ] F₂\n⊢ b ∈ (continuousLinearMap σ e₁ e₂).baseSet\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet\nL : F₁ →SL[σ] F₂\n⊢ b ∈ (continuousLinearMap σ e₁ e₂).baseSet\n[PROOFSTEP]\nexact hb\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\n⊢ ↑(continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂' b) L =\n    (↑(continuousLinearMap σ e₁' e₂')\n        { proj := b, snd := Pretrivialization.symm (continuousLinearMap σ e₁ e₂) b L }).snd\n[PROOFSTEP]\next v\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ ↑(↑(continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂' b) L) v =\n    ↑(↑(continuousLinearMap σ e₁' e₂')\n            { proj := b, snd := Pretrivialization.symm (continuousLinearMap σ e₁ e₂) b L }).snd\n      v\n[PROOFSTEP]\nsimp_rw [continuousLinearMapCoordChange, ContinuousLinearEquiv.coe_coe, ContinuousLinearEquiv.arrowCongrSL_apply,\n  continuousLinearMap_apply, continuousLinearMap_symm_apply' σ e₁ e₂ hb.1, comp_apply, ContinuousLinearEquiv.coe_coe,\n  ContinuousLinearEquiv.symm_symm, Trivialization.continuousLinearMapAt_apply, Trivialization.symmL_apply]\n[GOAL]\ncase h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ ↑(Trivialization.coordChangeL 𝕜₂ e₂ e₂' b) (↑L (↑(Trivialization.coordChangeL 𝕜₁ e₁' e₁ b) v)) =\n    ↑(Trivialization.linearMapAt 𝕜₂ e₂'\n          { proj := b, snd := Pretrivialization.symm (continuousLinearMap σ e₁ e₂) b L }.proj)\n      (Trivialization.symm e₂ b (↑L (↑(Trivialization.linearMapAt 𝕜₁ e₁ b) (Trivialization.symm e₁' b v))))\n[PROOFSTEP]\nrw [e₂.coordChangeL_apply e₂', e₁'.coordChangeL_apply e₁, e₁.coe_linearMapAt_of_mem hb.1.1,\n  e₂'.coe_linearMapAt_of_mem hb.2.2]\n[GOAL]\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ b ∈ e₁'.baseSet ∩ e₁.baseSet\ncase h.hb\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : (x : B) → TopologicalSpace (E₂ x)\nita : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝⁴ : FiberBundle F₂ E₂\ninst✝³ : Trivialization.IsLinear 𝕜₁ e₁\ninst✝² : Trivialization.IsLinear 𝕜₁ e₁'\ninst✝¹ : Trivialization.IsLinear 𝕜₂ e₂\ninst✝ : Trivialization.IsLinear 𝕜₂ e₂'\nb : B\nhb : b ∈ e₁.baseSet ∩ e₂.baseSet ∩ (e₁'.baseSet ∩ e₂'.baseSet)\nL : F₁ →SL[σ] F₂\nv : F₁\n⊢ b ∈ e₂.baseSet ∩ e₂'.baseSet\n[PROOFSTEP]\nexacts [⟨hb.2.1, hb.1.1⟩, ⟨hb.1.2, hb.2.2⟩]\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\n⊢ ∀ (e : Pretrivialization (F₁ →SL[σ] F₂) TotalSpace.proj),\n    e ∈ {e | ∃ e₁ e₂ x x_1, e = continuousLinearMap σ e₁ e₂} → Pretrivialization.IsLinear 𝕜₂ e\n[PROOFSTEP]\nrintro _ ⟨e₁, he₁, e₂, he₂, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁✝ e₁' : Trivialization F₁ TotalSpace.proj\ne₂✝ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\ne₁ : Trivialization F₁ TotalSpace.proj\nhe₁ : Trivialization F₂ TotalSpace.proj\ne₂ : MemTrivializationAtlas e₁\nhe₂ : MemTrivializationAtlas he₁\n⊢ Pretrivialization.IsLinear 𝕜₂ (continuousLinearMap σ e₁ he₁)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\n⊢ ∀ (e : Pretrivialization (F₁ →SL[σ] F₂) TotalSpace.proj),\n    e ∈ {e | ∃ e₁ e₂ x x_1, e = continuousLinearMap σ e₁ e₂} →\n      ∀ (e' : Pretrivialization (F₁ →SL[σ] F₂) TotalSpace.proj),\n        e' ∈ {e | ∃ e₁ e₂ x x_1, e = continuousLinearMap σ e₁ e₂} →\n          ∃ f,\n            ContinuousOn f (e.baseSet ∩ e'.baseSet) ∧\n              ∀ (b : B),\n                b ∈ e.baseSet ∩ e'.baseSet →\n                  ∀ (v : F₁ →SL[σ] F₂), ↑(f b) v = (↑e' { proj := b, snd := Pretrivialization.symm e b v }).snd\n[PROOFSTEP]\nrintro _ ⟨e₁, e₂, he₁, he₂, rfl⟩ _ ⟨e₁', e₂', he₁', he₂', rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁✝ e₁'✝ : Trivialization F₁ TotalSpace.proj\ne₂✝ e₂'✝ : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\ne₁ : Trivialization F₁ TotalSpace.proj\ne₂ : Trivialization F₂ TotalSpace.proj\nhe₁ : MemTrivializationAtlas e₁\nhe₂ : MemTrivializationAtlas e₂\ne₁' : Trivialization F₁ TotalSpace.proj\ne₂' : Trivialization F₂ TotalSpace.proj\nhe₁' : MemTrivializationAtlas e₁'\nhe₂' : MemTrivializationAtlas e₂'\n⊢ ∃ f,\n    ContinuousOn f ((continuousLinearMap σ e₁ e₂).baseSet ∩ (continuousLinearMap σ e₁' e₂').baseSet) ∧\n      ∀ (b : B),\n        b ∈ (continuousLinearMap σ e₁ e₂).baseSet ∩ (continuousLinearMap σ e₁' e₂').baseSet →\n          ∀ (v : F₁ →SL[σ] F₂),\n            ↑(f b) v =\n              (↑(continuousLinearMap σ e₁' e₂')\n                  { proj := b, snd := Pretrivialization.symm (continuousLinearMap σ e₁ e₂) b v }).snd\n[PROOFSTEP]\nexact\n  ⟨continuousLinearMapCoordChange σ e₁ e₁' e₂ e₂', continuousOn_continuousLinearMapCoordChange,\n    continuousLinearMapCoordChange_apply σ e₁ e₁' e₂ e₂'⟩\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\n⊢ ∀ (b : B),\n    Inducing\n      (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nintro b\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\n⊢ Inducing\n    (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nlet L₁ : E₁ b ≃L[𝕜₁] F₁ := (trivializationAt F₁ E₁ b).continuousLinearEquivAt 𝕜₁ b (mem_baseSet_trivializationAt _ _ _)\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\n⊢ Inducing\n    (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nlet L₂ : E₂ b ≃L[𝕜₂] F₂ := (trivializationAt F₂ E₂ b).continuousLinearEquivAt 𝕜₂ b (mem_baseSet_trivializationAt _ _ _)\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\n⊢ Inducing\n    (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nlet φ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := L₁.arrowCongrSL L₂\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\n⊢ Inducing\n    (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nhave : Inducing fun x => (b, φ x) := inducing_const_prod.mpr φ.toHomeomorph.inducing\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\nthis : Inducing fun x => (b, ↑φ x)\n⊢ Inducing\n    (↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_5.h.h.e'_4\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\nthis : Inducing fun x => (b, ↑φ x)\nx✝ : Bundle.ContinuousLinearMap σ E₁ E₂ b\n⊢ ((↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n        x✝).snd =\n    ↑φ x✝\n[PROOFSTEP]\next f\n[GOAL]\ncase h.e'_5.h.h.e'_4.h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\nthis : Inducing fun x => (b, ↑φ x)\nx✝ : Bundle.ContinuousLinearMap σ E₁ E₂ b\nf : F₁\n⊢ ↑((↑((fun x => continuousLinearMap σ (trivializationAt F₁ E₁ x) (trivializationAt F₂ E₂ x)) b) ∘ TotalSpace.mk b)\n            x✝).snd\n      f =\n    ↑(↑φ x✝) f\n[PROOFSTEP]\ndsimp [Pretrivialization.continuousLinearMap_apply]\n[GOAL]\ncase h.e'_5.h.h.e'_4.h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\nthis : Inducing fun x => (b, ↑φ x)\nx✝ : Bundle.ContinuousLinearMap σ E₁ E₂ b\nf : F₁\n⊢ ↑(Trivialization.linearMapAt 𝕜₂ (trivializationAt F₂ E₂ b) b)\n      (↑x✝ (Trivialization.symm (trivializationAt F₁ E₁ b) b f)) =\n    (↑(trivializationAt F₂ E₂ b) { proj := b, snd := ↑x✝ (Trivialization.symm (trivializationAt F₁ E₁ b) b f) }).snd\n[PROOFSTEP]\nrw [Trivialization.linearMapAt_def_of_mem _ (mem_baseSet_trivializationAt _ _ _)]\n[GOAL]\ncase h.e'_5.h.h.e'_4.h\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nb : B\nL₁ : E₁ b ≃L[𝕜₁] F₁ :=\n  Trivialization.continuousLinearEquivAt 𝕜₁ (trivializationAt F₁ E₁ b) b (_ : b ∈ (trivializationAt F₁ E₁ b).baseSet)\nL₂ : E₂ b ≃L[𝕜₂] F₂ :=\n  Trivialization.continuousLinearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet)\nφ : (E₁ b →SL[σ] E₂ b) ≃L[𝕜₂] F₁ →SL[σ] F₂ := ContinuousLinearEquiv.arrowCongrSL L₁ L₂\nthis : Inducing fun x => (b, ↑φ x)\nx✝ : Bundle.ContinuousLinearMap σ E₁ E₂ b\nf : F₁\n⊢ ↑↑(Trivialization.linearEquivAt 𝕜₂ (trivializationAt F₂ E₂ b) b (_ : b ∈ (trivializationAt F₂ E₂ b).baseSet))\n      (↑x✝ (Trivialization.symm (trivializationAt F₁ E₁ b) b f)) =\n    (↑(trivializationAt F₂ E₂ b) { proj := b, snd := ↑x✝ (Trivialization.symm (trivializationAt F₁ E₁ b) b f) }).snd\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nhe₁ : MemTrivializationAtlas e₁\nhe₂ : MemTrivializationAtlas e₂\n⊢ MemTrivializationAtlas e₁\n[PROOFSTEP]\ninfer_instance\n[GOAL]\n𝕜₁ : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜₁\n𝕜₂ : Type u_2\ninst✝¹⁹ : NontriviallyNormedField 𝕜₂\nσ : 𝕜₁ →+* 𝕜₂\niσ : RingHomIsometric σ\nB : Type u_3\nF₁ : Type u_4\ninst✝¹⁸ : NormedAddCommGroup F₁\ninst✝¹⁷ : NormedSpace 𝕜₁ F₁\nE₁ : B → Type u_5\ninst✝¹⁶ : (x : B) → AddCommGroup (E₁ x)\ninst✝¹⁵ : (x : B) → Module 𝕜₁ (E₁ x)\ninst✝¹⁴ : TopologicalSpace (TotalSpace F₁ E₁)\nF₂ : Type u_6\ninst✝¹³ : NormedAddCommGroup F₂\ninst✝¹² : NormedSpace 𝕜₂ F₂\nE₂ : B → Type u_7\ninst✝¹¹ : (x : B) → AddCommGroup (E₂ x)\ninst✝¹⁰ : (x : B) → Module 𝕜₂ (E₂ x)\ninst✝⁹ : TopologicalSpace (TotalSpace F₂ E₂)\ninst✝⁸ : TopologicalSpace B\ne₁ e₁' : Trivialization F₁ TotalSpace.proj\ne₂ e₂' : Trivialization F₂ TotalSpace.proj\ninst✝⁷ : (x : B) → TopologicalSpace (E₁ x)\ninst✝⁶ : FiberBundle F₁ E₁\ninst✝⁵ : VectorBundle 𝕜₁ F₁ E₁\ninst✝⁴ : (x : B) → TopologicalSpace (E₂ x)\ninst✝³ : FiberBundle F₂ E₂\ninst✝² : VectorBundle 𝕜₂ F₂ E₂\ninst✝¹ : ∀ (x : B), TopologicalAddGroup (E₂ x)\ninst✝ : ∀ (x : B), ContinuousSMul 𝕜₂ (E₂ x)\nhe₁ : MemTrivializationAtlas e₁\nhe₂ : MemTrivializationAtlas e₂\n⊢ MemTrivializationAtlas e₂\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Topology.VectorBundle.Hom", "llama_tokens": 38884, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7718434978390747, "lm_q2_score": 0.36296921241058616, "lm_q1q2_score": 0.2801554265148809}}
{"text": "[GOAL]\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : Nonempty X\ninst✝¹ : MeasurableSpace X\ns : Set X\ninst✝ : HasCountableSeparatingOn X MeasurableSet s\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhs : ∀ᵐ (x : α) ∂μ, g x ∈ s\nhgm : NullMeasurable g\nhg_eq : g ∘ f =ᵐ[μ] g\n⊢ ∃ c, g =ᵐ[μ] const α c\n[PROOFSTEP]\nrefine exists_eventuallyEq_const_of_eventually_mem_of_forall_separating MeasurableSet hs ?_\n[GOAL]\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : Nonempty X\ninst✝¹ : MeasurableSpace X\ns : Set X\ninst✝ : HasCountableSeparatingOn X MeasurableSet s\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhs : ∀ᵐ (x : α) ∂μ, g x ∈ s\nhgm : NullMeasurable g\nhg_eq : g ∘ f =ᵐ[μ] g\n⊢ ∀ (U : Set X), MeasurableSet U → (∀ᵐ (x : α) ∂μ, g x ∈ U) ∨ ∀ᵐ (x : α) ∂μ, ¬g x ∈ U\n[PROOFSTEP]\nrefine fun U hU ↦ h.ae_mem_or_ae_nmem₀ (s := g ⁻¹' U) (hgm hU) ?_b\n[GOAL]\ncase _b\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : Nonempty X\ninst✝¹ : MeasurableSpace X\ns : Set X\ninst✝ : HasCountableSeparatingOn X MeasurableSet s\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhs : ∀ᵐ (x : α) ∂μ, g x ∈ s\nhgm : NullMeasurable g\nhg_eq : g ∘ f =ᵐ[μ] g\nU : Set X\nhU : MeasurableSet U\n⊢ f ⁻¹' (g ⁻¹' U) =ᵐ[μ] g ⁻¹' U\n[PROOFSTEP]\nrefine (hg_eq.mono fun x hx ↦ ?_).set_eq\n[GOAL]\ncase _b\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : Nonempty X\ninst✝¹ : MeasurableSpace X\ns : Set X\ninst✝ : HasCountableSeparatingOn X MeasurableSet s\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhs : ∀ᵐ (x : α) ∂μ, g x ∈ s\nhgm : NullMeasurable g\nhg_eq : g ∘ f =ᵐ[μ] g\nU : Set X\nhU : MeasurableSet U\nx : α\nhx : (g ∘ f) x = g x\n⊢ x ∈ f ⁻¹' (g ⁻¹' U) ↔ x ∈ g ⁻¹' U\n[PROOFSTEP]\nrw [← preimage_comp, mem_preimage, mem_preimage, hx]\n[GOAL]\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : Nonempty X\ninst✝¹ : MeasurableSpace X\ninst✝ : HasCountableSeparatingOn X MeasurableSet univ\nf : α → α\ng : α → X\nh : PreErgodic f\nhgm : Measurable g\nhg_eq : g ∘ f = g\nU : Set X\nhU : MeasurableSet U\n⊢ f ⁻¹' (g ⁻¹' U) = g ⁻¹' U\n[PROOFSTEP]\nrw [← preimage_comp, hg_eq]\n[GOAL]\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace X\ninst✝¹ : MetrizableSpace X\ninst✝ : Nonempty X\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhgm : AEStronglyMeasurable g μ\nhg_eq : g ∘ f =ᵐ[μ] g\n⊢ ∃ c, g =ᵐ[μ] const α c\n[PROOFSTEP]\nborelize X\n[GOAL]\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace X\ninst✝¹ : MetrizableSpace X\ninst✝ : Nonempty X\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhgm : AEStronglyMeasurable g μ\nhg_eq : g ∘ f =ᵐ[μ] g\nthis✝¹ : MeasurableSpace X := borel X\nthis✝ : BorelSpace X\n⊢ ∃ c, g =ᵐ[μ] const α c\n[PROOFSTEP]\nrcases hgm.isSeparable_ae_range with ⟨t, ht, hgt⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace X\ninst✝¹ : MetrizableSpace X\ninst✝ : Nonempty X\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhgm : AEStronglyMeasurable g μ\nhg_eq : g ∘ f =ᵐ[μ] g\nthis✝¹ : MeasurableSpace X := borel X\nthis✝ : BorelSpace X\nt : Set X\nht : IsSeparable t\nhgt : ∀ᵐ (x : α) ∂μ, g x ∈ t\n⊢ ∃ c, g =ᵐ[μ] const α c\n[PROOFSTEP]\nhaveI := ht.secondCountableTopology\n[GOAL]\ncase intro.intro\nα : Type u_1\nX : Type u_2\ninst✝³ : MeasurableSpace α\nμ : Measure α\ninst✝² : TopologicalSpace X\ninst✝¹ : MetrizableSpace X\ninst✝ : Nonempty X\nf : α → α\ng : α → X\nh : QuasiErgodic f\nhgm : AEStronglyMeasurable g μ\nhg_eq : g ∘ f =ᵐ[μ] g\nthis✝¹ : MeasurableSpace X := borel X\nthis✝ : BorelSpace X\nt : Set X\nht : IsSeparable t\nhgt : ∀ᵐ (x : α) ∂μ, g x ∈ t\nthis : SecondCountableTopology ↑t\n⊢ ∃ c, g =ᵐ[μ] const α c\n[PROOFSTEP]\nexact h.ae_eq_const_of_ae_eq_comp_of_ae_range₀ hgt hgm.aemeasurable.nullMeasurable hg_eq\n", "meta": {"mathlib_filename": "Mathlib.Dynamics.Ergodic.Function", "llama_tokens": 1981, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6076631698328917, "lm_q2_score": 0.46101677931231594, "lm_q1q2_score": 0.28014291746307257}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\n⊢ ↑(expand R p) f = sum f fun e a => ↑C a * (X ^ p) ^ e\n[PROOFSTEP]\nsimp [expand, eval₂]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nr : R\n⊢ ↑(expand R p) (↑(monomial q) r) = ↑(monomial (q * p)) r\n[PROOFSTEP]\nsimp_rw [← smul_X_eq_monomial, AlgHom.map_smul, AlgHom.map_pow, expand_X, mul_comm, pow_mul]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nr : R\n⊢ ↑(expand R p) (↑(expand R q) (↑C r)) = ↑(expand R (p * q)) (↑C r)\n[PROOFSTEP]\nsimp_rw [expand_C]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf✝ f g : R[X]\nihf : ↑(expand R p) (↑(expand R q) f) = ↑(expand R (p * q)) f\nihg : ↑(expand R p) (↑(expand R q) g) = ↑(expand R (p * q)) g\n⊢ ↑(expand R p) (↑(expand R q) (f + g)) = ↑(expand R (p * q)) (f + g)\n[PROOFSTEP]\nsimp_rw [AlgHom.map_add, ihf, ihg]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nn : ℕ\nr : R\nx✝ : ↑(expand R p) (↑(expand R q) (↑C r * X ^ n)) = ↑(expand R (p * q)) (↑C r * X ^ n)\n⊢ ↑(expand R p) (↑(expand R q) (↑C r * X ^ (n + 1))) = ↑(expand R (p * q)) (↑C r * X ^ (n + 1))\n[PROOFSTEP]\nsimp_rw [AlgHom.map_mul, expand_C, AlgHom.map_pow, expand_X, AlgHom.map_pow, expand_X, pow_mul]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\n⊢ ↑(expand R 0) f = ↑C (eval 1 f)\n[PROOFSTEP]\nsimp [expand]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nr : R\n⊢ ↑(expand R 1) (↑C r) = ↑C r\n[PROOFSTEP]\nrw [expand_C]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf✝ f g : R[X]\nihf : ↑(expand R 1) f = f\nihg : ↑(expand R 1) g = g\n⊢ ↑(expand R 1) (f + g) = f + g\n[PROOFSTEP]\nrw [AlgHom.map_add, ihf, ihg]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nn : ℕ\nr : R\nx✝ : ↑(expand R 1) (↑C r * X ^ n) = ↑C r * X ^ n\n⊢ ↑(expand R 1) (↑C r * X ^ (n + 1)) = ↑C r * X ^ (n + 1)\n[PROOFSTEP]\nrw [AlgHom.map_mul, expand_C, AlgHom.map_pow, expand_X, pow_one]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\n⊢ ↑(expand R (p ^ Nat.zero)) f = (↑(expand R p))^[Nat.zero] f\n[PROOFSTEP]\nrw [pow_zero, expand_one, Function.iterate_zero, id]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nn : ℕ\nih : ↑(expand R (p ^ n)) f = (↑(expand R p))^[n] f\n⊢ ↑(expand R (p ^ Nat.succ n)) f = (↑(expand R p))^[Nat.succ n] f\n[PROOFSTEP]\nrw [Function.iterate_succ_apply', pow_succ, expand_mul, ih]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\n⊢ ↑derivative (↑(expand R p) f) = ↑(expand R p) (↑derivative f) * (↑p * X ^ (p - 1))\n[PROOFSTEP]\nrw [coe_expand, derivative_eval₂_C, derivative_pow, C_eq_nat_cast, derivative_X, mul_one]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\n⊢ coeff (↑(expand R p) f) n = if p ∣ n then coeff f (n / p) else 0\n[PROOFSTEP]\nsimp only [expand_eq_sum]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\n⊢ coeff (sum f fun e a => ↑C a * (X ^ p) ^ e) n = if p ∣ n then coeff f (n / p) else 0\n[PROOFSTEP]\nsimp_rw [coeff_sum, ← pow_mul, C_mul_X_pow_eq_monomial, coeff_monomial, sum]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\n⊢ (∑ x in support f, if p * x = n then coeff f x else 0) = if p ∣ n then coeff f (n / p) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\n⊢ (∑ x in support f, if p * x = n then coeff f x else 0) = coeff f (n / p)\n[PROOFSTEP]\nrw [Finset.sum_eq_single (n / p), Nat.mul_div_cancel' h, if_pos rfl]\n[GOAL]\ncase pos.h₀\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\n⊢ ∀ (b : ℕ), b ∈ support f → b ≠ n / p → (if p * b = n then coeff f b else 0) = 0\n[PROOFSTEP]\nintro b _ hb2\n[GOAL]\ncase pos.h₀\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nb : ℕ\na✝ : b ∈ support f\nhb2 : b ≠ n / p\n⊢ (if p * b = n then coeff f b else 0) = 0\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase pos.h₀.hnc\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nb : ℕ\na✝ : b ∈ support f\nhb2 : b ≠ n / p\n⊢ ¬p * b = n\n[PROOFSTEP]\nintro hb3\n[GOAL]\ncase pos.h₀.hnc\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nb : ℕ\na✝ : b ∈ support f\nhb2 : b ≠ n / p\nhb3 : p * b = n\n⊢ False\n[PROOFSTEP]\napply hb2\n[GOAL]\ncase pos.h₀.hnc\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nb : ℕ\na✝ : b ∈ support f\nhb2 : b ≠ n / p\nhb3 : p * b = n\n⊢ b = n / p\n[PROOFSTEP]\nrw [← hb3, Nat.mul_div_cancel_left b hp]\n[GOAL]\ncase pos.h₁\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\n⊢ ¬n / p ∈ support f → (if p * (n / p) = n then coeff f (n / p) else 0) = 0\n[PROOFSTEP]\nintro hn\n[GOAL]\ncase pos.h₁\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nhn : ¬n / p ∈ support f\n⊢ (if p * (n / p) = n then coeff f (n / p) else 0) = 0\n[PROOFSTEP]\nrw [not_mem_support_iff.1 hn]\n[GOAL]\ncase pos.h₁\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nhn : ¬n / p ∈ support f\n⊢ (if p * (n / p) = n then 0 else 0) = 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nhn : ¬n / p ∈ support f\nh✝ : p * (n / p) = n\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : p ∣ n\nhn : ¬n / p ∈ support f\nh✝ : ¬p * (n / p) = n\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : ¬p ∣ n\n⊢ (∑ x in support f, if p * x = n then coeff f x else 0) = 0\n[PROOFSTEP]\nrw [Finset.sum_eq_zero]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : ¬p ∣ n\n⊢ ∀ (x : ℕ), x ∈ support f → (if p * x = n then coeff f x else 0) = 0\n[PROOFSTEP]\nintro k _\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : ¬p ∣ n\nk : ℕ\na✝ : k ∈ support f\n⊢ (if p * k = n then coeff f k else 0) = 0\n[PROOFSTEP]\nrw [if_neg]\n[GOAL]\ncase neg.hnc\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\nh : ¬p ∣ n\nk : ℕ\na✝ : k ∈ support f\n⊢ ¬p * k = n\n[PROOFSTEP]\nexact fun hkn => h ⟨k, hkn.symm⟩\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\n⊢ coeff (↑(expand R p) f) (n * p) = coeff f n\n[PROOFSTEP]\nrw [coeff_expand hp, if_pos (dvd_mul_left _ _), Nat.mul_div_cancel _ hp]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nn : ℕ\n⊢ coeff (↑(expand R p) f) (p * n) = coeff f n\n[PROOFSTEP]\nrw [mul_comm, coeff_expand_mul hp]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q n : ℕ\nhn : 0 < n\ng g' : R[X]\nH : ↑(expand R n) g = ↑(expand R n) g'\nk : ℕ\n⊢ coeff g k = coeff g' k\n[PROOFSTEP]\nrw [← coeff_expand_mul hn, H, coeff_expand_mul hn]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : 0 < p\nf : R[X]\nr : R\n⊢ ↑(expand R p) f = ↑C r ↔ f = ↑C r\n[PROOFSTEP]\nrw [← expand_C, expand_inj hp, expand_C]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\ncases' p.eq_zero_or_pos with hp hp\n[GOAL]\ncase inl\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p = 0\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\nrw [hp, coe_expand, pow_zero, mul_zero, ← C_1, eval₂_hom, natDegree_C]\n[GOAL]\ncase inr\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\nby_cases hf : f = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : f = 0\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\nrw [hf, AlgHom.map_zero, natDegree_zero, zero_mul]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\nhave hf1 : expand R p f ≠ 0 := mt (expand_eq_zero hp).1 hf\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ natDegree (↑(expand R p) f) = natDegree f * p\n[PROOFSTEP]\nrw [← WithBot.coe_eq_coe]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ ↑(natDegree (↑(expand R p) f)) = ↑(natDegree f * p)\n[PROOFSTEP]\nconvert (degree_eq_natDegree hf1).symm\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ ↑(natDegree f * p) = degree (↑(expand R p) f)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_3\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ degree (↑(expand R p) f) = ↑(natDegree f * p)\n[PROOFSTEP]\nrefine' le_antisymm ((degree_le_iff_coeff_zero _ _).2 fun n hn => _) _\n[GOAL]\ncase h.e'_3.refine'_1\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhn : ↑(natDegree f * p) < ↑n\n⊢ coeff (↑(expand R p) f) n = 0\n[PROOFSTEP]\nrw [coeff_expand hp]\n[GOAL]\ncase h.e'_3.refine'_1\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhn : ↑(natDegree f * p) < ↑n\n⊢ (if p ∣ n then coeff f (n / p) else 0) = 0\n[PROOFSTEP]\nsplit_ifs with hpn\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhn : ↑(natDegree f * p) < ↑n\nhpn : p ∣ n\n⊢ coeff f (n / p) = 0\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt]\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhn : ↑(natDegree f * p) < ↑n\nhpn : p ∣ n\n⊢ natDegree f < n / p\n[PROOFSTEP]\ncontrapose! hn\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhpn : p ∣ n\nhn : n / p ≤ natDegree f\n⊢ ↑n ≤ ↑(natDegree f * p)\n[PROOFSTEP]\nerw [WithBot.coe_le_coe, ← Nat.div_mul_cancel hpn]\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhpn : p ∣ n\nhn : n / p ≤ natDegree f\n⊢ ↑(n / p * p) ≤ natDegree f * p\n[PROOFSTEP]\nexact Nat.mul_le_mul_right p hn\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\nn : ℕ\nhn : ↑(natDegree f * p) < ↑n\nhpn : ¬p ∣ n\n⊢ 0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.refine'_2\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ ↑(natDegree f * p) ≤ degree (↑(expand R p) f)\n[PROOFSTEP]\nrefine' le_degree_of_ne_zero _\n[GOAL]\ncase h.e'_3.refine'_2\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ coeff (↑(expand R p) f) (Mul.mul (natDegree f) p) ≠ 0\n[PROOFSTEP]\nerw [coeff_expand_mul hp, ← leadingCoeff]\n[GOAL]\ncase h.e'_3.refine'_2\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : p > 0\nhf : ¬f = 0\nhf1 : ↑(expand R p) f ≠ 0\n⊢ leadingCoeff f ≠ 0\n[PROOFSTEP]\nexact mt leadingCoeff_eq_zero.1 hf\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : 0 < p\nh : Monic f\n⊢ Monic (↑(Polynomial.expand R p) f)\n[PROOFSTEP]\nrw [Monic.def, Polynomial.leadingCoeff, natDegree_expand, coeff_expand hp]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nf : R[X]\nhp : 0 < p\nh : Monic f\n⊢ (if p ∣ natDegree f * p then coeff f (natDegree f * p / p) else 0) = 1\n[PROOFSTEP]\nsimp [hp, h]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\n⊢ map f (↑(expand R p) q) = ↑(expand S p) (map f q)\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : p = 0\n⊢ map f (↑(expand R p) q) = ↑(expand S p) (map f q)\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : ¬p = 0\n⊢ map f (↑(expand R p) q) = ↑(expand S p) (map f q)\n[PROOFSTEP]\next\n[GOAL]\ncase neg.a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : ¬p = 0\nn✝ : ℕ\n⊢ coeff (map f (↑(expand R p) q)) n✝ = coeff (↑(expand S p) (map f q)) n✝\n[PROOFSTEP]\nrw [coeff_map, coeff_expand (Nat.pos_of_ne_zero hp), coeff_expand (Nat.pos_of_ne_zero hp)]\n[GOAL]\ncase neg.a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : ¬p = 0\nn✝ : ℕ\n⊢ ↑f (if p ∣ n✝ then coeff q (n✝ / p) else 0) = if p ∣ n✝ then coeff (map f q) (n✝ / p) else 0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : ¬p = 0\nn✝ : ℕ\nh✝ : p ∣ n✝\n⊢ ↑f (if p ∣ n✝ then coeff q (n✝ / p) else 0) = coeff (map f q) (n✝ / p)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ p : ℕ\nf : R →+* S\nq : R[X]\nhp : ¬p = 0\nn✝ : ℕ\nh✝ : ¬p ∣ n✝\n⊢ ↑f (if p ∣ n✝ then coeff q (n✝ / p) else 0) = 0\n[PROOFSTEP]\nsimp_all\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nP : R[X]\nr : R\n⊢ eval r (↑(expand R p) P) = eval (r ^ p) P\n[PROOFSTEP]\nrefine' Polynomial.induction_on P (fun a => by simp) (fun f g hf hg => _) fun n a _ => by simp\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nP : R[X]\nr a : R\n⊢ eval r (↑(expand R p) (↑C a)) = eval (r ^ p) (↑C a)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nP : R[X]\nr : R\nn : ℕ\na : R\nx✝ : eval r (↑(expand R p) (↑C a * X ^ n)) = eval (r ^ p) (↑C a * X ^ n)\n⊢ eval r (↑(expand R p) (↑C a * X ^ (n + 1))) = eval (r ^ p) (↑C a * X ^ (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nP : R[X]\nr : R\nf g : R[X]\nhf : eval r (↑(expand R p) f) = eval (r ^ p) f\nhg : eval r (↑(expand R p) g) = eval (r ^ p) g\n⊢ eval r (↑(expand R p) (f + g)) = eval (r ^ p) (f + g)\n[PROOFSTEP]\nrw [AlgHom.map_add, eval_add, eval_add, hf, hg]\n[GOAL]\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np✝ q : ℕ\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np : ℕ\nP : R[X]\nr : A\n⊢ ↑(aeval r) (↑(expand R p) P) = ↑(aeval (r ^ p)) P\n[PROOFSTEP]\nrefine' Polynomial.induction_on P (fun a => by simp) (fun f g hf hg => _) fun n a _ => by simp\n[GOAL]\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np✝ q : ℕ\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np : ℕ\nP : R[X]\nr : A\na : R\n⊢ ↑(aeval r) (↑(expand R p) (↑C a)) = ↑(aeval (r ^ p)) (↑C a)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np✝ q : ℕ\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np : ℕ\nP : R[X]\nr : A\nn : ℕ\na : R\nx✝ : ↑(aeval r) (↑(expand R p) (↑C a * X ^ n)) = ↑(aeval (r ^ p)) (↑C a * X ^ n)\n⊢ ↑(aeval r) (↑(expand R p) (↑C a * X ^ (n + 1))) = ↑(aeval (r ^ p)) (↑C a * X ^ (n + 1))\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np✝ q : ℕ\nA : Type u_1\ninst✝¹ : Semiring A\ninst✝ : Algebra R A\np : ℕ\nP : R[X]\nr : A\nf g : R[X]\nhf : ↑(aeval r) (↑(expand R p) f) = ↑(aeval (r ^ p)) f\nhg : ↑(aeval r) (↑(expand R p) g) = ↑(aeval (r ^ p)) g\n⊢ ↑(aeval r) (↑(expand R p) (f + g)) = ↑(aeval (r ^ p)) (f + g)\n[PROOFSTEP]\nrw [AlgHom.map_add, aeval_add, aeval_add, hf, hg]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\n⊢ coeff (contract p f) n = coeff f (n * p)\n[PROOFSTEP]\nsimp only [contract, coeff_monomial, sum_ite_eq', finset_sum_coeff, mem_range, not_lt, ite_eq_left_iff]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\n⊢ natDegree f + 1 ≤ n → 0 = coeff f (n * p)\n[PROOFSTEP]\nintro hn\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\nhn : natDegree f + 1 ≤ n\n⊢ 0 = coeff f (n * p)\n[PROOFSTEP]\napply (coeff_eq_zero_of_natDegree_lt _).symm\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\nhn : natDegree f + 1 ≤ n\n⊢ natDegree f < n * p\n[PROOFSTEP]\ncalc\n  f.natDegree < f.natDegree + 1 := Nat.lt_succ_self _\n  _ ≤ n * 1 := by simpa only [mul_one] using hn\n  _ ≤ n * p := mul_le_mul_of_nonneg_left (show 1 ≤ p from hp.bot_lt) (zero_le n)\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q p : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\nhn : natDegree f + 1 ≤ n\n⊢ natDegree f + 1 ≤ n * 1\n[PROOFSTEP]\nsimpa only [mul_one] using hn\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nhp : p ≠ 0\n⊢ contract p (↑(expand R p) f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np q : ℕ\nf : R[X]\nhp : p ≠ 0\nn✝ : ℕ\n⊢ coeff (contract p (↑(expand R p) f)) n✝ = coeff f n✝\n[PROOFSTEP]\nsimp [coeff_contract hp, coeff_expand hp.bot_lt, Nat.mul_div_cancel _ hp.bot_lt]\n[GOAL]\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\n⊢ ↑(expand R p) (contract p f) = f\n[PROOFSTEP]\next n\n[GOAL]\ncase a\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\n⊢ coeff (↑(expand R p) (contract p f)) n = coeff f n\n[PROOFSTEP]\nrw [coeff_expand hp.bot_lt, coeff_contract hp]\n[GOAL]\ncase a\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\n⊢ (if p ∣ n then coeff f (n / p * p) else 0) = coeff f n\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : p ∣ n\n⊢ coeff f (n / p * p) = coeff f n\n[PROOFSTEP]\nrw [Nat.div_mul_cancel h]\n[GOAL]\ncase neg\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ n\n⊢ 0 = coeff f n\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase neg.zero\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nh : ¬p ∣ Nat.zero\n⊢ 0 = coeff f Nat.zero\n[PROOFSTEP]\nexact absurd (dvd_zero p) h\n[GOAL]\ncase neg.succ\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nhave := coeff_derivative f n\n[GOAL]\ncase neg.succ\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nthis : coeff (↑derivative f) n = coeff f (n + 1) * (↑n + 1)\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nrw [hf, coeff_zero, zero_eq_mul] at this \n[GOAL]\ncase neg.succ\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nthis : coeff f (n + 1) = 0 ∨ ↑n + 1 = 0\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\ncases' this with h'\n[GOAL]\ncase neg.succ.inl\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nh' : coeff f (n + 1) = 0\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nrw [h']\n[GOAL]\ncase neg.succ.inr\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nh✝ : ↑n + 1 = 0\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nrename_i _ _ _ _ h'\n[GOAL]\ncase neg.succ.inr\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nh' : ↑n + 1 = 0\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nrw [← Nat.cast_succ, CharP.cast_eq_zero_iff R p] at h' \n[GOAL]\ncase neg.succ.inr\nR : Type u\ninst✝³ : CommSemiring R\nS : Type v\ninst✝² : CommSemiring S\np q : ℕ\ninst✝¹ : CharP R p\ninst✝ : NoZeroDivisors R\nf : R[X]\nhf : ↑derivative f = 0\nhp : p ≠ 0\nn : ℕ\nh : ¬p ∣ Nat.succ n\nh' : p ∣ Nat.succ n\n⊢ 0 = coeff f (Nat.succ n)\n[PROOFSTEP]\nexact absurd h' h\n[GOAL]\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\n⊢ map (frobenius R p) (↑(expand R p) f) = f ^ p\n[PROOFSTEP]\nrefine' f.induction_on' (fun a b ha hb => _) fun n a => _\n[GOAL]\ncase refine'_1\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf a b : R[X]\nha : map (frobenius R p) (↑(expand R p) a) = a ^ p\nhb : map (frobenius R p) (↑(expand R p) b) = b ^ p\n⊢ map (frobenius R p) (↑(expand R p) (a + b)) = (a + b) ^ p\n[PROOFSTEP]\nrw [AlgHom.map_add, Polynomial.map_add, ha, hb, add_pow_char]\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\nn : ℕ\na : R\n⊢ map (frobenius R p) (↑(expand R p) (↑(monomial n) a)) = ↑(monomial n) a ^ p\n[PROOFSTEP]\nrw [expand_monomial, map_monomial, ← C_mul_X_pow_eq_monomial, ← C_mul_X_pow_eq_monomial, mul_pow, ← C.map_pow,\n  frobenius_def]\n[GOAL]\ncase refine'_2\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\nn : ℕ\na : R\n⊢ ↑C (a ^ p) * X ^ (n * p) = ↑C (a ^ p) * (X ^ n) ^ p\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\nn : ℕ\n⊢ map (frobenius R p ^ n) (↑(expand R (p ^ n)) f) = f ^ p ^ n\n[PROOFSTEP]\ninduction' n with _ n_ih\n[GOAL]\ncase zero\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\n⊢ map (frobenius R p ^ Nat.zero) (↑(expand R (p ^ Nat.zero)) f) = f ^ p ^ Nat.zero\n[PROOFSTEP]\nsimp [RingHom.one_def]\n[GOAL]\ncase succ\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\nn✝ : ℕ\nn_ih : map (frobenius R p ^ n✝) (↑(expand R (p ^ n✝)) f) = f ^ p ^ n✝\n⊢ map (frobenius R p ^ Nat.succ n✝) (↑(expand R (p ^ Nat.succ n✝)) f) = f ^ p ^ Nat.succ n✝\n[PROOFSTEP]\nsymm\n[GOAL]\ncase succ\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\np q : ℕ\ninst✝ : CharP R p\nhp : Fact (Nat.Prime p)\nf : R[X]\nn✝ : ℕ\nn_ih : map (frobenius R p ^ n✝) (↑(expand R (p ^ n✝)) f) = f ^ p ^ n✝\n⊢ f ^ p ^ Nat.succ n✝ = map (frobenius R p ^ Nat.succ n✝) (↑(expand R (p ^ Nat.succ n✝)) f)\n[PROOFSTEP]\nrw [pow_succ', pow_mul, ← n_ih, ← expand_char, pow_succ, RingHom.mul_def, ← map_map, mul_comm, expand_mul, ← map_expand]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\n⊢ IsLocalRingHom ↑(expand R p)\n[PROOFSTEP]\nrefine' ⟨fun f hf1 => _⟩\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (↑↑(expand R p) f)\n⊢ IsUnit f\n[PROOFSTEP]\nnorm_cast at hf1 \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (↑(expand R p) f)\n⊢ IsUnit f\n[PROOFSTEP]\nhave hf2 := eq_C_of_degree_eq_zero (degree_eq_zero_of_isUnit hf1)\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (↑(expand R p) f)\nhf2 : ↑(expand R p) f = ↑C (coeff (↑(expand R p) f) 0)\n⊢ IsUnit f\n[PROOFSTEP]\nrw [coeff_expand hp, if_pos (dvd_zero _), p.zero_div] at hf2 \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (↑(expand R p) f)\nhf2 : ↑(expand R p) f = ↑C (coeff f 0)\n⊢ IsUnit f\n[PROOFSTEP]\nrw [hf2, isUnit_C] at hf1 \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (coeff f 0)\nhf2 : ↑(expand R p) f = ↑C (coeff f 0)\n⊢ IsUnit f\n[PROOFSTEP]\nrw [expand_eq_C hp] at hf2 \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : 0 < p\nf : R[X]\nhf1 : IsUnit (coeff f 0)\nhf2 : f = ↑C (coeff f 0)\n⊢ IsUnit f\n[PROOFSTEP]\nrwa [hf2, isUnit_C]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : p ≠ 0\nf : R[X]\nn : ℕ\nhf : Irreducible (↑(expand R (p ^ Nat.zero)) f)\n⊢ Irreducible f\n[PROOFSTEP]\nrwa [pow_zero, expand_one] at hf \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : p ≠ 0\nf : R[X]\nn✝ n : ℕ\nih : Irreducible (↑(expand R (p ^ n)) f) → Irreducible f\nhf : Irreducible (↑(expand R (p ^ Nat.succ n)) f)\n⊢ Irreducible (↑(expand R p) (↑(expand R (p ^ n)) f))\n[PROOFSTEP]\nrw [pow_succ] at hf \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : ℕ\nhp : p ≠ 0\nf : R[X]\nn✝ n : ℕ\nih : Irreducible (↑(expand R (p ^ n)) f) → Irreducible f\nhf : Irreducible (↑(expand R (p * p ^ n)) f)\n⊢ Irreducible (↑(expand R p) (↑(expand R (p ^ n)) f))\n[PROOFSTEP]\nrwa [expand_expand]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Expand", "llama_tokens": 14970, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5312093733737562, "lm_q2_score": 0.5273165233795671, "lm_q1q2_score": 0.28011547995408753}}
{"text": "[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\n⊢ Part.fix f x = Fix.approx f (Nat.succ (Nat.find h')) x\n[PROOFSTEP]\nlet p := fun i : ℕ => (Fix.approx f i x).Dom\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\n⊢ Part.fix f x = Fix.approx f (Nat.succ (Nat.find h')) x\n[PROOFSTEP]\nhave : p (Nat.find h') := Nat.find_spec h'\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nthis : p (Nat.find h')\n⊢ Part.fix f x = Fix.approx f (Nat.succ (Nat.find h')) x\n[PROOFSTEP]\ngeneralize hk : Nat.find h' = k\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nthis : p (Nat.find h')\nk : ℕ\nhk : Nat.find h' = k\n⊢ Part.fix f x = Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nreplace hk : Nat.find h' = k + (@Upto.zero p).val := hk\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nthis : p (Nat.find h')\nk : ℕ\nhk : Nat.find h' = k + ↑Upto.zero\n⊢ Part.fix f x = Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nrw [hk] at this \n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nthis : p (k + ↑Upto.zero)\nhk : Nat.find h' = k + ↑Upto.zero\n⊢ Part.fix f x = Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nrevert hk\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nthis : p (k + ↑Upto.zero)\n⊢ Nat.find h' = k + ↑Upto.zero → Part.fix f x = Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\ndsimp [Part.fix]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nthis : p (k + ↑Upto.zero)\n⊢ Nat.find h' = k + ↑Upto.zero →\n    (assert (∃ i, (Fix.approx f i x).Dom) fun h =>\n        WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) Upto.zero x) =\n      Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nrw [assert_pos h']\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nthis : p (k + ↑Upto.zero)\n⊢ Nat.find h' = k + ↑Upto.zero →\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) Upto.zero x =\n      Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nrevert this\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\n⊢ p (k + ↑Upto.zero) →\n    Nat.find h' = k + ↑Upto.zero →\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) Upto.zero x =\n        Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\ngeneralize Upto.zero = z\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n⊢ p (k + ↑z) →\n    Nat.find h' = k + ↑z →\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x =\n        Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nintro _this hk\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n_this : p (k + ↑z)\nhk : Nat.find h' = k + ↑z\n⊢ WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x =\n    Fix.approx f (Nat.succ k) x\n[PROOFSTEP]\nsuffices : ∀ x', WellFounded.fix (Part.fix.proof_1 f x h') (fixAux f) z x' = Fix.approx f (succ k) x'\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n_this : p (k + ↑z)\nhk : Nat.find h' = k + ↑z\nthis :\n  ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ k) x'\n⊢ WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x =\n    Fix.approx f (Nat.succ k) x\ncase this\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n_this : p (k + ↑z)\nhk : Nat.find h' = k + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ k) x'\n[PROOFSTEP]\nexact this _\n[GOAL]\ncase this\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n_this : p (k + ↑z)\nhk : Nat.find h' = k + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ k) x'\n[PROOFSTEP]\ninduction k generalizing z with\n| zero =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext x : 1\n  rw [assert_neg]\n  rfl\n  rw [Nat.zero_add] at _this \n  simpa only [not_not, Coe]\n| succ n n_ih =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext : 1\n  have hh : ¬(Fix.approx f z.val x).Dom := by\n    apply Nat.find_min h'\n    rw [hk, Nat.succ_add, ← Nat.add_succ]\n    apply Nat.lt_of_succ_le\n    apply Nat.le_add_left\n  rw [succ_add_eq_succ_add] at _this hk \n  rw [assert_pos hh, n_ih (Upto.succ z hh) _this hk]\n[GOAL]\ncase this\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nk : ℕ\nz : Upto p\n_this : p (k + ↑z)\nhk : Nat.find h' = k + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ k) x'\n[PROOFSTEP]\ninduction k generalizing z with\n| zero =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext x : 1\n  rw [assert_neg]\n  rfl\n  rw [Nat.zero_add] at _this \n  simpa only [not_not, Coe]\n| succ n n_ih =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext : 1\n  have hh : ¬(Fix.approx f z.val x).Dom := by\n    apply Nat.find_min h'\n    rw [hk, Nat.succ_add, ← Nat.add_succ]\n    apply Nat.lt_of_succ_le\n    apply Nat.le_add_left\n  rw [succ_add_eq_succ_add] at _this hk \n  rw [assert_pos hh, n_ih (Upto.succ z hh) _this hk]\n[GOAL]\ncase this.zero\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ Nat.zero) x'\n[PROOFSTEP]\n\n| zero =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext x : 1\n  rw [assert_neg]\n  rfl\n  rw [Nat.zero_add] at _this \n  simpa only [not_not, Coe]\n[GOAL]\ncase this.zero\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ Nat.zero) x'\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase this.zero\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' : α\n⊢ WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n    Fix.approx f (Nat.succ Nat.zero) x'\n[PROOFSTEP]\nrw [Fix.approx, WellFounded.fix_eq, fixAux]\n[GOAL]\ncase this.zero\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' : α\n⊢ f\n      (fun x_1 =>\n        assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_2 => (Fix.approx f x_2 x).Dom)) (fixAux f) (Upto.succ z h)\n            x_1)\n      x' =\n    f (Fix.approx f Nat.zero) x'\n[PROOFSTEP]\ncongr\n[GOAL]\ncase this.zero.e_a\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' : α\n⊢ (fun x_1 =>\n      assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n        WellFounded.fix (_ : WellFounded (Upto.GT fun x_2 => (Fix.approx f x_2 x).Dom)) (fixAux f) (Upto.succ z h)\n          x_1) =\n    Fix.approx f Nat.zero\n[PROOFSTEP]\next x : 1\n[GOAL]\ncase this.zero.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx✝ : α\nh' : ∃ i, (Fix.approx f i x✝).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x✝).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' x : α\n⊢ (assert (¬(Fix.approx f (↑z) x✝).Dom) fun h =>\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x => (Fix.approx f x x✝).Dom)) (fixAux f) (Upto.succ z h) x) =\n    Fix.approx f Nat.zero x\n[PROOFSTEP]\nrw [assert_neg]\n[GOAL]\ncase this.zero.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx✝ : α\nh' : ∃ i, (Fix.approx f i x✝).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x✝).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' x : α\n⊢ none = Fix.approx f Nat.zero x\ncase this.zero.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx✝ : α\nh' : ∃ i, (Fix.approx f i x✝).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x✝).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' x : α\n⊢ ¬¬(Fix.approx f (↑z) x✝).Dom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase this.zero.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx✝ : α\nh' : ∃ i, (Fix.approx f i x✝).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x✝).Dom\nz : Upto p\n_this : p (Nat.zero + ↑z)\nhk : Nat.find h' = Nat.zero + ↑z\nx' x : α\n⊢ ¬¬(Fix.approx f (↑z) x✝).Dom\n[PROOFSTEP]\nrw [Nat.zero_add] at _this \n[GOAL]\ncase this.zero.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx✝ : α\nh' : ∃ i, (Fix.approx f i x✝).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x✝).Dom\nz : Upto p\n_this : p ↑z\nhk : Nat.find h' = Nat.zero + ↑z\nx' x : α\n⊢ ¬¬(Fix.approx f (↑z) x✝).Dom\n[PROOFSTEP]\nsimpa only [not_not, Coe]\n[GOAL]\ncase this.succ\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ (Nat.succ n)) x'\n[PROOFSTEP]\n\n| succ n n_ih =>\n  intro x'\n  rw [Fix.approx, WellFounded.fix_eq, fixAux]\n  congr\n  ext : 1\n  have hh : ¬(Fix.approx f z.val x).Dom := by\n    apply Nat.find_min h'\n    rw [hk, Nat.succ_add, ← Nat.add_succ]\n    apply Nat.lt_of_succ_le\n    apply Nat.le_add_left\n  rw [succ_add_eq_succ_add] at _this hk \n  rw [assert_pos hh, n_ih (Upto.succ z hh) _this hk]\n[GOAL]\ncase this.succ\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\n⊢ ∀ (x' : α),\n    WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n      Fix.approx f (Nat.succ (Nat.succ n)) x'\n[PROOFSTEP]\nintro x'\n[GOAL]\ncase this.succ\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' : α\n⊢ WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n    Fix.approx f (Nat.succ (Nat.succ n)) x'\n[PROOFSTEP]\nrw [Fix.approx, WellFounded.fix_eq, fixAux]\n[GOAL]\ncase this.succ\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' : α\n⊢ f\n      (fun x_1 =>\n        assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_2 => (Fix.approx f x_2 x).Dom)) (fixAux f) (Upto.succ z h)\n            x_1)\n      x' =\n    f (Fix.approx f (n + 1)) x'\n[PROOFSTEP]\ncongr\n[GOAL]\ncase this.succ.e_a\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' : α\n⊢ (fun x_1 =>\n      assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n        WellFounded.fix (_ : WellFounded (Upto.GT fun x_2 => (Fix.approx f x_2 x).Dom)) (fixAux f) (Upto.succ z h)\n          x_1) =\n    Fix.approx f (n + 1)\n[PROOFSTEP]\next : 1\n[GOAL]\ncase this.succ.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\n⊢ (assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) (Upto.succ z h) x✝) =\n    Fix.approx f (n + 1) x✝\n[PROOFSTEP]\nhave hh : ¬(Fix.approx f z.val x).Dom := by\n  apply Nat.find_min h'\n  rw [hk, Nat.succ_add, ← Nat.add_succ]\n  apply Nat.lt_of_succ_le\n  apply Nat.le_add_left\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\n⊢ ¬(Fix.approx f (↑z) x).Dom\n[PROOFSTEP]\napply Nat.find_min h'\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\n⊢ ↑z < Nat.find h'\n[PROOFSTEP]\nrw [hk, Nat.succ_add, ← Nat.add_succ]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\n⊢ ↑z < n + Nat.succ ↑z\n[PROOFSTEP]\napply Nat.lt_of_succ_le\n[GOAL]\ncase h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\n⊢ Nat.succ ↑z ≤ n + Nat.succ ↑z\n[PROOFSTEP]\napply Nat.le_add_left\n[GOAL]\ncase this.succ.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (Nat.succ n + ↑z)\nhk : Nat.find h' = Nat.succ n + ↑z\nx' x✝ : α\nhh : ¬(Fix.approx f (↑z) x).Dom\n⊢ (assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) (Upto.succ z h) x✝) =\n    Fix.approx f (n + 1) x✝\n[PROOFSTEP]\nrw [succ_add_eq_succ_add] at _this hk \n[GOAL]\ncase this.succ.e_a.h\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ∃ i, (Fix.approx f i x).Dom\np : ℕ → Prop := fun i => (Fix.approx f i x).Dom\nn : ℕ\nn_ih :\n  ∀ (z : Upto p),\n    p (n + ↑z) →\n      Nat.find h' = n + ↑z →\n        ∀ (x' : α),\n          WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) z x' =\n            Fix.approx f (Nat.succ n) x'\nz : Upto p\n_this : p (n + Nat.succ ↑z)\nhk : Nat.find h' = n + Nat.succ ↑z\nx' x✝ : α\nhh : ¬(Fix.approx f (↑z) x).Dom\n⊢ (assert (¬(Fix.approx f (↑z) x).Dom) fun h =>\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) (Upto.succ z h) x✝) =\n    Fix.approx f (n + 1) x✝\n[PROOFSTEP]\nrw [assert_pos hh, n_ih (Upto.succ z hh) _this hk]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ¬∃ i, (Fix.approx f i x).Dom\n⊢ Part.fix f x = none\n[PROOFSTEP]\ndsimp [Part.fix]\n[GOAL]\nα : Type u_1\nβ : α → Type u_2\nf : ((a : α) → Part (β a)) → (a : α) → Part (β a)\nx : α\nh' : ¬∃ i, (Fix.approx f i x).Dom\n⊢ (assert (∃ i, (Fix.approx f i x).Dom) fun h =>\n      WellFounded.fix (_ : WellFounded (Upto.GT fun x_1 => (Fix.approx f x_1 x).Dom)) (fixAux f) Upto.zero x) =\n    none\n[PROOFSTEP]\nrw [assert_neg h']\n", "meta": {"mathlib_filename": "Mathlib.Control.Fix", "llama_tokens": 10440, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7490872131147275, "lm_q2_score": 0.3738758227716966, "lm_q1q2_score": 0.280065598131026}}
{"text": "[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\n⊢ 1 = M.mk F { fst := j, snd := 1 }\n[PROOFSTEP]\napply M.mk_eq\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\n⊢ ∃ k f g, ↑(F.map f) { fst := Nonempty.some (_ : Nonempty J), snd := 1 }.snd = ↑(F.map g) { fst := j, snd := 1 }.snd\n[PROOFSTEP]\nrefine' ⟨max' _ j, IsFiltered.leftToMax _ j, IsFiltered.rightToMax _ j, _⟩\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\n⊢ ↑(F.map (IsFiltered.leftToMax { fst := Nonempty.some (_ : Nonempty J), snd := 1 }.fst j))\n      { fst := Nonempty.some (_ : Nonempty J), snd := 1 }.snd =\n    ↑(F.map (IsFiltered.rightToMax { fst := Nonempty.some (_ : Nonempty J), snd := 1 }.fst j))\n      { fst := j, snd := 1 }.snd\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx x' y : (j : J) × ↑(F.obj j)\nhxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) x x'\n⊢ colimitMulAux F x y = colimitMulAux F x' y\n[PROOFSTEP]\ncases' x with j₁ x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx' y : (j : J) × ↑(F.obj j)\nj₁ : J\nx : ↑(F.obj j₁)\nhxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := x } x'\n⊢ colimitMulAux F { fst := j₁, snd := x } y = colimitMulAux F x' y\n[PROOFSTEP]\ncases' y with j₂ y\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx' : (j : J) × ↑(F.obj j)\nj₁ : J\nx : ↑(F.obj j₁)\nhxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := x } x'\nj₂ : J\ny : ↑(F.obj j₂)\n⊢ colimitMulAux F { fst := j₁, snd := x } { fst := j₂, snd := y } = colimitMulAux F x' { fst := j₂, snd := y }\n[PROOFSTEP]\ncases' x' with j₃ x'\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nhxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := x } { fst := j₃, snd := x' }\n⊢ colimitMulAux F { fst := j₁, snd := x } { fst := j₂, snd := y } =\n    colimitMulAux F { fst := j₃, snd := x' } { fst := j₂, snd := y }\n[PROOFSTEP]\nobtain ⟨l, f, g, hfg⟩ := hxx'\n[GOAL]\ncase mk.mk.mk.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : (F ⋙ forget MonCat).map f { fst := j₁, snd := x }.snd = (F ⋙ forget MonCat).map g { fst := j₃, snd := x' }.snd\n⊢ colimitMulAux F { fst := j₁, snd := x } { fst := j₂, snd := y } =\n    colimitMulAux F { fst := j₃, snd := x' } { fst := j₂, snd := y }\n[PROOFSTEP]\nsimp at hfg \n[GOAL]\ncase mk.mk.mk.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\n⊢ colimitMulAux F { fst := j₁, snd := x } { fst := j₂, snd := y } =\n    colimitMulAux F { fst := j₃, snd := x' } { fst := j₂, snd := y }\n[PROOFSTEP]\nobtain ⟨s, α, β, γ, h₁, h₂, h₃⟩ :=\n  IsFiltered.tulip (IsFiltered.leftToMax j₁ j₂) (IsFiltered.rightToMax j₁ j₂) (IsFiltered.rightToMax j₃ j₂)\n    (IsFiltered.leftToMax j₃ j₂) f g\n[GOAL]\ncase mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ colimitMulAux F { fst := j₁, snd := x } { fst := j₂, snd := y } =\n    colimitMulAux F { fst := j₃, snd := x' } { fst := j₂, snd := y }\n[PROOFSTEP]\napply M.mk_eq\n[GOAL]\ncase mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ∃ k f g,\n    ↑(F.map f)\n        { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₁, snd := x }.snd *\n                ↑(F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₂, snd := y }.snd }.snd =\n      ↑(F.map g)\n        { fst := IsFiltered.max { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst,\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₃, snd := x' }.snd *\n                ↑(F.map (IsFiltered.rightToMax { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₂, snd := y }.snd }.snd\n[PROOFSTEP]\nuse s, α, γ\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map α)\n      { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₁, snd := x }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₂, snd := y }.snd }.snd =\n    ↑(F.map γ)\n      { fst := IsFiltered.max { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₃, snd := x' }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₃, snd := x' }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₂, snd := y }.snd }.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₁ j₂)) x * ↑(F.map (IsFiltered.rightToMax j₁ j₂)) y) =\n    ↑(F.map γ) (↑(F.map (IsFiltered.leftToMax j₃ j₂)) x' * ↑(F.map (IsFiltered.rightToMax j₃ j₂)) y)\n[PROOFSTEP]\nsimp_rw [MonoidHom.map_mul]\n  -- Porting note : Lean cannot seem to use lemmas from concrete categories directly\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₁ j₂)) x) * ↑(F.map α) (↑(F.map (IsFiltered.rightToMax j₁ j₂)) y) =\n    ↑(F.map γ) (↑(F.map (IsFiltered.leftToMax j₃ j₂)) x') * ↑(F.map γ) (↑(F.map (IsFiltered.rightToMax j₃ j₂)) y)\n[PROOFSTEP]\nchange (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _ = (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map (IsFiltered.leftToMax j₁ j₂) ≫ F.map α) x * ↑(F.map (IsFiltered.rightToMax j₁ j₂) ≫ F.map α) y =\n    ↑(F.map (IsFiltered.leftToMax j₃ j₂) ≫ F.map γ) x' * ↑(F.map (IsFiltered.rightToMax j₃ j₂) ≫ F.map γ) y\n[PROOFSTEP]\nsimp_rw [← F.map_comp, h₁, h₂, h₃, F.map_comp]\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map f ≫ F.map β) x * ↑(F.map (IsFiltered.rightToMax j₃ j₂) ≫ F.map γ) y =\n    ↑(F.map g ≫ F.map β) x' * ↑(F.map (IsFiltered.rightToMax j₃ j₂) ≫ F.map γ) y\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map f ≫ F.map β) x = ↑(F.map g ≫ F.map β) x'\n[PROOFSTEP]\nchange F.map _ (F.map _ _) = F.map _ (F.map _ _)\n[GOAL]\ncase h.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\nx : ↑(F.obj j₁)\nj₂ : J\ny : ↑(F.obj j₂)\nj₃ : J\nx' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := x }.fst ⟶ l\ng : { fst := j₃, snd := x' }.fst ⟶ l\nhfg : ↑(F.map f) x = ↑(F.map g) x'\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₃ j₂ ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = IsFiltered.rightToMax j₃ j₂ ≫ γ\nh₃ : IsFiltered.leftToMax j₃ j₂ ≫ γ = g ≫ β\n⊢ ↑(F.map β) (↑(F.map f) x) = ↑(F.map β) (↑(F.map g) x')\n[PROOFSTEP]\nrw [hfg]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y y' : (j : J) × ↑(F.obj j)\nhyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) y y'\n⊢ colimitMulAux F x y = colimitMulAux F x y'\n[PROOFSTEP]\ncases' y with j₁ y\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y' : (j : J) × ↑(F.obj j)\nj₁ : J\ny : ↑(F.obj j₁)\nhyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := y } y'\n⊢ colimitMulAux F x { fst := j₁, snd := y } = colimitMulAux F x y'\n[PROOFSTEP]\ncases' x with j₂ x\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\ny' : (j : J) × ↑(F.obj j)\nj₁ : J\ny : ↑(F.obj j₁)\nhyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := y } y'\nj₂ : J\nx : ↑(F.obj j₂)\n⊢ colimitMulAux F { fst := j₂, snd := x } { fst := j₁, snd := y } = colimitMulAux F { fst := j₂, snd := x } y'\n[PROOFSTEP]\ncases' y' with j₃ y'\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nhyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) { fst := j₁, snd := y } { fst := j₃, snd := y' }\n⊢ colimitMulAux F { fst := j₂, snd := x } { fst := j₁, snd := y } =\n    colimitMulAux F { fst := j₂, snd := x } { fst := j₃, snd := y' }\n[PROOFSTEP]\nobtain ⟨l, f, g, hfg⟩ := hyy'\n[GOAL]\ncase mk.mk.mk.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : (F ⋙ forget MonCat).map f { fst := j₁, snd := y }.snd = (F ⋙ forget MonCat).map g { fst := j₃, snd := y' }.snd\n⊢ colimitMulAux F { fst := j₂, snd := x } { fst := j₁, snd := y } =\n    colimitMulAux F { fst := j₂, snd := x } { fst := j₃, snd := y' }\n[PROOFSTEP]\nsimp at hfg \n[GOAL]\ncase mk.mk.mk.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\n⊢ colimitMulAux F { fst := j₂, snd := x } { fst := j₁, snd := y } =\n    colimitMulAux F { fst := j₂, snd := x } { fst := j₃, snd := y' }\n[PROOFSTEP]\nobtain ⟨s, α, β, γ, h₁, h₂, h₃⟩ :=\n  IsFiltered.tulip (IsFiltered.rightToMax j₂ j₁) (IsFiltered.leftToMax j₂ j₁) (IsFiltered.leftToMax j₂ j₃)\n    (IsFiltered.rightToMax j₂ j₃) f g\n[GOAL]\ncase mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ colimitMulAux F { fst := j₂, snd := x } { fst := j₁, snd := y } =\n    colimitMulAux F { fst := j₂, snd := x } { fst := j₃, snd := y' }\n[PROOFSTEP]\napply M.mk_eq\n[GOAL]\ncase mk.mk.mk.intro.intro.intro.intro.intro.intro.intro.intro.intro.h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ∃ k f g,\n    ↑(F.map f)\n        { fst := IsFiltered.max { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst,\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst))\n                  { fst := j₂, snd := x }.snd *\n                ↑(F.map (IsFiltered.rightToMax { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst))\n                  { fst := j₁, snd := y }.snd }.snd =\n      ↑(F.map g)\n        { fst := IsFiltered.max { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst,\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst))\n                  { fst := j₂, snd := x }.snd *\n                ↑(F.map (IsFiltered.rightToMax { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst))\n                  { fst := j₃, snd := y' }.snd }.snd\n[PROOFSTEP]\nuse s, α, γ\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map α)\n      { fst := IsFiltered.max { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst))\n                { fst := j₂, snd := x }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₂, snd := x }.fst { fst := j₁, snd := y }.fst))\n                { fst := j₁, snd := y }.snd }.snd =\n    ↑(F.map γ)\n      { fst := IsFiltered.max { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst))\n                { fst := j₂, snd := x }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₂, snd := x }.fst { fst := j₃, snd := y' }.fst))\n                { fst := j₃, snd := y' }.snd }.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₂ j₁)) x * ↑(F.map (IsFiltered.rightToMax j₂ j₁)) y) =\n    ↑(F.map γ) (↑(F.map (IsFiltered.leftToMax j₂ j₃)) x * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) y')\n[PROOFSTEP]\nsimp_rw [MonoidHom.map_mul]\n  -- Porting note : Lean cannot seem to use lemmas from concrete categories directly\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₂ j₁)) x) * ↑(F.map α) (↑(F.map (IsFiltered.rightToMax j₂ j₁)) y) =\n    ↑(F.map γ) (↑(F.map (IsFiltered.leftToMax j₂ j₃)) x) * ↑(F.map γ) (↑(F.map (IsFiltered.rightToMax j₂ j₃)) y')\n[PROOFSTEP]\nchange (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _ = (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map (IsFiltered.leftToMax j₂ j₁) ≫ F.map α) x * ↑(F.map (IsFiltered.rightToMax j₂ j₁) ≫ F.map α) y =\n    ↑(F.map (IsFiltered.leftToMax j₂ j₃) ≫ F.map γ) x * ↑(F.map (IsFiltered.rightToMax j₂ j₃) ≫ F.map γ) y'\n[PROOFSTEP]\nsimp_rw [← F.map_comp, h₁, h₂, h₃, F.map_comp]\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map (IsFiltered.leftToMax j₂ j₃) ≫ F.map γ) x * ↑(F.map f ≫ F.map β) y =\n    ↑(F.map (IsFiltered.leftToMax j₂ j₃) ≫ F.map γ) x * ↑(F.map g ≫ F.map β) y'\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map f ≫ F.map β) y = ↑(F.map g ≫ F.map β) y'\n[PROOFSTEP]\nchange F.map _ (F.map _ _) = F.map _ (F.map _ _)\n[GOAL]\ncase h.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj₁ : J\ny : ↑(F.obj j₁)\nj₂ : J\nx : ↑(F.obj j₂)\nj₃ : J\ny' : ↑(F.obj j₃)\nl : J\nf : { fst := j₁, snd := y }.fst ⟶ l\ng : { fst := j₃, snd := y' }.fst ⟶ l\nhfg : ↑(F.map f) y = ↑(F.map g) y'\ns : J\nα : IsFiltered.max j₂ j₁ ⟶ s\nβ : l ⟶ s\nγ : IsFiltered.max j₂ j₃ ⟶ s\nh₁ : IsFiltered.rightToMax j₂ j₁ ≫ α = f ≫ β\nh₂ : IsFiltered.leftToMax j₂ j₁ ≫ α = IsFiltered.leftToMax j₂ j₃ ≫ γ\nh₃ : IsFiltered.rightToMax j₂ j₃ ≫ γ = g ≫ β\n⊢ ↑(F.map β) (↑(F.map f) y) = ↑(F.map β) (↑(F.map g) y')\n[PROOFSTEP]\nrw [hfg]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y : M F\n⊢ M F\n[PROOFSTEP]\nrefine' Quot.lift₂ (colimitMulAux F) _ _ x y\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y : M F\n⊢ ∀ (a b₁ b₂ : (j : J) × ↑(F.obj j)),\n    Types.Quot.Rel (F ⋙ forget MonCat) b₁ b₂ → colimitMulAux F a b₁ = colimitMulAux F a b₂\n[PROOFSTEP]\nintro x y y' h\n[GOAL]\ncase refine'_1\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx y y' : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) y y'\n⊢ colimitMulAux F x y = colimitMulAux F x y'\n[PROOFSTEP]\napply colimitMulAux_eq_of_rel_right\n[GOAL]\ncase refine'_1.hyy'\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx y y' : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) y y'\n⊢ Types.FilteredColimit.Rel (F ⋙ forget MonCat) y y'\n[PROOFSTEP]\napply Types.FilteredColimit.rel_of_quot_rel\n[GOAL]\ncase refine'_1.hyy'.a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx y y' : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) y y'\n⊢ Types.Quot.Rel (F ⋙ forget MonCat) y y'\n[PROOFSTEP]\nexact h\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y : M F\n⊢ ∀ (a₁ a₂ b : (j : J) × ↑(F.obj j)),\n    Types.Quot.Rel (F ⋙ forget MonCat) a₁ a₂ → colimitMulAux F a₁ b = colimitMulAux F a₂ b\n[PROOFSTEP]\nintro x x' y h\n[GOAL]\ncase refine'_2\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx x' y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) x x'\n⊢ colimitMulAux F x y = colimitMulAux F x' y\n[PROOFSTEP]\napply colimitMulAux_eq_of_rel_left\n[GOAL]\ncase refine'_2.hxx'\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx x' y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) x x'\n⊢ Types.FilteredColimit.Rel (F ⋙ forget MonCat) x x'\n[PROOFSTEP]\napply Types.FilteredColimit.rel_of_quot_rel\n[GOAL]\ncase refine'_2.hxx'.a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx✝ y✝ : M F\nx x' y : (j : J) × ↑(F.obj j)\nh : Types.Quot.Rel (F ⋙ forget MonCat) x x'\n⊢ Types.Quot.Rel (F ⋙ forget MonCat) x x'\n[PROOFSTEP]\nexact h\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nx y : (j : J) × ↑(F.obj j)\nk : J\nf : x.fst ⟶ k\ng : y.fst ⟶ k\n⊢ M.mk F x * M.mk F y = M.mk F { fst := k, snd := ↑(F.map f) x.snd * ↑(F.map g) y.snd }\n[PROOFSTEP]\ncases' x with j₁ x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\ny : (j : J) × ↑(F.obj j)\nk : J\ng : y.fst ⟶ k\nj₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\n⊢ M.mk F { fst := j₁, snd := x } * M.mk F y =\n    M.mk F { fst := k, snd := ↑(F.map f) { fst := j₁, snd := x }.snd * ↑(F.map g) y.snd }\n[PROOFSTEP]\ncases' y with j₂ y\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\n⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } =\n    M.mk F { fst := k, snd := ↑(F.map f) { fst := j₁, snd := x }.snd * ↑(F.map g) { fst := j₂, snd := y }.snd }\n[PROOFSTEP]\nobtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f (IsFiltered.rightToMax j₁ j₂) g\n[GOAL]\ncase mk.mk.intro.intro.intro.intro\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } =\n    M.mk F { fst := k, snd := ↑(F.map f) { fst := j₁, snd := x }.snd * ↑(F.map g) { fst := j₂, snd := y }.snd }\n[PROOFSTEP]\napply M.mk_eq\n[GOAL]\ncase mk.mk.intro.intro.intro.intro.h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ ∃ k_1 f_1 g_1,\n    ↑(F.map f_1)\n        { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₁, snd := x }.snd *\n                ↑(F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                  { fst := j₂, snd := y }.snd }.snd =\n      ↑(F.map g_1)\n        { fst := k, snd := ↑(F.map f) { fst := j₁, snd := x }.snd * ↑(F.map g) { fst := j₂, snd := y }.snd }.snd\n[PROOFSTEP]\nuse s, α, β\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ ↑(F.map α)\n      { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₁, snd := x }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))\n                { fst := j₂, snd := y }.snd }.snd =\n    ↑(F.map β) { fst := k, snd := ↑(F.map f) { fst := j₁, snd := x }.snd * ↑(F.map g) { fst := j₂, snd := y }.snd }.snd\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₁ j₂)) x * ↑(F.map (IsFiltered.rightToMax j₁ j₂)) y) =\n    ↑(F.map β) (↑(F.map f) x * ↑(F.map g) y)\n[PROOFSTEP]\nsimp_rw [MonoidHom.map_mul]\n  -- Porting note : Lean cannot seem to use lemmas from concrete categories directly\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ ↑(F.map α) (↑(F.map (IsFiltered.leftToMax j₁ j₂)) x) * ↑(F.map α) (↑(F.map (IsFiltered.rightToMax j₁ j₂)) y) =\n    ↑(F.map β) (↑(F.map f) x) * ↑(F.map β) (↑(F.map g) y)\n[PROOFSTEP]\nchange (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _ = (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _\n[GOAL]\ncase h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nk j₁ : J\nx : ↑(F.obj j₁)\nf : { fst := j₁, snd := x }.fst ⟶ k\nj₂ : J\ny : ↑(F.obj j₂)\ng : { fst := j₂, snd := y }.fst ⟶ k\ns : J\nα : IsFiltered.max j₁ j₂ ⟶ s\nβ : k ⟶ s\nh₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β\nh₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β\n⊢ ↑(F.map (IsFiltered.leftToMax j₁ j₂) ≫ F.map α) x * ↑(F.map (IsFiltered.rightToMax j₁ j₂) ≫ F.map α) y =\n    ↑(F.map f ≫ F.map β) x * ↑(F.map g ≫ F.map β) y\n[PROOFSTEP]\nsimp_rw [← F.map_comp, h₁, h₂]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx : M F\n⊢ 1 * x = x\n[PROOFSTEP]\nrefine Quot.inductionOn x ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx : M F\n⊢ ∀ (a : (j : J) × (F ⋙ forget MonCat).obj j),\n    1 * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nx : (j : J) × (F ⋙ forget MonCat).obj j\n⊢ 1 * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x\n[PROOFSTEP]\ncases' x with j x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nj : J\nx : (F ⋙ forget MonCat).obj j\n⊢ 1 * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x } =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }\n[PROOFSTEP]\nrw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one, one_mul, F.map_id]\n  -- Porting note : `id_apply` does not work here, but the two sides are def-eq\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nj : J\nx : (F ⋙ forget MonCat).obj j\n⊢ M.mk F { fst := j, snd := ↑(𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd } =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx : M F\n⊢ x * 1 = x\n[PROOFSTEP]\nrefine Quot.inductionOn x ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx : M F\n⊢ ∀ (a : (j : J) × (F ⋙ forget MonCat).obj j),\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * 1 = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a\n[PROOFSTEP]\nintro x\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nx : (j : J) × (F ⋙ forget MonCat).obj j\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x * 1 = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x\n[PROOFSTEP]\ncases' x with j x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nj : J\nx : (F ⋙ forget MonCat).obj j\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x } * 1 =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }\n[PROOFSTEP]\nrw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, x⟩ ⟨j, 1⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one, mul_one, F.map_id]\n  -- Porting note : `id_apply` does not work here, but the two sides are def-eq\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝¹ : One (M F) := colimitOne F\nsrc✝ : Mul (M F) := colimitMul F\nx✝ : M F\nj : J\nx : (F ⋙ forget MonCat).obj j\n⊢ M.mk F { fst := j, snd := ↑(𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd } =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nx y z : M F\n⊢ x * y * z = x * (y * z)\n[PROOFSTEP]\nrefine Quot.induction_on₃ x y z ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nx y z : M F\n⊢ ∀ (a b c : (j : J) × (F ⋙ forget MonCat).obj j),\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) c =\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a *\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) c)\n[PROOFSTEP]\nclear x y z\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\n⊢ ∀ (a b c : (j : J) × (F ⋙ forget MonCat).obj j),\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) c =\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a *\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) c)\n[PROOFSTEP]\nintro x y z\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nx y z : (j : J) × (F ⋙ forget MonCat).obj j\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x *\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)\n[PROOFSTEP]\ncases' x with j₁ x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\ny z : (j : J) × (F ⋙ forget MonCat).obj j\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)\n[PROOFSTEP]\ncases' y with j₂ y\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nz : (j : J) × (F ⋙ forget MonCat).obj j\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)\n[PROOFSTEP]\ncases' z with j₃ z\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *\n      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₃, snd := z } =\n    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₃, snd := z })\n[PROOFSTEP]\nchange M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } * M.mk F { fst := j₃, snd := z } =\n    M.mk F { fst := j₁, snd := x } *\n      M.mk F\n        { fst := IsFiltered.max { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst))\n                { fst := j₂, snd := y }.snd *\n              ↑(F.map (IsFiltered.rightToMax { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst))\n                { fst := j₃, snd := z }.snd }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } * M.mk F { fst := j₃, snd := z } =\n    M.mk F { fst := j₁, snd := x } *\n      M.mk F\n        { fst := IsFiltered.max j₂ j₃,\n          snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }\n[PROOFSTEP]\nrw [colimit_mul_mk_eq F ⟨j₁, x⟩ ⟨j₂, y⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))\n    (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃)) (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),\n  colimit_mul_mk_eq F ⟨(IsFiltered.max j₁ (IsFiltered.max j₂ j₃)), _⟩ ⟨j₃, z⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))\n    (𝟙 _) (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),\n  colimit_mul_mk_eq.{v, u} F ⟨j₁, x⟩ ⟨IsFiltered.max j₂ j₃, _⟩ _ (IsFiltered.leftToMax _ _) (IsFiltered.rightToMax _ _)]\n[GOAL]\ncase mk.mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ M.mk F\n      { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),\n        snd :=\n          ↑(F.map\n                  (𝟙\n                    { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),\n                        snd :=\n                          ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *\n                            ↑(F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n                              { fst := j₂, snd := y }.snd }.fst))\n              { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),\n                  snd :=\n                    ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *\n                      ↑(F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n                        { fst := j₂, snd := y }.snd }.snd *\n            ↑(F.map (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n              { fst := j₃, snd := z }.snd } =\n    M.mk F\n      {\n        fst :=\n          IsFiltered.max { fst := j₁, snd := x }.fst\n            { fst := IsFiltered.max j₂ j₃,\n                snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst,\n        snd :=\n          ↑(F.map\n                  (IsFiltered.leftToMax { fst := j₁, snd := x }.fst\n                    { fst := IsFiltered.max j₂ j₃,\n                        snd :=\n                          ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))\n              { fst := j₁, snd := x }.snd *\n            ↑(F.map\n                  (IsFiltered.rightToMax { fst := j₁, snd := x }.fst\n                    { fst := IsFiltered.max j₂ j₃,\n                        snd :=\n                          ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))\n              { fst := IsFiltered.max j₂ j₃,\n                  snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.snd }\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase mk.mk.mk.e_a.e_snd\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ ↑(F.map\n            (𝟙\n              { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),\n                  snd :=\n                    ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *\n                      ↑(F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n                        { fst := j₂, snd := y }.snd }.fst))\n        { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),\n            snd :=\n              ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *\n                ↑(F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n                  { fst := j₂, snd := y }.snd }.snd *\n      ↑(F.map (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n        { fst := j₃, snd := z }.snd =\n    ↑(F.map\n            (IsFiltered.leftToMax { fst := j₁, snd := x }.fst\n              { fst := IsFiltered.max j₂ j₃,\n                  snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))\n        { fst := j₁, snd := x }.snd *\n      ↑(F.map\n            (IsFiltered.rightToMax { fst := j₁, snd := x }.fst\n              { fst := IsFiltered.max j₂ j₃,\n                  snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))\n        { fst := IsFiltered.max j₂ j₃,\n            snd := ↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z }.snd\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.mk.mk.e_a.e_snd\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ ↑(F.map (𝟙 (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))))\n        (↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *\n          ↑(F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) y) *\n      ↑(F.map (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) z =\n    ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *\n      ↑(F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))\n        (↑(F.map (IsFiltered.leftToMax j₂ j₃)) y * ↑(F.map (IsFiltered.rightToMax j₂ j₃)) z)\n[PROOFSTEP]\nrw [F.map_id, show ∀ x, (𝟙 (F.obj (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)))) x = x from fun _ => rfl, mul_assoc,\n  MonoidHom.map_mul, F.map_comp, F.map_comp]\n[GOAL]\ncase mk.mk.mk.e_a.e_snd\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nsrc✝ : MulOneClass (M F) := colimitMulOneClass F\nj₁ : J\nx : (F ⋙ forget MonCat).obj j₁\nj₂ : J\ny : (F ⋙ forget MonCat).obj j₂\nj₃ : J\nz : (F ⋙ forget MonCat).obj j₃\n⊢ ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *\n      (↑(F.map (IsFiltered.leftToMax j₂ j₃) ≫ F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) y *\n        ↑(F.map (IsFiltered.rightToMax j₂ j₃) ≫ F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) z) =\n    ↑(F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *\n      (↑(F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) (↑(F.map (IsFiltered.leftToMax j₂ j₃)) y) *\n        ↑(F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) (↑(F.map (IsFiltered.rightToMax j₂ j₃)) z))\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\nx y : ↑(F.obj j)\n⊢ OneHom.toFun\n      { toFun := NatTrans.app (Types.colimitCocone (F ⋙ forget MonCat)).ι j,\n        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := NatTrans.app (Types.colimitCocone (F ⋙ forget MonCat)).ι j,\n          map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }\n        x *\n      OneHom.toFun\n        { toFun := NatTrans.app (Types.colimitCocone (F ⋙ forget MonCat)).ι j,\n          map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }\n        y\n[PROOFSTEP]\nconvert (colimit_mul_mk_eq.{v, u} F ⟨j, x⟩ ⟨j, y⟩ j (𝟙 j) (𝟙 j)).symm\n[GOAL]\ncase h.e'_2.h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\nx y : ↑(F.obj j)\ne_1✝ : ↑(colimit F) = M F\n⊢ OneHom.toFun\n      { toFun := NatTrans.app (Types.colimitCocone (F ⋙ forget MonCat)).ι j,\n        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }\n      (x * y) =\n    M.mk F { fst := j, snd := ↑(F.map (𝟙 j)) { fst := j, snd := x }.snd * ↑(F.map (𝟙 j)) { fst := j, snd := y }.snd }\n[PROOFSTEP]\nrw [F.map_id]\n[GOAL]\ncase h.e'_2.h\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nj : J\nx y : ↑(F.obj j)\ne_1✝ : ↑(colimit F) = M F\n⊢ OneHom.toFun\n      { toFun := NatTrans.app (Types.colimitCocone (F ⋙ forget MonCat)).ι j,\n        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }\n      (x * y) =\n    M.mk F\n      { fst := j,\n        snd :=\n          ↑(𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd *\n            ↑(𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := y }.snd }\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\n⊢ IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1\n[PROOFSTEP]\nrw [colimit_one_eq F IsFiltered.Nonempty.some]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\n⊢ IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t)\n      (M.mk F { fst := Nonempty.some (_ : Nonempty J), snd := 1 }) =\n    1\n[PROOFSTEP]\nexact MonoidHom.map_one _\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\nx y : ↑(colimit F)\n⊢ OneHom.toFun\n      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n        map_one' :=\n          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n      (x * y) =\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        x *\n      OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        y\n[PROOFSTEP]\nrefine Quot.induction_on₂ x y ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\nx y : ↑(colimit F)\n⊢ ∀ (a b : (j : J) × (F ⋙ forget MonCat).obj j),\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b) =\n      OneHom.toFun\n          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n            map_one' :=\n              (_ :\n                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a) *\n        OneHom.toFun\n          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n            map_one' :=\n              (_ :\n                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b)\n[PROOFSTEP]\nclear x y\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\n⊢ ∀ (a b : (j : J) × (F ⋙ forget MonCat).obj j),\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b) =\n      OneHom.toFun\n          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n            map_one' :=\n              (_ :\n                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a) *\n        OneHom.toFun\n          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n            map_one' :=\n              (_ :\n                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b)\n[PROOFSTEP]\nintro x y\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\nx y : (j : J) × (F ⋙ forget MonCat).obj j\n⊢ OneHom.toFun\n      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n        map_one' :=\n          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y) =\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) x) *\n      OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y)\n[PROOFSTEP]\ncases' x with i x\n[GOAL]\ncase mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ny : (j : J) × (F ⋙ forget MonCat).obj j\ni : J\nx : (F ⋙ forget MonCat).obj i\n⊢ OneHom.toFun\n      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n        map_one' :=\n          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := x } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y) =\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := x }) *\n      OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y)\n[PROOFSTEP]\ncases' y with j y\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ OneHom.toFun\n      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n        map_one' :=\n          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := x } *\n        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := y }) =\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := x }) *\n      OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := y })\n[PROOFSTEP]\nrw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j) (IsFiltered.rightToMax i j)]\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ OneHom.toFun\n      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n        map_one' :=\n          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n      (M.mk F\n        { fst := IsFiltered.max i j,\n          snd :=\n            ↑(F.map (IsFiltered.leftToMax i j)) { fst := i, snd := x }.snd *\n              ↑(F.map (IsFiltered.rightToMax i j)) { fst := j, snd := y }.snd }) =\n    OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := x }) *\n      OneHom.toFun\n        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),\n          map_one' :=\n            (_ :\n              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }\n        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := y })\n[PROOFSTEP]\ndsimp [Types.colimitCoconeIsColimit]\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ ↑(NatTrans.app t.ι (IsFiltered.max i j))\n      (↑(F.map (IsFiltered.leftToMax i j)) x * ↑(F.map (IsFiltered.rightToMax i j)) y) =\n    ↑(NatTrans.app t.ι i) x * ↑(NatTrans.app t.ι j) y\n[PROOFSTEP]\nrw [MonoidHom.map_mul]\n  -- Porting note : `rw` can't see through coercion is actually forgetful functor,\n      -- so can't rewrite `t.w_apply`\n[GOAL]\ncase mk.mk\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ ↑(NatTrans.app t.ι (IsFiltered.max i j)) (↑(F.map (IsFiltered.leftToMax i j)) x) *\n      ↑(NatTrans.app t.ι (IsFiltered.max i j)) (↑(F.map (IsFiltered.rightToMax i j)) y) =\n    ↑(NatTrans.app t.ι i) x * ↑(NatTrans.app t.ι j) y\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase mk.mk.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ ↑(NatTrans.app t.ι (IsFiltered.max i j)) (↑(F.map (IsFiltered.leftToMax i j)) x) = ↑(NatTrans.app t.ι i) x\n[PROOFSTEP]\nexact t.w_apply _ _\n[GOAL]\ncase mk.mk.e_a\nJ : Type v\ninst✝¹ : SmallCategory J\nF : J ⥤ MonCat\ninst✝ : IsFiltered J\nt : Cocone F\ni : J\nx : (F ⋙ forget MonCat).obj i\nj : J\ny : (F ⋙ forget MonCat).obj j\n⊢ ↑(NatTrans.app t.ι (IsFiltered.max i j)) (↑(F.map (IsFiltered.rightToMax i j)) y) = ↑(NatTrans.app t.ι j) y\n[PROOFSTEP]\nexact t.w_apply _ _\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : ↑(M F)\n⊢ x * y = y * x\n[PROOFSTEP]\nrefine Quot.induction_on₂ x y ?_\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : ↑(M F)\n⊢ ∀ (a b : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j),\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b =\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a\n[PROOFSTEP]\nclear x y\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\n⊢ ∀ (a b : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j),\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b =\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b *\n        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a\n[PROOFSTEP]\nintro x y\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\n⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x\n[PROOFSTEP]\nlet k := max' x.1 y.1\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\nk : J := IsFiltered.max x.fst y.fst\n⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x\n[PROOFSTEP]\nlet f := IsFiltered.leftToMax x.1 y.1\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\nk : J := IsFiltered.max x.fst y.fst\nf : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst\n⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x\n[PROOFSTEP]\nlet g := IsFiltered.rightToMax x.1 y.1\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\nk : J := IsFiltered.max x.fst y.fst\nf : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst\ng : y.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.rightToMax x.fst y.fst\n⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =\n    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *\n      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x\n[PROOFSTEP]\nrw [colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) x y k f g,\n  colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) y x k g f]\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\nk : J := IsFiltered.max x.fst y.fst\nf : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst\ng : y.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.rightToMax x.fst y.fst\n⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)\n      { fst := k,\n        snd := ↑((F ⋙ forget₂ CommMonCat MonCat).map f) x.snd * ↑((F ⋙ forget₂ CommMonCat MonCat).map g) y.snd } =\n    MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)\n      { fst := k,\n        snd := ↑((F ⋙ forget₂ CommMonCat MonCat).map g) y.snd * ↑((F ⋙ forget₂ CommMonCat MonCat).map f) x.snd }\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type v\ninst✝¹ : SmallCategory J\ninst✝ : IsFiltered J\nF : J ⥤ CommMonCat\nsrc✝ : MonCat := M F\nx y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j\nk : J := IsFiltered.max x.fst y.fst\nf : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst\ng : y.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.rightToMax x.fst y.fst\n⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)\n      { fst := IsFiltered.max x.fst y.fst,\n        snd :=\n          ↑((forget₂ CommMonCat MonCat).map (F.map (IsFiltered.leftToMax x.fst y.fst))) x.snd *\n            ↑((forget₂ CommMonCat MonCat).map (F.map (IsFiltered.rightToMax x.fst y.fst))) y.snd } =\n    MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)\n      { fst := IsFiltered.max x.fst y.fst,\n        snd :=\n          ↑((forget₂ CommMonCat MonCat).map (F.map (IsFiltered.rightToMax x.fst y.fst))) y.snd *\n            ↑((forget₂ CommMonCat MonCat).map (F.map (IsFiltered.leftToMax x.fst y.fst))) x.snd }\n[PROOFSTEP]\nrw [mul_comm]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.MonCat.FilteredColimits", "llama_tokens": 31107, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5467381519846138, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.27977499079579654}}
{"text": "[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : PrimePair P\n⊢ IsProper IF.I\n[PROOFSTEP]\ncases' IF.F.nonempty with w h\n[GOAL]\ncase intro\nP : Type u_1\ninst✝ : Preorder P\nIF : PrimePair P\nw : P\nh : w ∈ ↑IF.F\n⊢ IsProper IF.I\n[PROOFSTEP]\napply isProper_of_not_mem (_ : w ∉ IF.I)\n[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : PrimePair P\nw : P\nh : w ∈ ↑IF.F\n⊢ ¬w ∈ IF.I\n[PROOFSTEP]\nrwa [← IF.compl_I_eq_F] at h \n[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : PrimePair P\nsrc✝ : IsProper IF.I := I_isProper IF\n⊢ IsPFilter (↑IF.I)ᶜ\n[PROOFSTEP]\nrw [IF.compl_I_eq_F]\n[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : PrimePair P\nsrc✝ : IsProper IF.I := I_isProper IF\n⊢ IsPFilter ↑IF.F\n[PROOFSTEP]\nexact IF.F.isPFilter\n[GOAL]\nP : Type u_1\ninst✝ : SemilatticeInf P\nx✝ y✝ : P\nI : Ideal P\nhI : IsPrime I\nx y : P\n⊢ x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nP : Type u_1\ninst✝ : SemilatticeInf P\nx✝ y✝ : P\nI : Ideal P\nhI : IsPrime I\nx y : P\n⊢ ¬x ∈ I ∧ ¬y ∈ I → ¬x ⊓ y ∈ I\n[PROOFSTEP]\nlet F := hI.compl_filter.toPFilter\n[GOAL]\nP : Type u_1\ninst✝ : SemilatticeInf P\nx✝ y✝ : P\nI : Ideal P\nhI : IsPrime I\nx y : P\nF : PFilter P := IsPFilter.toPFilter (_ : IsPFilter (↑I)ᶜ)\n⊢ ¬x ∈ I ∧ ¬y ∈ I → ¬x ⊓ y ∈ I\n[PROOFSTEP]\nshow x ∈ F ∧ y ∈ F → x ⊓ y ∈ F\n[GOAL]\nP : Type u_1\ninst✝ : SemilatticeInf P\nx✝ y✝ : P\nI : Ideal P\nhI : IsPrime I\nx y : P\nF : PFilter P := IsPFilter.toPFilter (_ : IsPFilter (↑I)ᶜ)\n⊢ x ∈ F ∧ y ∈ F → x ⊓ y ∈ F\n[PROOFSTEP]\nexact fun h => inf_mem h.1 h.2\n[GOAL]\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ IsPrime I\n[PROOFSTEP]\nrw [IsPrime_iff]\n[GOAL]\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ IsProper I ∧ IsPFilter (↑I)ᶜ\n[PROOFSTEP]\nuse‹_›\n[GOAL]\ncase right\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ IsPFilter (↑I)ᶜ\n[PROOFSTEP]\nrefine .of_def ?_ ?_ ?_\n[GOAL]\ncase right.refine_1\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ Set.Nonempty (↑I)ᶜ\n[PROOFSTEP]\nexact Set.nonempty_compl.2 (I.IsProper_iff.1 ‹_›)\n[GOAL]\ncase right.refine_2\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ DirectedOn (fun x x_1 => x ≥ x_1) (↑I)ᶜ\n[PROOFSTEP]\nintro x hx y hy\n[GOAL]\ncase right.refine_2\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx✝ y✝ : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\nx : P\nhx : x ∈ (↑I)ᶜ\ny : P\nhy : y ∈ (↑I)ᶜ\n⊢ ∃ z, z ∈ (↑I)ᶜ ∧ (fun x x_1 => x ≥ x_1) x z ∧ (fun x x_1 => x ≥ x_1) y z\n[PROOFSTEP]\nexact ⟨x ⊓ y, fun h => (hI h).elim hx hy, inf_le_left, inf_le_right⟩\n[GOAL]\ncase right.refine_3\nP : Type u_1\ninst✝¹ : SemilatticeInf P\nx y : P\nI : Ideal P\ninst✝ : IsProper I\nhI : ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n⊢ ∀ {x y : P}, x ≤ y → x ∈ (↑I)ᶜ → y ∈ (↑I)ᶜ\n[PROOFSTEP]\nexact @mem_compl_of_ge _ _ _\n[GOAL]\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\n⊢ IsPrime I\n[PROOFSTEP]\nrw [isPrime_iff_mem_or_mem]\n[GOAL]\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\n⊢ ∀ {x y : P}, x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n[PROOFSTEP]\nintro x y\n[GOAL]\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\n⊢ x ⊓ y ∈ I → x ∈ I ∨ y ∈ I\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\n⊢ ¬x ∈ I ∧ ¬y ∈ I → ¬x ⊓ y ∈ I\n[PROOFSTEP]\nrintro ⟨hx, hynI⟩ hxy\n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\n⊢ False\n[PROOFSTEP]\napply hynI\n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\n⊢ y ∈ I\n[PROOFSTEP]\nlet J := I ⊔ principal x\n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\n⊢ y ∈ I\n[PROOFSTEP]\nhave hJuniv : (J : Set P) = Set.univ := IsMaximal.maximal_proper (lt_sup_principal_of_not_mem ‹_›)\n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\n⊢ y ∈ I\n[PROOFSTEP]\nhave hyJ : y ∈ ↑J := Set.eq_univ_iff_forall.mp hJuniv y\n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\nhyJ : y ∈ ↑J\n⊢ y ∈ I\n[PROOFSTEP]\nrw [coe_sup_eq] at hyJ \n[GOAL]\ncase intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\nhyJ : y ∈ {x_1 | ∃ i, i ∈ I ∧ ∃ j, j ∈ principal x ∧ x_1 = i ⊔ j}\n⊢ y ∈ I\n[PROOFSTEP]\nrcases hyJ with ⟨a, ha, b, hb, hy⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\na : P\nha : a ∈ I\nb : P\nhb : b ∈ principal x\nhy : y = a ⊔ b\n⊢ y ∈ I\n[PROOFSTEP]\nrw [hy]\n[GOAL]\ncase intro.intro.intro.intro.intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\na : P\nha : a ∈ I\nb : P\nhb : b ∈ principal x\nhy : y = a ⊔ b\n⊢ a ⊔ b ∈ I\n[PROOFSTEP]\nrefine' sup_mem ha (I.lower (le_inf hb _) hxy)\n[GOAL]\ncase intro.intro.intro.intro.intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\na : P\nha : a ∈ I\nb : P\nhb : b ∈ principal x\nhy : y = a ⊔ b\n⊢ b ≤ y\n[PROOFSTEP]\nrw [hy]\n[GOAL]\ncase intro.intro.intro.intro.intro\nP : Type u_1\ninst✝¹ : DistribLattice P\nI : Ideal P\ninst✝ : IsMaximal I\nx y : P\nhx : ¬x ∈ I\nhynI : ¬y ∈ I\nhxy : x ⊓ y ∈ I\nJ : Ideal P := I ⊔ principal x\nhJuniv : ↑J = Set.univ\na : P\nha : a ∈ I\nb : P\nhb : b ∈ principal x\nhy : y = a ⊔ b\n⊢ b ≤ a ⊔ b\n[PROOFSTEP]\nexact le_sup_right\n[GOAL]\nP : Type u_1\ninst✝ : BooleanAlgebra P\nx : P\nI : Ideal P\nhI : IsPrime I\n⊢ x ∈ I ∨ xᶜ ∈ I\n[PROOFSTEP]\napply hI.mem_or_mem\n[GOAL]\nP : Type u_1\ninst✝ : BooleanAlgebra P\nx : P\nI : Ideal P\nhI : IsPrime I\n⊢ x ⊓ xᶜ ∈ I\n[PROOFSTEP]\nrw [inf_compl_eq_bot]\n[GOAL]\nP : Type u_1\ninst✝ : BooleanAlgebra P\nx : P\nI : Ideal P\nhI : IsPrime I\n⊢ ⊥ ∈ I\n[PROOFSTEP]\nexact I.bot_mem\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx : P\nI : Ideal P\ninst✝ : IsProper I\nh : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I\n⊢ IsPrime I\n[PROOFSTEP]\nsimp only [isPrime_iff_mem_or_mem, or_iff_not_imp_left]\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx : P\nI : Ideal P\ninst✝ : IsProper I\nh : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I\n⊢ ∀ {x y : P}, x ⊓ y ∈ I → ¬x ∈ I → y ∈ I\n[PROOFSTEP]\nintro x y hxy hxI\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsProper I\nh : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I\nx y : P\nhxy : x ⊓ y ∈ I\nhxI : ¬x ∈ I\n⊢ y ∈ I\n[PROOFSTEP]\nhave hxcI : xᶜ ∈ I := h.resolve_left hxI\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsProper I\nh : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I\nx y : P\nhxy : x ⊓ y ∈ I\nhxI : ¬x ∈ I\nhxcI : xᶜ ∈ I\n⊢ y ∈ I\n[PROOFSTEP]\nhave ass : x ⊓ y ⊔ y ⊓ xᶜ ∈ I := sup_mem hxy (I.lower inf_le_right hxcI)\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsProper I\nh : ∀ {x : P}, x ∈ I ∨ xᶜ ∈ I\nx y : P\nhxy : x ⊓ y ∈ I\nhxI : ¬x ∈ I\nhxcI : xᶜ ∈ I\nass : x ⊓ y ⊔ y ⊓ xᶜ ∈ I\n⊢ y ∈ I\n[PROOFSTEP]\nrwa [inf_comm, sup_inf_inf_compl] at ass \n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx : P\nI : Ideal P\ninst✝ : IsPrime I\n⊢ IsMaximal I\n[PROOFSTEP]\nsimp only [IsMaximal_iff, Set.eq_univ_iff_forall, IsPrime.toIsProper, true_and]\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx : P\nI : Ideal P\ninst✝ : IsPrime I\n⊢ ∀ ⦃J : Ideal P⦄, I < J → ∀ (x : P), x ∈ ↑J\n[PROOFSTEP]\nintro J hIJ x\n[GOAL]\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsPrime I\nJ : Ideal P\nhIJ : I < J\nx : P\n⊢ x ∈ ↑J\n[PROOFSTEP]\nrcases Set.exists_of_ssubset hIJ with ⟨y, hyJ, hyI⟩\n[GOAL]\ncase intro.intro\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsPrime I\nJ : Ideal P\nhIJ : I < J\nx y : P\nhyJ : y ∈ ↑J\nhyI : ¬y ∈ ↑I\n⊢ x ∈ ↑J\n[PROOFSTEP]\nsuffices ass : x ⊓ y ⊔ x ⊓ yᶜ ∈ J\n[GOAL]\ncase intro.intro\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsPrime I\nJ : Ideal P\nhIJ : I < J\nx y : P\nhyJ : y ∈ ↑J\nhyI : ¬y ∈ ↑I\nass : x ⊓ y ⊔ x ⊓ yᶜ ∈ J\n⊢ x ∈ ↑J\n[PROOFSTEP]\nrwa [sup_inf_inf_compl] at ass \n[GOAL]\ncase ass\nP : Type u_1\ninst✝¹ : BooleanAlgebra P\nx✝ : P\nI : Ideal P\ninst✝ : IsPrime I\nJ : Ideal P\nhIJ : I < J\nx y : P\nhyJ : y ∈ ↑J\nhyI : ¬y ∈ ↑I\n⊢ x ⊓ y ⊔ x ⊓ yᶜ ∈ J\n[PROOFSTEP]\nexact sup_mem (J.lower inf_le_right hyJ) (hIJ.le <| I.lower inf_le_right <| IsPrime.mem_compl_of_not_mem ‹_› hyI)\n[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : Ideal.PrimePair P\n⊢ IsIdeal (↑IF.F)ᶜ\n[PROOFSTEP]\nrw [IF.compl_F_eq_I]\n[GOAL]\nP : Type u_1\ninst✝ : Preorder P\nIF : Ideal.PrimePair P\n⊢ IsIdeal ↑IF.I\n[PROOFSTEP]\nexact IF.I.isIdeal\n", "meta": {"mathlib_filename": "Mathlib.Order.PrimeIdeal", "llama_tokens": 5405, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5964331462646254, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.27960226837805585}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain rfl | m_pos := m.eq_zero_or_pos\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nn a b : ℕ\nP : Finpartition s\nhs : a * 0 + b * (0 + 1) = card s\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = 0 ∨ card x = 0 + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ 0) ∧\n        card (filter (fun i => card i = 0 + 1) Q.parts) = b\n[PROOFSTEP]\nrefine' ⟨⊥, by simp, _, by simpa using hs.symm⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nn a b : ℕ\nP : Finpartition s\nhs : a * 0 + b * (0 + 1) = card s\n⊢ ∀ (x : Finset α), x ∈ ⊥.parts → card x = 0 ∨ card x = 0 + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nn a b : ℕ\nP : Finpartition s\nhs : a * 0 + b * (0 + 1) = card s\n⊢ card (filter (fun i => card i = 0 + 1) ⊥.parts) = b\n[PROOFSTEP]\nsimpa using hs.symm\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nn a b : ℕ\nP : Finpartition s\nhs : a * 0 + b * (0 + 1) = card s\n⊢ ∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) ⊥.parts) id) ≤ 0\n[PROOFSTEP]\nsimp only [le_zero_iff, card_eq_zero, mem_biUnion, exists_prop, mem_filter, id.def, and_assoc,\n  sdiff_eq_empty_iff_subset, subset_iff]\n[GOAL]\ncase inl\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nn a b : ℕ\nP : Finpartition s\nhs : a * 0 + b * (0 + 1) = card s\n⊢ ∀ (x : Finset α), x ∈ P.parts → ∀ ⦃x_1 : α⦄, x_1 ∈ x → ∃ a, a ∈ ⊥.parts ∧ (∀ ⦃x_2 : α⦄, x_2 ∈ a → x_2 ∈ x) ∧ x_1 ∈ a\n[PROOFSTEP]\nexact fun x hx a ha =>\n  ⟨{ a }, mem_map_of_mem _ (P.le hx ha), singleton_subset_iff.2 ha, mem_singleton_self _⟩\n    -- Prove the case `m > 0` by strong induction on `s`\n[GOAL]\ncase inr\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nm_pos : m > 0\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\ninduction' s using Finset.strongInduction with s ih generalizing a b\n[GOAL]\ncase inr.H\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nby_cases hab : a = 0 ∧ b = 0\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : a = 0 ∧ b = 0\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nsimp only [hab.1, hab.2, add_zero, zero_mul, eq_comm, card_eq_zero, Finset.bot_eq_empty] at hs \n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhab : a = 0 ∧ b = 0\nhs : s = ∅\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nsubst hs\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s\nhs : a✝ * m + b✝ * (m + 1) = card s\nm_pos : m > 0\na b : ℕ\nhab : a = 0 ∧ b = 0\nih :\n  ∀ (t : Finset α),\n    t ⊂ ∅ →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\nP : Finpartition ∅\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nhave : P = Finpartition.empty _ := Unique.eq_default (α := Finpartition ⊥) P\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s\nhs : a✝ * m + b✝ * (m + 1) = card s\nm_pos : m > 0\na b : ℕ\nhab : a = 0 ∧ b = 0\nih :\n  ∀ (t : Finset α),\n    t ⊂ ∅ →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\nP : Finpartition ∅\nthis : P = Finpartition.empty (Finset α)\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nexact ⟨Finpartition.empty _, by simp, by simp [this], by simp [hab.2]⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s\nhs : a✝ * m + b✝ * (m + 1) = card s\nm_pos : m > 0\na b : ℕ\nhab : a = 0 ∧ b = 0\nih :\n  ∀ (t : Finset α),\n    t ⊂ ∅ →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\nP : Finpartition ∅\nthis : P = Finpartition.empty (Finset α)\n⊢ ∀ (x : Finset α), x ∈ (Finpartition.empty (Finset α)).parts → card x = m ∨ card x = m + 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s\nhs : a✝ * m + b✝ * (m + 1) = card s\nm_pos : m > 0\na b : ℕ\nhab : a = 0 ∧ b = 0\nih :\n  ∀ (t : Finset α),\n    t ⊂ ∅ →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\nP : Finpartition ∅\nthis : P = Finpartition.empty (Finset α)\n⊢ ∀ (x : Finset α),\n    x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) (Finpartition.empty (Finset α)).parts) id) ≤ m\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s\nhs : a✝ * m + b✝ * (m + 1) = card s\nm_pos : m > 0\na b : ℕ\nhab : a = 0 ∧ b = 0\nih :\n  ∀ (t : Finset α),\n    t ⊂ ∅ →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\nP : Finpartition ∅\nthis : P = Finpartition.empty (Finset α)\n⊢ card (filter (fun i => card i = m + 1) (Finpartition.empty (Finset α)).parts) = b\n[PROOFSTEP]\nsimp [hab.2]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : ¬(a = 0 ∧ b = 0)\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nsimp_rw [not_and_or, ← Ne.def, ← pos_iff_ne_zero] at hab \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nset n := if 0 < a then m else m + 1 with hn\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨hn₀, hn₁, hn₂, hn₃⟩ :\n  0 < n ∧\n    n ≤ m + 1 ∧ n ≤ a * m + b * (m + 1) ∧ ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = s.card - n :=\n  by\n  rw [hn, ← hs]\n  split_ifs with h <;> rw [tsub_mul, one_mul]\n  · refine' ⟨m_pos, le_succ _, le_add_right (le_mul_of_pos_left ‹0 < a›), _⟩\n    rw [tsub_add_eq_add_tsub (le_mul_of_pos_left h)]\n  · refine' ⟨succ_pos', le_rfl, le_add_left (le_mul_of_pos_left <| hab.resolve_left ‹¬0 < a›), _⟩\n    rw [← add_tsub_assoc_of_le (le_mul_of_pos_left <| hab.resolve_left ‹¬0 < a›)]\n      /- We will call the inductive hypothesis on a partition of `s \\ t` for a carefully chosen `t ⊆ s`.\n          To decide which, however, we must distinguish the case where all parts of `P` have size `m` (in\n          which case we take `t` to be an arbitrary subset of `s` of size `n`) from the case where at\n          least one part `u` of `P` has size `m + 1` (in which case we take `t` to be an arbitrary subset\n          of `u` of size `n`). The rest of each branch is just tedious calculations to satisfy the\n          induction hypothesis. -/\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\n⊢ 0 < n ∧\n    n ≤ m + 1 ∧\n      n ≤ a * m + b * (m + 1) ∧ (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\n[PROOFSTEP]\nrw [hn, ← hs]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\n⊢ (0 < if 0 < a then m else m + 1) ∧\n    (if 0 < a then m else m + 1) ≤ m + 1 ∧\n      (if 0 < a then m else m + 1) ≤ a * m + b * (m + 1) ∧\n        (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) =\n          a * m + b * (m + 1) - if 0 < a then m else m + 1\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : 0 < a\n⊢ 0 < m ∧ m ≤ m + 1 ∧ m ≤ a * m + b * (m + 1) ∧ (a - 1) * m + b * (m + 1) = a * m + b * (m + 1) - m\n[PROOFSTEP]\nrw [tsub_mul, one_mul]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : ¬0 < a\n⊢ 0 < m + 1 ∧ m + 1 ≤ m + 1 ∧ m + 1 ≤ a * m + b * (m + 1) ∧ a * m + (b - 1) * (m + 1) = a * m + b * (m + 1) - (m + 1)\n[PROOFSTEP]\nrw [tsub_mul, one_mul]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : 0 < a\n⊢ 0 < m ∧ m ≤ m + 1 ∧ m ≤ a * m + b * (m + 1) ∧ a * m - m + b * (m + 1) = a * m + b * (m + 1) - m\n[PROOFSTEP]\nrefine' ⟨m_pos, le_succ _, le_add_right (le_mul_of_pos_left ‹0 < a›), _⟩\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : 0 < a\n⊢ a * m - m + b * (m + 1) = a * m + b * (m + 1) - m\n[PROOFSTEP]\nrw [tsub_add_eq_add_tsub (le_mul_of_pos_left h)]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : ¬0 < a\n⊢ 0 < m + 1 ∧\n    m + 1 ≤ m + 1 ∧ m + 1 ≤ a * m + b * (m + 1) ∧ a * m + (b * (m + 1) - (m + 1)) = a * m + b * (m + 1) - (m + 1)\n[PROOFSTEP]\nrefine' ⟨succ_pos', le_rfl, le_add_left (le_mul_of_pos_left <| hab.resolve_left ‹¬0 < a›), _⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nh : ¬0 < a\n⊢ a * m + (b * (m + 1) - (m + 1)) = a * m + b * (m + 1) - (m + 1)\n[PROOFSTEP]\nrw [← add_tsub_assoc_of_le (le_mul_of_pos_left <| hab.resolve_left ‹¬0 < a›)]\n  /- We will call the inductive hypothesis on a partition of `s \\ t` for a carefully chosen `t ⊆ s`.\n      To decide which, however, we must distinguish the case where all parts of `P` have size `m` (in\n      which case we take `t` to be an arbitrary subset of `s` of size `n`) from the case where at\n      least one part `u` of `P` has size `m + 1` (in which case we take `t` to be an arbitrary subset\n      of `u` of size `n`). The rest of each branch is just tedious calculations to satisfy the\n      induction hypothesis. -/\n[GOAL]\ncase neg.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nby_cases h : ∀ u ∈ P.parts, card u < m + 1\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨t, hts, htn⟩ := exists_smaller_set s n (hn₂.trans_eq hs)\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nhave ht : t.Nonempty := by rwa [← card_pos, htn]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\n⊢ Finset.Nonempty t\n[PROOFSTEP]\nrwa [← card_pos, htn]\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nhave hcard : ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = (s \\ t).card := by\n  rw [card_sdiff ‹t ⊆ s›, htn, hn₃]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\n⊢ (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\n[PROOFSTEP]\nrw [card_sdiff ‹t ⊆ s›, htn, hn₃]\n[GOAL]\ncase pos.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨R, hR₁, _, hR₃⟩ :=\n  @ih (s \\ t) (sdiff_ssubset hts ‹t.Nonempty›) (if 0 < a then a - 1 else a) (if 0 < a then b else b - 1) (P.avoid t)\n    hcard\n[GOAL]\ncase pos.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nrefine' ⟨R.extend ht.ne_empty sdiff_disjoint (sdiff_sup_cancel hts), _, _, _⟩\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∀ (x : Finset α),\n    x ∈ (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts → card x = m ∨ card x = m + 1\n[PROOFSTEP]\nsimp only [extend_parts, mem_insert, forall_eq_or_imp, and_iff_left hR₁, htn, hn]\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ (if 0 < a then m else m + 1) = m ∨ (if 0 < a then m else m + 1) = m + 1\n[PROOFSTEP]\nexact ite_eq_or_eq _ _ _\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∀ (x : Finset α),\n    x ∈ P.parts →\n      card\n          (x \\\n            Finset.biUnion\n              (filter (fun y => y ⊆ x) (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts) id) ≤\n        m\n[PROOFSTEP]\nexact fun x hx => (card_le_of_subset <| sdiff_subset _ _).trans (lt_succ_iff.1 <| h _ hx)\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (filter (fun i => card i = m + 1) (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts) = b\n[PROOFSTEP]\nsimp_rw [extend_parts, filter_insert, htn, m.succ_ne_self.symm.ite_eq_right_iff]\n[GOAL]\ncase pos.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card\n      (if ¬0 < a then insert t (filter (fun i => card i = m + 1) R.parts)\n      else filter (fun i => card i = m + 1) R.parts) =\n    b\n[PROOFSTEP]\nsplit_ifs with ha\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nha : 0 < a\n⊢ card (filter (fun i => card i = m + 1) R.parts) = b\n[PROOFSTEP]\nrw [hR₃, if_pos ha]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nha : ¬0 < a\n⊢ card (insert t (filter (fun i => card i = m + 1) R.parts)) = b\n[PROOFSTEP]\nrw [card_insert_of_not_mem, hR₃, if_neg ha, tsub_add_cancel_of_le]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nha : ¬0 < a\n⊢ 1 ≤ b\n[PROOFSTEP]\nexact hab.resolve_left ha\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nha : ¬0 < a\n⊢ ¬t ∈ filter (fun i => card i = m + 1) R.parts\n[PROOFSTEP]\nintro H\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∀ (u : Finset α), u ∈ P.parts → card u < m + 1\nt : Finset α\nhts : t ⊆ s\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nleft✝ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nha : ¬0 < a\nH : t ∈ filter (fun i => card i = m + 1) R.parts\n⊢ False\n[PROOFSTEP]\nexact ht.ne_empty (le_sdiff_iff.1 <| R.le <| filter_subset _ _ H)\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ¬∀ (u : Finset α), u ∈ P.parts → card u < m + 1\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nh : ∃ u, u ∈ P.parts ∧ m + 1 ≤ card u\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨u, hu₁, hu₂⟩ := h\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨t, htu, htn⟩ := exists_smaller_set _ _ (hn₁.trans hu₂)\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nhave ht : t.Nonempty := by rwa [← card_pos, htn]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\n⊢ Finset.Nonempty t\n[PROOFSTEP]\nrwa [← card_pos, htn]\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nhave hcard : ite (0 < a) (a - 1) a * m + ite (0 < a) b (b - 1) * (m + 1) = (s \\ t).card := by\n  rw [card_sdiff (htu.trans <| P.le hu₁), htn, hn₃]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\n⊢ (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\n[PROOFSTEP]\nrw [card_sdiff (htu.trans <| P.le hu₁), htn, hn₃]\n[GOAL]\ncase neg.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nobtain ⟨R, hR₁, hR₂, hR₃⟩ :=\n  @ih (s \\ t) (sdiff_ssubset (htu.trans <| P.le hu₁) ht) (if 0 < a then a - 1 else a) (if 0 < a then b else b - 1)\n    (P.avoid t) hcard\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∃ Q,\n    (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n      (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n        card (filter (fun i => card i = m + 1) Q.parts) = b\n[PROOFSTEP]\nrefine' ⟨R.extend ht.ne_empty sdiff_disjoint (sdiff_sup_cancel <| htu.trans <| P.le hu₁), _, _, _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∀ (x : Finset α),\n    x ∈ (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts → card x = m ∨ card x = m + 1\n[PROOFSTEP]\nsimp only [mem_insert, forall_eq_or_imp, extend_parts, and_iff_left hR₁, htn, hn]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ (if 0 < a then m else m + 1) = m ∨ (if 0 < a then m else m + 1) = m + 1\n[PROOFSTEP]\nexact ite_eq_or_eq _ _ _\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∀ (x : Finset α),\n    x ∈ P.parts →\n      card\n          (x \\\n            Finset.biUnion\n              (filter (fun y => y ⊆ x) (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts) id) ≤\n        m\n[PROOFSTEP]\nconv in _ ∈ _ => rw [← insert_erase hu₁]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\n| x ∈ P.parts\n[PROOFSTEP]\nrw [← insert_erase hu₁]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\n| x ∈ P.parts\n[PROOFSTEP]\nrw [← insert_erase hu₁]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\n| x ∈ P.parts\n[PROOFSTEP]\nrw [← insert_erase hu₁]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ ∀ (x : Finset α),\n    x ∈ insert u (erase P.parts u) →\n      card\n          (x \\\n            Finset.biUnion\n              (filter (fun y => y ⊆ x) (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts) id) ≤\n        m\n[PROOFSTEP]\nsimp only [and_imp, mem_insert, forall_eq_or_imp, Ne.def, extend_parts]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (u \\ Finset.biUnion (filter (fun y => y ⊆ u) (insert t R.parts)) id) ≤ m ∧\n    ∀ (a : Finset α),\n      a ∈ erase P.parts u → card (a \\ Finset.biUnion (filter (fun y => y ⊆ a) (insert t R.parts)) id) ≤ m\n[PROOFSTEP]\nrefine' ⟨_, fun x hx => (card_le_of_subset _).trans <| hR₂ x _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (u \\ Finset.biUnion (filter (fun y => y ⊆ u) (insert t R.parts)) id) ≤ m\n[PROOFSTEP]\nsimp only [filter_insert, if_pos htu, biUnion_insert, mem_erase, id.def]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (u \\ (t ∪ Finset.biUnion (filter (fun y => y ⊆ u) R.parts) id)) ≤ m\n[PROOFSTEP]\nobtain rfl | hut := eq_or_ne u t\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1.inl\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nhtu : u ⊆ u\nhtn : card u = n\nht : Finset.Nonempty u\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ u)\nR : Finpartition (s \\ u)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P u).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (u \\ (u ∪ Finset.biUnion (filter (fun y => y ⊆ u) R.parts) id)) ≤ m\n[PROOFSTEP]\nrw [sdiff_eq_empty_iff_subset.2 (subset_union_left _ _)]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1.inl\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nhtu : u ⊆ u\nhtn : card u = n\nht : Finset.Nonempty u\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ u)\nR : Finpartition (s \\ u)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P u).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card ∅ ≤ m\n[PROOFSTEP]\nexact bot_le\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1.inr\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nhut : u ≠ t\n⊢ card (u \\ (t ∪ Finset.biUnion (filter (fun y => y ⊆ u) R.parts) id)) ≤ m\n[PROOFSTEP]\nrefine'\n  (card_le_of_subset fun i => _).trans\n    (hR₂ (u \\ t) <| P.mem_avoid.2 ⟨u, hu₁, fun i => hut <| i.antisymm htu, rfl⟩)\n      -- Porting note: `not_and` required because `∃ x ∈ s, p x` is defined differently\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1.inr\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nhut : u ≠ t\ni : α\n⊢ i ∈ u \\ (t ∪ Finset.biUnion (filter (fun y => y ⊆ u) R.parts) id) →\n    i ∈ (u \\ t) \\ Finset.biUnion (filter (fun y => y ⊆ u \\ t) R.parts) id\n[PROOFSTEP]\nsimp only [not_exists, not_and, mem_biUnion, and_imp, mem_union, mem_filter, mem_sdiff, id.def, not_or]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_1.inr\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nhut : u ≠ t\ni : α\n⊢ i ∈ u →\n    ¬i ∈ t →\n      (∀ (x : Finset α), x ∈ R.parts → x ⊆ u → ¬i ∈ x) →\n        (i ∈ u ∧ ¬i ∈ t) ∧ ∀ (x : Finset α), x ∈ R.parts → x ⊆ u \\ t → ¬i ∈ x\n[PROOFSTEP]\nexact fun hi₁ hi₂ hi₃ => ⟨⟨hi₁, hi₂⟩, fun x hx hx' => hi₃ _ hx <| hx'.trans <| sdiff_subset _ _⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_2\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\nhx : x ∈ erase P.parts u\n⊢ x \\ Finset.biUnion (filter (fun y => y ⊆ x) (insert t R.parts)) id ⊆\n    x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id\n[PROOFSTEP]\napply sdiff_subset_sdiff Subset.rfl (biUnion_subset_biUnion_of_subset_left _ _)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\nhx : x ∈ erase P.parts u\n⊢ filter (fun y => y ⊆ x) R.parts ⊆ filter (fun y => y ⊆ x) (insert t R.parts)\n[PROOFSTEP]\nexact filter_subset_filter _ (subset_insert _ _)\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\nhx : x ∈ erase P.parts u\n⊢ x ∈ (avoid P t).parts\n[PROOFSTEP]\nsimp only [avoid, ofErase, mem_erase, mem_image, bot_eq_empty]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_2.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nx : Finset α\nhx : x ∈ erase P.parts u\n⊢ x ≠ ∅ ∧ ∃ a, a ∈ P.parts ∧ a \\ t = x\n[PROOFSTEP]\nexact\n  ⟨(nonempty_of_mem_parts _ <| mem_of_mem_erase hx).ne_empty, _, mem_of_mem_erase hx,\n    (disjoint_of_subset_right htu <| P.disjoint (mem_of_mem_erase hx) hu₁ <| ne_of_mem_erase hx).sdiff_eq_left⟩\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card (filter (fun i => card i = m + 1) (extend R (_ : t ≠ ∅) (_ : Disjoint (s \\ t) t) (_ : s \\ t ⊔ t = s)).parts) = b\n[PROOFSTEP]\nsimp only [extend_parts, filter_insert, htn, hn, m.succ_ne_self.symm.ite_eq_right_iff]\n[GOAL]\ncase neg.intro.intro.intro.intro.intro.intro.intro.refine'_3\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\n⊢ card\n      (if ¬0 < a then insert t (filter (fun i => card i = m + 1) R.parts)\n      else filter (fun i => card i = m + 1) R.parts) =\n    b\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nh : 0 < a\n⊢ card (filter (fun i => card i = m + 1) R.parts) = b\n[PROOFSTEP]\nrw [hR₃, if_pos h]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nh : ¬0 < a\n⊢ card (insert t (filter (fun i => card i = m + 1) R.parts)) = b\n[PROOFSTEP]\nrw [card_insert_of_not_mem, hR₃, if_neg h, Nat.sub_add_cancel (hab.resolve_left h)]\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nh : ¬0 < a\n⊢ ¬t ∈ filter (fun i => card i = m + 1) R.parts\n[PROOFSTEP]\nintro H\n[GOAL]\ncase neg\nα : Type u_1\ninst✝ : DecidableEq α\ns✝ t✝ : Finset α\nm n✝ a✝ b✝ : ℕ\nP✝ : Finpartition s✝\nhs✝ : a✝ * m + b✝ * (m + 1) = card s✝\nm_pos : m > 0\ns : Finset α\nih :\n  ∀ (t : Finset α),\n    t ⊂ s →\n      ∀ {a b : ℕ} {P : Finpartition t},\n        a * m + b * (m + 1) = card t →\n          ∃ Q,\n            (∀ (x : Finset α), x ∈ Q.parts → card x = m ∨ card x = m + 1) ∧\n              (∀ (x : Finset α), x ∈ P.parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) Q.parts) id) ≤ m) ∧\n                card (filter (fun i => card i = m + 1) Q.parts) = b\na b : ℕ\nP : Finpartition s\nhs : a * m + b * (m + 1) = card s\nhab : 0 < a ∨ 0 < b\nn : ℕ := if 0 < a then m else m + 1\nhn : n = if 0 < a then m else m + 1\nhn₀ : 0 < n\nhn₁ : n ≤ m + 1\nhn₂ : n ≤ a * m + b * (m + 1)\nhn₃ : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card s - n\nu : Finset α\nhu₁ : u ∈ P.parts\nhu₂ : m + 1 ≤ card u\nt : Finset α\nhtu : t ⊆ u\nhtn : card t = n\nht : Finset.Nonempty t\nhcard : (if 0 < a then a - 1 else a) * m + (if 0 < a then b else b - 1) * (m + 1) = card (s \\ t)\nR : Finpartition (s \\ t)\nhR₁ : ∀ (x : Finset α), x ∈ R.parts → card x = m ∨ card x = m + 1\nhR₂ : ∀ (x : Finset α), x ∈ (avoid P t).parts → card (x \\ Finset.biUnion (filter (fun y => y ⊆ x) R.parts) id) ≤ m\nhR₃ : card (filter (fun i => card i = m + 1) R.parts) = if 0 < a then b else b - 1\nh : ¬0 < a\nH : t ∈ filter (fun i => card i = m + 1) R.parts\n⊢ False\n[PROOFSTEP]\nexact ht.ne_empty (le_sdiff_iff.1 <| R.le <| filter_subset _ _ H)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ card (filter (fun u => card u = m) (equitabilise h).parts) = a\n[PROOFSTEP]\nrefine' (mul_eq_mul_right_iff.1 <| (add_left_inj (b * (m + 1))).1 _).resolve_right hm\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ card (filter (fun u => card u = m) (equitabilise h).parts) * m + b * (m + 1) = a * m + b * (m + 1)\n[PROOFSTEP]\nrw [h, ← (P.equitabilise h).sum_card_parts]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ card (filter (fun u => card u = m) (equitabilise h).parts) * m + b * (m + 1) =\n    Finset.sum (equitabilise h).parts fun i => card i\n[PROOFSTEP]\nhave hunion :\n  (P.equitabilise h).parts =\n    ((P.equitabilise h).parts.filter fun u => u.card = m) ∪ (P.equitabilise h).parts.filter fun u => u.card = m + 1 :=\n  by\n  rw [← filter_or, filter_true_of_mem]\n  exact fun x => card_eq_of_mem_parts_equitabilise\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ (equitabilise h).parts =\n    filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts\n[PROOFSTEP]\nrw [← filter_or, filter_true_of_mem]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ ∀ (x : Finset α), x ∈ (equitabilise h).parts → card x = m ∨ card x = m + 1\n[PROOFSTEP]\nexact fun x => card_eq_of_mem_parts_equitabilise\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h).parts =\n    filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts\n⊢ card (filter (fun u => card u = m) (equitabilise h).parts) * m + b * (m + 1) =\n    Finset.sum (equitabilise h).parts fun i => card i\n[PROOFSTEP]\nnth_rw 2 [hunion]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h).parts =\n    filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts\n⊢ card (filter (fun u => card u = m) (equitabilise h).parts) * m + b * (m + 1) =\n    Finset.sum\n      (filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts)\n      fun i => card i\n[PROOFSTEP]\nrw [sum_union, sum_const_nat fun x hx => (mem_filter.1 hx).2, sum_const_nat fun x hx => (mem_filter.1 hx).2,\n  P.card_filter_equitabilise_big]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h).parts =\n    filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts\n⊢ Disjoint (filter (fun u => card u = m) (equitabilise h).parts)\n    (filter (fun u => card u = m + 1) (equitabilise h).parts)\n[PROOFSTEP]\nrefine' disjoint_filter_filter' _ _ _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h).parts =\n    filter (fun u => card u = m) (equitabilise h).parts ∪ filter (fun u => card u = m + 1) (equitabilise h).parts\n⊢ Disjoint (fun u => card u = m) fun u => card u = m + 1\n[PROOFSTEP]\nintro x ha hb i h\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh✝ : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h✝).parts =\n    filter (fun u => card u = m) (equitabilise h✝).parts ∪ filter (fun u => card u = m + 1) (equitabilise h✝).parts\nx : Finset α → Prop\nha : x ≤ fun u => card u = m\nhb : x ≤ fun u => card u = m + 1\ni : Finset α\nh : x i\n⊢ ⊥ i\n[PROOFSTEP]\napply succ_ne_self m _\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh✝ : a * m + b * (m + 1) = card s\nhm : m ≠ 0\nhunion :\n  (equitabilise h✝).parts =\n    filter (fun u => card u = m) (equitabilise h✝).parts ∪ filter (fun u => card u = m + 1) (equitabilise h✝).parts\nx : Finset α → Prop\nha : x ≤ fun u => card u = m\nhb : x ≤ fun u => card u = m + 1\ni : Finset α\nh : x i\n⊢ succ m = m\n[PROOFSTEP]\nexact (hb i h).symm.trans (ha i h)\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ card (equitabilise h).parts = a + b\n[PROOFSTEP]\nrw [← filter_true_of_mem fun x => card_eq_of_mem_parts_equitabilise, filter_or, card_union_eq,\n  P.card_filter_equitabilise_small _ hm, P.card_filter_equitabilise_big]\n  -- Porting note: was `infer_instance`\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhm : m ≠ 0\n⊢ Disjoint (filter (fun x => card x = m) (equitabilise h).parts)\n    (filter (fun x => card x = m + 1) (equitabilise h).parts)\n[PROOFSTEP]\nexact disjoint_filter.2 fun x _ h₀ h₁ => Nat.succ_ne_self m <| h₁.symm.trans h₀\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhn : n ≠ 0\nhs : n ≤ card s\n⊢ ∃ P, IsEquipartition P ∧ card P.parts = n\n[PROOFSTEP]\nrw [← pos_iff_ne_zero] at hn \n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhn : 0 < n\nhs : n ≤ card s\n⊢ ∃ P, IsEquipartition P ∧ card P.parts = n\n[PROOFSTEP]\nhave : (n - s.card % n) * (s.card / n) + s.card % n * (s.card / n + 1) = s.card := by\n  rw [tsub_mul, mul_add, ← add_assoc, tsub_add_cancel_of_le (Nat.mul_le_mul_right _ (mod_lt _ hn).le), mul_one,\n    add_comm, mod_add_div]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhn : 0 < n\nhs : n ≤ card s\n⊢ (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s\n[PROOFSTEP]\nrw [tsub_mul, mul_add, ← add_assoc, tsub_add_cancel_of_le (Nat.mul_le_mul_right _ (mod_lt _ hn).le), mul_one, add_comm,\n  mod_add_div]\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhn : 0 < n\nhs : n ≤ card s\nthis : (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s\n⊢ ∃ P, IsEquipartition P ∧ card P.parts = n\n[PROOFSTEP]\nrefine' ⟨(indiscrete (card_pos.1 <| hn.trans_le hs).ne_empty).equitabilise this, equitabilise_isEquipartition, _⟩\n[GOAL]\nα : Type u_1\ninst✝ : DecidableEq α\ns t : Finset α\nm n a b : ℕ\nP : Finpartition s\nh : a * m + b * (m + 1) = card s\nhn : 0 < n\nhs : n ≤ card s\nthis : (n - card s % n) * (card s / n) + card s % n * (card s / n + 1) = card s\n⊢ card (equitabilise this).parts = n\n[PROOFSTEP]\nrw [card_parts_equitabilise _ _ (Nat.div_pos hs hn).ne', tsub_add_cancel_of_le (mod_lt _ hn).le]\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Regularity.Equitabilise", "llama_tokens": 51970, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6001883592602049, "lm_q2_score": 0.46490157137338844, "lm_q1q2_score": 0.27902851134008505}}
{"text": "[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (C i)\ni : I\nx✝³ x✝² : C i\nx✝¹ x✝ : x✝³ ⟶ x✝²\nh : (incl i).map x✝¹ = (incl i).map x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\ninjection h\n[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ : (i : I) → C i ⥤ D\nF G : (i : I) × C i ⥤ D\nh : (i : I) → incl i ⋙ F ⟶ incl i ⋙ G\n⊢ ∀ ⦃X Y : (i : I) × C i⦄ (f : X ⟶ Y),\n    F.map f ≫\n        (fun x =>\n            match x with\n            | { fst := j, snd := X } => NatTrans.app (h j) X)\n          Y =\n      (fun x =>\n            match x with\n            | { fst := j, snd := X } => NatTrans.app (h j) X)\n          X ≫\n        G.map f\n[PROOFSTEP]\nrintro ⟨j, X⟩ ⟨_, _⟩ ⟨f⟩\n[GOAL]\ncase mk.mk.mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ : (i : I) → C i ⥤ D\nF G : (i : I) × C i ⥤ D\nh : (i : I) → incl i ⋙ F ⟶ incl i ⋙ G\nj : I\nX Y✝ : C j\nf : X ⟶ Y✝\n⊢ F.map (SigmaHom.mk f) ≫\n      (fun x =>\n          match x with\n          | { fst := j, snd := X } => NatTrans.app (h j) X)\n        { fst := j, snd := Y✝ } =\n    (fun x =>\n          match x with\n          | { fst := j, snd := X } => NatTrans.app (h j) X)\n        { fst := j, snd := X } ≫\n      G.map (SigmaHom.mk f)\n[PROOFSTEP]\napply (h j).naturality\n[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\n⊢ ∀ (X : (i : I) × C i),\n    { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (𝟙 X) =\n      𝟙 ({ obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.obj X)\n[PROOFSTEP]\nrintro ⟨i, X⟩\n[GOAL]\ncase mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\ni : I\nX : C i\n⊢ { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (𝟙 { fst := i, snd := X }) =\n    𝟙 ({ obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.obj { fst := i, snd := X })\n[PROOFSTEP]\napply (F i).map_id\n[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\n⊢ ∀ {X Y Z : (i : I) × C i} (f : X ⟶ Y) (g : Y ⟶ Z),\n    { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (f ≫ g) =\n      { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map f ≫\n        { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map g\n[PROOFSTEP]\nrintro ⟨i, X⟩ ⟨_, Y⟩ ⟨_, Z⟩ ⟨f⟩ ⟨g⟩\n[GOAL]\ncase mk.mk.mk.mk.mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\ni : I\nX Y✝¹ : C i\nf : X ⟶ Y✝¹\nY✝ : C i\ng : Y✝¹ ⟶ Y✝\n⊢ { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (SigmaHom.mk f ≫ SigmaHom.mk g) =\n    { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (SigmaHom.mk f) ≫\n      { obj := fun X => (F X.fst).obj X.snd, map := fun {X Y} g => descMap F X Y g }.map (SigmaHom.mk g)\n[PROOFSTEP]\napply (F i).map_comp\n[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\nq : (i : I) × C i ⥤ D\nh : (i : I) → incl i ⋙ q ≅ F i\n⊢ ∀ {X Y : (i : I) × C i} (f : X ⟶ Y),\n    q.map f ≫\n        ((fun x =>\n              match x with\n              | { fst := i, snd := X } => (h i).app X)\n            Y).hom =\n      ((fun x =>\n              match x with\n              | { fst := i, snd := X } => (h i).app X)\n            X).hom ≫\n        (desc F).map f\n[PROOFSTEP]\nrintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩\n[GOAL]\ncase mk.mk.mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : (i : I) → C i ⥤ D\nq : (i : I) × C i ⥤ D\nh : (i : I) → incl i ⋙ q ≅ F i\ni : I\nX Y✝ : C i\nf : X ⟶ Y✝\n⊢ q.map (SigmaHom.mk f) ≫\n      ((fun x =>\n            match x with\n            | { fst := i, snd := X } => (h i).app X)\n          { fst := i, snd := Y✝ }).hom =\n    ((fun x =>\n            match x with\n            | { fst := i, snd := X } => (h i).app X)\n          { fst := i, snd := X }).hom ≫\n      (desc F).map (SigmaHom.mk f)\n[PROOFSTEP]\napply (h i).hom.naturality f\n[GOAL]\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (D i)\nF G : (i : I) → C i ⥤ D i\nα : (i : I) → F i ⟶ G i\n⊢ ∀ ⦃X Y : (i : I) × C i⦄ (f : X ⟶ Y),\n    (Functor.sigma F).map f ≫ (fun f => SigmaHom.mk (NatTrans.app (α f.fst) f.snd)) Y =\n      (fun f => SigmaHom.mk (NatTrans.app (α f.fst) f.snd)) X ≫ (Functor.sigma G).map f\n[PROOFSTEP]\nrintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩\n[GOAL]\ncase mk.mk.mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (D i)\nF G : (i : I) → C i ⥤ D i\nα : (i : I) → F i ⟶ G i\ni : I\nX Y✝ : C i\nf : X ⟶ Y✝\n⊢ (Functor.sigma F).map (SigmaHom.mk f) ≫\n      (fun f => SigmaHom.mk (NatTrans.app (α f.fst) f.snd)) { fst := i, snd := Y✝ } =\n    (fun f => SigmaHom.mk (NatTrans.app (α f.fst) f.snd)) { fst := i, snd := X } ≫ (Functor.sigma G).map (SigmaHom.mk f)\n[PROOFSTEP]\nchange SigmaHom.mk _ = SigmaHom.mk _\n[GOAL]\ncase mk.mk.mk\nI : Type w₁\nC : I → Type u₁\ninst✝¹ : (i : I) → Category.{v₁, u₁} (C i)\nD : I → Type u₁\ninst✝ : (i : I) → Category.{v₁, u₁} (D i)\nF G : (i : I) → C i ⥤ D i\nα : (i : I) → F i ⟶ G i\ni : I\nX Y✝ : C i\nf : X ⟶ Y✝\n⊢ SigmaHom.mk\n      ((F { fst := i, snd := X }.fst).map f ≫\n        NatTrans.app (α { fst := i, snd := Y✝ }.fst) { fst := i, snd := Y✝ }.snd) =\n    SigmaHom.mk\n      (NatTrans.app (α { fst := i, snd := X }.fst) { fst := i, snd := X }.snd ≫ (G { fst := i, snd := X }.fst).map f)\n[PROOFSTEP]\nrw [(α i).naturality]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sigma.Basic", "llama_tokens": 3095, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6370307806984444, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.2789070454488447}}
{"text": "[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\nh : ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ Functor.essImage i\nB✝ : C\nhB : B✝ ∈ Functor.essImage i\nA : C\n⊢ (A ⟹ B✝) ∈ Functor.essImage i\n[PROOFSTEP]\nrcases hB with ⟨B', ⟨iB'⟩⟩\n[GOAL]\ncase intro.intro\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\nh : ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ Functor.essImage i\nB✝ A : C\nB' : D\niB' : i.obj B' ≅ B✝\n⊢ (A ⟹ B✝) ∈ Functor.essImage i\n[PROOFSTEP]\nexact Functor.essImage.ofIso ((exp A).mapIso iB') (h B' A)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\n⊢ ExponentialIdeal (subterminalInclusion C)\n[PROOFSTEP]\napply ExponentialIdeal.mk'\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\n⊢ ∀ (B : Subterminals C) (A : C), (A ⟹ (subterminalInclusion C).obj B) ∈ Functor.essImage (subterminalInclusion C)\n[PROOFSTEP]\nintro B A\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\nB : Subterminals C\nA : C\n⊢ (A ⟹ (subterminalInclusion C).obj B) ∈ Functor.essImage (subterminalInclusion C)\n[PROOFSTEP]\nrefine' ⟨⟨A ⟹ B.1, fun Z g h => _⟩, ⟨Iso.refl _⟩⟩\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝¹ : HasFiniteProducts C\ninst✝ : CartesianClosed C\nB : Subterminals C\nA Z : C\ng h : Z ⟶ A ⟹ B.obj\n⊢ g = h\n[PROOFSTEP]\nexact uncurry_injective (B.2 (CartesianClosed.uncurry g) (CartesianClosed.uncurry h))\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\n⊢ i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A\n[PROOFSTEP]\nsymm\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\n⊢ i ⋙ exp A ≅ i ⋙ exp A ⋙ leftAdjoint i ⋙ i\n[PROOFSTEP]\napply NatIso.ofComponents _ _\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\n⊢ (X : D) → (i ⋙ exp A).obj X ≅ (i ⋙ exp A ⋙ leftAdjoint i ⋙ i).obj X\n[PROOFSTEP]\nintro X\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\nX : D\n⊢ (i ⋙ exp A).obj X ≅ (i ⋙ exp A ⋙ leftAdjoint i ⋙ i).obj X\n[PROOFSTEP]\nhaveI := Functor.essImage.unit_isIso (ExponentialIdeal.exp_closed (i.obj_mem_essImage X) A)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\nX : D\nthis : IsIso (NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⟹ i.obj X))\n⊢ (i ⋙ exp A).obj X ≅ (i ⋙ exp A ⋙ leftAdjoint i ⋙ i).obj X\n[PROOFSTEP]\napply asIso ((Adjunction.ofRightAdjoint i).unit.app (A ⟹ i.obj X))\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝³ : HasFiniteProducts C\ninst✝² : CartesianClosed C\nA : C\ninst✝¹ : Reflective i\ninst✝ : ExponentialIdeal i\n⊢ ∀ {X Y : D} (f : X ⟶ Y),\n    (i ⋙ exp A).map f ≫ (asIso (NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⟹ i.obj Y))).hom =\n      (asIso (NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⟹ i.obj X))).hom ≫\n        (i ⋙ exp A ⋙ leftAdjoint i ⋙ i).map f\n[PROOFSTEP]\nsimp [asIso]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : Reflective i\nh : (A : C) → i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A\n⊢ ExponentialIdeal i\n[PROOFSTEP]\napply ExponentialIdeal.mk'\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : Reflective i\nh : (A : C) → i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A\n⊢ ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nintro B A\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝² : HasFiniteProducts C\ninst✝¹ : CartesianClosed C\ninst✝ : Reflective i\nh : (A : C) → i ⋙ exp A ⋙ leftAdjoint i ⋙ i ≅ i ⋙ exp A\nB : D\nA : C\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nexact ⟨_, ⟨(h A).app B⟩⟩\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\n⊢ ExponentialIdeal i\n[PROOFSTEP]\nlet ir := Adjunction.ofRightAdjoint i\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\n⊢ ExponentialIdeal i\n[PROOFSTEP]\nlet L : C ⥤ D := leftAdjoint i\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\n⊢ ExponentialIdeal i\n[PROOFSTEP]\nlet η : 𝟭 C ⟶ L ⋙ i := ir.unit\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\n⊢ ExponentialIdeal i\n[PROOFSTEP]\nlet ε : i ⋙ L ⟶ 𝟭 D := ir.counit\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\n⊢ ExponentialIdeal i\n[PROOFSTEP]\napply ExponentialIdeal.mk'\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\n⊢ ∀ (B : D) (A : C), (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nintro B A\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nlet q : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B\n[GOAL]\ncase q\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\n⊢ i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B := ?q\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\napply CartesianClosed.curry (ir.homEquiv _ _ _)\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\n⊢ (leftAdjoint i).obj (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) ⟶ B\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B) ?m.26486)\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\napply _ ≫ (ir.homEquiv _ _).symm ((exp.ev A).app (i.obj B))\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\n⊢ (leftAdjoint i).obj (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) ⟶\n    (leftAdjoint i).obj ((exp A ⋙ prod.functor.obj A).obj (i.obj B))\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      (?m.26547 ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nrefine' prodComparison L A _ ≫ Limits.prod.map (𝟙 _) (ε.app _) ≫ inv (prodComparison _ _ _)\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nhave : η.app (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B) := by\n  dsimp\n  rw [← curry_natural_left, curry_eq_iff, uncurry_id_eq_ev, ← ir.homEquiv_naturality_left, ir.homEquiv_apply_eq, assoc,\n    assoc, prodComparison_natural_assoc, L.map_id, ← prod.map_id_comp_assoc, ir.left_triangle_components,\n    prod.map_id_id, id_comp]\n  apply IsIso.hom_inv_id_assoc\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\n⊢ NatTrans.app η (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\n⊢ NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⟹ i.obj B) ≫\n      CartesianClosed.curry\n        (↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ i.obj ((leftAdjoint i).obj (A ⟹ i.obj B))) B)\n          ((prodComparison (leftAdjoint i) A (i.obj ((leftAdjoint i).obj (A ⟹ i.obj B))) ≫\n              prod.map (𝟙 ((leftAdjoint i).obj A))\n                  (NatTrans.app (Adjunction.ofRightAdjoint i).counit ((leftAdjoint i).obj (A ⟹ i.obj B))) ≫\n                inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n            ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ A ⟹ i.obj B) B).symm\n              (NatTrans.app (exp.ev A) (i.obj B)))) =\n    𝟙 (A ⟹ i.obj B)\n[PROOFSTEP]\nrw [← curry_natural_left, curry_eq_iff, uncurry_id_eq_ev, ← ir.homEquiv_naturality_left, ir.homEquiv_apply_eq, assoc,\n  assoc, prodComparison_natural_assoc, L.map_id, ← prod.map_id_comp_assoc, ir.left_triangle_components, prod.map_id_id,\n  id_comp]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\n⊢ prodComparison (leftAdjoint i) A (A ⟹ i.obj B) ≫\n      inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B)) ≫\n        ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ A ⟹ i.obj B) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B)) =\n    ↑(Adjunction.homEquiv ir (A ⨯ A ⟹ i.obj B) B).symm (NatTrans.app (exp.ev A) (i.obj B))\n[PROOFSTEP]\napply IsIso.hom_inv_id_assoc\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\nthis : NatTrans.app η (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B)\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\nhaveI : IsSplitMono (η.app (A ⟹ i.obj B)) := IsSplitMono.mk' ⟨_, this⟩\n[GOAL]\ncase h\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i)\nir : leftAdjoint i ⊣ i := Adjunction.ofRightAdjoint i\nL : C ⥤ D := leftAdjoint i\nη : 𝟭 C ⟶ L ⋙ i := ir.unit\nε : i ⋙ L ⟶ 𝟭 D := ir.counit\nB : D\nA : C\nq : i.obj (L.obj (A ⟹ i.obj B)) ⟶ A ⟹ i.obj B :=\n  CartesianClosed.curry\n    (↑(Adjunction.homEquiv ir (A ⨯ i.obj (L.obj (A ⟹ i.obj B))) B)\n      ((prodComparison L A (i.obj (L.obj (A ⟹ i.obj B))) ≫\n          prod.map (𝟙 (L.obj A)) (NatTrans.app ε (L.obj (A ⟹ i.obj B))) ≫\n            inv (prodComparison (leftAdjoint i) A (A ⟹ i.obj B))) ≫\n        ↑(Adjunction.homEquiv ir ((exp A ⋙ prod.functor.obj A).obj (i.obj B)) B).symm\n          (NatTrans.app (exp.ev A) (i.obj B))))\nthis✝ : NatTrans.app η (A ⟹ i.obj B) ≫ q = 𝟙 (A ⟹ i.obj B)\nthis : IsSplitMono (NatTrans.app η (A ⟹ i.obj B))\n⊢ (A ⟹ i.obj B) ∈ Functor.essImage i\n[PROOFSTEP]\napply mem_essImage_of_unit_isSplitMono\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB : D\n⊢ MonoidalCategory.tensorLeft B ⊣ i ⋙ exp (i.obj B) ⋙ leftAdjoint i\n[PROOFSTEP]\napply Adjunction.restrictFullyFaithful i i (exp.adjunction (i.obj B))\n[GOAL]\ncase comm1\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB : D\n⊢ i ⋙ prod.functor.obj (i.obj B) ≅ MonoidalCategory.tensorLeft B ⋙ i\n[PROOFSTEP]\nsymm\n[GOAL]\ncase comm1\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB : D\n⊢ MonoidalCategory.tensorLeft B ⋙ i ≅ i ⋙ prod.functor.obj (i.obj B)\n[PROOFSTEP]\nrefine' NatIso.ofComponents (fun X => _) (fun f => _)\n[GOAL]\ncase comm1.refine'_1\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB X : D\n⊢ (MonoidalCategory.tensorLeft B ⋙ i).obj X ≅ (i ⋙ prod.functor.obj (i.obj B)).obj X\n[PROOFSTEP]\nhaveI := Adjunction.rightAdjointPreservesLimits.{0, 0} (Adjunction.ofRightAdjoint i)\n[GOAL]\ncase comm1.refine'_1\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB X : D\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ (MonoidalCategory.tensorLeft B ⋙ i).obj X ≅ (i ⋙ prod.functor.obj (i.obj B)).obj X\n[PROOFSTEP]\napply asIso (prodComparison i B X)\n[GOAL]\ncase comm1.refine'_2\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB X✝ Y✝ : D\nf : X✝ ⟶ Y✝\n⊢ (MonoidalCategory.tensorLeft B ⋙ i).map f ≫ ((fun X => asIso (prodComparison i B X)) Y✝).hom =\n    ((fun X => asIso (prodComparison i B X)) X✝).hom ≫ (i ⋙ prod.functor.obj (i.obj B)).map f\n[PROOFSTEP]\ndsimp [asIso]\n[GOAL]\ncase comm1.refine'_2\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB X✝ Y✝ : D\nf : X✝ ⟶ Y✝\n⊢ i.map (prod.map (𝟙 B) f) ≫ prodComparison i B Y✝ = prodComparison i B X✝ ≫ prod.map (𝟙 (i.obj B)) (i.map f)\n[PROOFSTEP]\nrw [prodComparison_natural, Functor.map_id]\n[GOAL]\ncase comm2\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nsrc✝ : MonoidalCategory D := monoidalOfHasFiniteProducts D\nB : D\n⊢ i ⋙ exp (i.obj B) ≅ (i ⋙ exp (i.obj B) ⋙ leftAdjoint i) ⋙ i\n[PROOFSTEP]\napply (exponentialIdealReflective i _).symm\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\n⊢ ↑(bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\nhave : PreservesLimits i := (Adjunction.ofRightAdjoint i).rightAdjointPreservesLimits\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis : PreservesLimits i\n⊢ ↑(bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\nhave := preservesSmallestLimitsOfPreservesLimits i\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ ↑(bijection i A B ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\ndsimp [bijection]\n  -- Porting note: added\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (prod.lift prod.snd prod.fst ≫\n        ↑(Adjunction.homEquiv (exp.adjunction B) A (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))).symm\n            (↑(unitCompPartialBijective A\n                    (_ : (B ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈ Functor.essImage i)).symm\n              (↑(Adjunction.homEquiv (exp.adjunction B) (i.obj ((leftAdjoint i).obj A))\n                    (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)))\n                (prod.lift prod.snd prod.fst ≫\n                  ↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) B\n                            (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))).symm\n                      (↑(unitCompPartialBijective B\n                              (_ :\n                                (i.obj ((leftAdjoint i).obj A) ⟹\n                                    i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈\n                                  Functor.essImage i)).symm\n                        (↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A)))\n                              (i.obj ((leftAdjoint i).obj B)) (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)))\n                          ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv ≫\n                            i.map (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ≫\n                              𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫\n                    𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫\n          𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\nerw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (prod.lift prod.snd prod.fst ≫\n        CartesianClosed.uncurry\n            (↑(unitCompPartialBijective A\n                    (_ : (B ⟹ i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈ Functor.essImage i)).symm\n              (CartesianClosed.curry\n                (prod.lift prod.snd prod.fst ≫\n                  CartesianClosed.uncurry\n                      (↑(unitCompPartialBijective B\n                              (_ :\n                                (i.obj ((leftAdjoint i).obj A) ⟹\n                                    i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ∈\n                                  Functor.essImage i)).symm\n                        (CartesianClosed.curry\n                          ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv ≫\n                            i.map (𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)) ≫\n                              𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫\n                    𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))))) ≫\n          𝟙 (i.obj ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B))) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\nrw [comp_id, comp_id, comp_id, i.map_id, comp_id, unitCompPartialBijective_symm_apply,\n  unitCompPartialBijective_symm_apply, uncurry_natural_left, uncurry_curry, uncurry_natural_left, uncurry_curry,\n  prod.lift_map_assoc, comp_id, prod.lift_map_assoc, comp_id]\n  -- Porting note: added\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (prod.lift prod.snd (prod.fst ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit A) ≫\n        prod.lift prod.snd (prod.fst ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit B) ≫\n          (PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\ndsimp only [Functor.comp_obj]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)).symm\n      (prod.lift prod.snd (prod.fst ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit A) ≫\n        prod.lift prod.snd (prod.fst ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit B) ≫\n          (PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).inv) =\n    prodComparison (leftAdjoint i) A B\n[PROOFSTEP]\nrw [prod.comp_lift_assoc, prod.lift_snd, prod.lift_fst_assoc, prod.lift_fst_comp_snd_comp, ←\n  Adjunction.eq_homEquiv_apply, Adjunction.homEquiv_unit, Iso.comp_inv_eq, assoc]\n  -- Porting note: rw became erw\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.map (NatTrans.app (Adjunction.ofRightAdjoint i).unit A) (NatTrans.app (Adjunction.ofRightAdjoint i).unit B) =\n    NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫\n      i.map (prodComparison (leftAdjoint i) A B) ≫\n        (PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom\n[PROOFSTEP]\nerw [PreservesLimitPair.iso_hom i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.map (NatTrans.app (Adjunction.ofRightAdjoint i).unit A) (NatTrans.app (Adjunction.ofRightAdjoint i).unit B) =\n    NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫\n      i.map (prodComparison (leftAdjoint i) A B) ≫ prodComparison i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)\n[PROOFSTEP]\napply prod.hom_ext\n[GOAL]\ncase h₁\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.map (NatTrans.app (Adjunction.ofRightAdjoint i).unit A) (NatTrans.app (Adjunction.ofRightAdjoint i).unit B) ≫\n      prod.fst =\n    (NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫\n        i.map (prodComparison (leftAdjoint i) A B) ≫ prodComparison i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)) ≫\n      prod.fst\n[PROOFSTEP]\nrw [Limits.prod.map_fst, assoc, assoc, prodComparison_fst, ← i.map_comp, prodComparison_fst]\n[GOAL]\ncase h₁\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.fst ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit A =\n    NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫ i.map ((leftAdjoint i).map prod.fst)\n[PROOFSTEP]\napply (Adjunction.ofRightAdjoint i).unit.naturality\n[GOAL]\ncase h₂\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.map (NatTrans.app (Adjunction.ofRightAdjoint i).unit A) (NatTrans.app (Adjunction.ofRightAdjoint i).unit B) ≫\n      prod.snd =\n    (NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫\n        i.map (prodComparison (leftAdjoint i) A B) ≫ prodComparison i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)) ≫\n      prod.snd\n[PROOFSTEP]\nrw [Limits.prod.map_snd, assoc, assoc, prodComparison_snd, ← i.map_comp, prodComparison_snd]\n[GOAL]\ncase h₂\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nthis✝ : PreservesLimits i\nthis : PreservesLimitsOfSize.{0, 0, v₁, v₁, u₂, u₁} i\n⊢ prod.snd ≫ NatTrans.app (Adjunction.ofRightAdjoint i).unit B =\n    NatTrans.app (Adjunction.ofRightAdjoint i).unit (A ⨯ B) ≫ i.map ((leftAdjoint i).map prod.snd)\n[PROOFSTEP]\napply (Adjunction.ofRightAdjoint i).unit.naturality\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nX X' : D\nf : (leftAdjoint i).obj (A ⨯ B) ⟶ X\ng : X ⟶ X'\n⊢ ↑(bijection i A B X') (f ≫ g) = ↑(bijection i A B X) f ≫ g\n[PROOFSTEP]\ndsimp [bijection]\n  -- Porting note: added\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nX X' : D\nf : (leftAdjoint i).obj (A ⨯ B) ⟶ X\ng : X ⟶ X'\n⊢ i.preimage\n      ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n        ↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) (i.obj ((leftAdjoint i).obj B))\n                  (i.obj X')).symm\n            (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X') ∈ Functor.essImage i))\n              (↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) B (i.obj X'))\n                (prod.lift prod.snd prod.fst ≫\n                  ↑(Adjunction.homEquiv (exp.adjunction B) (i.obj ((leftAdjoint i).obj A)) (i.obj X')).symm\n                      (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X') ∈ Functor.essImage i))\n                        (↑(Adjunction.homEquiv (exp.adjunction B) A (i.obj X'))\n                          (prod.lift prod.snd prod.fst ≫\n                            ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X') (f ≫ g) ≫ 𝟙 (i.obj X')))) ≫\n                    𝟙 (i.obj X')))) ≫\n          𝟙 (i.obj X')) =\n    i.preimage\n        ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n          ↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) (i.obj ((leftAdjoint i).obj B))\n                    (i.obj X)).symm\n              (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X) ∈ Functor.essImage i))\n                (↑(Adjunction.homEquiv (exp.adjunction (i.obj ((leftAdjoint i).obj A))) B (i.obj X))\n                  (prod.lift prod.snd prod.fst ≫\n                    ↑(Adjunction.homEquiv (exp.adjunction B) (i.obj ((leftAdjoint i).obj A)) (i.obj X)).symm\n                        (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X) ∈ Functor.essImage i))\n                          (↑(Adjunction.homEquiv (exp.adjunction B) A (i.obj X))\n                            (prod.lift prod.snd prod.fst ≫\n                              ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X) f ≫ 𝟙 (i.obj X)))) ≫\n                      𝟙 (i.obj X)))) ≫\n            𝟙 (i.obj X)) ≫\n      g\n[PROOFSTEP]\nerw [homEquiv_symm_apply_eq, homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq, homEquiv_symm_apply_eq,\n  homEquiv_symm_apply_eq, homEquiv_apply_eq, homEquiv_apply_eq]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nX X' : D\nf : (leftAdjoint i).obj (A ⨯ B) ⟶ X\ng : X ⟶ X'\n⊢ i.preimage\n      ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n        CartesianClosed.uncurry\n            (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X') ∈ Functor.essImage i))\n              (CartesianClosed.curry\n                (prod.lift prod.snd prod.fst ≫\n                  CartesianClosed.uncurry\n                      (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X') ∈ Functor.essImage i))\n                        (CartesianClosed.curry\n                          (prod.lift prod.snd prod.fst ≫\n                            ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X') (f ≫ g) ≫ 𝟙 (i.obj X')))) ≫\n                    𝟙 (i.obj X')))) ≫\n          𝟙 (i.obj X')) =\n    i.preimage\n        ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n          CartesianClosed.uncurry\n              (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X) ∈ Functor.essImage i))\n                (CartesianClosed.curry\n                  (prod.lift prod.snd prod.fst ≫\n                    CartesianClosed.uncurry\n                        (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X) ∈ Functor.essImage i))\n                          (CartesianClosed.curry\n                            (prod.lift prod.snd prod.fst ≫\n                              ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X) f ≫ 𝟙 (i.obj X)))) ≫\n                      𝟙 (i.obj X)))) ≫\n            𝟙 (i.obj X)) ≫\n      g\n[PROOFSTEP]\napply i.map_injective\n[GOAL]\ncase a\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\nX X' : D\nf : (leftAdjoint i).obj (A ⨯ B) ⟶ X\ng : X ⟶ X'\n⊢ i.map\n      (i.preimage\n        ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n          CartesianClosed.uncurry\n              (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X') ∈ Functor.essImage i))\n                (CartesianClosed.curry\n                  (prod.lift prod.snd prod.fst ≫\n                    CartesianClosed.uncurry\n                        (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X') ∈ Functor.essImage i))\n                          (CartesianClosed.curry\n                            (prod.lift prod.snd prod.fst ≫\n                              ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X') (f ≫ g) ≫\n                                𝟙 (i.obj X')))) ≫\n                      𝟙 (i.obj X')))) ≫\n            𝟙 (i.obj X'))) =\n    i.map\n      (i.preimage\n          ((PreservesLimitPair.iso i ((leftAdjoint i).obj A) ((leftAdjoint i).obj B)).hom ≫\n            CartesianClosed.uncurry\n                (↑(unitCompPartialBijective B (_ : (i.obj ((leftAdjoint i).obj A) ⟹ i.obj X) ∈ Functor.essImage i))\n                  (CartesianClosed.curry\n                    (prod.lift prod.snd prod.fst ≫\n                      CartesianClosed.uncurry\n                          (↑(unitCompPartialBijective A (_ : (B ⟹ i.obj X) ∈ Functor.essImage i))\n                            (CartesianClosed.curry\n                              (prod.lift prod.snd prod.fst ≫\n                                ↑(Adjunction.homEquiv (Adjunction.ofRightAdjoint i) (A ⨯ B) X) f ≫ 𝟙 (i.obj X)))) ≫\n                        𝟙 (i.obj X)))) ≫\n              𝟙 (i.obj X)) ≫\n        g)\n[PROOFSTEP]\nrw [i.image_preimage, i.map_comp, i.image_preimage, comp_id, comp_id, comp_id, comp_id, comp_id, comp_id,\n  Adjunction.homEquiv_naturality_right, ← assoc, curry_natural_right _ (i.map g), unitCompPartialBijective_natural,\n  uncurry_natural_right, ← assoc, curry_natural_right, unitCompPartialBijective_natural, uncurry_natural_right, assoc]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\n⊢ prodComparison (leftAdjoint i) A B ≫\n      ↑(bijection i A B ((leftAdjoint i).obj (A ⨯ B))) (𝟙 ((leftAdjoint i).obj (A ⨯ B))) =\n    𝟙 ((leftAdjoint i).obj (A ⨯ B))\n[PROOFSTEP]\nrw [← (bijection i _ _ _).injective.eq_iff, bijection_natural, ← bijection_symm_apply_id, Equiv.apply_symm_apply,\n  id_comp]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : Reflective i\ninst✝² : CartesianClosed C\ninst✝¹ : HasFiniteProducts D\ninst✝ : ExponentialIdeal i\nA B : C\n⊢ ↑(bijection i A B ((leftAdjoint i).obj (A ⨯ B))) (𝟙 ((leftAdjoint i).obj (A ⨯ B))) ≫\n      prodComparison (leftAdjoint i) A B =\n    𝟙 ((leftAdjoint i).obj A ⨯ (leftAdjoint i).obj B)\n[PROOFSTEP]\nrw [← bijection_natural, id_comp, ← bijection_symm_apply_id, Equiv.apply_symm_apply]\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁵ : HasFiniteProducts C\ninst✝⁴ : Reflective i\ninst✝³ : CartesianClosed C\ninst✝² : HasFiniteProducts D\ninst✝¹ : ExponentialIdeal i\nJ : Type\ninst✝ : Fintype J\n⊢ PreservesLimitsOfShape (Discrete J) (leftAdjoint i)\n[PROOFSTEP]\nletI := preservesBinaryProductsOfExponentialIdeal i\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁵ : HasFiniteProducts C\ninst✝⁴ : Reflective i\ninst✝³ : CartesianClosed C\ninst✝² : HasFiniteProducts D\ninst✝¹ : ExponentialIdeal i\nJ : Type\ninst✝ : Fintype J\nthis : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i) := preservesBinaryProductsOfExponentialIdeal i\n⊢ PreservesLimitsOfShape (Discrete J) (leftAdjoint i)\n[PROOFSTEP]\nletI := leftAdjointPreservesTerminalOfReflective.{0} i\n[GOAL]\nC : Type u₁\nD : Type u₂\ninst✝⁷ : Category.{v₁, u₁} C\ninst✝⁶ : Category.{v₁, u₂} D\ni : D ⥤ C\ninst✝⁵ : HasFiniteProducts C\ninst✝⁴ : Reflective i\ninst✝³ : CartesianClosed C\ninst✝² : HasFiniteProducts D\ninst✝¹ : ExponentialIdeal i\nJ : Type\ninst✝ : Fintype J\nthis✝ : PreservesLimitsOfShape (Discrete WalkingPair) (leftAdjoint i) := preservesBinaryProductsOfExponentialIdeal i\nthis : PreservesLimitsOfShape (Discrete PEmpty) (leftAdjoint i) := leftAdjointPreservesTerminalOfReflective i\n⊢ PreservesLimitsOfShape (Discrete J) (leftAdjoint i)\n[PROOFSTEP]\napply preservesFiniteProductsOfPreservesBinaryAndTerminal (leftAdjoint i) J\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Closed.Ideal", "llama_tokens": 20721, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011686727232, "lm_q2_score": 0.476579651063676, "lm_q1q2_score": 0.27884731080299546}}
{"text": "[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝ : SmallCategory K\nF : K ⥤ Cᵒᵖ ⥤ D\nW : Cover J X\ni : Cover.Arrow W\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W))\n⊢ ∀ ⦃X_1 Y : K⦄ (f : X_1 ⟶ Y),\n    ((Functor.const K).obj E.pt).map f ≫\n        (fun k => NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W (F.obj k)) i) Y =\n      (fun k => NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W (F.obj k)) i) X_1 ≫\n        (F ⋙ (evaluation Cᵒᵖ D).obj (op i.Y)).map f\n[PROOFSTEP]\nintro a b f\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝ : SmallCategory K\nF : K ⥤ Cᵒᵖ ⥤ D\nW : Cover J X\ni : Cover.Arrow W\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W))\na b : K\nf : a ⟶ b\n⊢ ((Functor.const K).obj E.pt).map f ≫ (fun k => NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W (F.obj k)) i) b =\n    (fun k => NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W (F.obj k)) i) a ≫\n      (F ⋙ (evaluation Cᵒᵖ D).obj (op i.Y)).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝ : SmallCategory K\nF : K ⥤ Cᵒᵖ ⥤ D\nW : Cover J X\ni : Cover.Arrow W\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W))\na b : K\nf : a ⟶ b\n⊢ 𝟙 E.pt ≫ NatTrans.app E.π b ≫ Multiequalizer.ι (Cover.index W (F.obj b)) i =\n    (NatTrans.app E.π a ≫ Multiequalizer.ι (Cover.index W (F.obj a)) i) ≫ NatTrans.app (F.map f) (op i.Y)\n[PROOFSTEP]\nrw [Category.id_comp, Category.assoc, ← E.w f]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝ : SmallCategory K\nF : K ⥤ Cᵒᵖ ⥤ D\nW : Cover J X\ni : Cover.Arrow W\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W))\na b : K\nf : a ⟶ b\n⊢ (NatTrans.app E.π a ≫ (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W)).map f) ≫\n      Multiequalizer.ι (Cover.index W (F.obj b)) i =\n    NatTrans.app E.π a ≫ Multiequalizer.ι (Cover.index W (F.obj a)) i ≫ NatTrans.app (F.map f) (op i.Y)\n[PROOFSTEP]\ndsimp [diagramNatTrans]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝ : SmallCategory K\nF : K ⥤ Cᵒᵖ ⥤ D\nW : Cover J X\ni : Cover.Arrow W\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj (op W))\na b : K\nf : a ⟶ b\n⊢ (NatTrans.app E.π a ≫\n        Multiequalizer.lift (Cover.index W (F.obj b)) (multiequalizer (Cover.index W (F.obj a)))\n          (fun i => Multiequalizer.ι (Cover.index W (F.obj a)) i ≫ NatTrans.app (F.map f) (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index (op W).unop (F.obj b)).R),\n              (fun i => Multiequalizer.ι (Cover.index (op W).unop (F.obj a)) i ≫ NatTrans.app (F.map f) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index (op W).unop (F.obj b)) i) ≫\n                  MulticospanIndex.fst (Cover.index (op W).unop (F.obj b)) i =\n                (fun i => Multiequalizer.ι (Cover.index (op W).unop (F.obj a)) i ≫ NatTrans.app (F.map f) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index (op W).unop (F.obj b)) i) ≫\n                  MulticospanIndex.snd (Cover.index (op W).unop (F.obj b)) i)) ≫\n      Multiequalizer.ι (Cover.index W (F.obj b)) i =\n    NatTrans.app E.π a ≫ Multiequalizer.ι (Cover.index W (F.obj a)) i ≫ NatTrans.app (F.map f) (op i.Y)\n[PROOFSTEP]\nsimp only [Multiequalizer.lift_ι, Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\n⊢ ∀ (b : (Cover.index W.unop (limit F)).R),\n    (fun i =>\n            IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) (limit.isLimit F))\n              (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E))\n          (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) b) ≫\n        MulticospanIndex.fst (Cover.index W.unop (limit F)) b =\n      (fun i =>\n            IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) (limit.isLimit F))\n              (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E))\n          (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) b) ≫\n        MulticospanIndex.snd (Cover.index W.unop (limit F)) b\n[PROOFSTEP]\nintro i\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\n⊢ (fun i =>\n          IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) (limit.isLimit F))\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E))\n        (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) ≫\n      MulticospanIndex.fst (Cover.index W.unop (limit F)) i =\n    (fun i =>\n          IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) (limit.isLimit F))\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E))\n        (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) ≫\n      MulticospanIndex.snd (Cover.index W.unop (limit F)) i\n[PROOFSTEP]\nchange (_ ≫ _) ≫ _ = (_ ≫ _) ≫ _\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\n⊢ ((IsLimit.liftConeMorphism\n            (IsLimit.ofIsoLimit\n              (limit.isLimit\n                (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y)))\n              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k))\n                  (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y)).symm)\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n              (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E)).Hom ≫\n        ((Cones.functoriality F\n                  ((evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))).mapIso\n              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                (limit.isLimit F))).hom.Hom) ≫\n      MulticospanIndex.fst (Cover.index W.unop (limit F)) i =\n    ((IsLimit.liftConeMorphism\n            (IsLimit.ofIsoLimit\n              (limit.isLimit\n                (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y)))\n              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k))\n                  (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y)).symm)\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n              (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E)).Hom ≫\n        ((Cones.functoriality F\n                  ((evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))).mapIso\n              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                (limit.isLimit F))).hom.Hom) ≫\n      MulticospanIndex.snd (Cover.index W.unop (limit F)) i\n[PROOFSTEP]\ndsimp [evaluateCombinedCones]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\n⊢ ((limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n              (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E) ≫\n          𝟙\n            (getLimitCone\n                  ((Functor.flip F).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))).cone.pt) ≫\n        NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)))\n          (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y)) ≫\n      MulticospanIndex.fst (Cover.index W.unop (limit F)) i =\n    ((limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n              (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E) ≫\n          𝟙\n            (getLimitCone\n                  ((Functor.flip F).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))).cone.pt) ≫\n        NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)))\n          (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y)) ≫\n      MulticospanIndex.snd (Cover.index W.unop (limit F)) i\n[PROOFSTEP]\nerw [Category.comp_id, Category.comp_id, Category.assoc, Category.assoc, ← (limit.lift F _).naturality, ←\n  (limit.lift F _).naturality, ← Category.assoc, ← Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\n⊢ (limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))\n          (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n            (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E) ≫\n        (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₁.op) ≫\n      NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k))) (op i.Z) =\n    (limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))\n          (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n            (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E) ≫\n        (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₂.op) ≫\n      NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k))) (op i.Z)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\n⊢ limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))\n        (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n          (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E) ≫\n      (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₁.op =\n    limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))\n        (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n          (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E) ≫\n      (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₂.op\n[PROOFSTEP]\nrefine' limit.hom_ext (fun j => _)\n[GOAL]\ncase e_a\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\nj : K\n⊢ (limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))\n          (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n            (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E) ≫\n        (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₁.op) ≫\n      limit.π ((Functor.flip F).obj (op i.Z)) j =\n    (limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))\n          (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n            (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E) ≫\n        (combineCones F fun k => getLimitCone ((Functor.flip F).obj k)).pt.map i.g₂.op) ≫\n      limit.π ((Functor.flip F).obj (op i.Z)) j\n[PROOFSTEP]\nerw [Category.assoc, Category.assoc, limit.lift_π, limit.lift_π, limit.lift_π_assoc, limit.lift_π_assoc, Category.assoc,\n  Category.assoc, Multiequalizer.condition]\n[GOAL]\ncase e_a\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nW : (Cover J X)ᵒᵖ\nF : K ⥤ Cᵒᵖ ⥤ D\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\ni : (Cover.index W.unop (limit F)).R\nj : K\n⊢ NatTrans.app E.π j ≫\n      Multiequalizer.ι (Cover.index W.unop (F.obj j)) (MulticospanIndex.sndTo (Cover.index W.unop (F.obj j)) i) ≫\n        MulticospanIndex.snd (Cover.index W.unop (F.obj j)) i =\n    NatTrans.app E.π j ≫\n      Multiequalizer.ι (Cover.index W.unop (F.obj j)) (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) ≫\n        NatTrans.app ((Functor.flip F).map i.g₂.op) j\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\n⊢ ∀ (s : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)) (j : K),\n    (fun E => liftToDiagramLimitObj F E) s ≫\n        NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nintro E k\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\n⊢ (fun E => liftToDiagramLimitObj F E) E ≫\n      NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π k =\n    NatTrans.app E.π k\n[PROOFSTEP]\ndsimp [diagramNatTrans]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\n⊢ liftToDiagramLimitObj F E ≫\n      Multiequalizer.lift (Cover.index W.unop (F.obj k)) (multiequalizer (Cover.index W.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index W.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index W.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index W.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index W.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index W.unop (F.obj k)) i) =\n    NatTrans.app E.π k\n[PROOFSTEP]\nrefine' Multiequalizer.hom_ext _ _ _ (fun a => _)\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\na : (Cover.index W.unop (F.obj k)).L\n⊢ (liftToDiagramLimitObj F E ≫\n        Multiequalizer.lift (Cover.index W.unop (F.obj k)) (multiequalizer (Cover.index W.unop (limit F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index W.unop (F.obj k)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (F.obj k)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (F.obj k)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (F.obj k)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (F.obj k)) i)) ≫\n      Multiequalizer.ι (Cover.index W.unop (F.obj k)) a =\n    NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W.unop (F.obj k)) a\n[PROOFSTEP]\nsimp only [Multiequalizer.lift_ι, Multiequalizer.lift_ι_assoc, Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\na : (Cover.index W.unop (F.obj k)).L\n⊢ IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op a.Y)) (limit.isLimit F))\n        (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E) ≫\n      NatTrans.app (limit.π F k) (op a.Y) =\n    NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W.unop (F.obj k)) a\n[PROOFSTEP]\nchange (_ ≫ _) ≫ _ = _\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\na : (Cover.index W.unop (F.obj k)).L\n⊢ ((IsLimit.liftConeMorphism\n            (IsLimit.ofIsoLimit (limit.isLimit (F ⋙ (evaluation Cᵒᵖ D).obj (op a.Y)))\n              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k)) (op a.Y)).symm)\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E)).Hom ≫\n        ((Cones.functoriality F ((evaluation Cᵒᵖ D).obj (op a.Y))).mapIso\n              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                (limit.isLimit F))).hom.Hom) ≫\n      NatTrans.app (limit.π F k) (op a.Y) =\n    NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W.unop (F.obj k)) a\n[PROOFSTEP]\ndsimp [evaluateCombinedCones]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\na : (Cover.index W.unop (F.obj k)).L\n⊢ ((limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op a.Y)) (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E) ≫\n          𝟙 (getLimitCone ((Functor.flip F).obj (op a.Y))).cone.pt) ≫\n        NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k))) (op a.Y)) ≫\n      NatTrans.app (limit.π F k) (op a.Y) =\n    NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W.unop (F.obj k)) a\n[PROOFSTEP]\nerw [Category.comp_id, Category.assoc, ← NatTrans.comp_app, limit.lift_π, limit.lift_π]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nk : K\na : (Cover.index W.unop (F.obj k)).L\n⊢ NatTrans.app (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E).π k =\n    NatTrans.app E.π k ≫ Multiequalizer.ι (Cover.index W.unop (F.obj k)) a\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\n⊢ ∀ (s : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W))\n    (m : s.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt),\n    (∀ (j : K),\n        m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n          NatTrans.app s.π j) →\n      m = (fun E => liftToDiagramLimitObj F E) s\n[PROOFSTEP]\nintro E m hm\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\n⊢ m = (fun E => liftToDiagramLimitObj F E) E\n[PROOFSTEP]\nrefine' Multiequalizer.hom_ext _ _ _ (fun a => limit_obj_ext (fun j => _))\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ (m ≫ Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a) ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    ((fun E => liftToDiagramLimitObj F E) E ≫ Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a) ≫\n      NatTrans.app (limit.π F j) (op a.Y)\n[PROOFSTEP]\ndelta liftToDiagramLimitObj\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ (m ≫ Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a) ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    ((fun E =>\n            Multiequalizer.lift (Cover.index W.unop (limit F)) E.pt\n              (fun i =>\n                IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op i.Y)) (limit.isLimit F))\n                  (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation i E))\n              (_ :\n                ∀ (i : (Cover.index W.unop (limit F)).R),\n                  ((IsLimit.liftConeMorphism\n                            (IsLimit.ofIsoLimit\n                              (limit.isLimit\n                                (F ⋙\n                                  (evaluation Cᵒᵖ D).obj\n                                    (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y)))\n                              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k))\n                                  (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y)).symm)\n                            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n                              (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i) E)).Hom ≫\n                        ((Cones.functoriality F\n                                  ((evaluation Cᵒᵖ D).obj\n                                    (op (MulticospanIndex.fstTo (Cover.index W.unop (limit F)) i).Y))).mapIso\n                              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                                (limit.isLimit F))).hom.Hom) ≫\n                      MulticospanIndex.fst (Cover.index W.unop (limit F)) i =\n                    ((IsLimit.liftConeMorphism\n                            (IsLimit.ofIsoLimit\n                              (limit.isLimit\n                                (F ⋙\n                                  (evaluation Cᵒᵖ D).obj\n                                    (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y)))\n                              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k))\n                                  (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y)).symm)\n                            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation\n                              (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i) E)).Hom ≫\n                        ((Cones.functoriality F\n                                  ((evaluation Cᵒᵖ D).obj\n                                    (op (MulticospanIndex.sndTo (Cover.index W.unop (limit F)) i).Y))).mapIso\n                              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                                (limit.isLimit F))).hom.Hom) ≫\n                      MulticospanIndex.snd (Cover.index W.unop (limit F)) i))\n          E ≫\n        Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a) ≫\n      NatTrans.app (limit.π F j) (op a.Y)\n[PROOFSTEP]\nerw [Multiequalizer.lift_ι, Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    IsLimit.lift (isLimitOfPreserves ((evaluation Cᵒᵖ D).obj (op a.Y)) (limit.isLimit F))\n        (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E) ≫\n      NatTrans.app (limit.π F j) (op a.Y)\n[PROOFSTEP]\nchange _ = (_ ≫ _) ≫ _\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit.cone F).pt) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    ((IsLimit.liftConeMorphism\n            (IsLimit.ofIsoLimit (limit.isLimit (F ⋙ (evaluation Cᵒᵖ D).obj (op a.Y)))\n              (evaluateCombinedCones F (fun k => getLimitCone ((Functor.flip F).obj k)) (op a.Y)).symm)\n            (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E)).Hom ≫\n        ((Cones.functoriality F ((evaluation Cᵒᵖ D).obj (op a.Y))).mapIso\n              (IsLimit.uniqueUpToIso (combinedIsLimit F fun k => getLimitCone ((Functor.flip F).obj k))\n                (limit.isLimit F))).hom.Hom) ≫\n      NatTrans.app (limit.π F j) (op a.Y)\n[PROOFSTEP]\ndsimp [evaluateCombinedCones]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit F)) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    ((limit.lift (F ⋙ (evaluation Cᵒᵖ D).obj (op a.Y)) (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E) ≫\n          𝟙 (getLimitCone ((Functor.flip F).obj (op a.Y))).cone.pt) ≫\n        NatTrans.app (limit.lift F (combineCones F fun k => getLimitCone ((Functor.flip F).obj k))) (op a.Y)) ≫\n      NatTrans.app (limit.π F j) (op a.Y)\n[PROOFSTEP]\nerw [Category.comp_id, Category.assoc, ← NatTrans.comp_app, limit.lift_π, limit.lift_π]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit F)) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    NatTrans.app (coneCompEvaluationOfConeCompDiagramFunctorCompEvaluation a E).π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit F)) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    NatTrans.app E.π j ≫ Multiequalizer.ι (Cover.index W.unop (F.obj j)) a\n[PROOFSTEP]\nrw [← hm]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit F)) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    (m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j) ≫\n      Multiequalizer.ι (Cover.index W.unop (F.obj j)) a\n[PROOFSTEP]\ndsimp [diagramNatTrans]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nW : (Cover J X)ᵒᵖ\nE : Cone (F ⋙ diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W)\nm : E.pt ⟶ ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((diagramFunctor J D X ⋙ (evaluation (Cover J X)ᵒᵖ D).obj W).mapCone (limit.cone F)).π j =\n      NatTrans.app E.π j\na : (Cover.index W.unop (limit.cone F).pt).L\nj : K\n⊢ m ≫ Multiequalizer.ι (Cover.index W.unop (limit F)) a ≫ NatTrans.app (limit.π F j) (op a.Y) =\n    (m ≫\n        Multiequalizer.lift (Cover.index W.unop (F.obj j)) (multiequalizer (Cover.index W.unop (limit F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F j) (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index W.unop (F.obj j)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F j) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (F.obj j)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (F.obj j)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (limit F)) i ≫ NatTrans.app (limit.π F j) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (F.obj j)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (F.obj j)) i)) ≫\n      Multiequalizer.ι (Cover.index W.unop (F.obj j)) a\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nK : Type (max v u)\ninst✝¹ : SmallCategory K\ninst✝ : HasLimitsOfShape K D\n⊢ {K_1 : K ⥤ Cᵒᵖ ⥤ D} → PreservesLimit K_1 (diagramFunctor J D X)\n[PROOFSTEP]\napply preservesLimit_diagramFunctor.{w, v, u}\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\ninst✝ : HasLimits D\n⊢ PreservesLimits (diagramFunctor J D X)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase preservesLimitsOfShape\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\ninst✝ : HasLimits D\n⊢ autoParam\n    ({J_1 : Type (max u v)} →\n      [inst : Category.{max u v, max u v} J_1] → PreservesLimitsOfShape J_1 (diagramFunctor J D X))\n    _auto✝\n[PROOFSTEP]\nintro _ _\n[GOAL]\ncase preservesLimitsOfShape\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\ninst✝¹ : HasLimits D\nJ✝ : Type (max u v)\ninst✝ : Category.{max u v, max u v} J✝\n⊢ PreservesLimitsOfShape J✝ (diagramFunctor J D X)\n[PROOFSTEP]\napply preservesLimitsOfShape_diagramFunctor.{w, v, u}\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\n⊢ ∀ {X_1 Y : K} (f : X_1 ⟶ Y),\n    (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f ≫\n        ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) Y).hom =\n      ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) X_1).hom ≫\n        (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f\n[PROOFSTEP]\nintro i j f\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\n⊢ (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f ≫\n      ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) j).hom =\n    ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) i).hom ≫\n      (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f\n[PROOFSTEP]\nrw [← Iso.eq_comp_inv, Category.assoc, ← Iso.inv_comp_eq]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\n⊢ ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) i).inv ≫\n      (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f =\n    (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f ≫\n      ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) j).inv\n[PROOFSTEP]\nrefine' colimit.hom_ext (fun w => _)\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\nw : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (F.obj i) (op X).unop) w ≫\n      ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) i).inv ≫\n        (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f =\n    colimit.ι (diagram J (F.obj i) (op X).unop) w ≫\n      (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)).map f ≫\n        ((fun k => colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k) j).inv\n[PROOFSTEP]\ndsimp [plusMap]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\nw : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (F.obj i) X) w ≫\n      (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) i).inv ≫\n        (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f =\n    colimit.ι (diagram J (F.obj i) X) w ≫\n      colimMap (diagramNatTrans J (F.map f) X) ≫\n        (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) j).inv\n[PROOFSTEP]\nerw [colimit.ι_map_assoc, colimitObjIsoColimitCompEvaluation_ι_inv (F ⋙ J.diagramFunctor D X).flip w j,\n  colimitObjIsoColimitCompEvaluation_ι_inv_assoc (F ⋙ J.diagramFunctor D X).flip w i]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\nw : (Cover J (op X).unop)ᵒᵖ\n⊢ NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) w) i ≫\n      (colimit (Functor.flip (F ⋙ diagramFunctor J D X))).map f =\n    NatTrans.app (diagramNatTrans J (F.map f) X) w ≫\n      NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) w) j\n[PROOFSTEP]\nrw [← (colimit.ι (F ⋙ J.diagramFunctor D X).flip w).naturality]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\ne : colimit (limit (F ⋙ diagramFunctor J D X)) ≅ limit (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) :=\n  colimitLimitIso (F ⋙ diagramFunctor J D X)\nt : diagram J (limit F) X ≅ limit (F ⋙ diagramFunctor J D X) :=\n  IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n    (limit.isLimit (F ⋙ diagramFunctor J D X))\np : (plusObj J (limit F)).obj (op X) ≅ colimit (limit (F ⋙ diagramFunctor J D X)) := HasColimit.isoOfNatIso t\ni j : K\nf : i ⟶ j\nw : (Cover J (op X).unop)ᵒᵖ\n⊢ ((Functor.flip (F ⋙ diagramFunctor J D X)).obj w).map f ≫\n      NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) w) j =\n    NatTrans.app (diagramNatTrans J (F.map f) X) w ≫\n      NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) w) j\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ liftToPlusObjLimitObj F X S ≫ NatTrans.app (plusMap J (limit.π F k)) (op X) = NatTrans.app S.π k\n[PROOFSTEP]\ndsimp only [liftToPlusObjLimitObj]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ (limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) S ≫\n        (HasLimit.isoOfNatIso\n              (NatIso.ofComponents fun k =>\n                  colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).hom ≫\n          (colimitLimitIso (F ⋙ diagramFunctor J D X)).inv ≫\n            (HasColimit.isoOfNatIso\n                (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X)))).inv) ≫\n      NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    NatTrans.app S.π k\n[PROOFSTEP]\nrw [← (limit.isLimit (F ⋙ J.plusFunctor D ⋙ (evaluation Cᵒᵖ D).obj (op X))).fac S k, Category.assoc]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) S ≫\n      ((HasLimit.isoOfNatIso\n              (NatIso.ofComponents fun k =>\n                  colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).hom ≫\n          (colimitLimitIso (F ⋙ diagramFunctor J D X)).inv ≫\n            (HasColimit.isoOfNatIso\n                (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X)))).inv) ≫\n        NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    IsLimit.lift (limit.isLimit (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))) S ≫\n      NatTrans.app (limit.cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))).π k\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ ((HasLimit.isoOfNatIso\n            (NatIso.ofComponents fun k =>\n                colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).inv ≫\n          (HasColimit.isoOfNatIso\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n                (limit.isLimit (F ⋙ diagramFunctor J D X)))).inv) ≫\n      NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    NatTrans.app (limit.cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))).π k\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ ((HasLimit.isoOfNatIso\n            (NatIso.ofComponents fun k =>\n                colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).inv ≫\n          (HasColimit.isoOfNatIso\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n                (limit.isLimit (F ⋙ diagramFunctor J D X)))).inv) ≫\n      NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, ← Iso.eq_inv_comp, Iso.inv_comp_eq, Iso.inv_comp_eq]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\n⊢ NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    (HasColimit.isoOfNatIso\n          (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X)))).hom ≫\n      (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n        (HasLimit.isoOfNatIso\n              (NatIso.ofComponents fun k =>\n                  colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).inv ≫\n          limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\nrefine' colimit.hom_ext (fun j => _)\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (limit F) (op X).unop) j ≫ NatTrans.app (plusMap J (limit.π F k)) (op X) =\n    colimit.ι (diagram J (limit F) (op X).unop) j ≫\n      (HasColimit.isoOfNatIso\n            (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X)))).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\ndsimp [plusMap]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (limit F) X) j ≫ colimMap (diagramNatTrans J (limit.π F k) X) =\n    colimit.ι (diagram J (limit F) X) j ≫\n      (HasColimit.isoOfNatIso\n            (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X)))).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\nsimp only [HasColimit.isoOfNatIso_ι_hom_assoc, ι_colimMap]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ NatTrans.app (diagramNatTrans J (limit.π F k) X) j ≫ colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app\n        (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X))).hom\n        j ≫\n      colimit.ι (limit (F ⋙ diagramFunctor J D X)) j ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\ndsimp [IsLimit.conePointUniqueUpToIso, HasLimit.isoOfNatIso, IsLimit.map]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (limit.lift (F ⋙ diagramFunctor J D X) ((diagramFunctor J D X).mapCone (limit.cone F))) j ≫\n      colimit.ι (limit (F ⋙ diagramFunctor J D X)) j ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\n              ((Cones.postcompose\n                    (NatIso.ofComponents fun k =>\n                        colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom).obj\n                (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X))))) ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X)) k\n[PROOFSTEP]\nrw [limit.lift_π]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (limit.lift (F ⋙ diagramFunctor J D X) ((diagramFunctor J D X).mapCone (limit.cone F))) j ≫\n      colimit.ι (limit (F ⋙ diagramFunctor J D X)) j ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          NatTrans.app\n            ((Cones.postcompose\n                    (NatIso.ofComponents fun k =>\n                        colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom).obj\n                (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X))))).π\n            k\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (limit.lift (F ⋙ diagramFunctor J D X) ((diagramFunctor J D X).mapCone (limit.cone F))) j ≫\n      colimit.ι (limit (F ⋙ diagramFunctor J D X)) j ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X)).hom ≫\n          limit.π (colimit (Functor.flip (F ⋙ diagramFunctor J D X))) k ≫\n            (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom\n[PROOFSTEP]\nrw [ι_colimitLimitIso_limit_π_assoc]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (limit.lift (F ⋙ diagramFunctor J D X) ((diagramFunctor J D X).mapCone (limit.cone F))) j ≫\n      NatTrans.app (limit.π (F ⋙ diagramFunctor J D X) k) j ≫\n        NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k ≫\n          (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom\n[PROOFSTEP]\nsimp_rw [← Category.assoc, ← NatTrans.comp_app]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    (NatTrans.app\n          (limit.lift (F ⋙ diagramFunctor J D X) ((diagramFunctor J D X).mapCone (limit.cone F)) ≫\n            limit.π (F ⋙ diagramFunctor J D X) k)\n          j ≫\n        NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k) ≫\n      (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom\n[PROOFSTEP]\nrw [limit.lift_π, Category.assoc]\n[GOAL]\ncase e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ Multiequalizer.lift (Cover.index j.unop (F.obj k)) (multiequalizer (Cover.index j.unop (limit F)))\n        (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n        (_ :\n          ∀ (i : (Cover.index j.unop (F.obj k)).R),\n            (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.fst (Cover.index j.unop (F.obj k)) i =\n              (fun i => Multiequalizer.ι (Cover.index j.unop (limit F)) i ≫ NatTrans.app (limit.π F k) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index j.unop (F.obj k)) i) ≫\n                MulticospanIndex.snd (Cover.index j.unop (F.obj k)) i) ≫\n      colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (NatTrans.app ((diagramFunctor J D X).mapCone (limit.cone F)).π k) j ≫\n      NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k ≫\n        (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (F.obj k) X) j =\n    NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k ≫\n      (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).hom\n[PROOFSTEP]\nrw [← Iso.comp_inv_eq]\n[GOAL]\ncase e_a.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ colimit.ι (diagram J (F.obj k) X) j ≫\n      (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X)) k).inv =\n    NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k\n[PROOFSTEP]\nerw [colimit.ι_desc]\n[GOAL]\ncase e_a.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : C\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj (op X))\nk : K\nj : (Cover J (op X).unop)ᵒᵖ\n⊢ NatTrans.app (((evaluation K D).obj k).mapCocone (colimit.cocone (Functor.flip (F ⋙ diagramFunctor J D X)))).ι j =\n    NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X)) j) k\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\n⊢ PreservesLimitsOfShape K (plusFunctor J D)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase preservesLimit\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\n⊢ autoParam ({K_1 : K ⥤ Cᵒᵖ ⥤ D} → PreservesLimit K_1 (plusFunctor J D)) _auto✝\n[PROOFSTEP]\nintro F\n[GOAL]\ncase preservesLimit\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\n⊢ PreservesLimit F (plusFunctor J D)\n[PROOFSTEP]\napply preservesLimitOfEvaluation\n[GOAL]\ncase preservesLimit.H\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\n⊢ (k : Cᵒᵖ) → PreservesLimit F (plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj k)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase preservesLimit.H\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\n⊢ PreservesLimit F (plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\n[PROOFSTEP]\napply preservesLimitOfPreservesLimitCone (limit.isLimit F)\n[GOAL]\ncase preservesLimit.H\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\n⊢ IsLimit ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F))\n[PROOFSTEP]\nrefine' ⟨fun S => liftToPlusObjLimitObj.{w, v, u} F X.unop S, _, _⟩\n[GOAL]\ncase preservesLimit.H.refine'_1\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\n⊢ ∀ (s : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)) (j : K),\n    (fun S => liftToPlusObjLimitObj F X.unop S) s ≫\n        NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j =\n      NatTrans.app s.π j\n[PROOFSTEP]\nintro S k\n[GOAL]\ncase preservesLimit.H.refine'_1\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nk : K\n⊢ (fun S => liftToPlusObjLimitObj F X.unop S) S ≫\n      NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π k =\n    NatTrans.app S.π k\n[PROOFSTEP]\napply liftToPlusObjLimitObj_fac\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\n⊢ ∀ (s : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X))\n    (m : s.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt),\n    (∀ (j : K),\n        m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j =\n          NatTrans.app s.π j) →\n      m = (fun S => liftToPlusObjLimitObj F X.unop S) s\n[PROOFSTEP]\nintro S m hm\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\n⊢ m = (fun S => liftToPlusObjLimitObj F X.unop S) S\n[PROOFSTEP]\ndsimp [liftToPlusObjLimitObj]\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\n⊢ m =\n    limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) S ≫\n      (HasLimit.isoOfNatIso\n            (NatIso.ofComponents fun k =>\n                colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).inv ≫\n          (HasColimit.isoOfNatIso\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).inv\n[PROOFSTEP]\nsimp_rw [← Category.assoc, Iso.eq_comp_inv, ← Iso.comp_inv_eq]\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\n⊢ ((m ≫\n          (HasColimit.isoOfNatIso\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom) ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom) ≫\n      (HasLimit.isoOfNatIso\n          (NatIso.ofComponents fun k =>\n              colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv =\n    limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) S\n[PROOFSTEP]\nrefine' limit.hom_ext (fun k => _)\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk : K\n⊢ (((m ≫\n            (HasColimit.isoOfNatIso\n                (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom) ≫\n          (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom) ≫\n        (HasLimit.isoOfNatIso\n            (NatIso.ofComponents fun k =>\n                colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv) ≫\n      limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k =\n    limit.lift (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) S ≫\n      limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k\n[PROOFSTEP]\nsimp only [limit.lift_π, Category.assoc, ← hm]\n[GOAL]\ncase preservesLimit.H.refine'_2\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk : K\n⊢ m ≫\n      (HasColimit.isoOfNatIso\n            (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k =\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π k\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk : K\n⊢ (HasColimit.isoOfNatIso\n          (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom ≫\n      (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n        (HasLimit.isoOfNatIso\n              (NatIso.ofComponents fun k =>\n                  colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv ≫\n          limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k =\n    NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π k\n[PROOFSTEP]\nrefine' colimit.hom_ext (fun k => _)\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ colimit.ι (diagram J (limit.cone F).pt X.unop) k ≫\n      (HasColimit.isoOfNatIso\n            (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k✝ =\n    colimit.ι (diagram J (limit.cone F).pt X.unop) k ≫\n      NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π k✝\n[PROOFSTEP]\ndsimp [plusMap, plusObj]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ colimit.ι (diagram J (limit F) X.unop) k ≫\n      (HasColimit.isoOfNatIso\n            (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X.unop)))).hom ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n          (HasLimit.isoOfNatIso\n                (NatIso.ofComponents fun k =>\n                    colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm).inv ≫\n            limit.π (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X) k✝ =\n    colimit.ι (diagram J (limit F) X.unop) k ≫ colimMap (diagramNatTrans J (limit.π F k✝) X.unop)\n[PROOFSTEP]\nerw [colimit.ι_map, colimit.ι_desc_assoc, limit.lift_π]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app\n        ((Cocones.precompose\n                (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                    (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom).obj\n            (colimit.cocone (limit (F ⋙ diagramFunctor J D X.unop)))).ι\n        k ≫\n      (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n        NatTrans.app\n          ((Cones.postcompose\n                  (NatIso.ofComponents fun k =>\n                        colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop))\n                          k).symm.inv).obj\n              (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))))).π\n          k✝ =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nconv_lhs => dsimp\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      ((Cocones.precompose\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom).obj\n          (colimit.cocone (limit (F ⋙ diagramFunctor J D X.unop)))).ι\n      k ≫\n    (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n      NatTrans.app\n        ((Cones.postcompose\n                (NatIso.ofComponents fun k =>\n                      colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm.inv).obj\n            (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))))).π\n        k✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      ((Cocones.precompose\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom).obj\n          (colimit.cocone (limit (F ⋙ diagramFunctor J D X.unop)))).ι\n      k ≫\n    (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n      NatTrans.app\n        ((Cones.postcompose\n                (NatIso.ofComponents fun k =>\n                      colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm.inv).obj\n            (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))))).π\n        k✝\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      ((Cocones.precompose\n              (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n                  (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom).obj\n          (colimit.cocone (limit (F ⋙ diagramFunctor J D X.unop)))).ι\n      k ≫\n    (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n      NatTrans.app\n        ((Cones.postcompose\n                (NatIso.ofComponents fun k =>\n                      colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k).symm.inv).obj\n            (limit.cone (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))))).π\n        k✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ (NatTrans.app\n          (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n              (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n          k ≫\n        colimit.ι (limit (F ⋙ diagramFunctor J D X.unop)) k) ≫\n      (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n        limit.π (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))) k✝ ≫\n          (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k✝).hom =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app\n        (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n        k ≫\n      colimit.ι (limit (F ⋙ diagramFunctor J D X.unop)) k ≫\n        (colimitLimitIso (F ⋙ diagramFunctor J D X.unop)).hom ≫\n          limit.π (colimit (Functor.flip (F ⋙ diagramFunctor J D X.unop))) k✝ ≫\n            (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k✝).hom =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nrw [ι_colimitLimitIso_limit_π_assoc]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app\n        (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n        k ≫\n      NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n        NatTrans.app (colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k) k✝ ≫\n          (colimitObjIsoColimitCompEvaluation (Functor.flip (F ⋙ diagramFunctor J D X.unop)) k✝).hom =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nsimp only [NatIso.ofComponents_inv_app, colimitObjIsoColimitCompEvaluation_ι_app_hom, Iso.symm_inv]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app\n        (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n            (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n        k ≫\n      NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n        colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nconv_lhs => dsimp [IsLimit.conePointUniqueUpToIso]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n          (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n      k ≫\n    NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n      colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k\n[PROOFSTEP]\ndsimp [IsLimit.conePointUniqueUpToIso]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n          (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n      k ≫\n    NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n      colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k\n[PROOFSTEP]\ndsimp [IsLimit.conePointUniqueUpToIso]\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n| NatTrans.app\n      (IsLimit.conePointUniqueUpToIso (isLimitOfPreserves (diagramFunctor J D X.unop) (limit.isLimit F))\n          (limit.isLimit (F ⋙ diagramFunctor J D X.unop))).hom\n      k ≫\n    NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n      colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k\n[PROOFSTEP]\ndsimp [IsLimit.conePointUniqueUpToIso]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (limit.lift (F ⋙ diagramFunctor J D X.unop) ((diagramFunctor J D X.unop).mapCone (limit.cone F))) k ≫\n      NatTrans.app (limit.π (F ⋙ diagramFunctor J D X.unop) k✝) k ≫\n        colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nrw [← Category.assoc, ← NatTrans.comp_app, limit.lift_π]\n[GOAL]\ncase preservesLimit.H.refine'_2.e_a\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nK : Type (max v u)\ninst✝⁴ : SmallCategory K\ninst✝³ : FinCategory K\ninst✝² : HasLimitsOfShape K D\ninst✝¹ : PreservesLimitsOfShape K (forget D)\ninst✝ : ReflectsLimitsOfShape K (forget D)\nF : K ⥤ Cᵒᵖ ⥤ D\nX : Cᵒᵖ\nS : Cone (F ⋙ plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X)\nm : S.pt ⟶ ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).pt\nhm :\n  ∀ (j : K),\n    m ≫ NatTrans.app ((plusFunctor J D ⋙ (evaluation Cᵒᵖ D).obj X).mapCone (limit.cone F)).π j = NatTrans.app S.π j\nk✝ : K\nk : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (NatTrans.app ((diagramFunctor J D X.unop).mapCone (limit.cone F)).π k✝) k ≫\n      colimit.ι (Functor.flip (F ⋙ diagramFunctor J D X.unop) ⋙ (evaluation K D).obj k✝) k =\n    NatTrans.app (diagramNatTrans J (limit.π F k✝) X.unop) k ≫ colimit.ι (diagram J (F.obj k✝) X.unop) k\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝² : HasFiniteLimits D\ninst✝¹ : PreservesFiniteLimits (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\n⊢ PreservesFiniteLimits (plusFunctor J D)\n[PROOFSTEP]\napply preservesFiniteLimitsOfPreservesFiniteLimitsOfSize.{max v u}\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝² : HasFiniteLimits D\ninst✝¹ : PreservesFiniteLimits (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\n⊢ (J_1 : Type (max v u)) → {𝒥 : SmallCategory J_1} → FinCategory J_1 → PreservesLimitsOfShape J_1 (plusFunctor J D)\n[PROOFSTEP]\nintro K _ _\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝² : HasFiniteLimits D\ninst✝¹ : PreservesFiniteLimits (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\n𝒥✝ : SmallCategory K\nx✝ : FinCategory K\n⊢ PreservesLimitsOfShape K (plusFunctor J D)\n[PROOFSTEP]\nhave : ReflectsLimitsOfShape K (forget D) := reflectsLimitsOfShapeOfReflectsIsomorphisms\n[GOAL]\ncase h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝² : HasFiniteLimits D\ninst✝¹ : PreservesFiniteLimits (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\n𝒥✝ : SmallCategory K\nx✝ : FinCategory K\nthis : ReflectsLimitsOfShape K (forget D)\n⊢ PreservesLimitsOfShape K (plusFunctor J D)\n[PROOFSTEP]\napply preservesLimitsOfShape_plusFunctor.{w, v, u}\n[GOAL]\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\n⊢ PreservesLimitsOfShape K (presheafToSheaf J D)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase preservesLimit\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\n⊢ autoParam ({K_1 : K ⥤ Cᵒᵖ ⥤ D} → PreservesLimit K_1 (presheafToSheaf J D)) _auto✝\n[PROOFSTEP]\nintro F\n[GOAL]\ncase preservesLimit\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\n⊢ PreservesLimit F (presheafToSheaf J D)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase preservesLimit.preserves\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\n⊢ {c : Cone F} → IsLimit c → IsLimit ((presheafToSheaf J D).mapCone c)\n[PROOFSTEP]\nintro S hS\n[GOAL]\ncase preservesLimit.preserves\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nS : Cone F\nhS : IsLimit S\n⊢ IsLimit ((presheafToSheaf J D).mapCone S)\n[PROOFSTEP]\napply isLimitOfReflects (sheafToPresheaf J D)\n[GOAL]\ncase preservesLimit.preserves.t\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nS : Cone F\nhS : IsLimit S\n⊢ IsLimit ((sheafToPresheaf J D).mapCone ((presheafToSheaf J D).mapCone S))\n[PROOFSTEP]\nhave : ReflectsLimitsOfShape K (forget D) := reflectsLimitsOfShapeOfReflectsIsomorphisms\n[GOAL]\ncase preservesLimit.preserves.t\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nS : Cone F\nhS : IsLimit S\nthis : ReflectsLimitsOfShape K (forget D)\n⊢ IsLimit ((sheafToPresheaf J D).mapCone ((presheafToSheaf J D).mapCone S))\n[PROOFSTEP]\nhave : PreservesLimitsOfShape K (presheafToSheaf J D ⋙ sheafToPresheaf J D) :=\n  preservesLimitsOfShapeOfNatIso (J.sheafificationIsoPresheafToSheafCompSheafToPreasheaf D)\n[GOAL]\ncase preservesLimit.preserves.t\nC : Type u\ninst✝¹⁰ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁹ : Category.{max v u, w} D\ninst✝⁸ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁷ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝² : SmallCategory K\ninst✝¹ : FinCategory K\ninst✝ : HasLimitsOfShape K D\nF : K ⥤ Cᵒᵖ ⥤ D\nS : Cone F\nhS : IsLimit S\nthis✝ : ReflectsLimitsOfShape K (forget D)\nthis : PreservesLimitsOfShape K (presheafToSheaf J D ⋙ sheafToPresheaf J D)\n⊢ IsLimit ((sheafToPresheaf J D).mapCone ((presheafToSheaf J D).mapCone S))\n[PROOFSTEP]\nexact isLimitOfPreserves (presheafToSheaf J D ⋙ sheafToPresheaf J D) hS\n[GOAL]\nC : Type u\ninst✝¹¹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹⁰ : Category.{max v u, w} D\ninst✝⁹ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁸ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁷ : ConcreteCategory D\ninst✝⁶ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝³ : SmallCategory K\ninst✝² : FinCategory K\ninst✝¹ : HasLimitsOfShape K D\ninst✝ : HasFiniteLimits D\n⊢ PreservesFiniteLimits (presheafToSheaf J D)\n[PROOFSTEP]\napply preservesFiniteLimitsOfPreservesFiniteLimitsOfSize.{max v u}\n[GOAL]\ncase h\nC : Type u\ninst✝¹¹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹⁰ : Category.{max v u, w} D\ninst✝⁹ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁸ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁷ : ConcreteCategory D\ninst✝⁶ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝³ : SmallCategory K\ninst✝² : FinCategory K\ninst✝¹ : HasLimitsOfShape K D\ninst✝ : HasFiniteLimits D\n⊢ (J_1 : Type (max v u)) → {𝒥 : SmallCategory J_1} → FinCategory J_1 → PreservesLimitsOfShape J_1 (presheafToSheaf J D)\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nC : Type u\ninst✝¹¹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹⁰ : Category.{max v u, w} D\ninst✝⁹ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝⁸ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝⁷ : ConcreteCategory D\ninst✝⁶ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ : ReflectsIsomorphisms (forget D)\nK : Type (max v u)\ninst✝³ : SmallCategory K\ninst✝² : FinCategory K\ninst✝¹ : HasLimitsOfShape K D\ninst✝ : HasFiniteLimits D\nJ✝ : Type (max v u)\n𝒥✝ : SmallCategory J✝\nx✝ : FinCategory J✝\n⊢ PreservesLimitsOfShape J✝ (presheafToSheaf J D)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.LeftExact", "llama_tokens": 59223, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6825737344123242, "lm_q2_score": 0.4073334000459302, "lm_q1q2_score": 0.27803508002021976}}
{"text": "[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : Type w\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\ninst✝ : HasFiniteLimits C\n⊢ HasLimitsOfShape J C\n[PROOFSTEP]\napply @hasLimitsOfShape_of_equivalence _ _ _ _ _ _ (FinCategory.equivAsType J) ?_\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : Type w\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\ninst✝ : HasFiniteLimits C\n⊢ HasLimitsOfShape (FinCategory.AsType J) C\n[PROOFSTEP]\napply HasFiniteLimits.out\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\n⊢ HasLimitsOfShape J C\n[PROOFSTEP]\nhaveI := h (ULiftHom.{w} (ULift.{w} J)) <| @CategoryTheory.finCategoryUlift J hJ hhJ\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\nthis : HasLimitsOfShape (ULiftHom (ULift J)) C\n⊢ HasLimitsOfShape J C\n[PROOFSTEP]\nhave l : @Equivalence J (ULiftHom (ULift J)) hJ (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) :=\n  @ULiftHomULiftCategory.equiv J hJ\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasLimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\nthis : HasLimitsOfShape (ULiftHom (ULift J)) C\nl : J ≌ ULiftHom (ULift J)\n⊢ HasLimitsOfShape J C\n[PROOFSTEP]\napply\n  @hasLimitsOfShape_of_equivalence (ULiftHom (ULift J)) (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) C _ J hJ\n    (@Equivalence.symm J hJ (ULiftHom (ULift J)) (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) l)\n    _\n      /- Porting note: tried to factor out (@instCategoryULiftHom (ULift J) (@uliftCategory J hJ)\n          but when doing that would then find the instance and say it was not definitionally equal to\n          the provided one (the same thing factored out) -/\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : Type w\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\ninst✝ : HasFiniteColimits C\n⊢ HasColimitsOfShape J C\n[PROOFSTEP]\nrefine @hasColimitsOfShape_of_equivalence _ _ _ _ _ _ (FinCategory.equivAsType J) ?_\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : Type w\ninst✝² : SmallCategory J\ninst✝¹ : FinCategory J\ninst✝ : HasFiniteColimits C\n⊢ HasColimitsOfShape (FinCategory.AsType J) C\n[PROOFSTEP]\napply HasFiniteColimits.out\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\n⊢ HasColimitsOfShape J C\n[PROOFSTEP]\nhaveI := h (ULiftHom.{w} (ULift.{w} J)) <| @CategoryTheory.finCategoryUlift J hJ hhJ\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\nthis : HasColimitsOfShape (ULiftHom (ULift J)) C\n⊢ HasColimitsOfShape J C\n[PROOFSTEP]\nhave l : @Equivalence J (ULiftHom (ULift J)) hJ (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) :=\n  @ULiftHomULiftCategory.equiv J hJ\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nh : ∀ (J : Type w) {𝒥 : SmallCategory J}, FinCategory J → HasColimitsOfShape J C\nJ : Type\nhJ : SmallCategory J\nhhJ : FinCategory J\nthis : HasColimitsOfShape (ULiftHom (ULift J)) C\nl : J ≌ ULiftHom (ULift J)\n⊢ HasColimitsOfShape J C\n[PROOFSTEP]\napply\n  @hasColimitsOfShape_of_equivalence (ULiftHom (ULift J)) (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) C _ J hJ\n    (@Equivalence.symm J hJ (ULiftHom (ULift J)) (@ULiftHom.category (ULift J) (@uliftCategory J hJ)) l) _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nx : WalkingParallelPair\n⊢ x ∈ List.toFinset [zero, one]\n[PROOFSTEP]\ncases x\n[GOAL]\ncase zero\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ zero ∈ List.toFinset [zero, one]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase one\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ one ∈ List.toFinset [zero, one]\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nj j' : WalkingParallelPair\n⊢ ∀ (x : WalkingParallelPairHom j j'),\n    x ∈\n      WalkingParallelPair.recOn j\n        (WalkingParallelPair.recOn j' (List.toFinset [WalkingParallelPairHom.id zero]) (List.toFinset [left, right]))\n        (WalkingParallelPair.recOn j' ∅ (List.toFinset [WalkingParallelPairHom.id one]))\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ left ∈\n    WalkingParallelPair.recOn zero\n      (WalkingParallelPair.recOn one (List.toFinset [WalkingParallelPairHom.id zero]) (List.toFinset [left, right]))\n      (WalkingParallelPair.recOn one ∅ (List.toFinset [WalkingParallelPairHom.id one]))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ right ∈\n    WalkingParallelPair.recOn zero\n      (WalkingParallelPair.recOn one (List.toFinset [WalkingParallelPairHom.id zero]) (List.toFinset [left, right]))\n      (WalkingParallelPair.recOn one ∅ (List.toFinset [WalkingParallelPairHom.id one]))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id\nC : Type u\ninst✝ : Category.{v, u} C\nj : WalkingParallelPair\n⊢ WalkingParallelPairHom.id j ∈\n    WalkingParallelPair.recOn j\n      (WalkingParallelPair.recOn j (List.toFinset [WalkingParallelPairHom.id zero]) (List.toFinset [left, right]))\n      (WalkingParallelPair.recOn j ∅ (List.toFinset [WalkingParallelPairHom.id one]))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id\nC : Type u\ninst✝ : Category.{v, u} C\nj : WalkingParallelPair\n⊢ 𝟙 j ∈\n    WalkingParallelPair.rec (WalkingParallelPair.rec {𝟙 zero} {left, right} j) (WalkingParallelPair.rec ∅ {𝟙 one} j) j\n[PROOFSTEP]\ncases j\n[GOAL]\ncase id.zero\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ 𝟙 zero ∈\n    WalkingParallelPair.rec (WalkingParallelPair.rec {𝟙 zero} {left, right} zero)\n      (WalkingParallelPair.rec ∅ {𝟙 one} zero) zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id.one\nC : Type u\ninst✝ : Category.{v, u} C\n⊢ 𝟙 one ∈\n    WalkingParallelPair.rec (WalkingParallelPair.rec {𝟙 zero} {left, right} one) (WalkingParallelPair.rec ∅ {𝟙 one} one)\n      one\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteLimits C\n⊢ HasEqualizers C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasFiniteColimits C\n⊢ HasCoequalizers C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : Fintype J\n⊢ Fintype (WidePullbackShape J)\n[PROOFSTEP]\nrw [WidePullbackShape]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : Fintype J\n⊢ Fintype (Option J)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj j' : WidePullbackShape J\n⊢ Finset (j ⟶ j')\n[PROOFSTEP]\ncases' j' with j'\n[GOAL]\ncase none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\n⊢ Finset (j ⟶ none)\n[PROOFSTEP]\ncases' j with j\n[GOAL]\ncase none.none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ Finset (none ⟶ none)\n[PROOFSTEP]\nexact {Hom.id none}\n[GOAL]\ncase none.some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : J\n⊢ Finset (some j ⟶ none)\n[PROOFSTEP]\nexact {Hom.term j}\n[GOAL]\ncase some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\nj' : J\n⊢ Finset (j ⟶ some j')\n[PROOFSTEP]\nby_cases some j' = j\n[GOAL]\ncase some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\nj' : J\n⊢ Finset (j ⟶ some j')\n[PROOFSTEP]\nby_cases some j' = j\n[GOAL]\ncase pos\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\nj' : J\nh : some j' = j\n⊢ Finset (j ⟶ some j')\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\nj' : J\nh : some j' = j\n⊢ Finset (j ⟶ j)\n[PROOFSTEP]\nexact {Hom.id j}\n[GOAL]\ncase neg\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\nj' : J\nh : ¬some j' = j\n⊢ Finset (j ⟶ some j')\n[PROOFSTEP]\nexact ∅\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj j' : WidePullbackShape J\n⊢ ∀ (x : j ⟶ j'),\n    x ∈\n      Option.casesOn (motive := fun t => j' = t → Finset (j ⟶ j')) j'\n        (fun h =>\n          (_ : none = j') ▸\n            Option.casesOn (motive := fun t => j = t → Finset (j ⟶ none)) j (fun h => (_ : none = j) ▸ {Hom.id none})\n              (fun j_1 h => (_ : some j_1 = j) ▸ {Hom.term j_1}) (_ : j = j))\n        (fun j'_1 h =>\n          (_ : some j'_1 = j') ▸\n            if h : some j'_1 = j then Eq.mpr (_ : Finset (j ⟶ some j'_1) = Finset (j ⟶ j)) {Hom.id j} else ∅)\n        (_ : j' = j')\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase id\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePullbackShape J\n⊢ Hom.id j ∈\n    Option.casesOn (motive := fun t => j = t → Finset (j ⟶ j)) j\n      (fun h =>\n        (_ : none = j) ▸\n          Option.casesOn (motive := fun t => j = t → Finset (j ⟶ none)) j (fun h => (_ : none = j) ▸ {Hom.id none})\n            (fun j_1 h => (_ : some j_1 = j) ▸ {Hom.term j_1}) (_ : j = j))\n      (fun j' h =>\n        (_ : some j' = j) ▸\n          if h : some j' = j then Eq.mpr (_ : Finset (j ⟶ some j') = Finset (j ⟶ j)) {Hom.id j} else ∅)\n      (_ : j = j)\n[PROOFSTEP]\ncases j\n[GOAL]\ncase id.none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ Hom.id none ∈\n    Option.casesOn (motive := fun t => none = t → Finset (none ⟶ none)) none\n      (fun h =>\n        (_ : none = none) ▸\n          Option.casesOn (motive := fun t => none = t → Finset (none ⟶ none)) none\n            (fun h => (_ : none = none) ▸ {Hom.id none}) (fun j h => (_ : some j = none) ▸ {Hom.term j})\n            (_ : none = none))\n      (fun j' h =>\n        (_ : some j' = none) ▸\n          if h : some j' = none then Eq.mpr (_ : Finset (none ⟶ some j') = Finset (none ⟶ none)) {Hom.id none} else ∅)\n      (_ : none = none)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id.some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nval✝ : J\n⊢ Hom.id (some val✝) ∈\n    Option.casesOn (motive := fun t => some val✝ = t → Finset (some val✝ ⟶ some val✝)) (some val✝)\n      (fun h =>\n        (_ : none = some val✝) ▸\n          Option.casesOn (motive := fun t => some val✝ = t → Finset (some val✝ ⟶ none)) (some val✝)\n            (fun h => (_ : none = some val✝) ▸ {Hom.id none}) (fun j h => (_ : some j = some val✝) ▸ {Hom.term j})\n            (_ : some val✝ = some val✝))\n      (fun j' h =>\n        (_ : some j' = some val✝) ▸\n          if h : some j' = some val✝ then\n            Eq.mpr (_ : Finset (some val✝ ⟶ some j') = Finset (some val✝ ⟶ some val✝)) {Hom.id (some val✝)}\n          else ∅)\n      (_ : some val✝ = some val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase term\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj✝ : J\n⊢ Hom.term j✝ ∈\n    Option.casesOn (motive := fun t => none = t → Finset (some j✝ ⟶ none)) none\n      (fun h =>\n        (_ : none = none) ▸\n          Option.casesOn (motive := fun t => some j✝ = t → Finset (some j✝ ⟶ none)) (some j✝)\n            (fun h => (_ : none = some j✝) ▸ {Hom.id none}) (fun j h => (_ : some j = some j✝) ▸ {Hom.term j})\n            (_ : some j✝ = some j✝))\n      (fun j' h =>\n        (_ : some j' = none) ▸\n          if h : some j' = some j✝ then\n            Eq.mpr (_ : Finset (some j✝ ⟶ some j') = Finset (some j✝ ⟶ some j✝)) {Hom.id (some j✝)}\n          else ∅)\n      (_ : none = none)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : Fintype J\n⊢ Fintype (WidePushoutShape J)\n[PROOFSTEP]\nrw [WidePushoutShape]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : Fintype J\n⊢ Fintype (Option J)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj j' : WidePushoutShape J\n⊢ Finset (j ⟶ j')\n[PROOFSTEP]\ncases' j with j\n[GOAL]\ncase none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\n⊢ Finset (none ⟶ j')\n[PROOFSTEP]\ncases' j' with j'\n[GOAL]\ncase none.none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ Finset (none ⟶ none)\n[PROOFSTEP]\nexact {Hom.id none}\n[GOAL]\ncase none.some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : J\n⊢ Finset (none ⟶ some j')\n[PROOFSTEP]\nexact {Hom.init j'}\n[GOAL]\ncase some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\nj : J\n⊢ Finset (some j ⟶ j')\n[PROOFSTEP]\nby_cases some j = j'\n[GOAL]\ncase some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\nj : J\n⊢ Finset (some j ⟶ j')\n[PROOFSTEP]\nby_cases some j = j'\n[GOAL]\ncase pos\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\nj : J\nh : some j = j'\n⊢ Finset (some j ⟶ j')\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase pos\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\nj : J\nh : some j = j'\n⊢ Finset (j' ⟶ j')\n[PROOFSTEP]\nexact {Hom.id j'}\n[GOAL]\ncase neg\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj' : WidePushoutShape J\nj : J\nh : ¬some j = j'\n⊢ Finset (some j ⟶ j')\n[PROOFSTEP]\nexact ∅\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj j' : WidePushoutShape J\n⊢ ∀ (x : j ⟶ j'),\n    x ∈\n      Option.casesOn (motive := fun t => j = t → Finset (j ⟶ j')) j\n        (fun h =>\n          (_ : none = j) ▸\n            Option.casesOn (motive := fun t => j' = t → Finset (none ⟶ j')) j'\n              (fun h => (_ : none = j') ▸ {Hom.id none}) (fun j'_1 h => (_ : some j'_1 = j') ▸ {Hom.init j'_1})\n              (_ : j' = j'))\n        (fun j_1 h =>\n          (_ : some j_1 = j) ▸\n            if h : some j_1 = j' then Eq.mpr (_ : Finset (some j_1 ⟶ j') = Finset (j' ⟶ j')) {Hom.id j'} else ∅)\n        (_ : j = j)\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase id\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj : WidePushoutShape J\n⊢ Hom.id j ∈\n    Option.casesOn (motive := fun t => j = t → Finset (j ⟶ j)) j\n      (fun h =>\n        (_ : none = j) ▸\n          Option.casesOn (motive := fun t => j = t → Finset (none ⟶ j)) j (fun h => (_ : none = j) ▸ {Hom.id none})\n            (fun j' h => (_ : some j' = j) ▸ {Hom.init j'}) (_ : j = j))\n      (fun j_1 h =>\n        (_ : some j_1 = j) ▸\n          if h : some j_1 = j then Eq.mpr (_ : Finset (some j_1 ⟶ j) = Finset (j ⟶ j)) {Hom.id j} else ∅)\n      (_ : j = j)\n[PROOFSTEP]\ncases j\n[GOAL]\ncase id.none\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ Hom.id none ∈\n    Option.casesOn (motive := fun t => none = t → Finset (none ⟶ none)) none\n      (fun h =>\n        (_ : none = none) ▸\n          Option.casesOn (motive := fun t => none = t → Finset (none ⟶ none)) none\n            (fun h => (_ : none = none) ▸ {Hom.id none}) (fun j' h => (_ : some j' = none) ▸ {Hom.init j'})\n            (_ : none = none))\n      (fun j h =>\n        (_ : some j = none) ▸\n          if h : some j = none then Eq.mpr (_ : Finset (some j ⟶ none) = Finset (none ⟶ none)) {Hom.id none} else ∅)\n      (_ : none = none)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase id.some\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nval✝ : J\n⊢ Hom.id (some val✝) ∈\n    Option.casesOn (motive := fun t => some val✝ = t → Finset (some val✝ ⟶ some val✝)) (some val✝)\n      (fun h =>\n        (_ : none = some val✝) ▸\n          Option.casesOn (motive := fun t => some val✝ = t → Finset (none ⟶ some val✝)) (some val✝)\n            (fun h => (_ : none = some val✝) ▸ {Hom.id none}) (fun j' h => (_ : some j' = some val✝) ▸ {Hom.init j'})\n            (_ : some val✝ = some val✝))\n      (fun j h =>\n        (_ : some j = some val✝) ▸\n          if h : some j = some val✝ then\n            Eq.mpr (_ : Finset (some j ⟶ some val✝) = Finset (some val✝ ⟶ some val✝)) {Hom.id (some val✝)}\n          else ∅)\n      (_ : some val✝ = some val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase init\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nj✝ : J\n⊢ Hom.init j✝ ∈\n    Option.casesOn (motive := fun t => none = t → Finset (none ⟶ some j✝)) none\n      (fun h =>\n        (_ : none = none) ▸\n          Option.casesOn (motive := fun t => some j✝ = t → Finset (none ⟶ some j✝)) (some j✝)\n            (fun h => (_ : none = some j✝) ▸ {Hom.id none}) (fun j' h => (_ : some j' = some j✝) ▸ {Hom.init j'})\n            (_ : some j✝ = some j✝))\n      (fun j h =>\n        (_ : some j = none) ▸\n          if h : some j = some j✝ then\n            Eq.mpr (_ : Finset (some j ⟶ some j✝) = Finset (some j✝ ⟶ some j✝)) {Hom.id (some j✝)}\n          else ∅)\n      (_ : none = none)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePullbacks C\n⊢ HasLimitsOfShape (WidePullbackShape J) C\n[PROOFSTEP]\ncases nonempty_fintype J\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePullbacks C\nval✝ : Fintype J\n⊢ HasLimitsOfShape (WidePullbackShape J) C\n[PROOFSTEP]\nhaveI := @HasFiniteWidePullbacks.out C _ _ J\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePullbacks C\nval✝ : Fintype J\nthis : ∀ [inst : Fintype J], HasLimitsOfShape (WidePullbackShape J) C\n⊢ HasLimitsOfShape (WidePullbackShape J) C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePushouts C\n⊢ HasColimitsOfShape (WidePushoutShape J) C\n[PROOFSTEP]\ncases nonempty_fintype J\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePushouts C\nval✝ : Fintype J\n⊢ HasColimitsOfShape (WidePushoutShape J) C\n[PROOFSTEP]\nhaveI := @HasFiniteWidePushouts.out C _ _ J\n[GOAL]\ncase intro\nC : Type u\ninst✝² : Category.{v, u} C\nJ✝ : Type v\nJ : Type\ninst✝¹ : Finite J\ninst✝ : HasFiniteWidePushouts C\nval✝ : Fintype J\nthis : ∀ [inst : Fintype J], HasColimitsOfShape (WidePushoutShape J) C\n⊢ HasColimitsOfShape (WidePushoutShape J) C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\nx : WalkingPair\n⊢ x ∈ {WalkingPair.left, WalkingPair.right}\n[PROOFSTEP]\ncases x\n[GOAL]\ncase left\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ WalkingPair.left ∈ {WalkingPair.left, WalkingPair.right}\n[PROOFSTEP]\nsimp\n[GOAL]\ncase right\nC : Type u\ninst✝ : Category.{v, u} C\nJ : Type v\n⊢ WalkingPair.right ∈ {WalkingPair.left, WalkingPair.right}\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : HasFiniteWidePullbacks C\n⊢ HasPullbacks C\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\nJ : Type v\ninst✝ : HasFiniteWidePushouts C\n⊢ HasPushouts C\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.FiniteLimits", "llama_tokens": 8052, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5926665855647395, "lm_q2_score": 0.4687906266262437, "lm_q1q2_score": 0.2778365400273305}}
{"text": "[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : LaxMonoidalFunctor C D\nX : C\n⊢ (λ_ (F.obj X)).inv ≫ (F.ε ⊗ 𝟙 (F.obj X)) ≫ μ F (𝟙_ C) X = F.map (λ_ X).inv\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, F.left_unitality, Category.assoc, Category.assoc, ← F.toFunctor.map_comp, Iso.hom_inv_id,\n  F.toFunctor.map_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : LaxMonoidalFunctor C D\nX : C\n⊢ (ρ_ (F.obj X)).inv ≫ (𝟙 (F.obj X) ⊗ F.ε) ≫ μ F X (𝟙_ C) = F.map (ρ_ X).inv\n[PROOFSTEP]\nrw [Iso.inv_comp_eq, F.right_unitality, Category.assoc, Category.assoc, ← F.toFunctor.map_comp, Iso.hom_inv_id,\n  F.toFunctor.map_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : LaxMonoidalFunctor C D\nX Y Z : C\n⊢ (𝟙 (F.obj X) ⊗ μ F Y Z) ≫ μ F X (Y ⊗ Z) ≫ F.map (α_ X Y Z).inv =\n    (α_ (F.obj X) (F.obj Y) (F.obj Z)).inv ≫ (μ F X Y ⊗ 𝟙 (F.obj Z)) ≫ μ F (X ⊗ Y) Z\n[PROOFSTEP]\nrw [Iso.eq_inv_comp, ← F.associativity_assoc, ← F.toFunctor.map_comp, Iso.hom_inv_id, F.toFunctor.map_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX Y X' Y' : C\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ F.map (f ⊗ g) =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X X') ≫\n      (F.map f ⊗ F.map g) ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor Y Y'\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (λ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X) ≫ (inv F.ε ⊗ 𝟙 (F.obj X)) ≫ (λ_ (F.obj X)).hom\n[PROOFSTEP]\nsimp only [LaxMonoidalFunctor.left_unitality]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (λ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X) ≫\n      (inv F.ε ⊗ 𝟙 (F.obj X)) ≫\n        (F.ε ⊗ 𝟙 (F.obj X)) ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X ≫ F.map (λ_ X).hom\n[PROOFSTEP]\nslice_rhs 2 3 =>\n  rw [← comp_tensor_id]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (inv F.ε ⊗ 𝟙 (F.obj X)) ≫ (F.ε ⊗ 𝟙 (F.obj X))\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (λ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X)\n[PROOFSTEP]\n  rw [← comp_tensor_id]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (inv F.ε ⊗ 𝟙 (F.obj X)) ≫ (F.ε ⊗ 𝟙 (F.obj X))\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (λ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X)\n[PROOFSTEP]\n  rw [← comp_tensor_id]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (inv F.ε ⊗ 𝟙 (F.obj X)) ≫ (F.ε ⊗ 𝟙 (F.obj X))\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (λ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X)\n[PROOFSTEP]\nrw [← comp_tensor_id]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv F.ε ≫ F.ε ⊗ 𝟙 (F.obj X)\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (λ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (λ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X) ≫\n      (𝟙 (F.obj (𝟙_ C) ⊗ F.obj X) ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) X) ≫ F.map (λ_ X).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (ρ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)) ≫ (𝟙 (F.obj X) ⊗ inv F.ε) ≫ (ρ_ (F.obj X)).hom\n[PROOFSTEP]\nsimp only [LaxMonoidalFunctor.right_unitality]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (ρ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)) ≫\n      (𝟙 (F.obj X) ⊗ inv F.ε) ≫\n        (𝟙 (F.obj X) ⊗ F.ε) ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C) ≫ F.map (ρ_ X).hom\n[PROOFSTEP]\nslice_rhs 2 3 =>\n  rw [← id_tensor_comp]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (𝟙 (F.obj X) ⊗ inv F.ε) ≫ (𝟙 (F.obj X) ⊗ F.ε)\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C))\n[PROOFSTEP]\n  rw [← id_tensor_comp]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (𝟙 (F.obj X) ⊗ inv F.ε) ≫ (𝟙 (F.obj X) ⊗ F.ε)\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C))\n[PROOFSTEP]\n  rw [← id_tensor_comp]\n  simp\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| (𝟙 (F.obj X) ⊗ inv F.ε) ≫ (𝟙 (F.obj X) ⊗ F.ε)\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C))\n[PROOFSTEP]\nrw [← id_tensor_comp]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| 𝟙 (F.obj X) ⊗ inv F.ε ≫ F.ε\ncase a.a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)\ncase a.a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| F.map (ρ_ X).hom\ncase a\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n| inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX : C\n⊢ F.map (ρ_ X).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)) ≫\n      (𝟙 (F.obj X ⊗ F.obj (𝟙_ C)) ≫ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X (𝟙_ C)) ≫ F.map (ρ_ X).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\n⊢ (X : C × C) → (Functor.prod F.toFunctor F.toFunctor ⋙ tensor D).obj X ≅ (tensor C ⋙ F.toFunctor).obj X\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX✝ : C × C\n⊢ (Functor.prod F.toFunctor F.toFunctor ⋙ tensor D).obj X✝ ≅ (tensor C ⋙ F.toFunctor).obj X✝\n[PROOFSTEP]\napply F.μIso\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\n⊢ ∀ {X Y : C × C} (f : X ⟶ Y),\n    (Functor.prod F.toFunctor F.toFunctor ⋙ tensor D).map f ≫ (μIso F Y.fst Y.snd).hom =\n      (μIso F X.fst X.snd).hom ≫ (tensor C ⋙ F.toFunctor).map f\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX✝ Y✝ : C × C\nf✝ : X✝ ⟶ Y✝\n⊢ (Functor.prod F.toFunctor F.toFunctor ⋙ tensor D).map f✝ ≫ (μIso F Y✝.fst Y✝.snd).hom =\n    (μIso F X✝.fst X✝.snd).hom ≫ (tensor C ⋙ F.toFunctor).map f✝\n[PROOFSTEP]\napply F.toLaxMonoidalFunctor.μ_natural\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX Y Z : C\nf : Y ⟶ Z\n⊢ (F.toFunctor ⋙ tensorLeft (F.obj X)).map f ≫ ((fun Y => μIso F X Y) Z).hom =\n    ((fun Y => μIso F X Y) Y).hom ≫ (tensorLeft X ⋙ F.toFunctor).map f\n[PROOFSTEP]\nconvert F.μ_natural (𝟙 X) f using 2\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX Y Z : C\nf : Y ⟶ Z\ne_1✝ :\n  ((F.toFunctor ⋙ tensorLeft (F.obj X)).obj Y ⟶ (tensorLeft X ⋙ F.toFunctor).obj Z) =\n    (F.obj X ⊗ F.obj Y ⟶ F.obj (X ⊗ Z))\ne_3✝ : (F.toFunctor ⋙ tensorLeft (F.obj X)).obj Y = F.obj X ⊗ F.obj Y\ne_4✝ : (F.toFunctor ⋙ tensorLeft (F.obj X)).obj Z = F.obj X ⊗ F.obj Z\n⊢ (F.toFunctor ⋙ tensorLeft (F.obj X)).map f = F.map (𝟙 X) ⊗ F.map f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX Y Z : C\nf : Y ⟶ Z\n⊢ (F.toFunctor ⋙ tensorRight (F.obj X)).map f ≫ ((fun Y => μIso F Y X) Z).hom =\n    ((fun Y => μIso F Y X) Y).hom ≫ (tensorRight X ⋙ F.toFunctor).map f\n[PROOFSTEP]\nconvert F.μ_natural f (𝟙 X) using 2\n[GOAL]\ncase h.e'_2.h.h.e'_6.h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF : MonoidalFunctor C D\nX Y Z : C\nf : Y ⟶ Z\ne_1✝ :\n  ((F.toFunctor ⋙ tensorRight (F.obj X)).obj Y ⟶ (tensorRight X ⋙ F.toFunctor).obj Z) =\n    (F.obj Y ⊗ F.obj X ⟶ F.obj (Z ⊗ X))\ne_3✝ : (F.toFunctor ⋙ tensorRight (F.obj X)).obj Y = F.obj Y ⊗ F.obj X\ne_4✝ : (F.toFunctor ⋙ tensorRight (F.obj X)).obj Z = F.obj Z ⊗ F.obj X\n⊢ (F.toFunctor ⋙ tensorRight (F.obj X)).map f = F.map f ⊗ F.map (𝟙 X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nx✝³ x✝² x✝¹ x✝ : C\nf : x✝³ ⟶ x✝²\ng : x✝¹ ⟶ x✝\n⊢ ((Functor.mk src✝.toPrefunctor).map f ⊗ (Functor.mk src✝.toPrefunctor).map g) ≫\n      (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) x✝² x✝ =\n    (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) x✝³ x✝¹ ≫ (Functor.mk src✝.toPrefunctor).map (f ⊗ g)\n[PROOFSTEP]\nsimp only [Functor.comp_map, assoc]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nx✝³ x✝² x✝¹ x✝ : C\nf : x✝³ ⟶ x✝²\ng : x✝¹ ⟶ x✝\n⊢ (G.map (F.map f) ⊗ G.map (F.map g)) ≫ μ G (F.obj x✝²) (F.obj x✝) ≫ G.map (μ F x✝² x✝) =\n    μ G (F.obj x✝³) (F.obj x✝¹) ≫ G.map (μ F x✝³ x✝¹) ≫ G.map (F.map (f ⊗ g))\n[PROOFSTEP]\nrw [← Category.assoc, LaxMonoidalFunctor.μ_natural, Category.assoc, ← map_comp, ← map_comp, ←\n  LaxMonoidalFunctor.μ_natural]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ ((fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) X Y ⊗ 𝟙 ((Functor.mk src✝.toPrefunctor).obj Z)) ≫\n      (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) (X ⊗ Y) Z ≫\n        (Functor.mk src✝.toPrefunctor).map (α_ X Y Z).hom =\n    (α_ ((Functor.mk src✝.toPrefunctor).obj X) ((Functor.mk src✝.toPrefunctor).obj Y)\n          ((Functor.mk src✝.toPrefunctor).obj Z)).hom ≫\n      (𝟙 ((Functor.mk src✝.toPrefunctor).obj X) ⊗ (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) Y Z) ≫\n        (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) X (Y ⊗ Z)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ (μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n      (μ G (F.obj (X ⊗ Y)) (F.obj Z) ≫ G.map (μ F (X ⊗ Y) Z)) ≫ G.map (F.map (α_ X Y Z).hom) =\n    (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n      (𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z) ≫ G.map (μ F Y Z)) ≫\n        μ G (F.obj X) (F.obj (Y ⊗ Z)) ≫ G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [id_tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ (μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n      (μ G (F.obj (X ⊗ Y)) (F.obj Z) ≫ G.map (μ F (X ⊗ Y) Z)) ≫ G.map (F.map (α_ X Y Z).hom) =\n    (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n      ((𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)) ≫ (𝟙 (G.obj (F.obj X)) ⊗ G.map (μ F Y Z))) ≫\n        μ G (F.obj X) (F.obj (Y ⊗ Z)) ≫ G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nslice_rhs 3 4 => rw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (𝟙 (G.obj (F.obj X)) ⊗ G.map (μ F Y Z)) ≫ μ G (F.obj X) (F.obj (Y ⊗ Z))\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| 𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (𝟙 (G.obj (F.obj X)) ⊗ G.map (μ F Y Z)) ≫ μ G (F.obj X) (F.obj (Y ⊗ Z))\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| 𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (𝟙 (G.obj (F.obj X)) ⊗ G.map (μ F Y Z)) ≫ μ G (F.obj X) (F.obj (Y ⊗ Z))\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| 𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ (μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n      (μ G (F.obj (X ⊗ Y)) (F.obj Z) ≫ G.map (μ F (X ⊗ Y) Z)) ≫ G.map (F.map (α_ X Y Z).hom) =\n    (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n      (𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)) ≫\n        (μ G (F.obj X) (F.obj Y ⊗ F.obj Z) ≫ G.map (𝟙 (F.obj X) ⊗ μ F Y Z)) ≫ G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nslice_rhs 1 3 => rw [← G.associativity]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n    (𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)) ≫ μ G (F.obj X) (F.obj Y ⊗ F.obj Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (𝟙 (F.obj X) ⊗ μ F Y Z)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [← G.associativity]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n    (𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)) ≫ μ G (F.obj X) (F.obj Y ⊗ F.obj Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (𝟙 (F.obj X) ⊗ μ F Y Z)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [← G.associativity]\n[GOAL]\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (α_ (G.obj (F.obj X)) (G.obj (F.obj Y)) (G.obj (F.obj Z))).hom ≫\n    (𝟙 (G.obj (F.obj X)) ⊗ μ G (F.obj Y) (F.obj Z)) ≫ μ G (F.obj X) (F.obj Y ⊗ F.obj Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (𝟙 (F.obj X) ⊗ μ F Y Z)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [← G.associativity]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ (μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n      (μ G (F.obj (X ⊗ Y)) (F.obj Z) ≫ G.map (μ F (X ⊗ Y) Z)) ≫ G.map (F.map (α_ X Y Z).hom) =\n    (((μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n          μ G (F.obj X ⊗ F.obj Y) (F.obj Z) ≫ G.map (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom) ≫\n        G.map (𝟙 (F.obj X) ⊗ μ F Y Z)) ≫\n      G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [comp_tensor_id]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ ((μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫ (G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z)))) ≫\n      (μ G (F.obj (X ⊗ Y)) (F.obj Z) ≫ G.map (μ F (X ⊗ Y) Z)) ≫ G.map (F.map (α_ X Y Z).hom) =\n    (((μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n          μ G (F.obj X ⊗ F.obj Y) (F.obj Z) ≫ G.map (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom) ≫\n        G.map (𝟙 (F.obj X) ⊗ μ F Y Z)) ≫\n      G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nslice_lhs 2 3 => rw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫ μ G (F.obj (X ⊗ Y)) (F.obj Z)\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F (X ⊗ Y) Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (F.map (α_ X Y Z).hom)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫ μ G (F.obj (X ⊗ Y)) (F.obj Z)\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F (X ⊗ Y) Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (F.map (α_ X Y Z).hom)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| (G.map (μ F X Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫ μ G (F.obj (X ⊗ Y)) (F.obj Z)\ncase a.a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (μ F (X ⊗ Y) Z)\ncase a.a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| G.map (F.map (α_ X Y Z).hom)\ncase a\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n| μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))\n[PROOFSTEP]\nrw [← G.toFunctor.map_id, G.μ_natural]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX Y Z : C\n⊢ (μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n      ((μ G (F.obj X ⊗ F.obj Y) (F.obj Z) ≫ G.map (μ F X Y ⊗ 𝟙 (F.obj Z))) ≫ G.map (μ F (X ⊗ Y) Z)) ≫\n        G.map (F.map (α_ X Y Z).hom) =\n    (((μ G (F.obj X) (F.obj Y) ⊗ 𝟙 (G.obj (F.obj Z))) ≫\n          μ G (F.obj X ⊗ F.obj Y) (F.obj Z) ≫ G.map (α_ (F.obj X) (F.obj Y) (F.obj Z)).hom) ≫\n        G.map (𝟙 (F.obj X) ⊗ μ F Y Z)) ≫\n      G.map (μ F X (Y ⊗ Z))\n[PROOFSTEP]\nrw [Category.assoc, Category.assoc, Category.assoc, Category.assoc, Category.assoc, ← G.toFunctor.map_comp, ←\n  G.toFunctor.map_comp, ← G.toFunctor.map_comp, ← G.toFunctor.map_comp, F.associativity]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (λ_ ((Functor.mk src✝.toPrefunctor).obj X)).hom =\n    (G.ε ≫ G.map F.ε ⊗ 𝟙 ((Functor.mk src✝.toPrefunctor).obj X)) ≫\n      (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) (𝟙_ C) X ≫ (Functor.mk src✝.toPrefunctor).map (λ_ X).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (λ_ (G.obj (F.obj X))).hom =\n    (G.ε ≫ G.map F.ε ⊗ 𝟙 (G.obj (F.obj X))) ≫\n      (μ G (F.obj (𝟙_ C)) (F.obj X) ≫ G.map (μ F (𝟙_ C) X)) ≫ G.map (F.map (λ_ X).hom)\n[PROOFSTEP]\nrw [G.left_unitality, comp_tensor_id, Category.assoc, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (G.ε ⊗ 𝟙 (G.obj (F.obj X))) ≫ μ G (𝟙_ D) (F.obj X) ≫ G.map (λ_ (F.obj X)).hom =\n    (G.ε ⊗ 𝟙 (G.obj (F.obj X))) ≫\n      (G.map F.ε ⊗ 𝟙 (G.obj (F.obj X))) ≫ μ G (F.obj (𝟙_ C)) (F.obj X) ≫ G.map (μ F (𝟙_ C) X) ≫ G.map (F.map (λ_ X).hom)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ μ G (𝟙_ D) (F.obj X) ≫ G.map (λ_ (F.obj X)).hom =\n    (G.map F.ε ⊗ 𝟙 (G.obj (F.obj X))) ≫ μ G (F.obj (𝟙_ C)) (F.obj X) ≫ G.map (μ F (𝟙_ C) X) ≫ G.map (F.map (λ_ X).hom)\n[PROOFSTEP]\nrw [F.left_unitality, map_comp, ← NatTrans.id_app, ← Category.assoc, ← LaxMonoidalFunctor.μ_natural, NatTrans.id_app,\n  map_id, ← Category.assoc, map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (ρ_ ((Functor.mk src✝.toPrefunctor).obj X)).hom =\n    (𝟙 ((Functor.mk src✝.toPrefunctor).obj X) ⊗ G.ε ≫ G.map F.ε) ≫\n      (fun X Y => μ G (F.obj X) (F.obj Y) ≫ G.map (μ F X Y)) X (𝟙_ C) ≫ (Functor.mk src✝.toPrefunctor).map (ρ_ X).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (ρ_ (G.obj (F.obj X))).hom =\n    (𝟙 (G.obj (F.obj X)) ⊗ G.ε ≫ G.map F.ε) ≫\n      (μ G (F.obj X) (F.obj (𝟙_ C)) ≫ G.map (μ F X (𝟙_ C))) ≫ G.map (F.map (ρ_ X).hom)\n[PROOFSTEP]\nrw [G.right_unitality, id_tensor_comp, Category.assoc, Category.assoc]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ (𝟙 (G.obj (F.obj X)) ⊗ G.ε) ≫ μ G (F.obj X) (𝟙_ D) ≫ G.map (ρ_ (F.obj X)).hom =\n    (𝟙 (G.obj (F.obj X)) ⊗ G.ε) ≫\n      (𝟙 (G.obj (F.obj X)) ⊗ G.map F.ε) ≫ μ G (F.obj X) (F.obj (𝟙_ C)) ≫ G.map (μ F X (𝟙_ C)) ≫ G.map (F.map (ρ_ X).hom)\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor D E\nsrc✝ : C ⥤ E := F.toFunctor ⋙ G.toFunctor\nX : C\n⊢ μ G (F.obj X) (𝟙_ D) ≫ G.map (ρ_ (F.obj X)).hom =\n    (𝟙 (G.obj (F.obj X)) ⊗ G.map F.ε) ≫ μ G (F.obj X) (F.obj (𝟙_ C)) ≫ G.map (μ F X (𝟙_ C)) ≫ G.map (F.map (ρ_ X).hom)\n[PROOFSTEP]\nrw [F.right_unitality, map_comp, ← NatTrans.id_app, ← Category.assoc, ← LaxMonoidalFunctor.μ_natural, NatTrans.id_app,\n  map_id, ← Category.assoc, map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor C E\n⊢ (prod' F G).ε = (F.ε, G.ε)\n[PROOFSTEP]\ndsimp [prod']\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor C E\n⊢ (F.ε ≫ F.map (𝟙 (𝟙_ C)), G.ε ≫ G.map (𝟙 (𝟙_ C))) = (F.ε, G.ε)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor C E\nX Y : C\n⊢ μ (prod' F G) X Y = (μ F X Y, μ G X Y)\n[PROOFSTEP]\ndsimp [prod']\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : LaxMonoidalFunctor C D\nG : LaxMonoidalFunctor C E\nX Y : C\n⊢ (μ F X Y ≫ F.map (𝟙 (X ⊗ Y)), μ G X Y ≫ G.map (𝟙 (X ⊗ Y))) = (μ F X Y, μ G X Y)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : MonoidalFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\n⊢ IsIso (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ).ε\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : MonoidalFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\n⊢ IsIso (G.ε ≫ G.map F.ε)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : MonoidalFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\n⊢ ∀ (X Y : C), IsIso (LaxMonoidalFunctor.μ (LaxMonoidalFunctor.mk src✝.toFunctor src✝.ε src✝.μ) X Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : MonoidalFunctor D E\nsrc✝ : LaxMonoidalFunctor C E := F.toLaxMonoidalFunctor ⊗⋙ G.toLaxMonoidalFunctor\n⊢ ∀ (X Y : C),\n    IsIso\n      (LaxMonoidalFunctor.μ G.toLaxMonoidalFunctor (F.obj X) (F.obj Y) ≫\n        G.map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX Y X' Y' : D\nf : X ⟶ Y\ng : X' ⟶ Y'\n⊢ (G.map f ⊗ G.map g) ≫\n      (fun X Y =>\n          ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n            (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n              (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n        Y Y' =\n    (fun X Y =>\n          ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n            (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n              (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n        X X' ≫\n      G.map (f ⊗ g)\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_left, ← h.homEquiv_naturality_right, Equiv.apply_eq_iff_eq, assoc, IsIso.eq_inv_comp, ←\n  F.toLaxMonoidalFunctor.μ_natural_assoc, IsIso.hom_inv_id_assoc, ← tensor_comp, Adjunction.counit_naturality,\n  Adjunction.counit_naturality, tensor_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX Y Z : D\n⊢ ((fun X Y =>\n            ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n              (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n          X Y ⊗\n        𝟙 (G.obj Z)) ≫\n      (fun X Y =>\n            ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n              (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n          (X ⊗ Y) Z ≫\n        G.map (α_ X Y Z).hom =\n    (α_ (G.obj X) (G.obj Y) (G.obj Z)).hom ≫\n      (𝟙 (G.obj X) ⊗\n          (fun X Y =>\n              ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n                (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                  (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n            Y Z) ≫\n        (fun X Y =>\n            ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n              (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n          X (Y ⊗ Z)\n[PROOFSTEP]\ndsimp only\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX Y Z : D\n⊢ (↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n          (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n            (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)) ⊗\n        𝟙 (G.obj Z)) ≫\n      ↑(Adjunction.homEquiv h (G.obj (X ⊗ Y) ⊗ G.obj Z) ((X ⊗ Y) ⊗ Z))\n          (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj (X ⊗ Y)) (G.obj Z)) ≫\n            (NatTrans.app h.counit (X ⊗ Y) ⊗ NatTrans.app h.counit Z)) ≫\n        G.map (α_ X Y Z).hom =\n    (α_ (G.obj X) (G.obj Y) (G.obj Z)).hom ≫\n      (𝟙 (G.obj X) ⊗\n          ↑(Adjunction.homEquiv h (G.obj Y ⊗ G.obj Z) (Y ⊗ Z))\n            (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj Y) (G.obj Z)) ≫\n              (NatTrans.app h.counit Y ⊗ NatTrans.app h.counit Z))) ≫\n        ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj (Y ⊗ Z)) (X ⊗ Y ⊗ Z))\n          (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj (Y ⊗ Z))) ≫\n            (NatTrans.app h.counit X ⊗ NatTrans.app h.counit (Y ⊗ Z)))\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_right, ← h.homEquiv_naturality_left, ← h.homEquiv_naturality_left, ←\n  h.homEquiv_naturality_left, Equiv.apply_eq_iff_eq, ←\n  cancel_epi (F.toLaxMonoidalFunctor.μ (G.obj X ⊗ G.obj Y) (G.obj Z)), ←\n  cancel_epi (F.toLaxMonoidalFunctor.μ (G.obj X) (G.obj Y) ⊗ 𝟙 (F.obj (G.obj Z))),\n  F.toLaxMonoidalFunctor.associativity_assoc (G.obj X) (G.obj Y) (G.obj Z), ← F.toLaxMonoidalFunctor.μ_natural_assoc,\n  assoc, IsIso.hom_inv_id_assoc, ← F.toLaxMonoidalFunctor.μ_natural_assoc, IsIso.hom_inv_id_assoc, ← tensor_comp, ←\n  tensor_comp, id_comp, Functor.map_id, Functor.map_id, id_comp, ← tensor_comp_assoc, ← tensor_comp_assoc, id_comp,\n  id_comp, h.homEquiv_unit, h.homEquiv_unit, Functor.map_comp, assoc, assoc, h.counit_naturality,\n  h.left_triangle_components_assoc, Functor.map_comp, assoc, h.counit_naturality, h.left_triangle_components_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX Y Z : D\n⊢ (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y) ≫\n          inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n            (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y) ⊗\n        NatTrans.app h.counit Z) ≫\n      (α_ X Y Z).hom =\n    (α_ (F.obj (G.obj X)) (F.obj (G.obj Y)) (F.obj (G.obj Z))).hom ≫\n      (NatTrans.app h.counit X ⊗\n        LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj Y) (G.obj Z) ≫\n          inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj Y) (G.obj Z)) ≫\n            (NatTrans.app h.counit Y ⊗ NatTrans.app h.counit Z))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX : D\n⊢ (λ_ (G.obj X)).hom =\n    (↑(Adjunction.homEquiv h (𝟙_ C) (𝟙_ D)) (inv F.ε) ⊗ 𝟙 (G.obj X)) ≫\n      (fun X Y =>\n            ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n              (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n          (𝟙_ D) X ≫\n        G.map (λ_ X).hom\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_right, ← h.homEquiv_naturality_left, ← Equiv.symm_apply_eq, h.homEquiv_counit,\n  F.map_leftUnitor, h.homEquiv_unit, assoc, assoc, assoc, F.map_tensor, assoc, assoc, IsIso.hom_inv_id_assoc, ←\n  tensor_comp_assoc, Functor.map_id, id_comp, Functor.map_comp, assoc, h.counit_naturality,\n  h.left_triangle_components_assoc, ← leftUnitor_naturality, ← tensor_comp_assoc, id_comp, comp_id]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX : D\n⊢ inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) (G.obj X)) ≫\n      (inv F.ε ⊗ NatTrans.app h.counit X) ≫ (λ_ ((𝟭 D).obj X)).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ C) (G.obj X)) ≫\n      (inv F.ε ⊗ NatTrans.app h.counit X) ≫ (λ_ X).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX : D\n⊢ (ρ_ (G.obj X)).hom =\n    (𝟙 (G.obj X) ⊗ ↑(Adjunction.homEquiv h (𝟙_ C) (𝟙_ D)) (inv F.ε)) ≫\n      (fun X Y =>\n            ↑(Adjunction.homEquiv h (G.obj X ⊗ G.obj Y) (X ⊗ Y))\n              (inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (G.obj Y)) ≫\n                (NatTrans.app h.counit X ⊗ NatTrans.app h.counit Y)))\n          X (𝟙_ D) ≫\n        G.map (ρ_ X).hom\n[PROOFSTEP]\nrw [← h.homEquiv_naturality_right, ← h.homEquiv_naturality_left, ← Equiv.symm_apply_eq, h.homEquiv_counit,\n  F.map_rightUnitor, assoc, assoc, ← rightUnitor_naturality, ← tensor_comp_assoc, comp_id, id_comp, h.homEquiv_unit,\n  F.map_tensor, assoc, assoc, assoc, IsIso.hom_inv_id_assoc, Functor.map_comp, Functor.map_id, ← tensor_comp_assoc,\n  assoc, h.counit_naturality, h.left_triangle_components_assoc, id_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF : MonoidalFunctor C D\nG : D ⥤ C\nh : F.toFunctor ⊣ G\nX : D\n⊢ inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (𝟙_ C)) ≫\n      (NatTrans.app h.counit X ⊗ inv F.ε) ≫ (ρ_ ((𝟭 D).obj X)).hom =\n    inv (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (G.obj X) (𝟙_ C)) ≫\n      (NatTrans.app h.counit X ⊗ inv F.ε) ≫ (ρ_ X).hom\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : MonoidalCategory C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : MonoidalCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ IsIso (monoidalAdjoint F (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1))).ε\n[PROOFSTEP]\ndsimp [Equivalence.toAdjunction]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : MonoidalCategory C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : MonoidalCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ IsIso\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (𝟙_ C) ≫\n      (Functor.inv F.toLaxMonoidalFunctor.1).map (inv F.ε))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : MonoidalCategory C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : MonoidalCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nX Y : D\n⊢ IsIso\n    (LaxMonoidalFunctor.μ (monoidalAdjoint F (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1))) X Y)\n[PROOFSTEP]\ndsimp [Equivalence.toAdjunction]\n[GOAL]\nC : Type u₁\ninst✝⁶ : Category.{v₁, u₁} C\ninst✝⁵ : MonoidalCategory C\nD : Type u₂\ninst✝⁴ : Category.{v₂, u₂} D\ninst✝³ : MonoidalCategory D\nE : Type u₃\ninst✝² : Category.{v₃, u₃} E\ninst✝¹ : MonoidalCategory E\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\nX Y : D\n⊢ IsIso\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1))\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      (Functor.inv F.toLaxMonoidalFunctor.1).map\n        (inv\n            (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n          (NatTrans.app (Equivalence.counit (asEquivalence F.toLaxMonoidalFunctor.1)) X ⊗\n            NatTrans.app (Equivalence.counit (asEquivalence F.toLaxMonoidalFunctor.1)) Y)))\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Functor", "llama_tokens": 28169, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665855647394, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.2778365400273305}}
{"text": "[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr✝ : R\nf✝ : R[X]\nr c : R\nf : R[X]\n⊢ AddHom.toFun\n      { toFun := fun f => comp f (X + ↑C r),\n        map_add' := (_ : ∀ (f g : R[X]), comp (f + g) (X + ↑C r) = comp f (X + ↑C r) + comp g (X + ↑C r)) }\n      (c • f) =\n    ↑(RingHom.id R) c •\n      AddHom.toFun\n        { toFun := fun f => comp f (X + ↑C r),\n          map_add' := (_ : ∀ (f g : R[X]), comp (f + g) (X + ↑C r) = comp f (X + ↑C r) + comp g (X + ↑C r)) }\n        f\n[PROOFSTEP]\nsimp only [smul_eq_C_mul, C_mul_comp, RingHom.id_apply]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\n⊢ ↑(taylor r) X = X + ↑C r\n[PROOFSTEP]\nsimp only [taylor_apply, X_comp]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\nx : R\n⊢ ↑(taylor r) (↑C x) = ↑C x\n[PROOFSTEP]\nsimp only [taylor_apply, C_comp]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\n⊢ taylor 0 = LinearMap.id\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\nn✝¹ n✝ : ℕ\n⊢ coeff (↑(LinearMap.comp (taylor 0) (monomial n✝¹)) 1) n✝ = coeff (↑(LinearMap.comp LinearMap.id (monomial n✝¹)) 1) n✝\n[PROOFSTEP]\nsimp only [taylor_apply, add_zero, comp_X, _root_.map_zero, LinearMap.id_comp, Function.comp_apply, LinearMap.coe_comp]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf✝ f : R[X]\n⊢ ↑(taylor 0) f = f\n[PROOFSTEP]\nrw [taylor_zero', LinearMap.id_apply]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\n⊢ ↑(taylor r) 1 = ↑C 1\n[PROOFSTEP]\nrw [← C_1, taylor_C]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\ni : ℕ\nk : R\n⊢ ↑(taylor r) (↑(monomial i) k) = ↑C k * (X + ↑C r) ^ i\n[PROOFSTEP]\nsimp [taylor_apply]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\nn : ℕ\n⊢ ↑(LinearMap.comp (lcoeff R n) (taylor r)) f = ↑(LinearMap.comp (leval r) (hasseDeriv n)) f\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\nn : ℕ\n⊢ LinearMap.comp (lcoeff R n) (taylor r) = LinearMap.comp (leval r) (hasseDeriv n)\n[PROOFSTEP]\nclear! f\n[GOAL]\ncase e_a\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn : ℕ\n⊢ LinearMap.comp (lcoeff R n) (taylor r) = LinearMap.comp (leval r) (hasseDeriv n)\n[PROOFSTEP]\next i\n[GOAL]\ncase e_a.h.h\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\n⊢ ↑(LinearMap.comp (LinearMap.comp (lcoeff R n) (taylor r)) (monomial i)) 1 =\n    ↑(LinearMap.comp (LinearMap.comp (leval r) (hasseDeriv n)) (monomial i)) 1\n[PROOFSTEP]\nsimp only [leval_apply, mul_one, one_mul, eval_monomial, LinearMap.comp_apply, coeff_C_mul, hasseDeriv_monomial,\n  taylor_apply, monomial_comp, C_1, (commute_X (C r)).add_pow i, LinearMap.map_sum]\n[GOAL]\ncase e_a.h.h\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\n⊢ (Finset.sum (Finset.range (i + 1)) fun x => ↑(lcoeff R n) (X ^ x * ↑C r ^ (i - x) * ↑(Nat.choose i x))) =\n    ↑(Nat.choose i n) * r ^ (i - n)\n[PROOFSTEP]\nsimp only [lcoeff_apply, ← C_eq_nat_cast, mul_assoc, ← C_pow, ← C_mul, coeff_mul_C, (Nat.cast_commute _ _).eq,\n  coeff_X_pow, boole_mul, Finset.sum_ite_eq, Finset.mem_range]\n[GOAL]\ncase e_a.h.h\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\n⊢ (if n < i + 1 then r ^ (i - n) * ↑(Nat.choose i n) else 0) = r ^ (i - n) * ↑(Nat.choose i n)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\nh : n < i + 1\n⊢ r ^ (i - n) * ↑(Nat.choose i n) = r ^ (i - n) * ↑(Nat.choose i n)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\nh : ¬n < i + 1\n⊢ 0 = r ^ (i - n) * ↑(Nat.choose i n)\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nR : Type u_1\ninst✝ : Semiring R\nr : R\nn i : ℕ\nh : i + 1 ≤ n\n⊢ 0 = r ^ (i - n) * ↑(Nat.choose i n)\n[PROOFSTEP]\nrw [Nat.choose_eq_zero_of_lt h, Nat.cast_zero, mul_zero]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\n⊢ coeff (↑(taylor r) f) 0 = eval r f\n[PROOFSTEP]\nrw [taylor_coeff, hasseDeriv_zero, LinearMap.id_apply]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr : R\nf : R[X]\n⊢ coeff (↑(taylor r) f) 1 = eval r (↑derivative f)\n[PROOFSTEP]\nrw [taylor_coeff, hasseDeriv_one]\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr✝ : R\nf p : R[X]\nr : R\n⊢ natDegree (↑(taylor r) p) = natDegree p\n[PROOFSTEP]\nrefine' map_natDegree_eq_natDegree _ _\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr✝ : R\nf p : R[X]\nr : R\n⊢ ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑(taylor r) (↑(monomial n) c)) = n\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr✝ : R\nf p : R[X]\nr : R\n✝ : Nontrivial R\n⊢ ∀ (n : ℕ) (c : R), c ≠ 0 → natDegree (↑(taylor r) (↑(monomial n) c)) = n\n[PROOFSTEP]\nintro n c c0\n[GOAL]\nR : Type u_1\ninst✝ : Semiring R\nr✝ : R\nf p : R[X]\nr : R\n✝ : Nontrivial R\nn : ℕ\nc : R\nc0 : c ≠ 0\n⊢ natDegree (↑(taylor r) (↑(monomial n) c)) = n\n[PROOFSTEP]\nsimp [taylor_monomial, natDegree_C_mul_eq_of_mul_ne_zero, natDegree_pow_X_add_C, c0]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf : R✝[X]\nR : Type u_2\ninst✝ : CommSemiring R\nr : R\np q : R[X]\n⊢ ↑(taylor r) (p * q) = ↑(taylor r) p * ↑(taylor r) q\n[PROOFSTEP]\nsimp only [taylor_apply, mul_comp]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommSemiring R\nf : R[X]\nr s : R\n⊢ ↑(taylor r) (↑(taylor s) f) = ↑(taylor (r + s)) f\n[PROOFSTEP]\nsimp only [taylor_apply, comp_assoc, map_add, add_comp, X_comp, C_comp, C_add, add_assoc]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommSemiring R\nr : R\nf : R[X]\ns : R\n⊢ eval s (↑(taylor r) f) = eval (s + r) f\n[PROOFSTEP]\nsimp only [taylor_apply, eval_comp, eval_C, eval_X, eval_add]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nr : R\nf : R[X]\ns : R\n⊢ eval (s - r) (↑(taylor r) f) = eval s f\n[PROOFSTEP]\nrw [taylor_eval, sub_add_cancel]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nr : R\n⊢ Function.Injective ↑(taylor r)\n[PROOFSTEP]\nintro f g h\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nr : R\nf g : R[X]\nh : ↑(taylor r) f = ↑(taylor r) g\n⊢ f = g\n[PROOFSTEP]\napply_fun taylor (-r) at h \n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nr : R\nf g : R[X]\nh : ↑(taylor (-r)) (↑(taylor r) f) = ↑(taylor (-r)) (↑(taylor r) g)\n⊢ f = g\n[PROOFSTEP]\nsimpa only [taylor_apply, comp_assoc, add_comp, X_comp, C_comp, C_neg, neg_add_cancel_right, comp_X] using h\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nf : R[X]\nr : R\nh : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0\n⊢ f = 0\n[PROOFSTEP]\napply taylor_injective r\n[GOAL]\ncase a\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nf : R[X]\nr : R\nh : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0\n⊢ ↑(taylor r) f = ↑(taylor r) 0\n[PROOFSTEP]\nrw [LinearMap.map_zero]\n[GOAL]\ncase a\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nf : R[X]\nr : R\nh : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0\n⊢ ↑(taylor r) f = 0\n[PROOFSTEP]\next k\n[GOAL]\ncase a.a\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nf : R[X]\nr : R\nh : ∀ (k : ℕ), eval r (↑(hasseDeriv k) f) = 0\nk : ℕ\n⊢ coeff (↑(taylor r) f) k = coeff 0 k\n[PROOFSTEP]\nsimp only [taylor_coeff, h, coeff_zero]\n[GOAL]\nR✝ : Type u_1\ninst✝¹ : Semiring R✝\nr✝ : R✝\nf✝ : R✝[X]\nR : Type u_2\ninst✝ : CommRing R\nf : R[X]\nr : R\n⊢ (sum (↑(taylor r) f) fun i a => ↑C a * (X - ↑C r) ^ i) = f\n[PROOFSTEP]\nrw [← comp_eq_sum_left, sub_eq_add_neg, ← C_neg, ← taylor_apply, taylor_taylor, neg_add_self, taylor_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.Polynomial.Taylor", "llama_tokens": 4170, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5964331462646254, "lm_q2_score": 0.46490157137338844, "lm_q1q2_score": 0.2772827069175984}}
{"text": "[GOAL]\nV : QuivCat\n⊢ { obj := fun V => of (Paths ↑V),\n          map := fun {X Y} F =>\n            Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n      (𝟙 V) =\n    𝟙\n      ({ obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n        V)\n[PROOFSTEP]\nchange (show Paths V ⥤ _ from _) = _\n[GOAL]\nV : QuivCat\n⊢ (let_fun this :=\n      { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        (𝟙 V);\n    this) =\n    𝟙\n      ({ obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n        V)\n[PROOFSTEP]\next\n[GOAL]\ncase h_obj.h\nV : QuivCat\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (𝟙 V);\n        this).obj\n      x✝ =\n    (𝟙\n          ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n            V)).obj\n      x✝\ncase h\nV : QuivCat\na✝ b✝ : ↑V\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (𝟙 V);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    (𝟙 V);\n                this).obj\n              a✝ =\n            (𝟙\n                  ({ obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                    V)).obj\n              a✝) ≫\n      (𝟙\n              ({ obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                V)).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            (𝟙\n                    ({ obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                      V)).obj\n                b✝ =\n              (let_fun this :=\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      (𝟙 V);\n                  this).obj\n                b✝)\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nV : QuivCat\na✝ b✝ : ↑V\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (𝟙 V);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    (𝟙 V);\n                this).obj\n              a✝ =\n            (𝟙\n                  ({ obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                    V)).obj\n              a✝) ≫\n      (𝟙\n              ({ obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                V)).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            (𝟙\n                    ({ obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n                      V)).obj\n                b✝ =\n              (let_fun this :=\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      (𝟙 V);\n                  this).obj\n                b✝)\ncase h_obj.h\nV : QuivCat\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (𝟙 V);\n        this).obj\n      x✝ =\n    (𝟙\n          ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n            V)).obj\n      x✝\n[PROOFSTEP]\napply eq_conj_eqToHom\n[GOAL]\ncase h_obj.h\nV : QuivCat\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (𝟙 V);\n        this).obj\n      x✝ =\n    (𝟙\n          ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.obj\n            V)).obj\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nU x✝¹ x✝ : QuivCat\nF : U ⟶ x✝¹\nG : x✝¹ ⟶ x✝\n⊢ { obj := fun V => of (Paths ↑V),\n          map := fun {X Y} F =>\n            Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n      (F ≫ G) =\n    { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        F ≫\n      { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        G\n[PROOFSTEP]\nchange (show Paths U ⥤ _ from _) = _\n[GOAL]\nU x✝¹ x✝ : QuivCat\nF : U ⟶ x✝¹\nG : x✝¹ ⟶ x✝\n⊢ (let_fun this :=\n      { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        (F ≫ G);\n    this) =\n    { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        F ≫\n      { obj := fun V => of (Paths ↑V),\n            map := fun {X Y} F =>\n              Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n        G\n[PROOFSTEP]\next\n[GOAL]\ncase h_obj.h\nU x✝² x✝¹ : QuivCat\nF : U ⟶ x✝²\nG : x✝² ⟶ x✝¹\nx✝ : Paths ↑U\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (F ≫ G);\n        this).obj\n      x✝ =\n    ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            F ≫\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            G).obj\n      x✝\ncase h\nU x✝¹ x✝ : QuivCat\nF : U ⟶ x✝¹\nG : x✝¹ ⟶ x✝\na✝ b✝ : ↑U\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (F ≫ G);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    (F ≫ G);\n                this).obj\n              a✝ =\n            ({ obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    F ≫\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    G).obj\n              a✝) ≫\n      ({ obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                F ≫\n              { obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                G).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            ({ obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      F ≫\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      G).obj\n                b✝ =\n              (let_fun this :=\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      (F ≫ G);\n                  this).obj\n                b✝)\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nU x✝¹ x✝ : QuivCat\nF : U ⟶ x✝¹\nG : x✝¹ ⟶ x✝\na✝ b✝ : ↑U\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (F ≫ G);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    (F ≫ G);\n                this).obj\n              a✝ =\n            ({ obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    F ≫\n                  { obj := fun V => of (Paths ↑V),\n                        map := fun {X Y} F =>\n                          Functor.mk\n                            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                    G).obj\n              a✝) ≫\n      ({ obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                F ≫\n              { obj := fun V => of (Paths ↑V),\n                    map := fun {X Y} F =>\n                      Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                G).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            ({ obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      F ≫\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      G).obj\n                b✝ =\n              (let_fun this :=\n                    { obj := fun V => of (Paths ↑V),\n                          map := fun {X Y} F =>\n                            Functor.mk\n                              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n                      (F ≫ G);\n                  this).obj\n                b✝)\ncase h_obj.h\nU x✝² x✝¹ : QuivCat\nF : U ⟶ x✝²\nG : x✝² ⟶ x✝¹\nx✝ : Paths ↑U\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (F ≫ G);\n        this).obj\n      x✝ =\n    ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            F ≫\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            G).obj\n      x✝\n[PROOFSTEP]\napply eq_conj_eqToHom\n[GOAL]\ncase h_obj.h\nU x✝² x✝¹ : QuivCat\nF : U ⟶ x✝²\nG : x✝² ⟶ x✝¹\nx✝ : Paths ↑U\n⊢ (let_fun this :=\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            (F ≫ G);\n        this).obj\n      x✝ =\n    ({ obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            F ≫\n          { obj := fun V => of (Paths ↑V),\n                map := fun {X Y} F =>\n                  Functor.mk { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f } }.map\n            G).obj\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nV : QuivCat\nC : Cat\nF : Cat.free.obj V ⟶ C\n⊢ ∀ (a b : ↑V) (e : a ⟶ b),\n    ((fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F)).map (Quiver.Hom.toPath e) =\n      eqToHom (_ : ((fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F)).obj a = F.obj a) ≫\n        F.map (Quiver.Hom.toPath e) ≫\n          eqToHom (_ : F.obj b = ((fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F)).obj b)\n[PROOFSTEP]\nsimp\n[GOAL]\nV : QuivCat\nC : Cat\n⊢ Function.RightInverse (fun F => lift F) fun F => Paths.of ⋙q F.toPrefunctor\n[PROOFSTEP]\nrintro ⟨obj, map⟩\n[GOAL]\ncase mk\nV : QuivCat\nC : Cat\nobj : ↑V → ↑(forget.obj C)\nmap : {X Y : ↑V} → (X ⟶ Y) → (obj X ⟶ obj Y)\n⊢ (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) { obj := obj, map := map }) = { obj := obj, map := map }\n[PROOFSTEP]\ndsimp only [Prefunctor.comp]\n[GOAL]\ncase mk\nV : QuivCat\nC : Cat\nobj : ↑V → ↑(forget.obj C)\nmap : {X Y : ↑V} → (X ⟶ Y) → (obj X ⟶ obj Y)\n⊢ { obj := fun X => (lift { obj := obj, map := map }).obj (Paths.of.obj X),\n      map := fun {X Y} f => (lift { obj := obj, map := map }).map (Paths.of.map f) } =\n    { obj := obj, map := map }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.e_map\nV : QuivCat\nC : Cat\nobj : ↑V → ↑(forget.obj C)\nmap : {X Y : ↑V} → (X ⟶ Y) → (obj X ⟶ obj Y)\n⊢ (fun {X Y} f => (lift { obj := obj, map := map }).map (Paths.of.map f)) = map\n[PROOFSTEP]\nfunext X Y f\n[GOAL]\ncase mk.e_map.h.h.h\nV : QuivCat\nC : Cat\nobj : ↑V → ↑(forget.obj C)\nmap : {X Y : ↑V} → (X ⟶ Y) → (obj X ⟶ obj Y)\nX Y : ↑V\nf : X ⟶ Y\n⊢ (lift { obj := obj, map := map }).map (Paths.of.map f) = map f\n[PROOFSTEP]\nexact Category.id_comp _\n[GOAL]\nV x✝¹ : QuivCat\nx✝ : Cat\nf : V ⟶ x✝¹\ng : x✝¹ ⟶ forget.obj x✝\n⊢ ↑((fun V C =>\n              { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                left_inv :=\n                  (_ : ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                right_inv :=\n                  (_ : ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n            V x✝).symm\n      (f ≫ g) =\n    Cat.free.map f ≫\n      ↑((fun V C =>\n                { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                  left_inv :=\n                    (_ : ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                  right_inv :=\n                    (_ : ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n              x✝¹ x✝).symm\n        g\n[PROOFSTEP]\nchange (show Paths V ⥤ _ from _) = _\n[GOAL]\nV x✝¹ : QuivCat\nx✝ : Cat\nf : V ⟶ x✝¹\ng : x✝¹ ⟶ forget.obj x✝\n⊢ (let_fun this :=\n      ↑((fun V C =>\n                { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                  left_inv :=\n                    (_ : ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                  right_inv :=\n                    (_ : ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n              V x✝).symm\n        (f ≫ g);\n    this) =\n    Cat.free.map f ≫\n      ↑((fun V C =>\n                { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                  left_inv :=\n                    (_ : ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                  right_inv :=\n                    (_ : ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n              x✝¹ x✝).symm\n        g\n[PROOFSTEP]\next\n[GOAL]\ncase h_obj.h\nV x✝² : QuivCat\nx✝¹ : Cat\nf : V ⟶ x✝²\ng : x✝² ⟶ forget.obj x✝¹\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  V x✝¹).symm\n            (f ≫ g);\n        this).obj\n      x✝ =\n    (Cat.free.map f ≫\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  x✝² x✝¹).symm\n            g).obj\n      x✝\ncase h\nV x✝¹ : QuivCat\nx✝ : Cat\nf : V ⟶ x✝¹\ng : x✝¹ ⟶ forget.obj x✝\na✝ b✝ : ↑V\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  V x✝).symm\n            (f ≫ g);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  ↑((fun V C =>\n                            { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                              left_inv :=\n                                (_ :\n                                  ∀ (F : Cat.free.obj V ⟶ C),\n                                    (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                              right_inv :=\n                                (_ :\n                                  ∀ (x : V ⟶ forget.obj C),\n                                    (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                          V x✝).symm\n                    (f ≫ g);\n                this).obj\n              a✝ =\n            (Cat.free.map f ≫\n                  ↑((fun V C =>\n                            { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                              left_inv :=\n                                (_ :\n                                  ∀ (F : Cat.free.obj V ⟶ C),\n                                    (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                              right_inv :=\n                                (_ :\n                                  ∀ (x : V ⟶ forget.obj C),\n                                    (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                          x✝¹ x✝).symm\n                    g).obj\n              a✝) ≫\n      (Cat.free.map f ≫\n              ↑((fun V C =>\n                        { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                          left_inv :=\n                            (_ :\n                              ∀ (F : Cat.free.obj V ⟶ C),\n                                (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                          right_inv :=\n                            (_ :\n                              ∀ (x : V ⟶ forget.obj C),\n                                (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                      x✝¹ x✝).symm\n                g).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            (Cat.free.map f ≫\n                    ↑((fun V C =>\n                              { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                                left_inv :=\n                                  (_ :\n                                    ∀ (F : Cat.free.obj V ⟶ C),\n                                      (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                                right_inv :=\n                                  (_ :\n                                    ∀ (x : V ⟶ forget.obj C),\n                                      (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                            x✝¹ x✝).symm\n                      g).obj\n                b✝ =\n              (let_fun this :=\n                    ↑((fun V C =>\n                              { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                                left_inv :=\n                                  (_ :\n                                    ∀ (F : Cat.free.obj V ⟶ C),\n                                      (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                                right_inv :=\n                                  (_ :\n                                    ∀ (x : V ⟶ forget.obj C),\n                                      (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                            V x✝).symm\n                      (f ≫ g);\n                  this).obj\n                b✝)\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nV x✝¹ : QuivCat\nx✝ : Cat\nf : V ⟶ x✝¹\ng : x✝¹ ⟶ forget.obj x✝\na✝ b✝ : ↑V\ne✝ : a✝ ⟶ b✝\n⊢ (let_fun this :=\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  V x✝).symm\n            (f ≫ g);\n        this).map\n      (Quiver.Hom.toPath e✝) =\n    eqToHom\n        (_ :\n          (let_fun this :=\n                  ↑((fun V C =>\n                            { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                              left_inv :=\n                                (_ :\n                                  ∀ (F : Cat.free.obj V ⟶ C),\n                                    (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                              right_inv :=\n                                (_ :\n                                  ∀ (x : V ⟶ forget.obj C),\n                                    (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                          V x✝).symm\n                    (f ≫ g);\n                this).obj\n              a✝ =\n            (Cat.free.map f ≫\n                  ↑((fun V C =>\n                            { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                              left_inv :=\n                                (_ :\n                                  ∀ (F : Cat.free.obj V ⟶ C),\n                                    (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                              right_inv :=\n                                (_ :\n                                  ∀ (x : V ⟶ forget.obj C),\n                                    (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                          x✝¹ x✝).symm\n                    g).obj\n              a✝) ≫\n      (Cat.free.map f ≫\n              ↑((fun V C =>\n                        { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                          left_inv :=\n                            (_ :\n                              ∀ (F : Cat.free.obj V ⟶ C),\n                                (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                          right_inv :=\n                            (_ :\n                              ∀ (x : V ⟶ forget.obj C),\n                                (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                      x✝¹ x✝).symm\n                g).map\n          (Quiver.Hom.toPath e✝) ≫\n        eqToHom\n          (_ :\n            (Cat.free.map f ≫\n                    ↑((fun V C =>\n                              { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                                left_inv :=\n                                  (_ :\n                                    ∀ (F : Cat.free.obj V ⟶ C),\n                                      (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                                right_inv :=\n                                  (_ :\n                                    ∀ (x : V ⟶ forget.obj C),\n                                      (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                            x✝¹ x✝).symm\n                      g).obj\n                b✝ =\n              (let_fun this :=\n                    ↑((fun V C =>\n                              { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                                left_inv :=\n                                  (_ :\n                                    ∀ (F : Cat.free.obj V ⟶ C),\n                                      (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                                right_inv :=\n                                  (_ :\n                                    ∀ (x : V ⟶ forget.obj C),\n                                      (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                            V x✝).symm\n                      (f ≫ g);\n                  this).obj\n                b✝)\ncase h_obj.h\nV x✝² : QuivCat\nx✝¹ : Cat\nf : V ⟶ x✝²\ng : x✝² ⟶ forget.obj x✝¹\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  V x✝¹).symm\n            (f ≫ g);\n        this).obj\n      x✝ =\n    (Cat.free.map f ≫\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  x✝² x✝¹).symm\n            g).obj\n      x✝\n[PROOFSTEP]\napply eq_conj_eqToHom\n[GOAL]\ncase h_obj.h\nV x✝² : QuivCat\nx✝¹ : Cat\nf : V ⟶ x✝²\ng : x✝² ⟶ forget.obj x✝¹\nx✝ : Paths ↑V\n⊢ (let_fun this :=\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  V x✝¹).symm\n            (f ≫ g);\n        this).obj\n      x✝ =\n    (Cat.free.map f ≫\n          ↑((fun V C =>\n                    { toFun := fun F => Paths.of ⋙q F.toPrefunctor, invFun := fun F => lift F,\n                      left_inv :=\n                        (_ :\n                          ∀ (F : Cat.free.obj V ⟶ C), (fun F => lift F) ((fun F => Paths.of ⋙q F.toPrefunctor) F) = F),\n                      right_inv :=\n                        (_ :\n                          ∀ (x : V ⟶ forget.obj C), (fun F => Paths.of ⋙q F.toPrefunctor) ((fun F => lift F) x) = x) })\n                  x✝² x✝¹).symm\n            g).obj\n      x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Category.QuivCat", "llama_tokens": 12006, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.7401743620390162, "lm_q2_score": 0.3738758227716966, "lm_q1q2_score": 0.27673329860185286}}
{"text": "[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : HasZeroObject C\ninst✝¹ : HasZeroMorphisms C\nX✝ Y✝ : C\ng : X✝ ⟶ 0\nf : X✝ ⟶ Y✝\ninst✝ : Mono f\n⊢ f ≫ 0 = g\n[PROOFSTEP]\next\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nP Q : C\ni : P ≅ Q\nhP : Injective P\nX✝ Y✝ : C\ng : X✝ ⟶ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nobtain ⟨h, h_eq⟩ := @Injective.factors C _ P _ _ _ (g ≫ i.inv) f mono\n[GOAL]\ncase intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nP Q : C\ni : P ≅ Q\nhP : Injective P\nX✝ Y✝ : C\ng : X✝ ⟶ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\nh : Y✝ ⟶ P\nh_eq : f ≫ h = g ≫ i.inv\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nrefine' ⟨h ≫ i.hom, _⟩\n[GOAL]\ncase intro\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nP Q : C\ni : P ≅ Q\nhP : Injective P\nX✝ Y✝ : C\ng : X✝ ⟶ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\nh : Y✝ ⟶ P\nh_eq : f ≫ h = g ≫ i.inv\n⊢ f ≫ h ≫ i.hom = g\n[PROOFSTEP]\nrw [← Category.assoc, h_eq, Category.assoc, Iso.inv_hom_id, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\nz : Y✝\n⊢ X\n[PROOFSTEP]\nclassical exact if h : z ∈ Set.range f then g (Classical.choose h) else Nonempty.some inferInstance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\nz : Y✝\n⊢ X\n[PROOFSTEP]\nexact if h : z ∈ Set.range f then g (Classical.choose h) else Nonempty.some inferInstance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ fun z => if h : z ∈ Set.range f then g (Classical.choose h) else Nonempty.some (_ : Nonempty X)) = g\n[PROOFSTEP]\next y\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\n⊢ (f ≫ fun z => if h : z ∈ Set.range f then g (Classical.choose h) else Nonempty.some (_ : Nonempty X)) y = g y\n[PROOFSTEP]\nclassical\nchange dite (f y ∈ Set.range f) (fun h => g (Classical.choose h)) _ = _\nsplit_ifs <;> rename_i h\n· rw [mono_iff_injective] at mono \n  erw [mono (Classical.choose_spec h)]\n· exact False.elim (h ⟨y, rfl⟩)\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\n⊢ (f ≫ fun z => if h : z ∈ Set.range f then g (Classical.choose h) else Nonempty.some (_ : Nonempty X)) y = g y\n[PROOFSTEP]\nchange dite (f y ∈ Set.range f) (fun h => g (Classical.choose h)) _ = _\n[GOAL]\ncase h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\n⊢ (if h : f y ∈ Set.range f then g (Classical.choose h) else (fun h => Nonempty.some (_ : Nonempty X)) h) = g y\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\nh✝ : f y ∈ Set.range f\n⊢ g (Classical.choose h✝) = g y\n[PROOFSTEP]\nrename_i h\n[GOAL]\ncase neg\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\nh✝ : ¬f y ∈ Set.range f\n⊢ (fun h => Nonempty.some (_ : Nonempty X)) h✝ = g y\n[PROOFSTEP]\nrename_i h\n[GOAL]\ncase pos\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\nh : f y ∈ Set.range f\n⊢ g (Classical.choose h) = g y\n[PROOFSTEP]\nrw [mono_iff_injective] at mono \n[GOAL]\ncase pos\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Function.Injective f\ny : X✝\nh : f y ∈ Set.range f\n⊢ g (Classical.choose h) = g y\n[PROOFSTEP]\nerw [mono (Classical.choose_spec h)]\n[GOAL]\ncase neg\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX : Type u₁\ninst✝ : Nonempty X\nX✝ Y✝ : Type u₁\ng : X✝ ⟶ X\nf : X✝ ⟶ Y✝\nmono : Mono f\ny : X✝\nh : ¬f y ∈ Set.range f\n⊢ (fun h => Nonempty.some (_ : Nonempty X)) h = g y\n[PROOFSTEP]\nexact False.elim (h ⟨y, rfl⟩)\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : Type u₁\n⊢ Mono some\n[PROOFSTEP]\nrw [mono_iff_injective]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : Type u₁\n⊢ Function.Injective some\n[PROOFSTEP]\nexact Option.some_injective X\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nuse Limits.prod.lift (factorThru (g ≫ Limits.prod.fst) f) (factorThru (g ≫ Limits.prod.snd) f)\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ f ≫ prod.lift (factorThru (g ≫ prod.fst) f) (factorThru (g ≫ prod.snd) f) = g\n[PROOFSTEP]\nsimp only [prod.comp_lift, comp_factorThru]\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ prod.lift (g ≫ prod.fst) (g ≫ prod.snd) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h.h₁\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ prod.lift (g ≫ prod.fst) (g ≫ prod.snd) ≫ prod.fst = g ≫ prod.fst\n[PROOFSTEP]\nsimp only [prod.lift_fst]\n[GOAL]\ncase h.h₂\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nP Q : C\ninst✝² : HasBinaryProduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⨯ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ prod.lift (g ≫ prod.fst) (g ≫ prod.snd) ≫ prod.snd = g ≫ prod.snd\n[PROOFSTEP]\nsimp only [prod.lift_snd]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝¹ : HasProduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ∏ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝¹ : HasProduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ∏ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nrefine' ⟨Pi.lift fun b => factorThru (g ≫ Pi.π c _) f, _⟩\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝¹ : HasProduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ∏ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ Pi.lift fun b => factorThru (g ≫ Pi.π c b) f) = g\n[PROOFSTEP]\next b\n[GOAL]\ncase h\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝¹ : HasProduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ∏ c\nf : X✝ ⟶ Y✝\nmono : Mono f\nb : β\n⊢ (f ≫ Pi.lift fun b => factorThru (g ≫ Pi.π c b) f) ≫ Pi.π c b = g ≫ Pi.π c b\n[PROOFSTEP]\nsimp only [Category.assoc, limit.lift_π, Fan.mk_π_app, comp_factorThru]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⊞ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⊞ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nrefine' ⟨biprod.lift (factorThru (g ≫ biprod.fst) f) (factorThru (g ≫ biprod.snd) f), _⟩\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⊞ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ f ≫ biprod.lift (factorThru (g ≫ biprod.fst) f) (factorThru (g ≫ biprod.snd) f) = g\n[PROOFSTEP]\next\n[GOAL]\ncase h₀\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⊞ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ biprod.lift (factorThru (g ≫ biprod.fst) f) (factorThru (g ≫ biprod.snd) f)) ≫ biprod.fst = g ≫ biprod.fst\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.lift_fst, comp_factorThru]\n[GOAL]\ncase h₁\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nP Q : C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasBinaryBiproduct P Q\ninst✝¹ : Injective P\ninst✝ : Injective Q\nX✝ Y✝ : C\ng : X✝ ⟶ P ⊞ Q\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ biprod.lift (factorThru (g ≫ biprod.fst) f) (factorThru (g ≫ biprod.snd) f)) ≫ biprod.snd = g ≫ biprod.snd\n[PROOFSTEP]\nsimp only [Category.assoc, biprod.lift_snd, comp_factorThru]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBiproduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ⨁ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nskip\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBiproduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ⨁ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ ∃ h, f ≫ h = g\n[PROOFSTEP]\nrefine' ⟨biproduct.lift fun b => factorThru (g ≫ biproduct.π _ _) f, _⟩\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBiproduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ⨁ c\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ biproduct.lift fun b => factorThru (g ≫ biproduct.π c b) f) = g\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nβ : Type v\nc : β → C\ninst✝² : HasZeroMorphisms C\ninst✝¹ : HasBiproduct c\ninst✝ : ∀ (b : β), Injective (c b)\nX✝ Y✝ : C\ng : X✝ ⟶ ⨁ c\nf : X✝ ⟶ Y✝\nmono : Mono f\nj✝ : β\n⊢ (f ≫ biproduct.lift fun b => factorThru (g ≫ biproduct.π c b) f) ≫ biproduct.π c j✝ = g ≫ biproduct.π c j✝\n[PROOFSTEP]\nsimp only [Category.assoc, biproduct.lift_π, comp_factorThru]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nP : Cᵒᵖ\ninst✝ : Projective P\nX✝ Y✝ : C\ng : X✝ ⟶ P.unop\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ (Projective.factorThru g.op f.op).unop).op = g.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Cᵒᵖ\ninst✝ : Injective J\nE✝ X✝ : C\nf : J.unop ⟶ X✝\ne : E✝ ⟶ X✝\nhe : Epi e\n⊢ ((factorThru f.op e.op).unop ≫ e).op = f.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : C\ninst✝ : Injective J\nE✝ X✝ : Cᵒᵖ\nf : op J ⟶ X✝\ne : E✝ ⟶ X✝\nepi : Epi e\n⊢ ((factorThru f.unop e.unop).op ≫ e).unop = f.unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nP : C\ninst✝ : Projective P\nX✝ Y✝ : Cᵒᵖ\ng : X✝ ⟶ op P\nf : X✝ ⟶ Y✝\nmono : Mono f\n⊢ (f ≫ (Projective.factorThru g.unop f.unop).op).unop = g.unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nJ : C\n⊢ Injective J ↔ Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nrw [injective_iff_projective_op, Projective.projective_iff_preservesEpimorphisms_coyoneda_obj]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nJ : C\n⊢ Functor.PreservesEpimorphisms (coyoneda.obj (op (op J))) ↔ Functor.PreservesEpimorphisms (yoneda.obj J)\n[PROOFSTEP]\nexact Functor.preservesEpimorphisms.iso_iff (Coyoneda.objOpOp _)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nL : C ⥤ D\nR : D ⥤ C\ninst✝¹ : PreservesMonomorphisms L\nadj : L ⊣ R\nJ : D\ninst✝ : Injective J\nA x✝ : C\ng : A ⟶ R.obj J\nf : A ⟶ x✝\nim : Mono f\n⊢ ↑(Adjunction.homEquiv adj A J).symm\n      (f ≫ ↑(Adjunction.homEquiv adj x✝ J) (factorThru (↑(Adjunction.homEquiv adj A J).symm g) (L.map f))) =\n    ↑(Adjunction.homEquiv adj A J).symm g\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : HasZeroMorphisms C\ninst✝² : HasImages Cᵒᵖ\ninst✝¹ : HasEqualizers Cᵒᵖ\nJ Q R S : C\ninst✝ : Injective J\nh : R ⟶ J\nf : Q ⟶ R\ng : R ⟶ S\nhgf : Exact g.op f.op\nw : f ≫ h = 0\n⊢ g ≫ desc h f g hgf w = h\n[PROOFSTEP]\nconvert congr_arg Quiver.Hom.unop (Exact.lift_comp h.op g.op f.op hgf (congrArg Quiver.Hom.op w))\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u_1\ninst✝¹ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesMonomorphisms F\nI : D\nhI : Injective I\nX Y : C\nf : X ⟶ G.obj I\ng : X ⟶ Y\n⊢ ∀ [inst : Mono g], ∃ h, g ≫ h = f\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝² : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Functor.PreservesMonomorphisms F\nI : D\nhI : Injective I\nX Y : C\nf : X ⟶ G.obj I\ng : X ⟶ Y\ninst✝ : Mono g\n⊢ ∃ h, g ≫ h = f\n[PROOFSTEP]\nrcases hI.factors (F.map f ≫ adj.counit.app _) (F.map g) with ⟨w, h⟩\n[GOAL]\ncase intro\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝² : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Functor.PreservesMonomorphisms F\nI : D\nhI : Injective I\nX Y : C\nf : X ⟶ G.obj I\ng : X ⟶ Y\ninst✝ : Mono g\nw : F.obj Y ⟶ I\nh : F.map g ≫ w = F.map f ≫ NatTrans.app adj.counit I\n⊢ ∃ h, g ≫ h = f\n[PROOFSTEP]\nuse adj.unit.app Y ≫ G.map w\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝² : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Functor.PreservesMonomorphisms F\nI : D\nhI : Injective I\nX Y : C\nf : X ⟶ G.obj I\ng : X ⟶ Y\ninst✝ : Mono g\nw : F.obj Y ⟶ I\nh : F.map g ≫ w = F.map f ≫ NatTrans.app adj.counit I\n⊢ g ≫ NatTrans.app adj.unit Y ≫ G.map w = f\n[PROOFSTEP]\nrw [← unit_naturality_assoc, ← G.map_comp, h]\n[GOAL]\ncase h\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝² : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Functor.PreservesMonomorphisms F\nI : D\nhI : Injective I\nX Y : C\nf : X ⟶ G.obj I\ng : X ⟶ Y\ninst✝ : Mono g\nw : F.obj Y ⟶ I\nh : F.map g ≫ w = F.map f ≫ NatTrans.app adj.counit I\n⊢ NatTrans.app adj.unit X ≫ G.map (F.map f ≫ NatTrans.app adj.counit I) = f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝² : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝¹ : Full G\ninst✝ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\n⊢ ∀ [inst : Mono g], ∃ h, g ≫ h = f\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝³ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝² : Full G\ninst✝¹ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\ninst✝ : Mono g\n⊢ ∃ h, g ≫ h = f\n[PROOFSTEP]\nhaveI : PreservesLimitsOfSize.{0, 0} G := adj.rightAdjointPreservesLimits\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝³ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝² : Full G\ninst✝¹ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\ninst✝ : Mono g\nthis : PreservesLimitsOfSize.{0, 0, u_2, v₁, u_1, u₁} G\n⊢ ∃ h, g ≫ h = f\n[PROOFSTEP]\nrcases hI.factors (G.map f) (G.map g) with ⟨w, h⟩\n[GOAL]\ncase intro\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝³ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝² : Full G\ninst✝¹ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\ninst✝ : Mono g\nthis : PreservesLimitsOfSize.{0, 0, u_2, v₁, u_1, u₁} G\nw : G.obj Y ⟶ G.obj I\nh : G.map g ≫ w = G.map f\n⊢ ∃ h, g ≫ h = f\n[PROOFSTEP]\nuse inv (adj.counit.app _) ≫ F.map w ≫ adj.counit.app _\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝³ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝² : Full G\ninst✝¹ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\ninst✝ : Mono g\nthis : PreservesLimitsOfSize.{0, 0, u_2, v₁, u_1, u₁} G\nw : G.obj Y ⟶ G.obj I\nh : G.map g ≫ w = G.map f\n⊢ g ≫ inv (NatTrans.app adj.counit Y) ≫ F.map w ≫ NatTrans.app adj.counit I = f\n[PROOFSTEP]\nrefine' Faithful.map_injective (F := G) _\n[GOAL]\ncase h\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝³ : Category.{u_2, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝² : Full G\ninst✝¹ : Faithful G\nI : D\nhI : Injective (G.obj I)\nX Y : D\nf : X ⟶ I\ng : X ⟶ Y\ninst✝ : Mono g\nthis : PreservesLimitsOfSize.{0, 0, u_2, v₁, u_1, u₁} G\nw : G.obj Y ⟶ G.obj I\nh : G.map g ≫ w = G.map f\n⊢ G.map (g ≫ inv (NatTrans.app adj.counit Y) ≫ F.map w ≫ NatTrans.app adj.counit I) = G.map f\n[PROOFSTEP]\nsimpa\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u_1\ninst✝¹ : Category.{?u.56282, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesMonomorphisms F\nX : D\nI : InjectivePresentation X\n⊢ Mono (G.map I.f)\n[PROOFSTEP]\nhaveI : PreservesLimitsOfSize.{0, 0} G := adj.rightAdjointPreservesLimits\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u_1\ninst✝¹ : Category.{?u.56282, u_1} D\nF : C ⥤ D\nG : D ⥤ C\nadj : F ⊣ G\ninst✝ : Functor.PreservesMonomorphisms F\nX : D\nI : InjectivePresentation X\nthis : PreservesLimitsOfSize.{0, 0, ?u.56282, v₁, u_1, u₁} G\n⊢ Mono (G.map I.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\nF✝ F : C ≌ D\n⊢ EnoughInjectives C ↔ EnoughInjectives D\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\nF✝ F : C ≌ D\n⊢ EnoughInjectives C → EnoughInjectives D\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\n⊢ EnoughInjectives D → EnoughInjectives C\n[PROOFSTEP]\nall_goals intro H; constructor; intro X; constructor\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\n⊢ EnoughInjectives C → EnoughInjectives D\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives C\n⊢ EnoughInjectives D\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.presentation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives C\n⊢ ∀ (X : D), Nonempty (InjectivePresentation X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase mp.presentation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives C\nX : D\n⊢ Nonempty (InjectivePresentation X)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\n⊢ EnoughInjectives D → EnoughInjectives C\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives D\n⊢ EnoughInjectives C\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.presentation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives D\n⊢ ∀ (X : C), Nonempty (InjectivePresentation X)\n[PROOFSTEP]\nintro X\n[GOAL]\ncase mpr.presentation\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives D\nX : C\n⊢ Nonempty (InjectivePresentation X)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.presentation.val\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives C\nX : D\n⊢ InjectivePresentation X\n[PROOFSTEP]\nexact F.symm.injectivePresentationOfMapInjectivePresentation _ (Nonempty.some (H.presentation (F.inverse.obj X)))\n[GOAL]\ncase mpr.presentation.val\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u_1\ninst✝ : Category.{u_2, u_1} D\nF✝ F : C ≌ D\nH : EnoughInjectives D\nX : C\n⊢ InjectivePresentation X\n[PROOFSTEP]\nexact F.injectivePresentationOfMapInjectivePresentation X (Nonempty.some (H.presentation (F.functor.obj X)))\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Preadditive.Injective", "llama_tokens": 10900, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6370307944803831, "lm_q2_score": 0.43398146480389854, "lm_q1q2_score": 0.2764595573137879}}
{"text": "[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ OfLocalizationSpan P ↔ OfLocalizationFiniteSpan P\n[PROOFSTEP]\ndelta RingHom.OfLocalizationSpan RingHom.OfLocalizationFiniteSpan\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ (∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Set R),\n      Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap f ↑r)) → P f) ↔\n    ∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Finset R),\n      Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap f ↑r)) → P f\n[PROOFSTEP]\napply forall₅_congr\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ ∀ (a b : Type u) (c : CommRing a) (d : CommRing b) (e : a →+* b),\n    (∀ (s : Set a), Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap e ↑r)) → P e) ↔\n      ∀ (s : Finset a), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e ↑r)) → P e\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Set a✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)) → P e✝) ↔\n    ∀ (s : Finset a✝), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Set a✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)) → P e✝) →\n    ∀ (s : Finset a✝), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝\n[PROOFSTEP]\nintro h s\n[GOAL]\ncase h.mp\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh : ∀ (s : Set a✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)) → P e✝\ns : Finset a✝\n⊢ Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝\n[PROOFSTEP]\nexact h s\n[GOAL]\ncase h.mpr\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Finset a✝), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝) →\n    ∀ (s : Set a✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)) → P e✝\n[PROOFSTEP]\nintro h s hs hs'\n[GOAL]\ncase h.mpr\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh : ∀ (s : Finset a✝), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝\ns : Set a✝\nhs : Ideal.span s = ⊤\nhs' : ∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)\n⊢ P e✝\n[PROOFSTEP]\nobtain ⟨s', h₁, h₂⟩ := (Ideal.span_eq_top_iff_finite s).mp hs\n[GOAL]\ncase h.mpr.intro.intro\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh : ∀ (s : Finset a✝), Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (Localization.awayMap e✝ ↑r)) → P e✝\ns : Set a✝\nhs : Ideal.span s = ⊤\nhs' : ∀ (r : ↑s), P (Localization.awayMap e✝ ↑r)\ns' : Finset a✝\nh₁ : ↑s' ⊆ s\nh₂ : Ideal.span ↑s' = ⊤\n⊢ P e✝\n[PROOFSTEP]\nexact h s' h₂ fun x => hs' ⟨_, h₁ x.prop⟩\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ OfLocalizationSpanTarget P ↔ OfLocalizationFiniteSpanTarget P\n[PROOFSTEP]\ndelta RingHom.OfLocalizationSpanTarget RingHom.OfLocalizationFiniteSpanTarget\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ (∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Set S),\n      Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap S (Localization.Away ↑r)) f)) → P f) ↔\n    ∀ ⦃R S : Type u⦄ [inst : CommRing R] [inst_1 : CommRing S] (f : R →+* S) (s : Finset S),\n      Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap S (Localization.Away ↑r)) f)) → P f\n[PROOFSTEP]\napply forall₅_congr\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\n⊢ ∀ (a b : Type u) (c : CommRing a) (d : CommRing b) (e : a →+* b),\n    (∀ (s : Set b), Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap b (Localization.Away ↑r)) e)) → P e) ↔\n      ∀ (s : Finset b),\n        Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b (Localization.Away ↑r)) e)) → P e\n[PROOFSTEP]\nintros\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Set b✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝) ↔\n    ∀ (s : Finset b✝),\n      Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Set b✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝) →\n    ∀ (s : Finset b✝),\n      Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\n[PROOFSTEP]\nintro h s\n[GOAL]\ncase h.mp\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh : ∀ (s : Set b✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\ns : Finset b✝\n⊢ Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\n[PROOFSTEP]\nexact h s\n[GOAL]\ncase h.mpr\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\n⊢ (∀ (s : Finset b✝),\n      Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝) →\n    ∀ (s : Set b✝), Ideal.span s = ⊤ → (∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\n[PROOFSTEP]\nintro h s hs hs'\n[GOAL]\ncase h.mpr\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh :\n  ∀ (s : Finset b✝),\n    Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\ns : Set b✝\nhs : Ideal.span s = ⊤\nhs' : ∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)\n⊢ P e✝\n[PROOFSTEP]\nobtain ⟨s', h₁, h₂⟩ := (Ideal.span_eq_top_iff_finite s).mp hs\n[GOAL]\ncase h.mpr.intro.intro\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\na✝ b✝ : Type u\nc✝ : CommRing a✝\nd✝ : CommRing b✝\ne✝ : a✝ →+* b✝\nh :\n  ∀ (s : Finset b✝),\n    Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)) → P e✝\ns : Set b✝\nhs : Ideal.span s = ⊤\nhs' : ∀ (r : ↑s), P (comp (algebraMap b✝ (Localization.Away ↑r)) e✝)\ns' : Finset b✝\nh₁ : ↑s' ⊆ s\nh₂ : Ideal.span ↑s' = ⊤\n⊢ P e✝\n[PROOFSTEP]\nexact h s' h₂ fun x => hs' ⟨_, h₁ x.prop⟩\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\n⊢ RespectsIso P\n[PROOFSTEP]\napply hP.StableUnderComposition.respectsIso\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\n⊢ ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P (RingEquiv.toRingHom e)\n[PROOFSTEP]\nintrov\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\n⊢ P (RingEquiv.toRingHom e)\n[PROOFSTEP]\nletI := e.toRingHom.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\nthis : Algebra R S := toAlgebra (RingEquiv.toRingHom e)\n⊢ P (RingEquiv.toRingHom e)\n[PROOFSTEP]\nhave : IsLocalization.Away (1 : R) S := by apply IsLocalization.away_of_isUnit_of_bijective _ isUnit_one e.bijective\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\nthis : Algebra R S := toAlgebra (RingEquiv.toRingHom e)\n⊢ IsLocalization.Away 1 S\n[PROOFSTEP]\napply IsLocalization.away_of_isUnit_of_bijective _ isUnit_one e.bijective\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\ne : R ≃+* S\nthis✝ : Algebra R S := toAlgebra (RingEquiv.toRingHom e)\nthis : IsLocalization.Away 1 S\n⊢ P (RingEquiv.toRingHom e)\n[PROOFSTEP]\nexact RingHom.PropertyIsLocal.HoldsForLocalizationAway hP S (1 : R)\n[GOAL]\nR S : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R →+* S\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nH : LocalizationPreserves P\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\nhf : P f\n⊢ P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nhave : IsLocalization ((Submonoid.powers r).map f) S' := by rw [Submonoid.map_powers]; assumption\n[GOAL]\nR S : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R →+* S\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nH : LocalizationPreserves P\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\nhf : P f\n⊢ IsLocalization (Submonoid.map f (Submonoid.powers r)) S'\n[PROOFSTEP]\nrw [Submonoid.map_powers]\n[GOAL]\nR S : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R →+* S\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nH : LocalizationPreserves P\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\nhf : P f\n⊢ IsLocalization (Submonoid.powers (↑f r)) S'\n[PROOFSTEP]\nassumption\n[GOAL]\nR S : Type u\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R →+* S\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nH : LocalizationPreserves P\nr : R\ninst✝¹ : IsLocalization.Away r R'\ninst✝ : IsLocalization.Away (↑f r) S'\nhf : P f\nthis : IsLocalization (Submonoid.map f (Submonoid.powers r)) S'\n⊢ P (IsLocalization.Away.map R' S' f r)\n[PROOFSTEP]\nexact H f (Submonoid.powers r) R' S' hf\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\n⊢ OfLocalizationSpan P\n[PROOFSTEP]\nintrov R hs hs'\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs : Ideal.span s = ⊤\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\n⊢ P f\n[PROOFSTEP]\napply_fun Ideal.map f at hs \n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\nhs : Ideal.map f (Ideal.span s) = Ideal.map f ⊤\n⊢ P f\n[PROOFSTEP]\nrw [Ideal.map_span, Ideal.map_top] at hs \n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\nhs : Ideal.span (↑f '' s) = ⊤\n⊢ P f\n[PROOFSTEP]\napply hP.OfLocalizationSpanTarget _ _ hs\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\nhs : Ideal.span (↑f '' s) = ⊤\n⊢ ∀ (r : ↑(↑f '' s)), P (comp (algebraMap S (Localization.Away ↑r)) f)\n[PROOFSTEP]\nrintro ⟨_, r, hr, rfl⟩\n[GOAL]\ncase mk.intro.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\nhs : Ideal.span (↑f '' s) = ⊤\nr : R\nhr : r ∈ s\n⊢ P (comp (algebraMap S (Localization.Away ↑{ val := ↑f r, property := (_ : ∃ a, a ∈ s ∧ ↑f a = ↑f r) })) f)\n[PROOFSTEP]\nconvert hP.StableUnderComposition _ _ (hP.HoldsForLocalizationAway (Localization.Away r) r) (hs' ⟨r, hr⟩) using 1\n[GOAL]\ncase h.e'_5\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nP : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop\nhP : PropertyIsLocal P\nR S : Type u\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\nhs' : ∀ (r : ↑s), P (Localization.awayMap f ↑r)\nhs : Ideal.span (↑f '' s) = ⊤\nr : R\nhr : r ∈ s\n⊢ comp (algebraMap S (Localization.Away ↑{ val := ↑f r, property := (_ : ∃ a, a ∈ s ∧ ↑f a = ↑f r) })) f =\n    comp (Localization.awayMap f ↑{ val := r, property := hr }) (algebraMap R (Localization.Away r))\n[PROOFSTEP]\nexact (IsLocalization.map_comp _).symm\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\n⊢ I ≤ J\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\n⊢ x ∈ J\n[PROOFSTEP]\nsuffices J.colon (Ideal.span { x }) = ⊤ by\n  simpa using\n    Submodule.mem_colon.mp (show (1 : R) ∈ J.colon (Ideal.span { x }) from this.symm ▸ Submodule.mem_top) x\n      (Ideal.mem_span_singleton_self x)\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nthis : Submodule.colon J (span {x}) = ⊤\n⊢ x ∈ J\n[PROOFSTEP]\nsimpa using\n  Submodule.mem_colon.mp (show (1 : R) ∈ J.colon (Ideal.span { x }) from this.symm ▸ Submodule.mem_top) x\n    (Ideal.mem_span_singleton_self x)\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\n⊢ Submodule.colon J (span {x}) = ⊤\n[PROOFSTEP]\nrefine' Not.imp_symm (J.colon (Ideal.span { x })).exists_le_maximal _\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\n⊢ ¬∃ M, IsMaximal M ∧ Submodule.colon J (span {x}) ≤ M\n[PROOFSTEP]\npush_neg\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\n⊢ ∀ (M : Ideal R), IsMaximal M → ¬Submodule.colon J (span {x}) ≤ M\n[PROOFSTEP]\nintro P hP le\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨⟨a, ha⟩, ⟨s, hs⟩⟩, eq⟩ :=\n  (IsLocalization.mem_map_algebraMap_iff P.primeCompl _).mp (h P hP (Ideal.mem_map_of_mem _ hx))\n[GOAL]\ncase intro.mk.mk.mk\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\na : R\nha : a ∈ J\ns : R\nhs : s ∈ primeCompl P\neq :\n  ↑(algebraMap R (Localization.AtPrime P)) x *\n      ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).snd =\n    ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).fst\n⊢ False\n[PROOFSTEP]\nrw [← _root_.map_mul, ← sub_eq_zero, ← map_sub] at eq \n[GOAL]\ncase intro.mk.mk.mk\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\na : R\nha : a ∈ J\ns : R\nhs : s ∈ primeCompl P\neq✝ :\n  ↑(algebraMap R (Localization.AtPrime P)) (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd) =\n    ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).fst\neq :\n  ↑(algebraMap R (Localization.AtPrime P))\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\n⊢ False\n[PROOFSTEP]\nobtain ⟨⟨m, hm⟩, eq⟩ := (IsLocalization.map_eq_zero_iff P.primeCompl _ _).mp eq\n[GOAL]\ncase intro.mk.mk.mk.intro.mk\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\na : R\nha : a ∈ J\ns : R\nhs : s ∈ primeCompl P\neq✝¹ :\n  ↑(algebraMap R (Localization.AtPrime P)) (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd) =\n    ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).fst\neq✝ :\n  ↑(algebraMap R (Localization.AtPrime P))\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\nm : R\nhm : m ∈ primeCompl P\neq :\n  ↑{ val := m, property := hm } *\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\n⊢ False\n[PROOFSTEP]\nrefine' hs ((hP.isPrime.mem_or_mem (le (Ideal.mem_colon_singleton.mpr _))).resolve_right hm)\n[GOAL]\ncase intro.mk.mk.mk.intro.mk\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\na : R\nha : a ∈ J\ns : R\nhs : s ∈ primeCompl P\neq✝¹ :\n  ↑(algebraMap R (Localization.AtPrime P)) (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd) =\n    ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).fst\neq✝ :\n  ↑(algebraMap R (Localization.AtPrime P))\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\nm : R\nhm : m ∈ primeCompl P\neq :\n  ↑{ val := m, property := hm } *\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\n⊢ s * m * x ∈ J\n[PROOFSTEP]\nsimp only [Subtype.coe_mk, mul_sub, sub_eq_zero, mul_comm x s, mul_left_comm] at eq \n[GOAL]\ncase intro.mk.mk.mk.intro.mk\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI J : Ideal R\nh :\n  ∀ (P : Ideal R) (hP : IsMaximal P),\n    map (algebraMap R (Localization.AtPrime P)) I ≤ map (algebraMap R (Localization.AtPrime P)) J\nx : R\nhx : x ∈ I\nP : Ideal R\nhP : IsMaximal P\nle : Submodule.colon J (span {x}) ≤ P\na : R\nha : a ∈ J\ns : R\nhs : s ∈ primeCompl P\neq✝¹ :\n  ↑(algebraMap R (Localization.AtPrime P)) (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd) =\n    ↑(algebraMap R (Localization.AtPrime P)) ↑({ val := a, property := ha }, { val := s, property := hs }).fst\neq✝ :\n  ↑(algebraMap R (Localization.AtPrime P))\n      (x * ↑({ val := a, property := ha }, { val := s, property := hs }).snd -\n        ↑({ val := a, property := ha }, { val := s, property := hs }).fst) =\n    0\nm : R\nhm : m ∈ primeCompl P\neq : s * (m * x) = m * a\n⊢ s * m * x ∈ J\n[PROOFSTEP]\nsimpa only [mul_assoc, eq] using J.mul_mem_left m ha\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI : Ideal R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), Ideal.map (algebraMap R (Localization.AtPrime J)) I = ⊥\nP : Ideal R\nhP : Ideal.IsMaximal P\n⊢ Ideal.map (algebraMap R (Localization.AtPrime P)) I = Ideal.map (algebraMap R (Localization.AtPrime P)) ⊥\n[PROOFSTEP]\nsimpa using h P hP\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI : Ideal R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), IsLocalization.coeSubmodule (Localization.AtPrime J) I = ⊥\nP : Ideal R\nhP : Ideal.IsMaximal P\nx : R\nhx : x ∈ I\n⊢ x ∈ RingHom.ker (algebraMap R (Localization.AtPrime P))\n[PROOFSTEP]\nrw [RingHom.mem_ker, ← Submodule.mem_bot R, ← h P hP, IsLocalization.mem_coeSubmodule]\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nI : Ideal R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), IsLocalization.coeSubmodule (Localization.AtPrime J) I = ⊥\nP : Ideal R\nhP : Ideal.IsMaximal P\nx : R\nhx : x ∈ I\n⊢ ∃ y, y ∈ I ∧ ↑(algebraMap R ((fun x => Localization.AtPrime P) x)) y = ↑(algebraMap R (Localization.AtPrime P)) x\n[PROOFSTEP]\nexact ⟨x, hx, rfl⟩\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\n⊢ r = 0\n[PROOFSTEP]\nrw [← Ideal.span_singleton_eq_bot]\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\n⊢ Ideal.span {r} = ⊥\n[PROOFSTEP]\napply ideal_eq_bot_of_localization\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\n⊢ ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), IsLocalization.coeSubmodule (Localization.AtPrime J) (Ideal.span {r}) = ⊥\n[PROOFSTEP]\nintro J hJ\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\nJ : Ideal R\nhJ : Ideal.IsMaximal J\n⊢ IsLocalization.coeSubmodule (Localization.AtPrime J) (Ideal.span {r}) = ⊥\n[PROOFSTEP]\ndelta IsLocalization.coeSubmodule\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\nJ : Ideal R\nhJ : Ideal.IsMaximal J\n⊢ Submodule.map (Algebra.linearMap R (Localization.AtPrime J)) (Ideal.span {r}) = ⊥\n[PROOFSTEP]\nerw [Submodule.map_span, Submodule.span_eq_bot]\n[GOAL]\ncase h\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\nJ : Ideal R\nhJ : Ideal.IsMaximal J\n⊢ ∀ (x : Localization.AtPrime J), x ∈ ↑(Algebra.linearMap R (Localization.AtPrime J)) '' {r} → x = 0\n[PROOFSTEP]\nrintro _ ⟨_, h', rfl⟩\n[GOAL]\ncase h.intro.intro\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\nJ : Ideal R\nhJ : Ideal.IsMaximal J\nw✝ : R\nh' : w✝ ∈ {r}\n⊢ ↑(Algebra.linearMap R (Localization.AtPrime J)) w✝ = 0\n[PROOFSTEP]\ncases Set.mem_singleton_iff.mpr h'\n[GOAL]\ncase h.intro.intro.refl\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\nr : R\nh : ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) r = 0\nJ : Ideal R\nhJ : Ideal.IsMaximal J\nh' : r ∈ {r}\n⊢ ↑(Algebra.linearMap R (Localization.AtPrime J)) r = 0\n[PROOFSTEP]\nexact h J hJ\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ LocalizationPreserves fun R hR => IsReduced R\n[PROOFSTEP]\nintrov R _ _\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\n⊢ IsReduced S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase eq_zero\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\n⊢ ∀ (x : S), IsNilpotent x → x = 0\n[PROOFSTEP]\nrintro x ⟨_ | n, e⟩\n[GOAL]\ncase eq_zero.intro.zero\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\ne : x ^ Nat.zero = 0\n⊢ x = 0\n[PROOFSTEP]\nsimpa using congr_arg (· * x) e\n[GOAL]\ncase eq_zero.intro.succ\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\n⊢ x = 0\n[PROOFSTEP]\nobtain ⟨⟨y, m⟩, hx⟩ := IsLocalization.surj M x\n[GOAL]\ncase eq_zero.intro.succ.intro.mk\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑(y, m).snd = ↑(algebraMap R S) (y, m).fst\n⊢ x = 0\n[PROOFSTEP]\ndsimp only at hx \n[GOAL]\ncase eq_zero.intro.succ.intro.mk\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\n⊢ x = 0\n[PROOFSTEP]\nlet hx' := congr_arg (· ^ n.succ) hx\n[GOAL]\ncase eq_zero.intro.succ.intro.mk\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : (fun x => x ^ Nat.succ n) (x * ↑(algebraMap R S) ↑m) = (fun x => x ^ Nat.succ n) (↑(algebraMap R S) y) :=\n  congr_arg (fun x => x ^ Nat.succ n) hx\n⊢ x = 0\n[PROOFSTEP]\nsimp only [mul_pow, e, zero_mul, ← RingHom.map_pow] at hx' \n[GOAL]\ncase eq_zero.intro.succ.intro.mk\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\n⊢ x = 0\n[PROOFSTEP]\nrw [← (algebraMap R S).map_zero] at hx' \n[GOAL]\ncase eq_zero.intro.succ.intro.mk\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\n⊢ x = 0\n[PROOFSTEP]\nobtain ⟨m', hm'⟩ := (IsLocalization.eq_iff_exists M S).mp hx'\n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : ↑m' * 0 = ↑m' * y ^ Nat.succ n\n⊢ x = 0\n[PROOFSTEP]\napply_fun (· * (m' : R) ^ n) at hm' \n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : ↑m' * 0 * ↑m' ^ n = ↑m' * y ^ Nat.succ n * ↑m' ^ n\n⊢ x = 0\n[PROOFSTEP]\nsimp only [mul_assoc, zero_mul, mul_zero] at hm' \n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : 0 = ↑m' * (y ^ Nat.succ n * ↑m' ^ n)\n⊢ x = 0\n[PROOFSTEP]\nrw [← mul_left_comm, ← pow_succ, ← mul_pow] at hm' \n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : 0 = (y * ↑m') ^ Nat.succ n\n⊢ x = 0\n[PROOFSTEP]\nreplace hm' := IsNilpotent.eq_zero ⟨_, hm'.symm⟩\n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : y * ↑m' = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← (IsLocalization.map_units S m).mul_left_inj, hx, zero_mul, IsLocalization.map_eq_zero_iff M]\n[GOAL]\ncase eq_zero.intro.succ.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : y * ↑m' = 0\n⊢ ∃ m, ↑m * y = 0\n[PROOFSTEP]\nexact ⟨m', by rw [← hm', mul_comm]⟩\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR : Type u_1\nhR : CommRing R\nM : Submonoid R\nS : Type u_1\nhS : CommRing S\ninst✝¹ : Algebra R S\ninst✝ : IsLocalization M S\na✝ : IsReduced R\nx : S\nn : ℕ\ne : x ^ Nat.succ n = 0\ny : R\nm : { x // x ∈ M }\nhx : x * ↑(algebraMap R S) ↑m = ↑(algebraMap R S) y\nhx' : ↑(algebraMap R S) 0 = ↑(algebraMap R S) (y ^ Nat.succ n)\nm' : { x // x ∈ M }\nhm' : y * ↑m' = 0\n⊢ ↑m' * y = 0\n[PROOFSTEP]\nrw [← hm', mul_comm]\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ OfLocalizationMaximal fun R hR => IsReduced R\n[PROOFSTEP]\nintrov R h\n[GOAL]\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nh :\n  ∀ (J : Ideal R) (x : Ideal.IsMaximal J),\n    (fun R hR => IsReduced R) (Localization.AtPrime J) Localization.instCommRingLocalizationToCommMonoid\n⊢ IsReduced R\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase eq_zero\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nh :\n  ∀ (J : Ideal R) (x : Ideal.IsMaximal J),\n    (fun R hR => IsReduced R) (Localization.AtPrime J) Localization.instCommRingLocalizationToCommMonoid\n⊢ ∀ (x : R), IsNilpotent x → x = 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase eq_zero\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nh :\n  ∀ (J : Ideal R) (x : Ideal.IsMaximal J),\n    (fun R hR => IsReduced R) (Localization.AtPrime J) Localization.instCommRingLocalizationToCommMonoid\nx : R\nhx : IsNilpotent x\n⊢ x = 0\n[PROOFSTEP]\napply eq_zero_of_localization\n[GOAL]\ncase eq_zero.h\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nh :\n  ∀ (J : Ideal R) (x : Ideal.IsMaximal J),\n    (fun R hR => IsReduced R) (Localization.AtPrime J) Localization.instCommRingLocalizationToCommMonoid\nx : R\nhx : IsNilpotent x\n⊢ ∀ (J : Ideal R) (hJ : Ideal.IsMaximal J), ↑(algebraMap R (Localization.AtPrime J)) x = 0\n[PROOFSTEP]\nintro J hJ\n[GOAL]\ncase eq_zero.h\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nh :\n  ∀ (J : Ideal R) (x : Ideal.IsMaximal J),\n    (fun R hR => IsReduced R) (Localization.AtPrime J) Localization.instCommRingLocalizationToCommMonoid\nx : R\nhx : IsNilpotent x\nJ : Ideal R\nhJ : Ideal.IsMaximal J\n⊢ ↑(algebraMap R (Localization.AtPrime J)) x = 0\n[PROOFSTEP]\nspecialize h J hJ\n[GOAL]\ncase eq_zero.h\nR✝ S : Type u\ninst✝⁶ : CommRing R✝\ninst✝⁵ : CommRing S\nM : Submonoid R✝\nN : Submonoid S\nR' S' : Type u\ninst✝⁴ : CommRing R'\ninst✝³ : CommRing S'\nf : R✝ →+* S\ninst✝² : Algebra R✝ R'\ninst✝¹ : Algebra S S'\nR : Type u_1\ninst✝ : CommRing R\nx : R\nhx : IsNilpotent x\nJ : Ideal R\nhJ : Ideal.IsMaximal J\nh : IsReduced (Localization.AtPrime J)\n⊢ ↑(algebraMap R (Localization.AtPrime J)) x = 0\n[PROOFSTEP]\nexact (hx.map <| algebraMap R <| Localization.AtPrime J).eq_zero\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.LocalizationPreserves fun {R S} x x_1 f => Function.Surjective ↑f\n[PROOFSTEP]\nintrov R H x\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nH : Function.Surjective ↑f\nx : S'\n⊢ ∃ a, ↑(IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))) a = x\n[PROOFSTEP]\nobtain ⟨x, ⟨_, s, hs, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective (M.map f) x\n[GOAL]\ncase intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nH : Function.Surjective ↑f\nx : S\ns : R\nhs : s ∈ ↑M\n⊢ ∃ a,\n    ↑(IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))) a =\n      IsLocalization.mk' S' x { val := ↑f s, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f s) }\n[PROOFSTEP]\nobtain ⟨y, rfl⟩ := H x\n[GOAL]\ncase intro.intro.mk.intro.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nH : Function.Surjective ↑f\ns : R\nhs : s ∈ ↑M\ny : R\n⊢ ∃ a,\n    ↑(IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))) a =\n      IsLocalization.mk' S' (↑f y) { val := ↑f s, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f s) }\n[PROOFSTEP]\nuse IsLocalization.mk' R' y ⟨s, hs⟩\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nH : Function.Surjective ↑f\ns : R\nhs : s ∈ ↑M\ny : R\n⊢ ↑(IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n      (IsLocalization.mk' R' y { val := s, property := hs }) =\n    IsLocalization.mk' S' (↑f y) { val := ↑f s, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f s) }\n[PROOFSTEP]\nrw [IsLocalization.map_mk']\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.OfLocalizationSpan fun {R S} x x_1 f => Function.Surjective ↑f\n[PROOFSTEP]\nintrov R e H\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\nrw [← Set.range_iff_surjective, Set.eq_univ_iff_forall]\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\n⊢ ∀ (x : S), x ∈ Set.range ↑f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\n⊢ ∀ (x : S), x ∈ Set.range ↑f\n[PROOFSTEP]\nintro x\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\n⊢ x ∈ Set.range ↑f\n[PROOFSTEP]\napply Submodule.mem_of_span_eq_top_of_smul_pow_mem (LinearMap.range (Algebra.linearMap R S)) s e\n[GOAL]\ncase H\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\n⊢ ∀ (r : ↑s), ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nintro r\n[GOAL]\ncase H\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nobtain ⟨a, e'⟩ := H r (algebraMap _ _ x)\n[GOAL]\ncase H.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\na : Localization.Away ↑r\ne' : ↑(Localization.awayMap f ↑r) a = ↑(algebraMap S (Localization.Away (↑f ↑r))) x\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nobtain ⟨b, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective (Submonoid.powers (r : R)) a\n[GOAL]\ncase H.intro.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  ↑(Localization.awayMap f ↑r)\n      (IsLocalization.mk' (Localization.Away ↑r) b\n        { val := (fun x x_1 => x ^ x_1) (↑r) n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) }) =\n    ↑(algebraMap S (Localization.Away (↑f ↑r))) x\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nerw [IsLocalization.map_mk'] at e' \n[GOAL]\ncase H.intro.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  IsLocalization.mk' (Localization.Away (↑f ↑r)) (↑f b)\n      {\n        val :=\n          ↑f\n            ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n        property :=\n          (_ :\n            ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                  property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n              Submonoid.comap f (Submonoid.powers (↑f ↑r))) } =\n    ↑(algebraMap S (Localization.Away (↑f ↑r))) x\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nrw [eq_comm, IsLocalization.eq_mk'_iff_mul_eq, Subtype.coe_mk, Subtype.coe_mk, ← map_mul] at e' \n[GOAL]\ncase H.intro.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (x *\n        ↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) }) =\n    ↑(algebraMap ((fun x => S) b) (Localization.Away (↑f ↑r))) (↑f b)\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nobtain ⟨⟨_, n', rfl⟩, e''⟩ := (IsLocalization.eq_iff_exists (Submonoid.powers (f r)) _).mp e'\n[GOAL]\ncase H.intro.intro.intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (x *\n        ↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) }) =\n    ↑(algebraMap ((fun x => S) b) (Localization.Away (↑f ↑r))) (↑f b)\nn' : ℕ\ne'' :\n  ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) n',\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) n') } *\n      (x *\n        ↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) }) =\n    ↑{ val := (fun x x_1 => x ^ x_1) (↑f ↑r) n',\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑f ↑r) y = (fun x x_1 => x ^ x_1) (↑f ↑r) n') } *\n      ↑f b\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\ndsimp only at e'' \n[GOAL]\ncase H.intro.intro.intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (x *\n        ↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) }) =\n    ↑(algebraMap ((fun x => S) b) (Localization.Away (↑f ↑r))) (↑f b)\nn' : ℕ\ne'' : ↑f ↑r ^ n' * (x * ↑f (↑r ^ n)) = ↑f ↑r ^ n' * ↑f b\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nrw [mul_comm x, ← mul_assoc, ← map_pow, ← map_mul, ← map_mul, ← pow_add] at e'' \n[GOAL]\ncase H.intro.intro.intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Set R\ne : Ideal.span s = ⊤\nH :\n  ∀ (r : ↑s),\n    (fun {R S} x x_1 f => Function.Surjective ↑f) Localization.instCommRingLocalizationToCommMonoid\n      Localization.instCommRingLocalizationToCommMonoid (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\nx : S\nr : ↑s\nb : R\nn : ℕ\ne' :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (x *\n        ↑{\n            val :=\n              ↑f\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) },\n            property :=\n              (_ :\n                ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n,\n                      property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n) } ∈\n                  Submonoid.comap f (Submonoid.powers (↑f ↑r))) }) =\n    ↑(algebraMap ((fun x => S) b) (Localization.Away (↑f ↑r))) (↑f b)\nn' : ℕ\ne'' : ↑f (↑r ^ (n' + n)) * x = ↑f (↑r ^ n' * b)\n⊢ ∃ n, ↑r ^ n • x ∈ LinearMap.range (Algebra.linearMap R S)\n[PROOFSTEP]\nexact ⟨n' + n, _, e''.symm⟩\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.LocalizationPreserves @RingHom.Finite\n[PROOFSTEP]\nintrov R hf\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis : Algebra R S := RingHom.toAlgebra f\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := ((algebraMap S S').comp f).toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nlet f' : R' →+* S' := IsLocalization.map S' f (Submonoid.le_comap_map M)\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := f'.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis✝¹ : Algebra R S := RingHom.toAlgebra f\nthis✝ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis : Algebra R' S' := RingHom.toAlgebra f'\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nhaveI : IsScalarTower R R' S' := IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp M.le_comap_map).symm\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nlet fₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') fun c x =>\n    RingHom.map_mul _ _\n      _\n        -- We claim that if `S` is generated by `T` as an `R`-module,\n          -- then `S'` is generated by `T` as an `R'`-module.\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.Finite f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nobtain ⟨T, hT⟩ := hf\n[GOAL]\ncase mk.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\n⊢ RingHom.Finite (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nuse T.image (algebraMap S S')\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\n⊢ Submodule.span R' ↑(Finset.image (↑(algebraMap S S')) T) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\n⊢ ⊤ ≤ Submodule.span R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nrintro x\n  -\n      -- By the hypotheses, for each `x : S'`, we have `x = y / (f r)` for some `y : S` and `r : M`.\n        -- Since `S` is generated by `T`, the image of `y` should fall in the span of the image of `T`.\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\nx : S'\n⊢ x ∈ Submodule.span R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nobtain ⟨y, ⟨_, ⟨r, hr, rfl⟩⟩, rfl⟩ := IsLocalization.mk'_surjective (M.map f) x\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ IsLocalization.mk' S' y { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } ∈\n    Submodule.span R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nrw [IsLocalization.mk'_eq_mul_mk'_one, mul_comm, Finset.coe_image]\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Submodule.span R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nhave hy : y ∈ Submodule.span R ↑T := by rw [hT]; trivial\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ y ∈ Submodule.span R ↑T\n[PROOFSTEP]\nrw [hT]\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ y ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : y ∈ Submodule.span R ↑T\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Submodule.span R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nreplace hy : algebraMap S S' y ∈ Submodule.map fₐ.toLinearMap (Submodule.span R (T : Set S)) :=\n  Submodule.mem_map_of_mem hy\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.map (AlgHom.toLinearMap fₐ) (Submodule.span R ↑T)\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Submodule.span R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nrw [Submodule.map_span fₐ.toLinearMap T] at hy \n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Submodule.span R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nhave H : Submodule.span R (algebraMap S S' '' T) ≤ (Submodule.span R' (algebraMap S S' '' T)).restrictScalars R := by\n  rw [Submodule.span_le]; exact Submodule.subset_span\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\n⊢ Submodule.span R (↑(algebraMap S S') '' ↑T) ≤\n    Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T))\n[PROOFSTEP]\nrw [Submodule.span_le]\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\n⊢ ↑(algebraMap S S') '' ↑T ⊆ ↑(Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T)))\n[PROOFSTEP]\nexact Submodule.subset_span\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\nH :\n  Submodule.span R (↑(algebraMap S S') '' ↑T) ≤\n    Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Submodule.span R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nconvert (Submodule.span R' (algebraMap S S' '' T)).smul_mem (IsLocalization.mk' R' (1 : R) ⟨r, hr⟩) (H hy) using 1\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\nH :\n  Submodule.span R (↑(algebraMap S S') '' ↑T) ≤\n    Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    IsLocalization.mk' R' 1 { val := r, property := hr } • ↑(algebraMap S S') y\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\nH :\n  Submodule.span R (↑(algebraMap S S') '' ↑T) ≤\n    Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    ↑(algebraMap R' S') (IsLocalization.mk' R' 1 { val := r, property := hr }) * ↑(algebraMap S S') y\n[PROOFSTEP]\nerw [IsLocalization.map_mk' M.le_comap_map]\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Submodule.span R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Submodule.span R (↑(AlgHom.toLinearMap fₐ) '' ↑T)\nH :\n  Submodule.span R (↑(algebraMap S S') '' ↑T) ≤\n    Submodule.restrictScalars R (Submodule.span R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    IsLocalization.mk' S' (↑f 1)\n        { val := ↑f ↑{ val := r, property := hr },\n          property := (_ : ↑{ val := r, property := hr } ∈ Submonoid.comap f (Submonoid.map f M)) } *\n      ↑(algebraMap S S') y\n[PROOFSTEP]\nrw [map_one]\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nlet g : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') fun c x => by\n    simp [Algebra.algebraMap_eq_smul_one]\n      -- We first obtain the `y' ∈ M` such that `s' = y' • s` is falls in the image of `S` in `S'`.\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx✝ : S\ns : Finset S'\nhx : ↑(algebraMap S S') x✝ ∈ Submodule.span R ↑s\nc : R\nx : S\n⊢ ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x\n[PROOFSTEP]\nsimp [Algebra.algebraMap_eq_smul_one]\n  -- We first obtain the `y' ∈ M` such that `s' = y' • s` is falls in the image of `S` in `S'`.\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nlet y := IsLocalization.commonDenomOfFinset (M.map (algebraMap R S)) s\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nhave hx₁ : (y : S) • (s : Set S') = g '' _ := (IsLocalization.finsetIntegerMultiple_image _ s).symm\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nobtain ⟨y', hy', e : algebraMap R S y' = y⟩ := y.prop\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nhave : algebraMap R S y' • (s : Set S') = y' • (s : Set S') := by\n  simp_rw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul]\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\n⊢ ↑(algebraMap R S) y' • ↑s = y' • ↑s\n[PROOFSTEP]\nsimp_rw [Algebra.algebraMap_eq_smul_one, smul_assoc, one_smul]\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nrw [← e, this] at hx₁ \n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhx₁ : y' • ↑s = ↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nreplace hx₁ := congr_arg (Submodule.span R) hx₁\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nrw [Submodule.span_smul] at hx₁ \n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Submodule.span R ↑s\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nreplace hx : _ ∈ y' • Submodule.span R (s : Set S') := Set.smul_mem_smul_set hx\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx : y' • ↑(algebraMap S S') x ∈ y' • Submodule.span R ↑s\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nrw [hx₁] at hx \n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx : y' • ↑(algebraMap S S') x ∈ Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nerw [← g.map_smul, ← Submodule.map_span (g : S →ₗ[R] S')] at hx \n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx : ↑g (y' • x) ∈ Submodule.map (↑↑g) (Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nobtain ⟨x', hx', hx'' : algebraMap _ _ _ = _⟩ := hx\n[GOAL]\ncase intro.intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nobtain ⟨⟨_, a, ha₁, rfl⟩, ha₂⟩ := (IsLocalization.eq_iff_exists (M.map (algebraMap R S)) S').mp hx''\n[GOAL]\ncase intro.intro.intro.intro.intro.mk.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ ∃ m, m • x ∈ Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nuse(⟨a, ha₁⟩ : M) * (⟨y', hy'⟩ : M)\n[GOAL]\ncase h\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ ({ val := a, property := ha₁ } * { val := y', property := hy' }) • x ∈\n    Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nconvert\n  (Submodule.span R (IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s : Set S)).smul_mem a\n    hx' using\n  1\n[GOAL]\ncase h.e'_4\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ ({ val := a, property := ha₁ } * { val := y', property := hy' }) • x = a • x'\n[PROOFSTEP]\nconvert ha₂.symm using 1\n[GOAL]\ncase h.e'_2\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ ({ val := a, property := ha₁ } * { val := y', property := hy' }) • x =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n[PROOFSTEP]\nrw [Subtype.coe_mk, Submonoid.smul_def, Submonoid.coe_mul, ← smul_smul]\n[GOAL]\ncase h.e'_2\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ ↑{ val := a, property := ha₁ } • ↑{ val := y', property := hy' } • x = ↑(algebraMap R S) a * y' • x\n[PROOFSTEP]\nexact Algebra.smul_def _ _\n[GOAL]\ncase h.e'_3\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\ng : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S') (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (c • x) = c • ↑(algebraMap S S') x)\ny : { x // x ∈ Submonoid.map (algebraMap R S) M } := commonDenomOfFinset (Submonoid.map (algebraMap R S) M) s\ny' : R\nhy' : y' ∈ ↑M\ne : ↑(algebraMap R S) y' = ↑y\nthis : ↑(algebraMap R S) y' • ↑s = y' • ↑s\nhx₁✝ :\n  Submodule.span R (y' • ↑s) = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx₁ : y' • Submodule.span R ↑s = Submodule.span R (↑g '' ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nx' : S\nhx' : x' ∈ ↑(Submodule.span R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s))\nhx'' : ↑(algebraMap S S') x' = ↑g (y' • x)\na : R\nha₁ : a ∈ ↑M\nha₂ :\n  ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      y' • x\n⊢ a • x' =\n    ↑{ val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } *\n      x'\n[PROOFSTEP]\nexact Algebra.smul_def _ _\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Submodule.span R' s\n⊢ ∃ t, t • x ∈ Submodule.span R s\n[PROOFSTEP]\nobtain ⟨s', hss', hs'⟩ := Submodule.mem_span_finite_of_mem_span hx\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Submodule.span R' s\ns' : Finset S\nhss' : ↑s' ⊆ s\nhs' : x ∈ Submodule.span R' ↑s'\n⊢ ∃ t, t • x ∈ Submodule.span R s\n[PROOFSTEP]\nrsuffices ⟨t, ht⟩ : ∃ t : M, t • x ∈ Submodule.span R (s' : Set S)\n[GOAL]\ncase intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Submodule.span R' s\ns' : Finset S\nhss' : ↑s' ⊆ s\nhs' : x ∈ Submodule.span R' ↑s'\nt : { x // x ∈ M }\nht : t • x ∈ Submodule.span R ↑s'\n⊢ ∃ t, t • x ∈ Submodule.span R s\n[PROOFSTEP]\nexact ⟨t, Submodule.span_mono hss' ht⟩\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Submodule.span R' s\ns' : Finset S\nhss' : ↑s' ⊆ s\nhs' : x ∈ Submodule.span R' ↑s'\n⊢ ∃ t, t • x ∈ Submodule.span R ↑s'\n[PROOFSTEP]\nclear hx hss' s\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\nx : S\ns' : Finset S\nhs' : x ∈ Submodule.span R' ↑s'\n⊢ ∃ t, t • x ∈ Submodule.span R ↑s'\n[PROOFSTEP]\ninduction s' using Finset.induction_on generalizing x\n[GOAL]\ncase empty\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\nx : S\nhs' : x ∈ Submodule.span R' ↑∅\n⊢ ∃ t, t • x ∈ Submodule.span R ↑∅\n[PROOFSTEP]\nuse 1\n[GOAL]\ncase h\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\nx : S\nhs' : x ∈ Submodule.span R' ↑∅\n⊢ 1 • x ∈ Submodule.span R ↑∅\n[PROOFSTEP]\nsimpa using hs'\n[GOAL]\ncase insert\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na✝² : S\ns✝ : Finset S\na✝¹ : ¬a✝² ∈ s✝\na✝ : ∀ (x : S), x ∈ Submodule.span R' ↑s✝ → ∃ t, t • x ∈ Submodule.span R ↑s✝\nx : S\nhs' : x ∈ Submodule.span R' ↑(insert a✝² s✝)\n⊢ ∃ t, t • x ∈ Submodule.span R ↑(insert a✝² s✝)\n[PROOFSTEP]\nrename_i a s _ hs\n[GOAL]\ncase insert\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\nx : S\nhs' : x ∈ Submodule.span R' ↑(insert a s)\n⊢ ∃ t, t • x ∈ Submodule.span R ↑(insert a s)\n[PROOFSTEP]\nsimp only [Finset.coe_insert, Finset.image_insert, Finset.coe_image, Subtype.coe_mk, Submodule.mem_span_insert] at hs' ⊢\n[GOAL]\ncase insert\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\nx : S\nhs' : ∃ a_1 z, z ∈ Submodule.span R' ↑s ∧ x = a_1 • a + z\n⊢ ∃ t a_1 z, z ∈ Submodule.span R ↑s ∧ t • x = a_1 • a + z\n[PROOFSTEP]\nrcases hs' with ⟨y, z, hz, rfl⟩\n[GOAL]\ncase insert.intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\n⊢ ∃ t a_1 z_1, z_1 ∈ Submodule.span R ↑s ∧ t • (y • a + z) = a_1 • a + z_1\n[PROOFSTEP]\nrcases IsLocalization.surj M y with ⟨⟨y', s'⟩, e⟩\n[GOAL]\ncase insert.intro.intro.intro.intro.mk\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne : y * ↑(algebraMap R R') ↑(y', s').snd = ↑(algebraMap R R') (y', s').fst\n⊢ ∃ t a_1 z_1, z_1 ∈ Submodule.span R ↑s ∧ t • (y • a + z) = a_1 • a + z_1\n[PROOFSTEP]\nreplace e : _ * a = _ * a := (congr_arg (fun x => algebraMap R' S x * a) e : _)\n[GOAL]\ncase insert.intro.intro.intro.intro.mk\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne :\n  ↑(algebraMap R' S) (y * ↑(algebraMap R R') ↑(y', s').snd) * a =\n    ↑(algebraMap R' S) (↑(algebraMap R R') (y', s').fst) * a\n⊢ ∃ t a_1 z_1, z_1 ∈ Submodule.span R ↑s ∧ t • (y • a + z) = a_1 • a + z_1\n[PROOFSTEP]\nsimp_rw [RingHom.map_mul, ← IsScalarTower.algebraMap_apply, mul_comm (algebraMap R' S y), mul_assoc, ←\n  Algebra.smul_def] at e \n[GOAL]\ncase insert.intro.intro.intro.intro.mk\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne : ↑s' • y • a = y' • a\n⊢ ∃ t a_1 z_1, z_1 ∈ Submodule.span R ↑s ∧ t • (y • a + z) = a_1 • a + z_1\n[PROOFSTEP]\nrcases hs _ hz with ⟨t, ht⟩\n[GOAL]\ncase insert.intro.intro.intro.intro.mk.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne : ↑s' • y • a = y' • a\nt : { x // x ∈ M }\nht : t • z ∈ Submodule.span R ↑s\n⊢ ∃ t a_1 z_1, z_1 ∈ Submodule.span R ↑s ∧ t • (y • a + z) = a_1 • a + z_1\n[PROOFSTEP]\nrefine' ⟨t * s', t * y', _, (Submodule.span R (s : Set S)).smul_mem s' ht, _⟩\n[GOAL]\ncase insert.intro.intro.intro.intro.mk.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne : ↑s' • y • a = y' • a\nt : { x // x ∈ M }\nht : t • z ∈ Submodule.span R ↑s\n⊢ (t * s') • (y • a + z) = (↑t * y') • a + ↑s' • t • z\n[PROOFSTEP]\nrw [smul_add, ← smul_smul, mul_comm, ← smul_smul, ← smul_smul, ← e]\n[GOAL]\ncase insert.intro.intro.intro.intro.mk.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\na : S\ns : Finset S\na✝ : ¬a ∈ s\nhs : ∀ (x : S), x ∈ Submodule.span R' ↑s → ∃ t, t • x ∈ Submodule.span R ↑s\ny : R'\nz : S\nhz : z ∈ Submodule.span R' ↑s\ny' : R\ns' : { x // x ∈ M }\ne : ↑s' • y • a = y' • a\nt : { x // x ∈ M }\nht : t • z ∈ Submodule.span R ↑s\n⊢ t • s' • y • a + s' • t • z = ↑t • ↑s' • y • a + ↑s' • t • z\n[PROOFSTEP]\nrfl\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Algebra.adjoin R' s\n⊢ ∃ t, t • x ∈ Algebra.adjoin R s\n[PROOFSTEP]\nchange ∃ t : M, t • x ∈ Subalgebra.toSubmodule (Algebra.adjoin R s)\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Algebra.adjoin R' s\n⊢ ∃ t, t • x ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin R s)\n[PROOFSTEP]\nchange x ∈ Subalgebra.toSubmodule (Algebra.adjoin R' s) at hx \n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin R' s)\n⊢ ∃ t, t • x ∈ ↑Subalgebra.toSubmodule (Algebra.adjoin R s)\n[PROOFSTEP]\nsimp_rw [Algebra.adjoin_eq_span] at hx ⊢\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R' S\ninst✝² : Algebra R S\ninst✝¹ : IsScalarTower R R' S\ninst✝ : IsLocalization M R'\ns : Set S\nx : S\nhx : x ∈ Submodule.span R' ↑(Submonoid.closure s)\n⊢ ∃ t, t • x ∈ Submodule.span R ↑(Submonoid.closure s)\n[PROOFSTEP]\nexact multiple_mem_span_of_mem_localization_span M R' _ _ hx\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.OfLocalizationSpan @RingHom.Finite\n[PROOFSTEP]\nrw [RingHom.ofLocalizationSpan_iff_finite]\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.OfLocalizationFiniteSpan @RingHom.Finite\n[PROOFSTEP]\nintrov R hs H\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\n⊢ RingHom.Finite f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\n⊢ RingHom.Finite f\n[PROOFSTEP]\nletI := fun r : s => (Localization.awayMap f r).toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\n⊢ RingHom.Finite f\n[PROOFSTEP]\nhave : ∀ r : s, IsLocalization ((Submonoid.powers (r : R)).map (algebraMap R S)) (Localization.Away (f r)) := by\n  intro r; rw [Submonoid.map_powers]; exact Localization.isLocalization\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\n⊢ ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nintro r\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nr : { x // x ∈ s }\n⊢ IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nrw [Submonoid.map_powers]\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nr : { x // x ∈ s }\n⊢ IsLocalization (Submonoid.powers (↑(algebraMap R S) ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nexact Localization.isLocalization\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝¹ : Algebra R S := RingHom.toAlgebra f\nthis✝ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n⊢ RingHom.Finite f\n[PROOFSTEP]\nhaveI : ∀ r : s, IsScalarTower R (Localization.Away (r : R)) (Localization.Away (f r)) := fun r =>\n  IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp (Submonoid.powers (r : R)).le_comap_map).symm\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\n⊢ RingHom.Finite f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.Finite (Localization.awayMap f ↑r)\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\n⊢ Submodule.FG ⊤\n[PROOFSTEP]\nreplace H := fun r => (H r).1\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\nH : ∀ (r : { x // x ∈ s }), Submodule.FG ⊤\n⊢ Submodule.FG ⊤\n[PROOFSTEP]\nchoose s₁ s₂ using H\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\n⊢ Submodule.FG ⊤\n[PROOFSTEP]\nlet sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (f x)) (s₁ x)\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ Submodule.FG ⊤\n[PROOFSTEP]\nuse s.attach.biUnion sf\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ Submodule.span R ↑(Finset.biUnion (Finset.attach s) sf) = ⊤\n[PROOFSTEP]\nrw [Submodule.span_attach_biUnion, eq_top_iff]\n  -- It suffices to show that `r ^ n • x ∈ span T` for each `r : s`, since `{ r ^ n }` spans `R`.\n    -- This then follows from the fact that each `x : R` is a linear combination of the generating set\n    -- of `Sᵣ`. By multiplying a sufficiently large power of `r`, we can cancel out the `r`s in the\n    -- denominators of both the generating set and the coefficients.\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ ⊤ ≤ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\n⊢ x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\napply Submodule.mem_of_span_eq_top_of_smul_pow_mem _ (s : Set R) hs _ _\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\n⊢ ∀ (r : ↑↑s), ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nintro r\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nobtain ⟨⟨_, n₁, rfl⟩, hn₁⟩ :=\n  multiple_mem_span_of_mem_localization_span (Submonoid.powers (r : R)) (Localization.Away (r : R))\n    (s₁ r : Set (Localization.Away (f r))) (algebraMap S _ x) (by rw [s₂ r]; trivial)\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈ Submodule.span (Localization.Away ↑r) ↑(s₁ r)\n[PROOFSTEP]\nrw [s₂ r]\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  { val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n        property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } •\n      ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈\n    Submodule.span R ↑(s₁ r)\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\ndsimp only at hn₁ \n[GOAL]\ncase intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  { val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } • ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈\n    Submodule.span R ↑(s₁ r)\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nrw [Submonoid.smul_def, Algebra.smul_def, IsScalarTower.algebraMap_apply R S, ← map_mul] at hn₁ \n[GOAL]\ncase intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R ↑(s₁ r)\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nobtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ :=\n  IsLocalization.smul_mem_finsetIntegerMultiple_span (Submonoid.powers (r : R)) (Localization.Away (f r)) _ (s₁ r) hn₁\n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  { val := (fun x x_1 => x ^ x_1) (↑r) n₂,\n        property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₂) } •\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R\n      ↑(IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nrw [Submonoid.smul_def, ← Algebra.smul_def, smul_smul, Subtype.coe_mk, ← pow_add] at hn₂ \n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Submodule.span R\n      ↑(IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nsimp_rw [Submonoid.map_powers] at hn₂ \n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Submodule.span R ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑(algebraMap R S) ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nuse n₂ + n₁\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Submodule.span (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S) ↑{ val := ↑r ^ n₁, property := (_ : ∃ y, ↑r ^ y = ↑r ^ n₁) } * x) ∈\n    Submodule.span R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Submodule.span R ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑(algebraMap R S) ↑r)) (s₁ r))\n⊢ ↑r ^ (n₂ + n₁) • x ∈ ⨆ (x : { x // x ∈ s }), Submodule.span R ↑(sf x)\n[PROOFSTEP]\nexact le_iSup (fun x : s => Submodule.span R (sf x : Set S)) r hn₂\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.LocalizationPreserves @RingHom.FiniteType\n[PROOFSTEP]\nintrov R hf\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis : Algebra R S := RingHom.toAlgebra f\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := ((algebraMap S S').comp f).toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nlet f' : R' →+* S' := IsLocalization.map S' f (Submonoid.le_comap_map M)\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nletI := f'.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝¹ : Algebra R S := RingHom.toAlgebra f\nthis✝ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis : Algebra R' S' := RingHom.toAlgebra f'\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nhaveI : IsScalarTower R R' S' := IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp M.le_comap_map).symm\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nlet fₐ : S →ₐ[R] S' := AlgHom.mk' (algebraMap S S') fun c x => RingHom.map_mul _ _ _\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nobtain ⟨T, hT⟩ := id hf\n[GOAL]\ncase mk.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\n⊢ RingHom.FiniteType (IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M)))\n[PROOFSTEP]\nuse T.image (algebraMap S S')\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\n⊢ Algebra.adjoin R' ↑(Finset.image (↑(algebraMap S S')) T) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\n⊢ ⊤ ≤ Algebra.adjoin R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\nx : S'\n⊢ x ∈ Algebra.adjoin R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nobtain ⟨y, ⟨_, ⟨r, hr, rfl⟩⟩, rfl⟩ := IsLocalization.mk'_surjective (M.map f) x\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ IsLocalization.mk' S' y { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } ∈\n    Algebra.adjoin R' ↑(Finset.image (↑(algebraMap S S')) T)\n[PROOFSTEP]\nrw [IsLocalization.mk'_eq_mul_mk'_one, mul_comm, Finset.coe_image]\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nhave hy : y ∈ Algebra.adjoin R (T : Set S) := by rw [hT]; trivial\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ y ∈ Algebra.adjoin R ↑T\n[PROOFSTEP]\nrw [hT]\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\n⊢ y ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : y ∈ Algebra.adjoin R ↑T\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nreplace hy : algebraMap S S' y ∈ (Algebra.adjoin R (T : Set S)).map fₐ := Subalgebra.mem_map.mpr ⟨_, hy, rfl⟩\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Subalgebra.map fₐ (Algebra.adjoin R ↑T)\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nrw [fₐ.map_adjoin T] at hy \n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nhave H : Algebra.adjoin R (algebraMap S S' '' T) ≤ (Algebra.adjoin R' (algebraMap S S' '' T)).restrictScalars R := by\n  rw [Algebra.adjoin_le_iff]; exact Algebra.subset_adjoin\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\n⊢ Algebra.adjoin R (↑(algebraMap S S') '' ↑T) ≤\n    Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T))\n[PROOFSTEP]\nrw [Algebra.adjoin_le_iff]\n[GOAL]\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\n⊢ ↑(algebraMap S S') '' ↑T ⊆ ↑(Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)))\n[PROOFSTEP]\nexact Algebra.subset_adjoin\n[GOAL]\ncase h.intro.intro.mk.intro.intro\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\nH :\n  Algebra.adjoin R (↑(algebraMap S S') '' ↑T) ≤\n    Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y ∈\n    Algebra.adjoin R' (↑(algebraMap S S') '' ↑T)\n[PROOFSTEP]\nconvert (Algebra.adjoin R' (algebraMap S S' '' T)).smul_mem (H hy) (IsLocalization.mk' R' (1 : R) ⟨r, hr⟩) using 1\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\nH :\n  Algebra.adjoin R (↑(algebraMap S S') '' ↑T) ≤\n    Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    IsLocalization.mk' R' 1 { val := r, property := hr } • ↑(algebraMap S S') y\n[PROOFSTEP]\nrw [Algebra.smul_def]\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\nH :\n  Algebra.adjoin R (↑(algebraMap S S') '' ↑T) ≤\n    Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    ↑(algebraMap R' S') (IsLocalization.mk' R' 1 { val := r, property := hr }) * ↑(algebraMap S S') y\n[PROOFSTEP]\nerw [IsLocalization.map_mk' M.le_comap_map]\n[GOAL]\ncase h.e'_4\nR✝ S✝ : Type u\ninst✝¹³ : CommRing R✝\ninst✝¹² : CommRing S✝\nM✝ : Submonoid R✝\nN : Submonoid S✝\nR'✝ S'✝ : Type u\ninst✝¹¹ : CommRing R'✝\ninst✝¹⁰ : CommRing S'✝\nf✝ : R✝ →+* S✝\ninst✝⁹ : Algebra R✝ R'✝\ninst✝⁸ : Algebra S✝ S'✝\nR S : Type u_1\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nf : R →+* S\nM : Submonoid R\nR' S' : Type u_1\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\ninst✝³ : Algebra R R'\ninst✝² : Algebra S S'\ninst✝¹ : IsLocalization M R'\ninst✝ : IsLocalization (Submonoid.map f M) S'\nhf : RingHom.FiniteType f\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : Algebra R S' := RingHom.toAlgebra (RingHom.comp (algebraMap S S') f)\nf' : R' →+* S' := IsLocalization.map S' f (_ : M ≤ Submonoid.comap f (Submonoid.map f M))\nthis✝ : Algebra R' S' := RingHom.toAlgebra f'\nthis : IsScalarTower R R' S'\nfₐ : S →ₐ[R] S' :=\n  AlgHom.mk' (algebraMap S S')\n    (_ : ∀ (c : R) (x : S), ↑(algebraMap S S') (↑f c * x) = ↑(algebraMap S S') (↑f c) * ↑(algebraMap S S') x)\nT : Finset S\nhT : Algebra.adjoin R ↑T = ⊤\ny : S\nr : R\nhr : r ∈ ↑M\nhy : ↑(algebraMap S S') y ∈ Algebra.adjoin R (↑fₐ '' ↑T)\nH :\n  Algebra.adjoin R (↑(algebraMap S S') '' ↑T) ≤\n    Subalgebra.restrictScalars R (Algebra.adjoin R' (↑(algebraMap S S') '' ↑T))\n⊢ IsLocalization.mk' S' 1 { val := ↑f r, property := (_ : ∃ a, a ∈ ↑M ∧ ↑f a = ↑f r) } * ↑(algebraMap S S') y =\n    IsLocalization.mk' S' (↑f 1)\n        { val := ↑f ↑{ val := r, property := hr },\n          property := (_ : ↑{ val := r, property := hr } ∈ Submonoid.comap f (Submonoid.map f M)) } *\n      ↑(algebraMap S S') y\n[PROOFSTEP]\nrw [map_one]\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nlet g : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nlet y := IsLocalization.commonDenomOfFinset M s\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nhave hx₁ : (y : S) • (s : Set S') = g '' _ := (IsLocalization.finsetIntegerMultiple_image _ s).symm\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nobtain ⟨n, hn⟩ :=\n  Algebra.pow_smul_mem_of_smul_subset_of_mem_adjoin (y : S) (s : Set S') (A.map g)\n    (by rw [hx₁]; exact Set.image_subset _ hA₁) hx (Set.mem_image_of_mem _ (hA₂ y.2))\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\n⊢ ↑y • ↑s ⊆ ↑(Subalgebra.map g A)\n[PROOFSTEP]\nrw [hx₁]\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\n⊢ ↑g '' ↑(finsetIntegerMultiple M s) ⊆ ↑(Subalgebra.map g A)\n[PROOFSTEP]\nexact Set.image_subset _ hA₁\n[GOAL]\ncase intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nobtain ⟨x', hx', hx''⟩ := hn n (le_of_eq rfl)\n[GOAL]\ncase intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\nx' : S\nhx' : x' ∈ ↑A.toSubsemiring\nhx'' : ↑↑g x' = ↑y ^ n • ↑(algebraMap S S') x\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nrw [Algebra.smul_def, ← _root_.map_mul] at hx'' \n[GOAL]\ncase intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\nx' : S\nhx' : x' ∈ ↑A.toSubsemiring\nhx'' : ↑↑g x' = ↑(algebraMap S S') (↑y ^ n * x)\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nobtain ⟨a, ha₂⟩ := (IsLocalization.eq_iff_exists M S').mp hx''\n[GOAL]\ncase intro.intro.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\nx' : S\nhx' : x' ∈ ↑A.toSubsemiring\nhx'' : ↑↑g x' = ↑(algebraMap S S') (↑y ^ n * x)\na : { x // x ∈ M }\nha₂ : ↑a * x' = ↑a * (↑y ^ n * x)\n⊢ ∃ m, m • x ∈ A\n[PROOFSTEP]\nuse a * y ^ n\n[GOAL]\ncase h\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\nx' : S\nhx' : x' ∈ ↑A.toSubsemiring\nhx'' : ↑↑g x' = ↑(algebraMap S S') (↑y ^ n * x)\na : { x // x ∈ M }\nha₂ : ↑a * x' = ↑a * (↑y ^ n * x)\n⊢ (a * y ^ n) • x ∈ A\n[PROOFSTEP]\nconvert A.mul_mem hx' (hA₂ a.prop) using 1\n[GOAL]\ncase h.e'_4\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM✝ : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\nM : Submonoid S\ninst✝ : IsLocalization M S'\nx : S\ns : Finset S'\nA : Subalgebra R S\nhA₁ : ↑(finsetIntegerMultiple M s) ⊆ ↑A\nhA₂ : M ≤ A.toSubmonoid\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\ng : S →ₐ[R] S' := IsScalarTower.toAlgHom R S S'\ny : { x // x ∈ M } := commonDenomOfFinset M s\nhx₁ : ↑y • ↑s = ↑g '' ↑(finsetIntegerMultiple M s)\nn : ℕ\nhn : ∀ (n_1 : ℕ), n_1 ≥ n → ↑y ^ n_1 • ↑(algebraMap S S') x ∈ Subalgebra.map g A\nx' : S\nhx' : x' ∈ ↑A.toSubsemiring\nhx'' : ↑↑g x' = ↑(algebraMap S S') (↑y ^ n * x)\na : { x // x ∈ M }\nha₂ : ↑a * x' = ↑a * (↑y ^ n * x)\n⊢ (a * y ^ n) • x = x' * ↑a\n[PROOFSTEP]\nrw [Submonoid.smul_def, smul_eq_mul, Submonoid.coe_mul, SubmonoidClass.coe_pow, mul_assoc, ← ha₂, mul_comm]\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\n⊢ ∃ m, m • x ∈ Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nobtain ⟨⟨_, a, ha, rfl⟩, e⟩ :=\n  IsLocalization.exists_smul_mem_of_mem_adjoin (M.map (algebraMap R S)) x s (Algebra.adjoin R _) Algebra.subset_adjoin\n    (by rintro _ ⟨a, _, rfl⟩; exact Subalgebra.algebraMap_mem _ a) hx\n[GOAL]\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\n⊢ Submonoid.map (algebraMap R S) M ≤\n    (Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)).toSubsemiring.toSubmonoid\n[PROOFSTEP]\nrintro _ ⟨a, _, rfl⟩\n[GOAL]\ncase intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\na : R\nleft✝ : a ∈ ↑M\n⊢ ↑(algebraMap R S) a ∈\n    (Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)).toSubsemiring.toSubmonoid\n[PROOFSTEP]\nexact Subalgebra.algebraMap_mem _ a\n[GOAL]\ncase intro.mk.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\na : R\nha : a ∈ ↑M\ne :\n  { val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } • x ∈\n    Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n⊢ ∃ m, m • x ∈ Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nrefine' ⟨⟨a, ha⟩, _⟩\n[GOAL]\ncase intro.mk.intro.intro\nR S : Type u\ninst✝⁹ : CommRing R\ninst✝⁸ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝⁷ : CommRing R'\ninst✝⁶ : CommRing S'\nf : R →+* S\ninst✝⁵ : Algebra R R'\ninst✝⁴ : Algebra S S'\ninst✝³ : Algebra R S\ninst✝² : Algebra R S'\ninst✝¹ : IsScalarTower R S S'\ninst✝ : IsLocalization (Submonoid.map (algebraMap R S) M) S'\nx : S\ns : Finset S'\nhx : ↑(algebraMap S S') x ∈ Algebra.adjoin R ↑s\na : R\nha : a ∈ ↑M\ne :\n  { val := ↑(algebraMap R S) a, property := (_ : ∃ a_1, a_1 ∈ ↑M ∧ ↑(algebraMap R S) a_1 = ↑(algebraMap R S) a) } • x ∈\n    Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n⊢ { val := a, property := ha } • x ∈ Algebra.adjoin R ↑(finsetIntegerMultiple (Submonoid.map (algebraMap R S) M) s)\n[PROOFSTEP]\nsimpa only [Submonoid.smul_def, algebraMap_smul] using e\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.OfLocalizationSpan @RingHom.FiniteType\n[PROOFSTEP]\nrw [RingHom.ofLocalizationSpan_iff_finite]\n[GOAL]\nR S : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid R\nN : Submonoid S\nR' S' : Type u\ninst✝³ : CommRing R'\ninst✝² : CommRing S'\nf : R →+* S\ninst✝¹ : Algebra R R'\ninst✝ : Algebra S S'\n⊢ RingHom.OfLocalizationFiniteSpan @RingHom.FiniteType\n[PROOFSTEP]\nintrov R hs H\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\n⊢ RingHom.FiniteType f\n[PROOFSTEP]\nletI := f.toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis : Algebra R S := RingHom.toAlgebra f\n⊢ RingHom.FiniteType f\n[PROOFSTEP]\nletI := fun r : s => (Localization.awayMap f r).toAlgebra\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\n⊢ RingHom.FiniteType f\n[PROOFSTEP]\nhave : ∀ r : s, IsLocalization ((Submonoid.powers (r : R)).map (algebraMap R S)) (Localization.Away (f r)) := by\n  intro r; rw [Submonoid.map_powers]; exact Localization.isLocalization\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\n⊢ ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nintro r\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nr : { x // x ∈ s }\n⊢ IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nrw [Submonoid.map_powers]\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝ : Algebra R S := RingHom.toAlgebra f\nthis : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nr : { x // x ∈ s }\n⊢ IsLocalization (Submonoid.powers (↑(algebraMap R S) ↑r)) (Localization.Away (↑f ↑r))\n[PROOFSTEP]\nexact Localization.isLocalization\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝¹ : Algebra R S := RingHom.toAlgebra f\nthis✝ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\n⊢ RingHom.FiniteType f\n[PROOFSTEP]\nhaveI : ∀ r : s, IsScalarTower R (Localization.Away (r : R)) (Localization.Away (f r)) := fun r =>\n  IsScalarTower.of_algebraMap_eq' (IsLocalization.map_comp (Submonoid.powers (r : R)).le_comap_map).symm\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\n⊢ RingHom.FiniteType f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nH : ∀ (r : { x // x ∈ s }), RingHom.FiniteType (Localization.awayMap f ↑r)\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nreplace H := fun r => (H r).1\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\nH : ∀ (r : { x // x ∈ s }), Subalgebra.FG ⊤\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nchoose s₁ s₂ using H\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nlet sf := fun x : s => IsLocalization.finsetIntegerMultiple (Submonoid.powers (f x)) (s₁ x)\n[GOAL]\ncase out\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ Subalgebra.FG ⊤\n[PROOFSTEP]\nuse s.attach.biUnion sf\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ Algebra.adjoin R ↑(Finset.biUnion (Finset.attach s) sf) = ⊤\n[PROOFSTEP]\nconvert (Algebra.adjoin_attach_biUnion (R := R) sf).trans _\n[GOAL]\ncase h.convert_2\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ ⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff]\n[GOAL]\ncase h.convert_2\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\n⊢ ⊤ ≤ ⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x)\n[PROOFSTEP]\nrintro x -\n[GOAL]\ncase h.convert_2\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\n⊢ x ∈ ⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x)\n[PROOFSTEP]\napply (⨆ x : s, Algebra.adjoin R (sf x : Set S)).toSubmodule.mem_of_span_eq_top_of_smul_pow_mem _ hs _ _\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\n⊢ ∀ (r : ↑↑s), ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nintro r\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nobtain ⟨⟨_, n₁, rfl⟩, hn₁⟩ :=\n  multiple_mem_adjoin_of_mem_localization_adjoin (Submonoid.powers (r : R)) (Localization.Away (r : R))\n    (s₁ r : Set (Localization.Away (f r))) (algebraMap S (Localization.Away (f r)) x) (by rw [s₂ r]; trivial)\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈ Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r)\n[PROOFSTEP]\nrw [s₂ r]\n[GOAL]\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\n⊢ ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  { val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n        property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } •\n      ↑(algebraMap S (Localization.Away (↑f ↑r))) x ∈\n    Algebra.adjoin R ↑(s₁ r)\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nrw [Submonoid.smul_def, Algebra.smul_def, IsScalarTower.algebraMap_apply R S, ← map_mul] at hn₁ \n[GOAL]\ncase intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R ↑(s₁ r)\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nobtain ⟨⟨_, n₂, rfl⟩, hn₂⟩ :=\n  IsLocalization.lift_mem_adjoin_finsetIntegerMultiple (Submonoid.powers (r : R)) _ (s₁ r) hn₁\n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  { val := (fun x x_1 => x ^ x_1) (↑r) n₂,\n        property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₂) } •\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R\n      ↑(IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nrw [Submonoid.smul_def, ← Algebra.smul_def, smul_smul, Subtype.coe_mk, ← pow_add] at hn₂ \n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Algebra.adjoin R\n      ↑(IsLocalization.finsetIntegerMultiple (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nsimp_rw [Submonoid.map_powers] at hn₂ \n[GOAL]\ncase intro.mk.intro.intro.mk.intro\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Algebra.adjoin R ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑(algebraMap R S) ↑r)) (s₁ r))\n⊢ ∃ n, ↑r ^ n • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nuse n₂ + n₁\n[GOAL]\ncase h\nR✝ S✝ : Type u\ninst✝⁷ : CommRing R✝\ninst✝⁶ : CommRing S✝\nM : Submonoid R✝\nN : Submonoid S✝\nR' S' : Type u\ninst✝⁵ : CommRing R'\ninst✝⁴ : CommRing S'\nf✝ : R✝ →+* S✝\ninst✝³ : Algebra R✝ R'\ninst✝² : Algebra S✝ S'\nR S : Type u_1\ninst✝¹ : CommRing R\ninst✝ : CommRing S\nf : R →+* S\ns : Finset R\nhs : Ideal.span ↑s = ⊤\nthis✝² : Algebra R S := RingHom.toAlgebra f\nthis✝¹ : (r : { x // x ∈ s }) → Algebra (Localization.Away ↑r) (Localization.Away (↑f ↑r)) :=\n  fun r => RingHom.toAlgebra (Localization.awayMap f ↑r)\nthis✝ :\n  ∀ (r : { x // x ∈ s }),\n    IsLocalization (Submonoid.map (algebraMap R S) (Submonoid.powers ↑r)) (Localization.Away (↑f ↑r))\nthis : ∀ (r : { x // x ∈ s }), IsScalarTower R (Localization.Away ↑r) (Localization.Away (↑f ↑r))\ns₁ : (r : { x // x ∈ s }) → Finset (Localization.Away (↑f ↑r))\ns₂ : ∀ (r : { x // x ∈ s }), Algebra.adjoin (Localization.Away ↑r) ↑(s₁ r) = ⊤\nsf : (x : { x // x ∈ s }) → Finset ((fun x => S) ↑x) :=\n  fun x => IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑f ↑x)) (s₁ x)\nx : S\nr : ↑↑s\nn₁ : ℕ\nhn₁ :\n  ↑(algebraMap S (Localization.Away (↑f ↑r)))\n      (↑(algebraMap R S)\n          ↑{ val := (fun x x_1 => x ^ x_1) (↑r) n₁,\n              property := (_ : ∃ y, (fun x x_1 => x ^ x_1) (↑r) y = (fun x x_1 => x ^ x_1) (↑r) n₁) } *\n        x) ∈\n    Algebra.adjoin R ↑(s₁ r)\nn₂ : ℕ\nhn₂ :\n  ↑r ^ (n₂ + n₁) • x ∈\n    Algebra.adjoin R ↑(IsLocalization.finsetIntegerMultiple (Submonoid.powers (↑(algebraMap R S) ↑r)) (s₁ r))\n⊢ ↑r ^ (n₂ + n₁) • x ∈ ↑Subalgebra.toSubmodule (⨆ (x : { x // x ∈ s }), Algebra.adjoin R ↑(sf x))\n[PROOFSTEP]\nexact le_iSup (fun x : s => Algebra.adjoin R (sf x : Set S)) r hn₂\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.LocalProperties", "llama_tokens": 120518, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5660185351961015, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.2763774521659273}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\np : ι → Prop\ns : ι → Set (α × α)\nh : HasBasis (𝓤 α) p s\nf : Filter α\n⊢ (∀ (i' : ι), p i' → ∃ i, i ∈ f ∧ id i ×ˢ id i ⊆ s i') ↔\n    ∀ (i : ι), p i → ∃ t, t ∈ f ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (x, y) ∈ s i\n[PROOFSTEP]\nsimp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, ball_mem_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\n⊢ (NeBot f ∧ ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ ∀ (x : α), x ∈ t → ∀ (y : α), y ∈ t → (x, y) ∈ s) ↔\n    NeBot f ∧ ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s\n[PROOFSTEP]\nsimp only [subset_def, Prod.forall, mem_prod_eq, and_imp, id, ball_mem_comm]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nl : Filter α\nh : Cauchy l\n⊢ Cauchy ↑(Ultrafilter.of l)\n[PROOFSTEP]\nhaveI := h.1\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nl : Filter α\nh : Cauchy l\nthis : NeBot l\n⊢ Cauchy ↑(Ultrafilter.of l)\n[PROOFSTEP]\nhave := Ultrafilter.of_le l\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nl : Filter α\nh : Cauchy l\nthis✝ : NeBot l\nthis : ↑(Ultrafilter.of l) ≤ l\n⊢ Cauchy ↑(Ultrafilter.of l)\n[PROOFSTEP]\nexact ⟨Ultrafilter.neBot _, (Filter.prod_mono this this).trans h.2⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nl : Filter β\nf : β → α\n⊢ Cauchy (map f l) ↔ NeBot l ∧ Tendsto (fun p => (f p.fst, f p.snd)) (l ×ˢ l) (𝓤 α)\n[PROOFSTEP]\nrw [Cauchy, map_neBot_iff, prod_map_map_eq, Tendsto]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : Filter α\ng : Filter β\nhf : Cauchy f\nhg : Cauchy g\n⊢ Cauchy (f ×ˢ g)\n[PROOFSTEP]\nrefine' ⟨hf.1.prod hg.1, _⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : Filter α\ng : Filter β\nhf : Cauchy f\nhg : Cauchy g\n⊢ (f ×ˢ g) ×ˢ f ×ˢ g ≤ 𝓤 (α × β)\n[PROOFSTEP]\nsimp only [uniformity_prod, le_inf_iff, ← map_le_iff_le_comap, ← prod_map_map_eq]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : Filter α\ng : Filter β\nhf : Cauchy f\nhg : Cauchy g\n⊢ map Prod.fst (f ×ˢ g) ×ˢ map Prod.fst (f ×ˢ g) ≤ 𝓤 α ∧ map Prod.snd (f ×ˢ g) ×ˢ map Prod.snd (f ×ˢ g) ≤ 𝓤 β\n[PROOFSTEP]\nexact ⟨le_trans (prod_mono tendsto_fst tendsto_fst) hf.2, le_trans (prod_mono tendsto_snd tendsto_snd) hg.2⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nadhs : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\n⊢ f ≤ 𝓝 x\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nadhs : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\ns : Set α\nhs : s ∈ 𝓝 x\n⊢ s ∈ f\n[PROOFSTEP]\nrcases comp_mem_uniformity_sets (mem_nhds_uniformity_iff_right.1 hs) with\n  ⟨U, U_mem, hU⟩\n    -- Take a set `t ∈ f`, `t × t ⊆ U`, and a point `y ∈ t` such that `(x, y) ∈ U`\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nadhs : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\ns : Set α\nhs : s ∈ 𝓝 x\nU : Set (α × α)\nU_mem : U ∈ 𝓤 α\nhU : U ○ U ⊆ {p | p.fst = x → p.snd ∈ s}\n⊢ s ∈ f\n[PROOFSTEP]\nrcases adhs U U_mem with ⟨t, t_mem, ht, y, hxy, hy⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nadhs : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\ns : Set α\nhs : s ∈ 𝓝 x\nU : Set (α × α)\nU_mem : U ∈ 𝓤 α\nhU : U ○ U ⊆ {p | p.fst = x → p.snd ∈ s}\nt : Set α\nt_mem : t ∈ f\nht : t ×ˢ t ⊆ U\ny : α\nhxy : (x, y) ∈ U\nhy : y ∈ t\n⊢ s ∈ f\n[PROOFSTEP]\napply mem_of_superset t_mem\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nadhs : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\ns : Set α\nhs : s ∈ 𝓝 x\nU : Set (α × α)\nU_mem : U ∈ 𝓤 α\nhU : U ○ U ⊆ {p | p.fst = x → p.snd ∈ s}\nt : Set α\nt_mem : t ∈ f\nht : t ×ˢ t ⊆ U\ny : α\nhxy : (x, y) ∈ U\nhy : y ∈ t\n⊢ t ⊆ s\n[PROOFSTEP]\nexact fun z hz => hU (prod_mk_mem_compRel hxy (ht <| mk_mem_prod hy hz)) rfl\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nhf : Cauchy f\nadhs : ClusterPt x f\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nobtain ⟨t, t_mem, ht⟩ : ∃ t ∈ f, t ×ˢ t ⊆ s := (cauchy_iff.1 hf).2 s hs\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nhf : Cauchy f\nadhs : ClusterPt x f\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set α\nt_mem : t ∈ f\nht : t ×ˢ t ⊆ s\n⊢ ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (x, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nuse t, t_mem, ht\n[GOAL]\ncase right\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nx : α\nhf : Cauchy f\nadhs : ClusterPt x f\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nt : Set α\nt_mem : t ∈ f\nht : t ×ˢ t ⊆ s\n⊢ ∃ y, (x, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nexact forall_mem_nonempty_iff_neBot.2 adhs _ (inter_mem_inf (mem_nhds_left x hs) t_mem)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : SemilatticeSup β\nu : β → α\nh : CauchySeq u\n⊢ Tendsto (Prod.map u u) atTop (𝓤 α)\n[PROOFSTEP]\nsimpa only [Tendsto, prod_map_map_eq', prod_atTop_atTop_eq] using h.right\n[GOAL]\nα : Type u\nβ✝ : Type v\ninst✝¹ : UniformSpace α\nβ : Type u_1\ninst✝ : SemilatticeSup β\nu : β → α\nh : CauchySeq u\nV : Set (α × α)\nhV : V ∈ 𝓤 α\n⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V\n[PROOFSTEP]\nhaveI := h.nonempty\n[GOAL]\nα : Type u\nβ✝ : Type v\ninst✝¹ : UniformSpace α\nβ : Type u_1\ninst✝ : SemilatticeSup β\nu : β → α\nh : CauchySeq u\nV : Set (α × α)\nhV : V ∈ 𝓤 α\nthis : Nonempty β\n⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V\n[PROOFSTEP]\nhave := h.tendsto_uniformity\n[GOAL]\nα : Type u\nβ✝ : Type v\ninst✝¹ : UniformSpace α\nβ : Type u_1\ninst✝ : SemilatticeSup β\nu : β → α\nh : CauchySeq u\nV : Set (α × α)\nhV : V ∈ 𝓤 α\nthis✝ : Nonempty β\nthis : Tendsto (Prod.map u u) atTop (𝓤 α)\n⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V\n[PROOFSTEP]\nrw [← prod_atTop_atTop_eq] at this \n[GOAL]\nα : Type u\nβ✝ : Type v\ninst✝¹ : UniformSpace α\nβ : Type u_1\ninst✝ : SemilatticeSup β\nu : β → α\nh : CauchySeq u\nV : Set (α × α)\nhV : V ∈ 𝓤 α\nthis✝ : Nonempty β\nthis : Tendsto (Prod.map u u) (atTop ×ˢ atTop) (𝓤 α)\n⊢ ∃ k₀, ∀ (i j : β), k₀ ≤ i → k₀ ≤ j → (u i, u j) ∈ V\n[PROOFSTEP]\nsimpa [MapsTo] using atTop_basis.prod_self.tendsto_left_iff.1 this V hV\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\n⊢ Tendsto (fun p => (u p.fst, u p.snd)) (atTop ×ˢ atTop) (𝓤 α) ↔ Tendsto (Prod.map u u) atTop (𝓤 α)\n[PROOFSTEP]\nsimp only [prod_atTop_atTop_eq, Prod.map_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : ℕ → ℕ\nhf : Bijective f\nu : ℕ → α\n⊢ CauchySeq (u ∘ f) ↔ CauchySeq u\n[PROOFSTEP]\nrefine' ⟨fun H => _, fun H => H.comp_injective hf.injective⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : ℕ → ℕ\nhf : Bijective f\nu : ℕ → α\nH : CauchySeq (u ∘ f)\n⊢ CauchySeq u\n[PROOFSTEP]\nlift f to ℕ ≃ ℕ using hf\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nu : ℕ → α\nf : ℕ ≃ ℕ\nH : CauchySeq (u ∘ ↑f)\n⊢ CauchySeq u\n[PROOFSTEP]\nsimpa only [(· ∘ ·), f.apply_symm_apply] using H.comp_injective f.symm.injective\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : CauchySeq u\nf g : ℕ → ℕ\nhf : Tendsto f atTop atTop\nhg : Tendsto g atTop atTop\n⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), ((u ∘ f ∘ φ) n, (u ∘ g ∘ φ) n) ∈ V n\n[PROOFSTEP]\nrw [cauchySeq_iff_tendsto] at hu \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : Tendsto (Prod.map u u) atTop (𝓤 α)\nf g : ℕ → ℕ\nhf : Tendsto f atTop atTop\nhg : Tendsto g atTop atTop\n⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), ((u ∘ f ∘ φ) n, (u ∘ g ∘ φ) n) ∈ V n\n[PROOFSTEP]\nexact ((hu.comp <| hf.prod_atTop hg).comp tendsto_atTop_diagonal).subseq_mem hV\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nu : ℕ → α\n⊢ CauchySeq u ↔ ∀ (V : Set (α × α)), V ∈ 𝓤 α → ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V\n[PROOFSTEP]\nsimp only [cauchySeq_iff', Filter.eventually_atTop_prod_self', mem_preimage, Prod_map]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : UniformSpace α\nγ : Type u_1\nδ : Type u_2\ninst✝² : UniformSpace β\ninst✝¹ : SemilatticeSup γ\ninst✝ : SemilatticeSup δ\nu : γ → α\nv : δ → β\nhu : CauchySeq u\nhv : CauchySeq v\n⊢ CauchySeq (Prod.map u v)\n[PROOFSTEP]\nsimpa only [CauchySeq, prod_map_map_eq', prod_atTop_atTop_eq] using hu.prod hv\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : CauchySeq u\n⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n\n[PROOFSTEP]\nhave : ∀ n, ∃ N, ∀ k ≥ N, ∀ l ≥ k, (u l, u k) ∈ V n := fun n =>\n  by\n  rw [cauchySeq_iff] at hu \n  rcases hu _ (hV n) with ⟨N, H⟩\n  exact ⟨N, fun k hk l hl => H _ (le_trans hk hl) _ hk⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : CauchySeq u\nn : ℕ\n⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n\n[PROOFSTEP]\nrw [cauchySeq_iff] at hu \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : ∀ (V : Set (α × α)), V ∈ 𝓤 α → ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V\nn : ℕ\n⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n\n[PROOFSTEP]\nrcases hu _ (hV n) with ⟨N, H⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : ∀ (V : Set (α × α)), V ∈ 𝓤 α → ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V\nn N : ℕ\nH : ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ N → (u k, u l) ∈ V n\n⊢ ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n\n[PROOFSTEP]\nexact ⟨N, fun k hk l hl => H _ (le_trans hk hl) _ hk⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : CauchySeq u\nthis : ∀ (n : ℕ), ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n\n⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n\n[PROOFSTEP]\nobtain ⟨φ : ℕ → ℕ, φ_extr : StrictMono φ, hφ : ∀ n, ∀ l ≥ φ n, (u l, u <| φ n) ∈ V n⟩ :=\n  extraction_forall_of_eventually' this\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\nhu : CauchySeq u\nthis : ∀ (n : ℕ), ∃ N, ∀ (k : ℕ), k ≥ N → ∀ (l : ℕ), l ≥ k → (u l, u k) ∈ V n\nφ : ℕ → ℕ\nφ_extr : StrictMono φ\nhφ : ∀ (n l : ℕ), l ≥ φ n → (u l, u (φ n)) ∈ V n\n⊢ ∃ φ, StrictMono φ ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V n\n[PROOFSTEP]\nexact ⟨φ, φ_extr, fun n => hφ _ _ (φ_extr <| lt_add_one n).le⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\na : α\nhu : Tendsto u atTop (𝓝 a)\n⊢ ∃ φ, StrictMono φ ∧ (u (φ 0), a) ∈ V 0 ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V (n + 1)\n[PROOFSTEP]\nrcases mem_atTop_sets.1 (hu (ball_mem_nhds a (symm_le_uniformity <| hV 0))) with ⟨n, hn⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\na : α\nhu : Tendsto u atTop (𝓝 a)\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → b ∈ u ⁻¹' ball a (Prod.swap ⁻¹' V 0)\n⊢ ∃ φ, StrictMono φ ∧ (u (φ 0), a) ∈ V 0 ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V (n + 1)\n[PROOFSTEP]\nrcases(hu.comp (tendsto_add_atTop_nat n)).cauchySeq.subseq_mem fun n => hV (n + 1) with ⟨φ, φ_mono, hφV⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nV : ℕ → Set (α × α)\nhV : ∀ (n : ℕ), V n ∈ 𝓤 α\nu : ℕ → α\na : α\nhu : Tendsto u atTop (𝓝 a)\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → b ∈ u ⁻¹' ball a (Prod.swap ⁻¹' V 0)\nφ : ℕ → ℕ\nφ_mono : StrictMono φ\nhφV : ∀ (n_1 : ℕ), ((u ∘ fun a => a + n) (φ (n_1 + 1)), (u ∘ fun a => a + n) (φ n_1)) ∈ V (n_1 + 1)\n⊢ ∃ φ, StrictMono φ ∧ (u (φ 0), a) ∈ V 0 ∧ ∀ (n : ℕ), (u (φ (n + 1)), u (φ n)) ∈ V (n + 1)\n[PROOFSTEP]\nexact ⟨fun k => φ k + n, φ_mono.add_const _, hn _ le_add_self, hφV⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nh : HasBasis (𝓤 α) p s\n⊢ CauchySeq u ↔ ∀ (i : γ), p i → ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nrw [cauchySeq_iff_tendsto, ← prod_atTop_atTop_eq]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nh : HasBasis (𝓤 α) p s\n⊢ Tendsto (Prod.map u u) (atTop ×ˢ atTop) (𝓤 α) ↔\n    ∀ (i : γ), p i → ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nrefine' (atTop_basis.prod_self.tendsto_iff h).trans _\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nh : HasBasis (𝓤 α) p s\n⊢ (∀ (ib : γ), p ib → ∃ ia, True ∧ ∀ (x : β × β), x ∈ Ici ia ×ˢ Ici ia → Prod.map u u x ∈ s ib) ↔\n    ∀ (i : γ), p i → ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nsimp only [exists_prop, true_and_iff, MapsTo, preimage, subset_def, Prod.forall, mem_prod_eq, mem_setOf_eq, mem_Ici,\n  and_imp, Prod.map, ge_iff_le, @forall_swap (_ ≤ _) β]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\n⊢ CauchySeq u ↔ ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\n[PROOFSTEP]\nrefine' H.cauchySeq_iff.trans ⟨fun h i hi => _, fun h i hi => _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\ni : γ\nhi : p i\n⊢ ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\n[PROOFSTEP]\nexact (h i hi).imp fun N hN n hn => hN n hn N le_rfl\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\ni : γ\nhi : p i\n⊢ ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nrcases comp_symm_of_uniformity (H.mem_of_mem hi) with ⟨t, ht, ht', hts⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\ni : γ\nhi : p i\nt : Set (α × α)\nht : t ∈ 𝓤 α\nht' : ∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t\nhts : t ○ t ⊆ s i\n⊢ ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nrcases H.mem_iff.1 ht with ⟨j, hj, hjt⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\ni : γ\nhi : p i\nt : Set (α × α)\nht : t ∈ 𝓤 α\nht' : ∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t\nhts : t ○ t ⊆ s i\nj : γ\nhj : p j\nhjt : s j ⊆ t\n⊢ ∃ N, ∀ (m : β), N ≤ m → ∀ (n : β), N ≤ n → (u m, u n) ∈ s i\n[PROOFSTEP]\nrefine' (h j hj).imp fun N hN m hm n hn => hts ⟨u N, hjt _, ht' <| hjt _⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\ni : γ\nhi : p i\nt : Set (α × α)\nht : t ∈ 𝓤 α\nht' : ∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t\nhts : t ○ t ⊆ s i\nj : γ\nhj : p j\nhjt : s j ⊆ t\nN : β\nhN : ∀ (n : β), n ≥ N → (u n, u N) ∈ s j\nm : β\nhm : N ≤ m\nn : β\nhn : N ≤ n\n⊢ ((u m, u n).fst, u N) ∈ s j\ncase refine'_2.intro.intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\nγ : Sort u_1\ninst✝¹ : Nonempty β\ninst✝ : SemilatticeSup β\nu : β → α\np : γ → Prop\ns : γ → Set (α × α)\nH : HasBasis (𝓤 α) p s\nh : ∀ (i : γ), p i → ∃ N, ∀ (n : β), n ≥ N → (u n, u N) ∈ s i\ni : γ\nhi : p i\nt : Set (α × α)\nht : t ∈ 𝓤 α\nht' : ∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t\nhts : t ○ t ⊆ s i\nj : γ\nhj : p j\nhjt : s j ⊆ t\nN : β\nhN : ∀ (n : β), n ≥ N → (u n, u N) ∈ s j\nm : β\nhm : N ≤ m\nn : β\nhn : N ≤ n\n⊢ ((u m, u n).snd, u N) ∈ s j\n[PROOFSTEP]\nexacts [hN m hm, hN n hn]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\n⊢ Tendsto (Prod.map f f) atTop (𝓤 α)\n[PROOFSTEP]\nintro s hs\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ s ∈ map (Prod.map f f) atTop\n[PROOFSTEP]\nrw [mem_map, mem_atTop_sets]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ ∃ a, ∀ (b : β × β), b ≥ a → b ∈ Prod.map f f ⁻¹' s\n[PROOFSTEP]\ncases' hU s hs with N hN\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nN : β\nhN : U N ⊆ s\n⊢ ∃ a, ∀ (b : β × β), b ≥ a → b ∈ Prod.map f f ⁻¹' s\n[PROOFSTEP]\nrefine' ⟨(N, N), fun mn hmn => _⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nN : β\nhN : U N ⊆ s\nmn : β × β\nhmn : mn ≥ (N, N)\n⊢ mn ∈ Prod.map f f ⁻¹' s\n[PROOFSTEP]\ncases' mn with m n\n[GOAL]\ncase intro.mk\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : SemilatticeSup β\ninst✝ : Nonempty β\nU : β → Set (α × α)\nhU : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nf : β → α\nhf : ∀ ⦃N m n : β⦄, N ≤ m → N ≤ n → (f m, f n) ∈ U N\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nN : β\nhN : U N ⊆ s\nm n : β\nhmn : (m, n) ≥ (N, N)\n⊢ (m, n) ∈ Prod.map f f ⁻¹' s\n[PROOFSTEP]\nexact hN (hf hmn.1 hmn.2)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ IsComplete s ↔ ∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\n[PROOFSTEP]\nrefine' ⟨fun h l => h l, fun H => isComplete_iff_clusterPt.2 fun l hl hls => _⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\nl : Filter α\nhl : Cauchy l\nhls : l ≤ 𝓟 s\n⊢ ∃ x, x ∈ s ∧ ClusterPt x l\n[PROOFSTEP]\nhaveI := hl.1\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\nl : Filter α\nhl : Cauchy l\nhls : l ≤ 𝓟 s\nthis : NeBot l\n⊢ ∃ x, x ∈ s ∧ ClusterPt x l\n[PROOFSTEP]\nrcases H (Ultrafilter.of l) hl.ultrafilter_of ((Ultrafilter.of_le l).trans hls) with ⟨x, hxs, hxl⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\nl : Filter α\nhl : Cauchy l\nhls : l ≤ 𝓟 s\nthis : NeBot l\nx : α\nhxs : x ∈ s\nhxl : ↑(Ultrafilter.of l) ≤ 𝓝 x\n⊢ ∃ x, x ∈ s ∧ ClusterPt x l\n[PROOFSTEP]\nexact ⟨x, hxs, (ClusterPt.of_le_nhds hxl).mono (Ultrafilter.of_le l)⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ (∀ (l : Ultrafilter α), Cauchy ↑l → ↑l ≤ 𝓟 s → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x) ↔\n    ∀ (l : Ultrafilter α), Cauchy ↑l → s ∈ l → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\n[PROOFSTEP]\nsimp only [le_principal_iff, Ultrafilter.mem_coe]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns t : Set α\nhs : IsComplete s\nht : IsComplete t\n⊢ IsComplete (s ∪ t)\n[PROOFSTEP]\nsimp only [isComplete_iff_ultrafilter', Ultrafilter.union_mem_iff, or_imp] at *\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns t : Set α\nhs : ∀ (l : Ultrafilter α), Cauchy ↑l → s ∈ l → ∃ x, x ∈ s ∧ ↑l ≤ 𝓝 x\nht : ∀ (l : Ultrafilter α), Cauchy ↑l → t ∈ l → ∃ x, x ∈ t ∧ ↑l ≤ 𝓝 x\n⊢ ∀ (l : Ultrafilter α), Cauchy ↑l → (s ∈ l → ∃ x, x ∈ s ∪ t ∧ ↑l ≤ 𝓝 x) ∧ (t ∈ l → ∃ x, x ∈ s ∪ t ∧ ↑l ≤ 𝓝 x)\n[PROOFSTEP]\nexact fun l hl =>\n  ⟨fun hsl => (hs l hl hsl).imp fun x hx => ⟨Or.inl hx.1, hx.2⟩, fun htl =>\n    (ht l hl htl).imp fun x hx => ⟨Or.inr hx.1, hx.2⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\n⊢ IsComplete (⋃ (i : ι), s i)\n[PROOFSTEP]\nset S := ⋃ i, s i\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\n⊢ IsComplete S\n[PROOFSTEP]\nintro l hl hls\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : l ≤ 𝓟 S\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\nrw [le_principal_iff] at hls \n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\ncases' cauchy_iff.1 hl with hl_ne hl'\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\nobtain ⟨t, htS, htl, htU⟩ : ∃ t, t ⊆ S ∧ t ∈ l ∧ t ×ˢ t ⊆ U :=\n  by\n  rcases hl' U hU with ⟨t, htl, htU⟩\n  exact\n    ⟨t ∩ S, inter_subset_right _ _, inter_mem htl hls,\n      (Set.prod_mono (inter_subset_left _ _) (inter_subset_left _ _)).trans htU⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\n⊢ ∃ t, t ⊆ S ∧ t ∈ l ∧ t ×ˢ t ⊆ U\n[PROOFSTEP]\nrcases hl' U hU with ⟨t, htl, htU⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\n⊢ ∃ t, t ⊆ S ∧ t ∈ l ∧ t ×ˢ t ⊆ U\n[PROOFSTEP]\nexact\n  ⟨t ∩ S, inter_subset_right _ _, inter_mem htl hls,\n    (Set.prod_mono (inter_subset_left _ _) (inter_subset_left _ _)).trans htU⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\nobtain ⟨i, hi⟩ : ∃ i, t ⊆ s i := by\n  rcases Filter.nonempty_of_mem htl with ⟨x, hx⟩\n  rcases mem_iUnion.1 (htS hx) with ⟨i, hi⟩\n  refine' ⟨i, fun y hy => _⟩\n  rcases mem_iUnion.1 (htS hy) with ⟨j, hj⟩\n  rwa [hd i j x hi y hj (htU <| mk_mem_prod hx hy)]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\n⊢ ∃ i, t ⊆ s i\n[PROOFSTEP]\nrcases Filter.nonempty_of_mem htl with ⟨x, hx⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\nx : α\nhx : x ∈ t\n⊢ ∃ i, t ⊆ s i\n[PROOFSTEP]\nrcases mem_iUnion.1 (htS hx) with ⟨i, hi⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\nx : α\nhx : x ∈ t\ni : ι\nhi : x ∈ s i\n⊢ ∃ i, t ⊆ s i\n[PROOFSTEP]\nrefine' ⟨i, fun y hy => _⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\nx : α\nhx : x ∈ t\ni : ι\nhi : x ∈ s i\ny : α\nhy : y ∈ t\n⊢ y ∈ s i\n[PROOFSTEP]\nrcases mem_iUnion.1 (htS hy) with ⟨j, hj⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\nx : α\nhx : x ∈ t\ni : ι\nhi : x ∈ s i\ny : α\nhy : y ∈ t\nj : ι\nhj : y ∈ s j\n⊢ y ∈ s i\n[PROOFSTEP]\nrwa [hd i j x hi y hj (htU <| mk_mem_prod hx hy)]\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\ni : ι\nhi : t ⊆ s i\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\nrcases hs i l hl (le_principal_iff.2 <| mem_of_superset htl hi) with ⟨x, hxs, hlx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nι : Sort u_1\ns : ι → Set α\nhs : ∀ (i : ι), IsComplete (s i)\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhd : ∀ (i j : ι) (x : α), x ∈ s i → ∀ (y : α), y ∈ s j → (x, y) ∈ U → i = j\nS : Set α := ⋃ (i : ι), s i\nl : Filter α\nhl : Cauchy l\nhls : S ∈ l\nhl_ne : NeBot l\nhl' : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ t, t ∈ l ∧ t ×ˢ t ⊆ s\nt : Set α\nhtS : t ⊆ S\nhtl : t ∈ l\nhtU : t ×ˢ t ⊆ U\ni : ι\nhi : t ⊆ s i\nx : α\nhxs : x ∈ s i\nhlx : l ≤ 𝓝 x\n⊢ ∃ x, x ∈ S ∧ l ≤ 𝓝 x\n[PROOFSTEP]\nexact ⟨x, mem_iUnion.2 ⟨i, hxs⟩, hlx⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝² : UniformSpace α✝\nα : Type u\ninst✝¹ : UniformSpace α\ninst✝ : CompleteSpace α\nf : Filter α\nhf : Cauchy f\nx✝ : f ≤ 𝓟 univ\n⊢ ∃ x, x ∈ univ ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nrcases CompleteSpace.complete hf with ⟨x, hx⟩\n[GOAL]\ncase intro\nα✝ : Type u\nβ : Type v\ninst✝² : UniformSpace α✝\nα : Type u\ninst✝¹ : UniformSpace α\ninst✝ : CompleteSpace α\nf : Filter α\nhf : Cauchy f\nx✝ : f ≤ 𝓟 univ\nx : α\nhx : f ≤ 𝓝 x\n⊢ ∃ x, x ∈ univ ∧ f ≤ 𝓝 x\n[PROOFSTEP]\nexact ⟨x, mem_univ x, hx⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : CompleteSpace α\ninst✝ : CompleteSpace β\nf✝ : Filter (α × β)\nhf : Cauchy f✝\nx1 : α\nhx1 : map (fun p => p.fst) f✝ ≤ 𝓝 x1\nx2 : β\nhx2 : map (fun p => p.snd) f✝ ≤ 𝓝 x2\n⊢ f✝ ≤ 𝓝 (x1, x2)\n[PROOFSTEP]\nrw [nhds_prod_eq, Filter.prod_def]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝³ : UniformSpace α\ninst✝² : UniformSpace β\ninst✝¹ : CompleteSpace α\ninst✝ : CompleteSpace β\nf✝ : Filter (α × β)\nhf : Cauchy f✝\nx1 : α\nhx1 : map (fun p => p.fst) f✝ ≤ 𝓝 x1\nx2 : β\nhx2 : map (fun p => p.snd) f✝ ≤ 𝓝 x2\n⊢ f✝ ≤ Filter.lift (𝓝 x1) fun s => Filter.lift' (𝓝 x2) fun t => s ×ˢ t\n[PROOFSTEP]\nexact Filter.le_lift.2 fun s hs => Filter.le_lift'.2 fun t ht => inter_mem (hx1 hs) (hx2 ht)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\n⊢ CompleteSpace α ↔ ∀ (l : Ultrafilter α), Cauchy ↑l → ∃ x, ↑l ≤ 𝓝 x\n[PROOFSTEP]\nsimp [completeSpace_iff_isComplete_univ, isComplete_iff_ultrafilter]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : SemilatticeSup β\nK : Set α\nh₁ : IsComplete K\nu : β → α\nh₂ : ∀ (n : β), u n ∈ K\nh₃ : CauchySeq u\n⊢ u '' univ ⊆ K\n[PROOFSTEP]\nrwa [image_univ, range_subset_iff]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\n⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ U}\n[PROOFSTEP]\nrcases comp_symm_of_uniformity hU with ⟨r, hr, rs, rU⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\n⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ U}\n[PROOFSTEP]\nrcases hs r hr with ⟨k, fk, ks⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\n⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ U}\n[PROOFSTEP]\nlet u := k ∩ {y | ∃ x ∈ s, (x, y) ∈ r}\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\n⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ U}\n[PROOFSTEP]\nchoose f hfs hfr using fun x : u => x.coe_prop.2\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\n⊢ ∃ t, t ⊆ s ∧ Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ U}\n[PROOFSTEP]\nrefine' ⟨range f, _, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\n⊢ range f ⊆ s\n[PROOFSTEP]\nexact range_subset_iff.2 hfs\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\n⊢ Set.Finite (range f)\n[PROOFSTEP]\nhaveI : Fintype u := (fk.inter_of_left _).fintype\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\nthis : Fintype ↑u\n⊢ Set.Finite (range f)\n[PROOFSTEP]\nexact finite_range f\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\n⊢ s ⊆ ⋃ (y : α) (_ : y ∈ range f), {x | (x, y) ∈ U}\n[PROOFSTEP]\nintro x xs\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\nx : α\nxs : x ∈ s\n⊢ x ∈ ⋃ (y : α) (_ : y ∈ range f), {x | (x, y) ∈ U}\n[PROOFSTEP]\nobtain ⟨y, hy, xy⟩ := mem_iUnion₂.1 (ks xs)\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\nx : α\nxs : x ∈ s\ny : α\nhy : y ∈ k\nxy : x ∈ {x | (x, y) ∈ r}\n⊢ x ∈ ⋃ (y : α) (_ : y ∈ range f), {x | (x, y) ∈ U}\n[PROOFSTEP]\nrw [biUnion_range, mem_iUnion]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\nx : α\nxs : x ∈ s\ny : α\nhy : y ∈ k\nxy : x ∈ {x | (x, y) ∈ r}\n⊢ ∃ i, x ∈ {x | (x, f i) ∈ U}\n[PROOFSTEP]\nset z : ↥u := ⟨y, hy, ⟨x, xs, xy⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_3.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nhs : TotallyBounded s\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nr : Set (α × α)\nhr : r ∈ 𝓤 α\nrs : ∀ {a b : α}, (a, b) ∈ r → (b, a) ∈ r\nrU : r ○ r ⊆ U\nk : Set α\nfk : Set.Finite k\nks : s ⊆ ⋃ (y : α) (_ : y ∈ k), {x | (x, y) ∈ r}\nu : Set α := k ∩ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}\nf : ↑u → α\nhfs : ∀ (x : ↑u), f x ∈ s\nhfr : ∀ (x : ↑u), (f x, ↑x) ∈ r\nx : α\nxs : x ∈ s\ny : α\nhy : y ∈ k\nxy : x ∈ {x | (x, y) ∈ r}\nz : ↑u := { val := y, property := (_ : y ∈ k ∧ y ∈ {y | ∃ x, x ∈ s ∧ (x, y) ∈ r}) }\n⊢ ∃ i, x ∈ {x | (x, f i) ∈ U}\n[PROOFSTEP]\nexact ⟨z, rU <| mem_compRel.2 ⟨y, xy, rs (hfr z)⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nh : ∀ (V : Set (α × α)), V ∈ 𝓤 α → SymmetricRel V → ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), ball y V\nV : Set (α × α)\nhV : V ∈ 𝓤 α ∧ SymmetricRel V\n⊢ ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ id V}\n[PROOFSTEP]\nsimpa only [ball_eq_of_symmetry hV.2] using h V hV.1 hV.2\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\ns : Set α\nhs : TotallyBounded s\nhf : UniformContinuous f\nt : Set (β × β)\nht : t ∈ 𝓤 β\nthis : {p | (f p.fst, f p.snd) ∈ t} ∈ 𝓤 α\nc : Set α\nhfc : Set.Finite c\nhct : s ⊆ ⋃ (y : α) (_ : y ∈ c), {x | (x, y) ∈ {p | (f p.fst, f p.snd) ∈ t}}\n⊢ f '' s ⊆ ⋃ (y : β) (_ : y ∈ f '' c), {x | (x, y) ∈ t}\n[PROOFSTEP]\nsimp [image_subset_iff]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\ns : Set α\nhs : TotallyBounded s\nhf : UniformContinuous f\nt : Set (β × β)\nht : t ∈ 𝓤 β\nthis : {p | (f p.fst, f p.snd) ∈ t} ∈ 𝓤 α\nc : Set α\nhfc : Set.Finite c\nhct : s ⊆ ⋃ (y : α) (_ : y ∈ c), {x | (x, y) ∈ {p | (f p.fst, f p.snd) ∈ t}}\n⊢ s ⊆ ⋃ (i : α) (_ : i ∈ c), {a | (f a, f i) ∈ t}\n[PROOFSTEP]\nsimp [subset_def] at hct \n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\ns : Set α\nhs : TotallyBounded s\nhf : UniformContinuous f\nt : Set (β × β)\nht : t ∈ 𝓤 β\nthis : {p | (f p.fst, f p.snd) ∈ t} ∈ 𝓤 α\nc : Set α\nhfc : Set.Finite c\nhct : ∀ (x : α), x ∈ s → ∃ i, i ∈ c ∧ (f x, f i) ∈ t\n⊢ s ⊆ ⋃ (i : α) (_ : i ∈ c), {a | (f a, f i) ∈ t}\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\ns : Set α\nhs : TotallyBounded s\nhf : UniformContinuous f\nt : Set (β × β)\nht : t ∈ 𝓤 β\nthis : {p | (f p.fst, f p.snd) ∈ t} ∈ 𝓤 α\nc : Set α\nhfc : Set.Finite c\nhct : ∀ (x : α), x ∈ s → ∃ i, i ∈ c ∧ (f x, f i) ∈ t\nx : α\nhx : x ∈ s\n⊢ x ∈ ⋃ (i : α) (_ : i ∈ c), {a | (f a, f i) ∈ t}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : UniformSpace β\nf : α → β\ns : Set α\nhs : TotallyBounded s\nhf : UniformContinuous f\nt : Set (β × β)\nht : t ∈ 𝓤 β\nthis : {p | (f p.fst, f p.snd) ∈ t} ∈ 𝓤 α\nc : Set α\nhfc : Set.Finite c\nhct : ∀ (x : α), x ∈ s → ∃ i, i ∈ c ∧ (f x, f i) ∈ t\nx : α\nhx : x ∈ s\n⊢ ∃ i, i ∈ c ∧ (f x, f i) ∈ t\n[PROOFSTEP]\nexact hct x hx\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ TotallyBounded s ↔ ∀ (f : Filter α), NeBot f → f ≤ 𝓟 s → ∃ c, c ≤ f ∧ Cauchy c\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ TotallyBounded s → ∀ (f : Filter α), NeBot f → f ≤ 𝓟 s → ∃ c, c ≤ f ∧ Cauchy c\n[PROOFSTEP]\nexact fun H f hf hfs =>\n  ⟨Ultrafilter.of f, Ultrafilter.of_le f,\n    (Ultrafilter.of f).cauchy_of_totallyBounded H ((Ultrafilter.of_le f).trans hfs)⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ (∀ (f : Filter α), NeBot f → f ≤ 𝓟 s → ∃ c, c ≤ f ∧ Cauchy c) → TotallyBounded s\n[PROOFSTEP]\nintro H d hd\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (f : Filter α), NeBot f → f ≤ 𝓟 s → ∃ c, c ≤ f ∧ Cauchy c\nd : Set (α × α)\nhd : d ∈ 𝓤 α\n⊢ ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\n[PROOFSTEP]\ncontrapose! H with hd_cover\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\n⊢ ∃ f, NeBot f ∧ f ≤ 𝓟 s ∧ ∀ (c : Filter α), c ≤ f → ¬Cauchy c\n[PROOFSTEP]\nset f := ⨅ t : Finset α, 𝓟 (s \\ ⋃ y ∈ t, {x | (x, y) ∈ d})\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\n⊢ ∃ f, NeBot f ∧ f ≤ 𝓟 s ∧ ∀ (c : Filter α), c ≤ f → ¬Cauchy c\n[PROOFSTEP]\nhave : Filter.NeBot f := by\n  refine' iInf_neBot_of_directed' (directed_of_sup _) _\n  · intro t₁ t₂ h\n    exact principal_mono.2 (diff_subset_diff_right <| biUnion_subset_biUnion_left h)\n  · intro t\n    simpa [nonempty_diff] using hd_cover t t.finite_toSet\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\n⊢ NeBot f\n[PROOFSTEP]\nrefine' iInf_neBot_of_directed' (directed_of_sup _) _\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\n⊢ ∀ ⦃i j : Finset α⦄,\n    i ≤ j → 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ i), {x | (x, y) ∈ d}) ≥ 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ j), {x | (x, y) ∈ d})\n[PROOFSTEP]\nintro t₁ t₂ h\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nt₁ t₂ : Finset α\nh : t₁ ≤ t₂\n⊢ 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t₁), {x | (x, y) ∈ d}) ≥ 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t₂), {x | (x, y) ∈ d})\n[PROOFSTEP]\nexact principal_mono.2 (diff_subset_diff_right <| biUnion_subset_biUnion_left h)\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\n⊢ ∀ (i : Finset α), NeBot (𝓟 (s \\ ⋃ (y : α) (_ : y ∈ i), {x | (x, y) ∈ d}))\n[PROOFSTEP]\nintro t\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nt : Finset α\n⊢ NeBot (𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}))\n[PROOFSTEP]\nsimpa [nonempty_diff] using hd_cover t t.finite_toSet\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis : NeBot f\n⊢ ∃ f, NeBot f ∧ f ≤ 𝓟 s ∧ ∀ (c : Filter α), c ≤ f → ¬Cauchy c\n[PROOFSTEP]\nhave : f ≤ 𝓟 s := iInf_le_of_le ∅ (by simp)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis : NeBot f\n⊢ 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ ∅), {x | (x, y) ∈ d}) ≤ 𝓟 s\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝ : NeBot f\nthis : f ≤ 𝓟 s\n⊢ ∃ f, NeBot f ∧ f ≤ 𝓟 s ∧ ∀ (c : Filter α), c ≤ f → ¬Cauchy c\n[PROOFSTEP]\nrefine' ⟨f, ‹_›, ‹_›, fun c hcf hc => _⟩\n[GOAL]\ncase mpr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝ : NeBot f\nthis : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\n⊢ False\n[PROOFSTEP]\nrcases mem_prod_same_iff.1 (hc.2 hd) with ⟨m, hm, hmd⟩\n[GOAL]\ncase mpr.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝ : NeBot f\nthis : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\n⊢ False\n[PROOFSTEP]\nrcases hc.1.nonempty_of_mem hm with ⟨y, hym⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝ : NeBot f\nthis : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\n⊢ False\n[PROOFSTEP]\nset ys := ⋃ y' ∈ ({ y } : Finset α), {x | (x, y') ∈ d}\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝ : NeBot f\nthis : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\nys : Set α := ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\n⊢ False\n[PROOFSTEP]\nhave : c ≤ 𝓟 (s \\ ys) := hcf.trans (iInf_le_of_le { y } le_rfl)\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝¹ : NeBot f\nthis✝ : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\nys : Set α := ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\nthis : c ≤ 𝓟 (s \\ ys)\n⊢ False\n[PROOFSTEP]\nrefine' hc.1.ne (empty_mem_iff_bot.mp _)\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝¹ : NeBot f\nthis✝ : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\nys : Set α := ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\nthis : c ≤ 𝓟 (s \\ ys)\n⊢ ∅ ∈ c\n[PROOFSTEP]\nfilter_upwards [le_principal_iff.1 this, hm]\n[GOAL]\ncase h\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝¹ : NeBot f\nthis✝ : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\nys : Set α := ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\nthis : c ≤ 𝓟 (s \\ ys)\n⊢ ∀ (a : α), a ∈ s \\ ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d} → a ∈ m → a ∈ ∅\n[PROOFSTEP]\nrefine' fun x hx hxm => hx.2 _\n[GOAL]\ncase h\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nd : Set (α × α)\nhd : d ∈ 𝓤 α\nhd_cover : ∀ (t : Set α), Set.Finite t → ¬s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d}\nf : Filter α := ⨅ (t : Finset α), 𝓟 (s \\ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ d})\nthis✝¹ : NeBot f\nthis✝ : f ≤ 𝓟 s\nc : Filter α\nhcf : c ≤ f\nhc : Cauchy c\nm : Set α\nhm : m ∈ c\nhmd : m ×ˢ m ⊆ d\ny : α\nhym : y ∈ m\nys : Set α := ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\nthis : c ≤ 𝓟 (s \\ ys)\nx : α\nhx : x ∈ s \\ ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\nhxm : x ∈ m\n⊢ x ∈ ⋃ (y' : α) (_ : y' ∈ {y}), {x | (x, y') ∈ d}\n[PROOFSTEP]\nsimpa using hmd (mk_mem_prod hxm hym)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\n⊢ TotallyBounded s ↔ ∀ (f : Ultrafilter α), ↑f ≤ 𝓟 s → Cauchy ↑f\n[PROOFSTEP]\nrefine' ⟨fun hs f => f.cauchy_of_totallyBounded hs, fun H => totallyBounded_iff_filter.2 _⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (f : Ultrafilter α), ↑f ≤ 𝓟 s → Cauchy ↑f\n⊢ ∀ (f : Filter α), NeBot f → f ≤ 𝓟 s → ∃ c, c ≤ f ∧ Cauchy c\n[PROOFSTEP]\nintro f hf hfs\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : Set α\nH : ∀ (f : Ultrafilter α), ↑f ≤ 𝓟 s → Cauchy ↑f\nf : Filter α\nhf : NeBot f\nhfs : f ≤ 𝓟 s\n⊢ ∃ c, c ≤ f ∧ Cauchy c\n[PROOFSTEP]\nexact ⟨Ultrafilter.of f, Ultrafilter.of_le f, H _ ((Ultrafilter.of_le f).trans hfs)⟩\n[GOAL]\nα✝ : Type u\nβ : Type v\ninst✝² : UniformSpace α✝\nα : Type u\ninst✝¹ : UniformSpace α\ninst✝ : CompactSpace α\nf✝ : Filter α\nhf : Cauchy f✝\n⊢ ∃ x, f✝ ≤ 𝓝 x\n[PROOFSTEP]\nsimpa using (isCompact_iff_totallyBounded_isComplete.1 isCompact_univ).2 _ hf\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\n⊢ TotallyBounded (range s)\n[PROOFSTEP]\nrefine' totallyBounded_iff_subset.2 fun a ha => _\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\n⊢ ∃ t, t ⊆ range s ∧ Set.Finite t ∧ range s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ a}\n[PROOFSTEP]\ncases' cauchySeq_iff.1 hs a ha with n hn\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\n⊢ ∃ t, t ⊆ range s ∧ Set.Finite t ∧ range s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ a}\n[PROOFSTEP]\nrefine' ⟨s '' {k | k ≤ n}, image_subset_range _ _, (finite_le_nat _).image _, _⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\n⊢ range s ⊆ ⋃ (y : α) (_ : y ∈ s '' {k | k ≤ n}), {x | (x, y) ∈ a}\n[PROOFSTEP]\nrw [range_subset_iff, biUnion_image]\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\n⊢ ∀ (y : ℕ), s y ∈ ⋃ (y : ℕ) (_ : y ∈ {k | k ≤ n}), {x | (x, s y) ∈ a}\n[PROOFSTEP]\nintro m\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\nm : ℕ\n⊢ s m ∈ ⋃ (y : ℕ) (_ : y ∈ {k | k ≤ n}), {x | (x, s y) ∈ a}\n[PROOFSTEP]\nrw [mem_iUnion₂]\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\nm : ℕ\n⊢ ∃ i j, s m ∈ {x | (x, s i) ∈ a}\n[PROOFSTEP]\ncases' le_total m n with hm hm\n[GOAL]\ncase intro.inl\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\nm : ℕ\nhm : m ≤ n\n⊢ ∃ i j, s m ∈ {x | (x, s i) ∈ a}\ncase intro.inr\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\ns : ℕ → α\nhs : CauchySeq s\na : Set (α × α)\nha : a ∈ 𝓤 α\nn : ℕ\nhn : ∀ (k : ℕ), k ≥ n → ∀ (l : ℕ), l ≥ n → (s k, s l) ∈ a\nm : ℕ\nhm : n ≤ m\n⊢ ∃ i j, s m ∈ {x | (x, s i) ∈ a}\n[PROOFSTEP]\nexacts [⟨m, hm, refl_mem_uniformity ha⟩, ⟨n, le_refl n, hn m hm n le_rfl⟩]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p ∈ U N\n[PROOFSTEP]\nrefine' (setSeqAux hf U_mem N).2.2 ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p.fst ∈ ↑(setSeqAux hf U_mem N)\n[PROOFSTEP]\napply setSeq_sub_aux\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p.snd ∈ ↑(setSeqAux hf U_mem N)\n[PROOFSTEP]\napply setSeq_sub_aux\n[GOAL]\ncase refine'_1.a\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p.fst ∈ setSeq hf U_mem N\ncase refine'_2.a\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p.snd ∈ setSeq hf U_mem N\n[PROOFSTEP]\nexact setSeq_mono hf U_mem hm hp.1\n[GOAL]\ncase refine'_2.a\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\np : α × α\nhp : p ∈ setSeq hf U_mem m ×ˢ setSeq hf U_mem n\n⊢ p.snd ∈ setSeq hf U_mem N\n[PROOFSTEP]\nexact setSeq_mono hf U_mem hn hp.2\n[GOAL]\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (a, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nrcases U_le s hs with ⟨m, hm⟩\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nm : ℕ\nhm : U m ⊆ s\n⊢ ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (a, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nrcases tendsto_atTop'.1 ha _ (mem_nhds_left a (U_mem m)) with ⟨n, hn⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nm : ℕ\nhm : U m ⊆ s\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → seq hf U_mem b ∈ {y | (a, y) ∈ U m}\n⊢ ∃ t, t ∈ f ∧ t ×ˢ t ⊆ s ∧ ∃ y, (a, y) ∈ s ∧ y ∈ t\n[PROOFSTEP]\nrefine' ⟨setSeq hf U_mem (max m n), setSeq_mem hf U_mem _, _, seq hf U_mem (max m n), _, seq_mem hf U_mem _⟩\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nm : ℕ\nhm : U m ⊆ s\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → seq hf U_mem b ∈ {y | (a, y) ∈ U m}\n⊢ setSeq hf U_mem (max m n) ×ˢ setSeq hf U_mem (max m n) ⊆ s\n[PROOFSTEP]\nhave := le_max_left m n\n[GOAL]\ncase intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nm : ℕ\nhm : U m ⊆ s\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → seq hf U_mem b ∈ {y | (a, y) ∈ U m}\nthis : m ≤ max m n\n⊢ setSeq hf U_mem (max m n) ×ˢ setSeq hf U_mem (max m n) ⊆ s\n[PROOFSTEP]\nexact Set.Subset.trans (setSeq_prod_subset hf U_mem this this) hm\n[GOAL]\ncase intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝ : UniformSpace α\nf : Filter α\nhf : Cauchy f\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nU_le : ∀ (s : Set (α × α)), s ∈ 𝓤 α → ∃ n, U n ⊆ s\na : α\nha : Tendsto (seq hf U_mem) atTop (𝓝 a)\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nm : ℕ\nhm : U m ⊆ s\nn : ℕ\nhn : ∀ (b : ℕ), b ≥ n → seq hf U_mem b ∈ {y | (a, y) ∈ U m}\n⊢ (a, seq hf U_mem (max m n)) ∈ s\n[PROOFSTEP]\nexact hm (hn _ <| le_max_right m n)\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\n⊢ CompleteSpace α\n[PROOFSTEP]\nobtain ⟨U', -, hU'⟩ := (𝓤 α).exists_antitone_seq\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\nU' : ℕ → Set (α × α)\nhU' : ∀ {s : Set (α × α)}, s ∈ 𝓤 α ↔ ∃ i, U' i ⊆ s\n⊢ CompleteSpace α\n[PROOFSTEP]\nhave Hmem : ∀ n, U n ∩ U' n ∈ 𝓤 α := fun n => inter_mem (U_mem n) (hU'.2 ⟨n, Subset.refl _⟩)\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\nU' : ℕ → Set (α × α)\nhU' : ∀ {s : Set (α × α)}, s ∈ 𝓤 α ↔ ∃ i, U' i ⊆ s\nHmem : ∀ (n : ℕ), U n ∩ U' n ∈ 𝓤 α\n⊢ CompleteSpace α\n[PROOFSTEP]\nrefine ⟨fun hf => (HU (seq hf Hmem) fun N m n hm hn => ?_).imp <| le_nhds_of_seq_tendsto_nhds _ _ fun s hs => ?_⟩\n[GOAL]\ncase intro.intro.refine_1\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\nU' : ℕ → Set (α × α)\nhU' : ∀ {s : Set (α × α)}, s ∈ 𝓤 α ↔ ∃ i, U' i ⊆ s\nHmem : ∀ (n : ℕ), U n ∩ U' n ∈ 𝓤 α\nf✝ : Filter α\nhf : Cauchy f✝\nN m n : ℕ\nhm : N ≤ m\nhn : N ≤ n\n⊢ (SequentiallyComplete.seq hf Hmem m, SequentiallyComplete.seq hf Hmem n) ∈ U N\n[PROOFSTEP]\nexact inter_subset_left _ _ (seq_pair_mem hf Hmem hm hn)\n[GOAL]\ncase intro.intro.refine_2\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\nU' : ℕ → Set (α × α)\nhU' : ∀ {s : Set (α × α)}, s ∈ 𝓤 α ↔ ∃ i, U' i ⊆ s\nHmem : ∀ (n : ℕ), U n ∩ U' n ∈ 𝓤 α\nf✝ : Filter α\nhf : Cauchy f✝\ns : Set (α × α)\nhs : s ∈ 𝓤 α\n⊢ ∃ n, U n ∩ U' n ⊆ s\n[PROOFSTEP]\nrcases hU'.1 hs with ⟨N, hN⟩\n[GOAL]\ncase intro.intro.refine_2.intro\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\nU : ℕ → Set (α × α)\nU_mem : ∀ (n : ℕ), U n ∈ 𝓤 α\nHU : ∀ (u : ℕ → α), (∀ (N m n : ℕ), N ≤ m → N ≤ n → (u m, u n) ∈ U N) → ∃ a, Tendsto u atTop (𝓝 a)\nU' : ℕ → Set (α × α)\nhU' : ∀ {s : Set (α × α)}, s ∈ 𝓤 α ↔ ∃ i, U' i ⊆ s\nHmem : ∀ (n : ℕ), U n ∩ U' n ∈ 𝓤 α\nf✝ : Filter α\nhf : Cauchy f✝\ns : Set (α × α)\nhs : s ∈ 𝓤 α\nN : ℕ\nhN : U' N ⊆ s\n⊢ ∃ n, U n ∩ U' n ⊆ s\n[PROOFSTEP]\nexact ⟨N, Subset.trans (inter_subset_right _ _) hN⟩\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\na : α\n⊢ IsCountablyGenerated (𝓝 a)\n[PROOFSTEP]\nrw [nhds_eq_comap_uniformity]\n[GOAL]\nα : Type u\nβ : Type v\ninst✝¹ : UniformSpace α\ninst✝ : IsCountablyGenerated (𝓤 α)\na : α\n⊢ IsCountablyGenerated (Filter.comap (Prod.mk a) (𝓤 α))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\n⊢ SecondCountableTopology α\n[PROOFSTEP]\nrcases exists_countable_dense α with ⟨s, hsc, hsd⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\n⊢ SecondCountableTopology α\n[PROOFSTEP]\nobtain\n  ⟨t : ℕ → Set (α × α), hto : ∀ i : ℕ, t i ∈ (𝓤 α).sets ∧ IsOpen (t i) ∧ SymmetricRel (t i), h_basis :\n    (𝓤 α).HasAntitoneBasis t⟩ :=\n  (@uniformity_hasBasis_open_symmetric α _).exists_antitone_subbasis\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nhto : ∀ (i : ℕ), t i ∈ (𝓤 α).sets ∧ IsOpen (t i) ∧ SymmetricRel (t i)\nh_basis : HasAntitoneBasis (𝓤 α) t\n⊢ SecondCountableTopology α\n[PROOFSTEP]\nchoose ht_mem hto hts using hto\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\n⊢ SecondCountableTopology α\n[PROOFSTEP]\nrefine' ⟨⟨⋃ x ∈ s, range fun k => ball x (t k), hsc.biUnion fun x _ => countable_range _, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\n⊢ toTopologicalSpace = generateFrom (⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k))\n[PROOFSTEP]\nrefine' (isTopologicalBasis_of_open_of_nhds _ _).eq_generateFrom\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\n⊢ ∀ (u : Set α), (u ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) → IsOpen u\n[PROOFSTEP]\nsimp only [mem_iUnion₂, mem_range]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\n⊢ ∀ (u : Set α), (∃ i h y, ball i (t y) = u) → IsOpen u\n[PROOFSTEP]\nrintro _ ⟨x, _, k, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nw✝ : x ∈ s\nk : ℕ\n⊢ IsOpen (ball x (t k))\n[PROOFSTEP]\nexact isOpen_ball x (hto k)\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\n⊢ ∀ (a : α) (u : Set α),\n    a ∈ u → IsOpen u → ∃ v, (v ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) ∧ a ∈ v ∧ v ⊆ u\n[PROOFSTEP]\nintro x V hxV hVo\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\n⊢ ∃ v, (v ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nsimp only [mem_iUnion₂, mem_range, exists_prop]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\n⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nrcases UniformSpace.mem_nhds_iff.1 (IsOpen.mem_nhds hVo hxV) with ⟨U, hU, hUV⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUV : ball x U ⊆ V\n⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nrcases comp_symm_of_uniformity hU with ⟨U', hU', _, hUU'⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUV : ball x U ⊆ V\nU' : Set (α × α)\nhU' : U' ∈ 𝓤 α\nleft✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'\nhUU' : U' ○ U' ⊆ U\n⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nrcases h_basis.toHasBasis.mem_iff.1 hU' with ⟨k, -, hk⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUV : ball x U ⊆ V\nU' : Set (α × α)\nhU' : U' ∈ 𝓤 α\nleft✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'\nhUU' : U' ○ U' ⊆ U\nk : ℕ\nhk : t k ⊆ U'\n⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nrcases hsd.inter_open_nonempty (ball x <| t k) (isOpen_ball x (hto k)) ⟨x, UniformSpace.mem_ball_self _ (ht_mem k)⟩ with\n  ⟨y, hxy, hys⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUV : ball x U ⊆ V\nU' : Set (α × α)\nhU' : U' ∈ 𝓤 α\nleft✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'\nhUU' : U' ○ U' ⊆ U\nk : ℕ\nhk : t k ⊆ U'\ny : α\nhxy : y ∈ ball x (t k)\nhys : y ∈ s\n⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V\n[PROOFSTEP]\nrefine' ⟨_, ⟨y, hys, k, rfl⟩, (hts k).subset hxy, fun z hz => _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u\nβ : Type v\ninst✝² : UniformSpace α\ninst✝¹ : IsCountablyGenerated (𝓤 α)\ninst✝ : SeparableSpace α\ns : Set α\nhsc : Set.Countable s\nhsd : Dense s\nt : ℕ → Set (α × α)\nh_basis : HasAntitoneBasis (𝓤 α) t\nht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets\nhto : ∀ (i : ℕ), IsOpen (t i)\nhts : ∀ (i : ℕ), SymmetricRel (t i)\nx : α\nV : Set α\nhxV : x ∈ V\nhVo : IsOpen V\nU : Set (α × α)\nhU : U ∈ 𝓤 α\nhUV : ball x U ⊆ V\nU' : Set (α × α)\nhU' : U' ∈ 𝓤 α\nleft✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'\nhUU' : U' ○ U' ⊆ U\nk : ℕ\nhk : t k ⊆ U'\ny : α\nhxy : y ∈ ball x (t k)\nhys : y ∈ s\nz : α\nhz : z ∈ ball y (t k)\n⊢ z ∈ V\n[PROOFSTEP]\nexact hUV (ball_subset_of_comp_subset (hk hxy) hUU' (hk hz))\n", "meta": {"mathlib_filename": "Mathlib.Topology.UniformSpace.Cauchy", "llama_tokens": 39329, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5698526660244837, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.27602528239440366}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\n⊢ IsSeq (some a :: ↑s)\n[PROOFSTEP]\nrintro (n | _) h\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\nh : (some a :: ↑s) Nat.zero = none\n⊢ (some a :: ↑s) (Nat.zero + 1) = none\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\nn✝ : ℕ\nh : (some a :: ↑s) (Nat.succ n✝) = none\n⊢ (some a :: ↑s) (Nat.succ n✝ + 1) = none\n[PROOFSTEP]\nexact s.2 h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx y : α\ns t : Seq α\nh : cons x s = cons y t\n⊢ x = y\n[PROOFSTEP]\nrw [← Option.some_inj, ← get?_cons_zero, h, get?_cons_zero]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nx y : α\ns t : Seq α\nh : cons x s = cons y t\nn : ℕ\n⊢ get? s n = get? t n\n[PROOFSTEP]\nsimp_rw [← get?_cons_succ x s n, h, get?_cons_succ]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ TerminatedAt s n ↔ Option.isNone (get? s n) = true\n[PROOFSTEP]\nunfold TerminatedAt\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ get? s n = none ↔ Option.isNone (get? s n) = true\n[PROOFSTEP]\ncases s.get? n\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ none = none ↔ Option.isNone none = true\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\nval✝ : α\n⊢ some val✝ = none ↔ Option.isNone (some val✝) = true\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ ¬Terminates s ↔ ∀ (n : ℕ), Option.isSome (get? s n) = true\n[PROOFSTEP]\nsimp only [Terminates, TerminatedAt, ← Ne.def, Option.ne_none_iff_isSome, not_exists, iff_self]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn✝ : ℕ\nn' : Stream'.tail (↑s) n✝ = none\n⊢ Stream'.tail (↑s) (n✝ + 1) = none\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nn✝ : ℕ\nf : Stream' (Option α)\nal : IsSeq f\nn' : Stream'.tail (↑{ val := f, property := al }) n✝ = none\n⊢ Stream'.tail (↑{ val := f, property := al }) (n✝ + 1) = none\n[PROOFSTEP]\nexact al n'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nm n : ℕ\nh : m ≤ n\n⊢ get? s m = none → get? s n = none\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nm n : ℕ\nh : m ≤ n\nf : Stream' (Option α)\nal : IsSeq f\n⊢ get? { val := f, property := al } m = none → get? { val := f, property := al } n = none\n[PROOFSTEP]\ninduction' h with n _ IH\n[GOAL]\ncase mk.refl\nα : Type u\nβ : Type v\nγ : Type w\nm n : ℕ\nf : Stream' (Option α)\nal : IsSeq f\n⊢ get? { val := f, property := al } m = none → get? { val := f, property := al } m = none\ncase mk.step\nα : Type u\nβ : Type v\nγ : Type w\nm n✝ : ℕ\nf : Stream' (Option α)\nal : IsSeq f\nn : ℕ\na✝ : Nat.le m n\nIH : get? { val := f, property := al } m = none → get? { val := f, property := al } n = none\n⊢ get? { val := f, property := al } m = none → get? { val := f, property := al } (Nat.succ n) = none\n[PROOFSTEP]\nexacts [id, fun h2 => al (IH h2)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\naₙ : α\nn m : ℕ\nm_le_n : m ≤ n\ns_nth_eq_some : get? s n = some aₙ\n⊢ get? s n ≠ none\n[PROOFSTEP]\nsimp [s_nth_eq_some]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nx✝ : a ∈ nil\nw✝ : ℕ\nh : some a = none\n⊢ False\n[PROOFSTEP]\ninjection h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\nf : Stream' (Option α)\nal : IsSeq f\nh✝ : a ∈ cons b { val := f, property := al }\nh : some a = some b\n⊢ a = b\n[PROOFSTEP]\ninjection h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\n⊢ a = b ∨ a ∈ s → a ∈ cons b s\n[PROOFSTEP]\nrintro (rfl | m) <;> [apply mem_cons; exact mem_cons_of_mem _ m]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\n⊢ a = b ∨ a ∈ s → a ∈ cons b s\n[PROOFSTEP]\nrintro (rfl | m)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\n⊢ a ∈ cons a s\n[PROOFSTEP]\napply mem_cons\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\nm : a ∈ s\n⊢ a ∈ cons b s\n[PROOFSTEP]\nexact mem_cons_of_mem _ m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ destruct s = none → s = nil\n[PROOFSTEP]\ndsimp [destruct]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ Option.map (fun a' => (a', tail s)) (get? s 0) = none → s = nil\n[PROOFSTEP]\ninduction' f0 : get? s 0\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\n⊢ Option.map (fun a' => (a', tail s)) none = none → s = nil\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nval✝ : α\nf0 : get? s 0 = some val✝\n⊢ Option.map (fun a' => (a', tail s)) (some val✝) = none → s = nil\n[PROOFSTEP]\nintro h\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = none\n⊢ s = nil\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase none.a\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = none\n⊢ ↑s = ↑nil\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase none.a.h\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = none\nn : ℕ\n⊢ ↑s n = ↑nil n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase none.a.h.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = none\n⊢ ↑s Nat.zero = ↑nil Nat.zero\ncase none.a.h.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = none\nn : ℕ\nIH : ↑s n = ↑nil n\n⊢ ↑s (Nat.succ n) = ↑nil (Nat.succ n)\n[PROOFSTEP]\nexacts [f0, s.2 IH]\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nval✝ : α\nf0 : get? s 0 = some val✝\nh : Option.map (fun a' => (a', tail s)) (some val✝) = none\n⊢ s = nil\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\n⊢ destruct s = some (a, s') → s = cons a s'\n[PROOFSTEP]\ndsimp [destruct]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\n⊢ Option.map (fun a' => (a', tail s)) (get? s 0) = some (a, s') → s = cons a s'\n[PROOFSTEP]\ninduction' f0 : get? s 0 with a'\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\n⊢ Option.map (fun a' => (a', tail s)) none = some (a, s') → s = cons a s'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\na' : α\nf0 : get? s 0 = some a'\n⊢ Option.map (fun a' => (a', tail s)) (some a') = some (a, s') → s = cons a s'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\nf0 : get? s 0 = none\nh : Option.map (fun a' => (a', tail s)) none = some (a, s')\n⊢ s = cons a s'\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\na : α\ns' : Seq α\nx✝ : Option α\nf0✝ : get? s 0 = x✝\na' : α\nf0 : get? s 0 = some a'\nh : Option.map (fun a' => (a', tail s)) (some a') = some (a, s')\n⊢ s = cons a s'\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a'\nh : Option.map (fun a' => (a', tail { val := f, property := al })) (some a') = some (a, s')\n⊢ { val := f, property := al } = cons a s'\n[PROOFSTEP]\ninjections _ h1 h2\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a'\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ { val := f, property := al } = cons a s'\n[PROOFSTEP]\nrw [← h2]\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a'\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ { val := f, property := al } = cons a (tail { val := f, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a'\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ ↑{ val := f, property := al } = ↑(cons a (tail { val := f, property := al }))\n[PROOFSTEP]\ndsimp [tail, cons]\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a'\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ f = some a :: Stream'.tail f\n[PROOFSTEP]\nrw [h1] at f0 \n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ f = some a :: Stream'.tail f\n[PROOFSTEP]\nrw [← f0]\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns' : Seq α\nx✝ : Option α\na' : α\nf : Stream' (Option α)\nal : IsSeq f\nf0✝ : get? { val := f, property := al } 0 = x✝\nf0 : get? { val := f, property := al } 0 = some a\nh1 : a' = a\nh2 : tail { val := f, property := al } = s'\n⊢ f = get? { val := f, property := al } 0 :: Stream'.tail f\n[PROOFSTEP]\nexact (Stream'.eta f).symm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ destruct (cons a { val := f, property := al }) = some (a, { val := f, property := al })\n[PROOFSTEP]\nunfold cons destruct Functor.map\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ instFunctorOption.1\n      (fun a' =>\n        (a',\n          tail\n            { val := some a :: ↑{ val := f, property := al },\n              property :=\n                (_ :\n                  ∀ {n : ℕ},\n                    (some a :: ↑{ val := f, property := al }) n = none →\n                      (some a :: ↑{ val := f, property := al }) (n + 1) = none) }))\n      (get?\n        { val := some a :: ↑{ val := f, property := al },\n          property :=\n            (_ :\n              ∀ {n : ℕ},\n                (some a :: ↑{ val := f, property := al }) n = none →\n                  (some a :: ↑{ val := f, property := al }) (n + 1) = none) }\n        0) =\n    some (a, { val := f, property := al })\n[PROOFSTEP]\napply congr_arg fun s => some (a, s)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ tail\n      { val := some a :: ↑{ val := f, property := al },\n        property :=\n          (_ :\n            ∀ {n : ℕ},\n              (some a :: ↑{ val := f, property := al }) n = none →\n                (some a :: ↑{ val := f, property := al }) (n + 1) = none) } =\n    { val := f, property := al }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ ↑(tail\n        { val := some a :: ↑{ val := f, property := al },\n          property :=\n            (_ :\n              ∀ {n : ℕ},\n                (some a :: ↑{ val := f, property := al }) n = none →\n                  (some a :: ↑{ val := f, property := al }) (n + 1) = none) }) =\n    ↑{ val := f, property := al }\n[PROOFSTEP]\ndsimp [tail]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ head s = Prod.fst <$> destruct s\n[PROOFSTEP]\nunfold destruct head\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ get? s 0 = Prod.fst <$> (fun a' => (a', tail s)) <$> get? s 0\n[PROOFSTEP]\ncases get? s 0\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ none = Prod.fst <$> (fun a' => (a', tail s)) <$> none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nval✝ : α\n⊢ some val✝ = Prod.fst <$> (fun a' => (a', tail s)) <$> some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\n⊢ head (cons a s) = some a\n[PROOFSTEP]\nrw [head_eq_destruct, destruct_cons, Option.map_eq_map, Option.map_some']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\n⊢ tail (cons a s) = s\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ tail (cons a { val := f, property := al }) = { val := f, property := al }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase mk.a\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : Stream' (Option α)\nal : IsSeq f\n⊢ ↑(tail (cons a { val := f, property := al })) = ↑{ val := f, property := al }\n[PROOFSTEP]\ndsimp [tail, cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\n⊢ C s\n[PROOFSTEP]\ncases' H : destruct s with v\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\nH : destruct s = none\n⊢ C s\n[PROOFSTEP]\nrw [destruct_eq_nil H]\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\nH : destruct s = none\n⊢ C nil\n[PROOFSTEP]\napply h1\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\nv : Seq1 α\nH : destruct s = some v\n⊢ C s\n[PROOFSTEP]\ncases' v with a s'\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\na : α\ns' : Seq α\nH : destruct s = some (a, s')\n⊢ C s\n[PROOFSTEP]\nrw [destruct_eq_cons H]\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Sort v\ns : Seq α\nh1 : C nil\nh2 : (x : α) → (s : Seq α) → C (cons x s)\na : α\ns' : Seq α\nH : destruct s = some (a, s')\n⊢ C (cons a s')\n[PROOFSTEP]\napply h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns : Seq α\nM : a ∈ s\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\n⊢ C s\n[PROOFSTEP]\ncases' M with k e\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne : (fun b => some a = b) (nth (↑s) k)\n⊢ C s\n[PROOFSTEP]\nunfold Stream'.nth at e \n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne : (fun b => some a = b) (↑s k)\n⊢ C s\n[PROOFSTEP]\ninduction' k with k IH generalizing s\n[GOAL]\ncase intro.zero\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\n⊢ C s\n[PROOFSTEP]\nhave TH : s = cons a (tail s) := by\n  apply destruct_eq_cons\n  unfold destruct get? Functor.map\n  rw [← e]\n  rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\n⊢ s = cons a (tail s)\n[PROOFSTEP]\napply destruct_eq_cons\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\n⊢ destruct s = some (a, tail s)\n[PROOFSTEP]\nunfold destruct get? Functor.map\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\n⊢ instFunctorOption.1 (fun a' => (a', tail s)) (↑s 0) = some (a, tail s)\n[PROOFSTEP]\nrw [← e]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\n⊢ instFunctorOption.1 (fun a' => (a', tail s)) (some a) = some (a, tail s)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.zero\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\nTH : s = cons a (tail s)\n⊢ C s\n[PROOFSTEP]\nrw [TH]\n[GOAL]\ncase intro.zero\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k)\ns : Seq α\ne : some a = ↑s Nat.zero\nTH : s = cons a (tail s)\n⊢ C (cons a (tail s))\n[PROOFSTEP]\napply\n  h1 _ _\n    (Or.inl rfl)\n      -- porting note: had to reshuffle `intro`\n[GOAL]\ncase intro.succ\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\ne : some a = ↑s (Nat.succ k)\n⊢ C s\n[PROOFSTEP]\nrevert e\n[GOAL]\ncase intro.succ\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\n⊢ some a = ↑s (Nat.succ k) → C s\n[PROOFSTEP]\napply s.recOn _ fun b s' => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\n⊢ some a = ↑nil (Nat.succ k) → C nil\n[PROOFSTEP]\nintro e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\ne : some a = ↑nil (Nat.succ k)\n⊢ C nil\n[PROOFSTEP]\ninjection e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\n⊢ ∀ (b : α) (s' : Seq α), some a = ↑(cons b s') (Nat.succ k) → C (cons b s')\n[PROOFSTEP]\nintro b s' e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\nb : α\ns' : Seq α\ne : some a = ↑(cons b s') (Nat.succ k)\n⊢ C (cons b s')\n[PROOFSTEP]\nhave h_eq : (cons b s').val (Nat.succ k) = s'.val k := by cases s'; rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\nb : α\ns' : Seq α\ne : some a = ↑(cons b s') (Nat.succ k)\n⊢ ↑(cons b s') (Nat.succ k) = ↑s' k\n[PROOFSTEP]\ncases s'\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\nb : α\nval✝ : Stream' (Option α)\nproperty✝ : IsSeq val✝\ne : some a = ↑(cons b { val := val✝, property := property✝ }) (Nat.succ k)\n⊢ ↑(cons b { val := val✝, property := property✝ }) (Nat.succ k) = ↑{ val := val✝, property := property✝ } k\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\nb : α\ns' : Seq α\ne : some a = ↑(cons b s') (Nat.succ k)\nh_eq : ↑(cons b s') (Nat.succ k) = ↑s' k\n⊢ C (cons b s')\n[PROOFSTEP]\nrw [h_eq] at e \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Seq α → Prop\na : α\ns✝ : Seq α\nh1 : ∀ (b : α) (s' : Seq α), a = b ∨ C s' → C (cons b s')\nk✝ : ℕ\ne✝ : (fun b => some a = b) (↑s✝ k✝)\nk : ℕ\nIH : ∀ {s : Seq α}, some a = ↑s k → C s\ns : Seq α\nb : α\ns' : Seq α\ne : some a = ↑s' k\nh_eq : ↑(cons b s') (Nat.succ k) = ↑s' k\n⊢ C (cons b s')\n[PROOFSTEP]\napply h1 _ _ (Or.inr (IH e))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\n⊢ Seq α\n[PROOFSTEP]\nrefine' ⟨Stream'.corec' (Corec.f f) (some b), fun {n} h => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nh : corec' (Corec.f f) (some b) n = none\n⊢ corec' (Corec.f f) (some b) (n + 1) = none\n[PROOFSTEP]\nrw [Stream'.corec'_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nh : corec' (Corec.f f) (some b) n = none\n⊢ ((Corec.f f (some b)).fst :: corec' (Corec.f f) (Corec.f f (some b)).snd) (n + 1) = none\n[PROOFSTEP]\nchange Stream'.corec' (Corec.f f) (Corec.f f (some b)).2 n = none\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nh : corec' (Corec.f f) (some b) n = none\n⊢ corec' (Corec.f f) (Corec.f f (some b)).snd n = none\n[PROOFSTEP]\nrevert h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\n⊢ corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (Corec.f f (some b)).snd n = none\n[PROOFSTEP]\ngeneralize some b = o\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\no : Option β\n⊢ corec' (Corec.f f) o n = none → corec' (Corec.f f) (Corec.f f o).snd n = none\n[PROOFSTEP]\nrevert o\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\n⊢ ∀ (o : Option β), corec' (Corec.f f) o n = none → corec' (Corec.f f) (Corec.f f o).snd n = none\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\n⊢ ∀ (o : Option β), corec' (Corec.f f) o Nat.zero = none → corec' (Corec.f f) (Corec.f f o).snd Nat.zero = none\n[PROOFSTEP]\nintro o\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nIH : ∀ (o : Option β), corec' (Corec.f f) o n = none → corec' (Corec.f f) (Corec.f f o).snd n = none\n⊢ ∀ (o : Option β), corec' (Corec.f f) o (Nat.succ n) = none → corec' (Corec.f f) (Corec.f f o).snd (Nat.succ n) = none\n[PROOFSTEP]\nintro o\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\no : Option β\n⊢ corec' (Corec.f f) o Nat.zero = none → corec' (Corec.f f) (Corec.f f o).snd Nat.zero = none\n[PROOFSTEP]\nchange (Corec.f f o).1 = none → (Corec.f f (Corec.f f o).2).1 = none\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\no : Option β\n⊢ (Corec.f f o).fst = none → (Corec.f f (Corec.f f o).snd).fst = none\n[PROOFSTEP]\ncases' o with b\n[GOAL]\ncase zero.none\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\n⊢ (Corec.f f none).fst = none → (Corec.f f (Corec.f f none).snd).fst = none\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\n⊢ (Corec.f f (some b)).fst = none → (Corec.f f (Corec.f f (some b)).snd).fst = none\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.none\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh : (Corec.f f none).fst = none\n⊢ (Corec.f f (Corec.f f none).snd).fst = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\nh : (Corec.f f (some b)).fst = none\n⊢ (Corec.f f (Corec.f f (some b)).snd).fst = none\n[PROOFSTEP]\ndsimp [Corec.f] at h \n[GOAL]\ncase zero.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\nh :\n  (match f b with\n      | none => (none, none)\n      | some (a, b') => (some a, some b')).fst =\n    none\n⊢ (Corec.f f (Corec.f f (some b)).snd).fst = none\n[PROOFSTEP]\ndsimp [Corec.f]\n[GOAL]\ncase zero.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\nh :\n  (match f b with\n      | none => (none, none)\n      | some (a, b') => (some a, some b')).fst =\n    none\n⊢ (match\n        (match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).snd with\n      | none => (none, none)\n      | some b =>\n        match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    none\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase zero.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\n⊢ (match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n      none →\n    (match\n          (match f b with\n            | none => (none, none)\n            | some (a, b') => (some a, some b')).snd with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).fst =\n      none\n[PROOFSTEP]\ncases' h₁ : f b with s\n[GOAL]\ncase zero.some.none\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\nh₁ : f b = none\n⊢ (match none with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n      none →\n    (match\n          (match none with\n            | none => (none, none)\n            | some (a, b') => (some a, some b')).snd with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).fst =\n      none\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.some.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\ns : α × β\nh₁ : f b = some s\n⊢ (match some s with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n      none →\n    (match\n          (match some s with\n            | none => (none, none)\n            | some (a, b') => (some a, some b')).snd with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).fst =\n      none\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.some.none\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\nh₁ : f b = none\nh :\n  (match none with\n      | none => (none, none)\n      | some (a, b') => (some a, some b')).fst =\n    none\n⊢ (match\n        (match none with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).snd with\n      | none => (none, none)\n      | some b =>\n        match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero.some.some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\ns : α × β\nh₁ : f b = some s\nh :\n  (match some s with\n      | none => (none, none)\n      | some (a, b') => (some a, some b')).fst =\n    none\n⊢ (match\n        (match some s with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).snd with\n      | none => (none, none)\n      | some b =>\n        match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    none\n[PROOFSTEP]\ncases' s with a b'\n[GOAL]\ncase zero.some.some.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb✝ b : β\na : α\nb' : β\nh₁ : f b = some (a, b')\nh :\n  (match some (a, b') with\n      | none => (none, none)\n      | some (a, b') => (some a, some b')).fst =\n    none\n⊢ (match\n        (match some (a, b') with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).snd with\n      | none => (none, none)\n      | some b =>\n        match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    none\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nIH : ∀ (o : Option β), corec' (Corec.f f) o n = none → corec' (Corec.f f) (Corec.f f o).snd n = none\no : Option β\n⊢ corec' (Corec.f f) o (Nat.succ n) = none → corec' (Corec.f f) (Corec.f f o).snd (Nat.succ n) = none\n[PROOFSTEP]\nrw [Stream'.corec'_eq (Corec.f f) (Corec.f f o).2, Stream'.corec'_eq (Corec.f f) o]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nn : ℕ\nIH : ∀ (o : Option β), corec' (Corec.f f) o n = none → corec' (Corec.f f) (Corec.f f o).snd n = none\no : Option β\n⊢ ((Corec.f f o).fst :: corec' (Corec.f f) (Corec.f f o).snd) (Nat.succ n) = none →\n    ((Corec.f f (Corec.f f o).snd).fst :: corec' (Corec.f f) (Corec.f f (Corec.f f o).snd).snd) (Nat.succ n) = none\n[PROOFSTEP]\nexact IH (Corec.f f o).2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\n⊢ destruct (corec f b) = omap (corec f) (f b)\n[PROOFSTEP]\ndsimp [corec, destruct, nth]\n  -- porting note: next two lines were `change`...`with`...\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            { val := corec' (Corec.f f) (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (corec' (Corec.f f) (some b) 0) =\n    match f b with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          { val := corec' (Corec.f f) (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\nhave h : Stream'.corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).1 := rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            { val := corec' (Corec.f f) (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (corec' (Corec.f f) (some b) 0) =\n    match f b with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          { val := corec' (Corec.f f) (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            { val := corec' (Corec.f f) (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (Corec.f f (some b)).fst =\n    match f b with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          { val := corec' (Corec.f f) (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\ndsimp [Corec.f]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            {\n              val :=\n                corec'\n                  (fun x =>\n                    match x with\n                    | none => (none, none)\n                    | some b =>\n                      match f b with\n                      | none => (none, none)\n                      | some (a, b') => (some a, some b'))\n                  (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    match f b with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          {\n            val :=\n              corec'\n                (fun x =>\n                  match x with\n                  | none => (none, none)\n                  | some b =>\n                    match f b with\n                    | none => (none, none)\n                    | some (a, b') => (some a, some b'))\n                (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\ninduction' h : f b with s\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\nh : f b = none\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            {\n              val :=\n                corec'\n                  (fun x =>\n                    match x with\n                    | none => (none, none)\n                    | some b =>\n                      match f b with\n                      | none => (none, none)\n                      | some (a, b') => (some a, some b'))\n                  (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (match none with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    match none with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          {\n            val :=\n              corec'\n                (fun x =>\n                  match x with\n                  | none => (none, none)\n                  | some b =>\n                    match f b with\n                    | none => (none, none)\n                    | some (a, b') => (some a, some b'))\n                (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\ns : α × β\nh : f b = some s\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            {\n              val :=\n                corec'\n                  (fun x =>\n                    match x with\n                    | none => (none, none)\n                    | some b =>\n                      match f b with\n                      | none => (none, none)\n                      | some (a, b') => (some a, some b'))\n                  (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (match some s with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    match some s with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          {\n            val :=\n              corec'\n                (fun x =>\n                  match x with\n                  | none => (none, none)\n                  | some b =>\n                    match f b with\n                    | none => (none, none)\n                    | some (a, b') => (some a, some b'))\n                (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\ncases' s with a b'\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ Option.map\n      (fun a' =>\n        (a',\n          tail\n            {\n              val :=\n                corec'\n                  (fun x =>\n                    match x with\n                    | none => (none, none)\n                    | some b =>\n                      match f b with\n                      | none => (none, none)\n                      | some (a, b') => (some a, some b'))\n                  (some b),\n              property :=\n                (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }))\n      (match some (a, b') with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).fst =\n    match some (a, b') with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          {\n            val :=\n              corec'\n                (fun x =>\n                  match x with\n                  | none => (none, none)\n                  | some b =>\n                    match f b with\n                    | none => (none, none)\n                    | some (a, b') => (some a, some b'))\n                (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) })\n[PROOFSTEP]\ndsimp [Corec.f]\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ some\n      (a,\n        tail\n          {\n            val :=\n              corec'\n                (fun x =>\n                  match x with\n                  | none => (none, none)\n                  | some b =>\n                    match f b with\n                    | none => (none, none)\n                    | some (a, b') => (some a, some b'))\n                (some b),\n            property :=\n              (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }) =\n    some\n      (a,\n        {\n          val :=\n            corec'\n              (fun x =>\n                match x with\n                | none => (none, none)\n                | some b =>\n                  match f b with\n                  | none => (none, none)\n                  | some (a, b') => (some a, some b'))\n              (some b'),\n          property :=\n            (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b') n = none → corec' (Corec.f f) (some b') (n + 1) = none) })\n[PROOFSTEP]\napply congr_arg fun b' => some (a, b')\n[GOAL]\ncase some.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ tail\n      {\n        val :=\n          corec'\n            (fun x =>\n              match x with\n              | none => (none, none)\n              | some b =>\n                match f b with\n                | none => (none, none)\n                | some (a, b') => (some a, some b'))\n            (some b),\n        property :=\n          (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) } =\n    {\n      val :=\n        corec'\n          (fun x =>\n            match x with\n            | none => (none, none)\n            | some b =>\n              match f b with\n              | none => (none, none)\n              | some (a, b') => (some a, some b'))\n          (some b'),\n      property := (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b') n = none → corec' (Corec.f f) (some b') (n + 1) = none) }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ ↑(tail\n        {\n          val :=\n            corec'\n              (fun x =>\n                match x with\n                | none => (none, none)\n                | some b =>\n                  match f b with\n                  | none => (none, none)\n                  | some (a, b') => (some a, some b'))\n              (some b),\n          property :=\n            (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b) n = none → corec' (Corec.f f) (some b) (n + 1) = none) }) =\n    ↑{\n        val :=\n          corec'\n            (fun x =>\n              match x with\n              | none => (none, none)\n              | some b =>\n                match f b with\n                | none => (none, none)\n                | some (a, b') => (some a, some b'))\n            (some b'),\n        property :=\n          (_ : ∀ {n : ℕ}, corec' (Corec.f f) (some b') n = none → corec' (Corec.f f) (some b') (n + 1) = none) }\n[PROOFSTEP]\ndsimp [corec, tail]\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ Stream'.tail\n      (corec'\n        (fun x =>\n          match x with\n          | none => (none, none)\n          | some b =>\n            match f b with\n            | none => (none, none)\n            | some (a, b') => (some a, some b'))\n        (some b)) =\n    corec'\n      (fun x =>\n        match x with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b'))\n      (some b')\n[PROOFSTEP]\nrw [Stream'.corec'_eq, Stream'.tail_cons]\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ corec'\n      (fun x =>\n        match x with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b'))\n      (match some b with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b')).snd =\n    corec'\n      (fun x =>\n        match x with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b'))\n      (some b')\n[PROOFSTEP]\ndsimp [Corec.f]\n[GOAL]\ncase some.mk.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → Option (α × β)\nb : β\nh✝¹ : corec' (Corec.f f) (some b) 0 = (Corec.f f (some b)).fst\nx✝ : Option (α × β)\nh✝ : f b = x✝\na : α\nb' : β\nh : f b = some (a, b')\n⊢ corec'\n      (fun x =>\n        match x with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b'))\n      (match f b with\n        | none => (none, none)\n        | some (a, b') => (some a, some b')).snd =\n    corec'\n      (fun x =>\n        match x with\n        | none => (none, none)\n        | some b =>\n          match f b with\n          | none => (none, none)\n          | some (a, b') => (some a, some b'))\n      (some b')\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ s₁ = s₂\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ↑s₁ = ↑s₂\n[PROOFSTEP]\napply Stream'.eq_of_bisim fun x y => ∃ s s' : Seq α, s.1 = x ∧ s'.1 = y ∧ R s s'\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ Stream'.IsBisimulation fun x y => ∃ s s', ↑s = x ∧ ↑s' = y ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\ndsimp [Stream'.IsBisimulation]\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ∀ ⦃s₁ s₂ : Stream' (Option α)⦄,\n    (∃ s s', ↑s = s₁ ∧ ↑s' = s₂ ∧ R s s') →\n      Stream'.head s₁ = Stream'.head s₂ ∧ ∃ s s', ↑s = Stream'.tail s₁ ∧ ↑s' = Stream'.tail s₂ ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nintro t₁ t₂ e\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\n⊢ Stream'.head t₁ = Stream'.head t₂ ∧ ∃ s s', ↑s = Stream'.tail t₁ ∧ ↑s' = Stream'.tail t₂ ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nexact\n  match t₁, t₂, e with\n  | _, _, ⟨s, s', rfl, rfl, r⟩ =>\n    by\n    suffices head s = head s' ∧ R (tail s) (tail s') from\n      And.imp id (fun r => ⟨tail s, tail s', by cases s; rfl, by cases s'; rfl, r⟩) this\n    have := bisim r; revert r this\n    apply recOn s _ _ <;> apply recOn s' _ _\n    · intro r _\n      constructor\n      · rfl\n      · assumption\n    · intro x s _ this\n      rw [destruct_nil, destruct_cons] at this \n      exact False.elim this\n    · intro x s _ this\n      rw [destruct_nil, destruct_cons] at this \n      exact False.elim this\n    · intro x s x' s' _ this\n      rw [destruct_cons, destruct_cons] at this \n      rw [head_cons, head_cons, tail_cons, tail_cons]\n      cases' this with h1 h2\n      constructor\n      rw [h1]\n      exact h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R s s'\n⊢ Stream'.head ↑s = Stream'.head ↑s' ∧ ∃ s_1 s'_1, ↑s_1 = Stream'.tail ↑s ∧ ↑s'_1 = Stream'.tail ↑s' ∧ R s_1 s'_1\n[PROOFSTEP]\nsuffices head s = head s' ∧ R (tail s) (tail s') from\n  And.imp id (fun r => ⟨tail s, tail s', by cases s; rfl, by cases s'; rfl, r⟩) this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr✝ : R s s'\nthis : head s = head s' ∧ R (tail s) (tail s')\nr : R (tail s) (tail s')\n⊢ ↑(tail s) = Stream'.tail ↑s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns' : Seq α\nval✝ : Stream' (Option α)\nproperty✝ : IsSeq val✝\nr✝ : R { val := val✝, property := property✝ } s'\nthis : head { val := val✝, property := property✝ } = head s' ∧ R (tail { val := val✝, property := property✝ }) (tail s')\nr : R (tail { val := val✝, property := property✝ }) (tail s')\n⊢ ↑(tail { val := val✝, property := property✝ }) = Stream'.tail ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr✝ : R s s'\nthis : head s = head s' ∧ R (tail s) (tail s')\nr : R (tail s) (tail s')\n⊢ ↑(tail s') = Stream'.tail ↑s'\n[PROOFSTEP]\ncases s'\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns : Seq α\nval✝ : Stream' (Option α)\nproperty✝ : IsSeq val✝\nr✝ : R s { val := val✝, property := property✝ }\nthis : head s = head { val := val✝, property := property✝ } ∧ R (tail s) (tail { val := val✝, property := property✝ })\nr : R (tail s) (tail { val := val✝, property := property✝ })\n⊢ ↑(tail { val := val✝, property := property✝ }) = Stream'.tail ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R s s'\n⊢ head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\nhave := bisim r\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R s s'\nthis : BisimO R (destruct s) (destruct s')\n⊢ head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\nrevert r this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ R s s' → BisimO R (destruct s) (destruct s') → head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\napply recOn s _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ R nil s' → BisimO R (destruct nil) (destruct s') → head nil = head s' ∧ R (tail nil) (tail s')\n[PROOFSTEP]\napply recOn s' _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    R (cons x s) s' →\n      BisimO R (destruct (cons x s)) (destruct s') → head (cons x s) = head s' ∧ R (tail (cons x s)) (tail s')\n[PROOFSTEP]\napply recOn s' _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ R nil nil → BisimO R (destruct nil) (destruct nil) → head nil = head nil ∧ R (tail nil) (tail nil)\n[PROOFSTEP]\nintro r _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R nil nil\nthis✝ : BisimO R (destruct nil) (destruct nil)\n⊢ head nil = head nil ∧ R (tail nil) (tail nil)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R nil nil\nthis✝ : BisimO R (destruct nil) (destruct nil)\n⊢ head nil = head nil\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\nr : R nil nil\nthis✝ : BisimO R (destruct nil) (destruct nil)\n⊢ R (tail nil) (tail nil)\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    R nil (cons x s) →\n      BisimO R (destruct nil) (destruct (cons x s)) → head nil = head (cons x s) ∧ R (tail nil) (tail (cons x s))\n[PROOFSTEP]\nintro x s _ this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s' : Seq α\nx : α\ns : Seq α\nr✝ : R nil (cons x s)\nthis : BisimO R (destruct nil) (destruct (cons x s))\n⊢ head nil = head (cons x s) ∧ R (tail nil) (tail (cons x s))\n[PROOFSTEP]\nrw [destruct_nil, destruct_cons] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s' : Seq α\nx : α\ns : Seq α\nr✝ : R nil (cons x s)\nthis : BisimO R none (some (x, s))\n⊢ head nil = head (cons x s) ∧ R (tail nil) (tail (cons x s))\n[PROOFSTEP]\nexact False.elim this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    R (cons x s) nil →\n      BisimO R (destruct (cons x s)) (destruct nil) → head (cons x s) = head nil ∧ R (tail (cons x s)) (tail nil)\n[PROOFSTEP]\nintro x s _ this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s' : Seq α\nx : α\ns : Seq α\nr✝ : R (cons x s) nil\nthis : BisimO R (destruct (cons x s)) (destruct nil)\n⊢ head (cons x s) = head nil ∧ R (tail (cons x s)) (tail nil)\n[PROOFSTEP]\nrw [destruct_nil, destruct_cons] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s' : Seq α\nx : α\ns : Seq α\nr✝ : R (cons x s) nil\nthis : BisimO R (some (x, s)) none\n⊢ head (cons x s) = head nil ∧ R (tail (cons x s)) (tail nil)\n[PROOFSTEP]\nexact False.elim this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Seq α\n⊢ ∀ (x : α) (s : Seq α) (x_1 : α) (s_1 : Seq α),\n    R (cons x_1 s_1) (cons x s) →\n      BisimO R (destruct (cons x_1 s_1)) (destruct (cons x s)) →\n        head (cons x_1 s_1) = head (cons x s) ∧ R (tail (cons x_1 s_1)) (tail (cons x s))\n[PROOFSTEP]\nintro x s x' s' _ this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nthis : BisimO R (destruct (cons x' s')) (destruct (cons x s))\n⊢ head (cons x' s') = head (cons x s) ∧ R (tail (cons x' s')) (tail (cons x s))\n[PROOFSTEP]\nrw [destruct_cons, destruct_cons] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nthis : BisimO R (some (x', s')) (some (x, s))\n⊢ head (cons x' s') = head (cons x s) ∧ R (tail (cons x' s')) (tail (cons x s))\n[PROOFSTEP]\nrw [head_cons, head_cons, tail_cons, tail_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nthis : BisimO R (some (x', s')) (some (x, s))\n⊢ some x' = some x ∧ R s' s\n[PROOFSTEP]\ncases' this with h1 h2\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nh1 : x' = x\nh2 : R s' s\n⊢ some x' = some x ∧ R s' s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.left\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nh1 : x' = x\nh2 : R s' s\n⊢ some x' = some x\ncase intro.right\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nh1 : x' = x\nh2 : R s' s\n⊢ R s' s\n[PROOFSTEP]\nrw [h1]\n[GOAL]\ncase intro.right\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns✝ s'✝ : Seq α\nx : α\ns : Seq α\nx' : α\ns' : Seq α\nr✝ : R (cons x' s') (cons x s)\nh1 : x' = x\nh2 : R s' s\n⊢ R s' s\n[PROOFSTEP]\nexact h2\n[GOAL]\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Seq α → Seq α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Seq α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nexact ⟨s₁, s₂, rfl, rfl, r⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nf g : Seq α → Seq β\nH : ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\n⊢ f s = g s\n[PROOFSTEP]\nrefine' eq_of_bisim (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) _ ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nf g : Seq α → Seq β\nH : ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\n⊢ IsBisimulation fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nf g : Seq α → Seq β\nH : ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\ns1 s2 : Seq β\nh : ∃ s, s1 = f s ∧ s2 = g s\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct s1) (destruct s2)\n[PROOFSTEP]\nrcases h with ⟨s, h1, h2⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Seq α\nf g : Seq α → Seq β\nH : ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\ns1 s2 : Seq β\ns : Seq α\nh1 : s1 = f s\nh2 : s2 = g s\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct s1) (destruct s2)\n[PROOFSTEP]\nrw [h1, h2]\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Seq α\nf g : Seq α → Seq β\nH : ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\ns1 s2 : Seq β\ns : Seq α\nh1 : s1 = f s\nh2 : s2 = g s\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = f s ∧ s2 = g s) (destruct (f s)) (destruct (g s))\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nn : ℕ\nh : List.get? l n = none\n⊢ List.get? l (n + 1) = none\n[PROOFSTEP]\nrw [List.get?_eq_none] at h ⊢\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\nn : ℕ\nh : List.length l ≤ n\n⊢ List.length l ≤ n + 1\n[PROOFSTEP]\nexact h.trans (Nat.le_succ n)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ ↑(a :: l) = cons a ↑l\n[PROOFSTEP]\next1 (_ | n)\n[GOAL]\ncase h.zero\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\n⊢ get? (↑(a :: l)) Nat.zero = get? (cons a ↑l) Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.succ\nα : Type u\nβ : Type v\nγ : Type w\na : α\nl : List α\nn : ℕ\n⊢ get? (↑(a :: l)) (Nat.succ n) = get? (cons a ↑l) (Nat.succ n)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' α\nn : ℕ\nh : map some s n = none\n⊢ map some s (n + 1) = none\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\n⊢ Stream'.map (Option.map f) s n = none → Stream'.map (Option.map f) s (n + 1) = none\n[PROOFSTEP]\ndsimp [Stream'.map, Stream'.nth]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\n⊢ Option.map f (s n) = none → Option.map f (s (n + 1)) = none\n[PROOFSTEP]\ninduction' e : s n with e\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\nx✝ : Option α\ne✝ : s n = x✝\ne : s n = none\n⊢ Option.map f none = none → Option.map f (s (n + 1)) = none\n[PROOFSTEP]\nintro\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\nx✝ : Option α\ne✝¹ : s n = x✝\ne✝ : α\ne : s n = some e✝\n⊢ Option.map f (some e✝) = none → Option.map f (s (n + 1)) = none\n[PROOFSTEP]\nintro\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\nx✝ : Option α\ne✝ : s n = x✝\ne : s n = none\na✝ : Option.map f none = none\n⊢ Option.map f (s (n + 1)) = none\n[PROOFSTEP]\nrw [al e]\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\nx✝ : Option α\ne✝ : s n = x✝\ne : s n = none\na✝ : Option.map f none = none\n⊢ Option.map f none = none\n[PROOFSTEP]\nassumption\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\nn : ℕ\nx✝ : Option α\ne✝¹ : s n = x✝\ne✝ : α\ne : s n = some e✝\na✝ : Option.map f (some e✝) = none\n⊢ Option.map f (s (n + 1)) = none\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ append nil s = s\n[PROOFSTEP]\napply coinduction2\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = append nil s ∧ s2 = s) (destruct (append nil s)) (destruct s)\n[PROOFSTEP]\nintro s\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = append nil s ∧ s2 = s) (destruct (append nil s)) (destruct s)\n[PROOFSTEP]\ndsimp [append]\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ match\n    destruct\n      (corec\n        (fun x =>\n          match destruct x.fst with\n          | none =>\n            match destruct x.snd with\n            | none => none\n            | some (a, b) => some (a, nil, b)\n          | some (a, s₁') => some (a, s₁', x.snd))\n        (nil, s)),\n    destruct s with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\nrw [corec_eq]\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ match\n    omap\n      (corec fun x =>\n        match destruct x.fst with\n        | none =>\n          match destruct x.snd with\n          | none => none\n          | some (a, b) => some (a, nil, b)\n        | some (a, s₁') => some (a, s₁', x.snd))\n      (match destruct (nil, s).fst with\n      | none =>\n        match destruct (nil, s).snd with\n        | none => none\n        | some (a, b) => some (a, nil, b)\n      | some (a, s₁') => some (a, s₁', (nil, s).snd)),\n    destruct s with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\ndsimp [append]\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ match\n    match\n      match destruct s with\n      | none => none\n      | some (a, b) => some (a, nil, b) with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            b),\n    destruct s with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn s _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ match\n    match\n      match destruct nil with\n      | none => none\n      | some (a, b) => some (a, nil, b) with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            b),\n    destruct nil with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    match\n      match\n        match destruct (cons x s) with\n        | none => none\n        | some (a, b) => some (a, nil, b) with\n      | none => none\n      | some (a, b) =>\n        some\n          (a,\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              b),\n      destruct (cons x s) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧\n        ∃ s_1,\n          s =\n              corec\n                (fun x =>\n                  match destruct x.fst with\n                  | none =>\n                    match destruct x.snd with\n                    | none => none\n                    | some (a, b) => some (a, nil, b)\n                  | some (a, s₁') => some (a, s₁', x.snd))\n                (nil, s_1) ∧\n            s' = s_1\n    | x, x_1 => False\n[PROOFSTEP]\nintro x s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ match\n    match\n      match destruct (cons x s) with\n      | none => none\n      | some (a, b) => some (a, nil, b) with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            b),\n    destruct (cons x s) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\nrw [destruct_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ match\n    match\n      match some (x, s) with\n      | none => none\n      | some (a, b) => some (a, nil, b) with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            b),\n    some (x, s) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧\n      ∃ s_1,\n        s =\n            corec\n              (fun x =>\n                match destruct x.fst with\n                | none =>\n                  match destruct x.snd with\n                  | none => none\n                  | some (a, b) => some (a, nil, b)\n                | some (a, s₁') => some (a, s₁', x.snd))\n              (nil, s_1) ∧\n          s' = s_1\n  | x, x_1 => False\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ x = x ∧\n    ∃ s_1,\n      corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            (nil, s) =\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            (nil, s_1) ∧\n        s = s_1\n[PROOFSTEP]\nexact ⟨rfl, s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns t : Seq α\n⊢ destruct (append (cons a s) t) = some (a, append s t)\n[PROOFSTEP]\ndsimp [append]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns t : Seq α\n⊢ destruct\n      (corec\n        (fun x =>\n          match destruct x.fst with\n          | none =>\n            match destruct x.snd with\n            | none => none\n            | some (a, b) => some (a, nil, b)\n          | some (a, s₁') => some (a, s₁', x.snd))\n        (cons a s, t)) =\n    some\n      (a,\n        corec\n          (fun x =>\n            match destruct x.fst with\n            | none =>\n              match destruct x.snd with\n              | none => none\n              | some (a, b) => some (a, nil, b)\n            | some (a, s₁') => some (a, s₁', x.snd))\n          (s, t))\n[PROOFSTEP]\nrw [corec_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns t : Seq α\n⊢ omap\n      (corec fun x =>\n        match destruct x.fst with\n        | none =>\n          match destruct x.snd with\n          | none => none\n          | some (a, b) => some (a, nil, b)\n        | some (a, s₁') => some (a, s₁', x.snd))\n      (match destruct (cons a s, t).fst with\n      | none =>\n        match destruct (cons a s, t).snd with\n        | none => none\n        | some (a, b) => some (a, nil, b)\n      | some (a_1, s₁') => some (a_1, s₁', (cons a s, t).snd)) =\n    some\n      (a,\n        corec\n          (fun x =>\n            match destruct x.fst with\n            | none =>\n              match destruct x.snd with\n              | none => none\n              | some (a, b) => some (a, nil, b)\n            | some (a, s₁') => some (a, s₁', x.snd))\n          (s, t))\n[PROOFSTEP]\ndsimp [append]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns t : Seq α\n⊢ (match\n      match destruct (cons a s) with\n      | none =>\n        match destruct t with\n        | none => none\n        | some (a, b) => some (a, nil, b)\n      | some (a, s₁') => some (a, s₁', t) with\n    | none => none\n    | some (a, b) =>\n      some\n        (a,\n          corec\n            (fun x =>\n              match destruct x.fst with\n              | none =>\n                match destruct x.snd with\n                | none => none\n                | some (a, b) => some (a, nil, b)\n              | some (a, s₁') => some (a, s₁', x.snd))\n            b)) =\n    some\n      (a,\n        corec\n          (fun x =>\n            match destruct x.fst with\n            | none =>\n              match destruct x.snd with\n              | none => none\n              | some (a, b) => some (a, nil, b)\n            | some (a, s₁') => some (a, s₁', x.snd))\n          (s, t))\n[PROOFSTEP]\nrw [destruct_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ append s nil = s\n[PROOFSTEP]\napply coinduction2 s\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ ∀ (s : Seq α), BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append s nil)) (destruct s)\n[PROOFSTEP]\nintro s\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append s nil)) (destruct s)\n[PROOFSTEP]\napply recOn s _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append nil nil)) (destruct nil)\n[PROOFSTEP]\ntrivial\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append (cons x s) nil)) (destruct (cons x s))\n[PROOFSTEP]\nintro x s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (destruct (append (cons x s) nil)) (destruct (cons x s))\n[PROOFSTEP]\nrw [cons_append, destruct_cons, destruct_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = append s nil ∧ s2 = s) (some (x, append s nil)) (some (x, s))\n[PROOFSTEP]\ndsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ s✝ : Seq α\nx : α\ns : Seq α\n⊢ x = x ∧ ∃ s_1, append s nil = append s_1 nil ∧ s = s_1\n[PROOFSTEP]\nexact ⟨rfl, s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t u : Seq α\n⊢ append (append s t) u = append s (append t u)\n[PROOFSTEP]\napply eq_of_bisim fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns t u : Seq α\n⊢ IsBisimulation fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns t u s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\n⊢ BisimO (fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)) (destruct s1) (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | _, _, ⟨s, t, u, rfl, rfl⟩ => by\n    apply recOn s <;> simp\n    · apply recOn t <;> simp\n      · apply recOn u <;> simp\n        · intro _ u\n          refine' ⟨nil, nil, u, _, _⟩ <;> simp\n      · intro _ t\n        refine' ⟨nil, t, u, _, _⟩ <;> simp\n    · intro _ s\n      exact ⟨s, t, u, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u))\n    (destruct (append (append s t) u)) (destruct (append s (append t u)))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u))\n    (destruct (append (append nil t) u)) (destruct (append nil (append t u)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u))\n      (destruct (append (append (cons x s) t) u)) (destruct (append (cons x s) (append t u)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ match destruct (append t u), destruct (append t u) with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn t\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ match destruct (append nil u), destruct (append nil u) with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    match destruct (append (cons x s) u), destruct (append (cons x s) u) with\n    | none, none => True\n    | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ match destruct u, destruct u with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn u\n[GOAL]\ncase h1.h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ match destruct nil, destruct nil with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    match destruct (cons x s), destruct (cons x s) with\n    | none, none => True\n    | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t u, s = append (append s_1 t) u ∧ s' = append s_1 (append t u)\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ α → ∀ (s : Seq α), ∃ s_1 t u, s = append (append s_1 t) u ∧ s = append s_1 (append t u)\n[PROOFSTEP]\nintro _ u\n[GOAL]\ncase h1.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝¹ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u✝ : Seq α\nx✝ : α\nu : Seq α\n⊢ ∃ s t u_1, u = append (append s t) u_1 ∧ u = append s (append t u_1)\n[PROOFSTEP]\nrefine' ⟨nil, nil, u, _, _⟩\n[GOAL]\ncase h1.h1.h2.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝¹ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u✝ : Seq α\nx✝ : α\nu : Seq α\n⊢ u = append (append nil nil) u\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝¹ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u✝ : Seq α\nx✝ : α\nu : Seq α\n⊢ u = append nil (append nil u)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ α → ∀ (s : Seq α), ∃ s_1 t u_1, append s u = append (append s_1 t) u_1 ∧ append s u = append s_1 (append t u_1)\n[PROOFSTEP]\nintro _ t\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝¹ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t✝ u : Seq α\nx✝ : α\nt : Seq α\n⊢ ∃ s t_1 u_1, append t u = append (append s t_1) u_1 ∧ append t u = append s (append t_1 u_1)\n[PROOFSTEP]\nrefine' ⟨nil, t, u, _, _⟩\n[GOAL]\ncase h1.h2.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝¹ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t✝ u : Seq α\nx✝ : α\nt : Seq α\n⊢ append t u = append (append nil t) u\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝¹ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t✝ u : Seq α\nx✝ : α\nt : Seq α\n⊢ append t u = append nil (append t u)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns t u : Seq α\n⊢ α →\n    ∀ (s : Seq α),\n      ∃ s_1 t_1 u_1,\n        append (append s t) u = append (append s_1 t_1) u_1 ∧ append s (append t u) = append s_1 (append t_1 u_1)\n[PROOFSTEP]\nintro _ s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ t✝ u✝ s1 s2 : Seq α\nh : ∃ s t u, s1 = append (append s t) u ∧ s2 = append s (append t u)\ns✝ t u : Seq α\nx✝ : α\ns : Seq α\n⊢ ∃ s_1 t_1 u_1,\n    append (append s t) u = append (append s_1 t_1) u_1 ∧ append s (append t u) = append s_1 (append t_1 u_1)\n[PROOFSTEP]\nexact ⟨s, t, u, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\ns t u : Seq α\n⊢ ∃ s_1 t_1 u_1,\n    append (append s t) u = append (append s_1 t_1) u_1 ∧ append s (append t u) = append s_1 (append t_1 u_1)\n[PROOFSTEP]\nexact ⟨s, t, u, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Stream' (Option α)\nal : IsSeq s\n⊢ map f (cons a { val := s, property := al }) = cons (f a) (map f { val := s, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Stream' (Option α)\nal : IsSeq s\n⊢ ↑(map f (cons a { val := s, property := al })) = ↑(cons (f a) (map f { val := s, property := al }))\n[PROOFSTEP]\ndsimp [cons, map]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Stream' (Option α)\nal : IsSeq s\n⊢ Stream'.map (Option.map f) (some a :: s) = some (f a) :: Stream'.map (Option.map f) s\n[PROOFSTEP]\nrw [Stream'.map_cons]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Stream' (Option α)\nal : IsSeq s\n⊢ Option.map f (some a) :: Stream'.map (Option.map f) s = some (f a) :: Stream'.map (Option.map f) s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' (Option α)\nal : IsSeq s\n⊢ map id { val := s, property := al } = { val := s, property := al }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' (Option α)\nal : IsSeq s\n⊢ ↑(map id { val := s, property := al }) = ↑{ val := s, property := al }\n[PROOFSTEP]\ndsimp [map]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' (Option α)\nal : IsSeq s\n⊢ Stream'.map (Option.map id) s = s\n[PROOFSTEP]\nrw [Option.map_id, Stream'.map_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\n⊢ map f (tail { val := s, property := al }) = tail (map f { val := s, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : IsSeq s\n⊢ ↑(map f (tail { val := s, property := al })) = ↑(tail (map f { val := s, property := al }))\n[PROOFSTEP]\ndsimp [tail, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\n⊢ map (g ∘ f) { val := s, property := al } = map g (map f { val := s, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\n⊢ ↑(map (g ∘ f) { val := s, property := al }) = ↑(map g (map f { val := s, property := al }))\n[PROOFSTEP]\ndsimp [map]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\n⊢ Stream'.map (Option.map (g ∘ f)) s = Stream'.map (Option.map g ∘ Option.map f) s\n[PROOFSTEP]\napply congr_arg fun f : _ → Option γ => Stream'.map f s\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\n⊢ Option.map (g ∘ f) = Option.map g ∘ Option.map f\n[PROOFSTEP]\next ⟨⟩\n[GOAL]\ncase a.h.none.a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\na✝ : γ\n⊢ a✝ ∈ Option.map (g ∘ f) none ↔ a✝ ∈ (Option.map g ∘ Option.map f) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.some.a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : IsSeq s\nval✝ : α\na✝ : γ\n⊢ a✝ ∈ Option.map (g ∘ f) (some val✝) ↔ a✝ ∈ (Option.map g ∘ Option.map f) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns t : Seq α\n⊢ map f (append s t) = append (map f s) (map f t)\n[PROOFSTEP]\napply eq_of_bisim (fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)) _ ⟨s, t, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns t : Seq α\n⊢ IsBisimulation fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns t : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\n⊢ BisimO (fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)) (destruct s1) (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | _, _, ⟨s, t, rfl, rfl⟩ => by\n    apply recOn s <;> simp\n    · apply recOn t <;> simp\n      · intro _ t\n        refine' ⟨nil, t, _, _⟩ <;> simp\n    · intro _ s\n      refine' ⟨s, t, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)) (destruct (map f (append s t)))\n    (destruct (append (map f s) (map f t)))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t))\n    (destruct (map f (append nil t))) (destruct (append (map f nil) (map f t)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t))\n      (destruct (map f (append (cons x s) t))) (destruct (append (map f (cons x s)) (map f t)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ match destruct (map f t), destruct (map f t) with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t, s = map f (append s_1 t) ∧ s' = append (map f s_1) (map f t)\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn t\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ match destruct (map f nil), destruct (map f nil) with\n  | none, none => True\n  | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t, s = map f (append s_1 t) ∧ s' = append (map f s_1) (map f t)\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    match destruct (map f (cons x s)), destruct (map f (cons x s)) with\n    | none, none => True\n    | some (a, s), some (a', s') => a = a' ∧ ∃ s_1 t, s = map f (append s_1 t) ∧ s' = append (map f s_1) (map f t)\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ α → ∀ (s : Seq α), ∃ s_1 t, map f s = map f (append s_1 t) ∧ map f s = append (map f s_1) (map f t)\n[PROOFSTEP]\nintro _ t\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝¹ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t✝ : Seq α\nx✝ : α\nt : Seq α\n⊢ ∃ s t_1, map f t = map f (append s t_1) ∧ map f t = append (map f s) (map f t_1)\n[PROOFSTEP]\nrefine' ⟨nil, t, _, _⟩\n[GOAL]\ncase h1.h2.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝¹ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t✝ : Seq α\nx✝ : α\nt : Seq α\n⊢ map f t = map f (append nil t)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝¹ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t✝ : Seq α\nx✝ : α\nt : Seq α\n⊢ map f t = append (map f nil) (map f t)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns t : Seq α\n⊢ α →\n    ∀ (s : Seq α),\n      ∃ s_1 t_1,\n        map f (append s t) = map f (append s_1 t_1) ∧ append (map f s) (map f t) = append (map f s_1) (map f t_1)\n[PROOFSTEP]\nintro _ s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝¹ t✝ : Seq α\ns1 s2 : Seq β\nh : ∃ s t, s1 = map f (append s t) ∧ s2 = append (map f s) (map f t)\ns✝ t : Seq α\nx✝ : α\ns : Seq α\n⊢ ∃ s_1 t_1, map f (append s t) = map f (append s_1 t_1) ∧ append (map f s) (map f t) = append (map f s_1) (map f t_1)\n[PROOFSTEP]\nrefine' ⟨s, t, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nS : Seq (Seq1 α)\n⊢ destruct (join (cons (a, nil) S)) = some (a, join S)\n[PROOFSTEP]\nsimp [join]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ destruct (join (cons (a, cons b s) S)) = some (a, join (cons (b, s) S))\n[PROOFSTEP]\nsimp [join]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ join (cons (a, s) S) = cons a (append s (join S))\n[PROOFSTEP]\napply\n  eq_of_bisim (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))) _\n    (Or.inr ⟨a, s, S, rfl, rfl⟩)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ IsBisimulation fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))) (destruct s1)\n    (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | s, _, Or.inl <| Eq.refl s => by\n    apply recOn s; · trivial\n    · intro x s\n      rw [destruct_cons]\n      exact ⟨rfl, Or.inl rfl⟩\n  | _, _, Or.inr ⟨a, s, S, rfl, rfl⟩ => by\n    apply recOn s\n    · simp [join_cons_cons, join_cons_nil]\n    · intro x s\n      simp [join_cons_cons, join_cons_nil]\n      refine' Or.inr ⟨x, s, S, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns✝ : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\ns : Seq α\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))) (destruct s)\n    (destruct s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns✝ : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\ns : Seq α\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))) (destruct nil)\n    (destruct nil)\n[PROOFSTEP]\ntrivial\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns✝ : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\ns : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n      (destruct (cons x s)) (destruct (cons x s))\n[PROOFSTEP]\nintro x s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns✝¹ : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\ns✝ : Seq α\nx : α\ns : Seq α\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n    (destruct (cons x s)) (destruct (cons x s))\n[PROOFSTEP]\nrw [destruct_cons]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns✝¹ : Seq α\nS : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\ns✝ : Seq α\nx : α\ns : Seq α\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))) (some (x, s))\n    (some (x, s))\n[PROOFSTEP]\nexact ⟨rfl, Or.inl rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns✝ : Seq α\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n    (destruct (join (cons (a, s) S))) (destruct (cons a (append s (join S))))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns✝ : Seq α\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n    (destruct (join (cons (a, nil) S))) (destruct (cons a (append nil (join S))))\n[PROOFSTEP]\nsimp [join_cons_cons, join_cons_nil]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns✝ : Seq α\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n      (destruct (join (cons (a, cons x s) S))) (destruct (cons a (append (cons x s) (join S))))\n[PROOFSTEP]\nintro x s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns✝¹ : Seq α\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\na : α\ns✝ : Seq α\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ BisimO (fun s1 s2 => s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S)))\n    (destruct (join (cons (a, cons x s) S))) (destruct (cons a (append (cons x s) (join S))))\n[PROOFSTEP]\nsimp [join_cons_cons, join_cons_nil]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns✝¹ : Seq α\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : s1 = s2 ∨ ∃ a s S, s1 = join (cons (a, s) S) ∧ s2 = cons a (append s (join S))\na : α\ns✝ : Seq α\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ join (cons (x, s) S) = cons x (append s (join S)) ∨\n    ∃ a s_1 S_1,\n      join (cons (x, s) S) = join (cons (a, s_1) S_1) ∧ cons x (append s (join S)) = cons a (append s_1 (join S_1))\n[PROOFSTEP]\nrefine' Or.inr ⟨x, s, S, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\n⊢ join (append S T) = append (join S) (join T)\n[PROOFSTEP]\napply eq_of_bisim fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\n⊢ IsBisimulation fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\n⊢ BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))\n    (destruct s1) (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | _, _, ⟨s, S, T, rfl, rfl⟩ => by\n    apply recOn s <;> simp\n    · apply recOn S <;> simp\n      · apply recOn T\n        · simp\n        · intro s T\n          cases' s with a s; simp\n          refine' ⟨s, nil, T, _, _⟩ <;> simp\n      · intro s S\n        cases' s with a s; simp\n        exact ⟨s, S, T, rfl, rfl⟩\n    · intro _ s\n      exact ⟨s, S, T, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))\n    (destruct (append s (join (append S T)))) (destruct (append s (append (join S) (join T))))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))\n    (destruct (append nil (join (append S T)))) (destruct (append nil (append (join S) (join T))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))\n      (destruct (append (cons x s) (join (append S T)))) (destruct (append (cons x s) (append (join S) (join T))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ match destruct (join (append S T)), destruct (append (join S) (join T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn S\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ match destruct (join (append nil T)), destruct (append (join nil) (join T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),\n    match destruct (join (append (cons x s) T)), destruct (append (join (cons x s)) (join T)) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ match destruct (join T), destruct (join T) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn T\n[GOAL]\ncase h1.h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ match destruct (join nil), destruct (join nil) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),\n    match destruct (join (cons x s)), destruct (join (cons x s)) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n    | x, x_1 => False\n[PROOFSTEP]\nintro s T\n[GOAL]\ncase h1.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝¹ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T✝ : Seq (Seq1 α)\ns : Seq1 α\nT : Seq (Seq1 α)\n⊢ match destruct (join (cons s T)), destruct (join (cons s T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\ncases' s with a s\n[GOAL]\ncase h1.h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝¹ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T✝ T : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ match destruct (join (cons (a, s) T)), destruct (join (cons (a, s) T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝¹ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T✝ T : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ ∃ s_1 S T_1,\n    append s (join T) = append s_1 (join (append S T_1)) ∧ append s (join T) = append s_1 (append (join S) (join T_1))\n[PROOFSTEP]\nrefine' ⟨s, nil, T, _, _⟩\n[GOAL]\ncase h1.h1.h2.mk.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝¹ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T✝ T : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ append s (join T) = append s (join (append nil T))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.h2.mk.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝¹ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T✝ T : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ append s (join T) = append s (append (join nil) (join T))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),\n    match destruct (join (cons x (append s T))), destruct (append (join (cons x s)) (join T)) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n    | x, x_1 => False\n[PROOFSTEP]\nintro s S\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝¹ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS✝ T : Seq (Seq1 α)\ns : Seq1 α\nS : Seq (Seq1 α)\n⊢ match destruct (join (cons s (append S T))), destruct (append (join (cons s S)) (join T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\ncases' s with a s\n[GOAL]\ncase h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nS✝¹ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS✝ T S : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ match destruct (join (cons (a, s) (append S T))), destruct (append (join (cons (a, s) S)) (join T)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nS✝¹ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS✝ T S : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ ∃ s_1 S_1 T_1,\n    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧\n      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))\n[PROOFSTEP]\nexact ⟨s, S, T, rfl, rfl⟩\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns : Seq α\nS T : Seq (Seq1 α)\n⊢ α →\n    ∀ (s : Seq α),\n      ∃ s_1 S_1 T_1,\n        append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧\n          append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))\n[PROOFSTEP]\nintro _ s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nS✝ T✝ : Seq (Seq1 α)\ns1 s2 : Seq α\nh : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))\ns✝ : Seq α\nS T : Seq (Seq1 α)\nx✝ : α\ns : Seq α\n⊢ ∃ s_1 S_1 T_1,\n    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧\n      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))\n[PROOFSTEP]\nexact ⟨s, S, T, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\n⊢ ∃ s S_1 T_1,\n    join (append S T) = append s (join (append S_1 T_1)) ∧\n      append (join S) (join T) = append s (append (join S_1) (join T_1))\n[PROOFSTEP]\nrefine' ⟨nil, S, T, _, _⟩\n[GOAL]\ncase r.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\n⊢ join (append S T) = append nil (join (append S T))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase r.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nS T : Seq (Seq1 α)\n⊢ append (join S) (join T) = append nil (append (join S) (join T))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Stream' α\n⊢ ↑(a :: s) = cons a ↑s\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Stream' α\n⊢ ↑↑(a :: s) = ↑(cons a ↑s)\n[PROOFSTEP]\nsimp [ofStream, cons]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Stream' α\n⊢ Stream'.map some (a :: s) = some a :: Stream'.map some s\n[PROOFSTEP]\nrw [Stream'.map_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl l' : List α\n⊢ ↑(l ++ l') = append ↑l ↑l'\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\n⊢ ↑([] ++ l') = append ↑[] ↑l'\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\nl' : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ↑(tail✝ ++ l') = append ↑tail✝ ↑l'\n⊢ ↑(head✝ :: tail✝ ++ l') = append ↑(head✝ :: tail✝) ↑l'\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nl : List α\ns : Stream' α\n⊢ ↑(l ++ₛ s) = append ↑l ↑s\n[PROOFSTEP]\ninduction l\n[GOAL]\ncase nil\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' α\n⊢ ↑([] ++ₛ s) = append ↑[] ↑s\n[PROOFSTEP]\nsimp [*, Stream'.nil_append_stream, Stream'.cons_append_stream]\n[GOAL]\ncase cons\nα : Type u\nβ : Type v\nγ : Type w\ns : Stream' α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ↑(tail✝ ++ₛ s) = append ↑tail✝ ↑s\n⊢ ↑(head✝ :: tail✝ ++ₛ s) = append ↑(head✝ :: tail✝) ↑s\n[PROOFSTEP]\nsimp [*, Stream'.nil_append_stream, Stream'.cons_append_stream]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ drop (tail s) n = drop s (n + 1)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ drop (tail s) n = drop s (1 + n)\n[PROOFSTEP]\nsymm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ drop s (1 + n) = drop (tail s) n\n[PROOFSTEP]\napply dropn_add\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nn : ℕ\n⊢ head (drop s n) = get? s n\n[PROOFSTEP]\ninduction' n with n IH generalizing s\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ head (drop s Nat.zero) = get? s Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Seq α\nn : ℕ\nIH : ∀ (s : Seq α), head (drop s n) = get? s n\ns : Seq α\n⊢ head (drop s (Nat.succ n)) = get? s (Nat.succ n)\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, ← get?_tail, ← dropn_tail]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Seq α\nn : ℕ\nIH : ∀ (s : Seq α), head (drop s n) = get? s n\ns : Seq α\n⊢ head (drop (tail s) n) = get? (tail s) n\n[PROOFSTEP]\napply IH\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\nh : b ∈ map f s\n⊢ ∃ a, a ∈ s ∧ f a = b\n[PROOFSTEP]\nmatch s with\n| ⟨g, al⟩ =>\n  let ⟨o, om, oe⟩ := @Stream'.exists_of_mem_map _ _ (Option.map f) (some b) g h\n  cases' o with a\n  · injection oe\n  · injection oe with h'; exact ⟨a, om, h'⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\ng : Stream' (Option α)\nal : IsSeq g\nh : b ∈ map f { val := g, property := al }\n⊢ ∃ a, a ∈ { val := g, property := al } ∧ f a = b\n[PROOFSTEP]\nlet ⟨o, om, oe⟩ := @Stream'.exists_of_mem_map _ _ (Option.map f) (some b) g h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\ng : Stream' (Option α)\nal : IsSeq g\nh : b ∈ map f { val := g, property := al }\no : Option α\nom : o ∈ g\noe : Option.map f o = some b\n⊢ ∃ a, a ∈ { val := g, property := al } ∧ f a = b\n[PROOFSTEP]\ncases' o with a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\ng : Stream' (Option α)\nal : IsSeq g\nh : b ∈ map f { val := g, property := al }\nom : none ∈ g\noe : Option.map f none = some b\n⊢ ∃ a, a ∈ { val := g, property := al } ∧ f a = b\n[PROOFSTEP]\ninjection oe\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\ng : Stream' (Option α)\nal : IsSeq g\nh : b ∈ map f { val := g, property := al }\na : α\nom : some a ∈ g\noe : Option.map f (some a) = some b\n⊢ ∃ a, a ∈ { val := g, property := al } ∧ f a = b\n[PROOFSTEP]\ninjection oe with h'\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Seq α\ng : Stream' (Option α)\nal : IsSeq g\nh : b ∈ map f { val := g, property := al }\na : α\nom : some a ∈ g\nh' : f a = b\n⊢ ∃ a, a ∈ { val := g, property := al } ∧ f a = b\n[PROOFSTEP]\nexact ⟨a, om, h'⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ append s₁ s₂\n⊢ a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\nhave := h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh this : a ∈ append s₁ s₂\n⊢ a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\nrevert this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ append s₁ s₂\n⊢ a ∈ append s₁ s₂ → a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\ngeneralize e : append s₁ s₂ = ss\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ append s₁ s₂\nss : Seq α\ne : append s₁ s₂ = ss\n⊢ a ∈ ss → a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh✝ : a ∈ append s₁ s₂\nss : Seq α\ne : append s₁ s₂ = ss\nh : a ∈ ss\n⊢ a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\nrevert s₁\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\n⊢ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = ss → a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\napply mem_rec_on h _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\n⊢ ∀ (b : α) (s' : Seq α),\n    (a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂) →\n      ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = cons b s' → a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\nintro b s' o s₁\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\n⊢ a ∈ append s₁ s₂ → append s₁ s₂ = cons b s' → a ∈ s₁ ∨ a ∈ s₂\n[PROOFSTEP]\napply s₁.recOn _ fun c t₁ => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\n⊢ a ∈ append nil s₂ → append nil s₂ = cons b s' → a ∈ nil ∨ a ∈ s₂\n[PROOFSTEP]\nintro m _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nm : a ∈ append nil s₂\ne✝ : append nil s₂ = cons b s'\n⊢ a ∈ nil ∨ a ∈ s₂\n[PROOFSTEP]\napply Or.inr\n[GOAL]\ncase h\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nm : a ∈ append nil s₂\ne✝ : append nil s₂ = cons b s'\n⊢ a ∈ s₂\n[PROOFSTEP]\nsimpa using m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\n⊢ ∀ (c : α) (t₁ : Seq α), a ∈ append (cons c t₁) s₂ → append (cons c t₁) s₂ = cons b s' → a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\nintro c t₁ m e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\nhave this := congr_arg destruct e\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\ncases' show a = c ∨ a ∈ append t₁ s₂ by simpa using m with e' m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\n⊢ a = c ∨ a ∈ append t₁ s₂\n[PROOFSTEP]\nsimpa using m\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\ne' : a = c\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\nrw [e']\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\ne' : a = c\n⊢ c ∈ cons c t₁ ∨ c ∈ s₂\n[PROOFSTEP]\nexact Or.inl (mem_cons _ _)\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm✝ : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\nm : a ∈ append t₁ s₂\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\ncases' show c = b ∧ append t₁ s₂ = s' by simpa with i1 i2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm✝ : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\nm : a ∈ append t₁ s₂\n⊢ c = b ∧ append t₁ s₂ = s'\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase inr.intro\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' : Seq α\no : a = b ∨ ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\ns₁ : Seq α\nc : α\nt₁ : Seq α\nm✝ : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\nm : a ∈ append t₁ s₂\ni1 : c = b\ni2 : append t₁ s₂ = s'\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\ncases' o with e' IH\n[GOAL]\ncase inr.intro.inl\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' s₁ : Seq α\nc : α\nt₁ : Seq α\nm✝ : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\nm : a ∈ append t₁ s₂\ni1 : c = b\ni2 : append t₁ s₂ = s'\ne' : a = b\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\nsimp [i1, e']\n[GOAL]\ncase inr.intro.inr\nα : Type u\nβ : Type v\nγ : Type w\ns₂ : Seq α\na : α\nss : Seq α\nh : a ∈ ss\nb : α\ns' s₁ : Seq α\nc : α\nt₁ : Seq α\nm✝ : a ∈ append (cons c t₁) s₂\ne : append (cons c t₁) s₂ = cons b s'\nthis : destruct (append (cons c t₁) s₂) = destruct (cons b s')\nm : a ∈ append t₁ s₂\ni1 : c = b\ni2 : append t₁ s₂ = s'\nIH : ∀ {s₁ : Seq α}, a ∈ append s₁ s₂ → append s₁ s₂ = s' → a ∈ s₁ ∨ a ∈ s₂\n⊢ a ∈ cons c t₁ ∨ a ∈ s₂\n[PROOFSTEP]\nexact Or.imp_left (mem_cons_of_mem _) (IH m i2)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ s₁\n⊢ a ∈ append s₁ s₂\n[PROOFSTEP]\napply mem_rec_on h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ s₁\n⊢ ∀ (b : α) (s' : Seq α), a = b ∨ a ∈ append s' s₂ → a ∈ append (cons b s') s₂\n[PROOFSTEP]\nintros\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns₁ s₂ : Seq α\na : α\nh : a ∈ s₁\nb✝ : α\ns'✝ : Seq α\na✝ : a = b✝ ∨ a ∈ append s'✝ s₂\n⊢ a ∈ append (cons b✝ s'✝) s₂\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx : α\n⊢ enum (cons x s) = cons (0, x) (map (Prod.map Nat.succ id) (enum s))\n[PROOFSTEP]\next ⟨n⟩ : 1\n[GOAL]\ncase h.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx : α\n⊢ get? (enum (cons x s)) Nat.zero = get? (cons (0, x) (map (Prod.map Nat.succ id) (enum s))) Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx : α\nn✝ : ℕ\n⊢ get? (enum (cons x s)) (Nat.succ n✝) = get? (cons (0, x) (map (Prod.map Nat.succ id) (enum s))) (Nat.succ n✝)\n[PROOFSTEP]\nsimp only [get?_enum, get?_cons_succ, map_get?, Option.map_map]\n[GOAL]\ncase h.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\nx : α\nn✝ : ℕ\n⊢ Option.map (Prod.mk (Nat.succ n✝)) (get? s n✝) = Option.map (Prod.map Nat.succ id ∘ Prod.mk n✝) (get? s n✝)\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Seq α\n⊢ map id (a, s) = (a, s)\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ join ((a, Seq.cons b s), S) = (a, Seq.join (Seq.cons (b, s) S))\n[PROOFSTEP]\ndsimp [join]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na b : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ (match destruct (Seq.cons b s) with\n    | none => (a, Seq.join S)\n    | some s' => (a, Seq.join (Seq.cons s' S))) =\n    (a, Seq.join (Seq.cons (b, s) S))\n[PROOFSTEP]\nrw [destruct_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ Seq.join (Seq.map ret s) = s\n[PROOFSTEP]\napply coinduction2 s\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq α\n⊢ ∀ (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s, s1 = Seq.join (Seq.map ret s) ∧ s2 = s) (destruct (Seq.join (Seq.map ret s))) (destruct s)\n[PROOFSTEP]\nintro s\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = Seq.join (Seq.map ret s) ∧ s2 = s) (destruct (Seq.join (Seq.map ret s))) (destruct s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase H.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ BisimO (fun s1 s2 => ∃ s, s1 = Seq.join (Seq.map ret s) ∧ s2 = s) (destruct (Seq.join (Seq.map ret nil)))\n    (destruct nil)\n[PROOFSTEP]\nsimp [ret]\n[GOAL]\ncase H.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ s : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s, s1 = Seq.join (Seq.map ret s) ∧ s2 = s) (destruct (Seq.join (Seq.map ret (Seq.cons x s))))\n      (destruct (Seq.cons x s))\n[PROOFSTEP]\nsimp [ret]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\n⊢ bind (a, s) (ret ∘ f) = map f (a, s)\n[PROOFSTEP]\ndsimp [bind, map]\n  -- Porting note: Was `rw [map_comp]; simp [Function.comp, ret]`\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\n⊢ join (ret (f a), Seq.map (ret ∘ f) s) = (f a, Seq.map f s)\n[PROOFSTEP]\nrw [map_comp, ret]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\n⊢ join ((f a, nil), Seq.map ret (Seq.map f s)) = (f a, Seq.map f s)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Seq1 β\n⊢ bind (ret a) f = f a\n[PROOFSTEP]\nsimp [ret, bind, map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Seq1 β\n⊢ join (f a, nil) = f a\n[PROOFSTEP]\ncases' f a with a s\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nf : α → Seq1 β\na : β\ns : Seq β\n⊢ join ((a, s), nil) = (a, s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase mk.h1\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nf : α → Seq1 β\na : β\ns : Seq β\n⊢ join ((a, nil), nil) = (a, nil)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h2\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nf : α → Seq1 β\na : β\ns : Seq β\n⊢ ∀ (x : β) (s : Seq β), join ((a, Seq.cons x s), nil) = (a, Seq.cons x s)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.h1\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nf : α → Seq1 β\na : β\ns : Seq β\n⊢ join ((a, nil), nil) = (a, nil)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.h2\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nf : α → Seq1 β\na : β\ns : Seq β\nx✝ : β\ns✝ : Seq β\n⊢ join ((a, Seq.cons x✝ s✝), nil) = (a, Seq.cons x✝ s✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\n⊢ Seq.map f (Seq.join S) = Seq.join (Seq.map (map f) S)\n[PROOFSTEP]\napply\n  Seq.eq_of_bisim fun s1 s2 =>\n    ∃ s S, s1 = Seq.append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\n⊢ Seq.IsBisimulation fun s1 s2 =>\n    ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\n⊢ BisimO (fun s1 s2 => ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S)))\n    (destruct s1) (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | _, _, ⟨s, S, rfl, rfl⟩ => by\n    apply recOn s <;> simp\n    · apply recOn S <;> simp\n      · intro x S\n        cases' x with a s; simp [map]\n        exact ⟨_, _, rfl, rfl⟩\n    · intro _ s\n      refine' ⟨s, S, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S)))\n    (destruct (append s (Seq.map f (Seq.join S)))) (destruct (append s (Seq.join (Seq.map (map f) S))))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ BisimO (fun s1 s2 => ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S)))\n    (destruct (append nil (Seq.map f (Seq.join S)))) (destruct (append nil (Seq.join (Seq.map (map f) S))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ ∀ (x : β) (s : Seq β),\n    BisimO (fun s1 s2 => ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S)))\n      (destruct (append (Seq.cons x s) (Seq.map f (Seq.join S))))\n      (destruct (append (Seq.cons x s) (Seq.join (Seq.map (map f) S))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ match destruct (Seq.map f (Seq.join S)), destruct (Seq.join (Seq.map (map f) S)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn S\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ match destruct (Seq.map f (Seq.join nil)), destruct (Seq.join (Seq.map (map f) nil)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),\n    match destruct (Seq.map f (Seq.join (Seq.cons x s))), destruct (Seq.join (Seq.map (map f) (Seq.cons x s))) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),\n    match destruct (Seq.map f (Seq.join (Seq.cons x s))),\n      destruct (Seq.join (Seq.cons (map f x) (Seq.map (map f) s))) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n    | x, x_1 => False\n[PROOFSTEP]\nintro x S\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝¹ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS✝ : Seq (Seq1 α)\nx : Seq1 α\nS : Seq (Seq1 α)\n⊢ match destruct (Seq.map f (Seq.join (Seq.cons x S))),\n    destruct (Seq.join (Seq.cons (map f x) (Seq.map (map f) S))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n  | x, x_1 => False\n[PROOFSTEP]\ncases' x with a s\n[GOAL]\ncase h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝¹ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns✝ : Seq β\nS✝ S : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ match destruct (Seq.map f (Seq.join (Seq.cons (a, s) S))),\n    destruct (Seq.join (Seq.cons (map f (a, s)) (Seq.map (map f) S))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 S, s = append s_1 (Seq.map f (Seq.join S)) ∧ s' = append s_1 (Seq.join (Seq.map (map f) S))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝¹ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns✝ : Seq β\nS✝ S : Seq (Seq1 α)\na : α\ns : Seq α\n⊢ ∃ s_1 S_1,\n    append (Seq.map f s) (Seq.map f (Seq.join S)) = append s_1 (Seq.map f (Seq.join S_1)) ∧\n      append (Seq.map f s)\n          (Seq.join\n            (Seq.map\n              (fun x =>\n                match x with\n                | (a, s) => (f a, Seq.map f s))\n              S)) =\n        append s_1\n          (Seq.join\n            (Seq.map\n              (fun x =>\n                match x with\n                | (a, s) => (f a, Seq.map f s))\n              S_1))\n[PROOFSTEP]\nexact ⟨_, _, rfl, rfl⟩\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns : Seq β\nS : Seq (Seq1 α)\n⊢ β →\n    ∀ (s : Seq β),\n      ∃ s_1 S_1,\n        append s (Seq.map f (Seq.join S)) = append s_1 (Seq.map f (Seq.join S_1)) ∧\n          append s (Seq.join (Seq.map (map f) S)) = append s_1 (Seq.join (Seq.map (map f) S_1))\n[PROOFSTEP]\nintro _ s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS✝ : Seq (Seq1 α)\ns1 s2 : Seq β\nh : ∃ s S, s1 = append s (Seq.map f (Seq.join S)) ∧ s2 = append s (Seq.join (Seq.map (map f) S))\ns✝ : Seq β\nS : Seq (Seq1 α)\nx✝ : β\ns : Seq β\n⊢ ∃ s_1 S_1,\n    append s (Seq.map f (Seq.join S)) = append s_1 (Seq.map f (Seq.join S_1)) ∧\n      append s (Seq.join (Seq.map (map f) S)) = append s_1 (Seq.join (Seq.map (map f) S_1))\n[PROOFSTEP]\nrefine' ⟨s, S, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\n⊢ ∃ s S_1,\n    Seq.map f (Seq.join S) = append s (Seq.map f (Seq.join S_1)) ∧\n      Seq.join (Seq.map (map f) S) = append s (Seq.join (Seq.map (map f) S_1))\n[PROOFSTEP]\nrefine' ⟨nil, S, _, _⟩\n[GOAL]\ncase r.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\n⊢ Seq.map f (Seq.join S) = append nil (Seq.map f (Seq.join S))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase r.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nS : Seq (Seq1 α)\n⊢ Seq.join (Seq.map (map f) S) = append nil (Seq.join (Seq.map (map f) S))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ map f (join ((a, s), S)) = join (map (map f) ((a, s), S))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ map f (join ((a, nil), S)) = join (map (map f) ((a, nil), S))\n[PROOFSTEP]\nintros\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ ∀ (x : α) (s : Seq α), map f (join ((a, Seq.cons x s), S)) = join (map (map f) ((a, Seq.cons x s), S))\n[PROOFSTEP]\nintros\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\nS : Seq (Seq1 α)\n⊢ map f (join ((a, nil), S)) = join (map (map f) ((a, nil), S))\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Seq α\nS : Seq (Seq1 α)\nx✝ : α\ns✝ : Seq α\n⊢ map f (join ((a, Seq.cons x✝ s✝), S)) = join (map (map f) ((a, Seq.cons x✝ s✝), S))\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\n⊢ Seq.join (Seq.join SS) = Seq.join (Seq.map join SS)\n[PROOFSTEP]\napply\n  Seq.eq_of_bisim fun s1 s2 =>\n    ∃ s SS, s1 = Seq.append s (Seq.join (Seq.join SS)) ∧ s2 = Seq.append s (Seq.join (Seq.map join SS))\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\n⊢ Seq.IsBisimulation fun s1 s2 =>\n    ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\n[PROOFSTEP]\nintro s1 s2 h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\n⊢ BisimO (fun s1 s2 => ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS)))\n    (destruct s1) (destruct s2)\n[PROOFSTEP]\nexact\n  match s1, s2, h with\n  | _, _, ⟨s, SS, rfl, rfl⟩ => by\n    apply recOn s <;> simp\n    · apply recOn SS <;> simp\n      · intro S SS\n        cases' S with s S; cases' s with x s; simp [map]\n        apply recOn s <;> simp\n        · exact ⟨_, _, rfl, rfl⟩\n        · intro x s\n          refine' ⟨Seq.cons x (append s (Seq.join S)), SS, _, _⟩ <;> simp\n    · intro _ s\n      exact ⟨s, SS, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ BisimO (fun s1 s2 => ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS)))\n    (destruct (append s (Seq.join (Seq.join SS)))) (destruct (append s (Seq.join (Seq.map join SS))))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ BisimO (fun s1 s2 => ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS)))\n    (destruct (append nil (Seq.join (Seq.join SS)))) (destruct (append nil (Seq.join (Seq.map join SS))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ ∀ (x : α) (s : Seq α),\n    BisimO (fun s1 s2 => ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS)))\n      (destruct (append (Seq.cons x s) (Seq.join (Seq.join SS))))\n      (destruct (append (Seq.cons x s) (Seq.join (Seq.map join SS))))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ match destruct (Seq.join (Seq.join SS)), destruct (Seq.join (Seq.map join SS)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn SS\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ match destruct (Seq.join (Seq.join nil)), destruct (Seq.join (Seq.map join nil)) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ ∀ (x : Seq1 (Seq1 α)) (s : Seq (Seq1 (Seq1 α))),\n    match destruct (Seq.join (Seq.join (Seq.cons x s))), destruct (Seq.join (Seq.map join (Seq.cons x s))) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n    | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ ∀ (x : Seq1 (Seq1 α)) (s : Seq (Seq1 (Seq1 α))),\n    match destruct (Seq.join (Seq.join (Seq.cons x s))), destruct (Seq.join (Seq.cons (join x) (Seq.map join s))) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n    | x, x_1 => False\n[PROOFSTEP]\nintro S SS\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS✝ : Seq (Seq1 (Seq1 α))\nS : Seq1 (Seq1 α)\nSS : Seq (Seq1 (Seq1 α))\n⊢ match destruct (Seq.join (Seq.join (Seq.cons S SS))), destruct (Seq.join (Seq.cons (join S) (Seq.map join SS))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\ncases' S with s S\n[GOAL]\ncase h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\ns : Seq1 α\nS : Seq (Seq1 α)\n⊢ match destruct (Seq.join (Seq.join (Seq.cons (s, S) SS))),\n    destruct (Seq.join (Seq.cons (join (s, S)) (Seq.map join SS))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\ncases' s with x s\n[GOAL]\ncase h1.h2.mk.mk\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ match destruct (Seq.join (Seq.join (Seq.cons ((x, s), S) SS))),\n    destruct (Seq.join (Seq.cons (join ((x, s), S)) (Seq.map join SS))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [map]\n[GOAL]\ncase h1.h2.mk.mk\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ match some (x, append s (append (Seq.join S) (Seq.join (Seq.join SS)))),\n    destruct (Seq.join (Seq.cons (join ((x, s), S)) (Seq.map join SS))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1.h2.mk.mk.h1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ match some (x, append nil (append (Seq.join S) (Seq.join (Seq.join SS)))),\n    destruct (Seq.join (Seq.cons (join ((x, nil), S)) (Seq.map join SS))) with\n  | none, none => True\n  | some (a, s), some (a', s') =>\n    a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.mk.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ ∀ (x_1 : α) (s : Seq α),\n    match some (x, append (Seq.cons x_1 s) (append (Seq.join S) (Seq.join (Seq.join SS)))),\n      destruct (Seq.join (Seq.cons (join ((x, Seq.cons x_1 s), S)) (Seq.map join SS))) with\n    | none, none => True\n    | some (a, s), some (a', s') =>\n      a = a' ∧ ∃ s_1 SS, s = append s_1 (Seq.join (Seq.join SS)) ∧ s' = append s_1 (Seq.join (Seq.map join SS))\n    | x, x_2 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.mk.mk.h1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ ∃ s SS_1,\n    append (Seq.join S) (Seq.join (Seq.join SS)) = append s (Seq.join (Seq.join SS_1)) ∧\n      append (Seq.join S) (Seq.join (Seq.map join SS)) = append s (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nexact ⟨_, _, rfl, rfl⟩\n[GOAL]\ncase h1.h2.mk.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx : α\ns : Seq α\n⊢ ∀ (x : α) (s : Seq α),\n    ∃ s_1 SS_1,\n      Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.join SS)))) = append s_1 (Seq.join (Seq.join SS_1)) ∧\n        Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.map join SS)))) =\n          append s_1 (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nintro x s\n[GOAL]\ncase h1.h2.mk.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝¹ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx✝ : α\ns✝ : Seq α\nx : α\ns : Seq α\n⊢ ∃ s_1 SS_1,\n    Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.join SS)))) = append s_1 (Seq.join (Seq.join SS_1)) ∧\n      Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.map join SS)))) =\n        append s_1 (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nrefine' ⟨Seq.cons x (append s (Seq.join S)), SS, _, _⟩\n[GOAL]\ncase h1.h2.mk.mk.h2.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝¹ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx✝ : α\ns✝ : Seq α\nx : α\ns : Seq α\n⊢ Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.join SS)))) =\n    append (Seq.cons x (append s (Seq.join S))) (Seq.join (Seq.join SS))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2.mk.mk.h2.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝¹ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝¹ : Seq α\nSS✝ SS : Seq (Seq1 (Seq1 α))\nS : Seq (Seq1 α)\nx✝ : α\ns✝ : Seq α\nx : α\ns : Seq α\n⊢ Seq.cons x (append s (append (Seq.join S) (Seq.join (Seq.map join SS)))) =\n    append (Seq.cons x (append s (Seq.join S))) (Seq.join (Seq.map join SS))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns : Seq α\nSS : Seq (Seq1 (Seq1 α))\n⊢ α →\n    ∀ (s : Seq α),\n      ∃ s_1 SS_1,\n        append s (Seq.join (Seq.join SS)) = append s_1 (Seq.join (Seq.join SS_1)) ∧\n          append s (Seq.join (Seq.map join SS)) = append s_1 (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nintro _ s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nSS✝ : Seq (Seq1 (Seq1 α))\ns1 s2 : Seq α\nh : ∃ s SS, s1 = append s (Seq.join (Seq.join SS)) ∧ s2 = append s (Seq.join (Seq.map join SS))\ns✝ : Seq α\nSS : Seq (Seq1 (Seq1 α))\nx✝ : α\ns : Seq α\n⊢ ∃ s_1 SS_1,\n    append s (Seq.join (Seq.join SS)) = append s_1 (Seq.join (Seq.join SS_1)) ∧\n      append s (Seq.join (Seq.map join SS)) = append s_1 (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nexact ⟨s, SS, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\n⊢ ∃ s SS_1,\n    Seq.join (Seq.join SS) = append s (Seq.join (Seq.join SS_1)) ∧\n      Seq.join (Seq.map join SS) = append s (Seq.join (Seq.map join SS_1))\n[PROOFSTEP]\nrefine' ⟨nil, SS, _, _⟩\n[GOAL]\ncase r.refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\n⊢ Seq.join (Seq.join SS) = append nil (Seq.join (Seq.join SS))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase r.refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nSS : Seq (Seq1 (Seq1 α))\n⊢ Seq.join (Seq.map join SS) = append nil (Seq.join (Seq.map join SS))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Seq1 α\nf : α → Seq1 β\ng : β → Seq1 γ\n⊢ bind (bind s f) g = bind s fun x => bind (f x) g\n[PROOFSTEP]\ncases' s with a s\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\n⊢ bind (bind (a, s) f) g = bind (a, s) fun x => bind (f x) g\n[PROOFSTEP]\nsimp only [bind, map_pair, map_join]\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\n⊢ join (join (map g (f a), Seq.map (map g) (Seq.map f s))) =\n    join (join (map g (f a)), Seq.map (fun x => join (map g (f x))) s)\n[PROOFSTEP]\nrw [← map_comp]\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\n⊢ join (join (map g (f a), Seq.map (map g ∘ f) s)) = join (join (map g (f a)), Seq.map (fun x => join (map g (f x))) s)\n[PROOFSTEP]\nsimp only [show (fun x => join (map g (f x))) = join ∘ (map g ∘ f) from rfl]\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\n⊢ join (join (map g (f a), Seq.map (map g ∘ f) s)) = join (join (map g (f a)), Seq.map (join ∘ map g ∘ f) s)\n[PROOFSTEP]\nrw [map_comp _ join]\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\n⊢ join (join (map g (f a), Seq.map (map g ∘ f) s)) = join (join (map g (f a)), Seq.map join (Seq.map (map g ∘ f) s))\n[PROOFSTEP]\ngeneralize Seq.map (map g ∘ f) s = SS\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\n⊢ join (join (map g (f a), SS)) = join (join (map g (f a)), Seq.map join SS)\n[PROOFSTEP]\nrcases map g (f a) with\n  ⟨⟨a, s⟩, S⟩\n    -- Porting note: Instead of `apply recOn s <;> intros`, `induction'` are used to\n      --   give names to variables.\n[GOAL]\ncase mk.mk.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns✝ : Seq α\nSS : Seq (Seq1 (Seq1 γ))\nS : Seq (Seq1 γ)\na : γ\ns : Seq γ\n⊢ join (join (((a, s), S), SS)) = join (join ((a, s), S), Seq.map join SS)\n[PROOFSTEP]\ninduction' s using recOn with x s_1\n[GOAL]\ncase mk.mk.mk.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\nS : Seq (Seq1 γ)\na : γ\n⊢ join (join (((a, nil), S), SS)) = join (join ((a, nil), S), Seq.map join SS)\n[PROOFSTEP]\ninduction' S using recOn with x_1 s_2\n[GOAL]\ncase mk.mk.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\nS : Seq (Seq1 γ)\na x : γ\ns_1 : Seq γ\n⊢ join (join (((a, Seq.cons x s_1), S), SS)) = join (join ((a, Seq.cons x s_1), S), Seq.map join SS)\n[PROOFSTEP]\ninduction' S using recOn with x_1 s_2\n[GOAL]\ncase mk.mk.mk.h1.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\n⊢ join (join (((a, nil), nil), SS)) = join (join ((a, nil), nil), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\nx_1 : Seq1 γ\ns_2 : Seq (Seq1 γ)\n⊢ join (join (((a, nil), Seq.cons x_1 s_2), SS)) = join (join ((a, nil), Seq.cons x_1 s_2), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h2.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na x : γ\ns_1 : Seq γ\n⊢ join (join (((a, Seq.cons x s_1), nil), SS)) = join (join ((a, Seq.cons x s_1), nil), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h2.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na x : γ\ns_1 : Seq γ\nx_1 : Seq1 γ\ns_2 : Seq (Seq1 γ)\n⊢ join (join (((a, Seq.cons x s_1), Seq.cons x_1 s_2), SS)) =\n    join (join ((a, Seq.cons x s_1), Seq.cons x_1 s_2), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h1.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\nx_1 : Seq1 γ\ns_2 : Seq (Seq1 γ)\n⊢ (a, Seq.join (Seq.cons x_1 (append s_2 (Seq.join SS)))) = join ((a, Seq.join (Seq.cons x_1 s_2)), Seq.map join SS)\n[PROOFSTEP]\ncases' x_1 with x t\n[GOAL]\ncase mk.mk.mk.h1.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\ns_2 : Seq (Seq1 γ)\nx : γ\nt : Seq γ\n⊢ (a, Seq.join (Seq.cons (x, t) (append s_2 (Seq.join SS)))) =\n    join ((a, Seq.join (Seq.cons (x, t) s_2)), Seq.map join SS)\n[PROOFSTEP]\napply recOn t\n[GOAL]\ncase mk.mk.mk.h1.h2.mk.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\ns_2 : Seq (Seq1 γ)\nx : γ\nt : Seq γ\n⊢ (a, Seq.join (Seq.cons (x, nil) (append s_2 (Seq.join SS)))) =\n    join ((a, Seq.join (Seq.cons (x, nil) s_2)), Seq.map join SS)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.mk.h1.h2.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\ns_2 : Seq (Seq1 γ)\nx : γ\nt : Seq γ\n⊢ ∀ (x_1 : γ) (s : Seq γ),\n    (a, Seq.join (Seq.cons (x, Seq.cons x_1 s) (append s_2 (Seq.join SS)))) =\n      join ((a, Seq.join (Seq.cons (x, Seq.cons x_1 s) s_2)), Seq.map join SS)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mk.mk.mk.h1.h2.mk.h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\ns_2 : Seq (Seq1 γ)\nx : γ\nt : Seq γ\n⊢ (a, Seq.join (Seq.cons (x, nil) (append s_2 (Seq.join SS)))) =\n    join ((a, Seq.join (Seq.cons (x, nil) s_2)), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h1.h2.mk.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na : γ\ns_2 : Seq (Seq1 γ)\nx : γ\nt : Seq γ\nx✝ : γ\ns✝ : Seq γ\n⊢ (a, Seq.join (Seq.cons (x, Seq.cons x✝ s✝) (append s_2 (Seq.join SS)))) =\n    join ((a, Seq.join (Seq.cons (x, Seq.cons x✝ s✝) s_2)), Seq.map join SS)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk.mk.h2.h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na x : γ\ns_1 : Seq γ\nx_1 : Seq1 γ\ns_2 : Seq (Seq1 γ)\n⊢ (a, Seq.cons x (append s_1 (Seq.join (Seq.cons x_1 (append s_2 (Seq.join SS)))))) =\n    (a, Seq.cons x (append s_1 (append (Seq.join (Seq.cons x_1 s_2)) (Seq.join (Seq.map join SS)))))\n[PROOFSTEP]\ncases' x_1 with y t\n[GOAL]\ncase mk.mk.mk.h2.h2.mk\nα : Type u\nβ : Type v\nγ : Type w\nf : α → Seq1 β\ng : β → Seq1 γ\na✝ : α\ns : Seq α\nSS : Seq (Seq1 (Seq1 γ))\na x : γ\ns_1 : Seq γ\ns_2 : Seq (Seq1 γ)\ny : γ\nt : Seq γ\n⊢ (a, Seq.cons x (append s_1 (Seq.join (Seq.cons (y, t) (append s_2 (Seq.join SS)))))) =\n    (a, Seq.cons x (append s_1 (append (Seq.join (Seq.cons (y, t) s_2)) (Seq.join (Seq.map join SS)))))\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.Data.Seq.Seq", "llama_tokens": 69499, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5389832206876841, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.2758066636828176}}
{"text": "[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ ¬SupIrred a ↔ IsMin a ∨ ∃ b c, b ⊔ c = a ∧ b < a ∧ c < a\n[PROOFSTEP]\nrw [SupIrred, not_and_or]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ (¬¬IsMin a ∨ ¬∀ ⦃b c : α⦄, b ⊔ c = a → b = a ∨ c = a) ↔ IsMin a ∨ ∃ b c, b ⊔ c = a ∧ b < a ∧ c < a\n[PROOFSTEP]\npush_neg\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ (IsMin a ∨ Exists fun ⦃b⦄ => Exists fun ⦃c⦄ => b ⊔ c = a ∧ b ≠ a ∧ c ≠ a) ↔ IsMin a ∨ ∃ b c, b ⊔ c = a ∧ b < a ∧ c < a\n[PROOFSTEP]\nrw [exists₂_congr]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ ∀ (a_1 b : α), a_1 ⊔ b = a ∧ a_1 ≠ a ∧ b ≠ a ↔ a_1 ⊔ b = a ∧ a_1 < a ∧ b < a\n[PROOFSTEP]\nsimp (config := { contextual := true }) [@eq_comm _ _ a]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ ¬SupPrime a ↔ IsMin a ∨ ∃ b c, a ≤ b ⊔ c ∧ ¬a ≤ b ∧ ¬a ≤ c\n[PROOFSTEP]\nrw [SupPrime, not_and_or]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ (¬¬IsMin a ∨ ¬∀ ⦃b c : α⦄, a ≤ b ⊔ c → a ≤ b ∨ a ≤ c) ↔ IsMin a ∨ ∃ b c, a ≤ b ⊔ c ∧ ¬a ≤ b ∧ ¬a ≤ c\n[PROOFSTEP]\npush_neg\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b c : α\n⊢ (IsMin a ∨ Exists fun ⦃b⦄ => Exists fun ⦃c⦄ => a ≤ b ⊔ c ∧ ¬a ≤ b ∧ ¬a ≤ c) ↔\n    IsMin a ∨ ∃ b c, a ≤ b ⊔ c ∧ ¬a ≤ b ∧ ¬a ≤ c\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeSup α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, a ≤ b ⊔ c → a ≤ b ∨ a ≤ c\nb c : α\nha : b ⊔ c = a\n⊢ b = a ∨ c = a\n[PROOFSTEP]\nsimpa [← ha] using h ha.ge\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupIrred a\n⊢ a ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\nb c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupIrred ⊥\n⊢ False\n[PROOFSTEP]\nexact not_supIrred_bot ha\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupPrime a\n⊢ a ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\nb c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupPrime ⊥\n⊢ False\n[PROOFSTEP]\nexact not_supPrime_bot ha\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupIrred a\nh : sup s f = a\n⊢ ∃ i, i ∈ s ∧ f i = a\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with i s _ ih\n· simpa [ha.ne_bot] using h.symm\nsimp only [exists_prop, exists_mem_insert] at ih ⊢\nrw [sup_insert] at h \nexact (ha.2 h).imp_right ih\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupIrred a\nh : sup s f = a\n⊢ ∃ i, i ∈ s ∧ f i = a\n[PROOFSTEP]\ninduction' s using Finset.induction with i s _ ih\n[GOAL]\ncase empty\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupIrred a\nh✝ : sup s f = a\nh : sup ∅ f = a\n⊢ ∃ i, i ∈ ∅ ∧ f i = a\n[PROOFSTEP]\nsimpa [ha.ne_bot] using h.symm\n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns✝ : Finset ι\nf : ι → α\nha : SupIrred a\nh✝ : sup s✝ f = a\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nih : sup s f = a → ∃ i, i ∈ s ∧ f i = a\nh : sup (insert i s) f = a\n⊢ ∃ i_1, i_1 ∈ insert i s ∧ f i_1 = a\n[PROOFSTEP]\nsimp only [exists_prop, exists_mem_insert] at ih ⊢\n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns✝ : Finset ι\nf : ι → α\nha : SupIrred a\nh✝ : sup s✝ f = a\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nih : sup s f = a → ∃ i, i ∈ s ∧ f i = a\nh : sup (insert i s) f = a\n⊢ f i = a ∨ ∃ x, x ∈ s ∧ f x = a\n[PROOFSTEP]\nrw [sup_insert] at h \n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns✝ : Finset ι\nf : ι → α\nha : SupIrred a\nh✝ : sup s✝ f = a\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nih : sup s f = a → ∃ i, i ∈ s ∧ f i = a\nh : f i ⊔ sup s f = a\n⊢ f i = a ∨ ∃ x, x ∈ s ∧ f x = a\n[PROOFSTEP]\nexact (ha.2 h).imp_right ih\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupPrime a\n⊢ a ≤ sup s f ↔ ∃ i, i ∈ s ∧ a ≤ f i\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction with i s _ ih\n· simp [ha.ne_bot]\n· simp only [exists_prop, exists_mem_insert, sup_insert, ha.le_sup, ih]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupPrime a\n⊢ a ≤ sup s f ↔ ∃ i, i ∈ s ∧ a ≤ f i\n[PROOFSTEP]\ninduction' s using Finset.induction with i s _ ih\n[GOAL]\ncase empty\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns : Finset ι\nf : ι → α\nha : SupPrime a\n⊢ a ≤ sup ∅ f ↔ ∃ i, i ∈ ∅ ∧ a ≤ f i\n[PROOFSTEP]\nsimp [ha.ne_bot]\n[GOAL]\ncase insert\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeSup α\na b c : α\ninst✝ : OrderBot α\ns✝ : Finset ι\nf : ι → α\nha : SupPrime a\ni : ι\ns : Finset ι\na✝ : ¬i ∈ s\nih : a ≤ sup s f ↔ ∃ i, i ∈ s ∧ a ≤ f i\n⊢ a ≤ sup (insert i s) f ↔ ∃ i_1, i_1 ∈ insert i s ∧ a ≤ f i_1\n[PROOFSTEP]\nsimp only [exists_prop, exists_mem_insert, sup_insert, ha.le_sup, ih]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nclassical\napply WellFoundedLT.induction a _\nclear a\nrintro a ih\nby_cases ha : SupIrred a\n· exact ⟨{ a }, by simp [ha]⟩\nrw [not_supIrred] at ha \nobtain ha | ⟨b, c, rfl, hb, hc⟩ := ha\n· exact ⟨∅, by simp [ha.eq_bot]⟩\nobtain ⟨s, rfl, hs⟩ := ih _ hb\nobtain ⟨t, rfl, ht⟩ := ih _ hc\nexact ⟨s ∪ t, sup_union, forall_mem_union.2 ⟨hs, ht⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\napply WellFoundedLT.induction a _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\n⊢ ∀ (x : α),\n    (∀ (y : α), y < x → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b) →\n      ∃ s, sup s id = x ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nclear a\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\n⊢ ∀ (x : α),\n    (∀ (y : α), y < x → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b) →\n      ∃ s, sup s id = x ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nrintro a ih\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nby_cases ha : SupIrred a\n[GOAL]\ncase pos\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : SupIrred a\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nexact ⟨{ a }, by simp [ha]⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : SupIrred a\n⊢ sup {a} id = a ∧ ∀ ⦃b : α⦄, b ∈ {a} → SupIrred b\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : ¬SupIrred a\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nrw [not_supIrred] at ha \n[GOAL]\ncase neg\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : IsMin a ∨ ∃ b c, b ⊔ c = a ∧ b < a ∧ c < a\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nobtain ha | ⟨b, c, rfl, hb, hc⟩ := ha\n[GOAL]\ncase neg.inl\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : IsMin a\n⊢ ∃ s, sup s id = a ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nexact ⟨∅, by simp [ha.eq_bot]⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na✝ b c : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\na : α\nih : ∀ (y : α), y < a → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nha : IsMin a\n⊢ sup ∅ id = a ∧ ∀ ⦃b : α⦄, b ∈ ∅ → SupIrred b\n[PROOFSTEP]\nsimp [ha.eq_bot]\n[GOAL]\ncase neg.inr.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na b✝ c✝ : α\ninst✝¹ : OrderBot α\ns : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\nb c : α\nih : ∀ (y : α), y < b ⊔ c → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nhb : b < b ⊔ c\nhc : c < b ⊔ c\n⊢ ∃ s, sup s id = b ⊔ c ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\n[PROOFSTEP]\nobtain ⟨s, rfl, hs⟩ := ih _ hb\n[GOAL]\ncase neg.inr.intro.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na b c✝ : α\ninst✝¹ : OrderBot α\ns✝ : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\nc : α\ns : Finset α\nhs : ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nih : ∀ (y : α), y < sup s id ⊔ c → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nhb : sup s id < sup s id ⊔ c\nhc : c < sup s id ⊔ c\n⊢ ∃ s_1, sup s_1 id = sup s id ⊔ c ∧ ∀ ⦃b : α⦄, b ∈ s_1 → SupIrred b\n[PROOFSTEP]\nobtain ⟨t, rfl, ht⟩ := ih _ hc\n[GOAL]\ncase neg.inr.intro.intro.intro.intro.intro.intro.intro.intro\nι : Type u_1\nα : Type u_2\ninst✝² : SemilatticeSup α\na b c : α\ninst✝¹ : OrderBot α\ns✝ : Finset ι\nf : ι → α\ninst✝ : WellFoundedLT α\ns : Finset α\nhs : ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nt : Finset α\nht : ∀ ⦃b : α⦄, b ∈ t → SupIrred b\nih : ∀ (y : α), y < sup s id ⊔ sup t id → ∃ s, sup s id = y ∧ ∀ ⦃b : α⦄, b ∈ s → SupIrred b\nhb : sup s id < sup s id ⊔ sup t id\nhc : sup t id < sup s id ⊔ sup t id\n⊢ ∃ s_1, sup s_1 id = sup s id ⊔ sup t id ∧ ∀ ⦃b : α⦄, b ∈ s_1 → SupIrred b\n[PROOFSTEP]\nexact ⟨s ∪ t, sup_union, forall_mem_union.2 ⟨hs, ht⟩⟩\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : SemilatticeInf α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, b ⊓ c ≤ a → b ≤ a ∨ c ≤ a\nb c : α\nha : b ⊓ c = a\n⊢ b = a ∨ c = a\n[PROOFSTEP]\nsimpa [← ha] using h ha.le\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeInf α\na b c : α\ninst✝ : OrderTop α\ns : Finset ι\nf : ι → α\nha : InfIrred a\n⊢ a ≠ ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeInf α\nb c : α\ninst✝ : OrderTop α\ns : Finset ι\nf : ι → α\nha : InfIrred ⊤\n⊢ False\n[PROOFSTEP]\nexact not_infIrred_top ha\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeInf α\na b c : α\ninst✝ : OrderTop α\ns : Finset ι\nf : ι → α\nha : InfPrime a\n⊢ a ≠ ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝¹ : SemilatticeInf α\nb c : α\ninst✝ : OrderTop α\ns : Finset ι\nf : ι → α\nha : InfPrime ⊤\n⊢ False\n[PROOFSTEP]\nexact not_infPrime_top ha\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : DistribLattice α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, b ⊔ c = a → b = a ∨ c = a\nb c : α\n⊢ a ≤ b ⊔ c → a ≤ b ∨ a ≤ c\n[PROOFSTEP]\nsimp_rw [← inf_eq_left, inf_sup_left]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : DistribLattice α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, b ⊔ c = a → b = a ∨ c = a\nb c : α\n⊢ a ⊓ b ⊔ a ⊓ c = a → a ⊓ b = a ∨ a ⊓ c = a\n[PROOFSTEP]\nexact @h _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : DistribLattice α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, b ⊓ c = a → b = a ∨ c = a\nb c : α\n⊢ b ⊓ c ≤ a → b ≤ a ∨ c ≤ a\n[PROOFSTEP]\nsimp_rw [← sup_eq_left, sup_inf_left]\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : DistribLattice α\na b✝ c✝ : α\nh : ∀ ⦃b c : α⦄, b ⊓ c = a → b = a ∨ c = a\nb c : α\n⊢ (a ⊔ b) ⊓ (a ⊔ c) = a → a ⊔ b = a ∨ a ⊔ c = a\n[PROOFSTEP]\nexact @h _ _\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : LinearOrder α\na : α\n⊢ ∀ ⦃b c : α⦄, a ≤ b ⊔ c → a ≤ b ∨ a ≤ c\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : LinearOrder α\na : α\n⊢ ∀ ⦃b c : α⦄, b ⊓ c ≤ a → b ≤ a ∨ c ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : LinearOrder α\na x✝¹ x✝ : α\n⊢ x✝¹ ⊔ x✝ = a → x✝¹ = a ∨ x✝ = a\n[PROOFSTEP]\nsimpa only [sup_eq_max, max_eq_iff] using Or.imp And.left And.left\n[GOAL]\nι : Type u_1\nα : Type u_2\ninst✝ : LinearOrder α\na x✝¹ x✝ : α\n⊢ x✝¹ ⊓ x✝ = a → x✝¹ = a ∨ x✝ = a\n[PROOFSTEP]\nsimpa only [inf_eq_min, min_eq_iff] using Or.imp And.left And.left\n", "meta": {"mathlib_filename": "Mathlib.Order.Irreducible", "llama_tokens": 7347, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5389832058771036, "lm_q2_score": 0.5117166047041654, "lm_q1q2_score": 0.27580665610399757}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\n⊢ Finite (α × β)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\nthis : Fintype α\n⊢ Finite (α × β)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\nthis✝ : Fintype α\nthis : Fintype β\n⊢ Finite (α × β)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\n⊢ Finite (α ⊕ β)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\nthis : Fintype α\n⊢ Finite (α ⊕ β)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite β\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : Finite α\ninst✝ : Finite β\nthis✝ : Fintype α\nthis : Fintype β\n⊢ Finite (α ⊕ β)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nβ : α → Type u_4\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\n⊢ Finite ((a : α) × β a)\n[PROOFSTEP]\nletI := Fintype.ofFinite α\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nβ : α → Type u_4\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\nthis : Fintype α := Fintype.ofFinite α\n⊢ Finite ((a : α) × β a)\n[PROOFSTEP]\nletI := fun a => Fintype.ofFinite (β a)\n[GOAL]\nα : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nβ : α → Type u_4\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\nthis✝ : Fintype α := Fintype.ofFinite α\nthis : (a : α) → Fintype (β a) := fun a => Fintype.ofFinite (β a)\n⊢ Finite ((a : α) × β a)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Finite α\n⊢ Finite (Set α)\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ Finite (Set α)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : α → Sort u_5\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\n⊢ Finite ((a : α) → β a)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite (PLift α)\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : α → Sort u_5\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\nthis : Fintype (PLift α)\n⊢ Finite ((a : α) → β a)\n[PROOFSTEP]\nhaveI := fun a => Fintype.ofFinite (PLift (β a))\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : α → Sort u_5\ninst✝¹ : Finite α\ninst✝ : ∀ (a : α), Finite (β a)\nthis✝ : Fintype (PLift α)\nthis : (a : α) → Fintype (PLift (β a))\n⊢ Finite ((a : α) → β a)\n[PROOFSTEP]\nexact Finite.of_equiv (∀ a : PLift α, PLift (β (Equiv.plift a))) (Equiv.piCongr Equiv.plift fun _ => Equiv.plift)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\ninst✝ : Finite α\nn : ℕ\n⊢ Finite (Vector α n)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite α\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\ninst✝ : Finite α\nn : ℕ\nthis : Fintype α\n⊢ Finite (Vector α n)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\n⊢ Finite (α ↪ β)\n[PROOFSTEP]\ncases' isEmpty_or_nonempty (α ↪ β) with _ h\n[GOAL]\ncase inl\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\nh✝ : IsEmpty (α ↪ β)\n⊢ Finite (α ↪ β)\n[PROOFSTEP]\napply Finite.of_subsingleton\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\nh : Nonempty (α ↪ β)\n⊢ Finite (α ↪ β)\n[PROOFSTEP]\nrefine' h.elim fun f => _\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\nh : Nonempty (α ↪ β)\nf : α ↪ β\n⊢ Finite (α ↪ β)\n[PROOFSTEP]\nhaveI : Finite α := Finite.of_injective _ f.injective\n[GOAL]\ncase inr\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\nh : Nonempty (α ↪ β)\nf : α ↪ β\nthis : Finite α\n⊢ Finite (α ↪ β)\n[PROOFSTEP]\nexact Finite.of_injective _ FunLike.coe_injective\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nγ : Type u_3\nα : Sort u_4\nβ : Sort u_5\ninst✝ : Finite β\ne₁ e₂ : α ≃ β\nh : Equiv.toEmbedding e₁ = Equiv.toEmbedding e₂\n⊢ ∀ (x : α), ↑e₁ x = ↑e₂ x\n[PROOFSTEP]\nconvert FunLike.congr_fun h using 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Finite α\nn : ℕ\n⊢ Finite (Sym α n)\n[PROOFSTEP]\nhaveI := Fintype.ofFinite α\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : Finite α\nn : ℕ\nthis : Fintype α\n⊢ Finite (Sym α n)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Data.Finite.Basic", "llama_tokens": 2394, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5736784074525098, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.27564024283741045}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\n⊢ IsLimit (G.mapCone (Fan.mk P g)) ≃ IsLimit (Fan.mk (G.obj P) fun j => G.map (g j))\n[PROOFSTEP]\nrefine' (IsLimit.postcomposeHomEquiv _ _).symm.trans (IsLimit.equivIsoLimit _)\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\n⊢ (Discrete.functor fun b => f b) ⋙ G ≅ Discrete.functor fun j => G.obj (f j)\ncase refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\n⊢ (Cones.postcompose ?refine'_1.hom).obj (G.mapCone (Fan.mk P g)) ≅ Fan.mk (G.obj P) fun j => G.map (g j)\n[PROOFSTEP]\nrefine' Discrete.natIso fun j => Iso.refl (G.obj (f j.as))\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\n⊢ (Cones.postcompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj (G.mapCone (Fan.mk P g)) ≅\n    Fan.mk (G.obj P) fun j => G.map (g j)\n[PROOFSTEP]\nrefine' Cones.ext (Iso.refl _) fun j => by dsimp; cases j; simp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\nj : Discrete J\n⊢ NatTrans.app\n      ((Cones.postcompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj (G.mapCone (Fan.mk P g))).π j =\n    (Iso.refl\n          ((Cones.postcompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj\n              (G.mapCone (Fan.mk P g))).pt).hom ≫\n      NatTrans.app (Fan.mk (G.obj P) fun j => G.map (g j)).π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\nj : Discrete J\n⊢ G.map (g j.as) ≫ 𝟙 (G.obj (f j.as)) = 𝟙 (G.obj P) ≫ G.map (g j.as)\n[PROOFSTEP]\ncases j\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → P ⟶ f j\nas✝ : J\n⊢ G.map (g { as := as✝ }.as) ≫ 𝟙 (G.obj (f { as := as✝ }.as)) = 𝟙 (G.obj P) ≫ G.map (g { as := as✝ }.as)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun j => G.obj (f j)\ni : IsIso (piComparison G f)\n⊢ PreservesLimit (Discrete.functor f) G\n[PROOFSTEP]\napply preservesLimitOfPreservesLimitCone (productIsProduct f)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun j => G.obj (f j)\ni : IsIso (piComparison G f)\n⊢ IsLimit (G.mapCone (Fan.mk (∏ f) (Pi.π f)))\n[PROOFSTEP]\napply (isLimitMapConeFanMkEquiv _ _ _).symm _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun j => G.obj (f j)\ni : IsIso (piComparison G f)\n⊢ IsLimit (Fan.mk (G.obj (∏ f)) fun j => G.map (Pi.π f j))\n[PROOFSTEP]\nrefine @IsLimit.ofPointIso _ _ _ _ _ _ _ (limit.isLimit (Discrete.functor fun j : J => G.obj (f j))) ?_\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasProduct f\ninst✝ : HasProduct fun j => G.obj (f j)\ni : IsIso (piComparison G f)\n⊢ IsIso\n    (IsLimit.lift (limit.isLimit (Discrete.functor fun j => G.obj (f j)))\n      (Fan.mk (G.obj (∏ f)) fun j => G.map (Pi.π f j)))\n[PROOFSTEP]\napply i\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝² : HasProduct f\ninst✝¹ : HasProduct fun j => G.obj (f j)\ninst✝ : PreservesLimit (Discrete.functor f) G\n⊢ IsIso (piComparison G f)\n[PROOFSTEP]\nrw [← PreservesProduct.iso_hom]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝² : HasProduct f\ninst✝¹ : HasProduct fun j => G.obj (f j)\ninst✝ : PreservesLimit (Discrete.functor f) G\n⊢ IsIso (PreservesProduct.iso G f).hom\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\n⊢ IsColimit (G.mapCocone (Cofan.mk P g)) ≃ IsColimit (Cofan.mk (G.obj P) fun j => G.map (g j))\n[PROOFSTEP]\nrefine' (IsColimit.precomposeHomEquiv _ _).symm.trans (IsColimit.equivIsoColimit _)\n[GOAL]\ncase refine'_1\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\n⊢ (Discrete.functor fun j => G.obj (f j)) ≅ (Discrete.functor fun b => f b) ⋙ G\ncase refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\n⊢ (Cocones.precompose ?refine'_1.hom).obj (G.mapCocone (Cofan.mk P g)) ≅ Cofan.mk (G.obj P) fun j => G.map (g j)\n[PROOFSTEP]\nrefine' Discrete.natIso fun j => Iso.refl (G.obj (f j.as))\n[GOAL]\ncase refine'_2\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\n⊢ (Cocones.precompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj (G.mapCocone (Cofan.mk P g)) ≅\n    Cofan.mk (G.obj P) fun j => G.map (g j)\n[PROOFSTEP]\nrefine' Cocones.ext (Iso.refl _) fun j => by dsimp; cases j; simp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\nj : Discrete J\n⊢ NatTrans.app\n        ((Cocones.precompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj\n            (G.mapCocone (Cofan.mk P g))).ι\n        j ≫\n      (Iso.refl\n          ((Cocones.precompose (Discrete.natIso fun j => Iso.refl (G.obj (f j.as))).hom).obj\n              (G.mapCocone (Cofan.mk P g))).pt).hom =\n    NatTrans.app (Cofan.mk (G.obj P) fun j => G.map (g j)).ι j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\nj : Discrete J\n⊢ (𝟙 (G.obj (f j.as)) ≫ G.map (g j.as)) ≫ 𝟙 (G.obj P) = G.map (g j.as)\n[PROOFSTEP]\ncases j\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\nP : C\ng : (j : J) → f j ⟶ P\nas✝ : J\n⊢ (𝟙 (G.obj (f { as := as✝ }.as)) ≫ G.map (g { as := as✝ }.as)) ≫ 𝟙 (G.obj P) = G.map (g { as := as✝ }.as)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun j => G.obj (f j)\ni : IsIso (sigmaComparison G f)\n⊢ PreservesColimit (Discrete.functor f) G\n[PROOFSTEP]\napply preservesColimitOfPreservesColimitCocone (coproductIsCoproduct f)\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun j => G.obj (f j)\ni : IsIso (sigmaComparison G f)\n⊢ IsColimit (G.mapCocone (Cofan.mk (∐ f) (Sigma.ι f)))\n[PROOFSTEP]\napply (isColimitMapCoconeCofanMkEquiv _ _ _).symm _\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun j => G.obj (f j)\ni : IsIso (sigmaComparison G f)\n⊢ IsColimit (Cofan.mk (G.obj (∐ f)) fun j => G.map (Sigma.ι f j))\n[PROOFSTEP]\nrefine @IsColimit.ofPointIso _ _ _ _ _ _ _ (colimit.isColimit (Discrete.functor fun j : J => G.obj (f j))) ?_\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝¹ : HasCoproduct f\ninst✝ : HasCoproduct fun j => G.obj (f j)\ni : IsIso (sigmaComparison G f)\n⊢ IsIso\n    (IsColimit.desc (colimit.isColimit (Discrete.functor fun j => G.obj (f j)))\n      (Cofan.mk (G.obj (∐ f)) fun j => G.map (Sigma.ι f j)))\n[PROOFSTEP]\napply i\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝² : HasCoproduct f\ninst✝¹ : HasCoproduct fun j => G.obj (f j)\ninst✝ : PreservesColimit (Discrete.functor f) G\n⊢ IsIso (sigmaComparison G f)\n[PROOFSTEP]\nrw [← PreservesCoproduct.inv_hom]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\nG : C ⥤ D\nJ : Type w\nf : J → C\ninst✝² : HasCoproduct f\ninst✝¹ : HasCoproduct fun j => G.obj (f j)\ninst✝ : PreservesColimit (Discrete.functor f) G\n⊢ IsIso (PreservesCoproduct.iso G f).inv\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products", "llama_tokens": 4565, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5506073655352403, "lm_q2_score": 0.5, "lm_q1q2_score": 0.27530368276762013}}
{"text": "[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nx✝ : QuasiCompact f\nh : ∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (↑f.val.base ⁻¹' U)\n⊢ Continuous ↑f.val.base\n[PROOFSTEP]\ncontinuity\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ QuasiCompact f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase isCompact_preimage\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ ∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (↑f.val.base ⁻¹' U)\n[PROOFSTEP]\nintro U _ hU'\n[GOAL]\ncase isCompact_preimage\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact (↑f.val.base ⁻¹' U)\n[PROOFSTEP]\nconvert hU'.image (inv f.1.base).continuous_toFun using 1\n[GOAL]\ncase h.e'_3.h\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\ne_1✝ : (forget TopCat).obj ↑X.toPresheafedSpace = ↑↑X.toPresheafedSpace\n⊢ ↑f.val.base ⁻¹' U = (inv f.val.base).toFun '' U\n[PROOFSTEP]\nrw [Set.image_eq_preimage_of_inverse]\n[GOAL]\ncase h.e'_3.h.h₁\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\ne_1✝ : (forget TopCat).obj ↑X.toPresheafedSpace = ↑↑X.toPresheafedSpace\n⊢ Function.LeftInverse (↑f.val.base) (inv f.val.base).toFun\ncase h.e'_3.h.h₂\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\ne_1✝ : (forget TopCat).obj ↑X.toPresheafedSpace = ↑↑X.toPresheafedSpace\n⊢ Function.RightInverse (↑f.val.base) (inv f.val.base).toFun\n[PROOFSTEP]\ndelta Function.LeftInverse\n[GOAL]\ncase h.e'_3.h.h₁\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\ne_1✝ : (forget TopCat).obj ↑X.toPresheafedSpace = ↑↑X.toPresheafedSpace\n⊢ ∀ (x : ↑↑Y.toPresheafedSpace), ↑f.val.base (ContinuousMap.toFun (inv f.val.base) x) = x\ncase h.e'_3.h.h₂\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\ninst✝ : IsIso f\nU : Set ↑↑Y.toPresheafedSpace\na✝ : IsOpen U\nhU' : IsCompact U\ne_1✝ : (forget TopCat).obj ↑X.toPresheafedSpace = ↑↑X.toPresheafedSpace\n⊢ Function.RightInverse (↑f.val.base) (inv f.val.base).toFun\n[PROOFSTEP]\nexacts [IsIso.inv_hom_id_apply f.1.base, IsIso.hom_inv_id_apply f.1.base]\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\n⊢ QuasiCompact (f ≫ g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase isCompact_preimage\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\n⊢ ∀ (U : Set ↑↑Z.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (↑(f ≫ g).val.base ⁻¹' U)\n[PROOFSTEP]\nintro U hU hU'\n[GOAL]\ncase isCompact_preimage\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact (↑(f ≫ g).val.base ⁻¹' U)\n[PROOFSTEP]\nrw [Scheme.comp_val_base, coe_comp, Set.preimage_comp]\n[GOAL]\ncase isCompact_preimage\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact (↑f.val.base ⁻¹' (↑g.val.base ⁻¹' U))\n[PROOFSTEP]\napply QuasiCompact.isCompact_preimage\n[GOAL]\ncase isCompact_preimage.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsOpen (↑g.val.base ⁻¹' U)\n[PROOFSTEP]\nexact\n  Continuous.isOpen_preimage\n    (by\n      -- porting note: `continuity` failed\n          -- see https://github.com/leanprover-community/mathlib4/issues/5030exact Scheme.Hom.continuous g)\n    _ hU\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ Continuous ↑g.val.base\n[PROOFSTEP]\nexact Scheme.Hom.continuous g\n[GOAL]\ncase isCompact_preimage.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact (↑g.val.base ⁻¹' U)\n[PROOFSTEP]\napply QuasiCompact.isCompact_preimage\n[GOAL]\ncase isCompact_preimage.a.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsOpen U\n[PROOFSTEP]\nassumption\n[GOAL]\ncase isCompact_preimage.a.a\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y Z : Scheme\nf : X ⟶ Y\ng : Y ⟶ Z\ninst✝¹ : QuasiCompact f\ninst✝ : QuasiCompact g\nU : Set ↑↑Z.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact U\n[PROOFSTEP]\nassumption\n[GOAL]\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Set ↑↑X.toPresheafedSpace\n⊢ IsCompact U ∧ IsOpen U ↔ ∃ s, Set.Finite s ∧ U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\napply Opens.IsBasis.isCompact_open_iff_eq_finite_iUnion (fun (U : X.affineOpens) => (U : Opens X.carrier))\n[GOAL]\ncase hb\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Set ↑↑X.toPresheafedSpace\n⊢ Opens.IsBasis (Set.range fun U => ↑U)\n[PROOFSTEP]\nrw [Subtype.range_coe]\n[GOAL]\ncase hb\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Set ↑↑X.toPresheafedSpace\n⊢ Opens.IsBasis (Scheme.affineOpens X)\n[PROOFSTEP]\nexact isBasis_affine_open X\n[GOAL]\ncase hb'\nX✝ Y : Scheme\nf : X✝ ⟶ Y\nX : Scheme\nU : Set ↑↑X.toPresheafedSpace\n⊢ ∀ (i : ↑(Scheme.affineOpens X)), IsCompact ↑↑i\n[PROOFSTEP]\nexact fun i => i.2.isCompact\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ QuasiCompact f ↔ ∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)\n[PROOFSTEP]\nrw [QuasiCompact_iff]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (↑f.val.base ⁻¹' U)) ↔\n    ∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)\n[PROOFSTEP]\nrefine' ⟨fun H U hU => H U U.isOpen hU.isCompact, _⟩\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)) →\n    ∀ (U : Set ↑↑Y.toPresheafedSpace), IsOpen U → IsCompact U → IsCompact (↑f.val.base ⁻¹' U)\n[PROOFSTEP]\nintro H U hU hU'\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nH : ∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)\nU : Set ↑↑Y.toPresheafedSpace\nhU : IsOpen U\nhU' : IsCompact U\n⊢ IsCompact (↑f.val.base ⁻¹' U)\n[PROOFSTEP]\nobtain ⟨S, hS, rfl⟩ := (isCompact_open_iff_eq_finset_affine_union U).mp ⟨hU', hU⟩\n[GOAL]\ncase intro.intro\nX Y : Scheme\nf : X ⟶ Y\nH : ∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)\nS : Set ↑(Scheme.affineOpens Y)\nhS : Set.Finite S\nhU : IsOpen (⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑↑i)\nhU' : IsCompact (⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑↑i)\n⊢ IsCompact (↑f.val.base ⁻¹' ⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑↑i)\n[PROOFSTEP]\nsimp only [Set.preimage_iUnion]\n[GOAL]\ncase intro.intro\nX Y : Scheme\nf : X ⟶ Y\nH : ∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)\nS : Set ↑(Scheme.affineOpens Y)\nhS : Set.Finite S\nhU : IsOpen (⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑↑i)\nhU' : IsCompact (⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑↑i)\n⊢ IsCompact (⋃ (i : ↑(Scheme.affineOpens Y)) (_ : i ∈ S), ↑f.val.base ⁻¹' ↑↑i)\n[PROOFSTEP]\nexact Set.Finite.isCompact_biUnion hS (fun i _ => H i i.prop)\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ AffineTargetMorphismProperty.toProperty affineProperty f ↔ IsAffine Y ∧ CompactSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\ndelta AffineTargetMorphismProperty.toProperty QuasiCompact.affineProperty\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∃ h, CompactSpace ↑↑X.toPresheafedSpace) ↔ IsAffine Y ∧ CompactSpace ↑↑X.toPresheafedSpace\n[PROOFSTEP]\nsimp\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ QuasiCompact f ↔ targetAffineLocally QuasiCompact.affineProperty f\n[PROOFSTEP]\nrw [quasiCompact_iff_forall_affine]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)) ↔\n    targetAffineLocally QuasiCompact.affineProperty f\n[PROOFSTEP]\ntrans ∀ U : Y.affineOpens, IsCompact (f.1.base ⁻¹' (U : Set Y.carrier))\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∀ (U : Opens ↑↑Y.toPresheafedSpace), IsAffineOpen U → IsCompact (↑f.val.base ⁻¹' ↑U)) ↔\n    ∀ (U : ↑(Scheme.affineOpens Y)), IsCompact (↑f.val.base ⁻¹' ↑↑U)\n[PROOFSTEP]\nexact ⟨fun h U => h U U.prop, fun h U hU => h ⟨U, hU⟩⟩\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ (∀ (U : ↑(Scheme.affineOpens Y)), IsCompact (↑f.val.base ⁻¹' ↑↑U)) ↔ targetAffineLocally QuasiCompact.affineProperty f\n[PROOFSTEP]\napply forall_congr'\n[GOAL]\ncase h\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ (a : ↑(Scheme.affineOpens Y)), IsCompact (↑f.val.base ⁻¹' ↑↑a) ↔ QuasiCompact.affineProperty (f ∣_ ↑a)\n[PROOFSTEP]\nexact fun _ => isCompact_iff_compactSpace\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ @QuasiCompact = targetAffineLocally QuasiCompact.affineProperty\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.h.a\nX Y : Scheme\nf : X ⟶ Y\nx✝² x✝¹ : Scheme\nx✝ : x✝² ⟶ x✝¹\n⊢ QuasiCompact x✝ ↔ targetAffineLocally QuasiCompact.affineProperty x✝\n[PROOFSTEP]\nexact quasiCompact_iff_affineProperty _\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsCompact ↑(Scheme.basicOpen X f)\n[PROOFSTEP]\nclassical\nrefine' ((isCompact_open_iff_eq_finset_affine_union _).mpr _).1\nobtain ⟨s, hs, e⟩ := (isCompact_open_iff_eq_finset_affine_union _).mp ⟨hU, U.isOpen⟩\nlet g : s → X.affineOpens := by\n  intro V\n  use V.1 ⊓ X.basicOpen f\n  have : V.1.1 ⟶ U := by\n    apply homOfLE; change _ ⊆ (U : Set X.carrier); rw [e]\n    convert @Set.subset_iUnion₂ _ _ _ (fun (U : X.affineOpens) (_ : U ∈ s) => ↑U) V V.prop using 1\n  erw [← X.toLocallyRingedSpace.toRingedSpace.basicOpen_res this.op]\n  exact IsAffineOpen.basicOpenIsAffine V.1.prop _\nhaveI : Finite s := hs.to_subtype\nrefine' ⟨Set.range g, Set.finite_range g, _⟩\nrefine' (Set.inter_eq_right_iff_subset.mpr (SetLike.coe_subset_coe.2 <| RingedSpace.basicOpen_le _ _)).symm.trans _\nrw [e, Set.iUnion₂_inter]\napply le_antisymm <;> apply Set.iUnion₂_subset\n· intro i hi\n  exact\n    Set.Subset.trans (Set.Subset.rfl : _ ≤ g ⟨i, hi⟩)\n      (@Set.subset_iUnion₂ _ _ _ (fun (i : Scheme.affineOpens X) (_ : i ∈ Set.range g) => (i : Set X.toPresheafedSpace))\n        _ (Set.mem_range_self ⟨i, hi⟩))\n· rintro ⟨i, hi⟩ ⟨⟨j, hj⟩, hj'⟩\n  rw [← hj']\n  refine' Set.Subset.trans _ (Set.subset_iUnion₂ j hj)\n  exact Set.Subset.rfl\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\n⊢ IsCompact ↑(Scheme.basicOpen X f)\n[PROOFSTEP]\nrefine' ((isCompact_open_iff_eq_finset_affine_union _).mpr _).1\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\n⊢ ∃ s, Set.Finite s ∧ ↑(Scheme.basicOpen X f) = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nobtain ⟨s, hs, e⟩ := (isCompact_open_iff_eq_finset_affine_union _).mp ⟨hU, U.isOpen⟩\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ∃ s, Set.Finite s ∧ ↑(Scheme.basicOpen X f) = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nlet g : s → X.affineOpens := by\n  intro V\n  use V.1 ⊓ X.basicOpen f\n  have : V.1.1 ⟶ U := by\n    apply homOfLE; change _ ⊆ (U : Set X.carrier); rw [e]\n    convert @Set.subset_iUnion₂ _ _ _ (fun (U : X.affineOpens) (_ : U ∈ s) => ↑U) V V.prop using 1\n  erw [← X.toLocallyRingedSpace.toRingedSpace.basicOpen_res this.op]\n  exact IsAffineOpen.basicOpenIsAffine V.1.prop _\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ↑s → ↑(Scheme.affineOpens X)\n[PROOFSTEP]\nintro V\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑(Scheme.affineOpens X)\n[PROOFSTEP]\nuse V.1 ⊓ X.basicOpen f\n[GOAL]\ncase property\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X\n[PROOFSTEP]\nhave : V.1.1 ⟶ U := by\n  apply homOfLE; change _ ⊆ (U : Set X.carrier); rw [e]\n  convert @Set.subset_iUnion₂ _ _ _ (fun (U : X.affineOpens) (_ : U ∈ s) => ↑U) V V.prop using 1\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑↑V ⟶ U\n[PROOFSTEP]\napply homOfLE\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑↑V ≤ U\n[PROOFSTEP]\nchange _ ⊆ (U : Set X.carrier)\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑↑↑V ⊆ ↑U\n[PROOFSTEP]\nrw [e]\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\n⊢ ↑↑↑V ⊆ ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nconvert @Set.subset_iUnion₂ _ _ _ (fun (U : X.affineOpens) (_ : U ∈ s) => ↑U) V V.prop using 1\n[GOAL]\ncase property\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\nthis : ↑↑V ⟶ U\n⊢ ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X\n[PROOFSTEP]\nerw [← X.toLocallyRingedSpace.toRingedSpace.basicOpen_res this.op]\n[GOAL]\ncase property\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\nV : ↑s\nthis : ↑↑V ⟶ U\n⊢ RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace)\n      (↑((LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace).toPresheafedSpace.presheaf.map this.op) f) ∈\n    Scheme.affineOpens X\n[PROOFSTEP]\nexact IsAffineOpen.basicOpenIsAffine V.1.prop _\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\n⊢ ∃ s, Set.Finite s ∧ ↑(Scheme.basicOpen X f) = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nhaveI : Finite s := hs.to_subtype\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ∃ s, Set.Finite s ∧ ↑(Scheme.basicOpen X f) = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nrefine' ⟨Set.range g, Set.finite_range g, _⟩\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ↑(Scheme.basicOpen X f) = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\nrefine' (Set.inter_eq_right_iff_subset.mpr (SetLike.coe_subset_coe.2 <| RingedSpace.basicOpen_le _ _)).symm.trans _\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ↑U ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f) =\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\nrw [e, Set.iUnion₂_inter]\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f) =\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase intro.intro.a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f) ≤\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\napply Set.iUnion₂_subset\n[GOAL]\ncase intro.intro.a\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i ≤\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f)\n[PROOFSTEP]\napply Set.iUnion₂_subset\n[GOAL]\ncase intro.intro.a.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ∀ (i : ↑(Scheme.affineOpens X)),\n    i ∈ s →\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f) ⊆\n        ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\nintro i hi\n[GOAL]\ncase intro.intro.a.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\ni : ↑(Scheme.affineOpens X)\nhi : i ∈ s\n⊢ ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f) ⊆\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ Set.range g), ↑↑i\n[PROOFSTEP]\nexact\n  Set.Subset.trans (Set.Subset.rfl : _ ≤ g ⟨i, hi⟩)\n    (@Set.subset_iUnion₂ _ _ _ (fun (i : Scheme.affineOpens X) (_ : i ∈ Set.range g) => (i : Set X.toPresheafedSpace)) _\n      (Set.mem_range_self ⟨i, hi⟩))\n[GOAL]\ncase intro.intro.a.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\n⊢ ∀ (i : ↑(Scheme.affineOpens X)),\n    i ∈ Set.range g →\n      ↑↑i ⊆\n        ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n          ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f)\n[PROOFSTEP]\nrintro ⟨i, hi⟩ ⟨⟨j, hj⟩, hj'⟩\n[GOAL]\ncase intro.intro.a.h.mk.intro.mk\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\ni : Opens ↑↑X.toPresheafedSpace\nhi : i ∈ Scheme.affineOpens X\nj : ↑(Scheme.affineOpens X)\nhj : j ∈ s\nhj' : g { val := j, property := hj } = { val := i, property := hi }\n⊢ ↑↑{ val := i, property := hi } ⊆\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f)\n[PROOFSTEP]\nrw [← hj']\n[GOAL]\ncase intro.intro.a.h.mk.intro.mk\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\ni : Opens ↑↑X.toPresheafedSpace\nhi : i ∈ Scheme.affineOpens X\nj : ↑(Scheme.affineOpens X)\nhj : j ∈ s\nhj' : g { val := j, property := hj } = { val := i, property := hi }\n⊢ ↑↑(g { val := j, property := hj }) ⊆\n    ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s),\n      ↑↑i ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f)\n[PROOFSTEP]\nrefine' Set.Subset.trans _ (Set.subset_iUnion₂ j hj)\n[GOAL]\ncase intro.intro.a.h.mk.intro.mk\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact ↑U\nf : ↑(X.presheaf.obj (op U))\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : ↑U = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\ng : ↑s → ↑(Scheme.affineOpens X) :=\n  fun V => { val := ↑↑V ⊓ Scheme.basicOpen X f, property := (_ : ↑↑V ⊓ Scheme.basicOpen X f ∈ Scheme.affineOpens X) }\nthis : Finite ↑s\ni : Opens ↑↑X.toPresheafedSpace\nhi : i ∈ Scheme.affineOpens X\nj : ↑(Scheme.affineOpens X)\nhj : j ∈ s\nhj' : g { val := j, property := hj } = { val := i, property := hi }\n⊢ ↑↑(g { val := j, property := hj }) ⊆\n    ↑↑j ∩ ↑(RingedSpace.basicOpen (LocallyRingedSpace.toRingedSpace X.toLocallyRingedSpace) f)\n[PROOFSTEP]\nexact Set.Subset.rfl\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ AffineTargetMorphismProperty.IsLocal affineProperty\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase RespectsIso\nX Y : Scheme\nf : X ⟶ Y\n⊢ MorphismProperty.RespectsIso (AffineTargetMorphismProperty.toProperty affineProperty)\n[PROOFSTEP]\napply AffineTargetMorphismProperty.respectsIso_mk\n[GOAL]\ncase RespectsIso.h₁\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], affineProperty f → affineProperty (e.hom ≫ f)\n[PROOFSTEP]\nrintro X Y Z e _ _ H\n[GOAL]\ncase RespectsIso.h₂\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], affineProperty f → affineProperty (f ≫ e.hom)\n[PROOFSTEP]\nrintro X Y Z e _ _ H\n[GOAL]\ncase RespectsIso.h₁\nX✝ Y✝ : Scheme\nf : X✝ ⟶ Y✝\nX Y Z : Scheme\ne : X ≅ Y\nf✝ : Y ⟶ Z\ninst✝ : IsAffine Z\nH : affineProperty f✝\n⊢ affineProperty (e.hom ≫ f✝)\ncase RespectsIso.h₂\nX✝ Y✝ : Scheme\nf : X✝ ⟶ Y✝\nX Y Z : Scheme\ne : Y ≅ Z\nf✝ : X ⟶ Y\nh✝ : IsAffine Y\nH : affineProperty f✝\n⊢ affineProperty (f✝ ≫ e.hom)\n[PROOFSTEP]\nexacts [@Homeomorph.compactSpace _ _ _ _ H (TopCat.homeoOfIso (asIso e.inv.1.base)), H]\n[GOAL]\ncase toBasicOpen\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (r : ↑(Y.presheaf.obj (op ⊤))),\n    affineProperty f → affineProperty (f ∣_ Scheme.basicOpen Y r)\n[PROOFSTEP]\nintrov H\n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : affineProperty f\n⊢ affineProperty (f ∣_ Scheme.basicOpen Y r)\n[PROOFSTEP]\ndsimp [affineProperty] at H ⊢\n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ CompactSpace ↑((Opens.toTopCat ↑X.toPresheafedSpace).obj ((Opens.map f.val.base).obj (Scheme.basicOpen Y r)))\n[PROOFSTEP]\nchange CompactSpace ((Opens.map f.val.base).obj (Y.basicOpen r))\n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ CompactSpace { x // x ∈ (Opens.map f.val.base).obj (Scheme.basicOpen Y r) }\n[PROOFSTEP]\nrw [Scheme.preimage_basicOpen f r]\n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ CompactSpace { x // x ∈ Scheme.basicOpen X (↑(NatTrans.app f.val.c (op ⊤)) r) }\n[PROOFSTEP]\nerw [← isCompact_iff_compactSpace]\n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : CompactSpace ↑↑X.toPresheafedSpace\n⊢ IsCompact ↑(Scheme.basicOpen X (↑(NatTrans.app f.val.c (op ⊤)) r))\n[PROOFSTEP]\nrw [← isCompact_univ_iff] at H \n[GOAL]\ncase toBasicOpen\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : IsCompact Set.univ\n⊢ IsCompact ↑(Scheme.basicOpen X (↑(NatTrans.app f.val.c (op ⊤)) r))\n[PROOFSTEP]\napply isCompact_basicOpen\n[GOAL]\ncase toBasicOpen.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\ninst✝ : IsAffine Y\nf : X ⟶ Y\nr : ↑(Y.presheaf.obj (op ⊤))\nH : IsCompact Set.univ\n⊢ IsCompact ↑((Opens.map f.val.base).obj ⊤)\n[PROOFSTEP]\nexact H\n[GOAL]\ncase ofBasicOpenCover\nX Y : Scheme\nf : X ⟶ Y\n⊢ ∀ {X Y : Scheme} [inst : IsAffine Y] (f : X ⟶ Y) (s : Finset ↑(Y.presheaf.obj (op ⊤))),\n    Ideal.span ↑s = ⊤ → (∀ (r : { x // x ∈ s }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)) → affineProperty f\n[PROOFSTEP]\nrintro X Y H f S hS hS'\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ affineProperty f\n[PROOFSTEP]\nrw [← IsAffineOpen.basicOpen_union_eq_self_iff] at hS \n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ affineProperty f\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\ndelta QuasiCompact.affineProperty\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ CompactSpace ↑↑X.toPresheafedSpace\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nrw [← isCompact_univ_iff]\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsCompact Set.univ\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nchange IsCompact ((Opens.map f.val.base).obj ⊤).1\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsCompact ((Opens.map f.val.base).obj ⊤).carrier\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nrw [← hS]\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsCompact ((Opens.map f.val.base).obj (⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f)).carrier\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\ndsimp [Opens.map]\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsCompact (↑f.val.base ⁻¹' ↑(⨆ (f : { x // x ∈ S }), Scheme.basicOpen Y ↑f))\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nsimp only [Opens.iSup_mk, Opens.carrier_eq_coe, Opens.coe_mk, Set.preimage_iUnion]\n[GOAL]\ncase ofBasicOpenCover\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : ⨆ (f : ↑↑S), Scheme.basicOpen Y ↑f = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsCompact (⋃ (i : { x // x ∈ S }), ↑f.val.base ⁻¹' ↑(Scheme.basicOpen Y ↑i))\ncase ofBasicOpenCover.hU\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y : Scheme\nH : IsAffine Y\nf : X ⟶ Y\nS : Finset ↑(Y.presheaf.obj (op ⊤))\nhS : Ideal.span ↑S = ⊤\nhS' : ∀ (r : { x // x ∈ S }), affineProperty (f ∣_ Scheme.basicOpen Y ↑r)\n⊢ IsAffineOpen ⊤\n[PROOFSTEP]\nexacts [isCompact_iUnion fun i => isCompact_iff_compactSpace.mpr (hS' i), topIsAffineOpen _]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\n⊢ AffineTargetMorphismProperty.StableUnderBaseChange affineProperty\n[PROOFSTEP]\nintro X Y S _ _ f g h\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : affineProperty g\n⊢ affineProperty pullback.fst\n[PROOFSTEP]\nrw [QuasiCompact.affineProperty] at h ⊢\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n⊢ CompactSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nskip\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n⊢ CompactSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nlet 𝒰 := Scheme.Pullback.openCoverOfRight Y.affineCover.finiteSubcover f g\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\n⊢ CompactSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nhave : Finite 𝒰.J := by dsimp; infer_instance\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\n⊢ Finite 𝒰.J\n[PROOFSTEP]\ndsimp\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\n⊢ Finite (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)).J\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\nthis : Finite 𝒰.J\n⊢ CompactSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nhave : ∀ i, CompactSpace (𝒰.obj i).carrier := by intro i; dsimp; infer_instance\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\nthis : Finite 𝒰.J\n⊢ ∀ (i : 𝒰.J), CompactSpace ↑↑(Scheme.OpenCover.obj 𝒰 i).toPresheafedSpace\n[PROOFSTEP]\nintro i\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\nthis : Finite 𝒰.J\ni : 𝒰.J\n⊢ CompactSpace ↑↑(Scheme.OpenCover.obj 𝒰 i).toPresheafedSpace\n[PROOFSTEP]\ndsimp\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\nthis : Finite 𝒰.J\ni : 𝒰.J\n⊢ CompactSpace\n    ↑↑(pullback f\n                (Scheme.OpenCover.map (Scheme.affineCover Y) (Scheme.OpenCover.f (Scheme.affineCover Y) ↑i) ≫\n                  g)).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX✝ Y✝ : Scheme\nf✝ : X✝ ⟶ Y✝\nX Y S : Scheme\ninst✝¹ : IsAffine S\ninst✝ : IsAffine X\nf : X ⟶ S\ng : Y ⟶ S\nh : CompactSpace ↑↑Y.toPresheafedSpace\n𝒰 : Scheme.OpenCover (pullback f g) :=\n  Scheme.Pullback.openCoverOfRight (Scheme.OpenCover.finiteSubcover (Scheme.affineCover Y)) f g\nthis✝ : Finite 𝒰.J\nthis : ∀ (i : 𝒰.J), CompactSpace ↑↑(Scheme.OpenCover.obj 𝒰 i).toPresheafedSpace\n⊢ CompactSpace ↑↑(pullback f g).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\nexact 𝒰.compactSpace\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\n⊢ P S\n[PROOFSTEP]\nclassical\nobtain ⟨s, hs, hs'⟩ := (isCompact_open_iff_eq_finset_affine_union S.1).mp ⟨hS, S.2⟩\nreplace hs' : S = iSup fun i : s => (i : Opens X.carrier) := by ext1; simpa using hs'\nsubst hs'\napply @Set.Finite.induction_on _ _ _ hs\n· convert h₁; rw [iSup_eq_bot]; rintro ⟨_, h⟩; exact h.elim\n· intro x s _ hs h₄\n  have : IsCompact (⨆ i : s, (i : Opens X.carrier)).1 := by\n    refine' ((isCompact_open_iff_eq_finset_affine_union _).mpr _).1; exact ⟨s, hs, by simp⟩\n  convert h₂ _ this x h₄\n  rw [iSup_subtype, sup_comm]\n  conv_rhs => rw [iSup_subtype]\n  exact iSup_insert\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\n⊢ P S\n[PROOFSTEP]\nobtain ⟨s, hs, hs'⟩ := (isCompact_open_iff_eq_finset_affine_union S.1).mp ⟨hS, S.2⟩\n[GOAL]\ncase intro.intro\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhs' : S.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ P S\n[PROOFSTEP]\nreplace hs' : S = iSup fun i : s => (i : Opens X.carrier) := by ext1; simpa using hs'\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhs' : S.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ S = ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhs' : S.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ↑S = ↑(⨆ (i : ↑s), ↑↑i)\n[PROOFSTEP]\nsimpa using hs'\n[GOAL]\ncase intro.intro\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nS : Opens ↑↑X.toPresheafedSpace\nhS : IsCompact S.carrier\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhs' : S = ⨆ (i : ↑s), ↑↑i\n⊢ P S\n[PROOFSTEP]\nsubst hs'\n[GOAL]\ncase intro.intro\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ P (⨆ (i : ↑s), ↑↑i)\n[PROOFSTEP]\napply @Set.Finite.induction_on _ _ _ hs\n[GOAL]\ncase intro.intro.H0\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ P (⨆ (i : ↑∅), ↑↑i)\n[PROOFSTEP]\nconvert h₁\n[GOAL]\ncase h.e'_1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ⨆ (i : ↑∅), ↑↑i = ⊥\n[PROOFSTEP]\nrw [iSup_eq_bot]\n[GOAL]\ncase h.e'_1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ∀ (i : ↑∅), ↑↑i = ⊥\n[PROOFSTEP]\nrintro ⟨_, h⟩\n[GOAL]\ncase h.e'_1.mk\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\nval✝ : ↑(Scheme.affineOpens X)\nh : val✝ ∈ ∅\n⊢ ↑↑{ val := val✝, property := h } = ⊥\n[PROOFSTEP]\nexact h.elim\n[GOAL]\ncase intro.intro.H1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nhS : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ∀ {a : ↑(Scheme.affineOpens X)} {s : Set ↑(Scheme.affineOpens X)},\n    ¬a ∈ s → Set.Finite s → P (⨆ (i : ↑s), ↑↑i) → P (⨆ (i : ↑(insert a s)), ↑↑i)\n[PROOFSTEP]\nintro x s _ hs h₄\n[GOAL]\ncase intro.intro.H1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\n⊢ P (⨆ (i : ↑(insert x s)), ↑↑i)\n[PROOFSTEP]\nhave : IsCompact (⨆ i : s, (i : Opens X.carrier)).1 := by\n  refine' ((isCompact_open_iff_eq_finset_affine_union _).mpr _).1; exact ⟨s, hs, by simp⟩\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\n⊢ IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n[PROOFSTEP]\nrefine' ((isCompact_open_iff_eq_finset_affine_union _).mpr _).1\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\n⊢ ∃ s_1, Set.Finite s_1 ∧ (⨆ (i : ↑s), ↑↑i).carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s_1), ↑↑i\n[PROOFSTEP]\nexact ⟨s, hs, by simp⟩\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\n⊢ (⨆ (i : ↑s), ↑↑i).carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.H1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ P (⨆ (i : ↑(insert x s)), ↑↑i)\n[PROOFSTEP]\nconvert h₂ _ this x h₄\n[GOAL]\ncase h.e'_1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ⨆ (i : ↑(insert x s)), ↑↑i = (⨆ (i : ↑s), ↑↑i) ⊔ ↑x\n[PROOFSTEP]\nrw [iSup_subtype, sup_comm]\n[GOAL]\ncase h.e'_1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ⨆ (i : ↑(Scheme.affineOpens X)) (h : i ∈ insert x s), ↑↑{ val := i, property := h } = ↑x ⊔ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nconv_rhs => rw [iSup_subtype]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n| ↑x ⊔ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nrw [iSup_subtype]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n| ↑x ⊔ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nrw [iSup_subtype]\n[GOAL]\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n| ↑x ⊔ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nrw [iSup_subtype]\n[GOAL]\ncase h.e'_1\nX Y : Scheme\nf : X ⟶ Y\nZ : Scheme\nP : Opens ↑↑X.toPresheafedSpace → Prop\nh₁ : P ⊥\nh₂ : ∀ (S : Opens ↑↑X.toPresheafedSpace), IsCompact S.carrier → ∀ (U : ↑(Scheme.affineOpens X)), P S → P (S ⊔ ↑U)\ns✝ : Set ↑(Scheme.affineOpens X)\nhs✝ : Set.Finite s✝\nhS : IsCompact (⨆ (i : ↑s✝), ↑↑i).carrier\nx : ↑(Scheme.affineOpens X)\ns : Set ↑(Scheme.affineOpens X)\na✝ : ¬x ∈ s\nhs : Set.Finite s\nh₄ : P (⨆ (i : ↑s), ↑↑i)\nthis : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\n⊢ ⨆ (i : ↑(Scheme.affineOpens X)) (h : i ∈ insert x s), ↑↑{ val := i, property := h } =\n    ↑x ⊔ ⨆ (i : ↑(Scheme.affineOpens X)) (h : i ∈ s), ↑↑{ val := i, property := h }\n[PROOFSTEP]\nexact iSup_insert\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ : Scheme\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nrw [← map_zero (X.presheaf.map (homOfLE <| X.basicOpen_le f : X.basicOpen f ⟶ U).op)] at H \n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ : Scheme\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X f ≤ U)).op) 0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nobtain ⟨⟨_, n, rfl⟩, e⟩ := (isLocalization_basicOpen hU f).eq_iff_exists'.mp H\n[GOAL]\ncase intro.mk.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ : Scheme\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X f ≤ U)).op) 0\nn : ℕ\ne :\n  ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) } *\n      x =\n    ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) } *\n      0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nexact ⟨n, by simpa [mul_comm x] using e⟩\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ : Scheme\nX : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = ↑(X.presheaf.map (homOfLE (_ : Scheme.basicOpen X f ≤ U)).op) 0\nn : ℕ\ne :\n  ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) } *\n      x =\n    ↑{ val := (fun x x_1 => x ^ x_1) f n,\n          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) f y = (fun x x_1 => x ^ x_1) f n) } *\n      0\n⊢ f ^ n * x = 0\n[PROOFSTEP]\nsimpa [mul_comm x] using e\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nobtain ⟨s, hs, e⟩ := (isCompact_open_iff_eq_finset_affine_union U.1).mp ⟨hU, U.2⟩\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nreplace e : U = iSup fun i : s => (i : Opens X.carrier)\n[GOAL]\ncase e\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ U = ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\next1\n[GOAL]\ncase e.h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U.carrier = ⋃ (i : ↑(Scheme.affineOpens X)) (_ : i ∈ s), ↑↑i\n⊢ ↑U = ↑(⨆ (i : ↑s), ↑↑i)\n[PROOFSTEP]\nsimpa using e\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nhave h₁ : ∀ i : s, i.1.1 ≤ U := by\n  intro i\n  change (i : Opens X.carrier) ≤ U\n  rw [e]\n    -- porting note: `exact le_iSup _ _` no longer works\n  exact le_iSup (fun (i : s) => (i : Opens (X.toPresheafedSpace))) _\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\n⊢ ∀ (i : ↑s), ↑↑i ≤ U\n[PROOFSTEP]\nintro i\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ U\n[PROOFSTEP]\nchange (i : Opens X.carrier) ≤ U\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ U\n[PROOFSTEP]\nrw [e]\n  -- porting note: `exact le_iSup _ _` no longer works\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\ni : ↑s\n⊢ ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\n[PROOFSTEP]\nexact le_iSup (fun (i : s) => (i : Opens (X.toPresheafedSpace))) _\n[GOAL]\ncase intro.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nhave H' := fun i : s =>\n  exists_pow_mul_eq_zero_of_res_basicOpen_eq_zero_of_isAffineOpen X i.1.2 (X.presheaf.map (homOfLE (h₁ i)).op x)\n    (X.presheaf.map (homOfLE (h₁ i)).op f) ?_\n[GOAL]\ncase intro.intro.refine_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nH' :\n  ∀ (i : ↑s),\n    ∃ n, ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\n⊢ ∃ n, f ^ n * x = 0\ncase intro.intro.refine_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x |_\n      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f) =\n    0\n[PROOFSTEP]\nswap\n[GOAL]\ncase intro.intro.refine_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x |_\n      Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f) =\n    0\n[PROOFSTEP]\ndelta TopCat.Presheaf.restrictOpen TopCat.Presheaf.restrict at H ⊢\n[GOAL]\ncase intro.intro.refine_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f)) → a ∈ ↑↑↑i)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x) =\n    0\n[PROOFSTEP]\nconvert congr_arg (X.presheaf.map (homOfLE _).op) H\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ ↑(X.presheaf.map\n          (homOfLE\n              (_ :\n                ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                  a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f)) → a ∈ ↑↑↑i)).op)\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x) =\n    ↑(X.presheaf.map (homOfLE ?intro.intro.refine_1.convert_1).op)\n      (↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x)\n[PROOFSTEP]\nsimp only [← comp_apply, ← Functor.map_comp]\n[GOAL]\ncase h.e'_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ ↑(X.presheaf.map\n          ((homOfLE (_ : ↑↑i ≤ U)).op ≫\n            (homOfLE\n                (_ :\n                  ∀ ⦃a : ↑↑X.toPresheafedSpace⦄,\n                    a ∈ ↑(Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f)) → a ∈ ↑↑↑i)).op))\n      x =\n    ↑(X.presheaf.map\n          ((homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op ≫\n            (homOfLE ?intro.intro.refine_1.convert_1).op))\n      x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ 0 = ↑(X.presheaf.map (homOfLE ?intro.intro.refine_1.convert_1).op) 0\n[PROOFSTEP]\nrw [map_zero]\n[GOAL]\ncase intro.intro.refine_1.convert_1\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : ↑(X.presheaf.map (homOfLE (_ : ∀ ⦃a : ↑↑X.toPresheafedSpace⦄, a ∈ ↑(Scheme.basicOpen X f) → a ∈ ↑U)).op) x = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\ni : ↑s\n⊢ Scheme.basicOpen X (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f) ≤ Scheme.basicOpen X f\n[PROOFSTEP]\nsimp only [Scheme.basicOpen_res, ge_iff_le, inf_le_right]\n[GOAL]\ncase intro.intro.refine_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nH' :\n  ∀ (i : ↑s),\n    ∃ n, ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nchoose n hn using H'\n[GOAL]\ncase intro.intro.refine_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nhaveI := hs.to_subtype\n[GOAL]\ncase intro.intro.refine_2\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis : Finite ↑s\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\ncases nonempty_fintype s\n[GOAL]\ncase intro.intro.refine_2.intro\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ ∃ n, f ^ n * x = 0\n[PROOFSTEP]\nuse Finset.univ.sup n\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ f ^ Finset.sup Finset.univ n * x = 0\n[PROOFSTEP]\nsuffices ∀ i : s, X.presheaf.map (homOfLE (h₁ i)).op (f ^ Finset.univ.sup n * x) = 0\n  by\n  subst e\n  apply TopCat.Sheaf.eq_of_locally_eq X.sheaf fun i : s => (i : Opens X.carrier)\n  intro i\n  rw [map_zero]\n  apply this\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nthis : ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n⊢ f ^ Finset.sup Finset.univ n * x = 0\n[PROOFSTEP]\nsubst e\n[GOAL]\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nn : ↑s → ℕ\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhU : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\nx f : ↑(X.presheaf.obj (op (⨆ (i : ↑s), ↑↑i)))\nH : x |_ Scheme.basicOpen X f = 0\nh₁ : ∀ (i : ↑s), ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) f ^ n i *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) x =\n      0\nthis : ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n⊢ f ^ Finset.sup Finset.univ n * x = 0\n[PROOFSTEP]\napply TopCat.Sheaf.eq_of_locally_eq X.sheaf fun i : s => (i : Opens X.carrier)\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nn : ↑s → ℕ\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhU : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\nx f : ↑(X.presheaf.obj (op (⨆ (i : ↑s), ↑↑i)))\nH : x |_ Scheme.basicOpen X f = 0\nh₁ : ∀ (i : ↑s), ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) f ^ n i *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) x =\n      0\nthis : ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n⊢ ∀ (i : ↑s),\n    ↑((Scheme.sheaf X).val.map (Opens.leSupr (fun i => ↑↑i) i).op) (f ^ Finset.sup Finset.univ n * x) =\n      ↑((Scheme.sheaf X).val.map (Opens.leSupr (fun i => ↑↑i) i).op) 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nn : ↑s → ℕ\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhU : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\nx f : ↑(X.presheaf.obj (op (⨆ (i : ↑s), ↑↑i)))\nH : x |_ Scheme.basicOpen X f = 0\nh₁ : ∀ (i : ↑s), ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) f ^ n i *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) x =\n      0\nthis : ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) (f ^ Finset.sup Finset.univ n * x) = 0\ni : ↑s\n⊢ ↑((Scheme.sheaf X).val.map (Opens.leSupr (fun i => ↑↑i) i).op) (f ^ Finset.sup Finset.univ n * x) =\n    ↑((Scheme.sheaf X).val.map (Opens.leSupr (fun i => ↑↑i) i).op) 0\n[PROOFSTEP]\nrw [map_zero]\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\nn : ↑s → ℕ\nthis✝ : Finite ↑s\nval✝ : Fintype ↑s\nhU : IsCompact (⨆ (i : ↑s), ↑↑i).carrier\nx f : ↑(X.presheaf.obj (op (⨆ (i : ↑s), ↑↑i)))\nH : x |_ Scheme.basicOpen X f = 0\nh₁ : ∀ (i : ↑s), ↑↑i ≤ ⨆ (i : ↑s), ↑↑i\nhn :\n  ∀ (i : ↑s),\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) f ^ n i *\n        ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) x =\n      0\nthis : ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ ⨆ (i : ↑s), ↑↑i)).op) (f ^ Finset.sup Finset.univ n * x) = 0\ni : ↑s\n⊢ ↑((Scheme.sheaf X).val.map (Opens.leSupr (fun i => ↑↑i) i).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\napply this\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis : Finite ↑s\nval✝ : Fintype ↑s\n⊢ ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nhn :\n  ∀ (i : ↑s), ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x = 0\nthis : Finite ↑s\nval✝ : Fintype ↑s\ni : ↑s\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\nreplace hn := congr_arg (fun x => X.presheaf.map (homOfLE (h₁ i)).op (f ^ (Finset.univ.sup n - n i)) * x) (hn i)\n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nthis : Finite ↑s\nval✝ : Fintype ↑s\ni : ↑s\nhn :\n  (fun x => ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i)) * x)\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x) =\n    (fun x => ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i)) * x) 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\ndsimp at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nthis : Finite ↑s\nval✝ : Fintype ↑s\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i)) *\n      (↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) f ^ n i * ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) x) =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i)) * 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\nsimp only [← map_mul, ← map_pow] at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nthis : Finite ↑s\nval✝ : Fintype ↑s\ni : ↑s\nhn :\n  ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i) * (f ^ n i * x)) =\n    ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i)) * 0\n⊢ ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ Finset.sup Finset.univ n * x) = 0\n[PROOFSTEP]\nrwa [mul_zero, ← mul_assoc, ← pow_add, tsub_add_cancel_of_le] at hn \n[GOAL]\ncase h\nX✝ Y : Scheme\nf✝ : X✝ ⟶ Y\nZ X : Scheme\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsCompact U.carrier\nx f : ↑(X.presheaf.obj (op U))\nH : x |_ Scheme.basicOpen X f = 0\ns : Set ↑(Scheme.affineOpens X)\nhs : Set.Finite s\ne : U = ⨆ (i : ↑s), ↑↑i\nh₁ : ∀ (i : ↑s), ↑↑i ≤ U\nn : ↑s → ℕ\nthis : Finite ↑s\nval✝ : Fintype ↑s\ni : ↑s\nhn : ↑(X.presheaf.map (homOfLE (_ : ↑↑i ≤ U)).op) (f ^ (Finset.sup Finset.univ n - n i + n i) * x) = 0\n⊢ n i ≤ Finset.sup Finset.univ n\n[PROOFSTEP]\napply Finset.le_sup (Finset.mem_univ i)\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact", "llama_tokens": 37467, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011397337391, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.274289929935509}}
{"text": "[GOAL]\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring A\ninst✝⁸ : AddCommMonoid M₁\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Algebra R A\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module A M₁\ninst✝³ : SMulCommClass R A M₁\ninst✝² : SMulCommClass A R M₁\ninst✝¹ : IsScalarTower R A M₁\ninst✝ : Module R M₂\nB₁ : BilinForm A M₁\nB₂ : BilinForm R M₂\nhB₁ : IsSymm B₁\nhB₂ : IsSymm B₂\n⊢ IsSymm (BilinForm.tmul B₁ B₂)\n[PROOFSTEP]\nrw [isSymm_iff_flip R]\n[GOAL]\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring A\ninst✝⁸ : AddCommMonoid M₁\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Algebra R A\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module A M₁\ninst✝³ : SMulCommClass R A M₁\ninst✝² : SMulCommClass A R M₁\ninst✝¹ : IsScalarTower R A M₁\ninst✝ : Module R M₂\nB₁ : BilinForm A M₁\nB₂ : BilinForm R M₂\nhB₁ : IsSymm B₁\nhB₂ : IsSymm B₂\n⊢ ↑(flipHom R) (BilinForm.tmul B₁ B₂) = BilinForm.tmul B₁ B₂\n[PROOFSTEP]\napply toLin.injective\n[GOAL]\ncase a\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring A\ninst✝⁸ : AddCommMonoid M₁\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Algebra R A\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module A M₁\ninst✝³ : SMulCommClass R A M₁\ninst✝² : SMulCommClass A R M₁\ninst✝¹ : IsScalarTower R A M₁\ninst✝ : Module R M₂\nB₁ : BilinForm A M₁\nB₂ : BilinForm R M₂\nhB₁ : IsSymm B₁\nhB₂ : IsSymm B₂\n⊢ ↑toLin (↑(flipHom R) (BilinForm.tmul B₁ B₂)) = ↑toLin (BilinForm.tmul B₁ B₂)\n[PROOFSTEP]\next x₁ x₂ y₁ y₂\n[GOAL]\ncase a.a.h.h.a.h.h\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝¹⁰ : CommSemiring R\ninst✝⁹ : CommSemiring A\ninst✝⁸ : AddCommMonoid M₁\ninst✝⁷ : AddCommMonoid M₂\ninst✝⁶ : Algebra R A\ninst✝⁵ : Module R M₁\ninst✝⁴ : Module A M₁\ninst✝³ : SMulCommClass R A M₁\ninst✝² : SMulCommClass A R M₁\ninst✝¹ : IsScalarTower R A M₁\ninst✝ : Module R M₂\nB₁ : BilinForm A M₁\nB₂ : BilinForm R M₂\nhB₁ : IsSymm B₁\nhB₂ : IsSymm B₂\nx₁ : M₁\nx₂ : M₂\ny₁ : M₁\ny₂ : M₂\n⊢ ↑(↑(AlgebraTensorModule.curry (↑(↑(AlgebraTensorModule.curry (↑toLin (↑(flipHom R) (BilinForm.tmul B₁ B₂)))) x₁) x₂))\n          y₁)\n      y₂ =\n    ↑(↑(AlgebraTensorModule.curry (↑(↑(AlgebraTensorModule.curry (↑toLin (BilinForm.tmul B₁ B₂))) x₁) x₂)) y₁) y₂\n[PROOFSTEP]\nexact (congr_arg₂ (HSMul.hSMul) (hB₂ x₂ y₂) (hB₁ x₁ y₁)).symm\n[GOAL]\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝⁹ : CommRing R\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₁\ninst✝⁵ : Module R M₂\ninst✝⁴ : Module.Free R M₁\ninst✝³ : Module.Finite R M₁\ninst✝² : Module.Free R M₂\ninst✝¹ : Module.Finite R M₂\ninst✝ : Nontrivial R\n⊢ ↑(tensorDistribEquiv R) = tensorDistrib R R\n[PROOFSTEP]\next B₁ B₂ : 3\n[GOAL]\ncase a.h.h\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝⁹ : CommRing R\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₁\ninst✝⁵ : Module R M₂\ninst✝⁴ : Module.Free R M₁\ninst✝³ : Module.Finite R M₁\ninst✝² : Module.Free R M₂\ninst✝¹ : Module.Finite R M₂\ninst✝ : Nontrivial R\nB₁ : BilinForm R M₁\nB₂ : BilinForm R M₂\n⊢ ↑(↑(AlgebraTensorModule.curry ↑(tensorDistribEquiv R)) B₁) B₂ =\n    ↑(↑(AlgebraTensorModule.curry (tensorDistrib R R)) B₁) B₂\n[PROOFSTEP]\napply toLin.injective\n[GOAL]\ncase a.h.h.a\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝⁹ : CommRing R\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₁\ninst✝⁵ : Module R M₂\ninst✝⁴ : Module.Free R M₁\ninst✝³ : Module.Finite R M₁\ninst✝² : Module.Free R M₂\ninst✝¹ : Module.Finite R M₂\ninst✝ : Nontrivial R\nB₁ : BilinForm R M₁\nB₂ : BilinForm R M₂\n⊢ ↑toLin (↑(↑(AlgebraTensorModule.curry ↑(tensorDistribEquiv R)) B₁) B₂) =\n    ↑toLin (↑(↑(AlgebraTensorModule.curry (tensorDistrib R R)) B₁) B₂)\n[PROOFSTEP]\next\n[GOAL]\ncase a.h.h.a.a.h.h.a.h.h\nι : Type uι\nR : Type uR\nA : Type uA\nM₁ : Type uM₁\nM₂ : Type uM₂\ninst✝⁹ : CommRing R\ninst✝⁸ : AddCommGroup M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₁\ninst✝⁵ : Module R M₂\ninst✝⁴ : Module.Free R M₁\ninst✝³ : Module.Finite R M₁\ninst✝² : Module.Free R M₂\ninst✝¹ : Module.Finite R M₂\ninst✝ : Nontrivial R\nB₁ : BilinForm R M₁\nB₂ : BilinForm R M₂\nx✝³ : M₁\nx✝² : M₂\nx✝¹ : M₁\nx✝ : M₂\n⊢ ↑(↑(AlgebraTensorModule.curry\n              (↑(↑(AlgebraTensorModule.curry (↑toLin (↑(↑(AlgebraTensorModule.curry ↑(tensorDistribEquiv R)) B₁) B₂)))\n                    x✝³)\n                x✝²))\n          x✝¹)\n      x✝ =\n    ↑(↑(AlgebraTensorModule.curry\n              (↑(↑(AlgebraTensorModule.curry (↑toLin (↑(↑(AlgebraTensorModule.curry (tensorDistrib R R)) B₁) B₂))) x✝³)\n                x✝²))\n          x✝¹)\n      x✝\n[PROOFSTEP]\nexact mul_comm _ _\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.BilinearForm.TensorProduct", "llama_tokens": 2385, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.7057850278370112, "lm_q2_score": 0.38861802670584894, "lm_q1q2_score": 0.274280784796552}}
{"text": "[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝² : Semiring R\ninst✝¹ : SetLike σ R\ninst✝ : AddSubmonoidClass σ R\nA : ι → σ\ni : ι\n⊢ AddCommMonoid { x // x ∈ A i }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝² : Ring R\ninst✝¹ : SetLike σ R\ninst✝ : AddSubgroupClass σ R\nA : ι → σ\ni : ι\n⊢ AddCommGroup { x // x ∈ A i }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : CommSemiring S\ninst✝² : Semiring R\ninst✝¹ : Algebra S R\nA : ι → Submodule S R\ninst✝ : GradedOne A\ns : S\n⊢ ↑(algebraMap S R) s ∈ A 0\n[PROOFSTEP]\nrw [Algebra.algebraMap_eq_smul_one]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : CommSemiring S\ninst✝² : Semiring R\ninst✝¹ : Algebra S R\nA : ι → Submodule S R\ninst✝ : GradedOne A\ns : S\n⊢ s • 1 ∈ A 0\n[PROOFSTEP]\nexact (A 0).smul_mem s <| SetLike.one_mem_graded _\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddMonoidWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝ : GradedOne A\nn : ℕ\n⊢ ↑n ∈ A 0\n[PROOFSTEP]\ninduction' n with _ n_ih\n[GOAL]\ncase zero\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddMonoidWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝ : GradedOne A\n⊢ ↑Nat.zero ∈ A 0\n[PROOFSTEP]\nrw [Nat.cast_zero]\n[GOAL]\ncase zero\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddMonoidWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝ : GradedOne A\n⊢ 0 ∈ A 0\n[PROOFSTEP]\nexact zero_mem (A 0)\n[GOAL]\ncase succ\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddMonoidWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝ : GradedOne A\nn✝ : ℕ\nn_ih : ↑n✝ ∈ A 0\n⊢ ↑(Nat.succ n✝) ∈ A 0\n[PROOFSTEP]\nrw [Nat.cast_succ]\n[GOAL]\ncase succ\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddMonoidWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝ : GradedOne A\nn✝ : ℕ\nn_ih : ↑n✝ ∈ A 0\n⊢ ↑n✝ + 1 ∈ A 0\n[PROOFSTEP]\nexact add_mem n_ih (SetLike.one_mem_graded _)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddGroupWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubgroupClass σ R\nA : ι → σ\ninst✝ : GradedOne A\nz : ℤ\n⊢ ↑z ∈ A 0\n[PROOFSTEP]\ninduction z\n[GOAL]\ncase ofNat\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddGroupWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubgroupClass σ R\nA : ι → σ\ninst✝ : GradedOne A\na✝ : ℕ\n⊢ ↑(Int.ofNat a✝) ∈ A 0\n[PROOFSTEP]\nrw [Int.ofNat_eq_coe, Int.cast_ofNat]\n[GOAL]\ncase ofNat\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddGroupWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubgroupClass σ R\nA : ι → σ\ninst✝ : GradedOne A\na✝ : ℕ\n⊢ ↑a✝ ∈ A 0\n[PROOFSTEP]\nexact SetLike.nat_cast_mem_graded _ _\n[GOAL]\ncase negSucc\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddGroupWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubgroupClass σ R\nA : ι → σ\ninst✝ : GradedOne A\na✝ : ℕ\n⊢ ↑(Int.negSucc a✝) ∈ A 0\n[PROOFSTEP]\nrw [Int.cast_negSucc]\n[GOAL]\ncase negSucc\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁴ : Zero ι\ninst✝³ : AddGroupWithOne R\ninst✝² : SetLike σ R\ninst✝¹ : AddSubgroupClass σ R\nA : ι → σ\ninst✝ : GradedOne A\na✝ : ℕ\n⊢ -↑(a✝ + 1) ∈ A 0\n[PROOFSTEP]\nexact neg_mem (SetLike.nat_cast_mem_graded _ _)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ↑(↑(r * r') n) =\n    ∑ ij in Finset.filter (fun ij => ij.fst + ij.snd = n) (DFinsupp.support r ×ˢ DFinsupp.support r'),\n      ↑(↑r ij.fst) * ↑(↑r' ij.snd)\n[PROOFSTEP]\nrw [mul_eq_sum_support_ghas_mul, DFinsupp.finset_sum_apply, AddSubmonoidClass.coe_finset_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ∑ i in DFinsupp.support r ×ˢ DFinsupp.support r',\n      ↑(↑(↑(of (fun i => (fun i => { x // x ∈ A i }) i) (i.fst + i.snd)) (GradedMonoid.GMul.mul (↑r i.fst) (↑r' i.snd)))\n          n) =\n    ∑ ij in Finset.filter (fun ij => ij.fst + ij.snd = n) (DFinsupp.support r ×ˢ DFinsupp.support r'),\n      ↑(↑r ij.fst) * ↑(↑r' ij.snd)\n[PROOFSTEP]\nsimp_rw [coe_of_apply, apply_ite, ZeroMemClass.coe_zero, ← Finset.sum_filter, SetLike.coe_gMul]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ↑(↑(r * r') n) = DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0\n[PROOFSTEP]\nrw [mul_eq_dfinsupp_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ↑(↑(DFinsupp.sum r fun i ai =>\n            DFinsupp.sum r' fun j aj => ↑(of (fun i => { x // x ∈ A i }) (i + j)) (GradedMonoid.GMul.mul ai aj))\n        n) =\n    DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0\n[PROOFSTEP]\niterate 2 rw [DFinsupp.sum_apply, DFinsupp.sum, AddSubmonoidClass.coe_finset_sum]; congr; ext\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ↑(↑(DFinsupp.sum r fun i ai =>\n            DFinsupp.sum r' fun j aj => ↑(of (fun i => { x // x ∈ A i }) (i + j)) (GradedMonoid.GMul.mul ai aj))\n        n) =\n    DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0\n[PROOFSTEP]\nrw [DFinsupp.sum_apply, DFinsupp.sum, AddSubmonoidClass.coe_finset_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ ∑ i in DFinsupp.support r,\n      ↑(↑(DFinsupp.sum r' fun j aj => ↑(of (fun i => { x // x ∈ A i }) (i + j)) (GradedMonoid.GMul.mul (↑r i) aj)) n) =\n    DFinsupp.sum r fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\n⊢ (fun i =>\n      ↑(↑(DFinsupp.sum r' fun j aj => ↑(of (fun i => { x // x ∈ A i }) (i + j)) (GradedMonoid.GMul.mul (↑r i) aj)) n)) =\n    fun i => (fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0) i (↑r i)\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝ : ι\n⊢ ↑(↑(DFinsupp.sum r' fun j aj => ↑(of (fun i => { x // x ∈ A i }) (x✝ + j)) (GradedMonoid.GMul.mul (↑r x✝) aj)) n) =\n    (fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0) x✝ (↑r x✝)\n[PROOFSTEP]\nrw [DFinsupp.sum_apply, DFinsupp.sum, AddSubmonoidClass.coe_finset_sum]\n[GOAL]\ncase e_f.h\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝ : ι\n⊢ ∑ i in DFinsupp.support r',\n      ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝ + i)) (GradedMonoid.GMul.mul (↑r x✝) (↑r' i))) n) =\n    (fun i ri => DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0) x✝ (↑r x✝)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_f.h.e_f\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝ : ι\n⊢ (fun i => ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝ + i)) (GradedMonoid.GMul.mul (↑r x✝) (↑r' i))) n)) = fun i =>\n    (fun j rj => if x✝ + j = n then ↑(↑r x✝) * ↑rj else 0) i (↑r' i)\n[PROOFSTEP]\next\n[GOAL]\ncase e_f.h.e_f.h\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝¹ x✝ : ι\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝¹ + x✝)) (GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝))) n) =\n    (fun j rj => if x✝¹ + j = n then ↑(↑r x✝¹) * ↑rj else 0) x✝ (↑r' x✝)\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase e_f.h.e_f.h\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝¹ x✝ : ι\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝¹ + x✝)) (GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝))) n) =\n    if x✝¹ + x✝ = n then ↑(↑r x✝¹) * ↑(↑r' x✝) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝¹ x✝ : ι\nh : x✝¹ + x✝ = n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝¹ + x✝)) (GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝))) n) = ↑(↑r x✝¹) * ↑(↑r' x✝)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nx✝¹ x✝ : ι\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝¹ + x✝)) (GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝))) (x✝¹ + x✝)) =\n    ↑(↑r x✝¹) * ↑(↑r' x✝)\n[PROOFSTEP]\nrw [of_eq_same]\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nx✝¹ x✝ : ι\n⊢ ↑(GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝)) = ↑(↑r x✝¹) * ↑(↑r' x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝¹ x✝ : ι\nh : ¬x✝¹ + x✝ = n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) (x✝¹ + x✝)) (GradedMonoid.GMul.mul (↑r x✝¹) (↑r' x✝))) n) = 0\n[PROOFSTEP]\nrw [of_eq_of_ne _ _ _ _ h]\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁶ : DecidableEq ι\ninst✝⁵ : Semiring R\ninst✝⁴ : SetLike σ R\ninst✝³ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝² : AddMonoid ι\ninst✝¹ : SetLike.GradedMonoid A\ninst✝ : (i : ι) → (x : { x // x ∈ A i }) → Decidable (x ≠ 0)\nr r' : ⨁ (i : ι), { x // x ∈ A i }\nn x✝¹ x✝ : ι\nh : ¬x✝¹ + x✝ = n\n⊢ ↑0 = 0\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nclassical\nrw [coe_mul_apply_eq_dfinsupp_sum]\napply (DFinsupp.sum_single_index _).trans\nswap\n· simp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self]\n  exact DFinsupp.sum_zero\nsimp_rw [DFinsupp.sum, H, Finset.sum_ite_eq']\nsplit_ifs with h\nrfl\nrw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, mul_zero]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nrw [coe_mul_apply_eq_dfinsupp_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum (↑(of (fun i => { x // x ∈ A i }) i) r) fun i ri =>\n      DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0) =\n    ↑r * ↑(↑r' j)\n[PROOFSTEP]\napply (DFinsupp.sum_single_index _).trans\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑r * ↑rj else 0) = ↑r * ↑(↑r' j)\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑0 * ↑rj else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑0 * ↑rj else 0) = 0\n[PROOFSTEP]\nsimp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum r' fun j rj => 0) = 0\n[PROOFSTEP]\nexact DFinsupp.sum_zero\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑r * ↑rj else 0) = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nsimp_rw [DFinsupp.sum, H, Finset.sum_ite_eq']\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\n⊢ (if j ∈ DFinsupp.support r' then ↑r * ↑(↑r' j) else 0) = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\nh : j ∈ DFinsupp.support r'\n⊢ ↑r * ↑(↑r' j) = ↑r * ↑(↑r' j)\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\nh : ¬j ∈ DFinsupp.support r'\n⊢ 0 = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), i + x = n ↔ x = j\nh : ¬j ∈ DFinsupp.support r'\n⊢ 0 = ↑r * ↑(↑r' j)\n[PROOFSTEP]\nrw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, mul_zero]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nclassical\nrw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm]\napply (DFinsupp.sum_single_index _).trans\nswap\n· simp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self]\n  exact DFinsupp.sum_zero\nsimp_rw [DFinsupp.sum, H, Finset.sum_ite_eq']\nsplit_ifs with h\nrfl\nrw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, zero_mul]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nrw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum (↑(of (fun i => { x // x ∈ A i }) i) r') fun i₂ x₂ =>\n      DFinsupp.sum r fun i₁ x₁ => if i₁ + i₂ = n then ↑x₁ * ↑x₂ else 0) =\n    ↑(↑r j) * ↑r'\n[PROOFSTEP]\napply (DFinsupp.sum_single_index _).trans\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑r' else 0) = ↑(↑r j) * ↑r'\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑0 else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑0 else 0) = 0\n[PROOFSTEP]\nsimp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum r fun i₁ x₁ => 0) = 0\n[PROOFSTEP]\nexact DFinsupp.sum_zero\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑r' else 0) = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nsimp_rw [DFinsupp.sum, H, Finset.sum_ite_eq']\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\n⊢ (if j ∈ DFinsupp.support r then ↑(↑r j) * ↑r' else 0) = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\nh : j ∈ DFinsupp.support r\n⊢ ↑(↑r j) * ↑r' = ↑(↑r j) * ↑r'\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\nh : ¬j ∈ DFinsupp.support r\n⊢ 0 = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : AddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nj n : ι\nH : ∀ (x : ι), x + i = n ↔ x = j\nh : ¬j ∈ DFinsupp.support r\n⊢ 0 = ↑(↑r j) * ↑r'\n[PROOFSTEP]\nrw [DFinsupp.not_mem_support_iff.mp h, ZeroMemClass.coe_zero, zero_mul]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = 0\n[PROOFSTEP]\nclassical\nrw [coe_mul_apply_eq_dfinsupp_sum]\napply (DFinsupp.sum_single_index _).trans\nswap\n· simp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self]\n  exact DFinsupp.sum_zero\n· rw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero]\n  exact fun x _ H => h ((self_le_add_right i x).trans_eq H)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = 0\n[PROOFSTEP]\nrw [coe_mul_apply_eq_dfinsupp_sum]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum (↑(of (fun i => { x // x ∈ A i }) i) r) fun i ri =>\n      DFinsupp.sum r' fun j rj => if i + j = n then ↑ri * ↑rj else 0) =\n    0\n[PROOFSTEP]\napply (DFinsupp.sum_single_index _).trans\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑r * ↑rj else 0) = 0\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑0 * ↑rj else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑0 * ↑rj else 0) = 0\n[PROOFSTEP]\nsimp_rw [ZeroMemClass.coe_zero, zero_mul, ite_self]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r' fun j rj => 0) = 0\n[PROOFSTEP]\nexact DFinsupp.sum_zero\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r' fun j rj => if i + j = n then ↑r * ↑rj else 0) = 0\n[PROOFSTEP]\nrw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ∀ (x : ι), x ∈ DFinsupp.support r' → i + x = n → False\n[PROOFSTEP]\nexact fun x _ H => h ((self_le_add_right i x).trans_eq H)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = 0\n[PROOFSTEP]\nclassical\nrw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm]\napply (DFinsupp.sum_single_index _).trans\nswap\n· simp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self]\n  exact DFinsupp.sum_zero\n· rw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero]\n  exact fun x _ H => h ((self_le_add_left i x).trans_eq H)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = 0\n[PROOFSTEP]\nrw [coe_mul_apply_eq_dfinsupp_sum, DFinsupp.sum_comm]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum (↑(of (fun i => { x // x ∈ A i }) i) r') fun i₂ x₂ =>\n      DFinsupp.sum r fun i₁ x₁ => if i₁ + i₂ = n then ↑x₁ * ↑x₂ else 0) =\n    0\n[PROOFSTEP]\napply (DFinsupp.sum_single_index _).trans\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑r' else 0) = 0\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑0 else 0) = 0\n[PROOFSTEP]\nswap\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑0 else 0) = 0\n[PROOFSTEP]\nsimp_rw [ZeroMemClass.coe_zero, mul_zero, ite_self]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r fun i₁ x₁ => 0) = 0\n[PROOFSTEP]\nexact DFinsupp.sum_zero\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ (DFinsupp.sum r fun i₁ x₁ => if i₁ + i = n then ↑x₁ * ↑r' else 0) = 0\n[PROOFSTEP]\nrw [DFinsupp.sum, Finset.sum_ite_of_false _ _ fun x _ H => _, Finset.sum_const_zero]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : Semiring R\ninst✝³ : SetLike σ R\ninst✝² : AddSubmonoidClass σ R\nA : ι → σ\ninst✝¹ : CanonicallyOrderedAddMonoid ι\ninst✝ : SetLike.GradedMonoid A\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\nh : ¬i ≤ n\n⊢ ∀ (x : ι), x ∈ DFinsupp.support r → x + i = n → False\n[PROOFSTEP]\nexact fun x _ H => h ((self_le_add_left i x).trans_eq H)\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁸ : DecidableEq ι\ninst✝⁷ : Semiring R\ninst✝⁶ : SetLike σ R\ninst✝⁵ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁴ : CanonicallyOrderedAddMonoid ι\ninst✝³ : SetLike.GradedMonoid A\ninst✝² : Sub ι\ninst✝¹ : OrderedSub ι\ninst✝ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\nh : i ≤ n\nx : ι\n⊢ i + x = n ↔ x = n - i\n[PROOFSTEP]\nrw [eq_tsub_iff_add_eq_of_le h, add_comm]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = if i ≤ n then ↑(↑r (n - i)) * ↑r' else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\nh : i ≤ n\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = ↑(↑r (n - i)) * ↑r'\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\nr : ⨁ (i : ι), { x // x ∈ A i }\ni : ι\nr' : { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\nh : ¬i ≤ n\n⊢ ↑(↑(r * ↑(of (fun i => { x // x ∈ A i }) i) r') n) = 0\n[PROOFSTEP]\nexacts [coe_mul_of_apply_of_le _ _ _ n h, coe_mul_of_apply_of_not_le _ _ _ n h]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = if i ≤ n then ↑r * ↑(↑r' (n - i)) else 0\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\nh : i ≤ n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = ↑r * ↑(↑r' (n - i))\ncase neg\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁹ : DecidableEq ι\ninst✝⁸ : Semiring R\ninst✝⁷ : SetLike σ R\ninst✝⁶ : AddSubmonoidClass σ R\nA : ι → σ\ninst✝⁵ : CanonicallyOrderedAddMonoid ι\ninst✝⁴ : SetLike.GradedMonoid A\ninst✝³ : Sub ι\ninst✝² : OrderedSub ι\ninst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1\ni : ι\nr : { x // x ∈ A i }\nr' : ⨁ (i : ι), { x // x ∈ A i }\nn : ι\ninst✝ : Decidable (i ≤ n)\nh : ¬i ≤ n\n⊢ ↑(↑(↑(of (fun i => { x // x ∈ A i }) i) r * r') n) = 0\n[PROOFSTEP]\nexacts [coe_of_mul_apply_of_le _ _ _ n h, coe_of_mul_apply_of_not_le _ _ _ n h]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : CommSemiring S\ninst✝¹ : Semiring R\ninst✝ : Algebra S R\np : Submodule S R\n⊢ 1 ∈ p ^ 0\n[PROOFSTEP]\nrw [← one_le, pow_zero]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : CommSemiring S\ninst✝¹ : Semiring R\ninst✝ : Algebra S R\np✝ : Submodule S R\ni j : ℕ\np q : R\nhp : p ∈ p✝ ^ i\nhq : q ∈ p✝ ^ j\n⊢ p * q ∈ p✝ ^ (i + j)\n[PROOFSTEP]\nrw [pow_add]\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝³ : DecidableEq ι\ninst✝² : CommSemiring S\ninst✝¹ : Semiring R\ninst✝ : Algebra S R\np✝ : Submodule S R\ni j : ℕ\np q : R\nhp : p ∈ p✝ ^ i\nhq : q ∈ p✝ ^ j\n⊢ p * q ∈ p✝ ^ i * p✝ ^ j\n[PROOFSTEP]\nexact Submodule.mul_mem_mul hp hq\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddMonoid ι\ninst✝³ : CommSemiring S\ninst✝² : Semiring R\ninst✝¹ : Algebra S R\nA : ι → Submodule S R\ninst✝ : SetLike.GradedMonoid A\ni : ι\nx : { x // x ∈ A i }\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (A i)) i)) 0) GradedMonoid.GOne.one = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nσ : Type u_2\nS : Type u_3\nR : Type u_4\ninst✝⁵ : DecidableEq ι\ninst✝⁴ : AddMonoid ι\ninst✝³ : CommSemiring S\ninst✝² : Semiring R\ninst✝¹ : Algebra S R\nA : ι → Submodule S R\ninst✝ : SetLike.GradedMonoid A\ni : ι\nx : { x // x ∈ A i }\ni✝ j✝ : ι\nx✝¹ : { x // x ∈ A i✝ }\nx✝ : { x // x ∈ A j✝ }\n⊢ ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (A i)) i)) (i✝ + j✝))\n      (GradedMonoid.GMul.mul x✝¹ x✝) =\n    ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (A i)) i)) i✝) x✝¹ *\n      ↑((fun i => LinearMap.toAddMonoidHom ((fun i => Submodule.subtype (A i)) i)) j✝) x✝\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.Algebra.DirectSum.Internal", "llama_tokens": 21346, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6261241772283034, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.27413187815409645}}
{"text": "[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ Linear k (Rep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ AddCommGroup (CoeSort.coe V)\n[PROOFSTEP]\nchange AddCommGroup ((forget₂ (Rep k G) (ModuleCat k)).obj V)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ AddCommGroup ↑((forget₂ (Rep k G) (ModuleCat k)).obj V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ Module k (CoeSort.coe V)\n[PROOFSTEP]\nchange Module k ((forget₂ (Rep k G) (ModuleCat k)).obj V)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ Module k ↑((forget₂ (Rep k G) (ModuleCat k)).obj V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G✝ : Type u\ninst✝² : CommRing k\ninst✝¹ : Monoid G✝\nG : Type u\ninst✝ : Group G\nA : Rep k G\ng : G\nx : CoeSort.coe A\n⊢ ↑(↑(ρ A) g⁻¹ * ↑(ρ A) g) x = x\n[PROOFSTEP]\nrw [← map_mul, inv_mul_self, map_one, LinearMap.one_apply]\n[GOAL]\nk G✝ : Type u\ninst✝² : CommRing k\ninst✝¹ : Monoid G✝\nG : Type u\ninst✝ : Group G\nA : Rep k G\ng : G\nx : CoeSort.coe A\n⊢ ↑(↑(ρ A) g * ↑(ρ A) g⁻¹) x = x\n[PROOFSTEP]\nrw [← map_mul, mul_inv_self, map_one, LinearMap.one_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX : Action (Type u) (MonCat.of G)\ng : G\nx : X.V\n⊢ ↑(↑(ρ ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)) g) (Finsupp.single x 1) =\n    Finsupp.single (↑X.ρ g x) 1\n[PROOFSTEP]\nrw [linearization_obj_ρ, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX : Action (Type u) (MonCat.of G)\ng : G\nx : X.V\nr : k\n⊢ ↑(↑(ρ ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)) g) (Finsupp.single x r) =\n    Finsupp.single (↑X.ρ g x) r\n[PROOFSTEP]\nrw [linearization_obj_ρ, Finsupp.lmapDomain_apply, Finsupp.mapDomain_single]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX✝ Y✝ : Action (Type u) (MonCat.of G)\nf : X✝ ⟶ Y✝\nX Y : Action (Type u) (MonCat.of G)\n⊢ (inv (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y)).hom =\n    ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V))\n[PROOFSTEP]\nrw [← Action.forget_map, Functor.map_inv]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX✝ Y✝ : Action (Type u) (MonCat.of G)\nf : X✝ ⟶ Y✝\nX Y : Action (Type u) (MonCat.of G)\n⊢ inv\n      ((Action.forget (ModuleCat k) (MonCat.of G)).map\n        (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y)) =\n    ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V))\n[PROOFSTEP]\napply IsIso.inv_eq_of_hom_inv_id\n[GOAL]\ncase hom_inv_id\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX✝ Y✝ : Action (Type u) (MonCat.of G)\nf : X✝ ⟶ Y✝\nX Y : Action (Type u) (MonCat.of G)\n⊢ (Action.forget (ModuleCat k) (MonCat.of G)).map (LaxMonoidalFunctor.μ (linearization k G).toLaxMonoidalFunctor X Y) ≫\n      ↑(LinearEquiv.symm (finsuppTensorFinsupp' k X.V Y.V)) =\n    𝟙\n      ((Action.forget (ModuleCat k) (MonCat.of G)).obj\n        (MonoidalCategory.tensorObj ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj X)\n          ((linearization k G).toLaxMonoidalFunctor.toFunctor.obj Y)))\n[PROOFSTEP]\nexact LinearMap.ext fun x => LinearEquiv.symm_apply_apply (finsuppTensorFinsupp' k X.V Y.V) x\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : ↑(MonCat.of G)\n⊢ (↑(ofMulAction k G G).ρ g ≫ ↑(Finsupp.lift ((fun x => CoeSort.coe A) x) k G) fun g => ↑(↑(ρ A) g) x) =\n    (↑(Finsupp.lift ((fun x => CoeSort.coe A) x) k G) fun g => ↑(↑(ρ A) g) x) ≫ ↑A.ρ g\n[PROOFSTEP]\nrefine'\n  Finsupp.lhom_ext' fun y =>\n    LinearMap.ext_ring\n      _\n        /- Porting note: rest of broken proof was\n            simpa only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply, Finsupp.lift_apply,\n              Action_ρ_eq_ρ, of_ρ_apply, Representation.ofMulAction_single, Finsupp.sum_single_index,\n              zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul] -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : ↑(MonCat.of G)\ny : G\n⊢ ↑(LinearMap.comp (↑(ofMulAction k G G).ρ g ≫ ↑(Finsupp.lift ((fun x => CoeSort.coe A) x) k G) fun g => ↑(↑(ρ A) g) x)\n          (Finsupp.lsingle y))\n      1 =\n    ↑(LinearMap.comp ((↑(Finsupp.lift ((fun x => CoeSort.coe A) x) k G) fun g => ↑(↑(ρ A) g) x) ≫ ↑A.ρ g)\n          (Finsupp.lsingle y))\n      1\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, ModuleCat.comp_def, Finsupp.lsingle_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : ↑(MonCat.of G)\ny : G\n⊢ ↑(↑(Finsupp.lift (CoeSort.coe A) k G) fun g => ↑(↑(ρ A) g) x) (↑(↑(ofMulAction k G G).ρ g) (Finsupp.single y 1)) =\n    ↑(↑A.ρ g) (↑(↑(Finsupp.lift (CoeSort.coe A) k G) fun g => ↑(↑(ρ A) g) x) (Finsupp.single y 1))\n[PROOFSTEP]\nerw [Finsupp.lift_apply, Finsupp.lift_apply, Representation.ofMulAction_single (G := G)]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : ↑(MonCat.of G)\ny : G\n⊢ (Finsupp.sum (Finsupp.single (g • y) 1) fun x_1 r => r • ↑(↑(ρ A) x_1) x) =\n    ↑(↑A.ρ g) (Finsupp.sum (Finsupp.single y 1) fun x_1 r => r • ↑(↑(ρ A) x_1) x)\n[PROOFSTEP]\nsimp only [Finsupp.sum_single_index, zero_smul, one_smul, smul_eq_mul, A.ρ.map_mul, of_ρ]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : ↑(MonCat.of G)\ny : G\n⊢ ↑(↑(ρ A) g * ↑(ρ A) y) x = ↑(↑A.ρ g) (↑(↑(ρ A) y) x)\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\n⊢ ↑(leftRegularHom A x).hom (Finsupp.single 1 1) = x\n[PROOFSTEP]\nrw [leftRegularHom_hom, Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, A.ρ.map_one, LinearMap.one_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\n⊢ 0 • ↑(↑(ρ A) 1) x = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\n⊢ (fun x => leftRegularHom A x)\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                map_add' :=\n                  (_ :\n                    ∀ (x y : ofMulAction k G G ⟶ A),\n                      (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                        (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) },\n            map_smul' :=\n              (_ :\n                ∀ (r : k) (x : ofMulAction k G G ⟶ A),\n                  AddHom.toFun\n                      { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : ofMulAction k G G ⟶ A),\n                              (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                      (r • x) =\n                    AddHom.toFun\n                      { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : ofMulAction k G G ⟶ A),\n                              (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                      (r • x)) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\nrefine' Action.Hom.ext _ _ (Finsupp.lhom_ext' fun x : G => LinearMap.ext_ring _)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\n⊢ ↑(LinearMap.comp\n          ((fun x => leftRegularHom A x)\n              (AddHom.toFun\n                {\n                    toAddHom :=\n                      { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : ofMulAction k G G ⟶ A),\n                              (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : k) (x : ofMulAction k G G ⟶ A),\n                          AddHom.toFun\n                              { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : ofMulAction k G G ⟶ A),\n                                      (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                        (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                              (r • x) =\n                            AddHom.toFun\n                              { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : ofMulAction k G G ⟶ A),\n                                      (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                        (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                              (r • x)) }.toAddHom\n                f)).hom\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp f.hom (Finsupp.lsingle x)) 1\n[PROOFSTEP]\nhave :\n  f.hom ((ofMulAction k G G).ρ x (Finsupp.single (1 : G) (1 : k))) = A.ρ x (f.hom (Finsupp.single (1 : G) (1 : k))) :=\n  LinearMap.ext_iff.1 (f.comm x)\n    (Finsupp.single 1 1)\n      /- Porting note: rest of broken proof was\n          simp only [LinearMap.comp_apply, Finsupp.lsingle_apply, left_regular_hom_hom,\n            Finsupp.lift_apply, Finsupp.sum_single_index, one_smul, ← this, zero_smul, of_ρ_apply,\n            Representation.ofMulAction_single x (1 : G) (1 : k), smul_eq_mul, mul_one] -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ ↑(LinearMap.comp\n          ((fun x => leftRegularHom A x)\n              (AddHom.toFun\n                {\n                    toAddHom :=\n                      { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : ofMulAction k G G ⟶ A),\n                              (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : k) (x : ofMulAction k G G ⟶ A),\n                          AddHom.toFun\n                              { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : ofMulAction k G G ⟶ A),\n                                      (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                        (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                              (r • x) =\n                            AddHom.toFun\n                              { toFun := fun f => ↑f.hom (Finsupp.single 1 1),\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : ofMulAction k G G ⟶ A),\n                                      (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y) =\n                                        (fun f => ↑f.hom (Finsupp.single 1 1)) (x + y)) }\n                              (r • x)) }.toAddHom\n                f)).hom\n          (Finsupp.lsingle x))\n      1 =\n    ↑(LinearMap.comp f.hom (Finsupp.lsingle x)) 1\n[PROOFSTEP]\nsimp only [LinearMap.comp_apply, Finsupp.lsingle_apply, leftRegularHom_hom]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ ↑(↑(Finsupp.lift (CoeSort.coe A) k G) fun g => ↑(↑(ρ A) g) (↑f.hom (Finsupp.single 1 1))) (Finsupp.single x 1) =\n    ↑f.hom (Finsupp.single x 1)\n[PROOFSTEP]\nerw [Finsupp.lift_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ (Finsupp.sum (Finsupp.single x 1) fun x r => r • ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))) =\n    ↑f.hom (Finsupp.single x 1)\n[PROOFSTEP]\nrw [Finsupp.sum_single_index, ← this, of_ρ_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ 1 • ↑f.hom (↑(↑(Representation.ofMulAction k G G) x) (Finsupp.single 1 1)) = ↑f.hom (Finsupp.single x 1)\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ 0 • ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1)) = 0\n[PROOFSTEP]\nerw [Representation.ofMulAction_single x (1 : G) (1 : k)]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ 1 • ↑f.hom (Finsupp.single (x • 1) 1) = ↑f.hom (Finsupp.single x 1)\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ 0 • ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1)) = 0\n[PROOFSTEP]\nsimp only [one_smul, smul_eq_mul, mul_one]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf✝ : X ⟶ Y\nA : Rep k G\nf : ofMulAction k G G ⟶ A\nx : G\nthis : ↑f.hom (↑(↑(ρ (ofMulAction k G G)) x) (Finsupp.single 1 1)) = ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1))\n⊢ 0 • ↑(↑(ρ A) x) (↑f.hom (Finsupp.single 1 1)) = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : G\n⊢ ↑(↑(LinearEquiv.symm (leftRegularHomEquiv A)) x).hom (Finsupp.single g 1) = ↑(↑(ρ A) g) x\n[PROOFSTEP]\nrw [leftRegularHomEquiv_symm_apply, leftRegularHom_hom, Finsupp.lift_apply, Finsupp.sum_single_index, one_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX Y : Action (Type u) (MonCat.of G)\nf : X ⟶ Y\nA : Rep k G\nx : CoeSort.coe A\ng : G\n⊢ 0 • ↑(↑(ρ A) g) x = 0\n[PROOFSTEP]\nrw [zero_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A X Y : Rep k G\nf : X ⟶ Y\ng : ↑(MonCat.of G)\nx : ↑((fun B => of (Representation.linHom (ρ A) (ρ B))) X).V\ny : CoeSort.coe A\n⊢ ↑(↑(↑((fun B => of (Representation.linHom (ρ A) (ρ B))) X).ρ g ≫\n              ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom))\n          x)\n      y =\n    ↑(↑(ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom) ≫\n              ↑((fun B => of (Representation.linHom (ρ A) (ρ B))) Y).ρ g)\n          x)\n      y\n[PROOFSTEP]\nshow f.hom (X.ρ g _) = _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A X Y : Rep k G\nf : X ⟶ Y\ng : ↑(MonCat.of G)\nx : ↑((fun B => of (Representation.linHom (ρ A) (ρ B))) X).V\ny : CoeSort.coe A\n⊢ ↑f.hom (↑(↑(ρ X) g) (↑(LinearMap.comp x (↑(ρ A) g⁻¹)) y)) =\n    ↑(↑(ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom) ≫\n              ↑((fun B => of (Representation.linHom (ρ A) (ρ B))) Y).ρ g)\n          x)\n      y\n[PROOFSTEP]\nsimp only [hom_comm_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A X Y : Rep k G\nf : X ⟶ Y\ng : ↑(MonCat.of G)\nx : ↑((fun B => of (Representation.linHom (ρ A) (ρ B))) X).V\ny : CoeSort.coe A\n⊢ ↑(↑(ρ Y) g) (↑f.hom (↑(LinearMap.comp x (↑(ρ A) g⁻¹)) y)) =\n    ↑(↑(ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom) ≫\n              ↑(of (Representation.linHom (ρ A) (ρ Y))).ρ g)\n          x)\n      y\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A x✝ : Rep k G\n⊢ { obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n          map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n      (𝟙 x✝) =\n    𝟙\n      ({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n            map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.obj\n        x✝)\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A x✝¹ : Rep k G\nx✝ :\n  ↑({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n            map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.obj\n        x✝¹).V\n⊢ ↑({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n                map := fun {X Y} f =>\n                  Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n            (𝟙 x✝¹)).hom\n      x✝ =\n    ↑(𝟙\n            ({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n                  map := fun {X Y} f =>\n                    Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.obj\n              x✝¹)).hom\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A X✝ Y✝ Z✝ : Rep k G\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Y✝ ⟶ Z✝\n⊢ { obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n          map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n      (x✝¹ ≫ x✝) =\n    { obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n            map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n        x✝¹ ≫\n      { obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n            map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B C A X✝ Y✝ Z✝ : Rep k G\nx✝² : X✝ ⟶ Y✝\nx✝¹ : Y✝ ⟶ Z✝\nx✝ :\n  ↑({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n            map := fun {X Y} f => Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.obj\n        X✝).V\n⊢ ↑({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n                map := fun {X Y} f =>\n                  Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n            (x✝² ≫ x✝¹)).hom\n      x✝ =\n    ↑({ obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n                  map := fun {X Y} f =>\n                    Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n              x✝² ≫\n            { obj := fun B => of (Representation.linHom (ρ A) (ρ B)),\n                  map := fun {X Y} f =>\n                    Hom.mk (ModuleCat.ofHom (↑(LinearMap.llcomp k (CoeSort.coe A) ↑X.V ↑Y.V) f.hom)) }.map\n              x✝¹).hom\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\n⊢ ↑B.ρ g ≫ LinearMap.flip (TensorProduct.curry f.hom) =\n    LinearMap.flip (TensorProduct.curry f.hom) ≫ ↑((Rep.ihom A).obj C).ρ g\n[PROOFSTEP]\nrefine' LinearMap.ext fun x => LinearMap.ext fun y => _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\nx : ↑B.V\ny : CoeSort.coe A\n⊢ ↑(↑(↑B.ρ g ≫ LinearMap.flip (TensorProduct.curry f.hom)) x) y =\n    ↑(↑(LinearMap.flip (TensorProduct.curry f.hom) ≫ ↑((Rep.ihom A).obj C).ρ g) x) y\n[PROOFSTEP]\nchange f.hom (_ ⊗ₜ[k] _) = C.ρ g (f.hom (_ ⊗ₜ[k] _))\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\nx : ↑B.V\ny : CoeSort.coe A\n⊢ ↑f.hom (y ⊗ₜ[k] ↑(↑B.ρ g) x) = ↑(↑(ρ C) g) (↑f.hom (↑(↑(ρ A) g⁻¹) y ⊗ₜ[k] x))\n[PROOFSTEP]\nrw [← hom_comm_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\nx : ↑B.V\ny : CoeSort.coe A\n⊢ ↑f.hom (y ⊗ₜ[k] ↑(↑B.ρ g) x) = ↑f.hom (↑(↑(ρ (A ⊗ B)) g) (↑(↑(ρ A) g⁻¹) y ⊗ₜ[k] x))\n[PROOFSTEP]\nchange _ = f.hom ((A.ρ g * A.ρ g⁻¹) y ⊗ₜ[k] _)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\nx : ↑B.V\ny : CoeSort.coe A\n⊢ ↑f.hom (y ⊗ₜ[k] ↑(↑B.ρ g) x) =\n    ↑f.hom\n      (↑(↑(ρ A) g * ↑(ρ A) g⁻¹) y ⊗ₜ[k]\n        ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj B).map\n              g)\n          (↑(↑(ρ A) g⁻¹) y, x).snd)\n[PROOFSTEP]\nsimp only [← map_mul, mul_inv_self, map_one]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : A ⊗ B ⟶ C\ng : ↑(MonCat.of G)\nx : ↑B.V\ny : CoeSort.coe A\n⊢ ↑f.hom (y ⊗ₜ[k] ↑(↑B.ρ g) x) =\n    ↑f.hom\n      (↑1 y ⊗ₜ[k]\n        ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj B).map\n              g)\n          x)\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : B ⟶ (Rep.ihom A).obj C\ng : ↑(MonCat.of G)\nx :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj A).obj\n      PUnit.unit)\ny :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj B).obj\n      PUnit.unit)\n⊢ ↑(↑(A ⊗ B).ρ g ≫ ↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom))\n      (x ⊗ₜ[k] y) =\n    ↑(↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom) ≫ ↑C.ρ g) (x ⊗ₜ[k] y)\n[PROOFSTEP]\nchange\n  TensorProduct.uncurry k _ _ _ f.hom.flip (A.ρ g x ⊗ₜ[k] B.ρ g y) =\n    C.ρ g (TensorProduct.uncurry k _ _ _ f.hom.flip (x ⊗ₜ[k] y))\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : B ⟶ (Rep.ihom A).obj C\ng : ↑(MonCat.of G)\nx :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj A).obj\n      PUnit.unit)\ny :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj B).obj\n      PUnit.unit)\n⊢ ↑(↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom))\n      (↑(↑(ρ A) g) x ⊗ₜ[k] ↑(↑(ρ B) g) y) =\n    ↑(↑(ρ C) g)\n      (↑(↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom)) (x ⊗ₜ[k] y))\n[PROOFSTEP]\nrw [TensorProduct.uncurry_apply, LinearMap.flip_apply, hom_comm_apply, Rep.ihom_obj_ρ_apply, LinearMap.comp_apply,\n  LinearMap.comp_apply, ρ_inv_self_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : B ⟶ (Rep.ihom A).obj C\ng : ↑(MonCat.of G)\nx :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj A).obj\n      PUnit.unit)\ny :\n  ↑(((CategoryTheory.Equivalence.symm (functorCategoryEquivalence (ModuleCat k) (MonCat.of G))).inverse.obj B).obj\n      PUnit.unit)\n⊢ ↑(↑(ρ C) g) (↑(↑f.hom y) x) =\n    ↑(↑(ρ C) g)\n      (↑(↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom)) (x ⊗ₜ[k] y))\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : B ⟶ (Rep.ihom A).obj C\n⊢ (fun f => Hom.mk (LinearMap.flip (TensorProduct.curry f.hom)))\n      ((fun f => Hom.mk (↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom))) f) =\n    f\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C✝ A B C : Rep k G\nf : B ⟶ (Rep.ihom A).obj C\nx✝ : ↑B.V\n⊢ ↑((fun f => Hom.mk (LinearMap.flip (TensorProduct.curry f.hom)))\n            ((fun f =>\n                Hom.mk (↑(TensorProduct.uncurry k (CoeSort.coe A) (↑B.V) (CoeSort.coe C)) (LinearMap.flip f.hom)))\n              f)).hom\n      x✝ =\n    ↑f.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C A B : Rep k G\n⊢ (NatTrans.app (ihom.ev A) B).hom =\n    ↑(TensorProduct.uncurry k (CoeSort.coe A) (CoeSort.coe A →ₗ[k] CoeSort.coe B) (CoeSort.coe B))\n      (LinearMap.flip LinearMap.id)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Group G\nA✝ B✝ C A B : Rep k G\nx✝ : ↑((ihom A ⋙ tensorLeft A).obj B).V\n⊢ ↑(NatTrans.app (ihom.ev A) B).hom x✝ =\n    ↑(↑(TensorProduct.uncurry k (CoeSort.coe A) (CoeSort.coe A →ₗ[k] CoeSort.coe B) (CoeSort.coe B))\n          (LinearMap.flip LinearMap.id))\n      x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ SymmetricCategory (Rep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ MonoidalPreadditive (Rep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ MonoidalLinear k (Rep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\n⊢ ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) r) x) = ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) r) (↑f x)\n[PROOFSTEP]\napply MonoidAlgebra.induction_on r\n[GOAL]\ncase hM\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\n⊢ ∀ (g : G),\n    ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (↑(MonoidAlgebra.of k G) g)) x) =\n      ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (↑(MonoidAlgebra.of k G) g)) (↑f x)\n[PROOFSTEP]\nintro g\n[GOAL]\ncase hM\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\ng : G\n⊢ ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (↑(MonoidAlgebra.of k G) g)) x) =\n    ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (↑(MonoidAlgebra.of k G) g)) (↑f x)\n[PROOFSTEP]\nsimp only [one_smul, MonoidAlgebra.lift_single, MonoidAlgebra.of_apply]\n[GOAL]\ncase hM\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\ng : G\n⊢ ↑f (↑(↑ρ g) x) = ↑(↑σ g) (↑f x)\n[PROOFSTEP]\nexact LinearMap.congr_fun (w g) x\n[GOAL]\ncase hadd\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\n⊢ ∀ (f_1 g : MonoidAlgebra k G),\n    ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) f_1) x) =\n        ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) f_1) (↑f x) →\n      ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) g) x) = ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) g) (↑f x) →\n        ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (f_1 + g)) x) =\n          ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (f_1 + g)) (↑f x)\n[PROOFSTEP]\nintro g h gw hw\n[GOAL]\ncase hadd\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\ng h : MonoidAlgebra k G\ngw : ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) g) x) = ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) g) (↑f x)\nhw : ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) h) x) = ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) h) (↑f x)\n⊢ ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (g + h)) x) =\n    ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (g + h)) (↑f x)\n[PROOFSTEP]\nsimp only [map_add, add_left_inj, LinearMap.add_apply, hw, gw]\n[GOAL]\ncase hsmul\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr : MonoidAlgebra k G\nx : V\n⊢ ∀ (r : k) (f_1 : MonoidAlgebra k G),\n    ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) f_1) x) =\n        ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) f_1) (↑f x) →\n      ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (r • f_1)) x) =\n        ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (r • f_1)) (↑f x)\n[PROOFSTEP]\nintro r g w\n[GOAL]\ncase hsmul\nk✝ G✝ : Type u\ninst✝⁷ : CommRing k✝\ninst✝⁶ : Monoid G✝\nk : Type u_1\nG : Type u_2\ninst✝⁵ : CommRing k\ninst✝⁴ : Monoid G\nV : Type u_3\nW : Type u_4\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup W\ninst✝¹ : Module k V\ninst✝ : Module k W\nρ : G →* V →ₗ[k] V\nσ : G →* W →ₗ[k] W\nf : V →ₗ[k] W\nw✝ : ∀ (g : G), LinearMap.comp f (↑ρ g) = LinearMap.comp (↑σ g) f\nr✝ : MonoidAlgebra k G\nx : V\nr : k\ng : MonoidAlgebra k G\nw : ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) g) x) = ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) g) (↑f x)\n⊢ ↑f (↑(↑(↑(MonoidAlgebra.lift k G (V →ₗ[k] V)) ρ) (r • g)) x) =\n    ↑(↑(↑(MonoidAlgebra.lift k G (W →ₗ[k] W)) σ) (r • g)) (↑f x)\n[PROOFSTEP]\nsimp only [AlgHom.map_smul, w, RingHom.id_apply, LinearMap.smul_apply, LinearMap.map_smulₛₗ]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX✝ Y✝ : ModuleCat (MonoidAlgebra k G)\nf : X✝ ⟶ Y✝\ng : ↑(MonCat.of G)\n⊢ ↑((fun M => of (Representation.ofModule ↑M)) X✝).ρ g ≫\n      { toAddHom := f.toAddHom,\n        map_smul' :=\n          (_ :\n            ∀ (r : k) (x : ↑((fun M => of (Representation.ofModule ↑M)) X✝).V),\n              ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • x) = ↑(algebraMap k (MonoidAlgebra k G)) r • ↑f x) } =\n    { toAddHom := f.toAddHom,\n        map_smul' :=\n          (_ :\n            ∀ (r : k) (x : ↑((fun M => of (Representation.ofModule ↑M)) X✝).V),\n              ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • x) = ↑(algebraMap k (MonoidAlgebra k G)) r • ↑f x) } ≫\n      ↑((fun M => of (Representation.ofModule ↑M)) Y✝).ρ g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nX✝ Y✝ : ModuleCat (MonoidAlgebra k G)\nf : X✝ ⟶ Y✝\ng : ↑(MonCat.of G)\nx✝ : ↑((fun M => of (Representation.ofModule ↑M)) X✝).V\n⊢ ↑(↑((fun M => of (Representation.ofModule ↑M)) X✝).ρ g ≫\n          { toAddHom := f.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : k) (x : ↑((fun M => of (Representation.ofModule ↑M)) X✝).V),\n                  ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • x) = ↑(algebraMap k (MonoidAlgebra k G)) r • ↑f x) })\n      x✝ =\n    ↑({ toAddHom := f.toAddHom,\n            map_smul' :=\n              (_ :\n                ∀ (r : k) (x : ↑((fun M => of (Representation.ofModule ↑M)) X✝).V),\n                  ↑f (↑(algebraMap k (MonoidAlgebra k G)) r • x) = ↑(algebraMap k (MonoidAlgebra k G)) r • ↑f x) } ≫\n          ↑((fun M => of (Representation.ofModule ↑M)) Y✝).ρ g)\n      x✝\n[PROOFSTEP]\napply f.map_smul\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\n⊢ ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M) ≃+ ↑M\n[PROOFSTEP]\ndsimp [ofModuleMonoidAlgebra, toModuleMonoidAlgebra]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\n⊢ ↑(ModuleCat.of (MonoidAlgebra k G) (Representation.asModule (Representation.ofModule ↑M))) ≃+ ↑M\n[PROOFSTEP]\nrefine' (Representation.ofModule M).asModuleEquiv.trans (RestrictScalars.addEquiv k (MonoidAlgebra k G) _)\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ CoeSort.coe V ≃+ CoeSort.coe ((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V)\n[PROOFSTEP]\ndsimp [ofModuleMonoidAlgebra, toModuleMonoidAlgebra]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ CoeSort.coe V ≃+\n    RestrictScalars k (MonoidAlgebra k G) ↑(ModuleCat.of (MonoidAlgebra k G) (Representation.asModule (ρ V)))\n[PROOFSTEP]\nrefine' V.ρ.asModuleEquiv.symm.trans _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\n⊢ Representation.asModule (ρ V) ≃+\n    RestrictScalars k (MonoidAlgebra k G) ↑(ModuleCat.of (MonoidAlgebra k G) (Representation.asModule (ρ V)))\n[PROOFSTEP]\nexact (RestrictScalars.addEquiv _ _ _).symm\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\nsrc✝ : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M) ≃+ ↑M := counitIsoAddEquiv\nr : MonoidAlgebra k G\nx : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r • x) =\n    ↑(RingHom.id (MonoidAlgebra k G)) r •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        x\n[PROOFSTEP]\ndsimp [counitIsoAddEquiv]\n  /- Porting note: rest of broken proof was `simp`. -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\nsrc✝ : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M) ≃+ ↑M := counitIsoAddEquiv\nr : MonoidAlgebra k G\nx : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)\n⊢ ↑↑(AddEquiv.trans (Representation.asModuleEquiv (Representation.ofModule ↑M))\n            (RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M))\n      (r • x) =\n    r •\n      ↑↑(AddEquiv.trans (Representation.asModuleEquiv (Representation.ofModule ↑M))\n              (RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M))\n        x\n[PROOFSTEP]\nrw [AddEquiv.coe_toEquiv, AddEquiv.trans_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\nsrc✝ : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M) ≃+ ↑M := counitIsoAddEquiv\nr : MonoidAlgebra k G\nx : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)\n⊢ ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M)\n      (↑(Representation.asModuleEquiv (Representation.ofModule ↑M)) (r • x)) =\n    r •\n      ↑(AddEquiv.trans (Representation.asModuleEquiv (Representation.ofModule ↑M))\n            (RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M))\n        x\n[PROOFSTEP]\nerw [Representation.ofModule_asAlgebraHom_apply_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nM : ModuleCat (MonoidAlgebra k G)\nsrc✝ : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M) ≃+ ↑M := counitIsoAddEquiv\nr : MonoidAlgebra k G\nx : ↑((ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).obj M)\n⊢ ↑(AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) ((fun x => ↑M) x)))\n      (r • ↑(RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M) x) =\n    r •\n      ↑(AddEquiv.trans (Representation.asModuleEquiv (Representation.ofModule ↑M))\n            (RestrictScalars.addEquiv k (MonoidAlgebra k G) ↑M))\n        x\n[PROOFSTEP]\nexact AddEquiv.symm_apply_apply _ _\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\ng : G\nx : CoeSort.coe V\n⊢ ↑unitIsoAddEquiv (AddHom.toFun (↑(ρ V) g).toAddHom x) =\n    AddHom.toFun (↑(ρ (ofModuleMonoidAlgebra.obj (toModuleMonoidAlgebra.obj V))) g).toAddHom (↑unitIsoAddEquiv x)\n[PROOFSTEP]\ndsimp [unitIsoAddEquiv, ofModuleMonoidAlgebra, toModuleMonoidAlgebra]\n  /- Porting note: rest of broken proof was\n    simp only [AddEquiv.apply_eq_iff_eq, AddEquiv.apply_symm_apply,\n      Representation.asModuleEquiv_symm_map_rho, Representation.ofModule_asModule_act] -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\ng : G\nx : CoeSort.coe V\n⊢ ↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n          (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n      (↑(↑(ρ V) g) x) =\n    AddHom.toFun\n      (↑(Representation.ofModule ↑(ModuleCat.of (MonoidAlgebra k G) (Representation.asModule (ρ V)))) g).toAddHom\n      (↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n            (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n        x)\n[PROOFSTEP]\nerw [Representation.asModuleEquiv_symm_map_rho]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\ng : G\nx : CoeSort.coe V\n⊢ ↑(MonoidAlgebra.of k G) g • ↑(AddEquiv.symm (Representation.asModuleEquiv (ρ V))) x =\n    AddHom.toFun\n      (↑(Representation.ofModule ↑(ModuleCat.of (MonoidAlgebra k G) (Representation.asModule (ρ V)))) g).toAddHom\n      (↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n            (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n        x)\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\nsrc✝ : CoeSort.coe V ≃+ CoeSort.coe ((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V) := unitIsoAddEquiv\nr : k\nx : ↑V.V\n⊢ AddHom.toFun\n      { toFun := src✝.toFun,\n        map_add' :=\n          (_ :\n            ∀ (x y : CoeSort.coe V),\n              Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n      (r • x) =\n    ↑(RingHom.id k) r •\n      AddHom.toFun\n        { toFun := src✝.toFun,\n          map_add' :=\n            (_ :\n              ∀ (x y : CoeSort.coe V),\n                Equiv.toFun src✝.toEquiv (x + y) = Equiv.toFun src✝.toEquiv x + Equiv.toFun src✝.toEquiv y) }\n        x\n[PROOFSTEP]\ndsimp [unitIsoAddEquiv]\n  /- Porting note: rest of broken proof was\n            simp only [Representation.asModuleEquiv_symm_map_smul,\n              RestrictScalars.addEquiv_symm_map_algebraMap_smul] -/\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\nsrc✝ : CoeSort.coe V ≃+ CoeSort.coe ((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V) := unitIsoAddEquiv\nr : k\nx : ↑V.V\n⊢ ↑↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n            (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n      (r • x) =\n    r •\n      ↑↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n              (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n        x\n[PROOFSTEP]\nrw [AddEquiv.coe_toEquiv, AddEquiv.trans_apply, Representation.asModuleEquiv_symm_map_smul,\n  RestrictScalars.addEquiv_symm_map_algebraMap_smul]\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\nsrc✝ : CoeSort.coe V ≃+ CoeSort.coe ((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V) := unitIsoAddEquiv\nr : k\nx : ↑V.V\n⊢ r •\n      ↑(AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V))))\n        (↑(AddEquiv.symm (Representation.asModuleEquiv (ρ V))) x) =\n    r •\n      ↑(AddEquiv.trans (AddEquiv.symm (Representation.asModuleEquiv (ρ V)))\n            (AddEquiv.symm (RestrictScalars.addEquiv k (MonoidAlgebra k G) (Representation.asModule (ρ V)))))\n        x\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\ng : ↑(MonCat.of G)\n⊢ ↑V.ρ g ≫\n      (LinearEquiv.toModuleIso'\n          (let src := unitIsoAddEquiv;\n          {\n            toLinearMap :=\n              {\n                toAddHom :=\n                  { toFun := src.toFun,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : CoeSort.coe V),\n                          Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : k) (x : ↑V.V),\n                      AddHom.toFun\n                          { toFun := src.toFun,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : CoeSort.coe V),\n                                  Equiv.toFun src.toEquiv (x + y) =\n                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                          (r • x) =\n                        ↑(RingHom.id k) r •\n                          AddHom.toFun\n                            { toFun := src.toFun,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : CoeSort.coe V),\n                                    Equiv.toFun src.toEquiv (x + y) =\n                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                            x) },\n            invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n            right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom =\n    (LinearEquiv.toModuleIso'\n          (let src := unitIsoAddEquiv;\n          {\n            toLinearMap :=\n              {\n                toAddHom :=\n                  { toFun := src.toFun,\n                    map_add' :=\n                      (_ :\n                        ∀ (x y : CoeSort.coe V),\n                          Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },\n                map_smul' :=\n                  (_ :\n                    ∀ (r : k) (x : ↑V.V),\n                      AddHom.toFun\n                          { toFun := src.toFun,\n                            map_add' :=\n                              (_ :\n                                ∀ (x y : CoeSort.coe V),\n                                  Equiv.toFun src.toEquiv (x + y) =\n                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                          (r • x) =\n                        ↑(RingHom.id k) r •\n                          AddHom.toFun\n                            { toFun := src.toFun,\n                              map_add' :=\n                                (_ :\n                                  ∀ (x y : CoeSort.coe V),\n                                    Equiv.toFun src.toEquiv (x + y) =\n                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                            x) },\n            invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n            right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom ≫\n      ↑((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V).ρ g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\nV : Rep k G\ng : ↑(MonCat.of G)\nx✝ : ↑V.V\n⊢ ↑(↑V.ρ g ≫\n          (LinearEquiv.toModuleIso'\n              (let src := unitIsoAddEquiv;\n              {\n                toLinearMap :=\n                  {\n                    toAddHom :=\n                      { toFun := src.toFun,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : CoeSort.coe V),\n                              Equiv.toFun src.toEquiv (x + y) =\n                                Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : k) (x : ↑V.V),\n                          AddHom.toFun\n                              { toFun := src.toFun,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : CoeSort.coe V),\n                                      Equiv.toFun src.toEquiv (x + y) =\n                                        Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                              (r • x) =\n                            ↑(RingHom.id k) r •\n                              AddHom.toFun\n                                { toFun := src.toFun,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : CoeSort.coe V),\n                                        Equiv.toFun src.toEquiv (x + y) =\n                                          Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                                x) },\n                invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n                right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom)\n      x✝ =\n    ↑((LinearEquiv.toModuleIso'\n              (let src := unitIsoAddEquiv;\n              {\n                toLinearMap :=\n                  {\n                    toAddHom :=\n                      { toFun := src.toFun,\n                        map_add' :=\n                          (_ :\n                            ∀ (x y : CoeSort.coe V),\n                              Equiv.toFun src.toEquiv (x + y) =\n                                Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },\n                    map_smul' :=\n                      (_ :\n                        ∀ (r : k) (x : ↑V.V),\n                          AddHom.toFun\n                              { toFun := src.toFun,\n                                map_add' :=\n                                  (_ :\n                                    ∀ (x y : CoeSort.coe V),\n                                      Equiv.toFun src.toEquiv (x + y) =\n                                        Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                              (r • x) =\n                            ↑(RingHom.id k) r •\n                              AddHom.toFun\n                                { toFun := src.toFun,\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (x y : CoeSort.coe V),\n                                        Equiv.toFun src.toEquiv (x + y) =\n                                          Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }\n                                x) },\n                invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),\n                right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom ≫\n          ↑((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V).ρ g)\n      x✝\n[PROOFSTEP]\napply unit_iso_comm\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ ∀ {X Y : Rep k G} (f : X ⟶ Y),\n    (𝟭 (Rep k G)).map f ≫ ((fun V => unitIso V) Y).hom =\n      ((fun V => unitIso V) X).hom ≫ (toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nk G : Type u\ninst✝¹ : CommRing k\ninst✝ : Monoid G\n⊢ ∀ {X Y : ModuleCat (MonoidAlgebra k G)} (f : X ⟶ Y),\n    (ofModuleMonoidAlgebra ⋙ toModuleMonoidAlgebra).map f ≫ ((fun M => counitIso M) Y).hom =\n      ((fun M => counitIso M) X).hom ≫ (𝟭 (ModuleCat (MonoidAlgebra k G))).map f\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.RepresentationTheory.Rep", "llama_tokens": 21932, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5736784220301065, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.2734034621938684}}
{"text": "[GOAL]\n⊢ ConcreteCategory SemiNormedGroupCat\n[PROOFSTEP]\ndsimp [SemiNormedGroupCat]\n[GOAL]\n⊢ ConcreteCategory (Bundled SeminormedAddCommGroup)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nV W : SemiNormedGroupCat\nf g : V ⟶ W\nh : (forget SemiNormedGroupCat).map f = (forget SemiNormedGroupCat).map g\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nV W : SemiNormedGroupCat\ng : V ⟶ W\ntoFun✝ : ↑V → ↑W\nmap_add'✝ : ∀ (v₁ v₂ : ↑V), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : ↑V), ‖toFun✝ v‖ ≤ C * ‖v‖\nh :\n  (forget SemiNormedGroupCat).map { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } =\n    (forget SemiNormedGroupCat).map g\n⊢ { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nV W : SemiNormedGroupCat\ntoFun✝¹ : ↑V → ↑W\nmap_add'✝¹ : ∀ (v₁ v₂ : ↑V), toFun✝¹ (v₁ + v₂) = toFun✝¹ v₁ + toFun✝¹ v₂\nbound'✝¹ : ∃ C, ∀ (v : ↑V), ‖toFun✝¹ v‖ ≤ C * ‖v‖\ntoFun✝ : ↑V → ↑W\nmap_add'✝ : ∀ (v₁ v₂ : ↑V), toFun✝ (v₁ + v₂) = toFun✝ v₁ + toFun✝ v₂\nbound'✝ : ∃ C, ∀ (v : ↑V), ‖toFun✝ v‖ ≤ C * ‖v‖\nh :\n  (forget SemiNormedGroupCat).map { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n    (forget SemiNormedGroupCat).map { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }\n⊢ { toFun := toFun✝¹, map_add' := map_add'✝¹, bound' := bound'✝¹ } =\n    { toFun := toFun✝, map_add' := map_add'✝, bound' := bound'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\n⊢ Limits.IsZero V\n[PROOFSTEP]\nrefine' ⟨fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩⟩\n[GOAL]\ncase refine'_1\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat\nf : V ⟶ X\n⊢ f = default\n[PROOFSTEP]\next x\n[GOAL]\ncase refine'_1.h\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat\nf : V ⟶ X\nx : ↑V\n⊢ ↑f x = ↑default x\n[PROOFSTEP]\nhave : x = 0 := Subsingleton.elim _ _\n[GOAL]\ncase refine'_1.h\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat\nf : V ⟶ X\nx : ↑V\nthis : x = 0\n⊢ ↑f x = ↑default x\n[PROOFSTEP]\nsimp only [this, map_zero]\n[GOAL]\ncase refine'_2\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat\nf : X ⟶ V\n⊢ f = default\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.h\nV : SemiNormedGroupCat\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat\nf : X ⟶ V\nx✝ : ↑X\n⊢ ↑f x✝ = ↑default x✝\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nV W : SemiNormedGroupCat\ni : V ≅ W\nh1 : NormedAddGroupHom.NormNoninc i.hom\nh2 : NormedAddGroupHom.NormNoninc i.inv\n⊢ Isometry ↑i.hom\n[PROOFSTEP]\napply AddMonoidHomClass.isometry_of_norm\n[GOAL]\ncase a\nV W : SemiNormedGroupCat\ni : V ≅ W\nh1 : NormedAddGroupHom.NormNoninc i.hom\nh2 : NormedAddGroupHom.NormNoninc i.inv\n⊢ ∀ (x : ↑V), ‖↑i.hom x‖ = ‖x‖\n[PROOFSTEP]\nintro v\n[GOAL]\ncase a\nV W : SemiNormedGroupCat\ni : V ≅ W\nh1 : NormedAddGroupHom.NormNoninc i.hom\nh2 : NormedAddGroupHom.NormNoninc i.inv\nv : ↑V\n⊢ ‖↑i.hom v‖ = ‖v‖\n[PROOFSTEP]\napply le_antisymm (h1 v)\n[GOAL]\ncase a\nV W : SemiNormedGroupCat\ni : V ≅ W\nh1 : NormedAddGroupHom.NormNoninc i.hom\nh2 : NormedAddGroupHom.NormNoninc i.inv\nv : ↑V\n⊢ ‖v‖ ≤ ‖↑i.hom v‖\n[PROOFSTEP]\ncalc\n  ‖v‖ = ‖i.inv (i.hom v)‖ := by rw [Iso.hom_inv_id_apply]\n  _ ≤ ‖i.hom v‖ := h2 _\n[GOAL]\nV W : SemiNormedGroupCat\ni : V ≅ W\nh1 : NormedAddGroupHom.NormNoninc i.hom\nh2 : NormedAddGroupHom.NormNoninc i.inv\nv : ↑V\n⊢ ‖v‖ = ‖↑i.inv (↑i.hom v)‖\n[PROOFSTEP]\nrw [Iso.hom_inv_id_apply]\n[GOAL]\nM N : SemiNormedGroupCat\nf : M ≅ N\ni : NormedAddGroupHom.NormNoninc f.hom\ni' : NormedAddGroupHom.NormNoninc f.inv\n⊢ mkHom f.hom i ≫ mkHom f.inv i' = 𝟙 (of ↑M)\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nM N : SemiNormedGroupCat\nf : M ≅ N\ni : NormedAddGroupHom.NormNoninc f.hom\ni' : NormedAddGroupHom.NormNoninc f.inv\n⊢ ↑(mkHom f.hom i ≫ mkHom f.inv i') = ↑(𝟙 (of ↑M))\n[PROOFSTEP]\nexact f.hom_inv_id\n[GOAL]\nM N : SemiNormedGroupCat\nf : M ≅ N\ni : NormedAddGroupHom.NormNoninc f.hom\ni' : NormedAddGroupHom.NormNoninc f.inv\n⊢ mkHom f.inv i' ≫ mkHom f.hom i = 𝟙 (of ↑N)\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nM N : SemiNormedGroupCat\nf : M ≅ N\ni : NormedAddGroupHom.NormNoninc f.hom\ni' : NormedAddGroupHom.NormNoninc f.inv\n⊢ ↑(mkHom f.inv i' ≫ mkHom f.hom i) = ↑(𝟙 (of ↑N))\n[PROOFSTEP]\nexact f.inv_hom_id\n[GOAL]\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\n⊢ Limits.IsZero V\n[PROOFSTEP]\nrefine' ⟨fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => _⟩⟩⟩\n[GOAL]\ncase refine'_1\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat₁\nf : V ⟶ X\n⊢ f = default\n[PROOFSTEP]\next x\n[GOAL]\ncase refine'_1.w.h\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat₁\nf : V ⟶ X\nx : ↑V\n⊢ ↑f x = ↑default x\n[PROOFSTEP]\nhave : x = 0 := Subsingleton.elim _ _\n[GOAL]\ncase refine'_1.w.h\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat₁\nf : V ⟶ X\nx : ↑V\nthis : x = 0\n⊢ ↑f x = ↑default x\n[PROOFSTEP]\nsimp only [this, map_zero]\n[GOAL]\ncase refine'_2\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat₁\nf : X ⟶ V\n⊢ f = default\n[PROOFSTEP]\next\n[GOAL]\ncase refine'_2.w.h\nV : SemiNormedGroupCat₁\ninst✝ : Subsingleton ↑V\nX : SemiNormedGroupCat₁\nf : X ⟶ V\nx✝ : ↑X\n⊢ ↑f x✝ = ↑default x✝\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\n⊢ Isometry ↑i.hom\n[PROOFSTEP]\nchange Isometry (⟨⟨i.hom, map_zero _⟩, fun _ _ => map_add _ _ _⟩ : V →+ W)\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\n⊢ Isometry\n    ↑{ toZeroHom := { toFun := ↑i.hom, map_zero' := (_ : ↑i.hom 0 = 0) },\n        map_add' := (_ : ∀ (x x_1 : ↑V), ↑i.hom (x + x_1) = ↑i.hom x + ↑i.hom x_1) }\n[PROOFSTEP]\nrefine' AddMonoidHomClass.isometry_of_norm _ _\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\n⊢ ∀ (x : ↑V),\n    ‖↑{ toZeroHom := { toFun := ↑i.hom, map_zero' := (_ : ↑i.hom 0 = 0) },\n              map_add' := (_ : ∀ (x x_1 : ↑V), ↑i.hom (x + x_1) = ↑i.hom x + ↑i.hom x_1) }\n          x‖ =\n      ‖x‖\n[PROOFSTEP]\nintro v\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\nv : ↑V\n⊢ ‖↑{ toZeroHom := { toFun := ↑i.hom, map_zero' := (_ : ↑i.hom 0 = 0) },\n            map_add' := (_ : ∀ (x x_1 : ↑V), ↑i.hom (x + x_1) = ↑i.hom x + ↑i.hom x_1) }\n        v‖ =\n    ‖v‖\n[PROOFSTEP]\napply le_antisymm (i.hom.2 v)\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\nv : ↑V\n⊢ ‖v‖ ≤ ‖↑↑i.hom v‖\n[PROOFSTEP]\ncalc\n  ‖v‖ = ‖i.inv (i.hom v)‖ := by rw [Iso.hom_inv_id_apply]\n  _ ≤ ‖i.hom v‖ := i.inv.2 _\n[GOAL]\nV W : SemiNormedGroupCat₁\ni : V ≅ W\nv : ↑V\n⊢ ‖v‖ = ‖↑i.inv (↑i.hom v)‖\n[PROOFSTEP]\nrw [Iso.hom_inv_id_apply]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Normed.Group.SemiNormedGroupCat", "llama_tokens": 3450, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5467381519846138, "lm_q2_score": 0.5, "lm_q1q2_score": 0.2733690759923069}}
{"text": "[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ Function.Injective fun A => ↑A.toSubring\n[PROOFSTEP]\nintro ⟨_, _⟩ ⟨_, _⟩ h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\ntoSubring✝¹ : Subring K\nmem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier\ntoSubring✝ : Subring K\nmem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier\nh :\n  (fun A => ↑A.toSubring) { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =\n    (fun A => ↑A.toSubring) { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }\n⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =\n    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }\n[PROOFSTEP]\nreplace h := SetLike.coe_injective' h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\ntoSubring✝¹ : Subring K\nmem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier\ntoSubring✝ : Subring K\nmem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier\nh :\n  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =\n    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring\n⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =\n    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nK : Type u\ninst✝ : Field K\nA x y : ValuationSubring K\nh : x.toSubring = y.toSubring\n⊢ x = y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nK : Type u\ninst✝ : Field K\nA y : ValuationSubring K\ntoSubring✝ : Subring K\nmem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier\nh : { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring = y.toSubring\n⊢ { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ } = y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\ntoSubring✝¹ : Subring K\nmem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier\ntoSubring✝ : Subring K\nmem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier\nh :\n  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =\n    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring\n⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =\n    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ CommRing { x // x ∈ A.toSubring }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ IsDomain { x // x ∈ A.toSubring }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nby_cases (b : K) = 0\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nby_cases (b : K) = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑b = 0\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑b = 0\n⊢ a * 0 = b ∨ b * 0 = a\n[PROOFSTEP]\nleft\n[GOAL]\ncase h.h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑b = 0\n⊢ a * 0 = b\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑b = 0\n⊢ ↑(a * 0) = ↑b\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ¬↑b = 0\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nby_cases (a : K) = 0\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ¬↑b = 0\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nby_cases (a : K) = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ↑a = 0\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ↑a = 0\n⊢ a * 0 = b ∨ b * 0 = a\n[PROOFSTEP]\nright\n[GOAL]\ncase h.h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ↑a = 0\n⊢ b * 0 = a\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ↑a = 0\n⊢ ↑(b * 0) = ↑a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\ncases' A.mem_or_inv_mem (a / b) with hh hh\n[GOAL]\ncase neg.inl\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑a / ↑b ∈ A\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nuse⟨a / b, hh⟩\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑a / ↑b ∈ A\n⊢ a * { val := ↑a / ↑b, property := hh } = b ∨ b * { val := ↑a / ↑b, property := hh } = a\n[PROOFSTEP]\nright\n[GOAL]\ncase h.h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑a / ↑b ∈ A\n⊢ b * { val := ↑a / ↑b, property := hh } = a\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑a / ↑b ∈ A\n⊢ ↑(b * { val := ↑a / ↑b, property := hh }) = ↑a\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑a / ↑b ∈ A\n⊢ ↑b * ↑a = ↑a * ↑b\n[PROOFSTEP]\nring\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : (↑a / ↑b)⁻¹ ∈ A\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nrw [show (a / b : K)⁻¹ = b / a by field_simp] at hh \n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : (↑a / ↑b)⁻¹ ∈ A\n⊢ (↑a / ↑b)⁻¹ = ↑b / ↑a\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑b / ↑a ∈ A\n⊢ ∃ c, a * c = b ∨ b * c = a\n[PROOFSTEP]\nuse⟨b / a, hh⟩\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑b / ↑a ∈ A\n⊢ a * { val := ↑b / ↑a, property := hh } = b ∨ b * { val := ↑b / ↑a, property := hh } = a\n[PROOFSTEP]\nleft\n[GOAL]\ncase h.h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑b / ↑a ∈ A\n⊢ a * { val := ↑b / ↑a, property := hh } = b\n[PROOFSTEP]\next\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑b / ↑a ∈ A\n⊢ ↑(a * { val := ↑b / ↑a, property := hh }) = ↑b\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.h.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh✝ : ¬↑b = 0\nh : ¬↑a = 0\nhh : ↑b / ↑a ∈ A\n⊢ ↑a * ↑b = ↑b * ↑a\n[PROOFSTEP]\nring\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ Algebra { x // x ∈ A.toSubring } K\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: Somehow it cannot find this instance and I'm too lazy to debug. wrong prio?\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\nby_cases z = 0\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\nby_cases z = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : z = 0\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\nuse(0, 1)\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : z = 0\n⊢ z * ↑(algebraMap { x // x ∈ A } K) ↑(0, 1).snd = ↑(algebraMap { x // x ∈ A } K) (0, 1).fst\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : ¬z = 0\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\ncases' A.mem_or_inv_mem z with hh hh\n[GOAL]\ncase neg.inl\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : ¬z = 0\nhh : z ∈ A\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\nuse(⟨z, hh⟩, 1)\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : ¬z = 0\nhh : z ∈ A\n⊢ z * ↑(algebraMap { x // x ∈ A } K) ↑({ val := z, property := hh }, 1).snd =\n    ↑(algebraMap { x // x ∈ A } K) ({ val := z, property := hh }, 1).fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : ¬z = 0\nhh : z⁻¹ ∈ A\n⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst\n[PROOFSTEP]\nrefine ⟨⟨1, ⟨⟨_, hh⟩, ?_⟩⟩, mul_inv_cancel h⟩\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nz : K\nh : ¬z = 0\nhh : z⁻¹ ∈ A\n⊢ { val := z⁻¹, property := hh } ∈ nonZeroDivisors { x // x ∈ A }\n[PROOFSTEP]\nexact mem_nonZeroDivisors_iff_ne_zero.2 fun c => h (inv_eq_zero.mp (congr_arg Subtype.val c))\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑(algebraMap { x // x ∈ A } K) a = ↑(algebraMap { x // x ∈ A } K) b\n⊢ ↑1 * a = ↑1 * b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ A }\nh : ↑(algebraMap { x // x ∈ A } K) a = ↑(algebraMap { x // x ∈ A } K) b\n⊢ ↑(↑1 * a) = ↑(↑1 * b)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ LinearOrderedCommGroupWithZero (ValueGroup A)\n[PROOFSTEP]\nunfold ValueGroup\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ LinearOrderedCommGroupWithZero (ValuationRing.ValueGroup { x // x ∈ A } K)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }ˣ\n⊢ ↑(valuation A) ↑↑a = 1\n[PROOFSTEP]\nrw [← A.valuation.map_one, valuation_eq_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }ˣ\n⊢ ∃ a_1, ↑↑a_1 * 1 = ↑↑a\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }ˣ\n⊢ ↑↑a * 1 = ↑↑a\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\n⊢ IsUnit a\n[PROOFSTEP]\nhave ha : (a : K) ≠ 0\n[GOAL]\ncase ha\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\n⊢ ↑a ≠ 0\n[PROOFSTEP]\nintro c\n[GOAL]\ncase ha\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nc : ↑a = 0\n⊢ False\n[PROOFSTEP]\nrw [c, A.valuation.map_zero] at h \n[GOAL]\ncase ha\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : 0 = 1\nc : ↑a = 0\n⊢ False\n[PROOFSTEP]\nexact zero_ne_one h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nha : ↑a ≠ 0\n⊢ IsUnit a\n[PROOFSTEP]\nhave ha' : (a : K)⁻¹ ∈ A := by rw [← valuation_le_one_iff, map_inv₀, h, inv_one]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nha : ↑a ≠ 0\n⊢ (↑a)⁻¹ ∈ A\n[PROOFSTEP]\nrw [← valuation_le_one_iff, map_inv₀, h, inv_one]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nha : ↑a ≠ 0\nha' : (↑a)⁻¹ ∈ A\n⊢ IsUnit a\n[PROOFSTEP]\napply isUnit_of_mul_eq_one a ⟨a⁻¹, ha'⟩\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nha : ↑a ≠ 0\nha' : (↑a)⁻¹ ∈ A\n⊢ a * { val := (↑a)⁻¹, property := ha' } = 1\n[PROOFSTEP]\next\n[GOAL]\ncase a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\nh : ↑(valuation A) ↑a = 1\nha : ↑a ≠ 0\nha' : (↑a)⁻¹ ∈ A\n⊢ ↑(a * { val := (↑a)⁻¹, property := ha' }) = ↑1\n[PROOFSTEP]\nfield_simp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\n⊢ a ∈ LocalRing.maximalIdeal { x // x ∈ A } ↔ ↑(valuation A) ↑a < 1\n[PROOFSTEP]\nrw [LocalRing.mem_maximalIdeal]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\n⊢ a ∈ nonunits { x // x ∈ A } ↔ ↑(valuation A) ↑a < 1\n[PROOFSTEP]\ndsimp [nonunits]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\n⊢ ¬IsUnit a ↔ ↑(valuation A) ↑a < 1\n[PROOFSTEP]\nrw [valuation_eq_one_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }\n⊢ ¬↑(valuation A) ↑a = 1 ↔ ↑(valuation A) ↑a < 1\n[PROOFSTEP]\nexact (A.valuation_le_one a).lt_iff_ne.symm\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\n⊢ ∀ (x y : ValueGroup R),\n    ZeroHom.toFun\n        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n          map_zero' :=\n            (_ :\n              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n        (x * y) =\n      ZeroHom.toFun\n          { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n            map_zero' :=\n              (_ :\n                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n                  Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n          x *\n        ZeroHom.toFun\n          { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n            map_zero' :=\n              (_ :\n                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n                  Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n          y\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩\n[GOAL]\ncase mk.mk\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx✝ : ValueGroup R\na✝¹ : K\ny✝ : ValueGroup R\na✝ : K\n⊢ ZeroHom.toFun\n      { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n        map_zero' :=\n          (_ :\n            Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n      (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) =\n    ZeroHom.toFun\n        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n          map_zero' :=\n            (_ :\n              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n        (Quot.mk Setoid.r a✝¹) *\n      ZeroHom.toFun\n        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),\n          map_zero' :=\n            (_ :\n              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =\n                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }\n        (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\n⊢ Monotone ↑(mapOfLE R S h)\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ ⟨a, ha⟩\n[GOAL]\ncase mk.mk.intro\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na✝² : ValueGroup R\na✝¹ : K\nb✝ : ValueGroup R\na✝ : K\na : { x // x ∈ R }\nha : a • a✝ = a✝¹\n⊢ ↑(mapOfLE R S h) (Quot.mk Setoid.r a✝¹) ≤ ↑(mapOfLE R S h) (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\nexact ⟨R.inclusion S h a, ha⟩\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\n⊢ ↑(mapOfLE R S h) ∘ ↑(valuation R) = ↑(valuation S)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx✝ : K\n⊢ (↑(mapOfLE R S h) ∘ ↑(valuation R)) x✝ = ↑(valuation S) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\n⊢ IsLocalization.AtPrime { x // x ∈ ofPrime A P } P\n[PROOFSTEP]\napply Localization.subalgebra.isLocalization_ofField K P.primeCompl P.primeCompl_le_nonZeroDivisors\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\nx : { x // x ∈ A }\n⊢ ↑(valuation (ofPrime A P)) ↑x = 1 ↔ x ∈ Ideal.primeCompl P\n[PROOFSTEP]\nrw [← IsLocalization.AtPrime.isUnit_to_map_iff (A.ofPrime P) P x, valuation_eq_one_iff]\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\nx : { x // x ∈ A }\n⊢ ↑(valuation (ofPrime A P)) ↑x = 1 ↔\n    ↑(valuation (ofPrime A P)) ↑(↑(algebraMap { x // x ∈ A } { x // x ∈ ofPrime A P }) x) = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\n⊢ idealOfLE A (ofPrime A P) (_ : A ≤ ofPrime A P) = P\n[PROOFSTEP]\nrefine Ideal.ext (fun x => ?_)\n[GOAL]\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\nx : { x // x ∈ A }\n⊢ x ∈ idealOfLE A (ofPrime A P) (_ : A ≤ ofPrime A P) ↔ x ∈ P\n[PROOFSTEP]\napply IsLocalization.AtPrime.to_map_mem_maximal_iff\n[GOAL]\ncase h\nK : Type u\ninst✝¹ : Field K\nA✝ A : ValuationSubring K\nP : Ideal { x // x ∈ A }\ninst✝ : Ideal.IsPrime P\nx : { x // x ∈ A }\n⊢ optParam (LocalRing { x // x ∈ ofPrime A P }) (_ : LocalRing { x // x ∈ ofPrime A P })\n[PROOFSTEP]\nexact localRing (ofPrime A P)\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\n⊢ ofPrime R (idealOfLE R S h) = S\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\n⊢ x ∈ ofPrime R (idealOfLE R S h) ↔ x ∈ S\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\n⊢ x ∈ ofPrime R (idealOfLE R S h) → x ∈ S\n[PROOFSTEP]\nrintro ⟨a, r, hr, rfl⟩\n[GOAL]\ncase h.mp.intro.intro.intro\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ ↑(algebraMap { x // x ∈ R } K) a * (↑(algebraMap { x // x ∈ R } K) r)⁻¹ ∈ S\n[PROOFSTEP]\napply mul_mem\n[GOAL]\ncase h.mp.intro.intro.intro.a\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ ↑(algebraMap { x // x ∈ R } K) a ∈ S\n[PROOFSTEP]\nexact h a.2\n[GOAL]\ncase h.mp.intro.intro.intro.a\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ (↑(algebraMap { x // x ∈ R } K) r)⁻¹ ∈ S\n[PROOFSTEP]\nrw [← valuation_le_one_iff, map_inv₀, ← inv_one, inv_le_inv₀]\n[GOAL]\ncase h.mp.intro.intro.intro.a\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ 1 ≤ ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r)\n[PROOFSTEP]\nexact not_lt.1 ((not_iff_not.2 <| valuation_lt_one_iff S _).1 hr)\n[GOAL]\ncase h.mp.intro.intro.intro.a.ha\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r) ≠ 0\n[PROOFSTEP]\nintro hh\n[GOAL]\ncase h.mp.intro.intro.intro.a.ha\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\nhh : ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r) = 0\n⊢ False\n[PROOFSTEP]\nerw [Valuation.zero_iff, Subring.coe_eq_zero_iff] at hh \n[GOAL]\ncase h.mp.intro.intro.intro.a.ha\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\nhh : r = 0\n⊢ False\n[PROOFSTEP]\napply hr\n[GOAL]\ncase h.mp.intro.intro.intro.a.ha\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\nhh : r = 0\n⊢ r ∈ ↑(idealOfLE R S h)\n[PROOFSTEP]\nrw [hh]\n[GOAL]\ncase h.mp.intro.intro.intro.a.ha\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\nhh : r = 0\n⊢ 0 ∈ ↑(idealOfLE R S h)\n[PROOFSTEP]\napply Ideal.zero_mem (R.idealOfLE S h)\n[GOAL]\ncase h.mp.intro.intro.intro.a.hb\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\na r : { x // x ∈ R }\nhr : r ∈ Ideal.primeCompl (idealOfLE R S h)\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\ncase h.mpr\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\n⊢ x ∈ S → x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nintro hx\n[GOAL]\ncase h.mpr\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\n⊢ x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nby_cases hr : x ∈ R\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nhr : x ∈ R\n⊢ x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nexact R.le_ofPrime _ hr\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nhr : ¬x ∈ R\n⊢ x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nhave : x ≠ 0 := fun h => hr (by rw [h]; exact R.zero_mem)\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh✝ : R ≤ S\nx : K\nhx : x ∈ S\nhr : ¬x ∈ R\nh : x = 0\n⊢ x ∈ R\n[PROOFSTEP]\nrw [h]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh✝ : R ≤ S\nx : K\nhx : x ∈ S\nhr : ¬x ∈ R\nh : x = 0\n⊢ 0 ∈ R\n[PROOFSTEP]\nexact R.zero_mem\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nhr : ¬x ∈ R\nthis : x ≠ 0\n⊢ x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nreplace hr := (R.mem_or_inv_mem x).resolve_left hr\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ x ∈ ofPrime R (idealOfLE R S h)\n[PROOFSTEP]\nuse 1, ⟨x⁻¹, hr⟩\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ ∃ x_1, x = ↑(algebraMap { x // x ∈ R } K) 1 * (↑(algebraMap { x // x ∈ R } K) { val := x⁻¹, property := hr })⁻¹\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.h\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ x = ↑(algebraMap { x // x ∈ R } K) 1 * (↑(algebraMap { x // x ∈ R } K) { val := x⁻¹, property := hr })⁻¹\n[PROOFSTEP]\nfield_simp\n[GOAL]\ncase h.w\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ { val := x⁻¹, property := hr } ∈ Ideal.primeCompl (idealOfLE R S h)\n[PROOFSTEP]\nchange (⟨x⁻¹, h hr⟩ : S) ∉ nonunits S\n[GOAL]\ncase h.w\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ ¬{ val := x⁻¹, property := (_ : x⁻¹ ∈ S) } ∈ nonunits { x // x ∈ S }\n[PROOFSTEP]\nrw [mem_nonunits_iff, Classical.not_not]\n[GOAL]\ncase h.w\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ IsUnit { val := x⁻¹, property := (_ : x⁻¹ ∈ S) }\n[PROOFSTEP]\napply isUnit_of_mul_eq_one _ (⟨x, hx⟩ : S)\n[GOAL]\ncase h.w\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ { val := x⁻¹, property := (_ : x⁻¹ ∈ S) } * { val := x, property := hx } = 1\n[PROOFSTEP]\next\n[GOAL]\ncase h.w.a\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nh : R ≤ S\nx : K\nhx : x ∈ S\nthis : x ≠ 0\nhr : x⁻¹ ∈ R\n⊢ ↑({ val := x⁻¹, property := (_ : x⁻¹ ∈ S) } * { val := x, property := hx }) = ↑1\n[PROOFSTEP]\nfield_simp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nhR : A ≤ R\nhS : A ≤ S\nh : R ≤ S\nx : { x // x ∈ A }\nhx : x ∈ idealOfLE A S hS\n⊢ ↑(valuation R) ↑(↑(inclusion A R hR) x) < 1\n[PROOFSTEP]\nby_contra c\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nhR : A ≤ R\nhS : A ≤ S\nh : R ≤ S\nx : { x // x ∈ A }\nhx : x ∈ idealOfLE A S hS\nc : ¬↑(valuation R) ↑(↑(inclusion A R hR) x) < 1\n⊢ False\n[PROOFSTEP]\npush_neg at c \n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nhR : A ≤ R\nhS : A ≤ S\nh : R ≤ S\nx : { x // x ∈ A }\nhx : x ∈ idealOfLE A S hS\nc : 1 ≤ ↑(valuation R) ↑(↑(inclusion A R hR) x)\n⊢ False\n[PROOFSTEP]\nreplace c := monotone_mapOfLE R S h c\n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nhR : A ≤ R\nhS : A ≤ S\nh : R ≤ S\nx : { x // x ∈ A }\nhx : x ∈ idealOfLE A S hS\nc : ↑(mapOfLE R S h) 1 ≤ ↑(mapOfLE R S h) (↑(valuation R) ↑(↑(inclusion A R hR) x))\n⊢ False\n[PROOFSTEP]\nrw [(mapOfLE _ _ _).map_one, mapOfLE_valuation_apply] at c \n[GOAL]\nK : Type u\ninst✝ : Field K\nA R S : ValuationSubring K\nhR : A ≤ R\nhS : A ≤ S\nh : R ≤ S\nx : { x // x ∈ A }\nhx : x ∈ idealOfLE A S hS\nc : 1 ≤ ↑(valuation S) ↑(↑(inclusion A R hR) x)\n⊢ False\n[PROOFSTEP]\napply not_le_of_lt ((valuation_lt_one_iff S _).1 hx) c\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nP : PrimeSpectrum { x // x ∈ A }\n⊢ (fun S =>\n        { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),\n          IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })\n      ((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) }) P) =\n    P\n[PROOFSTEP]\next1\n[GOAL]\ncase asIdeal\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nP : PrimeSpectrum { x // x ∈ A }\n⊢ ((fun S =>\n          { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),\n            IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })\n        ((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) }) P)).asIdeal =\n    P.asIdeal\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nS : ↑{S | A ≤ S}\n⊢ (fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) })\n      ((fun S =>\n          { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),\n            IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })\n        S) =\n    S\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nS : ↑{S | A ≤ S}\n⊢ ↑((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) })\n        ((fun S =>\n            { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),\n              IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })\n          S)) =\n    ↑S\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh :\n  ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      a✝ ≤\n    ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      b✝\n⊢ a✝ ≤ b✝\n[PROOFSTEP]\ndsimp at h \n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ a✝ ≤ b✝\n[PROOFSTEP]\nhave := idealOfLE_le_of_le A _ _ ?_ ?_ h\n[GOAL]\ncase refine_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\nthis : idealOfLE A ↑(↑(primeSpectrumEquiv A) b✝) ?refine_2 ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1\n⊢ a✝ ≤ b✝\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\niterate 2 erw [idealOfLE_ofPrime] at this \n[GOAL]\ncase refine_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\nthis : idealOfLE A ↑(↑(primeSpectrumEquiv A) b✝) ?refine_2 ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1\n⊢ a✝ ≤ b✝\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\nerw [idealOfLE_ofPrime] at this \n[GOAL]\ncase refine_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\nthis : b✝.asIdeal ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1\n⊢ a✝ ≤ b✝\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\nerw [idealOfLE_ofPrime] at this \n[GOAL]\ncase refine_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\nthis : b✝.asIdeal ≤ a✝.asIdeal\n⊢ a✝ ≤ b✝\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\nexact this\n[GOAL]\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\nall_goals exact le_ofPrime A (PrimeSpectrum.asIdeal _)\n[GOAL]\ncase refine_1\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)\n[PROOFSTEP]\nexact le_ofPrime A (PrimeSpectrum.asIdeal _)\n[GOAL]\ncase refine_2\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝\n⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)\n[PROOFSTEP]\nexact le_ofPrime A (PrimeSpectrum.asIdeal _)\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : a✝ ≤ b✝\n⊢ ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      a✝ ≤\n    ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n      b✝\n[PROOFSTEP]\napply ofPrime_le_of_le\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nsrc✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A\na✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ\nh : a✝ ≤ b✝\n⊢ b✝.asIdeal ≤ a✝.asIdeal\n[PROOFSTEP]\nexact h\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\n⊢ ∀ (x : K),\n    x ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  neg_mem' :=\n                    (_ :\n                      ∀ {x : K},\n                        x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨\n      x⁻¹ ∈\n        { toSubsemiring := src✝.toSubsemiring,\n                  neg_mem' :=\n                    (_ :\n                      ∀ {x : K},\n                        x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\n⊢ x ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K},\n                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨\n    x⁻¹ ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\ncases' le_or_lt (v x) 1 with h h\n[GOAL]\ncase inl\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : ↑v x ≤ 1\n⊢ x ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K},\n                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨\n    x⁻¹ ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nleft\n[GOAL]\ncase inl.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : ↑v x ≤ 1\n⊢ x ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              neg_mem' :=\n                (_ : ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nexact h\n[GOAL]\ncase inr\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ x ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K},\n                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨\n    x⁻¹ ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ x⁻¹ ∈\n    { toSubsemiring := src✝.toSubsemiring,\n              neg_mem' :=\n                (_ : ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nchange v x⁻¹ ≤ 1\n[GOAL]\ncase inr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ ↑v x⁻¹ ≤ 1\n[PROOFSTEP]\nrw [map_inv₀ v, ← inv_one, inv_le_inv₀]\n[GOAL]\ncase inr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ 1 ≤ ↑v x\n[PROOFSTEP]\nexact le_of_lt h\n[GOAL]\ncase inr.h.ha\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ ↑v x ≠ 0\n[PROOFSTEP]\nintro c\n[GOAL]\ncase inr.h.ha\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\nc : ↑v x = 0\n⊢ False\n[PROOFSTEP]\nsimp [c] at h \n[GOAL]\ncase inr.h.hb\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nsrc✝ : Subring K := integer v\nx : K\nh : 1 < ↑v x\n⊢ 1 ≠ 0\n[PROOFSTEP]\nexact one_ne_zero\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\n⊢ IsEquiv v₁ v₂ ↔ valuationSubring v₁ = valuationSubring v₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\n⊢ IsEquiv v₁ v₂ → valuationSubring v₁ = valuationSubring v₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : IsEquiv v₁ v₂\n⊢ valuationSubring v₁ = valuationSubring v₂\n[PROOFSTEP]\next x\n[GOAL]\ncase mp.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : IsEquiv v₁ v₂\nx : K\n⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂\n[PROOFSTEP]\nspecialize h x 1\n[GOAL]\ncase mp.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nx : K\nh : ↑v₁ x ≤ ↑v₁ 1 ↔ ↑v₂ x ≤ ↑v₂ 1\n⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase mpr\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\n⊢ valuationSubring v₁ = valuationSubring v₂ → IsEquiv v₁ v₂\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : valuationSubring v₁ = valuationSubring v₂\n⊢ IsEquiv v₁ v₂\n[PROOFSTEP]\napply isEquiv_of_val_le_one\n[GOAL]\ncase mpr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : valuationSubring v₁ = valuationSubring v₂\n⊢ ∀ {x : K}, ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mpr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : valuationSubring v₁ = valuationSubring v₂\nx : K\n⊢ ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1\n[PROOFSTEP]\nhave : x ∈ v₁.valuationSubring ↔ x ∈ v₂.valuationSubring := by rw [h]\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : valuationSubring v₁ = valuationSubring v₂\nx : K\n⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr.h\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nh : valuationSubring v₁ = valuationSubring v₂\nx : K\nthis : x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂\n⊢ ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\n⊢ IsEquiv v (ValuationSubring.valuation (valuationSubring v))\n[PROOFSTEP]\nrw [isEquiv_iff_val_le_one]\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\n⊢ ∀ {x : K}, ↑v x ≤ 1 ↔ ↑(ValuationSubring.valuation (valuationSubring v)) x ≤ 1\n[PROOFSTEP]\nintro x\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nx : K\n⊢ ↑v x ≤ 1 ↔ ↑(ValuationSubring.valuation (valuationSubring v)) x ≤ 1\n[PROOFSTEP]\nrw [ValuationSubring.valuation_le_one_iff]\n[GOAL]\nK : Type u\ninst✝³ : Field K\nΓ : Type u_1\nΓ₁ : Type u_2\nΓ₂ : Type u_3\ninst✝² : LinearOrderedCommGroupWithZero Γ\ninst✝¹ : LinearOrderedCommGroupWithZero Γ₁\ninst✝ : LinearOrderedCommGroupWithZero Γ₂\nv : Valuation K Γ\nv₁ : Valuation K Γ₁\nv₂ : Valuation K Γ₂\nx : K\n⊢ ↑v x ≤ 1 ↔ x ∈ valuationSubring v\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ Valuation.valuationSubring (valuation A) = A\n[PROOFSTEP]\next\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx✝ : K\n⊢ x✝ ∈ Valuation.valuationSubring (valuation A) ↔ x✝ ∈ A\n[PROOFSTEP]\nrw [← A.valuation_le_one_iff]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx✝ : K\n⊢ x✝ ∈ Valuation.valuationSubring (valuation A) ↔ ↑(valuation A) x✝ ≤ 1\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\n⊢ ↑({ val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) }) = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\n⊢ ↑({ val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) }) = ↑1\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ unitGroup A }\n⊢ (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n      ((fun x =>\n          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n            val_inv :=\n              (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n            inv_val :=\n              (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })\n        a) =\n    a\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ unitGroup A }\n⊢ ↑↑((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n          ((fun x =>\n              { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                val_inv :=\n                  (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n                inv_val :=\n                  (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })\n            a)) =\n    ↑↑a\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }ˣ\n⊢ (fun x =>\n        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n          val_inv :=\n            (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n          inv_val :=\n            (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })\n      ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =\n    a\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : { x // x ∈ A }ˣ\n⊢ ↑↑((fun x =>\n            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n              val_inv :=\n                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n              inv_val :=\n                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })\n          ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a)) =\n    ↑↑a\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ unitGroup A }\n⊢ Equiv.toFun\n      {\n        toFun := fun x =>\n          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n            val_inv :=\n              (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n            inv_val :=\n              (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n        invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n        left_inv :=\n          (_ :\n            ∀ (a : { x // x ∈ unitGroup A }),\n              (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                  ((fun x =>\n                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                              1) })\n                    a) =\n                a),\n        right_inv :=\n          (_ :\n            ∀ (a : { x // x ∈ A }ˣ),\n              (fun x =>\n                    { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                      inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                      val_inv :=\n                        (_ :\n                          { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                            1),\n                      inv_val :=\n                        (_ :\n                          { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                            1) })\n                  ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =\n                a) }\n      (a * b) =\n    Equiv.toFun\n        {\n          toFun := fun x =>\n            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n              val_inv :=\n                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n              inv_val :=\n                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n          invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n          left_inv :=\n            (_ :\n              ∀ (a : { x // x ∈ unitGroup A }),\n                (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                    ((fun x =>\n                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                1) })\n                      a) =\n                  a),\n          right_inv :=\n            (_ :\n              ∀ (a : { x // x ∈ A }ˣ),\n                (fun x =>\n                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                              1) })\n                    ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =\n                  a) }\n        a *\n      Equiv.toFun\n        {\n          toFun := fun x =>\n            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n              val_inv :=\n                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n              inv_val :=\n                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n          invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n          left_inv :=\n            (_ :\n              ∀ (a : { x // x ∈ unitGroup A }),\n                (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                    ((fun x =>\n                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                1) })\n                      a) =\n                  a),\n          right_inv :=\n            (_ :\n              ∀ (a : { x // x ∈ A }ˣ),\n                (fun x =>\n                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                              1) })\n                    ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =\n                  a) }\n        b\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : { x // x ∈ unitGroup A }\n⊢ ↑↑(Equiv.toFun\n          {\n            toFun := fun x =>\n              { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                val_inv :=\n                  (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n                inv_val :=\n                  (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n            invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n            left_inv :=\n              (_ :\n                ∀ (a : { x // x ∈ unitGroup A }),\n                  (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                      ((fun x =>\n                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                  1) })\n                        a) =\n                    a),\n            right_inv :=\n              (_ :\n                ∀ (a : { x // x ∈ A }ˣ),\n                  (fun x =>\n                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                1) })\n                      ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =\n                    a) }\n          (a * b)) =\n    ↑↑(Equiv.toFun\n            {\n              toFun := fun x =>\n                { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                  inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                  val_inv :=\n                    (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n                  inv_val :=\n                    (_ :\n                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n              invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n              left_inv :=\n                (_ :\n                  ∀ (a : { x // x ∈ unitGroup A }),\n                    (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                        ((fun x =>\n                            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                              inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                              val_inv :=\n                                (_ :\n                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                    1),\n                              inv_val :=\n                                (_ :\n                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                      { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                    1) })\n                          a) =\n                      a),\n              right_inv :=\n                (_ :\n                  ∀ (a : { x // x ∈ A }ˣ),\n                    (fun x =>\n                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                  1) })\n                        ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                          a) =\n                      a) }\n            a *\n          Equiv.toFun\n            {\n              toFun := fun x =>\n                { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                  inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                  val_inv :=\n                    (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),\n                  inv_val :=\n                    (_ :\n                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },\n              invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },\n              left_inv :=\n                (_ :\n                  ∀ (a : { x // x ∈ unitGroup A }),\n                    (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                        ((fun x =>\n                            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                              inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                              val_inv :=\n                                (_ :\n                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                    1),\n                              inv_val :=\n                                (_ :\n                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                      { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                    1) })\n                          a) =\n                      a),\n              right_inv :=\n                (_ :\n                  ∀ (a : { x // x ∈ A }ˣ),\n                    (fun x =>\n                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },\n                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *\n                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *\n                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =\n                                  1) })\n                        ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })\n                          a) =\n                      a) }\n            b)\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ unitGroup A ≤ unitGroup B ↔ A ≤ B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ unitGroup A ≤ unitGroup B → A ≤ B\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : x ∈ A\n⊢ x ∈ B\n[PROOFSTEP]\nrw [← A.valuation_le_one_iff x, le_iff_lt_or_eq] at hx \n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1\n⊢ x ∈ B\n[PROOFSTEP]\nby_cases h_1 : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1\nh_1 : x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nsimp only [h_1, zero_mem]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1\nh_1 : ¬x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nby_cases h_2 : 1 + x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1\nh_1 : ¬x = 0\nh_2 : 1 + x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nsimp only [← add_eq_zero_iff_neg_eq.1 h_2, neg_mem _ _ (one_mem _)]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nhx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1\nh_1 : ¬x = 0\nh_2 : ¬1 + x = 0\n⊢ x ∈ B\n[PROOFSTEP]\ncases' hx with hx hx\n[GOAL]\ncase neg.inl\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nh_1 : ¬x = 0\nh_2 : ¬1 + x = 0\nhx : ↑(valuation A) x < 1\n⊢ x ∈ B\n[PROOFSTEP]\nhave := h (show Units.mk0 _ h_2 ∈ A.unitGroup from A.valuation.map_one_add_of_lt hx)\n[GOAL]\ncase neg.inl\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nh_1 : ¬x = 0\nh_2 : ¬1 + x = 0\nhx : ↑(valuation A) x < 1\nthis : Units.mk0 (1 + x) h_2 ∈ unitGroup B\n⊢ x ∈ B\n[PROOFSTEP]\nsimpa using\n  B.add_mem _ _ (show 1 + x ∈ B from SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B)) (B.neg_mem _ B.one_mem)\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nh_1 : ¬x = 0\nh_2 : ¬1 + x = 0\nhx : ↑(valuation A) x = 1\n⊢ x ∈ B\n[PROOFSTEP]\nhave := h (show Units.mk0 x h_1 ∈ A.unitGroup from hx)\n[GOAL]\ncase neg.inr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A ≤ unitGroup B\nx : K\nh_1 : ¬x = 0\nh_2 : ¬1 + x = 0\nhx : ↑(valuation A) x = 1\nthis : Units.mk0 x h_1 ∈ unitGroup B\n⊢ x ∈ B\n[PROOFSTEP]\nrefine' SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B)\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ A ≤ B → unitGroup A ≤ unitGroup B\n[PROOFSTEP]\nrintro h x (hx : A.valuation x = 1)\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : Kˣ\nhx : ↑(valuation A) ↑x = 1\n⊢ x ∈ unitGroup B\n[PROOFSTEP]\napply_fun A.mapOfLE B h at hx \n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : Kˣ\nhx : ↑(mapOfLE A B h) (↑(valuation A) ↑x) = ↑(mapOfLE A B h) 1\n⊢ x ∈ unitGroup B\n[PROOFSTEP]\nsimpa using hx\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : unitGroup A = unitGroup B\n⊢ A = B\n[PROOFSTEP]\nsimpa only [le_antisymm_iff, unitGroup_le_unitGroup] using h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ nonunits B ≤ nonunits A ↔ A ≤ B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ nonunits B ≤ nonunits A → A ≤ B\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits B ≤ nonunits A\nx : K\nhx : x ∈ A\n⊢ x ∈ B\n[PROOFSTEP]\nby_cases h_1 : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits B ≤ nonunits A\nx : K\nhx : x ∈ A\nh_1 : x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nsimp only [h_1, zero_mem]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits B ≤ nonunits A\nx : K\nhx : x ∈ A\nh_1 : ¬x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nrw [← valuation_le_one_iff, ← not_lt, Valuation.one_lt_val_iff _ h_1] at hx ⊢\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits B ≤ nonunits A\nx : K\nhx : ¬↑(valuation A) x⁻¹ < 1\nh_1 : ¬x = 0\n⊢ ¬↑(valuation B) x⁻¹ < 1\n[PROOFSTEP]\nby_contra h_2\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits B ≤ nonunits A\nx : K\nhx : ¬↑(valuation A) x⁻¹ < 1\nh_1 : ¬x = 0\nh_2 : ↑(valuation B) x⁻¹ < 1\n⊢ False\n[PROOFSTEP]\nexact hx (h h_2)\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ A ≤ B → nonunits B ≤ nonunits A\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : K\nhx : x ∈ nonunits B\n⊢ x ∈ nonunits A\n[PROOFSTEP]\nby_contra h_1\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : K\nhx : x ∈ nonunits B\nh_1 : ¬x ∈ nonunits A\n⊢ False\n[PROOFSTEP]\nexact not_lt.2 (monotone_mapOfLE _ _ h (not_lt.1 h_1)) hx\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : nonunits A = nonunits B\n⊢ A = B\n[PROOFSTEP]\nsimpa only [le_antisymm_iff, nonunits_le_nonunits] using h.symm\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ Subtype.val '' ↑(LocalRing.maximalIdeal { x // x ∈ A }) = ↑(nonunits A)\n[PROOFSTEP]\next a\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : K\n⊢ a ∈ Subtype.val '' ↑(LocalRing.maximalIdeal { x // x ∈ A }) ↔ a ∈ ↑(nonunits A)\n[PROOFSTEP]\nsimp only [Set.mem_image, SetLike.mem_coe, mem_nonunits_iff_exists_mem_maximalIdeal]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : K\n⊢ (∃ x, x ∈ LocalRing.maximalIdeal { x // x ∈ A } ∧ ↑x = a) ↔\n    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }\n[PROOFSTEP]\nerw [Subtype.exists]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : K\n⊢ (∃ a_1 b,\n      { val := a_1, property := b } ∈ LocalRing.maximalIdeal { x // x ∈ A } ∧ ↑{ val := a_1, property := b } = a) ↔\n    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }\n[PROOFSTEP]\nsimp_rw [exists_and_right, exists_eq_right]\n  -- Porting note: added\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : K\n⊢ (∃ x, { val := a, property := (_ : a ∈ ↑A) } ∈ LocalRing.maximalIdeal { x // x ∈ A }) ↔\n    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ ∀ {a b : Kˣ},\n    a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →\n      b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}\n[PROOFSTEP]\nintro a b ha hb\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : Kˣ\nha : a ∈ {x | ↑(valuation A) (↑x - 1) < 1}\nhb : b ∈ {x | ↑(valuation A) (↑x - 1) < 1}\n⊢ a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}\n[PROOFSTEP]\nrw [Set.mem_setOf] at ha hb \n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\nhb : ↑(valuation A) (↑b - 1) < 1\n⊢ a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}\n[PROOFSTEP]\nrefine'\n  lt_of_le_of_lt _\n    (max_lt hb ha)\n      -- Porting note: `sub_add_sub_cancel` needed some help\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\nhb : ↑(valuation A) (↑b - 1) < 1\n⊢ ↑(valuation A) (↑(a * b) - 1) ≤ max (↑(valuation A) (↑b - 1)) (↑(valuation A) (↑a - 1))\n[PROOFSTEP]\nrw [← one_mul (A.valuation (b - 1)), ← A.valuation.map_one_add_of_lt ha, add_sub_cancel'_right, ← Valuation.map_mul,\n  mul_sub_one, ← sub_add_sub_cancel (↑(a * b) : K) _ 1]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\nhb : ↑(valuation A) (↑b - 1) < 1\n⊢ ↑(valuation A) (↑(a * b) - ?m.1681005 + (?m.1681005 - 1)) ≤\n    max (↑(valuation A) (↑a * ↑b - ↑a)) (↑(valuation A) (↑a - 1))\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na b : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\nhb : ↑(valuation A) (↑b - 1) < 1\n⊢ K\n[PROOFSTEP]\nexact A.valuation.map_add _ _\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ 1 ∈\n    { carrier := {x | ↑(valuation A) (↑x - 1) < 1},\n        mul_mem' :=\n          (_ :\n            ∀ {a b : Kˣ},\n              a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →\n                b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) }.carrier\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ ∀ {x : Kˣ},\n    x ∈\n        {\n              toSubsemigroup :=\n                { carrier := {x | ↑(valuation A) (↑x - 1) < 1},\n                  mul_mem' :=\n                    (_ :\n                      ∀ {a b : Kˣ},\n                        a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →\n                          b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) },\n              one_mem' := (_ : ↑(valuation A) (1 - 1) < 1) }.toSubsemigroup.carrier →\n      x⁻¹ ∈\n        {\n              toSubsemigroup :=\n                { carrier := {x | ↑(valuation A) (↑x - 1) < 1},\n                  mul_mem' :=\n                    (_ :\n                      ∀ {a b : Kˣ},\n                        a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →\n                          b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) },\n              one_mem' := (_ : ↑(valuation A) (1 - 1) < 1) }.toSubsemigroup.carrier\n[PROOFSTEP]\ndsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ ∀ {x : Kˣ}, ↑(valuation A) (↑x - 1) < 1 → ↑(valuation A) (↑x⁻¹ - 1) < 1\n[PROOFSTEP]\nintro a ha\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n⊢ ↑(valuation A) (↑a⁻¹ - 1) < 1\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n| ↑(valuation A) (↑a⁻¹ - 1) < 1\n[PROOFSTEP]\n  lhs\n  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n| ↑(valuation A) (↑a⁻¹ - 1) < 1\n[PROOFSTEP]\n  lhs\n  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n| ↑(valuation A) (↑a⁻¹ - 1) < 1\n[PROOFSTEP]\nlhs\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n| ↑(valuation A) (↑a⁻¹ - 1)\n[PROOFSTEP]\nrw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nha : ↑(valuation A) (↑a - 1) < 1\n⊢ ↑(valuation A) (↑a⁻¹ - 1) * ↑(valuation A) (1 + (↑a - 1)) < 1\n[PROOFSTEP]\nrwa [add_sub_cancel'_right, ← Valuation.map_mul, sub_mul, Units.inv_mul, ← neg_sub, one_mul, Valuation.map_neg]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\na : Kˣ\nh : a ∈ principalUnitGroup A\n⊢ a ∈ unitGroup A\n[PROOFSTEP]\nsimpa only [add_sub_cancel'_right] using A.valuation.map_one_add_of_lt h\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ principalUnitGroup B ≤ principalUnitGroup A ↔ A ≤ B\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ principalUnitGroup B ≤ principalUnitGroup A → A ≤ B\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mp\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\n⊢ x ∈ B\n[PROOFSTEP]\nby_cases h_1 : x = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\nh_1 : x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nsimp only [h_1, zero_mem]\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\nh_1 : ¬x = 0\n⊢ x ∈ B\n[PROOFSTEP]\nby_cases h_2 : x⁻¹ + 1 = 0\n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\nh_1 : ¬x = 0\nh_2 : x⁻¹ + 1 = 0\n⊢ x ∈ B\n[PROOFSTEP]\nrw [add_eq_zero_iff_eq_neg, inv_eq_iff_eq_inv, inv_neg, inv_one] at h_2 \n[GOAL]\ncase pos\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\nh_1 : ¬x = 0\nh_2 : x = -1\n⊢ x ∈ B\n[PROOFSTEP]\nsimpa only [h_2] using B.neg_mem _ B.one_mem\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx : x ∈ A\nh_1 : ¬x = 0\nh_2 : ¬x⁻¹ + 1 = 0\n⊢ x ∈ B\n[PROOFSTEP]\nrw [← valuation_le_one_iff, ← not_lt, Valuation.one_lt_val_iff _ h_1, ← add_sub_cancel x⁻¹, ← Units.val_mk0 h_2, ←\n  mem_principalUnitGroup_iff] at hx ⊢\n[GOAL]\ncase neg\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup B ≤ principalUnitGroup A\nx : K\nhx✝¹ : ¬↑(valuation A) x⁻¹ < 1\nhx✝ : ¬↑(valuation A) (x⁻¹ + 1 - 1) < 1\nh_1 : ¬x = 0\nh_2 : ¬x⁻¹ + 1 = 0\nhx : ¬Units.mk0 (x⁻¹ + 1) h_2 ∈ principalUnitGroup A\n⊢ ¬Units.mk0 (x⁻¹ + 1) h_2 ∈ principalUnitGroup B\n[PROOFSTEP]\nsimpa only [hx] using @h (Units.mk0 (x⁻¹ + 1) h_2)\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\n⊢ A ≤ B → principalUnitGroup B ≤ principalUnitGroup A\n[PROOFSTEP]\nintro h x hx\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : Kˣ\nhx : x ∈ principalUnitGroup B\n⊢ x ∈ principalUnitGroup A\n[PROOFSTEP]\nby_contra h_1\n[GOAL]\ncase mpr\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : A ≤ B\nx : Kˣ\nhx : x ∈ principalUnitGroup B\nh_1 : ¬x ∈ principalUnitGroup A\n⊢ False\n[PROOFSTEP]\nexact not_lt.2 (monotone_mapOfLE _ _ h (not_lt.1 h_1)) hx\n[GOAL]\nK : Type u\ninst✝ : Field K\nA✝ A B : ValuationSubring K\nh : principalUnitGroup A = principalUnitGroup B\n⊢ A = B\n[PROOFSTEP]\nsimpa [le_antisymm_iff, principalUnitGroup_le_principalUnitGroup] using h.symm\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\n⊢ ↑x ∈ principalUnitGroup A ↔ ↑(unitGroupMulEquiv A) x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))\n[PROOFSTEP]\nrw [MonoidHom.mem_ker, Units.ext_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\n⊢ ↑x ∈ principalUnitGroup A ↔ ↑(↑(Units.map ↑(LocalRing.residue { x // x ∈ A })) (↑(unitGroupMulEquiv A) x)) = ↑1\n[PROOFSTEP]\nlet π := Ideal.Quotient.mk (LocalRing.maximalIdeal A)\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\nπ : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=\n  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })\n⊢ ↑x ∈ principalUnitGroup A ↔ ↑(↑(Units.map ↑(LocalRing.residue { x // x ∈ A })) (↑(unitGroupMulEquiv A) x)) = ↑1\n[PROOFSTEP]\nconvert_to _ ↔ π _ = 1\n[GOAL]\ncase convert_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\nπ : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=\n  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })\n⊢ ↑x ∈ principalUnitGroup A ↔ ↑π ↑(↑(unitGroupMulEquiv A) x) = 1\n[PROOFSTEP]\nrw [← π.map_one, ← sub_eq_zero, ← π.map_sub, Ideal.Quotient.eq_zero_iff_mem, valuation_lt_one_iff]\n[GOAL]\ncase convert_3\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ unitGroup A }\nπ : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=\n  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })\n⊢ ↑x ∈ principalUnitGroup A ↔ ↑(valuation A) ↑(↑(↑(unitGroupMulEquiv A) x) - 1) < 1\n[PROOFSTEP]\nsimp [mem_principalUnitGroup_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }\n⊢ ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A\n[PROOFSTEP]\nrw [A.coe_mem_principalUnitGroup_iff]\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }\n⊢ ↑(unitGroupMulEquiv A) (↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈\n    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))\n[PROOFSTEP]\nsimpa using SetLike.coe_mem x\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ principalUnitGroup A }\n⊢ (fun x =>\n        { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n          property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n      ((fun x =>\n          { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n            property :=\n              (_ :\n                ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                  MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n        x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }\n⊢ (fun x =>\n        { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n          property :=\n            (_ :\n              ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n      ((fun x =>\n          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n            property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n        x) =\n    x\n[PROOFSTEP]\nsimp\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx y : { x // x ∈ principalUnitGroup A }\n⊢ Equiv.toFun\n      {\n        toFun := fun x =>\n          { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n            property :=\n              (_ :\n                ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                  MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },\n        invFun := fun x =>\n          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n            property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },\n        left_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ principalUnitGroup A }),\n              {\n                  val :=\n                    ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                        ↑((fun x =>\n                              { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                property :=\n                                  (_ :\n                                    ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                      MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                            x)),\n                  property :=\n                    (_ :\n                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                            ↑((fun x =>\n                                  { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                    property :=\n                                      (_ :\n                                        ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                                x)) ∈\n                        principalUnitGroup A) } =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),\n              {\n                  val :=\n                    ↑(unitGroupMulEquiv A)\n                      {\n                        val :=\n                          ↑((fun x =>\n                                { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                  property :=\n                                    (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                              x),\n                        property :=\n                          (_ :\n                            ↑((fun x =>\n                                    { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                      property :=\n                                        (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                  x) ∈\n                              unitGroup A) },\n                  property :=\n                    (_ :\n                      ↑(unitGroupMulEquiv A)\n                          {\n                            val :=\n                              ↑((fun x =>\n                                    { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                      property :=\n                                        (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                  x),\n                            property :=\n                              (_ :\n                                ↑((fun x =>\n                                        { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                          property :=\n                                            (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                      x) ∈\n                                  unitGroup A) } ∈\n                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =\n                x) }\n      (x * y) =\n    Equiv.toFun\n        {\n          toFun := fun x =>\n            { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n              property :=\n                (_ :\n                  ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },\n          invFun := fun x =>\n            { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n              property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ principalUnitGroup A }),\n                {\n                    val :=\n                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                          ↑((fun x =>\n                                { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                  property :=\n                                    (_ :\n                                      ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                              x)),\n                    property :=\n                      (_ :\n                        ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                              ↑((fun x =>\n                                    { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                      property :=\n                                        (_ :\n                                          ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                            MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                                  x)) ∈\n                          principalUnitGroup A) } =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),\n                {\n                    val :=\n                      ↑(unitGroupMulEquiv A)\n                        {\n                          val :=\n                            ↑((fun x =>\n                                  { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                    property :=\n                                      (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                x),\n                          property :=\n                            (_ :\n                              ↑((fun x =>\n                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                        property :=\n                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                    x) ∈\n                                unitGroup A) },\n                    property :=\n                      (_ :\n                        ↑(unitGroupMulEquiv A)\n                            {\n                              val :=\n                                ↑((fun x =>\n                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                        property :=\n                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                    x),\n                              property :=\n                                (_ :\n                                  ↑((fun x =>\n                                          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                            property :=\n                                              (_ :\n                                                ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                        x) ∈\n                                    unitGroup A) } ∈\n                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =\n                  x) }\n        x *\n      Equiv.toFun\n        {\n          toFun := fun x =>\n            { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n              property :=\n                (_ :\n                  ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },\n          invFun := fun x =>\n            { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n              property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ principalUnitGroup A }),\n                {\n                    val :=\n                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                          ↑((fun x =>\n                                { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                  property :=\n                                    (_ :\n                                      ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                              x)),\n                    property :=\n                      (_ :\n                        ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))\n                              ↑((fun x =>\n                                    { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },\n                                      property :=\n                                        (_ :\n                                          ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈\n                                            MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })\n                                  x)) ∈\n                          principalUnitGroup A) } =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),\n                {\n                    val :=\n                      ↑(unitGroupMulEquiv A)\n                        {\n                          val :=\n                            ↑((fun x =>\n                                  { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                    property :=\n                                      (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                x),\n                          property :=\n                            (_ :\n                              ↑((fun x =>\n                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                        property :=\n                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                    x) ∈\n                                unitGroup A) },\n                    property :=\n                      (_ :\n                        ↑(unitGroupMulEquiv A)\n                            {\n                              val :=\n                                ↑((fun x =>\n                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                        property :=\n                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                    x),\n                              property :=\n                                (_ :\n                                  ↑((fun x =>\n                                          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),\n                                            property :=\n                                              (_ :\n                                                ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })\n                                        x) ∈\n                                    unitGroup A) } ∈\n                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =\n                  x) }\n        y\n[PROOFSTEP]\nrfl\n[GOAL]\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\n⊢ MonoidHom.ker (unitGroupToResidueFieldUnits A) =\n    Subgroup.comap (Subgroup.subtype (unitGroup A)) (principalUnitGroup A)\n[PROOFSTEP]\next\n  -- Porting note: simp fails but rw works\n    -- See https://github.com/leanprover-community/mathlib4/issues/5026\n    -- simp [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx✝ : { x // x ∈ unitGroup A }\n⊢ x✝ ∈ MonoidHom.ker (unitGroupToResidueFieldUnits A) ↔\n    x✝ ∈ Subgroup.comap (Subgroup.subtype (unitGroup A)) (principalUnitGroup A)\n[PROOFSTEP]\nrw [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]\n[GOAL]\ncase h\nK : Type u\ninst✝ : Field K\nA : ValuationSubring K\nx✝ : { x // x ∈ unitGroup A }\n⊢ x✝ ∈ MonoidHom.ker (unitGroupToResidueFieldUnits A) ↔\n    ↑(unitGroupMulEquiv A) x✝ ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))\n[PROOFSTEP]\nrfl\n  -- simp [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]\n[GOAL]\nK : Type u\ninst✝² : Field K\nA : ValuationSubring K\nG : Type u_1\ninst✝¹ : Group G\ninst✝ : MulSemiringAction G K\ng : G\nS : ValuationSubring K\nsrc✝ : Subring K := g • S.toSubring\nx : K\nh : (g⁻¹ • x)⁻¹ ∈ S\n⊢ g⁻¹ • x⁻¹ ∈ S.toSubring\n[PROOFSTEP]\nrwa [smul_inv'']\n[GOAL]\nK : Type u\ninst✝² : Field K\nA✝ : ValuationSubring K\nL : Type u_1\nJ : Type u_2\ninst✝¹ : Field L\ninst✝ : Field J\nA : ValuationSubring L\nf : K →+* L\nsrc✝ : Subring K := Subring.comap f A.toSubring\nk : K\n⊢ k ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K},\n                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨\n    k⁻¹ ∈\n      { toSubsemiring := src✝.toSubsemiring,\n                neg_mem' :=\n                  (_ :\n                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier\n[PROOFSTEP]\nsimp [ValuationSubring.mem_or_inv_mem]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Valuation.ValuationSubring", "llama_tokens": 43928, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5774953651858117, "lm_q2_score": 0.47268347662043286, "lm_q1q2_score": 0.27297251694821595}}
{"text": "[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nα : Type u\nx : t' α\n⊢ Equiv.map eqv id x = x\n[PROOFSTEP]\nsimp [Equiv.map, id_map]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nα β γ : Type u\ng : α → β\nh : β → γ\nx : t' α\n⊢ Equiv.map eqv (h ∘ g) x = Equiv.map eqv h (Equiv.map eqv g x)\n[PROOFSTEP]\nsimp [Equiv.map]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nα β γ : Type u\ng : α → β\nh : β → γ\nx : t' α\n⊢ (h ∘ g) <$> ↑(eqv α).symm x = h <$> g <$> ↑(eqv α).symm x\n[PROOFSTEP]\napply comp_map\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nF : Functor t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ LawfulFunctor t'\n[PROOFSTEP]\nhave : F = Equiv.functor eqv := by\n  cases F\n  dsimp [Equiv.functor]\n  congr <;> ext <;> dsimp only <;> [rw [← h₀]; rw [← h₁]] <;> rfl\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nF : Functor t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ F = Equiv.functor eqv\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ { map := map✝, mapConst := mapConst✝ } = Equiv.functor eqv\n[PROOFSTEP]\ndsimp [Equiv.functor]\n[GOAL]\ncase mk\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ { map := map✝, mapConst := mapConst✝ } =\n    { map := fun {α β} => Equiv.map eqv, mapConst := fun {α β} => Equiv.map eqv ∘ Function.const β }\n[PROOFSTEP]\ncongr <;> ext <;> dsimp only <;> [rw [← h₀]; rw [← h₁]]\n[GOAL]\ncase mk\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ { map := map✝, mapConst := mapConst✝ } =\n    { map := fun {α β} => Equiv.map eqv, mapConst := fun {α β} => Equiv.map eqv ∘ Function.const β }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.e_map\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ map✝ = fun {α β} => Equiv.map eqv\n[PROOFSTEP]\next\n[GOAL]\ncase mk.e_mapConst\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ mapConst✝ = fun {α β} => Equiv.map eqv ∘ Function.const β\n[PROOFSTEP]\next\n[GOAL]\ncase mk.e_map.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³ → x✝²\nx✝ : t' x✝³\n⊢ map✝ x✝¹ x✝ = Equiv.map eqv x✝¹ x✝\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.e_mapConst.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³\nx✝ : t' x✝²\n⊢ mapConst✝ x✝¹ x✝ = (fun {α β} => Equiv.map eqv ∘ Function.const β) x✝¹ x✝\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase mk.e_map.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³ → x✝²\nx✝ : t' x✝³\n⊢ map✝ x✝¹ x✝ = Equiv.map eqv x✝¹ x✝\n[PROOFSTEP]\nrw [← h₀]\n[GOAL]\ncase mk.e_mapConst.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³\nx✝ : t' x✝²\n⊢ mapConst✝ x✝¹ x✝ = (Equiv.map eqv ∘ Function.const x✝²) x✝¹ x✝\n[PROOFSTEP]\nrw [← h₁]\n[GOAL]\ncase mk.e_map.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³ → x✝²\nx✝ : t' x✝³\n⊢ map✝ x✝¹ x✝ = x✝¹ <$> x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.e_mapConst.h.h.h.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nmap✝ : {α β : Type u} → (α → β) → t' α → t' β\nmapConst✝ : {α β : Type u} → α → t' β → t' α\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nx✝³ x✝² : Type u\nx✝¹ : x✝³\nx✝ : t' x✝²\n⊢ mapConst✝ x✝¹ x✝ = mapConst x✝¹ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nF : Functor t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nthis : F = Equiv.functor eqv\n⊢ LawfulFunctor t'\n[PROOFSTEP]\nsubst this\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹ : Functor t\ninst✝ : LawfulFunctor t\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\n⊢ LawfulFunctor t'\n[PROOFSTEP]\nexact Equiv.lawfulFunctor eqv\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nx : t' α\n⊢ Equiv.traverse eqv pure x = x\n[PROOFSTEP]\nsimp [Equiv.traverse]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : α → β\nx : t' α\n⊢ Equiv.traverse eqv (pure ∘ f) x = pure (Equiv.map eqv f x)\n[PROOFSTEP]\nsimp [Equiv.traverse, traverse_eq_map_id, functor_norm]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : α → β\nx : t' α\n⊢ ↑(eqv β) (id.mk (f <$> ↑(eqv α).symm x)) = Equiv.map eqv f x\n[PROOFSTEP]\nrfl\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : β → F γ\ng : α → G β\nx : t' α\n⊢ Equiv.traverse eqv (Comp.mk ∘ map f ∘ g) x = Comp.mk (Equiv.traverse eqv f <$> Equiv.traverse eqv g x)\n[PROOFSTEP]\nsimp [Equiv.traverse, comp_traverse, functor_norm]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : β → F γ\ng : α → G β\nx : t' α\n⊢ Comp.mk (((fun x => ↑(eqv γ) <$> x) ∘ traverse f) <$> traverse g (↑(eqv α).symm x)) =\n    Comp.mk (((fun x => ↑(eqv γ) <$> traverse f (↑(eqv β).symm x)) ∘ ↑(eqv β)) <$> traverse g (↑(eqv α).symm x))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_x.e_a\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : β → F γ\ng : α → G β\nx : t' α\n⊢ (fun x => ↑(eqv γ) <$> x) ∘ traverse f = (fun x => ↑(eqv γ) <$> traverse f (↑(eqv β).symm x)) ∘ ↑(eqv β)\n[PROOFSTEP]\next\n[GOAL]\ncase e_x.e_a.h\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : β → F γ\ng : α → G β\nx : t' α\nx✝ : t β\n⊢ ((fun x => ↑(eqv γ) <$> x) ∘ traverse f) x✝ = ((fun x => ↑(eqv γ) <$> traverse f (↑(eqv β).symm x)) ∘ ↑(eqv β)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁵ : Traversable t\ninst✝⁴ : LawfulTraversable t\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\nf : α → F β\nx : t' α\n⊢ (fun {α} => ApplicativeTransformation.app η α) (Equiv.traverse eqv f x) =\n    Equiv.traverse eqv ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\nsimp only [Equiv.traverse, functor_norm]\n[GOAL]\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\n⊢ LawfulTraversable t'\n[PROOFSTEP]\nrefine' { toLawfulFunctor := Equiv.lawfulFunctor' eqv @h₀ @h₁ .. }\n[GOAL]\ncase refine'_1\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\n⊢ ∀ {α : Type u} (x : t' α), traverse pure x = x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_2\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\n⊢ ∀ {F G : Type u → Type u} [inst : Applicative F] [inst_1 : Applicative G] [inst_2 : LawfulApplicative F]\n    [inst_3 : LawfulApplicative G] {α β γ : Type u} (f : β → F γ) (g : α → G β) (x : t' α),\n    traverse (Comp.mk ∘ map f ∘ g) x = Comp.mk (traverse f <$> traverse g x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_3\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\n⊢ ∀ {α β : Type u} (f : α → β) (x : t' α), traverse (pure ∘ f) x = id.mk (f <$> x)\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_4\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\n⊢ ∀ {F G : Type u → Type u} [inst : Applicative F] [inst_1 : Applicative G] [inst_2 : LawfulApplicative F]\n    [inst_3 : LawfulApplicative G] (η : ApplicativeTransformation F G) {α β : Type u} (f : α → F β) (x : t' α),\n    (fun {α} => ApplicativeTransformation.app η α) (traverse f x) =\n      traverse ((fun {α} => ApplicativeTransformation.app η α) ∘ f) x\n[PROOFSTEP]\nintros\n[GOAL]\ncase refine'_1\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\nα✝ : Type u\nx✝ : t' α✝\n⊢ traverse pure x✝ = x✝\n[PROOFSTEP]\nrw [h₂, Equiv.id_traverse]\n[GOAL]\ncase refine'_2\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹⁰ : Traversable t\ninst✝⁹ : LawfulTraversable t\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\ninst✝⁴ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\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✝ : t' α✝\n⊢ traverse (Comp.mk ∘ map f✝ ∘ g✝) x✝ = Comp.mk (traverse f✝ <$> traverse g✝ x✝)\n[PROOFSTEP]\nrw [h₂, Equiv.comp_traverse, h₂]\n[GOAL]\ncase refine'_2\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹⁰ : Traversable t\ninst✝⁹ : LawfulTraversable t\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\ninst✝⁴ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\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✝ : t' α✝\n⊢ Comp.mk (Equiv.traverse eqv f✝ <$> Equiv.traverse eqv g✝ x✝) = Comp.mk (Equiv.traverse eqv f✝ <$> traverse g✝ x✝)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase refine'_2.e_x.e_a\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹⁰ : Traversable t\ninst✝⁹ : LawfulTraversable t\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\ninst✝⁴ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\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✝ : t' α✝\n⊢ Equiv.traverse eqv g✝ x✝ = traverse g✝ x✝\n[PROOFSTEP]\nrw [h₂]\n[GOAL]\ncase refine'_3\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nx✝ : t' α✝\n⊢ traverse (pure ∘ f✝) x✝ = id.mk (f✝ <$> x✝)\n[PROOFSTEP]\nrw [h₂, Equiv.traverse_eq_map_id, h₀]\n[GOAL]\ncase refine'_3\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝⁶ : Traversable t\ninst✝⁵ : LawfulTraversable t\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\ninst✝ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\nα✝ β✝ : Type u\nf✝ : α✝ → β✝\nx✝ : t' α✝\n⊢ pure (Equiv.map eqv f✝ x✝) = id.mk (Equiv.map eqv f✝ x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_4\nt t' : Type u → Type u\neqv : (α : Type u) → t α ≃ t' α\ninst✝¹⁰ : Traversable t\ninst✝⁹ : LawfulTraversable t\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\ninst✝⁴ : Traversable t'\nh₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f\nh₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f\nh₂ :\n  ∀ {F : Type u → Type u} [inst : Applicative F] [inst_1 : LawfulApplicative F] {α β : Type u} (f : α → F β),\n    traverse f = Equiv.traverse eqv f\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\nf✝ : α✝ → F✝ β✝\nx✝ : t' α✝\n⊢ (fun {α} => ApplicativeTransformation.app η✝ α) (traverse f✝ x✝) =\n    traverse ((fun {α} => ApplicativeTransformation.app η✝ α) ∘ f✝) x✝\n[PROOFSTEP]\nrw [h₂, Equiv.naturality, h₂]\n", "meta": {"mathlib_filename": "Mathlib.Control.Traversable.Equiv", "llama_tokens": 10730, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5544704649604273, "lm_q2_score": 0.4921881357207956, "lm_q1q2_score": 0.27290378446111546}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : AddUnits ℝ≥0∞\n⊢ ↑a ≤ 0\n[PROOFSTEP]\nrw [← a.add_neg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : AddUnits ℝ≥0∞\n⊢ ↑a ≤ ↑a + ↑(-a)\n[PROOFSTEP]\nexact le_self_add\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : a ≠ ⊤\n⊢ ENNReal.ofReal (ENNReal.toReal a) = a\n[PROOFSTEP]\nsimp [ENNReal.toReal, ENNReal.ofReal, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\n⊢ ↑(ENNReal.toNNReal ↑r) ≤ ↑r\n[PROOFSTEP]\nrw [toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\n⊢ ↑r = ENNReal.ofReal ↑r\n[PROOFSTEP]\nrw [ENNReal.ofReal, Real.toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ENNReal.ofReal 0 = 0\n[PROOFSTEP]\nsimp [ENNReal.ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ENNReal.ofReal 1 = 1\n[PROOFSTEP]\nsimp [ENNReal.ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ≥0∞ → Prop\n⊢ (∃ a, a ≠ ⊤ ∧ p a) ↔ ∃ r, p ↑r\n[PROOFSTEP]\nsimp only [exists_ne_top', ← exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ ENNReal.toReal x = 0 ↔ x = 0 ∨ x = ⊤\n[PROOFSTEP]\nsimp [ENNReal.toReal, toNNReal_eq_zero_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ x = ↑1 ∨ x = ⊤ ∧ 1 = 0 ↔ x = 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ ENNReal.toReal x = 1 ↔ x = 1\n[PROOFSTEP]\nrw [ENNReal.toReal, NNReal.coe_eq_one, ENNReal.toNNReal_eq_one_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : ENNReal.ofReal (ENNReal.toReal a) = a\n⊢ a ≠ ⊤\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : ENNReal.ofReal (ENNReal.toReal a) = a\n⊢ ENNReal.ofReal (ENNReal.toReal a) ≠ ⊤\n[PROOFSTEP]\nexact ofReal_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nh : ENNReal.toReal (ENNReal.ofReal a) = a\n⊢ 0 ≤ a\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nh : ENNReal.toReal (ENNReal.ofReal a) = a\n⊢ 0 ≤ ENNReal.toReal (ENNReal.ofReal a)\n[PROOFSTEP]\nexact toReal_nonneg\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\n⊢ ENNReal.toReal x = ENNReal.toReal y ↔ x = y ∨ x = 0 ∧ y = ⊤ ∨ x = ⊤ ∧ y = 0\n[PROOFSTEP]\nsimp only [ENNReal.toReal, NNReal.coe_eq, toNNReal_eq_toNNReal_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nhx : x ≠ ⊤\nhy : y ≠ ⊤\n⊢ ENNReal.toNNReal x = ENNReal.toNNReal y ↔ x = y\n[PROOFSTEP]\nsimp only [ENNReal.toNNReal_eq_toNNReal_iff x y, hx, hy, and_false, false_and, or_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nhx : x ≠ ⊤\nhy : y ≠ ⊤\n⊢ ENNReal.toReal x = ENNReal.toReal y ↔ x = y\n[PROOFSTEP]\nsimp only [ENNReal.toReal, NNReal.coe_eq, toNNReal_eq_toNNReal_iff' hx hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ↑1 < ↑2\n[PROOFSTEP]\nexact_mod_cast (one_lt_two : 1 < 2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ninst✝ : CompleteLattice α\nf : ℝ≥0∞ → α\n⊢ ⨅ (x : ℝ≥0∞) (_ : x ≠ ⊤), f x = ⨅ (x : ℝ≥0), f ↑x\n[PROOFSTEP]\nrw [iInf_subtype', cinfi_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ≥0∞ A\nr : ℝ≥0\nx : (fun x => A) r\n⊢ ↑(RingHom.comp (algebraMap ℝ≥0∞ A) ofNNRealHom) r * x = x * ↑(RingHom.comp (algebraMap ℝ≥0∞ A) ofNNRealHom) r\n[PROOFSTEP]\nsimp [Algebra.commutes]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nA : Type u_3\ninst✝¹ : Semiring A\ninst✝ : Algebra ℝ≥0∞ A\nr : ℝ≥0\nx : (fun x => A) r\n⊢ r • x = ↑(RingHom.comp (algebraMap ℝ≥0∞ A) ofNNRealHom) r * x\n[PROOFSTEP]\nsimp [← Algebra.smul_def (r : ℝ≥0∞) x, smul_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nR : Type u_3\nr : R\ns : ℝ≥0\ninst✝³ : SMul R ℝ≥0\ninst✝² : SMul R ℝ≥0∞\ninst✝¹ : IsScalarTower R ℝ≥0 ℝ≥0\ninst✝ : IsScalarTower R ℝ≥0 ℝ≥0∞\n⊢ ↑(r • s) = r • ↑s\n[PROOFSTEP]\nrw [← smul_one_smul ℝ≥0 r (s : ℝ≥0∞), smul_def, smul_eq_mul, ← ENNReal.coe_mul, smul_mul_assoc, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nr₁ r₂ : ℝ≥0∞\nh₁ : r₁ ≠ ⊤\nh₂ : r₂ ≠ ⊤\n⊢ ENNReal.toNNReal (r₁ + r₂) = ENNReal.toNNReal r₁ + ENNReal.toNNReal r₂\n[PROOFSTEP]\nlift r₁ to ℝ≥0 using h₁\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nr₂ : ℝ≥0∞\nh₂ : r₂ ≠ ⊤\nr₁ : ℝ≥0\n⊢ ENNReal.toNNReal (↑r₁ + r₂) = ENNReal.toNNReal ↑r₁ + ENNReal.toNNReal r₂\n[PROOFSTEP]\nlift r₂ to ℝ≥0 using h₂\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q r₁ r₂ : ℝ≥0\n⊢ ENNReal.toNNReal (↑r₁ + ↑r₂) = ENNReal.toNNReal ↑r₁ + ENNReal.toNNReal ↑r₂\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ ¬x < ⊤ ↔ x = ⊤\n[PROOFSTEP]\nrw [lt_top_iff_ne_top, Classical.not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a + b ≠ ⊤ ↔ a ≠ ⊤ ∧ b ≠ ⊤\n[PROOFSTEP]\nsimpa only [lt_top_iff_ne_top] using add_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a * ⊤ = if a = 0 then 0 else ⊤\n[PROOFSTEP]\nconvert WithTop.mul_top' a\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⊤ * a = if a = 0 then 0 else ⊤\n[PROOFSTEP]\nconvert WithTop.top_mul' a\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nR : Type u_3\ninst✝⁴ : Zero R\ninst✝³ : SMulWithZero R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : NoZeroSMulDivisors R ℝ≥0∞\ninst✝ : DecidableEq R\nc : R\n⊢ c • ⊤ = if c = 0 then 0 else ⊤\n[PROOFSTEP]\nrw [← smul_one_mul, mul_top']\n  -- porting note: need the primed version of `one_ne_zero` now\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nR : Type u_3\ninst✝⁴ : Zero R\ninst✝³ : SMulWithZero R ℝ≥0∞\ninst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞\ninst✝¹ : NoZeroSMulDivisors R ℝ≥0∞\ninst✝ : DecidableEq R\nc : R\n⊢ (if c • 1 = 0 then 0 else ⊤) = if c = 0 then 0 else ⊤\n[PROOFSTEP]\nsimp_rw [smul_eq_zero, or_iff_left (one_ne_zero' ℝ≥0∞)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\nh : 0 < n\nm : ℕ\nx✝ : Nat.succ 0 ≤ m\nhm : ⊤ ^ m = ⊤\n⊢ ⊤ ^ (m + 1) = ⊤\n[PROOFSTEP]\nrw [pow_succ, hm, top_mul_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ≠ ⊤ → b ≠ ⊤ → a * b ≠ ⊤\n[PROOFSTEP]\nsimpa only [lt_top_iff_ne_top] using mul_lt_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a * b ≠ ⊤\nha : a ≠ 0\n⊢ b * a ≠ ⊤\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ a * b < ⊤ ↔ a < ⊤ ∧ b < ⊤ ∨ a = 0 ∨ b = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ a * b < ⊤ → a < ⊤ ∧ b < ⊤ ∨ a = 0 ∨ b = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a * b < ⊤\n⊢ a < ⊤ ∧ b < ⊤ ∨ a = 0 ∨ b = 0\n[PROOFSTEP]\nrw [← or_assoc, or_iff_not_imp_right, or_iff_not_imp_right]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a * b < ⊤\n⊢ ¬b = 0 → ¬a = 0 → a < ⊤ ∧ b < ⊤\n[PROOFSTEP]\nintro hb ha\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a * b < ⊤\nhb : ¬b = 0\nha : ¬a = 0\n⊢ a < ⊤ ∧ b < ⊤\n[PROOFSTEP]\nexact ⟨lt_top_of_mul_ne_top_left h.ne hb, lt_top_of_mul_ne_top_right h.ne ha⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ a < ⊤ ∧ b < ⊤ ∨ a = 0 ∨ b = 0 → a * b < ⊤\n[PROOFSTEP]\nrintro (⟨ha, hb⟩ | rfl | rfl) <;> [exact mul_lt_top ha.ne hb.ne; simp; simp]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ a < ⊤ ∧ b < ⊤ ∨ a = 0 ∨ b = 0 → a * b < ⊤\n[PROOFSTEP]\nrintro (⟨ha, hb⟩ | rfl | rfl)\n[GOAL]\ncase mpr.inl.intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nha : a < ⊤\nhb : b < ⊤\n⊢ a * b < ⊤\n[PROOFSTEP]\nexact mul_lt_top ha.ne hb.ne\n[GOAL]\ncase mpr.inr.inl\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nb : ℝ≥0∞\n⊢ 0 * b < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr.inr.inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a * 0 < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a * a < ⊤ ↔ a < ⊤\n[PROOFSTEP]\nrw [ENNReal.mul_lt_top_iff, and_self, or_self, or_iff_left_iff_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a = 0 → a < ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 0 < ⊤\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ a ^ n = ⊤ ↔ a = ⊤ ∧ n ≠ 0\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with rfl | (hn : 0 < n)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ^ 0 = ⊤ ↔ a = ⊤ ∧ 0 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\nhn : 0 < n\n⊢ a ^ n = ⊤ ↔ a = ⊤ ∧ n ≠ 0\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase inr.top\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\nhn : 0 < n\n⊢ ⊤ ^ n = ⊤ ↔ ⊤ = ⊤ ∧ n ≠ 0\n[PROOFSTEP]\nsimp only [Ne.def, hn.ne', top_pow hn]\n[GOAL]\ncase inr.coe\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\nhn : 0 < n\nx✝ : ℝ≥0\n⊢ ↑x✝ ^ n = ⊤ ↔ ↑x✝ = ⊤ ∧ n ≠ 0\n[PROOFSTEP]\nsimp only [← coe_pow, coe_ne_top, false_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a < ⊤ → ∀ (n : ℕ), a ^ n < ⊤\n[PROOFSTEP]\nsimpa only [lt_top_iff_ne_top] using pow_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ ENNReal.ofReal ↑n = ↑n\n[PROOFSTEP]\nsimp [ENNReal.ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ ENNReal.toNNReal ↑n = ↑n\n[PROOFSTEP]\nrw [← ENNReal.coe_nat n, ENNReal.toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ ENNReal.toReal ↑n = ↑n\n[PROOFSTEP]\nrw [← ENNReal.ofReal_coe_nat n, ENNReal.toReal_ofReal (Nat.cast_nonneg _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nb : ℝ≥0\nh : a ≤ ↑b\n⊢ ENNReal.toReal a ≤ ↑b\n[PROOFSTEP]\nlift a to ℝ≥0 using ne_top_of_le_ne_top coe_ne_top h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q b a : ℝ≥0\nh : ↑a ≤ ↑b\n⊢ ENNReal.toReal ↑a ≤ ↑b\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ≠ 0 → ∀ (n : ℕ), a ^ n ≠ 0\n[PROOFSTEP]\nsimpa only [pos_iff_ne_zero] using ENNReal.pow_pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ¬a < 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\n⊢ a < a + b\n[PROOFSTEP]\nrwa [← pos_iff_ne_zero, ← ENNReal.add_lt_add_iff_left ha, add_zero] at hb \n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a < b\n⊢ ∃ q, 0 ≤ q ∧ a < ↑(Real.toNNReal ↑q) ∧ ↑(Real.toNNReal ↑q) < b\n[PROOFSTEP]\nrcases lt_iff_exists_coe.1 h with ⟨p, rfl, _⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p✝ q p : ℝ≥0\nright✝ h : ↑p < b\n⊢ ∃ q, 0 ≤ q ∧ ↑p < ↑(Real.toNNReal ↑q) ∧ ↑(Real.toNNReal ↑q) < b\n[PROOFSTEP]\nrcases exists_between h with ⟨c, pc, cb⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c✝ d : ℝ≥0∞\nr p✝ q p : ℝ≥0\nright✝ h : ↑p < b\nc : ℝ≥0∞\npc : ↑p < c\ncb : c < b\n⊢ ∃ q, 0 ≤ q ∧ ↑p < ↑(Real.toNNReal ↑q) ∧ ↑(Real.toNNReal ↑q) < b\n[PROOFSTEP]\nrcases lt_iff_exists_coe.1 cb with ⟨r, rfl, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr✝ p✝ q p : ℝ≥0\nright✝¹ h : ↑p < b\nr : ℝ≥0\nright✝ : ↑r < b\npc : ↑p < ↑r\ncb : ↑r < b\n⊢ ∃ q, 0 ≤ q ∧ ↑p < ↑(Real.toNNReal ↑q) ∧ ↑(Real.toNNReal ↑q) < b\n[PROOFSTEP]\nrcases(NNReal.lt_iff_exists_rat_btwn _ _).1 (coe_lt_coe.1 pc) with ⟨q, hq0, pq, qr⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr✝ p✝ q✝ p : ℝ≥0\nright✝¹ h : ↑p < b\nr : ℝ≥0\nright✝ : ↑r < b\npc : ↑p < ↑r\ncb : ↑r < b\nq : ℚ\nhq0 : 0 ≤ q\npq : p < Real.toNNReal ↑q\nqr : Real.toNNReal ↑q < r\n⊢ ∃ q, 0 ≤ q ∧ ↑p < ↑(Real.toNNReal ↑q) ∧ ↑(Real.toNNReal ↑q) < b\n[PROOFSTEP]\nexact ⟨q, hq0, coe_lt_coe.2 pq, lt_trans (coe_lt_coe.2 qr) cb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a < b ↔ ∃ r, 0 < r ∧ a + ↑r < b\n[PROOFSTEP]\nrefine' ⟨fun hab => _, fun ⟨r, _, hr⟩ => lt_of_le_of_lt le_self_add hr⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhab : a < b\n⊢ ∃ r, 0 < r ∧ a + ↑r < b\n[PROOFSTEP]\nrcases lt_iff_exists_nnreal_btwn.1 hab with ⟨c, ac, cb⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nhab : a < b\nc : ℝ≥0\nac : a < ↑c\ncb : ↑c < b\n⊢ ∃ r, 0 < r ∧ a + ↑r < b\n[PROOFSTEP]\nlift a to ℝ≥0 using ac.ne_top\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c✝ d : ℝ≥0∞\nr p q c : ℝ≥0\ncb : ↑c < b\na : ℝ≥0\nhab : ↑a < b\nac : ↑a < ↑c\n⊢ ∃ r, 0 < r ∧ ↑a + ↑r < b\n[PROOFSTEP]\nrw [coe_lt_coe] at ac \n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c✝ d : ℝ≥0∞\nr p q c : ℝ≥0\ncb : ↑c < b\na : ℝ≥0\nhab : ↑a < b\nac : a < c\n⊢ ∃ r, 0 < r ∧ ↑a + ↑r < b\n[PROOFSTEP]\nrefine ⟨c - a, tsub_pos_iff_lt.2 ac, ?_⟩\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c✝ d : ℝ≥0∞\nr p q c : ℝ≥0\ncb : ↑c < b\na : ℝ≥0\nhab : ↑a < b\nac : a < c\n⊢ ↑a + ↑(c - a) < b\n[PROOFSTEP]\nrwa [← coe_add, add_tsub_cancel_of_le ac.le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : ∀ (ε : ℝ≥0), 0 < ε → b < ⊤ → a ≤ b + ↑ε\n⊢ a ≤ b\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : b < a\n⊢ ∃ ε, 0 < ε ∧ b < ⊤ ∧ b + ↑ε < a\n[PROOFSTEP]\nrcases lt_iff_exists_add_pos_lt.1 h with ⟨r, hr0, hr⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nh : b < a\nr : ℝ≥0\nhr0 : 0 < r\nhr : b + ↑r < a\n⊢ ∃ ε, 0 < ε ∧ b < ⊤ ∧ b + ↑ε < a\n[PROOFSTEP]\nexact ⟨r, hr0, h.trans_le le_top, hr⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nr : ℝ≥0∞\nh : r ≠ ⊤\n⊢ ∃ n, r < ↑n\n[PROOFSTEP]\nlift r to ℝ≥0 using h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\n⊢ ∃ n, ↑r < ↑n\n[PROOFSTEP]\nrcases exists_nat_gt r with ⟨n, hn⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\nn : ℕ\nhn : r < ↑n\n⊢ ∃ n, ↑r < ↑n\n[PROOFSTEP]\nexact ⟨n, coe_lt_coe_nat.2 hn⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋃ (n : ℕ), Iio ↑n = {⊤}ᶜ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ x ∈ ⋃ (n : ℕ), Iio ↑n ↔ x ∈ {⊤}ᶜ\n[PROOFSTEP]\nrw [mem_iUnion]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ (∃ i, x ∈ Iio ↑i) ↔ x ∈ {⊤}ᶜ\n[PROOFSTEP]\nexact ⟨fun ⟨n, hn⟩ => ne_top_of_lt hn, ENNReal.exists_nat_gt⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋃ (n : ℕ), Ioc a ↑n = Ioi a \\ {⊤}\n[PROOFSTEP]\nsimp only [← Ioi_inter_Iic, ← inter_iUnion, iUnion_Iic_coe_nat, diff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋃ (n : ℕ), Ioo a ↑n = Ioi a \\ {⊤}\n[PROOFSTEP]\nsimp only [← Ioi_inter_Iio, ← inter_iUnion, iUnion_Iio_coe_nat, diff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋃ (n : ℕ), Icc a ↑n = Ici a \\ {⊤}\n[PROOFSTEP]\nsimp only [← Ici_inter_Iic, ← inter_iUnion, iUnion_Iic_coe_nat, diff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋃ (n : ℕ), Ico a ↑n = Ici a \\ {⊤}\n[PROOFSTEP]\nsimp only [← Ici_inter_Iio, ← inter_iUnion, iUnion_Iio_coe_nat, diff_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋂ (n : ℕ), Ici ↑n = {⊤}\n[PROOFSTEP]\nsimp only [← compl_Iio, ← compl_iUnion, iUnion_Iio_coe_nat, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⋂ (n : ℕ), Ioi ↑n = {⊤}\n[PROOFSTEP]\nsimp only [← compl_Iic, ← compl_iUnion, iUnion_Iic_coe_nat, compl_compl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nac : a < c\nbd : b < d\n⊢ a + b < c + d\n[PROOFSTEP]\nlift a to ℝ≥0 using ac.ne_top\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nbd : b < d\na : ℝ≥0\nac : ↑a < c\n⊢ ↑a + b < c + d\n[PROOFSTEP]\nlift b to ℝ≥0 using bd.ne_top\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a : ℝ≥0\nac : ↑a < c\nb : ℝ≥0\nbd : ↑b < d\n⊢ ↑a + ↑b < c + d\n[PROOFSTEP]\ncases c\n[GOAL]\ncase intro.intro.none\nα : Type u_1\nβ : Type u_2\nd : ℝ≥0∞\nr p q a b : ℝ≥0\nbd : ↑b < d\nac : ↑a < none\n⊢ ↑a + ↑b < none + d\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.some\nα : Type u_1\nβ : Type u_2\nd : ℝ≥0∞\nr p q a b : ℝ≥0\nbd : ↑b < d\nval✝ : ℝ≥0\nac : ↑a < Option.some val✝\n⊢ ↑a + ↑b < Option.some val✝ + d\n[PROOFSTEP]\ncases d\n[GOAL]\ncase intro.intro.some.none\nα : Type u_1\nβ : Type u_2\nr p q a b val✝ : ℝ≥0\nac : ↑a < Option.some val✝\nbd : ↑b < none\n⊢ ↑a + ↑b < Option.some val✝ + none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.some.some\nα : Type u_1\nβ : Type u_2\nr p q a b val✝¹ : ℝ≥0\nac : ↑a < Option.some val✝¹\nval✝ : ℝ≥0\nbd : ↑b < Option.some val✝\n⊢ ↑a + ↑b < Option.some val✝¹ + Option.some val✝\n[PROOFSTEP]\nsimp only [← coe_add, some_eq_coe, coe_lt_coe] at *\n[GOAL]\ncase intro.intro.some.some\nα : Type u_1\nβ : Type u_2\nr p q a b val✝¹ val✝ : ℝ≥0\nac : a < val✝¹\nbd : b < val✝\n⊢ a + b < val✝¹ + val✝\n[PROOFSTEP]\nexact add_lt_add ac bd\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a = ⊤ → b = ⊤\nh_nnreal : a ≠ ⊤ → b ≠ ⊤ → ENNReal.toNNReal a ≤ ENNReal.toNNReal b\n⊢ a ≤ b\n[PROOFSTEP]\nby_contra' hlt\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a = ⊤ → b = ⊤\nh_nnreal : a ≠ ⊤ → b ≠ ⊤ → ENNReal.toNNReal a ≤ ENNReal.toNNReal b\nhlt : b < a\n⊢ False\n[PROOFSTEP]\nlift b to ℝ≥0 using hlt.ne_top\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nb : ℝ≥0\nh : a = ⊤ → ↑b = ⊤\nh_nnreal : a ≠ ⊤ → ↑b ≠ ⊤ → ENNReal.toNNReal a ≤ ENNReal.toNNReal ↑b\nhlt : ↑b < a\n⊢ False\n[PROOFSTEP]\nlift a to ℝ≥0 using mt h coe_ne_top\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q b a : ℝ≥0\nh : ↑a = ⊤ → ↑b = ⊤\nh_nnreal : ↑a ≠ ⊤ → ↑b ≠ ⊤ → ENNReal.toNNReal ↑a ≤ ENNReal.toNNReal ↑b\nhlt : ↑b < ↑a\n⊢ False\n[PROOFSTEP]\nrefine hlt.not_le ?_\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q b a : ℝ≥0\nh : ↑a = ⊤ → ↑b = ⊤\nh_nnreal : ↑a ≠ ⊤ → ↑b ≠ ⊤ → ENNReal.toNNReal ↑a ≤ ENNReal.toNNReal ↑b\nhlt : ↑b < ↑a\n⊢ ↑a ≤ ↑b\n[PROOFSTEP]\nsimpa using h_nnreal\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ |ENNReal.toReal x| = ENNReal.toReal x\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ |ENNReal.toReal none| = ENNReal.toReal none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q val✝ : ℝ≥0\n⊢ |ENNReal.toReal (Option.some val✝)| = ENNReal.toReal (Option.some val✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Set ℝ≥0\n⊢ ↑r ∈ upperBounds (some '' s) ↔ r ∈ upperBounds s\n[PROOFSTEP]\nsimp (config := { contextual := true }) [upperBounds, ball_image_iff, -mem_image, *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nac : a < c\nbd : b < d\n⊢ a * b < c * d\n[PROOFSTEP]\nrcases lt_iff_exists_nnreal_btwn.1 ac with ⟨a', aa', a'c⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nac : a < c\nbd : b < d\na' : ℝ≥0\naa' : a < ↑a'\na'c : ↑a' < c\n⊢ a * b < c * d\n[PROOFSTEP]\nlift a to ℝ≥0 using ne_top_of_lt aa'\n[GOAL]\ncase intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nbd : b < d\na' : ℝ≥0\na'c : ↑a' < c\na : ℝ≥0\nac : ↑a < c\naa' : ↑a < ↑a'\n⊢ ↑a * b < c * d\n[PROOFSTEP]\nrcases lt_iff_exists_nnreal_btwn.1 bd with ⟨b', bb', b'd⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nbd : b < d\na' : ℝ≥0\na'c : ↑a' < c\na : ℝ≥0\nac : ↑a < c\naa' : ↑a < ↑a'\nb' : ℝ≥0\nbb' : b < ↑b'\nb'd : ↑b' < d\n⊢ ↑a * b < c * d\n[PROOFSTEP]\nlift b to ℝ≥0 using ne_top_of_lt bb'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a' : ℝ≥0\na'c : ↑a' < c\na : ℝ≥0\nac : ↑a < c\naa' : ↑a < ↑a'\nb' : ℝ≥0\nb'd : ↑b' < d\nb : ℝ≥0\nbd : ↑b < d\nbb' : ↑b < ↑b'\n⊢ ↑a * ↑b < c * d\n[PROOFSTEP]\nnorm_cast at *\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a' : ℝ≥0\na'c : ↑a' < c\na : ℝ≥0\nac : ↑a < c\nb' : ℝ≥0\nb'd : ↑b' < d\nb : ℝ≥0\nbd : ↑b < d\naa' : a < a'\nbb' : b < b'\n⊢ ↑(a * b) < c * d\n[PROOFSTEP]\ncalc\n  ↑(a * b) < ↑(a' * b') := coe_lt_coe.2 (mul_lt_mul₀ aa' bb')\n  _ = ↑a' * ↑b' := coe_mul\n  _ ≤ c * d := mul_le_mul' a'c.le b'd.le\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx✝ : 1 ≠ 0\n⊢ StrictMono fun x => x ^ 1\n[PROOFSTEP]\nsimpa only [pow_one] using strictMono_id\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0 : a ≠ 0\nhinf : a ≠ ⊤\n⊢ StrictMono fun x => a * x\n[PROOFSTEP]\nlift a to ℝ≥0 using hinf\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : ↑a ≠ 0\n⊢ StrictMono fun x => ↑a * x\n[PROOFSTEP]\nrw [coe_ne_zero] at h0 \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : a ≠ 0\n⊢ StrictMono fun x => ↑a * x\n[PROOFSTEP]\nintro x y h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : a ≠ 0\nx y : ℝ≥0∞\nh : x < y\n⊢ (fun x => ↑a * x) x < (fun x => ↑a * x) y\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : a ≠ 0\nx y : ℝ≥0∞\nh : ↑a * y ≤ ↑a * x\n⊢ y ≤ x\n[PROOFSTEP]\nsimpa only [← mul_assoc, ← coe_mul, inv_mul_cancel h0, coe_one, one_mul] using mul_le_mul_left' h (↑a⁻¹)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ AddLECancellable a ↔ a ≠ ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ AddLECancellable a → a ≠ ⊤\n[PROOFSTEP]\nrintro h rfl\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : AddLECancellable ⊤\n⊢ False\n[PROOFSTEP]\nrefine' zero_lt_one.not_le (h _)\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : AddLECancellable ⊤\n⊢ ⊤ + 1 ≤ ⊤ + 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a ≠ ⊤ → AddLECancellable a\n[PROOFSTEP]\nrintro h b c hbc\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\na✝ b✝ c✝ d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : a ≠ ⊤\nb c : ℝ≥0∞\nhbc : a + b ≤ a + c\n⊢ b ≤ c\n[PROOFSTEP]\napply ENNReal.le_of_add_le_add_left h hbc\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nm n : ℕ\n⊢ ↑(m - n) = ↑m - ↑n\n[PROOFSTEP]\nrw [← coe_nat, Nat.cast_tsub, coe_sub, coe_nat, coe_nat]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤ ∨ b ≠ ⊤\n⊢ a - b < c → a < b + c\n[PROOFSTEP]\nobtain rfl | hb := eq_or_ne b ∞\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤ ∨ ⊤ ≠ ⊤\n⊢ a - ⊤ < c → a < ⊤ + c\n[PROOFSTEP]\nrw [top_add, lt_top_iff_ne_top]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤ ∨ ⊤ ≠ ⊤\n⊢ a - ⊤ < c → a ≠ ⊤\n[PROOFSTEP]\nexact fun _ => h.resolve_right (Classical.not_not.2 rfl)\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤ ∨ b ≠ ⊤\nhb : b ≠ ⊤\n⊢ a - b < c → a < b + c\n[PROOFSTEP]\nexact (cancel_of_ne hb).lt_add_of_tsub_lt_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ ⊤\n⊢ (a - b) * c = a * c - b * c\n[PROOFSTEP]\ncases' le_or_lt a b with hab hab\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ ⊤\nhab : a ≤ b\n⊢ (a - b) * c = a * c - b * c\n[PROOFSTEP]\nsimp [hab, mul_right_mono hab]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ ⊤\nhab : b < a\n⊢ (a - b) * c = a * c - b * c\n[PROOFSTEP]\nrcases eq_or_lt_of_le (zero_le b) with (rfl | hb)\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\na c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < 0 → 0 < a → c ≠ ⊤\nhab : 0 < a\n⊢ (a - 0) * c = a * c - 0 * c\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ ⊤\nhab : b < a\nhb : 0 < b\n⊢ (a - b) * c = a * c - b * c\n[PROOFSTEP]\nexact (cancel_of_ne <| mul_ne_top hab.ne_top (h hb hab)).tsub_mul\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < c → c < b → a ≠ ⊤\n⊢ a * (b - c) = a * b - a * c\n[PROOFSTEP]\nsimp only [mul_comm a]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < c → c < b → a ≠ ⊤\n⊢ (b - c) * a = b * a - c * a\n[PROOFSTEP]\nexact sub_mul h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\n⊢ ENNReal.toNNReal (∑ a in s, f a) = ∑ a in s, ENNReal.toNNReal (f a)\n[PROOFSTEP]\nrw [← coe_eq_coe, coe_toNNReal, coe_finset_sum, sum_congr rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\n⊢ ∀ (x : α), x ∈ s → f x = ↑(ENNReal.toNNReal (f x))\n[PROOFSTEP]\nintro x hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\nx : α\nhx : x ∈ s\n⊢ f x = ↑(ENNReal.toNNReal (f x))\n[PROOFSTEP]\nexact (coe_toNNReal (hf x hx)).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\n⊢ ∑ a in s, f a ≠ ⊤\n[PROOFSTEP]\nexact (sum_lt_top hf).ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\n⊢ ENNReal.toReal (∑ a in s, f a) = ∑ a in s, ENNReal.toReal (f a)\n[PROOFSTEP]\nrw [ENNReal.toReal, toNNReal_sum hf, NNReal.coe_sum]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ≥0∞\nhf : ∀ (a : α), a ∈ s → f a ≠ ⊤\n⊢ ∑ a in s, ↑(ENNReal.toNNReal (f a)) = ∑ a in s, ENNReal.toReal (f a)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ\nhf : ∀ (i : α), i ∈ s → 0 ≤ f i\n⊢ ENNReal.ofReal (∑ i in s, f i) = ∑ i in s, ENNReal.ofReal (f i)\n[PROOFSTEP]\nsimp_rw [ENNReal.ofReal, ← coe_finset_sum, coe_eq_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ\nhf : ∀ (i : α), i ∈ s → 0 ≤ f i\n⊢ Real.toNNReal (∑ i in s, f i) = ∑ a in s, Real.toNNReal (f a)\n[PROOFSTEP]\nexact Real.toNNReal_sum_of_nonneg hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nhs : Finset.Nonempty s\nf g : α → ℝ≥0∞\nHlt : ∀ (i : α), i ∈ s → f i < g i\n⊢ ∑ i in s, f i < ∑ i in s, g i\n[PROOFSTEP]\ninduction' hs using Finset.Nonempty.cons_induction with a a s as _ IH\n[GOAL]\ncase h₀\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf g : α → ℝ≥0∞\nHlt✝ : ∀ (i : α), i ∈ s → f i < g i\na : α\nHlt : ∀ (i : α), i ∈ {a} → f i < g i\n⊢ ∑ i in {a}, f i < ∑ i in {a}, g i\n[PROOFSTEP]\nsimp [Hlt _ (Finset.mem_singleton_self _)]\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\ns✝ : Finset α\nf g : α → ℝ≥0∞\nHlt✝ : ∀ (i : α), i ∈ s✝ → f i < g i\na : α\ns : Finset α\nas : ¬a ∈ s\nhs✝ : Finset.Nonempty s\nIH : (∀ (i : α), i ∈ s → f i < g i) → ∑ i in s, f i < ∑ i in s, g i\nHlt : ∀ (i : α), i ∈ cons a s as → f i < g i\n⊢ ∑ i in cons a s as, f i < ∑ i in cons a s as, g i\n[PROOFSTEP]\nsimp only [as, Finset.sum_cons, not_false_iff]\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\ns✝ : Finset α\nf g : α → ℝ≥0∞\nHlt✝ : ∀ (i : α), i ∈ s✝ → f i < g i\na : α\ns : Finset α\nas : ¬a ∈ s\nhs✝ : Finset.Nonempty s\nIH : (∀ (i : α), i ∈ s → f i < g i) → ∑ i in s, f i < ∑ i in s, g i\nHlt : ∀ (i : α), i ∈ cons a s as → f i < g i\n⊢ f a + ∑ i in s, f i < g a + ∑ i in s, g i\n[PROOFSTEP]\nexact ENNReal.add_lt_add (Hlt _ (Finset.mem_cons_self _ _)) (IH fun i hi => Hlt _ (Finset.mem_cons.2 <| Or.inr hi))\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nhs : Finset.Nonempty s\nf g : α → ℝ≥0∞\nHle : ∑ i in s, f i ≤ ∑ i in s, g i\n⊢ ∃ i, i ∈ s ∧ f i ≤ g i\n[PROOFSTEP]\ncontrapose! Hle\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nhs : Finset.Nonempty s\nf g : α → ℝ≥0∞\nHle : ∀ (i : α), i ∈ s → g i < f i\n⊢ ∑ i in s, g i < ∑ i in s, f i\n[PROOFSTEP]\napply ENNReal.sum_lt_sum_of_nonempty hs Hle\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a / b = b⁻¹ * a\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ sInf {b | 1 ≤ 0 * b} = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : 0 < a\n⊢ a ∈ {b | 1 ≤ ⊤ * b}\n[PROOFSTEP]\nsimp [*, h.ne', top_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nb : ℝ≥0∞\nhb : 1 ≤ ↑r * b\n⊢ ∀ (p : ℝ≥0), b = ↑p → r⁻¹ ≤ p\n[PROOFSTEP]\nrintro b rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q b : ℝ≥0\nhb : 1 ≤ ↑r * ↑b\n⊢ r⁻¹ ≤ b\n[PROOFSTEP]\napply NNReal.inv_le_of_le_mul\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q b : ℝ≥0\nhb : 1 ≤ ↑r * ↑b\n⊢ 1 ≤ r * b\n[PROOFSTEP]\nrwa [← coe_mul, ← coe_one, coe_le_coe] at hb \n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\n⊢ 1 ≤ ↑r * ↑r⁻¹\n[PROOFSTEP]\nrw [← coe_mul, mul_inv_cancel hr, coe_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ↑2⁻¹ = 2⁻¹\n[PROOFSTEP]\nrw [coe_inv _root_.two_ne_zero, coe_two]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\n⊢ ↑(p / r) = ↑p / ↑r\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, coe_mul, coe_inv hr]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ 0\n⊢ a / 0 = ⊤\n[PROOFSTEP]\nsimp [div_eq_mul_inv, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nsrc✝ : DivInvMonoid ℝ≥0∞ := inferInstanceAs (DivInvMonoid ℝ≥0∞)\n⊢ 1⁻¹ = 1\n[PROOFSTEP]\nsimpa only [coe_inv one_ne_zero, coe_one] using coe_eq_coe.2 inv_one\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx✝ : ℝ≥0∞\n⊢ (x✝ ^ 0)⁻¹ = x✝⁻¹ ^ 0\n[PROOFSTEP]\nsimp only [pow_zero, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ (⊤ ^ (n + 1))⁻¹ = ⊤⁻¹ ^ (n + 1)\n[PROOFSTEP]\nsimp [top_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nn : ℕ\n⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nn : ℕ\n⊢ (↑0 ^ (n + 1))⁻¹ = (↑0)⁻¹ ^ (n + 1)\n[PROOFSTEP]\nsimp [top_pow]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nn : ℕ\nha : a ≠ 0\n⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)\n[PROOFSTEP]\nhave := pow_ne_zero (n + 1) ha\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nn : ℕ\nha : a ≠ 0\nthis : a ^ (n + 1) ≠ 0\n⊢ (↑a ^ (n + 1))⁻¹ = (↑a)⁻¹ ^ (n + 1)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nn : ℕ\nha : a ≠ 0\nthis : a ^ (n + 1) ≠ 0\n⊢ (a ^ (n + 1))⁻¹ = a⁻¹ ^ (n + 1)\n[PROOFSTEP]\nrw [inv_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0 : a ≠ 0\nht : a ≠ ⊤\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nlift a to ℝ≥0 using ht\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : ↑a ≠ 0\n⊢ ↑a * (↑a)⁻¹ = 1\n[PROOFSTEP]\nnorm_cast at h0 \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : ¬a = 0\n⊢ ↑a * (↑a)⁻¹ = 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nh0 : ¬a = 0\n⊢ a * a⁻¹ = 1\n[PROOFSTEP]\nexact mul_inv_cancel h0\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0 : a ≠ 0\nhI : a ≠ ⊤\n⊢ b / a * a = b\n[PROOFSTEP]\nrw [div_eq_mul_inv, mul_assoc, ENNReal.inv_mul_cancel h0 hI, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0 : a ≠ 0\nhI : a ≠ ⊤\n⊢ a * (b / a) = b\n[PROOFSTEP]\nrw [mul_comm, ENNReal.div_mul_cancel h0 hI]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a / b * c = a * (c / b)\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_right_comm, ← mul_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a * b / c = a / c * b\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, mul_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a⁻¹⁻¹ = a\n[PROOFSTEP]\nby_cases a = 0\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a⁻¹⁻¹ = a\n[PROOFSTEP]\nby_cases a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : a = 0\n⊢ a⁻¹⁻¹ = a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : ¬a = 0\n⊢ a⁻¹⁻¹ = a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase pos.none\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : none = 0\n⊢ none⁻¹⁻¹ = none\n[PROOFSTEP]\nsimp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]\n[GOAL]\ncase pos.some\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q val✝ : ℝ≥0\nh : Option.some val✝ = 0\n⊢ (Option.some val✝)⁻¹⁻¹ = Option.some val✝\n[PROOFSTEP]\nsimp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]\n[GOAL]\ncase neg.none\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : ¬none = 0\n⊢ none⁻¹⁻¹ = none\n[PROOFSTEP]\nsimp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]\n[GOAL]\ncase neg.some\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q val✝ : ℝ≥0\nh : ¬Option.some val✝ = 0\n⊢ (Option.some val✝)⁻¹⁻¹ = Option.some val✝\n[PROOFSTEP]\nsimp_all [none_eq_top, some_eq_coe, -coe_inv, (coe_inv _).symm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ ≠ ⊤ ↔ a ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\n⊢ x⁻¹ < ⊤ ↔ 0 < x\n[PROOFSTEP]\nsimp only [lt_top_iff_ne_top, inv_ne_top, pos_iff_ne_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ ≠ 0 ↔ a ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nha : a ≠ 0 ∨ b ≠ ⊤\nhb : a ≠ ⊤ ∨ b ≠ 0\n⊢ (a * b)⁻¹ = a⁻¹ * b⁻¹\n[PROOFSTEP]\ninduction' b using recTopCoe with b\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nha✝ : a ≠ 0 ∨ b ≠ ⊤\nhb✝ : a ≠ ⊤ ∨ b ≠ 0\nha : a ≠ 0 ∨ ⊤ ≠ ⊤\nhb : a ≠ ⊤ ∨ ⊤ ≠ 0\n⊢ (a * ⊤)⁻¹ = a⁻¹ * ⊤⁻¹\n[PROOFSTEP]\nreplace ha : a ≠ 0 := ha.neg_resolve_right rfl\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nha✝ : a ≠ 0 ∨ b ≠ ⊤\nhb✝ : a ≠ ⊤ ∨ b ≠ 0\nhb : a ≠ ⊤ ∨ ⊤ ≠ 0\nha : a ≠ 0\n⊢ (a * ⊤)⁻¹ = a⁻¹ * ⊤⁻¹\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\ncase coe\nα : Type u_1\nβ : Type u_2\na✝ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na b✝ : ℝ≥0∞\nha✝ : a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : a ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha : a ≠ 0 ∨ ↑b ≠ ⊤\nhb : a ≠ ⊤ ∨ ↑b ≠ 0\n⊢ (a * ↑b)⁻¹ = a⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\ninduction' a using recTopCoe with a\n[GOAL]\ncase coe.top\nα : Type u_1\nβ : Type u_2\na✝ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na b✝ : ℝ≥0∞\nha✝² : a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a ≠ ⊤ ∨ ↑b ≠ 0\nha✝ : ⊤ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ⊤ ≠ ⊤ ∨ b✝ ≠ 0\nha : ⊤ ≠ 0 ∨ ↑b ≠ ⊤\nhb : ⊤ ≠ ⊤ ∨ ↑b ≠ 0\n⊢ (⊤ * ↑b)⁻¹ = ⊤⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nreplace hb : b ≠ 0 := coe_ne_zero.1 (hb.neg_resolve_left rfl)\n[GOAL]\ncase coe.top\nα : Type u_1\nβ : Type u_2\na✝ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na b✝ : ℝ≥0∞\nha✝² : a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a ≠ ⊤ ∨ ↑b ≠ 0\nha✝ : ⊤ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ⊤ ≠ ⊤ ∨ b✝ ≠ 0\nha : ⊤ ≠ 0 ∨ ↑b ≠ ⊤\nhb : b ≠ 0\n⊢ (⊤ * ↑b)⁻¹ = ⊤⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nsimp [hb]\n[GOAL]\ncase coe.coe\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\n⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nby_cases h'a : a = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\nh'a : a = 0\n⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nsimp only [h'a, top_mul, ENNReal.inv_zero, ENNReal.coe_ne_top, zero_mul, Ne.def, not_false_iff, ENNReal.coe_zero,\n  ENNReal.inv_eq_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\nh'a : ¬a = 0\n⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nby_cases h'b : b = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\nh'a : ¬a = 0\nh'b : b = 0\n⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nsimp only [h'b, ENNReal.inv_zero, ENNReal.coe_ne_top, mul_top, Ne.def, not_false_iff, mul_zero, ENNReal.coe_zero,\n  ENNReal.inv_eq_zero]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\nh'a : ¬a = 0\nh'b : ¬b = 0\n⊢ (↑a * ↑b)⁻¹ = (↑a)⁻¹ * (↑b)⁻¹\n[PROOFSTEP]\nrw [← ENNReal.coe_mul, ← ENNReal.coe_inv, ← ENNReal.coe_inv h'a, ← ENNReal.coe_inv h'b, ← ENNReal.coe_mul, mul_inv_rev,\n  mul_comm]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\na✝ b✝ : ℝ≥0∞\nha✝² : a✝ ≠ 0 ∨ b✝ ≠ ⊤\nhb✝² : a✝ ≠ ⊤ ∨ b✝ ≠ 0\nb : ℝ≥0\nha✝¹ : a✝ ≠ 0 ∨ ↑b ≠ ⊤\nhb✝¹ : a✝ ≠ ⊤ ∨ ↑b ≠ 0\na : ℝ≥0\nha✝ : ↑a ≠ 0 ∨ b✝ ≠ ⊤\nhb✝ : ↑a ≠ ⊤ ∨ b✝ ≠ 0\nha : ↑a ≠ 0 ∨ ↑b ≠ ⊤\nhb : ↑a ≠ ⊤ ∨ ↑b ≠ 0\nh'a : ¬a = 0\nh'b : ¬b = 0\n⊢ a * b ≠ 0\n[PROOFSTEP]\nsimp [h'a, h'b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhc : c ≠ 0\nhc' : c ≠ ⊤\n⊢ c * a / (c * b) = a / b\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ENNReal.mul_inv (Or.inl hc) (Or.inl hc'), mul_mul_mul_comm,\n  ENNReal.mul_inv_cancel hc hc', one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhc : c ≠ 0\nhc' : c ≠ ⊤\n⊢ a * c / (b * c) = a / b\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ENNReal.mul_inv (Or.inr hc') (Or.inr hc), mul_mul_mul_comm,\n  ENNReal.mul_inv_cancel hc hc', mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ 0\n⊢ (a - b) / c = a / c - b / c\n[PROOFSTEP]\nsimp_rw [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ 0\n⊢ (a - b) * c⁻¹ = a * c⁻¹ - b * c⁻¹\n[PROOFSTEP]\nexact ENNReal.sub_mul (by simpa using h)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : 0 < b → b < a → c ≠ 0\n⊢ 0 < b → b < a → c⁻¹ ≠ ⊤\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ StrictAnti Inv.inv\n[PROOFSTEP]\nintro a b h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : a < b\n⊢ b⁻¹ < a⁻¹\n[PROOFSTEP]\nlift a to ℝ≥0 using h.ne_top\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nb : ℝ≥0∞\na : ℝ≥0\nh : ↑a < b\n⊢ b⁻¹ < (↑a)⁻¹\n[PROOFSTEP]\ninduction b using recTopCoe\n[GOAL]\ncase intro.top\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nh : ↑a < ⊤\n⊢ ⊤⁻¹ < (↑a)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.coe\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a x✝ : ℝ≥0\nh : ↑a < ↑x✝\n⊢ (↑x✝)⁻¹ < (↑a)⁻¹\n[PROOFSTEP]\nrw [coe_lt_coe] at h \n[GOAL]\ncase intro.coe\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a x✝ : ℝ≥0\nh : a < x✝\n⊢ (↑x✝)⁻¹ < (↑a)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase intro.coe.inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x✝ : ℝ≥0\nh : 0 < x✝\n⊢ (↑x✝)⁻¹ < (↑0)⁻¹\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase intro.coe.inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a x✝ : ℝ≥0\nh : a < x✝\nha : a ≠ 0\n⊢ (↑x✝)⁻¹ < (↑a)⁻¹\n[PROOFSTEP]\nrw [← coe_inv h.ne_bot, ← coe_inv ha, coe_lt_coe]\n[GOAL]\ncase intro.coe.inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a x✝ : ℝ≥0\nh : a < x✝\nha : a ≠ 0\n⊢ x✝⁻¹ < a⁻¹\n[PROOFSTEP]\nexact NNReal.inv_lt_inv ha h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ < b ↔ b⁻¹ < a\n[PROOFSTEP]\nsimpa only [inv_inv] using @ENNReal.inv_lt_inv a b⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a < b⁻¹ ↔ b < a⁻¹\n[PROOFSTEP]\nsimpa only [inv_inv] using @ENNReal.inv_lt_inv a⁻¹ b\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ ≤ b ↔ b⁻¹ ≤ a\n[PROOFSTEP]\nsimpa only [inv_inv] using @ENNReal.inv_le_inv a b⁻¹\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ≤ b⁻¹ ↔ b ≤ a⁻¹\n[PROOFSTEP]\nsimpa only [inv_inv] using @ENNReal.inv_le_inv a⁻¹ b\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ ≤ 1 ↔ 1 ≤ a\n[PROOFSTEP]\nrw [inv_le_iff_inv_le, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 1 ≤ a⁻¹ ↔ a ≤ 1\n[PROOFSTEP]\nrw [le_inv_iff_le_inv, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a⁻¹ < 1 ↔ 1 < a\n[PROOFSTEP]\nrw [inv_lt_iff_inv_lt, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 1 < a⁻¹ ↔ a < 1\n[PROOFSTEP]\nrw [lt_inv_iff_lt_inv, inv_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a / ⊤ = 0\n[PROOFSTEP]\nrw [div_eq_mul_inv, inv_top, mul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ⊤ / a = if a = ⊤ then 0 else ⊤\n[PROOFSTEP]\nsimp [div_eq_mul_inv, top_mul']\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤\n⊢ ⊤ / a = ⊤\n[PROOFSTEP]\nsimp [top_div, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a / b = ⊤ ↔ a ≠ 0 ∧ b = 0 ∨ a = ⊤ ∧ b ≠ ⊤\n[PROOFSTEP]\nsimp [div_eq_mul_inv, ENNReal.mul_eq_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0 : b ≠ 0 ∨ c ≠ 0\nht : b ≠ ⊤ ∨ c ≠ ⊤\n⊢ a ≤ c / b ↔ a * b ≤ c\n[PROOFSTEP]\ninduction' b using recTopCoe with b\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b ≠ 0 ∨ c ≠ 0\nht✝ : b ≠ ⊤ ∨ c ≠ ⊤\nh0 : ⊤ ≠ 0 ∨ c ≠ 0\nht : ⊤ ≠ ⊤ ∨ c ≠ ⊤\n⊢ a ≤ c / ⊤ ↔ a * ⊤ ≤ c\n[PROOFSTEP]\nlift c to ℝ≥0 using ht.neg_resolve_left rfl\n[GOAL]\ncase top.intro\nα : Type u_1\nβ : Type u_2\na b d : ℝ≥0∞\nr p q c : ℝ≥0\nh0✝ : b ≠ 0 ∨ ↑c ≠ 0\nht✝ : b ≠ ⊤ ∨ ↑c ≠ ⊤\nh0 : ⊤ ≠ 0 ∨ ↑c ≠ 0\nht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤\n⊢ a ≤ ↑c / ⊤ ↔ a * ⊤ ≤ ↑c\n[PROOFSTEP]\nrw [div_top, nonpos_iff_eq_zero]\n[GOAL]\ncase top.intro\nα : Type u_1\nβ : Type u_2\na b d : ℝ≥0∞\nr p q c : ℝ≥0\nh0✝ : b ≠ 0 ∨ ↑c ≠ 0\nht✝ : b ≠ ⊤ ∨ ↑c ≠ ⊤\nh0 : ⊤ ≠ 0 ∨ ↑c ≠ 0\nht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤\n⊢ a = 0 ↔ a * ⊤ ≤ ↑c\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase top.intro.inl\nα : Type u_1\nβ : Type u_2\nb d : ℝ≥0∞\nr p q c : ℝ≥0\nh0✝ : b ≠ 0 ∨ ↑c ≠ 0\nht✝ : b ≠ ⊤ ∨ ↑c ≠ ⊤\nh0 : ⊤ ≠ 0 ∨ ↑c ≠ 0\nht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤\n⊢ 0 = 0 ↔ 0 * ⊤ ≤ ↑c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase top.intro.inr\nα : Type u_1\nβ : Type u_2\na b d : ℝ≥0∞\nr p q c : ℝ≥0\nh0✝ : b ≠ 0 ∨ ↑c ≠ 0\nht✝ : b ≠ ⊤ ∨ ↑c ≠ ⊤\nh0 : ⊤ ≠ 0 ∨ ↑c ≠ 0\nht : ⊤ ≠ ⊤ ∨ ↑c ≠ ⊤\nha : a ≠ 0\n⊢ a = 0 ↔ a * ⊤ ≤ ↑c\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase coe\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b✝ ≠ 0 ∨ c ≠ 0\nht✝ : b✝ ≠ ⊤ ∨ c ≠ ⊤\nb : ℝ≥0\nh0 : ↑b ≠ 0 ∨ c ≠ 0\nht : ↑b ≠ ⊤ ∨ c ≠ ⊤\n⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c\n[PROOFSTEP]\nrcases eq_or_ne b 0 with (rfl | hb)\n[GOAL]\ncase coe.inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b ≠ 0 ∨ c ≠ 0\nht✝ : b ≠ ⊤ ∨ c ≠ ⊤\nh0 : ↑0 ≠ 0 ∨ c ≠ 0\nht : ↑0 ≠ ⊤ ∨ c ≠ ⊤\n⊢ a ≤ c / ↑0 ↔ a * ↑0 ≤ c\n[PROOFSTEP]\nhave hc : c ≠ 0 := h0.neg_resolve_left rfl\n[GOAL]\ncase coe.inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b ≠ 0 ∨ c ≠ 0\nht✝ : b ≠ ⊤ ∨ c ≠ ⊤\nh0 : ↑0 ≠ 0 ∨ c ≠ 0\nht : ↑0 ≠ ⊤ ∨ c ≠ ⊤\nhc : c ≠ 0\n⊢ a ≤ c / ↑0 ↔ a * ↑0 ≤ c\n[PROOFSTEP]\nsimp [div_zero hc]\n[GOAL]\ncase coe.inr\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b✝ ≠ 0 ∨ c ≠ 0\nht✝ : b✝ ≠ ⊤ ∨ c ≠ ⊤\nb : ℝ≥0\nh0 : ↑b ≠ 0 ∨ c ≠ 0\nht : ↑b ≠ ⊤ ∨ c ≠ ⊤\nhb : b ≠ 0\n⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c\n[PROOFSTEP]\nrw [← coe_ne_zero] at hb \n[GOAL]\ncase coe.inr\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nh0✝ : b✝ ≠ 0 ∨ c ≠ 0\nht✝ : b✝ ≠ ⊤ ∨ c ≠ ⊤\nb : ℝ≥0\nh0 : ↑b ≠ 0 ∨ c ≠ 0\nht : ↑b ≠ ⊤ ∨ c ≠ ⊤\nhb : ↑b ≠ 0\n⊢ a ≤ c / ↑b ↔ a * ↑b ≤ c\n[PROOFSTEP]\nrw [← ENNReal.mul_le_mul_right hb coe_ne_top, ENNReal.div_mul_cancel hb coe_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb0 : b ≠ 0 ∨ c ≠ ⊤\nhbt : b ≠ ⊤ ∨ c ≠ 0\n⊢ a / b ≤ c ↔ a ≤ c * b\n[PROOFSTEP]\nsuffices a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹ by simpa [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb0 : b ≠ 0 ∨ c ≠ ⊤\nhbt : b ≠ ⊤ ∨ c ≠ 0\nthis : a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹\n⊢ a / b ≤ c ↔ a ≤ c * b\n[PROOFSTEP]\nsimpa [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb0 : b ≠ 0 ∨ c ≠ ⊤\nhbt : b ≠ ⊤ ∨ c ≠ 0\n⊢ a * b⁻¹ ≤ c ↔ a ≤ c / b⁻¹\n[PROOFSTEP]\nrefine' (ENNReal.le_div_iff_mul_le _ _).symm\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb0 : b ≠ 0 ∨ c ≠ ⊤\nhbt : b ≠ ⊤ ∨ c ≠ 0\n⊢ b⁻¹ ≠ 0 ∨ c ≠ 0\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb0 : b ≠ 0 ∨ c ≠ ⊤\nhbt : b ≠ ⊤ ∨ c ≠ 0\n⊢ b⁻¹ ≠ ⊤ ∨ c ≠ ⊤\n[PROOFSTEP]\nsimpa\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\n⊢ a / c ≤ b\n[PROOFSTEP]\nby_cases h0 : c = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : c = 0\n⊢ a / c ≤ b\n[PROOFSTEP]\nhave : a = 0 := by simpa [h0] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : c = 0\n⊢ a = 0\n[PROOFSTEP]\nsimpa [h0] using h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : c = 0\nthis : a = 0\n⊢ a / c ≤ b\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : ¬c = 0\n⊢ a / c ≤ b\n[PROOFSTEP]\nby_cases hinf : c = ∞\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : ¬c = 0\nhinf : c = ⊤\n⊢ a / c ≤ b\n[PROOFSTEP]\nsimp [hinf]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b * c\nh0 : ¬c = 0\nhinf : ¬c = ⊤\n⊢ a / c ≤ b\n[PROOFSTEP]\nexact (ENNReal.div_le_iff_le_mul (Or.inl h0) (Or.inl hinf)).2 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ≤ 1 * a\n[PROOFSTEP]\nrw [one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b / c\n⊢ a * c ≤ b\n[PROOFSTEP]\nrw [← inv_inv c]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b / c\n⊢ a * c⁻¹⁻¹ ≤ b\n[PROOFSTEP]\nexact div_le_of_le_mul h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a < b / c\n⊢ a * c < b\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : b ≤ a * c\n⊢ b / c ≤ a\n[PROOFSTEP]\nexact ENNReal.div_le_of_le_mul h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a < b * c\n⊢ a < b / c⁻¹\n[PROOFSTEP]\nrwa [div_eq_mul_inv, inv_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a < b * c\n⊢ a < c * b\n[PROOFSTEP]\nrwa [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh₁ : b = ⊤ → a ≠ 0\nh₂ : a = ⊤ → b ≠ 0\n⊢ a⁻¹ ≤ b ↔ 1 ≤ a * b\n[PROOFSTEP]\nrw [← one_div, ENNReal.div_le_iff_le_mul, mul_comm]\n[GOAL]\ncase hb0\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh₁ : b = ⊤ → a ≠ 0\nh₂ : a = ⊤ → b ≠ 0\n⊢ a ≠ 0 ∨ b ≠ ⊤\ncase hbt α : Type u_1 β : Type u_2 a b c d : ℝ≥0∞ r p q : ℝ≥0 h₁ : b = ⊤ → a ≠ 0 h₂ : a = ⊤ → b ≠ 0 ⊢ a ≠ ⊤ ∨ b ≠ 0\n[PROOFSTEP]\nexacts [or_not_of_imp h₁, not_or_of_imp h₂]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a ≤ b⁻¹ ↔ a * b ≤ 1\n[PROOFSTEP]\nrw [← one_div, ENNReal.le_div_iff_mul_le]\n[GOAL]\ncase h0\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ b ≠ 0 ∨ 1 ≠ 0\n[PROOFSTEP]\nright\n[GOAL]\ncase h0.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 1 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase ht\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ b ≠ ⊤ ∨ 1 ≠ ⊤\n[PROOFSTEP]\nright\n[GOAL]\ncase ht.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 1 ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a * b = 1\n⊢ a = b⁻¹\n[PROOFSTEP]\nrw [← mul_one a, ← ENNReal.mul_inv_cancel (right_ne_zero_of_mul_eq_one h), ← mul_assoc, h, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a * b = 1\n⊢ b ≠ ⊤\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a * ⊤ = 1\n⊢ False\n[PROOFSTEP]\nsimp [left_ne_zero_of_mul_eq_one h] at h \n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr✝ p q : ℝ≥0\na b r : ℝ≥0∞\nhr₀ : r ≠ 0\nhr₁ : r ≠ ⊤\n⊢ r * a ≤ b ↔ a ≤ r⁻¹ * b\n[PROOFSTEP]\nrw [← @ENNReal.mul_le_mul_left _ a _ hr₀ hr₁, ← mul_assoc, ENNReal.mul_inv_cancel hr₀ hr₁, one_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr✝ p q : ℝ≥0\na b : ℝ≥0∞\nr : ℝ≥0\nhr₀ : r ≠ 0\n⊢ a ≤ r⁻¹ • b ↔ r • a ≤ b\n[PROOFSTEP]\nsimpa [hr₀, ENNReal.smul_def] using (mul_le_iff_le_inv (coe_ne_zero.mpr hr₀) coe_ne_top).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr✝ p q : ℝ≥0\na b : ℝ≥0∞\nr : ℝ≥0\nhr₀ : r ≠ 0\n⊢ r⁻¹ • a ≤ b ↔ a ≤ r • b\n[PROOFSTEP]\nsimpa only [inv_inv] using (ENNReal.le_inv_smul_iff (inv_ne_zero hr₀)).symm\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nh : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y\n⊢ x ≤ y\n[PROOFSTEP]\nrefine' le_of_forall_ge_of_dense fun r hr => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nx y : ℝ≥0∞\nh : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y\nr : ℝ≥0∞\nhr : r < x\n⊢ r ≤ y\n[PROOFSTEP]\nlift r to ℝ≥0 using ne_top_of_lt hr\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q : ℝ≥0\nx y : ℝ≥0∞\nh : ∀ (r : ℝ≥0), ↑r < x → ↑r ≤ y\nr : ℝ≥0\nhr : ↑r < x\n⊢ ↑r ≤ y\n[PROOFSTEP]\nexact h r hr\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nh : b = c / a\n⊢ a * b = c\n[PROOFSTEP]\nrw [h, ENNReal.mul_div_cancel' ha ha']\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nh : a * b = c\n⊢ b = c / a\n[PROOFSTEP]\nrw [← h, mul_div_assoc, ENNReal.mul_div_cancel' ha ha']\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n⊢ c / b = d / a ↔ a * c = b * d\n[PROOFSTEP]\nrw [eq_div_iff ha ha']\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n⊢ a * (c / b) = d ↔ a * c = b * d\n[PROOFSTEP]\nconv_rhs => rw [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n| a * c = b * d\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n| a * c = b * d\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n| a * c = b * d\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nha' : a ≠ ⊤\nhb : b ≠ 0\nhb' : b ≠ ⊤\n⊢ a * (c / b) = d ↔ b * d = a * c\n[PROOFSTEP]\nrw [← eq_div_iff hb hb', mul_div_assoc, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhb₀ : b ≠ 0\nhb₁ : b ≠ ⊤\nh : a / b = 1\n⊢ a = b\n[PROOFSTEP]\nrw [← (eq_div_iff hb₀ hb₁).mp h.symm, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 2⁻¹ + 2⁻¹ = 1\n[PROOFSTEP]\nrw [← two_mul, ← div_eq_mul_inv, ENNReal.div_self two_ne_zero two_ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 3⁻¹ + 3⁻¹ + 3⁻¹ = 3 * 3⁻¹\n[PROOFSTEP]\nring\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 3 ≠ 0\n[PROOFSTEP]\ndecide\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a / 2 + a / 2 = a\n[PROOFSTEP]\nrw [div_eq_mul_inv, ← mul_add, inv_two_add_inv_two, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ a / 3 + a / 3 + a / 3 = a\n[PROOFSTEP]\nrw [div_eq_mul_inv, ← mul_add, ← mul_add, inv_three_add_inv_three, mul_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ a / b = 0 ↔ a = 0 ∨ b = ⊤\n[PROOFSTEP]\nsimp [div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 0 < a / b ↔ a ≠ 0 ∧ b ≠ ⊤\n[PROOFSTEP]\nsimp [pos_iff_ne_zero, not_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ 0\n⊢ 0 < a / 2\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhz : a ≠ 0\nht : a ≠ ⊤\n⊢ a / 2 < a\n[PROOFSTEP]\nlift a to ℝ≥0 using ht\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nhz : ↑a ≠ 0\n⊢ ↑a / 2 < ↑a\n[PROOFSTEP]\nrw [coe_ne_zero] at hz \n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nhz : a ≠ 0\n⊢ ↑a / 2 < ↑a\n[PROOFSTEP]\nrw [← coe_two, ← coe_div, coe_lt_coe]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\nhz : a ≠ 0\n⊢ a / 2 < a\ncase intro α : Type u_1 β : Type u_2 b c d : ℝ≥0∞ r p q a : ℝ≥0 hz : a ≠ 0 ⊢ 2 ≠ 0\n[PROOFSTEP]\nexacts [NNReal.half_lt_self hz, two_ne_zero' _]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≠ ⊤\n⊢ a - a / 2 = a / 2\n[PROOFSTEP]\nlift a to ℝ≥0 using h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\n⊢ ↑a - ↑a / 2 = ↑a / 2\n[PROOFSTEP]\nexact sub_eq_of_add_eq (mul_ne_top coe_ne_top <| by simp) (ENNReal.add_halves a)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q a : ℝ≥0\n⊢ 2⁻¹ ≠ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 1 - 2⁻¹ = 2⁻¹\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv, one_mul] using sub_half one_ne_top\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ℝ≥0∞ ≃o ↑(Iic 1)\n[PROOFSTEP]\nrefine\n  StrictMono.orderIsoOfRightInverse (fun x => ⟨(x⁻¹ + 1)⁻¹, ENNReal.inv_le_one.2 <| le_add_self⟩) (fun x y hxy => ?_)\n    (fun x => (x.1⁻¹ - 1)⁻¹) fun x => Subtype.ext ?_\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nhxy : x < y\n⊢ (fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) x <\n    (fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) y\n[PROOFSTEP]\nsimpa only [Subtype.mk_lt_mk, ENNReal.inv_lt_inv, ENNReal.add_lt_add_iff_right one_ne_top]\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ↑(Iic 1)\n⊢ ↑((fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) ((fun x => ((↑x)⁻¹ - 1)⁻¹) x)) = ↑x\n[PROOFSTEP]\nhave : (1 : ℝ≥0∞) ≤ x.1⁻¹ := ENNReal.one_le_inv.2 x.2\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ↑(Iic 1)\nthis : 1 ≤ (↑x)⁻¹\n⊢ ↑((fun x => { val := (x⁻¹ + 1)⁻¹, property := (_ : (x⁻¹ + 1)⁻¹ ≤ 1) }) ((fun x => ((↑x)⁻¹ - 1)⁻¹) x)) = ↑x\n[PROOFSTEP]\nsimp only [inv_inv, Subtype.coe_mk, tsub_add_cancel_of_le this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nx✝¹ x✝ : ↑(Iic a)\n⊢ ↑{ toFun := fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) },\n            invFun := fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Iic a)),\n                  (fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) })\n                      ((fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) }) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : ↑(Iic ↑a)),\n                  (fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) })\n                      ((fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) }) x) =\n                    x) }\n        x✝¹ ≤\n      ↑{ toFun := fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) },\n            invFun := fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Iic a)),\n                  (fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) })\n                      ((fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) }) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : ↑(Iic ↑a)),\n                  (fun x => { val := ↑↑x, property := (_ : ↑↑x ≤ ↑a) })\n                      ((fun x => { val := ENNReal.toNNReal ↑x, property := (_ : ENNReal.toNNReal ↑x ≤ a) }) x) =\n                    x) }\n        x✝ ↔\n    x✝¹ ≤ x✝\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, coe_le_coe, Subtype.coe_le_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nh : a ≠ 0\n⊢ ∃ n, (↑n)⁻¹ < a⁻¹⁻¹\n[PROOFSTEP]\nsimp only [ENNReal.inv_lt_inv, ENNReal.exists_nat_gt (inv_ne_top.2 h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nhb : b ≠ ⊤\nn : ℕ\nhn : b / a < ↑n\n⊢ b < ↑n * a\n[PROOFSTEP]\nrwa [← ENNReal.div_lt_iff (Or.inl ha) (Or.inr hb)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\n⊢ ∃ n, n > 0 ∧ (↑n)⁻¹ * a < b\n[PROOFSTEP]\nrcases exists_nat_pos_mul_gt hb ha with ⟨n, npos, hn⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\nn : ℕ\nnpos : n > 0\nhn : a < ↑n * b\n⊢ ∃ n, n > 0 ∧ (↑n)⁻¹ * a < b\n[PROOFSTEP]\nuse n, npos\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\nn : ℕ\nnpos : n > 0\nhn : a < ↑n * b\n⊢ (↑n)⁻¹ * a < b\n[PROOFSTEP]\nrw [← ENNReal.div_eq_inv_mul]\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\nn : ℕ\nnpos : n > 0\nhn : a < ↑n * b\n⊢ a / ↑n < b\n[PROOFSTEP]\nexact div_lt_of_lt_mul' hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\n⊢ ∃ n, n > 0 ∧ ↑n * a < b\n[PROOFSTEP]\nrcases exists_nat_pos_inv_mul_lt ha hb with ⟨n, npos : 0 < n, hn⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : (↑n)⁻¹ * a < b\n⊢ ∃ n, n > 0 ∧ ↑n * a < b\n[PROOFSTEP]\nuse(n : ℝ≥0)⁻¹\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ 0\nn : ℕ\nnpos : 0 < n\nhn : (↑n)⁻¹ * a < b\n⊢ (↑n)⁻¹ > 0 ∧ ↑(↑n)⁻¹ * a < b\n[PROOFSTEP]\nsimp [*, npos.ne', zero_lt_one]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\n⊢ ∃ n, 2⁻¹ ^ n < a\n[PROOFSTEP]\nrcases exists_inv_nat_lt ha with ⟨n, hn⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nn : ℕ\nhn : (↑n)⁻¹ < a\n⊢ ∃ n, 2⁻¹ ^ n < a\n[PROOFSTEP]\nrefine' ⟨n, lt_trans _ hn⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nn : ℕ\nhn : (↑n)⁻¹ < a\n⊢ 2⁻¹ ^ n < (↑n)⁻¹\n[PROOFSTEP]\nrw [← ENNReal.inv_pow, ENNReal.inv_lt_inv]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nn : ℕ\nhn : (↑n)⁻¹ < a\n⊢ ↑n < 2 ^ n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nn : ℕ\nhn : (↑n)⁻¹ < a\n⊢ n < 2 ^ n\n[PROOFSTEP]\nexact n.lt_two_pow\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\nn : ℤ\n⊢ ↑(r ^ n) = ↑r ^ n\n[PROOFSTEP]\ncases' n with n n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\nn : ℕ\n⊢ ↑(r ^ Int.ofNat n) = ↑r ^ Int.ofNat n\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, coe_pow, zpow_ofNat]\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\nn : ℕ\n⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n\n[PROOFSTEP]\nhave : r ^ n.succ ≠ 0 := pow_ne_zero (n + 1) hr\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : r ≠ 0\nn : ℕ\nthis : r ^ Nat.succ n ≠ 0\n⊢ ↑(r ^ Int.negSucc n) = ↑r ^ Int.negSucc n\n[PROOFSTEP]\nsimp only [zpow_negSucc, coe_inv this, coe_pow]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\nn : ℤ\n⊢ 0 < a ^ n\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\na✝ : ℕ\n⊢ 0 < a ^ Int.ofNat a✝\n[PROOFSTEP]\nexact ENNReal.pow_pos ha.bot_lt _\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\na✝ : ℕ\n⊢ 0 < a ^ Int.negSucc a✝\n[PROOFSTEP]\nsimp only [h'a, pow_eq_top_iff, zpow_negSucc, Ne.def, not_false, ENNReal.inv_pos, false_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\nn : ℤ\n⊢ a ^ n < ⊤\n[PROOFSTEP]\ncases n\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\na✝ : ℕ\n⊢ a ^ Int.ofNat a✝ < ⊤\n[PROOFSTEP]\nexact ENNReal.pow_lt_top h'a.lt_top _\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ 0\nh'a : a ≠ ⊤\na✝ : ℕ\n⊢ a ^ Int.negSucc a✝ < ⊤\n[PROOFSTEP]\nsimp only [ENNReal.pow_pos ha.bot_lt, zpow_negSucc, inv_lt_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nhx : x ≠ 0\nh'x : x ≠ ⊤\nhy : 1 < y\nh'y : y ≠ ⊤\n⊢ ∃ n, x ∈ Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nlift x to ℝ≥0 using h'x\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0\nhx : ↑x ≠ 0\n⊢ ∃ n, ↑x ∈ Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nlift y to ℝ≥0 using h'y\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\n⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nhave A : y ≠ 0 := by simpa only [Ne.def, coe_eq_zero] using (zero_lt_one.trans hy).ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\n⊢ y ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, coe_eq_zero] using (zero_lt_one.trans hy).ne'\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nobtain ⟨n, hn, h'n⟩ : ∃ n : ℤ, y ^ n ≤ x ∧ x < y ^ (n + 1) :=\n  by\n  refine' NNReal.exists_mem_Ico_zpow _ (one_lt_coe_iff.1 hy)\n  simpa only [Ne.def, coe_eq_zero] using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ ∃ n, y ^ n ≤ x ∧ x < y ^ (n + 1)\n[PROOFSTEP]\nrefine' NNReal.exists_mem_Ico_zpow _ (one_lt_coe_iff.1 hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, coe_eq_zero] using hx\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ ∃ n, ↑x ∈ Ico (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nrefine' ⟨n, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ ↑y ^ n ≤ ↑x\n[PROOFSTEP]\nrwa [← ENNReal.coe_zpow A, ENNReal.coe_le_coe]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ ↑x < ↑y ^ (n + 1)\n[PROOFSTEP]\nrwa [← ENNReal.coe_zpow A, ENNReal.coe_lt_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ≥0∞\nhx : x ≠ 0\nh'x : x ≠ ⊤\nhy : 1 < y\nh'y : y ≠ ⊤\n⊢ ∃ n, x ∈ Ioc (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nlift x to ℝ≥0 using h'x\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0\nhx : ↑x ≠ 0\n⊢ ∃ n, ↑x ∈ Ioc (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nlift y to ℝ≥0 using h'y\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\n⊢ ∃ n, ↑x ∈ Ioc (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nhave A : y ≠ 0 := by simpa only [Ne.def, coe_eq_zero] using (zero_lt_one.trans hy).ne'\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\n⊢ y ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, coe_eq_zero] using (zero_lt_one.trans hy).ne'\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ ∃ n, ↑x ∈ Ioc (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nobtain ⟨n, hn, h'n⟩ : ∃ n : ℤ, y ^ n < x ∧ x ≤ y ^ (n + 1) :=\n  by\n  refine' NNReal.exists_mem_Ioc_zpow _ (one_lt_coe_iff.1 hy)\n  simpa only [Ne.def, coe_eq_zero] using hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ ∃ n, y ^ n < x ∧ x ≤ y ^ (n + 1)\n[PROOFSTEP]\nrefine' NNReal.exists_mem_Ioc_zpow _ (one_lt_coe_iff.1 hy)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, coe_eq_zero] using hx\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n < x\nh'n : x ≤ y ^ (n + 1)\n⊢ ∃ n, ↑x ∈ Ioc (↑y ^ n) (↑y ^ (n + 1))\n[PROOFSTEP]\nrefine' ⟨n, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n < x\nh'n : x ≤ y ^ (n + 1)\n⊢ ↑y ^ n < ↑x\n[PROOFSTEP]\nrwa [← ENNReal.coe_zpow A, ENNReal.coe_lt_coe]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x : ℝ≥0\nhx : ↑x ≠ 0\ny : ℝ≥0\nhy : 1 < ↑y\nA : y ≠ 0\nn : ℤ\nhn : y ^ n < x\nh'n : x ≤ y ^ (n + 1)\n⊢ ↑x ≤ ↑y ^ (n + 1)\n[PROOFSTEP]\nrwa [← ENNReal.coe_zpow A, ENNReal.coe_le_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\n⊢ Ioo 0 ⊤ = ⋃ (n : ℤ), Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\n⊢ x ∈ Ioo 0 ⊤ ↔ x ∈ ⋃ (n : ℤ), Ico (y ^ n) (y ^ (n + 1))\n[PROOFSTEP]\nsimp only [mem_iUnion, mem_Ioo, mem_Ico]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\n⊢ 0 < x ∧ x < ⊤ ↔ ∃ i, y ^ i ≤ x ∧ x < y ^ (i + 1)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\n⊢ 0 < x ∧ x < ⊤ → ∃ i, y ^ i ≤ x ∧ x < y ^ (i + 1)\n[PROOFSTEP]\nrintro ⟨hx, h'x⟩\n[GOAL]\ncase h.mp.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nhx : 0 < x\nh'x : x < ⊤\n⊢ ∃ i, y ^ i ≤ x ∧ x < y ^ (i + 1)\n[PROOFSTEP]\nexact exists_mem_Ico_zpow hx.ne' h'x.ne hy h'y\n[GOAL]\ncase h.mpr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\n⊢ (∃ i, y ^ i ≤ x ∧ x < y ^ (i + 1)) → 0 < x ∧ x < ⊤\n[PROOFSTEP]\nrintro ⟨n, hn, h'n⟩\n[GOAL]\ncase h.mpr.intro.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ 0 < x ∧ x < ⊤\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mpr.intro.intro.left\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ 0 < x\n[PROOFSTEP]\napply lt_of_lt_of_le _ hn\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ 0 < y ^ n\n[PROOFSTEP]\nexact ENNReal.zpow_pos (zero_lt_one.trans hy).ne' h'y _\n[GOAL]\ncase h.mpr.intro.intro.right\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ x < ⊤\n[PROOFSTEP]\napply lt_trans h'n _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ny : ℝ≥0∞\nhy : 1 < y\nh'y : y ≠ ⊤\nx : ℝ≥0∞\nn : ℤ\nhn : y ^ n ≤ x\nh'n : x < y ^ (n + 1)\n⊢ y ^ (n + 1) < ⊤\n[PROOFSTEP]\nexact ENNReal.zpow_lt_top (zero_lt_one.trans hy).ne' h'y _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na b : ℤ\nh : a ≤ b\n⊢ x ^ a ≤ x ^ b\n[PROOFSTEP]\ninduction' a with a a\n[GOAL]\ncase ofNat\nα : Type u_1\nβ : Type u_2\na✝¹ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b : ℤ\nh✝ : a✝ ≤ b\na : ℕ\nh : Int.ofNat a ≤ b\n⊢ x ^ Int.ofNat a ≤ x ^ b\n[PROOFSTEP]\ninduction' b with b b\n[GOAL]\ncase negSucc\nα : Type u_1\nβ : Type u_2\na✝¹ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b : ℤ\nh✝ : a✝ ≤ b\na : ℕ\nh : Int.negSucc a ≤ b\n⊢ x ^ Int.negSucc a ≤ x ^ b\n[PROOFSTEP]\ninduction' b with b b\n[GOAL]\ncase ofNat.ofNat\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.ofNat a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.ofNat a ≤ Int.ofNat b\n⊢ x ^ Int.ofNat a ≤ x ^ Int.ofNat b\n[PROOFSTEP]\nsimp only [Int.ofNat_eq_coe, zpow_ofNat]\n[GOAL]\ncase ofNat.ofNat\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.ofNat a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.ofNat a ≤ Int.ofNat b\n⊢ x ^ a ≤ x ^ b\n[PROOFSTEP]\nexact pow_le_pow hx (Int.le_of_ofNat_le_ofNat h)\n[GOAL]\ncase ofNat.negSucc\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.ofNat a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.negSucc b\nh : Int.ofNat a ≤ Int.negSucc b\n⊢ x ^ Int.ofNat a ≤ x ^ Int.negSucc b\n[PROOFSTEP]\napply absurd h (not_le_of_gt _)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.ofNat a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.negSucc b\nh : Int.ofNat a ≤ Int.negSucc b\n⊢ Int.ofNat a > Int.negSucc b\n[PROOFSTEP]\nexact lt_of_lt_of_le (Int.negSucc_lt_zero _) (Int.ofNat_nonneg _)\n[GOAL]\ncase negSucc.ofNat\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.negSucc a ≤ Int.ofNat b\n⊢ x ^ Int.negSucc a ≤ x ^ Int.ofNat b\n[PROOFSTEP]\nsimp only [zpow_negSucc, Int.ofNat_eq_coe, zpow_ofNat]\n[GOAL]\ncase negSucc.ofNat\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.negSucc a ≤ Int.ofNat b\n⊢ (x ^ (a + 1))⁻¹ ≤ x ^ b\n[PROOFSTEP]\nrefine' (ENNReal.inv_le_one.2 _).trans _\n[GOAL]\ncase negSucc.ofNat.refine'_1\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.negSucc a ≤ Int.ofNat b\n⊢ 1 ≤ x ^ (a + 1)\n[PROOFSTEP]\nexact one_le_pow_of_one_le' hx _\n[GOAL]\ncase negSucc.ofNat.refine'_2\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.ofNat b\nh : Int.negSucc a ≤ Int.ofNat b\n⊢ 1 ≤ x ^ b\n[PROOFSTEP]\nexact one_le_pow_of_one_le' hx _\n[GOAL]\ncase negSucc.negSucc\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.negSucc b\nh : Int.negSucc a ≤ Int.negSucc b\n⊢ x ^ Int.negSucc a ≤ x ^ Int.negSucc b\n[PROOFSTEP]\nsimp only [zpow_negSucc, ENNReal.inv_le_inv]\n[GOAL]\ncase negSucc.negSucc\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.negSucc b\nh : Int.negSucc a ≤ Int.negSucc b\n⊢ x ^ (b + 1) ≤ x ^ (a + 1)\n[PROOFSTEP]\napply pow_le_pow hx\n[GOAL]\ncase negSucc.negSucc\nα : Type u_1\nβ : Type u_2\na✝¹ b✝¹ c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : 1 ≤ x\na✝ b✝ : ℤ\nh✝² : a✝ ≤ b✝\na : ℕ\nh✝¹ : Int.negSucc a ≤ b✝\nb : ℕ\nh✝ : a✝ ≤ Int.negSucc b\nh : Int.negSucc a ≤ Int.negSucc b\n⊢ b + 1 ≤ a + 1\n[PROOFSTEP]\nsimpa only [← Int.ofNat_le, neg_le_neg_iff, Int.ofNat_add, Int.ofNat_one, Int.negSucc_eq] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ≥0∞\nhx : x ≠ 0\nh'x : x ≠ ⊤\nm n : ℤ\n⊢ x ^ (m + n) = x ^ m * x ^ n\n[PROOFSTEP]\nlift x to ℝ≥0 using h'x\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nm n : ℤ\nx : ℝ≥0\nhx : ↑x ≠ 0\n⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n\n[PROOFSTEP]\nreplace hx : x ≠ 0\n[GOAL]\ncase hx\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nm n : ℤ\nx : ℝ≥0\nhx : ↑x ≠ 0\n⊢ x ≠ 0\n[PROOFSTEP]\nsimpa only [Ne.def, coe_eq_zero] using hx\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nm n : ℤ\nx : ℝ≥0\nhx : x ≠ 0\n⊢ ↑x ^ (m + n) = ↑x ^ m * ↑x ^ n\n[PROOFSTEP]\nsimp only [← coe_zpow hx, zpow_add₀ hx, coe_mul]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\n⊢ ENNReal.toReal (a + b) = ENNReal.toReal a + ENNReal.toReal b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nhb : b ≠ ⊤\na : ℝ≥0\n⊢ ENNReal.toReal (↑a + b) = ENNReal.toReal ↑a + ENNReal.toReal b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a b : ℝ≥0\n⊢ ENNReal.toReal (↑a + ↑b) = ENNReal.toReal ↑a + ENNReal.toReal ↑b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nh : b ≤ a\nha : a ≠ ⊤\n⊢ ENNReal.toReal (a - b) = ENNReal.toReal a - ENNReal.toReal b\n[PROOFSTEP]\nlift b to ℝ≥0 using ne_top_of_le_ne_top ha h\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nha : a ≠ ⊤\nb : ℝ≥0\nh : ↑b ≤ a\n⊢ ENNReal.toReal (a - ↑b) = ENNReal.toReal a - ENNReal.toReal ↑b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q b a : ℝ≥0\nh : ↑b ≤ ↑a\n⊢ ENNReal.toReal (↑a - ↑b) = ENNReal.toReal ↑a - ENNReal.toReal ↑b\n[PROOFSTEP]\nsimp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhb : b ≠ ⊤\n⊢ ENNReal.toReal a - ENNReal.toReal b ≤ ENNReal.toReal (a - b)\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nb : ℝ≥0\n⊢ ENNReal.toReal a - ENNReal.toReal ↑b ≤ ENNReal.toReal (a - ↑b)\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase intro.top\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q b : ℝ≥0\n⊢ ENNReal.toReal ⊤ - ENNReal.toReal ↑b ≤ ENNReal.toReal (⊤ - ↑b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.coe\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q b x✝ : ℝ≥0\n⊢ ENNReal.toReal ↑x✝ - ENNReal.toReal ↑b ≤ ENNReal.toReal (↑x✝ - ↑b)\n[PROOFSTEP]\nsimp only [← coe_sub, NNReal.sub_def, Real.coe_toNNReal', coe_toReal]\n[GOAL]\ncase intro.coe\nα : Type u_1\nβ : Type u_2\na b✝ c d : ℝ≥0∞\nr p q b x✝ : ℝ≥0\n⊢ ↑x✝ - ↑b ≤ max (↑x✝ - ↑b) 0\n[PROOFSTEP]\nexact le_max_left _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a = ⊤\n⊢ ENNReal.toReal (a + b) ≤ ENNReal.toReal a + ENNReal.toReal b\n[PROOFSTEP]\nsimp only [ha, top_add, top_toReal, zero_add, toReal_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : ¬a = ⊤\nhb : b = ⊤\n⊢ ENNReal.toReal (a + b) ≤ ENNReal.toReal a + ENNReal.toReal b\n[PROOFSTEP]\nsimp only [hb, add_top, top_toReal, add_zero, toReal_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhp : 0 ≤ p\nhq : 0 ≤ q\n⊢ ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_eq_coe, Real.toNNReal_add hp hq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\n⊢ ENNReal.toReal a ≤ ENNReal.toReal b ↔ a ≤ b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nhb : b ≠ ⊤\na : ℝ≥0\n⊢ ENNReal.toReal ↑a ≤ ENNReal.toReal b ↔ ↑a ≤ b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a b : ℝ≥0\n⊢ ENNReal.toReal ↑a ≤ ENNReal.toReal ↑b ↔ ↑a ≤ ↑b\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b\nht : b = ⊤ → a = ⊤\n⊢ ENNReal.toReal a ≤ ENNReal.toReal b\n[PROOFSTEP]\nrcases eq_or_ne a ∞ with rfl | ha\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nh : ⊤ ≤ b\nht : b = ⊤ → ⊤ = ⊤\n⊢ ENNReal.toReal ⊤ ≤ ENNReal.toReal b\n[PROOFSTEP]\nexact toReal_nonneg\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nh : a ≤ b\nht : b = ⊤ → a = ⊤\nha : a ≠ ⊤\n⊢ ENNReal.toReal a ≤ ENNReal.toReal b\n[PROOFSTEP]\nexact toReal_mono (mt ht ha) h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\n⊢ ENNReal.toReal a < ENNReal.toReal b ↔ a < b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nhb : b ≠ ⊤\na : ℝ≥0\n⊢ ENNReal.toReal ↑a < ENNReal.toReal b ↔ ↑a < b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a b : ℝ≥0\n⊢ ENNReal.toReal ↑a < ENNReal.toReal ↑b ↔ ↑a < ↑b\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhle : a ≤ b + c\nhb : b = ⊤ → a = ⊤\nhc : c = ⊤ → a = ⊤\n⊢ ENNReal.toReal a ≤ ENNReal.toReal b + ENNReal.toReal c\n[PROOFSTEP]\nrefine le_trans (toReal_mono' hle ?_) toReal_add_le\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhle : a ≤ b + c\nhb : b = ⊤ → a = ⊤\nhc : c = ⊤ → a = ⊤\n⊢ b + c = ⊤ → a = ⊤\n[PROOFSTEP]\nsimpa only [add_eq_top, or_imp] using And.intro hb hc\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\nh : ENNReal.toNNReal a ≤ ENNReal.toNNReal b\n⊢ a ≤ b\n[PROOFSTEP]\nrwa [← coe_toNNReal ha, ← coe_toNNReal hb, coe_le_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhb : b ≠ ⊤\nh : a < b\n⊢ ENNReal.toNNReal a < ENNReal.toNNReal b\n[PROOFSTEP]\nsimpa [← ENNReal.coe_lt_coe, hb, h.ne_top]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\nh : ENNReal.toNNReal a < ENNReal.toNNReal b\n⊢ a < b\n[PROOFSTEP]\nrwa [← coe_toNNReal ha, ← coe_toNNReal hb, coe_lt_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : a ≠ ⊤\nhp : b ≠ ⊤\nh : a ≤ b\n⊢ ENNReal.toReal (max a b) = max (ENNReal.toReal a) (ENNReal.toReal b)\n[PROOFSTEP]\nsimp only [h, (ENNReal.toReal_le_toReal hr hp).2 h, max_eq_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nhr : a ≠ ⊤\nhp : b ≠ ⊤\nh : b ≤ a\n⊢ ENNReal.toReal (max a b) = max (ENNReal.toReal a) (ENNReal.toReal b)\n[PROOFSTEP]\nsimp only [h, (ENNReal.toReal_le_toReal hp hr).2 h, max_eq_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhr : a ≠ ⊤\nhp : b ≠ ⊤\nh : a ≤ b\n⊢ ENNReal.toReal (min a b) = min (ENNReal.toReal a) (ENNReal.toReal b)\n[PROOFSTEP]\nsimp only [h, (ENNReal.toReal_le_toReal hr hp).2 h, min_eq_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\nhr : a ≠ ⊤\nhp : b ≠ ⊤\nh : b ≤ a\n⊢ ENNReal.toReal (min a b) = min (ENNReal.toReal a) (ENNReal.toReal b)\n[PROOFSTEP]\nsimp only [h, (ENNReal.toReal_le_toReal hp hr).2 h, min_eq_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 0 < ENNReal.toNNReal a ↔ 0 < a ∧ a < ⊤\n[PROOFSTEP]\ninduction a using recTopCoe\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ 0 < ENNReal.toNNReal ⊤ ↔ 0 < ⊤ ∧ ⊤ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q x✝ : ℝ≥0\n⊢ 0 < ENNReal.toNNReal ↑x✝ ↔ 0 < ↑x✝ ∧ ↑x✝ < ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nh : p ≤ q\n⊢ ENNReal.ofReal p ≤ ENNReal.ofReal q\n[PROOFSTEP]\nsimp [ENNReal.ofReal, Real.toNNReal_le_toNNReal h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nh : 0 ≤ q\n⊢ ENNReal.ofReal p ≤ ENNReal.ofReal q ↔ p ≤ q\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, coe_le_coe, Real.toNNReal_le_toNNReal_iff h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhp : 0 ≤ p\nhq : 0 ≤ q\n⊢ ENNReal.ofReal p = ENNReal.ofReal q ↔ p = q\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, coe_eq_coe, Real.toNNReal_eq_toNNReal_iff hp hq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nh : 0 < q\n⊢ ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, coe_lt_coe, Real.toNNReal_lt_toNNReal_iff h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhp : 0 ≤ p\n⊢ ENNReal.ofReal p < ENNReal.ofReal q ↔ p < q\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, coe_lt_coe, Real.toNNReal_lt_toNNReal_iff_of_nonneg hp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ\n⊢ 0 < ENNReal.ofReal p ↔ 0 < p\n[PROOFSTEP]\nsimp [ENNReal.ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ\n⊢ ENNReal.ofReal p = 0 ↔ p ≤ 0\n[PROOFSTEP]\nsimp [ENNReal.ofReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhq : 0 ≤ q\n⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q\n[PROOFSTEP]\nobtain h | h := le_total p q\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhq : 0 ≤ q\nh : p ≤ q\n⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q\n[PROOFSTEP]\nrw [ofReal_of_nonpos (sub_nonpos_of_le h), tsub_eq_zero_of_le (ofReal_le_ofReal h)]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhq : 0 ≤ q\nh : q ≤ p\n⊢ ENNReal.ofReal (p - q) = ENNReal.ofReal p - ENNReal.ofReal q\n[PROOFSTEP]\nrefine' ENNReal.eq_sub_of_add_eq ofReal_ne_top _\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhq : 0 ≤ q\nh : q ≤ p\n⊢ ENNReal.ofReal (p - q) + ENNReal.ofReal q = ENNReal.ofReal p\n[PROOFSTEP]\nrw [← ofReal_add (sub_nonneg_of_le h) hq, sub_add_cancel]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nb : ℝ≥0∞\nhb : b ≠ ⊤\n⊢ ENNReal.ofReal a ≤ b ↔ a ≤ ENNReal.toReal b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nb : ℝ≥0\n⊢ ENNReal.ofReal a ≤ ↑b ↔ a ≤ ENNReal.toReal ↑b\n[PROOFSTEP]\nsimpa [ENNReal.ofReal, ENNReal.toReal] using Real.toNNReal_le_iff_le_coe\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nb : ℝ≥0∞\nha : 0 ≤ a\nhb : b ≠ ⊤\n⊢ ENNReal.ofReal a < b ↔ a < ENNReal.toReal b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ\nha : 0 ≤ a\nb : ℝ≥0\n⊢ ENNReal.ofReal a < ↑b ↔ a < ENNReal.toReal ↑b\n[PROOFSTEP]\nsimpa [ENNReal.ofReal, ENNReal.toReal] using Real.toNNReal_lt_iff_lt_coe ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nb : ℝ\nha : a ≠ ⊤\nhb : 0 ≤ b\n⊢ a ≤ ENNReal.ofReal b ↔ ENNReal.toReal a ≤ b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nb : ℝ\nhb : 0 ≤ b\na : ℝ≥0\n⊢ ↑a ≤ ENNReal.ofReal b ↔ ENNReal.toReal ↑a ≤ b\n[PROOFSTEP]\nsimpa [ENNReal.ofReal, ENNReal.toReal] using Real.le_toNNReal_iff_coe_le hb\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nb : ℝ\nha : a ≠ ⊤\n⊢ a < ENNReal.ofReal b ↔ ENNReal.toReal a < b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\nb : ℝ\na : ℝ≥0\n⊢ ↑a < ENNReal.ofReal b ↔ ENNReal.toReal ↑a < b\n[PROOFSTEP]\nsimpa [ENNReal.ofReal, ENNReal.toReal] using Real.lt_toNNReal_iff_coe_lt\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhp : 0 ≤ p\n⊢ ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, ← coe_mul, Real.toNNReal_mul hp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ\nhq : 0 ≤ q\n⊢ ENNReal.ofReal (p * q) = ENNReal.ofReal p * ENNReal.ofReal q\n[PROOFSTEP]\nrw [mul_comm, ofReal_mul hq, mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ\nhp : 0 ≤ p\nn : ℕ\n⊢ ENNReal.ofReal (p ^ n) = ENNReal.ofReal p ^ n\n[PROOFSTEP]\nrw [ofReal_eq_coe_nnreal hp, ← coe_pow, ← ofReal_coe_nnreal, NNReal.coe_pow, NNReal.coe_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ\nn : ℕ\n⊢ ENNReal.ofReal (n • x) = n • ENNReal.ofReal x\n[PROOFSTEP]\nsimp only [nsmul_eq_mul, ← ofReal_coe_nat n, ← ofReal_mul n.cast_nonneg]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ\nhx : 0 < x\n⊢ (ENNReal.ofReal x)⁻¹ = ENNReal.ofReal x⁻¹\n[PROOFSTEP]\nrw [ENNReal.ofReal, ENNReal.ofReal, ← @coe_inv (Real.toNNReal x) (by simp [hx]), coe_eq_coe, ← Real.toNNReal_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx : ℝ\nhx : 0 < x\n⊢ Real.toNNReal x ≠ 0\n[PROOFSTEP]\nsimp [hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nx y : ℝ\nhy : 0 < y\n⊢ ENNReal.ofReal (x / y) = ENNReal.ofReal x / ENNReal.ofReal y\n[PROOFSTEP]\nrw [div_eq_mul_inv, div_eq_mul_inv, ofReal_mul' (inv_nonneg.2 hy.le), ofReal_inv_of_pos hy]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toNNReal (a * ⊤) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toNNReal (⊤ * a) = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q a : ℝ≥0\nb : ℝ≥0∞\n⊢ ENNReal.toNNReal (a • b) = a * ENNReal.toNNReal b\n[PROOFSTEP]\nchange ((a : ℝ≥0∞) * b).toNNReal = a * b.toNNReal\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q a : ℝ≥0\nb : ℝ≥0∞\n⊢ ENNReal.toNNReal (↑a * b) = a * ENNReal.toNNReal b\n[PROOFSTEP]\nsimp only [ENNReal.toNNReal_mul, ENNReal.toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\nn : ℕ\n⊢ ENNReal.toReal (n • a) = n • ENNReal.toReal a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nc : ℝ\na : ℝ≥0∞\nh : 0 ≤ c\n⊢ ENNReal.toReal (ENNReal.ofReal c * a) = c * ENNReal.toReal a\n[PROOFSTEP]\nrw [ENNReal.toReal_mul, ENNReal.toReal_ofReal h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toReal (a * ⊤) = 0\n[PROOFSTEP]\nrw [toReal_mul, top_toReal, mul_zero]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toReal (⊤ * a) = 0\n[PROOFSTEP]\nrw [mul_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toReal (a * ⊤) = 0\n[PROOFSTEP]\nexact toReal_mul_top _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nha : a ≠ ⊤\nhb : b ≠ ⊤\n⊢ ENNReal.toReal a = ENNReal.toReal b ↔ a = b\n[PROOFSTEP]\nlift a to ℝ≥0 using ha\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nb c d : ℝ≥0∞\nr p q : ℝ≥0\nhb : b ≠ ⊤\na : ℝ≥0\n⊢ ENNReal.toReal ↑a = ENNReal.toReal b ↔ ↑a = b\n[PROOFSTEP]\nlift b to ℝ≥0 using hb\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nc d : ℝ≥0∞\nr p q a b : ℝ≥0\n⊢ ENNReal.toReal ↑a = ENNReal.toReal ↑b ↔ ↑a = ↑b\n[PROOFSTEP]\nsimp only [coe_eq_coe, NNReal.coe_eq, coe_toReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\ns : ℝ≥0∞\n⊢ ENNReal.toReal (r • s) = r • ENNReal.toReal s\n[PROOFSTEP]\nrw [ENNReal.smul_def, smul_eq_mul, toReal_mul, coe_toReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr✝ p q r : ℝ≥0\ns : ℝ≥0∞\n⊢ ↑r * ENNReal.toReal s = r • ENNReal.toReal s\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ≥0∞\n⊢ p = 0 ∨ p = ⊤ ∨ 0 < ENNReal.toReal p\n[PROOFSTEP]\nsimpa only [or_iff_not_imp_left] using toReal_pos\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\n⊢ p = 0 ∧ q = 0 ∨\n    p = 0 ∧ q = ⊤ ∨\n      p = 0 ∧ 0 < ENNReal.toReal q ∨\n        p = ⊤ ∧ q = ⊤ ∨\n          0 < ENNReal.toReal p ∧ q = ⊤ ∨\n            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nrcases eq_or_lt_of_le (bot_le : 0 ≤ p) with ((rfl : 0 = p) | (hp : 0 < p))\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q✝ : ℝ≥0\nq : ℝ≥0∞\nhpq : 0 ≤ q\n⊢ 0 = 0 ∧ q = 0 ∨\n    0 = 0 ∧ q = ⊤ ∨\n      0 = 0 ∧ 0 < ENNReal.toReal q ∨\n        0 = ⊤ ∧ q = ⊤ ∨\n          0 < ENNReal.toReal 0 ∧ q = ⊤ ∨\n            0 < ENNReal.toReal 0 ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal 0 ≤ ENNReal.toReal q\n[PROOFSTEP]\nsimpa using q.trichotomy\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\n⊢ p = 0 ∧ q = 0 ∨\n    p = 0 ∧ q = ⊤ ∨\n      p = 0 ∧ 0 < ENNReal.toReal q ∨\n        p = ⊤ ∧ q = ⊤ ∨\n          0 < ENNReal.toReal p ∧ q = ⊤ ∨\n            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nrcases eq_or_lt_of_le (le_top : q ≤ ∞) with (rfl | hq)\n[GOAL]\ncase inr.inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ≥0∞\nhp : 0 < p\nhpq : p ≤ ⊤\n⊢ p = 0 ∧ ⊤ = 0 ∨\n    p = 0 ∧ ⊤ = ⊤ ∨\n      p = 0 ∧ 0 < ENNReal.toReal ⊤ ∨\n        p = ⊤ ∧ ⊤ = ⊤ ∨\n          0 < ENNReal.toReal p ∧ ⊤ = ⊤ ∨\n            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal ⊤ ∧ ENNReal.toReal p ≤ ENNReal.toReal ⊤\n[PROOFSTEP]\nsimpa using p.trichotomy\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ p = 0 ∧ q = 0 ∨\n    p = 0 ∧ q = ⊤ ∨\n      p = 0 ∧ 0 < ENNReal.toReal q ∨\n        p = ⊤ ∧ q = ⊤ ∨\n          0 < ENNReal.toReal p ∧ q = ⊤ ∨\n            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nrepeat' right\n[GOAL]\ncase inr.inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ p = 0 ∧ q = 0 ∨\n    p = 0 ∧ q = ⊤ ∨\n      p = 0 ∧ 0 < ENNReal.toReal q ∨\n        p = ⊤ ∧ q = ⊤ ∨\n          0 < ENNReal.toReal p ∧ q = ⊤ ∨\n            0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ p = 0 ∧ q = ⊤ ∨\n    p = 0 ∧ 0 < ENNReal.toReal q ∨\n      p = ⊤ ∧ q = ⊤ ∨\n        0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ p = 0 ∧ 0 < ENNReal.toReal q ∨\n    p = ⊤ ∧ q = ⊤ ∨\n      0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ p = ⊤ ∧ q = ⊤ ∨\n    0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ 0 < ENNReal.toReal p ∧ q = ⊤ ∨ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inr.h.h.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\n⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nhave hq' : 0 < q := lt_of_lt_of_le hp hpq\n[GOAL]\ncase inr.inr.h.h.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\nhq' : 0 < q\n⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nhave hp' : p < ∞ := lt_of_le_of_lt hpq hq\n[GOAL]\ncase inr.inr.h.h.h.h.h\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q✝ : ℝ≥0\np q : ℝ≥0∞\nhpq : p ≤ q\nhp : 0 < p\nhq : q < ⊤\nhq' : 0 < q\nhp' : p < ⊤\n⊢ 0 < ENNReal.toReal p ∧ 0 < ENNReal.toReal q ∧ ENNReal.toReal p ≤ ENNReal.toReal q\n[PROOFSTEP]\nsimp [ENNReal.toReal_le_toReal hp'.ne hq.ne, ENNReal.toReal_pos_iff, hpq, hp, hp', hq', hq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p✝ q : ℝ≥0\np : ℝ≥0∞\ninst✝ : Fact (1 ≤ p)\n⊢ p = ⊤ ∨ 0 < ENNReal.toReal p ∧ 1 ≤ ENNReal.toReal p\n[PROOFSTEP]\nsimpa using ENNReal.trichotomy₂ (Fact.out : 1 ≤ p)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toNNReal a⁻¹ = (ENNReal.toNNReal a)⁻¹\n[PROOFSTEP]\ninduction' a using recTopCoe with a\n[GOAL]\ncase top\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ENNReal.toNNReal ⊤⁻¹ = (ENNReal.toNNReal ⊤)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\n⊢ ENNReal.toNNReal (↑a)⁻¹ = (ENNReal.toNNReal ↑a)⁻¹\n[PROOFSTEP]\nrcases eq_or_ne a 0 with (rfl | ha)\n[GOAL]\ncase coe.inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\n⊢ ENNReal.toNNReal (↑0)⁻¹ = (ENNReal.toNNReal ↑0)⁻¹\n[PROOFSTEP]\nsimp\n[GOAL]\ncase coe.inr\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q a : ℝ≥0\nha : a ≠ 0\n⊢ ENNReal.toNNReal (↑a)⁻¹ = (ENNReal.toNNReal ↑a)⁻¹\n[PROOFSTEP]\nrw [← coe_inv ha, toNNReal_coe, toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ ENNReal.toNNReal (a / b) = ENNReal.toNNReal a / ENNReal.toNNReal b\n[PROOFSTEP]\nrw [div_eq_mul_inv, toNNReal_mul, toNNReal_inv, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\na : ℝ≥0∞\n⊢ ENNReal.toReal a⁻¹ = (ENNReal.toReal a)⁻¹\n[PROOFSTEP]\nsimp only [ENNReal.toReal, toNNReal_inv, NNReal.coe_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b✝ c d : ℝ≥0∞\nr p q : ℝ≥0\na b : ℝ≥0∞\n⊢ ENNReal.toReal (a / b) = ENNReal.toReal a / ENNReal.toReal b\n[PROOFSTEP]\nrw [div_eq_mul_inv, toReal_mul, toReal_inv, div_eq_mul_inv]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ\nhf : ∀ (i : α), i ∈ s → 0 ≤ f i\n⊢ ENNReal.ofReal (∏ i in s, f i) = ∏ i in s, ENNReal.ofReal (f i)\n[PROOFSTEP]\nsimp_rw [ENNReal.ofReal, ← coe_finset_prod, coe_eq_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\ns : Finset α\nf : α → ℝ\nhf : ∀ (i : α), i ∈ s → 0 ≤ f i\n⊢ Real.toNNReal (∏ i in s, f i) = ∏ a in s, Real.toNNReal (f a)\n[PROOFSTEP]\nexact Real.toNNReal_prod_of_nonneg hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\n⊢ ENNReal.toNNReal (iInf f) = ⨅ (i : ι), ENNReal.toNNReal (f i)\n[PROOFSTEP]\ncases isEmpty_or_nonempty ι\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\nh✝ : IsEmpty ι\n⊢ ENNReal.toNNReal (iInf f) = ⨅ (i : ι), ENNReal.toNNReal (f i)\n[PROOFSTEP]\nrw [iInf_of_empty, top_toNNReal, NNReal.iInf_empty]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\nh✝ : Nonempty ι\n⊢ ENNReal.toNNReal (iInf f) = ⨅ (i : ι), ENNReal.toNNReal (f i)\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase inr.intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\ng : ι → ℝ≥0∞\nh✝ : Nonempty ι\nf : ι → ℝ≥0\n⊢ ENNReal.toNNReal (⨅ (i : ι), ↑(f i)) = ⨅ (i : ι), ENNReal.toNNReal ((fun i => ↑(f i)) i)\n[PROOFSTEP]\nsimp_rw [← coe_iInf, toNNReal_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhs : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\n⊢ ENNReal.toNNReal (sInf s) = sInf (ENNReal.toNNReal '' s)\n[PROOFSTEP]\nhave hf : ∀ i, ((↑) : s → ℝ≥0∞) i ≠ ∞ := fun ⟨r, rs⟩ => hs r rs\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhs : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\nhf : ∀ (i : { x // x ∈ s }), ↑i ≠ ⊤\n⊢ ENNReal.toNNReal (sInf s) = sInf (ENNReal.toNNReal '' s)\n[PROOFSTEP]\nsimpa only [← sInf_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iInf hf)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\n⊢ ENNReal.toNNReal (iSup f) = ⨆ (i : ι), ENNReal.toNNReal (f i)\n[PROOFSTEP]\nlift f to ι → ℝ≥0 using hf\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\ng : ι → ℝ≥0∞\nf : ι → ℝ≥0\n⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), ENNReal.toNNReal ((fun i => ↑(f i)) i)\n[PROOFSTEP]\nsimp_rw [toNNReal_coe]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\ng : ι → ℝ≥0∞\nf : ι → ℝ≥0\n⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i\n[PROOFSTEP]\nby_cases h : BddAbove (range f)\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\ng : ι → ℝ≥0∞\nf : ι → ℝ≥0\nh : BddAbove (range f)\n⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i\n[PROOFSTEP]\nrw [← coe_iSup h, toNNReal_coe]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\ng : ι → ℝ≥0∞\nf : ι → ℝ≥0\nh : ¬BddAbove (range f)\n⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i\n[PROOFSTEP]\nerw [NNReal.iSup_of_not_bddAbove h, (WithTop.iSup_coe_eq_top f).mpr h, top_toNNReal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhs : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\n⊢ ENNReal.toNNReal (sSup s) = sSup (ENNReal.toNNReal '' s)\n[PROOFSTEP]\nhave hf : ∀ i, ((↑) : s → ℝ≥0∞) i ≠ ∞ := fun ⟨r, rs⟩ => hs r rs\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhs : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\nhf : ∀ (i : { x // x ∈ s }), ↑i ≠ ⊤\n⊢ ENNReal.toNNReal (sSup s) = sSup (ENNReal.toNNReal '' s)\n[PROOFSTEP]\nsimpa only [← sSup_range, ← image_eq_range, Subtype.range_coe_subtype] using (toNNReal_iSup hf)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\n⊢ ENNReal.toReal (iInf f) = ⨅ (i : ι), ENNReal.toReal (f i)\n[PROOFSTEP]\nsimp only [ENNReal.toReal, toNNReal_iInf hf, NNReal.coe_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhf : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\n⊢ ENNReal.toReal (sInf s) = sInf (ENNReal.toReal '' s)\n[PROOFSTEP]\nsimp only [ENNReal.toReal, toNNReal_sInf s hf, NNReal.coe_sInf, Set.image_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nhf : ∀ (i : ι), f i ≠ ⊤\n⊢ ENNReal.toReal (iSup f) = ⨆ (i : ι), ENNReal.toReal (f i)\n[PROOFSTEP]\nsimp only [ENNReal.toReal, toNNReal_iSup hf, NNReal.coe_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\nhf : ∀ (r : ℝ≥0∞), r ∈ s → r ≠ ⊤\n⊢ ENNReal.toReal (sSup s) = sSup (ENNReal.toReal '' s)\n[PROOFSTEP]\nsimp only [ENNReal.toReal, toNNReal_sSup s hf, NNReal.coe_sSup, Set.image_image]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\n⊢ a - ⨅ (i : ι), f i = ⨆ (i : ι), a - f i\n[PROOFSTEP]\nrefine' eq_of_forall_ge_iff fun c => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nc : ℝ≥0∞\n⊢ a - ⨅ (i : ι), f i ≤ c ↔ ⨆ (i : ι), a - f i ≤ c\n[PROOFSTEP]\nrw [tsub_le_iff_right, add_comm, iInf_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c✝ d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nc : ℝ≥0∞\n⊢ a ≤ ⨅ (i : ι), f i + c ↔ ⨆ (i : ι), a - f i ≤ c\n[PROOFSTEP]\nsimp [tsub_le_iff_right, sub_eq_add_neg, add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\ns : Set ℝ≥0∞\n⊢ sInf s + a = ⨅ (b : ℝ≥0∞) (_ : b ∈ s), b + a\n[PROOFSTEP]\nsimp [sInf_eq_iInf, iInf_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\na : ℝ≥0∞\n⊢ a + iInf f = ⨅ (b : ι), a + f b\n[PROOFSTEP]\nrw [add_comm, iInf_add]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\na : ℝ≥0∞\n⊢ ⨅ (i : ι), f i + a = ⨅ (b : ι), a + f b\n[PROOFSTEP]\nsimp [add_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf g : ι → ℝ≥0∞\nh : ∀ (i j : ι), ∃ k, f k + g k ≤ f i + g j\n⊢ ⨅ (a : ι) (a' : ι), f a + g a' = iInf f + iInf g\n[PROOFSTEP]\nsimp_rw [iInf_add, add_iInf]\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ns : Finset α\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\n⊢ ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\n[PROOFSTEP]\ninduction' s using Finset.cons_induction_on with a s ha ih\n[GOAL]\ncase h₁\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\n⊢ ⨅ (i : ι), ∑ a in ∅, f i a = ∑ a in ∅, ⨅ (i : ι), f i a\n[PROOFSTEP]\nsimp only [Finset.sum_empty, ciInf_const]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\na : α\ns : Finset α\nha : ¬a ∈ s\nih : ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\n⊢ ⨅ (i : ι), ∑ a in Finset.cons a s ha, f i a = ∑ a in Finset.cons a s ha, ⨅ (i : ι), f i a\n[PROOFSTEP]\nsimp only [Finset.sum_cons, ← ih]\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\na : α\ns : Finset α\nha : ¬a ∈ s\nih : ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\n⊢ ⨅ (i : ι), f i a + ∑ a in s, f i a = (⨅ (i : ι), f i a) + ⨅ (i : ι), ∑ a in s, f i a\n[PROOFSTEP]\nrefine (iInf_add_iInf fun i j => ?_).symm\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\na : α\ns : Finset α\nha : ¬a ∈ s\nih : ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\ni j : ι\n⊢ ∃ k, f k a + ∑ a in s, f k a ≤ f i a + ∑ a in s, f j a\n[PROOFSTEP]\nrefine (h (Finset.cons a s ha) i j).imp fun k hk => ?_\n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\na : α\ns : Finset α\nha : ¬a ∈ s\nih : ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\ni j k : ι\nhk : ∀ (a_1 : α), a_1 ∈ Finset.cons a s ha → f k a_1 ≤ f i a_1 ∧ f k a_1 ≤ f j a_1\n⊢ f k a + ∑ a in s, f k a ≤ f i a + ∑ a in s, f j a\n[PROOFSTEP]\nrw [Finset.forall_mem_cons] at hk \n[GOAL]\ncase h₂\nα : Type u_1\nβ : Type u_2\na✝ b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\nf✝ g : ι → ℝ≥0∞\nf : ι → α → ℝ≥0∞\ninst✝ : Nonempty ι\nh : ∀ (t : Finset α) (i j : ι), ∃ k, ∀ (a : α), a ∈ t → f k a ≤ f i a ∧ f k a ≤ f j a\na : α\ns : Finset α\nha : ¬a ∈ s\nih : ⨅ (i : ι), ∑ a in s, f i a = ∑ a in s, ⨅ (i : ι), f i a\ni j k : ι\nhk : (f k a ≤ f i a ∧ f k a ≤ f j a) ∧ ∀ (x : α), x ∈ s → f k x ≤ f i x ∧ f k x ≤ f j x\n⊢ f k a + ∑ a in s, f k a ≤ f i a + ∑ a in s, f j a\n[PROOFSTEP]\nexact add_le_add hk.1.1 (Finset.sum_le_sum fun a ha => (hk.2 a ha).2)\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι✝ : Sort u_3\nf✝ g : ι✝ → ℝ≥0∞\nι : Sort u_4\ninst✝ : Nonempty ι\nf : ι → ℝ≥0∞\nx : ℝ≥0∞\nh : x ≠ ⊤\n⊢ iInf f * x = ⨅ (i : ι), f i * x\n[PROOFSTEP]\nby_cases h0 : x = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι✝ : Sort u_3\nf✝ g : ι✝ → ℝ≥0∞\nι : Sort u_4\ninst✝ : Nonempty ι\nf : ι → ℝ≥0∞\nx : ℝ≥0∞\nh : x ≠ ⊤\nh0 : x = 0\n⊢ iInf f * x = ⨅ (i : ι), f i * x\n[PROOFSTEP]\nsimp only [h0, mul_zero, iInf_const]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι✝ : Sort u_3\nf✝ g : ι✝ → ℝ≥0∞\nι : Sort u_4\ninst✝ : Nonempty ι\nf : ι → ℝ≥0∞\nx : ℝ≥0∞\nh : x ≠ ⊤\nh0 : ¬x = 0\n⊢ iInf f * x = ⨅ (i : ι), f i * x\n[PROOFSTEP]\nexact iInf_mul_of_ne h0 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι✝ : Sort u_3\nf✝ g : ι✝ → ℝ≥0∞\nι : Sort u_4\ninst✝ : Nonempty ι\nf : ι → ℝ≥0∞\nx : ℝ≥0∞\nh : x ≠ ⊤\n⊢ x * iInf f = ⨅ (i : ι), x * f i\n[PROOFSTEP]\nsimpa only [mul_comm] using iInf_mul h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι✝ : Sort u_3\nf✝ g : ι✝ → ℝ≥0∞\nι : Sort u_4\nf : ι → ℝ≥0∞\nx : ℝ≥0∞\nh0 : x ≠ 0\nh : x ≠ ⊤\n⊢ x * iInf f = ⨅ (i : ι), x * f i\n[PROOFSTEP]\nsimpa only [mul_comm] using iInf_mul_of_ne h0 h\n[GOAL]\nα : Type u_1\nβ : Type u_2\na b c d : ℝ≥0∞\nr p q : ℝ≥0\nι : Sort u_3\n⊢ ⨆ (x : ι), 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set ℝ\nt : Set ℝ≥0\nu : Set ℝ≥0∞\nh : OrdConnected t\n⊢ OrdConnected (ENNReal.some '' t)\n[PROOFSTEP]\nrefine' ⟨ball_image_iff.2 fun x hx => ball_image_iff.2 fun y hy z hz => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set ℝ\nt : Set ℝ≥0\nu : Set ℝ≥0∞\nh : OrdConnected t\nx : ℝ≥0\nhx : x ∈ t\ny : ℝ≥0\nhy : y ∈ t\nz : ℝ≥0∞\nhz : z ∈ Icc ↑x ↑y\n⊢ z ∈ ENNReal.some '' t\n[PROOFSTEP]\nrcases ENNReal.le_coe_iff.1 hz.2 with ⟨z, rfl, -⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ns : Set ℝ\nt : Set ℝ≥0\nu : Set ℝ≥0∞\nh : OrdConnected t\nx : ℝ≥0\nhx : x ∈ t\ny : ℝ≥0\nhy : y ∈ t\nz : ℝ≥0\nhz : ↑z ∈ Icc ↑x ↑y\n⊢ ↑z ∈ ENNReal.some '' t\n[PROOFSTEP]\nexact mem_image_of_mem _ (h.out hx hy ⟨ENNReal.coe_le_coe.1 hz.1, ENNReal.coe_le_coe.1 hz.2⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ns : Set ℝ\nt : Set ℝ≥0\nu : Set ℝ≥0∞\nh : OrdConnected s\n⊢ OrdConnected (ENNReal.ofReal '' s)\n[PROOFSTEP]\nsimpa only [image_image] using h.image_real_toNNReal.image_coe_nnreal_ennreal\n", "meta": {"mathlib_filename": "Mathlib.Data.Real.ENNReal", "llama_tokens": 64430, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5583269943353745, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.27262180047939494}}
{"text": "[GOAL]\nα✝ : Type ?u.229\nβ✝ : Type ?u.232\nγ✝ : Type ?u.235\nf✝ : α✝ → β✝ → γ✝\na✝ : Option α✝\nb✝ : Option β✝\nc : Option γ✝\nα β γ : Type u_1\nf : α → β → γ\na : Option α\nb : Option β\n⊢ map₂ f a b = Seq.seq (f <$> a) fun x => b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα✝ : Type ?u.229\nβ✝ : Type ?u.232\nγ✝ : Type ?u.235\nf✝ : α✝ → β✝ → γ✝\na : Option α✝\nb✝ : Option β✝\nc : Option γ✝\nα β γ : Type u_1\nf : α → β → γ\nb : Option β\n⊢ map₂ f none b = Seq.seq (f <$> none) fun x => b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα✝ : Type ?u.229\nβ✝ : Type ?u.232\nγ✝ : Type ?u.235\nf✝ : α✝ → β✝ → γ✝\na : Option α✝\nb✝ : Option β✝\nc : Option γ✝\nα β γ : Type u_1\nf : α → β → γ\nb : Option β\nval✝ : α\n⊢ map₂ f (some val✝) b = Seq.seq (f <$> some val✝) fun x => b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na✝ : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\na : Option α\n⊢ map₂ f a none = none\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\n⊢ map₂ f none none = none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nval✝ : α\n⊢ map₂ f (some val✝) none = none\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na✝ : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\na : Option α\nb : β\n⊢ map₂ f a (some b) = Option.map (fun a => f a b) a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\nb : β\n⊢ map₂ f none (some b) = Option.map (fun a => f a b) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\nb : β\nval✝ : α\n⊢ map₂ f (some val✝) (some b) = Option.map (fun a => f a b) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\na : Option α\nb : Option β\nc✝ : Option γ\nc : γ\n⊢ c ∈ map₂ f a b ↔ ∃ a' b', a' ∈ a ∧ b' ∈ b ∧ f a' b' = c\n[PROOFSTEP]\nsimp [map₂]\n[GOAL]\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\n⊢ map₂ f a b = none ↔ a = none ∨ b = none\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nb : Option β\nc : Option γ\n⊢ map₂ f none b = none ↔ none = none ∨ b = none\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nb : Option β\nc : Option γ\nval✝ : α\n⊢ map₂ f (some val✝) b = none ↔ some val✝ = none ∨ b = none\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\n⊢ map₂ f none none = none ↔ none = none ∨ none = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase none.some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\nval✝ : β\n⊢ map₂ f none (some val✝) = none ↔ none = none ∨ some val✝ = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\nval✝ : α\n⊢ map₂ f (some val✝) none = none ↔ some val✝ = none ∨ none = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (some val✝) = none ↔ some val✝¹ = none ∨ some val✝ = none\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na✝ : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\na : Option α\nb : Option β\n⊢ map₂ f a b = map₂ (fun a b => f b a) b a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\nb : Option β\n⊢ map₂ f none b = map₂ (fun a b => f b a) b none\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → γ\nb : Option β\nval✝ : α\n⊢ map₂ f (some val✝) b = map₂ (fun a b => f b a) b (some val✝)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\n⊢ map₂ f none none = map₂ (fun a b => f b a) none none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase none.some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nval✝ : β\n⊢ map₂ f none (some val✝) = map₂ (fun a b => f b a) (some val✝) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nval✝ : α\n⊢ map₂ f (some val✝) none = map₂ (fun a b => f b a) none (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (some val✝) = map₂ (fun a b => f b a) (some val✝) (some val✝¹)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\n⊢ Option.map g (map₂ f a b) = map₂ (fun a b => g (f a b)) a b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\n⊢ Option.map g (map₂ f none b) = map₂ (fun a b => g (f a b)) none b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ (fun a b => g (f a b)) (some val✝) b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\n⊢ Option.map g (map₂ f none none) = map₂ (fun a b => g (f a b)) none none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase none.some\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ (fun a b => g (f a b)) none (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.none\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ (fun a b => g (f a b)) (some val✝) none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some.some\nα : Type u_3\nβ : Type u_4\nγ : Type u_2\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nf : α → β → γ\ng : γ → δ\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ (fun a b => g (f a b)) (some val✝¹) (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_4\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nf : γ → β → δ\ng : α → γ\n⊢ map₂ f (Option.map g a) b = map₂ (fun a b => f (g a) b) a b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nf : γ → β → δ\ng : α → γ\n⊢ map₂ f (Option.map g none) b = map₂ (fun a b => f (g a) b) none b\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_3\nγ : Type u_2\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nf : γ → β → δ\ng : α → γ\nval✝ : α\n⊢ map₂ f (Option.map g (some val✝)) b = map₂ (fun a b => f (g a) b) (some val✝) b\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_2\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nf : α → γ → δ\ng : β → γ\n⊢ map₂ f a (Option.map g b) = map₂ (fun a b => f a (g b)) a b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none\nα : Type u_2\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nc : Option γ\nδ : Type u_1\nf : α → γ → δ\ng : β → γ\n⊢ map₂ f a (Option.map g none) = map₂ (fun a b => f a (g b)) a none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_2\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nc : Option γ\nδ : Type u_1\nf : α → γ → δ\ng : β → γ\nval✝ : β\n⊢ map₂ f a (Option.map g (some val✝)) = map₂ (fun a b => f a (g b)) a (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_2\nβ : Type u_1\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nx : Option (α × β)\n⊢ Option.map (uncurry f) x = map₂ f (Option.map Prod.fst x) (Option.map Prod.snd x)\n[PROOFSTEP]\ncases x\n[GOAL]\ncase none\nα : Type u_2\nβ : Type u_1\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\n⊢ Option.map (uncurry f) none = map₂ f (Option.map Prod.fst none) (Option.map Prod.snd none)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase some\nα : Type u_2\nβ : Type u_1\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nf : α → β → γ\nval✝ : α × β\n⊢ Option.map (uncurry f) (some val✝) = map₂ f (Option.map Prod.fst (some val✝)) (Option.map Prod.snd (some val✝))\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\n⊢ map₂ f (map₂ g a b) c = map₂ f' a (map₂ g' b c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\n⊢ map₂ f (map₂ g none b) c = map₂ f' none (map₂ g' b c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) b) c = map₂ f' (some val✝) (map₂ g' b c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\n⊢ map₂ f (map₂ g none none) c = map₂ f' none (map₂ g' none c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : β\n⊢ map₂ f (map₂ g none (some val✝)) c = map₂ f' none (map₂ g' (some val✝) c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) none) c = map₂ f' (some val✝) (map₂ g' none c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (map₂ g (some val✝¹) (some val✝)) c = map₂ f' (some val✝¹) (map₂ g' (some val✝) c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\n⊢ map₂ f (map₂ g none none) none = map₂ f' none (map₂ g' none none)\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase none.none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : γ\n⊢ map₂ f (map₂ g none none) (some val✝) = map₂ f' none (map₂ g' none (some val✝))\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase none.some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : β\n⊢ map₂ f (map₂ g none (some val✝)) none = map₂ f' none (map₂ g' (some val✝) none)\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase none.some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f (map₂ g none (some val✝¹)) (some val✝) = map₂ f' none (map₂ g' (some val✝¹) (some val✝))\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase some.none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) none) none = map₂ f' (some val✝) (map₂ g' none none)\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase some.none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝¹ : α\nval✝ : γ\n⊢ map₂ f (map₂ g (some val✝¹) none) (some val✝) = map₂ f' (some val✝¹) (map₂ g' none (some val✝))\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase some.some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (map₂ g (some val✝¹) (some val✝)) none = map₂ f' (some val✝¹) (map₂ g' (some val✝) none)\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\ncase some.some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nε' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → ε' → ε\ng' : β → γ → ε'\nh_assoc : ∀ (a : α) (b : β) (c : γ), f (g a b) c = f' a (g' b c)\nval✝² : α\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f (map₂ g (some val✝²) (some val✝¹)) (some val✝) = map₂ f' (some val✝²) (map₂ g' (some val✝¹) (some val✝))\n[PROOFSTEP]\nsimp [h_assoc]\n[GOAL]\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\n⊢ map₂ f a b = map₂ g b a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nb : Option β\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\n⊢ map₂ f none b = map₂ g b none\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nb : Option β\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\nval✝ : α\n⊢ map₂ f (some val✝) b = map₂ g b (some val✝)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\n⊢ map₂ f none none = map₂ g none none\n[PROOFSTEP]\nsimp [h_comm]\n[GOAL]\ncase none.some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\nval✝ : β\n⊢ map₂ f none (some val✝) = map₂ g (some val✝) none\n[PROOFSTEP]\nsimp [h_comm]\n[GOAL]\ncase some.none\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\nval✝ : α\n⊢ map₂ f (some val✝) none = map₂ g none (some val✝)\n[PROOFSTEP]\nsimp [h_comm]\n[GOAL]\ncase some.some\nα : Type u_2\nβ : Type u_3\nγ : Type u_1\nf : α → β → γ\nc : Option γ\ng : β → α → γ\nh_comm : ∀ (a : α) (b : β), f a b = g b a\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (some val✝) = map₂ g (some val✝) (some val✝¹)\n[PROOFSTEP]\nsimp [h_comm]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\n⊢ map₂ f a (map₂ g b c) = map₂ g' b (map₂ f' a c)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\n⊢ map₂ f none (map₂ g b c) = map₂ g' b (map₂ f' none c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : α\n⊢ map₂ f (some val✝) (map₂ g b c) = map₂ g' b (map₂ f' (some val✝) c)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\n⊢ map₂ f none (map₂ g none c) = map₂ g' none (map₂ f' none c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : β\n⊢ map₂ f none (map₂ g (some val✝) c) = map₂ g' (some val✝) (map₂ f' none c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : α\n⊢ map₂ f (some val✝) (map₂ g none c) = map₂ g' none (map₂ f' (some val✝) c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (map₂ g (some val✝) c) = map₂ g' (some val✝) (map₂ f' (some val✝¹) c)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\n⊢ map₂ f none (map₂ g none none) = map₂ g' none (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase none.none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : γ\n⊢ map₂ f none (map₂ g none (some val✝)) = map₂ g' none (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase none.some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : β\n⊢ map₂ f none (map₂ g (some val✝) none) = map₂ g' (some val✝) (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase none.some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f none (map₂ g (some val✝¹) (some val✝)) = map₂ g' (some val✝¹) (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝ : α\n⊢ map₂ f (some val✝) (map₂ g none none) = map₂ g' none (map₂ f' (some val✝) none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝¹ : α\nval✝ : γ\n⊢ map₂ f (some val✝¹) (map₂ g none (some val✝)) = map₂ g' none (map₂ f' (some val✝¹) (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (map₂ g (some val✝) none) = map₂ g' (some val✝) (map₂ f' (some val✝¹) none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_6\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : α → δ → ε\ng : β → γ → δ\nf' : α → γ → δ'\ng' : β → δ' → ε\nh_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)\nval✝² : α\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f (some val✝²) (map₂ g (some val✝¹) (some val✝)) = map₂ g' (some val✝¹) (map₂ f' (some val✝²) (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\n⊢ map₂ f (map₂ g a b) c = map₂ g' (map₂ f' a c) b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\n⊢ map₂ f (map₂ g none b) c = map₂ g' (map₂ f' none c) b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) b) c = map₂ g' (map₂ f' (some val✝) c) b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\n⊢ map₂ f (map₂ g none none) c = map₂ g' (map₂ f' none c) none\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : β\n⊢ map₂ f (map₂ g none (some val✝)) c = map₂ g' (map₂ f' none c) (some val✝)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) none) c = map₂ g' (map₂ f' (some val✝) c) none\n[PROOFSTEP]\ncases c\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nc : Option γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (map₂ g (some val✝¹) (some val✝)) c = map₂ g' (map₂ f' (some val✝¹) c) (some val✝)\n[PROOFSTEP]\ncases c\n[GOAL]\ncase none.none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\n⊢ map₂ f (map₂ g none none) none = map₂ g' (map₂ f' none none) none\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase none.none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : γ\n⊢ map₂ f (map₂ g none none) (some val✝) = map₂ g' (map₂ f' none (some val✝)) none\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase none.some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : β\n⊢ map₂ f (map₂ g none (some val✝)) none = map₂ g' (map₂ f' none none) (some val✝)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase none.some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f (map₂ g none (some val✝¹)) (some val✝) = map₂ g' (map₂ f' none (some val✝)) (some val✝¹)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝ : α\n⊢ map₂ f (map₂ g (some val✝) none) none = map₂ g' (map₂ f' (some val✝) none) none\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝¹ : α\nval✝ : γ\n⊢ map₂ f (map₂ g (some val✝¹) none) (some val✝) = map₂ g' (map₂ f' (some val✝¹) (some val✝)) none\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (map₂ g (some val✝¹) (some val✝)) none = map₂ g' (map₂ f' (some val✝¹) none) (some val✝)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf✝ : α → β → γ\nδ : Type u_1\nε : Type u_2\nδ' : Type u_3\nf : δ → γ → ε\ng : α → β → δ\nf' : α → γ → δ'\ng' : δ' → β → ε\nh_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b\nval✝² : α\nval✝¹ : β\nval✝ : γ\n⊢ map₂ f (map₂ g (some val✝²) (some val✝¹)) (some val✝) = map₂ g' (map₂ f' (some val✝²) (some val✝)) (some val✝¹)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\n⊢ Option.map g (map₂ f a b) = map₂ f' (Option.map g₁ a) (Option.map g₂ b)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\n⊢ Option.map g (map₂ f none b) = map₂ f' (Option.map g₁ none) (Option.map g₂ b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' (Option.map g₁ (some val✝)) (Option.map g₂ b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\n⊢ Option.map g (map₂ f none none) = map₂ f' (Option.map g₁ none) (Option.map g₂ none)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' (Option.map g₁ none) (Option.map g₂ (some val✝))\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' (Option.map g₁ (some val✝)) (Option.map g₂ none)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\nβ' : Type u_3\ng : γ → δ\nf' : α' → β' → δ\ng₁ : α → α'\ng₂ : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ a) (g₂ b)\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (Option.map g₁ (some val✝¹)) (Option.map g₂ (some val✝))\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\n⊢ Option.map g (map₂ f a b) = map₂ f' (Option.map g' a) b\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\n⊢ Option.map g (map₂ f none b) = map₂ f' (Option.map g' none) b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' (Option.map g' (some val✝)) b\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\n⊢ Option.map g (map₂ f none none) = map₂ f' (Option.map g' none) none\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' (Option.map g' none) (some val✝)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' (Option.map g' (some val✝)) none\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : α' → β → δ\ng' : α → α'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (Option.map g' (some val✝¹)) (some val✝)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\n⊢ Option.map g (map₂ f a b) = map₂ f' a (Option.map g' b)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\n⊢ Option.map g (map₂ f none b) = map₂ f' none (Option.map g' b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' (some val✝) (Option.map g' b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\n⊢ Option.map g (map₂ f none none) = map₂ f' none (Option.map g' none)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' none (Option.map g' (some val✝))\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' (some val✝) (Option.map g' none)\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : α → β' → δ\ng' : β → β'\nh_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (some val✝¹) (Option.map g' (some val✝))\n[PROOFSTEP]\nsimp [h_distrib]\n[GOAL]\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\n⊢ map₂ f (Option.map g a) b = Option.map g' (map₂ f' a b)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\n⊢ map₂ f (Option.map g none) b = Option.map g' (map₂ f' none b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\nval✝ : α\n⊢ map₂ f (Option.map g (some val✝)) b = Option.map g' (map₂ f' (some val✝) b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\n⊢ map₂ f (Option.map g none) none = Option.map g' (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\nval✝ : β\n⊢ map₂ f (Option.map g none) (some val✝) = Option.map g' (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\nval✝ : α\n⊢ map₂ f (Option.map g (some val✝)) none = Option.map g' (map₂ f' (some val✝) none)\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : α → β → δ\ng' : δ → γ\nh_left_comm : ∀ (a : α) (b : β), f (g a) b = g' (f' a b)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (Option.map g (some val✝¹)) (some val✝) = Option.map g' (map₂ f' (some val✝¹) (some val✝))\n[PROOFSTEP]\nsimp [h_left_comm]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\n⊢ map₂ f a (Option.map g b) = Option.map g' (map₂ f' a b)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\n⊢ map₂ f none (Option.map g b) = Option.map g' (map₂ f' none b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\nval✝ : α\n⊢ map₂ f (some val✝) (Option.map g b) = Option.map g' (map₂ f' (some val✝) b)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\n⊢ map₂ f none (Option.map g none) = Option.map g' (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\nval✝ : β\n⊢ map₂ f none (Option.map g (some val✝)) = Option.map g' (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\nval✝ : α\n⊢ map₂ f (some val✝) (Option.map g none) = Option.map g' (map₂ f' (some val✝) none)\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : α → β → δ\ng' : δ → γ\nh_right_comm : ∀ (a : α) (b : β), f a (g b) = g' (f' a b)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (Option.map g (some val✝)) = Option.map g' (map₂ f' (some val✝¹) (some val✝))\n[PROOFSTEP]\nsimp [h_right_comm]\n[GOAL]\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\n⊢ Option.map g (map₂ f a b) = map₂ f' (Option.map g₁ b) (Option.map g₂ a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\n⊢ Option.map g (map₂ f none b) = map₂ f' (Option.map g₁ b) (Option.map g₂ none)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' (Option.map g₁ b) (Option.map g₂ (some val✝))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\n⊢ Option.map g (map₂ f none none) = map₂ f' (Option.map g₁ none) (Option.map g₂ none)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' (Option.map g₁ (some val✝)) (Option.map g₂ none)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' (Option.map g₁ none) (Option.map g₂ (some val✝))\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_6\nγ : Type u_4\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\nα' : Type u_3\ng : γ → δ\nf' : β' → α' → δ\ng₁ : β → β'\ng₂ : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g₁ b) (g₂ a)\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (Option.map g₁ (some val✝)) (Option.map g₂ (some val✝¹))\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\n⊢ Option.map g (map₂ f a b) = map₂ f' (Option.map g' b) a\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\n⊢ Option.map g (map₂ f none b) = map₂ f' (Option.map g' b) none\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' (Option.map g' b) (some val✝)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\n⊢ Option.map g (map₂ f none none) = map₂ f' (Option.map g' none) none\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' (Option.map g' (some val✝)) none\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' (Option.map g' none) (some val✝)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nβ' : Type u_2\ng : γ → δ\nf' : β' → α → δ\ng' : β → β'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' (g' b) a\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (Option.map g' (some val✝)) (some val✝¹)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\n⊢ Option.map g (map₂ f a b) = map₂ f' b (Option.map g' a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\n⊢ Option.map g (map₂ f none b) = map₂ f' b (Option.map g' none)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nb : Option β\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) b) = map₂ f' b (Option.map g' (some val✝))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\n⊢ Option.map g (map₂ f none none) = map₂ f' none (Option.map g' none)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\nval✝ : β\n⊢ Option.map g (map₂ f none (some val✝)) = map₂ f' (some val✝) (Option.map g' none)\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\nval✝ : α\n⊢ Option.map g (map₂ f (some val✝) none) = map₂ f' none (Option.map g' (some val✝))\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf : α → β → γ\nc : Option γ\nδ : Type u_1\nα' : Type u_2\ng : γ → δ\nf' : β → α' → δ\ng' : α → α'\nh_antidistrib : ∀ (a : α) (b : β), g (f a b) = f' b (g' a)\nval✝¹ : α\nval✝ : β\n⊢ Option.map g (map₂ f (some val✝¹) (some val✝)) = map₂ f' (some val✝) (Option.map g' (some val✝¹))\n[PROOFSTEP]\nsimp [h_antidistrib]\n[GOAL]\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\n⊢ map₂ f (Option.map g a) b = Option.map g' (map₂ f' b a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\n⊢ map₂ f (Option.map g none) b = Option.map g' (map₂ f' b none)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\nval✝ : α\n⊢ map₂ f (Option.map g (some val✝)) b = Option.map g' (map₂ f' b (some val✝))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\n⊢ map₂ f (Option.map g none) none = Option.map g' (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_left_anticomm]\n[GOAL]\ncase none.some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\nval✝ : β\n⊢ map₂ f (Option.map g none) (some val✝) = Option.map g' (map₂ f' (some val✝) none)\n[PROOFSTEP]\nsimp [h_left_anticomm]\n[GOAL]\ncase some.none\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\nval✝ : α\n⊢ map₂ f (Option.map g (some val✝)) none = Option.map g' (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_left_anticomm]\n[GOAL]\ncase some.some\nα : Type u_5\nβ : Type u_4\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nα' : Type u_1\nδ : Type u_2\nf : α' → β → γ\ng : α → α'\nf' : β → α → δ\ng' : δ → γ\nh_left_anticomm : ∀ (a : α) (b : β), f (g a) b = g' (f' b a)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (Option.map g (some val✝¹)) (some val✝) = Option.map g' (map₂ f' (some val✝) (some val✝¹))\n[PROOFSTEP]\nsimp [h_left_anticomm]\n[GOAL]\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\na : Option α\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\n⊢ map₂ f a (Option.map g b) = Option.map g' (map₂ f' b a)\n[PROOFSTEP]\ncases a\n[GOAL]\ncase none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\n⊢ map₂ f none (Option.map g b) = Option.map g' (map₂ f' b none)\n[PROOFSTEP]\ncases b\n[GOAL]\ncase some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nb : Option β\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\nval✝ : α\n⊢ map₂ f (some val✝) (Option.map g b) = Option.map g' (map₂ f' b (some val✝))\n[PROOFSTEP]\ncases b\n[GOAL]\ncase none.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\n⊢ map₂ f none (Option.map g none) = Option.map g' (map₂ f' none none)\n[PROOFSTEP]\nsimp [h_right_anticomm]\n[GOAL]\ncase none.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\nval✝ : β\n⊢ map₂ f none (Option.map g (some val✝)) = Option.map g' (map₂ f' (some val✝) none)\n[PROOFSTEP]\nsimp [h_right_anticomm]\n[GOAL]\ncase some.none\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\nval✝ : α\n⊢ map₂ f (some val✝) (Option.map g none) = Option.map g' (map₂ f' none (some val✝))\n[PROOFSTEP]\nsimp [h_right_anticomm]\n[GOAL]\ncase some.some\nα : Type u_4\nβ : Type u_5\nγ : Type u_3\nf✝ : α → β → γ\nc : Option γ\nβ' : Type u_1\nδ : Type u_2\nf : α → β' → γ\ng : β → β'\nf' : β → α → δ\ng' : δ → γ\nh_right_anticomm : ∀ (a : α) (b : β), f a (g b) = g' (f' b a)\nval✝¹ : α\nval✝ : β\n⊢ map₂ f (some val✝¹) (Option.map g (some val✝)) = Option.map g' (map₂ f' (some val✝) (some val✝¹))\n[PROOFSTEP]\nsimp [h_right_anticomm]\n[GOAL]\nα : Type u_2\nβ : Type u_1\nγ : Type ?u.32843\nf✝ : α → β → γ\na✝ : Option α\nb : Option β\nc : Option γ\nf : α → β → β\na : α\nh : ∀ (b : β), f a b = b\no : Option β\n⊢ map₂ f (some a) o = o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase none\nα : Type u_2\nβ : Type u_1\nγ : Type ?u.32843\nf✝ : α → β → γ\na✝ : Option α\nb : Option β\nc : Option γ\nf : α → β → β\na : α\nh : ∀ (b : β), f a b = b\n⊢ map₂ f (some a) none = none\ncase some\nα : Type u_2\nβ : Type u_1\nγ : Type ?u.32843\nf✝ : α → β → γ\na✝ : Option α\nb : Option β\nc : Option γ\nf : α → β → β\na : α\nh : ∀ (b : β), f a b = b\nval✝ : β\n⊢ map₂ f (some a) (some val✝) = some val✝\n[PROOFSTEP]\nexacts [rfl, congr_arg some (h _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type ?u.33033\nf✝ : α → β → γ\na : Option α\nb✝ : Option β\nc : Option γ\nf : α → β → α\nb : β\nh : ∀ (a : α), f a b = a\no : Option α\n⊢ map₂ f o (some b) = o\n[PROOFSTEP]\nsimp [h, map₂]\n", "meta": {"mathlib_filename": "Mathlib.Data.Option.NAry", "llama_tokens": 29634, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5621765008857981, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.27230710087760307}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\n⊢ ∀ {x y : Set ℕ}, x ∈ range Ici → y ∈ range Ici → ∃ z, z ∈ range Ici ∧ z ⊆ x ∩ y\n[PROOFSTEP]\nrintro _ _ ⟨n, rfl⟩ ⟨m, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nn m : ℕ\n⊢ ∃ z, z ∈ range Ici ∧ z ⊆ Ici n ∩ Ici m\n[PROOFSTEP]\nexact ⟨Ici (max n m), mem_range_self _, Ici_inter_Ici.symm.subset⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\n⊢ ∀ {x y : Set α},\n    x ∈ {t | ∃ i, p i ∧ s i = t} → y ∈ {t | ∃ i, p i ∧ s i = t} → ∃ z, z ∈ {t | ∃ i, p i ∧ s i = t} ∧ z ⊆ x ∩ y\n[PROOFSTEP]\nrintro _ _ ⟨i, hi, rfl⟩ ⟨j, hj, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\ni : ι\nhi : p i\nj : ι\nhj : p j\n⊢ ∃ z, z ∈ {t | ∃ i, p i ∧ s i = t} ∧ z ⊆ s i ∩ s j\n[PROOFSTEP]\nrcases h.inter hi hj with ⟨k, hk, hk'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\ni : ι\nhi : p i\nj : ι\nhj : p j\nk : ι\nhk : p k\nhk' : s k ⊆ s i ∩ s j\n⊢ ∃ z, z ∈ {t | ∃ i, p i ∧ s i = t} ∧ z ⊆ s i ∩ s j\n[PROOFSTEP]\nexact ⟨_, ⟨k, hk, rfl⟩, hk'⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ FilterBasis.filter B = ⨅ (s : ↑B.sets), 𝓟 ↑s\n[PROOFSTEP]\nhave : Directed (· ≥ ·) fun s : B.sets => 𝓟 (s : Set α) :=\n  by\n  rintro ⟨U, U_in⟩ ⟨V, V_in⟩\n  rcases B.inter_sets U_in V_in with ⟨W, W_in, W_sub⟩\n  use⟨W, W_in⟩\n  simp only [ge_iff_le, le_principal_iff, mem_principal, Subtype.coe_mk]\n  exact subset_inter_iff.mp W_sub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ Directed (fun x x_1 => x ≥ x_1) fun s => 𝓟 ↑s\n[PROOFSTEP]\nrintro ⟨U, U_in⟩ ⟨V, V_in⟩\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ B.sets\nV : Set α\nV_in : V ∈ B.sets\n⊢ ∃ z,\n    (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := U, property := U_in }) ((fun s => 𝓟 ↑s) z) ∧\n      (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := V, property := V_in }) ((fun s => 𝓟 ↑s) z)\n[PROOFSTEP]\nrcases B.inter_sets U_in V_in with ⟨W, W_in, W_sub⟩\n[GOAL]\ncase mk.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ B.sets\nV : Set α\nV_in : V ∈ B.sets\nW : Set α\nW_in : W ∈ B.sets\nW_sub : W ⊆ U ∩ V\n⊢ ∃ z,\n    (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := U, property := U_in }) ((fun s => 𝓟 ↑s) z) ∧\n      (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := V, property := V_in }) ((fun s => 𝓟 ↑s) z)\n[PROOFSTEP]\nuse⟨W, W_in⟩\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ B.sets\nV : Set α\nV_in : V ∈ B.sets\nW : Set α\nW_in : W ∈ B.sets\nW_sub : W ⊆ U ∩ V\n⊢ (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := U, property := U_in })\n      ((fun s => 𝓟 ↑s) { val := W, property := W_in }) ∧\n    (fun x x_1 => x ≥ x_1) ((fun s => 𝓟 ↑s) { val := V, property := V_in })\n      ((fun s => 𝓟 ↑s) { val := W, property := W_in })\n[PROOFSTEP]\nsimp only [ge_iff_le, le_principal_iff, mem_principal, Subtype.coe_mk]\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ B.sets\nV : Set α\nV_in : V ∈ B.sets\nW : Set α\nW_in : W ∈ B.sets\nW_sub : W ⊆ U ∩ V\n⊢ W ⊆ U ∧ W ⊆ V\n[PROOFSTEP]\nexact subset_inter_iff.mp W_sub\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nthis : Directed (fun x x_1 => x ≥ x_1) fun s => 𝓟 ↑s\n⊢ FilterBasis.filter B = ⨅ (s : ↑B.sets), 𝓟 ↑s\n[PROOFSTEP]\next U\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nthis : Directed (fun x x_1 => x ≥ x_1) fun s => 𝓟 ↑s\nU : Set α\n⊢ U ∈ FilterBasis.filter B ↔ U ∈ ⨅ (s : ↑B.sets), 𝓟 ↑s\n[PROOFSTEP]\nsimp [mem_filter_iff, mem_iInf_of_directed this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ generate B.sets = FilterBasis.filter B\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ generate B.sets ≤ FilterBasis.filter B\n[PROOFSTEP]\nintro U U_in\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ FilterBasis.filter B\n⊢ U ∈ generate B.sets\n[PROOFSTEP]\nrcases B.mem_filter_iff.mp U_in with ⟨V, V_in, h⟩\n[GOAL]\ncase a.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\nU : Set α\nU_in : U ∈ FilterBasis.filter B\nV : Set α\nV_in : V ∈ B\nh : V ⊆ U\n⊢ U ∈ generate B.sets\n[PROOFSTEP]\nexact GenerateSets.superset (GenerateSets.basic V_in) h\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ FilterBasis.filter B ≤ generate B.sets\n[PROOFSTEP]\nrw [le_generate_iff]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nB : FilterBasis α\n⊢ B.sets ⊆ (FilterBasis.filter B).sets\n[PROOFSTEP]\napply mem_filter_of_mem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\nU : Set α\n⊢ U ∈ IsBasis.filter h ↔ ∃ i, p i ∧ s i ⊆ U\n[PROOFSTEP]\nsimp only [IsBasis.filter, FilterBasis.mem_filter_iff, mem_filterBasis_iff, exists_exists_and_eq_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\n⊢ IsBasis.filter h = generate {U | ∃ i, p i ∧ s i = U}\n[PROOFSTEP]\nerw [h.filterBasis.generate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\np : ι → Prop\ns : ι → Set α\nh : IsBasis p s\n⊢ IsBasis.filter h = FilterBasis.filter (IsBasis.filterBasis h)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\nU : Set α\n⊢ U ∈ generate s ↔ ∃ i, (Set.Finite i ∧ i ⊆ s) ∧ ⋂₀ i ⊆ U\n[PROOFSTEP]\nsimp only [mem_generate_iff, exists_prop, and_assoc, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\n⊢ ∀ {x y : Set α},\n    x ∈ sInter '' {t | Set.Finite t ∧ t ⊆ s} →\n      y ∈ sInter '' {t | Set.Finite t ∧ t ⊆ s} → ∃ z, z ∈ sInter '' {t | Set.Finite t ∧ t ⊆ s} ∧ z ⊆ x ∩ y\n[PROOFSTEP]\nrintro _ _ ⟨a, ⟨fina, suba⟩, rfl⟩ ⟨b, ⟨finb, subb⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns a : Set (Set α)\nfina : Set.Finite a\nsuba : a ⊆ s\nb : Set (Set α)\nfinb : Set.Finite b\nsubb : b ⊆ s\n⊢ ∃ z, z ∈ sInter '' {t | Set.Finite t ∧ t ⊆ s} ∧ z ⊆ ⋂₀ a ∩ ⋂₀ b\n[PROOFSTEP]\nexact ⟨⋂₀ (a ∪ b), mem_image_of_mem _ ⟨fina.union finb, union_subset suba subb⟩, (sInter_union _ _).subset⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p s\n⊢ l = l'\n[PROOFSTEP]\next t\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p s\nt : Set α\n⊢ t ∈ l ↔ t ∈ l'\n[PROOFSTEP]\nrw [hl.mem_iff, hl'.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : IsBasis p s\nt : Set α\n⊢ t ∈ IsBasis.filter h ↔ ∃ i, p i ∧ s i ⊆ t\n[PROOFSTEP]\nsimp only [h.mem_filter_iff, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\ni✝ j✝ : ι\nhi : p i✝\nhj : p j✝\n⊢ ∃ k, p k ∧ s k ⊆ s i✝ ∩ s j✝\n[PROOFSTEP]\nsimpa only [h.mem_iff] using inter_mem (h.mem_of_mem hi) (h.mem_of_mem hj)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\n⊢ IsBasis.filter (_ : IsBasis p s) = l\n[PROOFSTEP]\next U\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nU : Set α\n⊢ U ∈ IsBasis.filter (_ : IsBasis p s) ↔ U ∈ l\n[PROOFSTEP]\nsimp [h.mem_iff, IsBasis.mem_filter_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\n⊢ l = generate {U | ∃ i, p i ∧ s i = U}\n[PROOFSTEP]\nrw [← h.isBasis.filter_eq_generate, h.filter_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\n⊢ generate s = generate (sInter '' {t | Set.Finite t ∧ t ⊆ s})\n[PROOFSTEP]\nrw [← FilterBasis.ofSets_sets, FilterBasis.generate, ← (hasBasis_generate s).filter_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\n⊢ IsBasis.filter (_ : IsBasis (fun t => Set.Finite t ∧ t ⊆ s) fun t => ⋂₀ t) = FilterBasis.filter (FilterBasis.ofSets s)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\n⊢ FilterBasis.filter (FilterBasis.ofSets s) = generate s\n[PROOFSTEP]\nrw [← (FilterBasis.ofSets s).generate, FilterBasis.ofSets_sets, ← generate_eq_generate_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → s' i' ∈ l\n⊢ HasBasis l p' s'\n[PROOFSTEP]\nrefine' ⟨fun t => ⟨fun ht => _, fun ⟨i', hi', ht⟩ => mem_of_superset (h' i' hi') ht⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → s' i' ∈ l\nt : Set α\nht : t ∈ l\n⊢ ∃ i, p' i ∧ s' i ⊆ t\n[PROOFSTEP]\nrcases hl.mem_iff.1 ht with ⟨i, hi, ht⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → s' i' ∈ l\nt : Set α\nht✝ : t ∈ l\ni : ι\nhi : p i\nht : s i ⊆ t\n⊢ ∃ i, p' i ∧ s' i ⊆ t\n[PROOFSTEP]\nrcases h i hi with ⟨i', hi', hs's⟩\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni'✝ : ι'\nhl : HasBasis l p s\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → s' i' ∈ l\nt : Set α\nht✝ : t ∈ l\ni : ι\nhi : p i\nht : s i ⊆ t\ni' : ι'\nhi' : p' i'\nhs's : s' i' ⊆ s i\n⊢ ∃ i, p' i ∧ s' i ⊆ t\n[PROOFSTEP]\nexact ⟨i', hi', hs's.trans ht⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nq : α → Prop\n⊢ (∀ᶠ (x : α) in l, q x) ↔ ∃ i, p i ∧ ∀ ⦃x : α⦄, x ∈ s i → q x\n[PROOFSTEP]\nsimpa using hl.mem_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nq : α → Prop\n⊢ (∃ᶠ (x : α) in l, q x) ↔ ∀ (i : ι), p i → ∃ x, x ∈ s i ∧ q x\n[PROOFSTEP]\nsimp only [Filter.Frequently, hl.eventually_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nq : α → Prop\n⊢ (¬∃ i, p i ∧ ∀ ⦃x : α⦄, x ∈ s i → ¬q x) ↔ ∀ (i : ι), p i → ∃ x, x ∈ s i ∧ q x\n[PROOFSTEP]\npush_neg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nq : α → Prop\n⊢ (∀ (i : ι), p i → Exists fun ⦃x⦄ => x ∈ s i ∧ q x) ↔ ∀ (i : ι), p i → ∃ x, x ∈ s i ∧ q x\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\n⊢ (∀ {i : ι}, p i → Set.Nonempty (s i)) ↔ ¬∃ i, p i ∧ s i = ∅\n[PROOFSTEP]\nsimp only [not_exists, not_and, nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : Set (Set α)\n⊢ (∀ {i : Set (Set α)}, Set.Finite i ∧ i ⊆ s → Set.Nonempty (⋂₀ i)) ↔\n    ∀ (t : Set (Set α)), t ⊆ s → Set.Finite t → Set.Nonempty (⋂₀ t)\n[PROOFSTEP]\nsimp only [← and_imp, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nl : Filter α\nP : Set α → Prop\n⊢ HasBasis l (fun s => s ∈ l ∧ P s) id ↔ ∀ (t : Set α), t ∈ l → ∃ r, r ∈ l ∧ P r ∧ r ⊆ t\n[PROOFSTEP]\nsimp only [hasBasis_iff, id, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nl : Filter α\nP : Set α → Prop\n⊢ (∀ (t : Set α), t ∈ l ↔ ∃ i, i ∈ l ∧ P i ∧ i ⊆ t) ↔ ∀ (t : Set α), t ∈ l → ∃ r, r ∈ l ∧ P r ∧ r ⊆ t\n[PROOFSTEP]\nexact forall_congr' fun s => ⟨fun h => h.1, fun h => ⟨h, fun ⟨t, hl, _, hts⟩ => mem_of_superset hl hts⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nq : ι → Prop\nhq : ∀ (i : ι), p i → ∃ j, p j ∧ q j ∧ s j ⊆ s i\n⊢ HasBasis l (fun i => p i ∧ q i) s\n[PROOFSTEP]\nrefine' ⟨fun t => ⟨fun ht => _, fun ⟨i, hpi, hti⟩ => h.mem_iff.2 ⟨i, hpi.1, hti⟩⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nq : ι → Prop\nhq : ∀ (i : ι), p i → ∃ j, p j ∧ q j ∧ s j ⊆ s i\nt : Set α\nht : t ∈ l\n⊢ ∃ i, (p i ∧ q i) ∧ s i ⊆ t\n[PROOFSTEP]\nrcases h.mem_iff.1 ht with ⟨i, hpi, hti⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nq : ι → Prop\nhq : ∀ (i : ι), p i → ∃ j, p j ∧ q j ∧ s j ⊆ s i\nt : Set α\nht : t ∈ l\ni : ι\nhpi : p i\nhti : s i ⊆ t\n⊢ ∃ i, (p i ∧ q i) ∧ s i ⊆ t\n[PROOFSTEP]\nrcases hq i hpi with ⟨j, hpj, hqj, hji⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nq : ι → Prop\nhq : ∀ (i : ι), p i → ∃ j, p j ∧ q j ∧ s j ⊆ s i\nt : Set α\nht : t ∈ l\ni : ι\nhpi : p i\nhti : s i ⊆ t\nj : ι\nhpj : p j\nhqj : q j\nhji : s j ⊆ s i\n⊢ ∃ i, (p i ∧ q i) ∧ s i ⊆ t\n[PROOFSTEP]\nexact ⟨j, ⟨hpj, hqj⟩, hji.trans hti⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np✝ : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\np : Set α → Prop\nh : HasBasis l (fun s => s ∈ l ∧ p s) id\nV : Set α\nhV : V ∈ l\n⊢ HasBasis l (fun s => s ∈ l ∧ p s ∧ s ⊆ V) id\n[PROOFSTEP]\nsimpa only [and_assoc] using h.restrict_subset hV\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\n⊢ l ≤ l' ↔ ∀ (t : Set α), t ∈ l' → ∃ i, p i ∧ s i ⊆ t\n[PROOFSTEP]\nsimp only [le_def, hl.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\n⊢ l ≤ l' ↔ ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n[PROOFSTEP]\nsimp only [hl'.ge_iff, hl.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n⊢ l = l'\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n⊢ l ≤ l'\n[PROOFSTEP]\nrw [hl.le_basis_iff hl']\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n⊢ ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n[PROOFSTEP]\nsimpa using h'\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n⊢ l' ≤ l\n[PROOFSTEP]\nrw [hl'.le_basis_iff hl]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nh : ∀ (i : ι), p i → ∃ i', p' i' ∧ s' i' ⊆ s i\nh' : ∀ (i' : ι'), p' i' → ∃ i, p i ∧ s i ⊆ s' i'\n⊢ ∀ (i' : ι), p i' → ∃ i, p' i ∧ s' i ⊆ s i'\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\n⊢ ∀ (t : Set α), t ∈ l ⊓ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t\n[PROOFSTEP]\nintro t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ t ∈ l ⊓ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ t ∈ l ⊓ l' → ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t\n[PROOFSTEP]\nsimp only [mem_inf_iff, hl.mem_iff, hl'.mem_iff]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ (∃ t₁, (∃ i, p i ∧ s i ⊆ t₁) ∧ ∃ t₂, (∃ i, p' i ∧ s' i ⊆ t₂) ∧ t = t₁ ∩ t₂) →\n    ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t\n[PROOFSTEP]\nrintro ⟨t, ⟨i, hi, ht⟩, t', ⟨i', hi', ht'⟩, rfl⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni'✝ : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\ni : ι\nhi : p i\nht : s i ⊆ t\nt' : Set α\ni' : ι'\nhi' : p' i'\nht' : s' i' ⊆ t'\n⊢ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t ∩ t'\n[PROOFSTEP]\nexact ⟨⟨i, i'⟩, ⟨hi, hi'⟩, inter_subset_inter ht ht'⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ (∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∩ s' i.snd ⊆ t) → t ∈ l ⊓ l'\n[PROOFSTEP]\nrintro ⟨⟨i, i'⟩, ⟨hi, hi'⟩, H⟩\n[GOAL]\ncase mpr.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni'✝ : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\ni : ι\ni' : ι'\nH : s { fst := i, snd := i' }.fst ∩ s' { fst := i, snd := i' }.snd ⊆ t\nhi : p { fst := i, snd := i' }.fst\nhi' : p' { fst := i, snd := i' }.snd\n⊢ t ∈ l ⊓ l'\n[PROOFSTEP]\nexact mem_inf_of_inter (hl.mem_of_mem hi) (hl'.mem_of_mem hi') H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\n⊢ ∀ (t : Set α),\n    t ∈ ⨅ (i : ι), l i ↔\n      ∃ i,\n        (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n          ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ t\n[PROOFSTEP]\nintro t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ t ∈ ⨅ (i : ι), l i ↔\n    ∃ i,\n      (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n        ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ t ∈ ⨅ (i : ι), l i →\n    ∃ i,\n      (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n        ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ t\n[PROOFSTEP]\nsimp only [mem_iInf', (hl _).mem_iff]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ (∃ I,\n      Set.Finite I ∧\n        ∃ V,\n          (∀ (i : ι), ∃ i_1, p i i_1 ∧ s i i_1 ⊆ V i) ∧\n            (∀ (i : ι), ¬i ∈ I → V i = univ) ∧ t = ⋂ (i : ι) (_ : i ∈ I), V i ∧ t = ⋂ (i : ι), V i) →\n    ∃ i,\n      (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n        ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ t\n[PROOFSTEP]\nrintro ⟨I, hI, V, hV, -, rfl, -⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nI : Set ι\nhI : Set.Finite I\nV : ι → Set α\nhV : ∀ (i : ι), ∃ i_1, p i i_1 ∧ s i i_1 ⊆ V i\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n      ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ ⋂ (i : ι) (_ : i ∈ I), V i\n[PROOFSTEP]\nchoose u hu using hV\n[GOAL]\ncase mp.intro.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nI : Set ι\nhI : Set.Finite I\nV : ι → Set α\nu : (i : ι) → ι' i\nhu : ∀ (i : ι), p i (u i) ∧ s i (u i) ⊆ V i\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n      ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ ⋂ (i : ι) (_ : i ∈ I), V i\n[PROOFSTEP]\nexact ⟨⟨I, u⟩, ⟨hI, fun i _ => (hu i).1⟩, iInter₂_mono fun i _ => (hu i).2⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ (∃ i,\n      (Set.Finite i.fst ∧ ∀ (i_1 : ι), i_1 ∈ i.fst → p i_1 (Prod.snd i i_1)) ∧\n        ⋂ (i_1 : ι) (_ : i_1 ∈ i.fst), s i_1 (Prod.snd i i_1) ⊆ t) →\n    t ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nrintro ⟨⟨I, f⟩, ⟨hI₁, hI₂⟩, hsub⟩\n[GOAL]\ncase mpr.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nI : Set ι\nf : (i : ι) → ι' i\nhsub : ⋂ (i : ι) (_ : i ∈ (I, f).fst), s i (Prod.snd (I, f) i) ⊆ t\nhI₁ : Set.Finite (I, f).fst\nhI₂ : ∀ (i : ι), i ∈ (I, f).fst → p i (Prod.snd (I, f) i)\n⊢ t ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nrefine' mem_of_superset _ hsub\n[GOAL]\ncase mpr.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nI : Set ι\nf : (i : ι) → ι' i\nhsub : ⋂ (i : ι) (_ : i ∈ (I, f).fst), s i (Prod.snd (I, f) i) ⊆ t\nhI₁ : Set.Finite (I, f).fst\nhI₂ : ∀ (i : ι), i ∈ (I, f).fst → p i (Prod.snd (I, f) i)\n⊢ ⋂ (i : ι) (_ : i ∈ (I, f).fst), s i (Prod.snd (I, f) i) ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nexact (biInter_mem hI₁).mpr fun i hi => mem_iInf_of_mem i <| (hl i).mem_of_mem <| hI₂ _ hi\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\n⊢ HasBasis (⨅ (i : ι), l i) (fun If => Set.Finite If.fst ∧ ∀ (i : ↑If.fst), p (↑i) (Sigma.snd If i)) fun If =>\n    ⋂ (i : ↑If.fst), s (↑i) (Sigma.snd If i)\n[PROOFSTEP]\nrefine' ⟨fun t => ⟨fun ht => _, _⟩⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nht : t ∈ ⨅ (i : ι), l i\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : ↑i.fst), p (↑i_1) (Sigma.snd i i_1)) ∧ ⋂ (i_1 : ↑i.fst), s (↑i_1) (Sigma.snd i i_1) ⊆ t\n[PROOFSTEP]\nrcases(hasBasis_iInf' hl).mem_iff.mp ht with ⟨⟨I, f⟩, ⟨hI, hf⟩, hsub⟩\n[GOAL]\ncase refine'_1.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nht : t ∈ ⨅ (i : ι), l i\nI : Set ι\nf : (i : ι) → ι' i\nhsub : ⋂ (i : ι) (_ : i ∈ (I, f).fst), s i (Prod.snd (I, f) i) ⊆ t\nhI : Set.Finite (I, f).fst\nhf : ∀ (i : ι), i ∈ (I, f).fst → p i (Prod.snd (I, f) i)\n⊢ ∃ i,\n    (Set.Finite i.fst ∧ ∀ (i_1 : ↑i.fst), p (↑i_1) (Sigma.snd i i_1)) ∧ ⋂ (i_1 : ↑i.fst), s (↑i_1) (Sigma.snd i i_1) ⊆ t\n[PROOFSTEP]\nexact ⟨⟨I, fun i => f i⟩, ⟨hI, Subtype.forall.mpr hf⟩, trans (iInter_subtype _ _) hsub⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ (∃ i,\n      (Set.Finite i.fst ∧ ∀ (i_1 : ↑i.fst), p (↑i_1) (Sigma.snd i i_1)) ∧\n        ⋂ (i_1 : ↑i.fst), s (↑i_1) (Sigma.snd i i_1) ⊆ t) →\n    t ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nrintro ⟨⟨I, f⟩, ⟨hI, hf⟩, hsub⟩\n[GOAL]\ncase refine'_2.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nI : Set ι\nf : (i : ↑I) → ι' ↑i\nhsub : ⋂ (i : ↑{ fst := I, snd := f }.fst), s (↑i) (Sigma.snd { fst := I, snd := f } i) ⊆ t\nhI : Set.Finite { fst := I, snd := f }.fst\nhf : ∀ (i : ↑{ fst := I, snd := f }.fst), p (↑i) (Sigma.snd { fst := I, snd := f } i)\n⊢ t ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nrefine' mem_of_superset _ hsub\n[GOAL]\ncase refine'_2.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nI : Set ι\nf : (i : ↑I) → ι' ↑i\nhsub : ⋂ (i : ↑{ fst := I, snd := f }.fst), s (↑i) (Sigma.snd { fst := I, snd := f } i) ⊆ t\nhI : Set.Finite { fst := I, snd := f }.fst\nhf : ∀ (i : ↑{ fst := I, snd := f }.fst), p (↑i) (Sigma.snd { fst := I, snd := f } i)\n⊢ ⋂ (i : ↑{ fst := I, snd := f }.fst), s (↑i) (Sigma.snd { fst := I, snd := f } i) ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\ncases hI.nonempty_fintype\n[GOAL]\ncase refine'_2.intro.mk.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\nI : Set ι\nf : (i : ↑I) → ι' ↑i\nhsub : ⋂ (i : ↑{ fst := I, snd := f }.fst), s (↑i) (Sigma.snd { fst := I, snd := f } i) ⊆ t\nhI : Set.Finite { fst := I, snd := f }.fst\nhf : ∀ (i : ↑{ fst := I, snd := f }.fst), p (↑i) (Sigma.snd { fst := I, snd := f } i)\nval✝ : Fintype ↑{ fst := I, snd := f }.fst\n⊢ ⋂ (i : ↑{ fst := I, snd := f }.fst), s (↑i) (Sigma.snd { fst := I, snd := f } i) ∈ ⨅ (i : ι), l i\n[PROOFSTEP]\nexact iInter_mem.2 fun i => mem_iInf_of_mem ↑i <| (hl i).mem_of_mem <| hf _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\n⊢ HasBasis (⨅ (i : ι), l i) (fun ii' => p ii'.fst ii'.snd) fun ii' => s ii'.fst ii'.snd\n[PROOFSTEP]\nrefine' ⟨fun t => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\nt : Set α\n⊢ t ∈ ⨅ (i : ι), l i ↔ ∃ i, p i.fst i.snd ∧ s i.fst i.snd ⊆ t\n[PROOFSTEP]\nrw [mem_iInf_of_directed h, Sigma.exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\nt : Set α\n⊢ (∃ i, t ∈ l i) ↔\n    ∃ a b,\n      p { fst := a, snd := b }.fst { fst := a, snd := b }.snd ∧\n        s { fst := a, snd := b }.fst { fst := a, snd := b }.snd ⊆ t\n[PROOFSTEP]\nexact exists_congr fun i => (hl i).mem_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\n⊢ HasBasis (⨅ (i : ι), l i) (fun ii' => p ii'.fst ii'.snd) fun ii' => s ii'.fst ii'.snd\n[PROOFSTEP]\nrefine' ⟨fun t => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\nt : Set α\n⊢ t ∈ ⨅ (i : ι), l i ↔ ∃ i, p i.fst i.snd ∧ s i.fst i.snd ⊆ t\n[PROOFSTEP]\nrw [mem_iInf_of_directed h, Prod.exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ninst✝ : Nonempty ι\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nh : Directed (fun x x_1 => x ≥ x_1) l\nt : Set α\n⊢ (∃ i, t ∈ l i) ↔ ∃ a b, p (a, b).fst (a, b).snd ∧ s (a, b).fst (a, b).snd ⊆ t\n[PROOFSTEP]\nexact exists_congr fun i => (hl i).mem_iff\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\n⊢ HasBasis (⨅ (i : ι) (_ : i ∈ dom), l i) (fun ii' => ii'.fst ∈ dom ∧ p ii'.fst ii'.snd) fun ii' => s ii'.fst ii'.snd\n[PROOFSTEP]\nrefine' ⟨fun t => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\n⊢ t ∈ ⨅ (i : ι) (_ : i ∈ dom), l i ↔ ∃ i, (i.fst ∈ dom ∧ p i.fst i.snd) ∧ s i.fst i.snd ⊆ t\n[PROOFSTEP]\nrw [mem_biInf_of_directed h hdom, Sigma.exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\n⊢ (∃ i, i ∈ dom ∧ t ∈ l i) ↔\n    ∃ a b,\n      ({ fst := a, snd := b }.fst ∈ dom ∧ p { fst := a, snd := b }.fst { fst := a, snd := b }.snd) ∧\n        s { fst := a, snd := b }.fst { fst := a, snd := b }.snd ⊆ t\n[PROOFSTEP]\nrefine' exists_congr fun i => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\n⊢ i ∈ dom ∧ t ∈ l i →\n    ∃ b,\n      ({ fst := i, snd := b }.fst ∈ dom ∧ p { fst := i, snd := b }.fst { fst := i, snd := b }.snd) ∧\n        s { fst := i, snd := b }.fst { fst := i, snd := b }.snd ⊆ t\n[PROOFSTEP]\nrintro ⟨hi, hti⟩\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nhi : i ∈ dom\nhti : t ∈ l i\n⊢ ∃ b,\n    ({ fst := i, snd := b }.fst ∈ dom ∧ p { fst := i, snd := b }.fst { fst := i, snd := b }.snd) ∧\n      s { fst := i, snd := b }.fst { fst := i, snd := b }.snd ⊆ t\n[PROOFSTEP]\nrcases(hl i hi).mem_iff.mp hti with ⟨b, hb, hbt⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nhi : i ∈ dom\nhti : t ∈ l i\nb : ι' i\nhb : p i b\nhbt : s i b ⊆ t\n⊢ ∃ b,\n    ({ fst := i, snd := b }.fst ∈ dom ∧ p { fst := i, snd := b }.fst { fst := i, snd := b }.snd) ∧\n      s { fst := i, snd := b }.fst { fst := i, snd := b }.snd ⊆ t\n[PROOFSTEP]\nexact ⟨b, ⟨hi, hb⟩, hbt⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\n⊢ (∃ b,\n      ({ fst := i, snd := b }.fst ∈ dom ∧ p { fst := i, snd := b }.fst { fst := i, snd := b }.snd) ∧\n        s { fst := i, snd := b }.fst { fst := i, snd := b }.snd ⊆ t) →\n    i ∈ dom ∧ t ∈ l i\n[PROOFSTEP]\nrintro ⟨b, ⟨hi, hb⟩, hibt⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : ι → Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : (i : ι) → ι' i → Set α\np : (i : ι) → ι' i → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nb : ι' i\nhibt : s { fst := i, snd := b }.fst { fst := i, snd := b }.snd ⊆ t\nhi : { fst := i, snd := b }.fst ∈ dom\nhb : p { fst := i, snd := b }.fst { fst := i, snd := b }.snd\n⊢ i ∈ dom ∧ t ∈ l i\n[PROOFSTEP]\nexact ⟨hi, (hl i hi).mem_iff.mpr ⟨b, hb, hibt⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\n⊢ HasBasis (⨅ (i : ι) (_ : i ∈ dom), l i) (fun ii' => ii'.fst ∈ dom ∧ p ii'.fst ii'.snd) fun ii' => s ii'.fst ii'.snd\n[PROOFSTEP]\nrefine' ⟨fun t => _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\n⊢ t ∈ ⨅ (i : ι) (_ : i ∈ dom), l i ↔ ∃ i, (i.fst ∈ dom ∧ p i.fst i.snd) ∧ s i.fst i.snd ⊆ t\n[PROOFSTEP]\nrw [mem_biInf_of_directed h hdom, Prod.exists]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\n⊢ (∃ i, i ∈ dom ∧ t ∈ l i) ↔ ∃ a b, ((a, b).fst ∈ dom ∧ p (a, b).fst (a, b).snd) ∧ s (a, b).fst (a, b).snd ⊆ t\n[PROOFSTEP]\nrefine' exists_congr fun i => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\n⊢ i ∈ dom ∧ t ∈ l i → ∃ b, ((i, b).fst ∈ dom ∧ p (i, b).fst (i, b).snd) ∧ s (i, b).fst (i, b).snd ⊆ t\n[PROOFSTEP]\nrintro ⟨hi, hti⟩\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nhi : i ∈ dom\nhti : t ∈ l i\n⊢ ∃ b, ((i, b).fst ∈ dom ∧ p (i, b).fst (i, b).snd) ∧ s (i, b).fst (i, b).snd ⊆ t\n[PROOFSTEP]\nrcases(hl i hi).mem_iff.mp hti with ⟨b, hb, hbt⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nhi : i ∈ dom\nhti : t ∈ l i\nb : ι'\nhb : p i b\nhbt : s i b ⊆ t\n⊢ ∃ b, ((i, b).fst ∈ dom ∧ p (i, b).fst (i, b).snd) ∧ s (i, b).fst (i, b).snd ⊆ t\n[PROOFSTEP]\nexact ⟨b, ⟨hi, hb⟩, hbt⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\n⊢ (∃ b, ((i, b).fst ∈ dom ∧ p (i, b).fst (i, b).snd) ∧ s (i, b).fst (i, b).snd ⊆ t) → i ∈ dom ∧ t ∈ l i\n[PROOFSTEP]\nrintro ⟨b, ⟨hi, hb⟩, hibt⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni✝ : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Type u_6\nι' : Type u_7\ndom : Set ι\nhdom : Set.Nonempty dom\nl : ι → Filter α\ns : ι → ι' → Set α\np : ι → ι' → Prop\nhl : ∀ (i : ι), i ∈ dom → HasBasis (l i) (p i) (s i)\nh : DirectedOn (l ⁻¹'o GE.ge) dom\nt : Set α\ni : ι\nb : ι'\nhibt : s (i, b).fst (i, b).snd ⊆ t\nhi : (i, b).fst ∈ dom\nhb : p (i, b).fst (i, b).snd\n⊢ i ∈ dom ∧ t ∈ l i\n[PROOFSTEP]\nexact ⟨hi, (hl i hi).mem_iff.mpr ⟨b, hb, hibt⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nt U : Set α\n⊢ U ∈ 𝓟 t ↔ ∃ i, True ∧ t ⊆ U\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nx : α\n⊢ HasBasis (pure x) (fun x => True) fun x_1 => {x}\n[PROOFSTEP]\nsimp only [← principal_singleton, hasBasis_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\n⊢ ∀ (t : Set α), t ∈ l ⊔ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∪ s' i.snd ⊆ t\n[PROOFSTEP]\nintro t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ t ∈ l ⊔ l' ↔ ∃ i, (p i.fst ∧ p' i.snd) ∧ s i.fst ∪ s' i.snd ⊆ t\n[PROOFSTEP]\nsimp_rw [mem_sup, hl.mem_iff, hl'.mem_iff, PProd.exists, union_subset_iff, ← exists_and_right, ← exists_and_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\nt : Set α\n⊢ (∃ x x_1, (p x ∧ s x ⊆ t) ∧ p' x_1 ∧ s' x_1 ⊆ t) ↔ ∃ a b, (p a ∧ p' b) ∧ s a ⊆ t ∧ s' b ⊆ t\n[PROOFSTEP]\nsimp only [and_assoc, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι'✝ : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι'✝ → Prop\ns' : ι'✝ → Set α\ni' : ι'✝\nι : Sort u_6\nι' : ι → Type u_7\nl : ι → Filter α\np : (i : ι) → ι' i → Prop\ns : (i : ι) → ι' i → Set α\nhl : ∀ (i : ι), HasBasis (l i) (p i) (s i)\nt : Set α\n⊢ t ∈ ⨆ (i : ι), l i ↔ ∃ i, (∀ (i_1 : ι), p i_1 (i i_1)) ∧ ⋃ (i_1 : ι), s i_1 (i i_1) ⊆ t\n[PROOFSTEP]\nsimp only [hasBasis_iff, (hl _).mem_iff, Classical.skolem, forall_and, iUnion_subset_iff, mem_iSup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nt u : Set α\n⊢ u ∈ l ⊔ 𝓟 t ↔ ∃ i, p i ∧ s i ∪ t ⊆ u\n[PROOFSTEP]\nsimp only [(hl.sup' (hasBasis_principal t)).mem_iff, PProd.exists, exists_prop, and_true_iff, Unique.exists_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nx : α\n⊢ HasBasis (l ⊔ pure x) p fun i => s i ∪ {x}\n[PROOFSTEP]\nsimp only [← principal_singleton, hl.sup_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns'✝ : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\ns' t : Set α\n⊢ t ∈ l ⊓ 𝓟 s' ↔ ∃ i, p i ∧ s i ∩ s' ⊆ t\n[PROOFSTEP]\nsimp only [mem_inf_principal, hl.mem_iff, subset_def, mem_setOf_eq, mem_inter_iff, and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns'✝ : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\ns' : Set α\n⊢ HasBasis (𝓟 s' ⊓ l) p fun i => s' ∩ s i\n[PROOFSTEP]\nsimpa only [inf_comm, inter_comm] using hl.inf_principal s'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\n⊢ (∀ {i : PProd ι ι'}, p i.fst ∧ p' i.snd → Set.Nonempty (s i.fst ∩ s' i.snd)) ↔\n    ∀ ⦃i : ι⦄, p i → ∀ ⦃i' : ι'⦄, p' i' → Set.Nonempty (s i ∩ s' i')\n[PROOFSTEP]\nsimp [@forall_swap _ ι']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nhl : HasBasis l p s\nhl' : HasBasis l' p' s'\n⊢ ¬Disjoint l l' ↔ ¬∃ i, p i ∧ ∃ i', p' i' ∧ Disjoint (s i) (s' i')\n[PROOFSTEP]\nsimp only [_root_.disjoint_iff, ← Ne.def, ← neBot_iff, inf_eq_inter, hl.inf_basis_neBot_iff hl', not_exists, not_and,\n  bot_eq_empty, ← nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_7\ninst✝ : Finite I\nl : I → Filter α\nι : I → Sort u_6\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nhd : Pairwise (Disjoint on l)\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ Pairwise (Disjoint on fun i => s i (ind i))\n[PROOFSTEP]\nrcases hd.exists_mem_filter_of_disjoint with ⟨t, htl, hd⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_7\ninst✝ : Finite I\nl : I → Filter α\nι : I → Sort u_6\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nhd✝ : Pairwise (Disjoint on l)\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\nt : I → Set α\nhtl : ∀ (i : I), t i ∈ l i\nhd : Pairwise (Disjoint on t)\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ Pairwise (Disjoint on fun i => s i (ind i))\n[PROOFSTEP]\nchoose ind hp ht using fun i => (h i).mem_iff.1 (htl i)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_7\ninst✝ : Finite I\nl : I → Filter α\nι : I → Sort u_6\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nhd✝ : Pairwise (Disjoint on l)\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\nt : I → Set α\nhtl : ∀ (i : I), t i ∈ l i\nhd : Pairwise (Disjoint on t)\nind : (i : I) → ι i\nhp : ∀ (i : I), p i (ind i)\nht : ∀ (i : I), s i (ind i) ⊆ t i\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ Pairwise (Disjoint on fun i => s i (ind i))\n[PROOFSTEP]\nexact ⟨ind, hp, hd.mono fun i j hij => hij.mono (ht _) (ht _)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_6\nl : I → Filter α\nι : I → Sort u_7\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nS : Set I\nhd : PairwiseDisjoint S l\nhS : Set.Finite S\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ PairwiseDisjoint S fun i => s i (ind i)\n[PROOFSTEP]\nrcases hd.exists_mem_filter hS with ⟨t, htl, hd⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_6\nl : I → Filter α\nι : I → Sort u_7\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nS : Set I\nhd✝ : PairwiseDisjoint S l\nhS : Set.Finite S\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\nt : I → Set α\nhtl : ∀ (i : I), t i ∈ l i\nhd : PairwiseDisjoint S t\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ PairwiseDisjoint S fun i => s i (ind i)\n[PROOFSTEP]\nchoose ind hp ht using fun i => (h i).mem_iff.1 (htl i)\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl✝ l' : Filter α\np✝ : ι✝ → Prop\ns✝ : ι✝ → Set α\nt✝ : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nI : Type u_6\nl : I → Filter α\nι : I → Sort u_7\np : (i : I) → ι i → Prop\ns : (i : I) → ι i → Set α\nS : Set I\nhd✝ : PairwiseDisjoint S l\nhS : Set.Finite S\nh : ∀ (i : I), HasBasis (l i) (p i) (s i)\nt : I → Set α\nhtl : ∀ (i : I), t i ∈ l i\nhd : PairwiseDisjoint S t\nind : (i : I) → ι i\nhp : ∀ (i : I), p i (ind i)\nht : ∀ (i : I), s i (ind i) ⊆ t i\n⊢ ∃ ind, (∀ (i : I), p i (ind i)) ∧ PairwiseDisjoint S fun i => s i (ind i)\n[PROOFSTEP]\nexact ⟨ind, hp, hd.mono ht⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : Filter α\ns : Set α\n⊢ s ∈ f ↔ f ⊓ 𝓟 sᶜ = ⊥\n[PROOFSTEP]\nrefine' not_iff_not.1 ((inf_principal_neBot_iff.trans _).symm.trans neBot_iff)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : Filter α\ns : Set α\n⊢ (∀ (U : Set α), U ∈ f → Set.Nonempty (U ∩ sᶜ)) ↔ ¬s ∈ f\n[PROOFSTEP]\nexact\n  ⟨fun h hs => by simpa [Set.not_nonempty_empty] using h s hs, fun hs t ht =>\n    inter_compl_nonempty_iff.2 fun hts => hs <| mem_of_superset ht hts⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : Filter α\ns : Set α\nh : ∀ (U : Set α), U ∈ f → Set.Nonempty (U ∩ sᶜ)\nhs : s ∈ f\n⊢ False\n[PROOFSTEP]\nsimpa [Set.not_nonempty_empty] using h s hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : Filter α\ns : Set α\n⊢ Disjoint f (𝓟 s) ↔ sᶜ ∈ f\n[PROOFSTEP]\nrw [mem_iff_inf_principal_compl, compl_compl, disjoint_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : Filter α\ns : Set α\n⊢ Disjoint (𝓟 s) f ↔ sᶜ ∈ f\n[PROOFSTEP]\nrw [disjoint_comm, disjoint_principal_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns t : Set α\n⊢ Disjoint (𝓟 s) (𝓟 t) ↔ Disjoint s t\n[PROOFSTEP]\nrw [← subset_compl_iff_disjoint_left, disjoint_principal_left, mem_principal]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nx y : α\n⊢ Disjoint (pure x) (pure y) ↔ x ≠ y\n[PROOFSTEP]\nsimp only [← principal_singleton, disjoint_principal_principal, disjoint_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nl₁ l₂ : Filter α\n⊢ (diagonal α)ᶜ ∈ l₁ ×ˢ l₂ ↔ Disjoint l₁ l₂\n[PROOFSTEP]\nsimp only [mem_prod_iff, Filter.disjoint_iff, prod_subset_compl_diagonal_iff_disjoint]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\n⊢ Disjoint l l' ↔ ∃ i, p i ∧ (s i)ᶜ ∈ l'\n[PROOFSTEP]\nsimp only [h.disjoint_iff l'.basis_sets, id, ← disjoint_principal_left,\n  (hasBasis_principal _).disjoint_iff l'.basis_sets, true_and, Unique.exists_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf g : Filter α\n⊢ NeBot (f ⊓ g) ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in f, p x) → ∃ᶠ (x : α) in g, p x\n[PROOFSTEP]\nsimp only [inf_neBot_iff, frequently_iff, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf g : Filter α\n⊢ (∀ ⦃s : Set α⦄, s ∈ f → ∀ ⦃s' : Set α⦄, s' ∈ g → Set.Nonempty (s ∩ s')) ↔\n    ∀ {p : α → Prop}, (∀ᶠ (x : α) in f, p x) → ∀ {U : Set α}, U ∈ g → ∃ x, p x ∧ x ∈ U\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf g : Filter α\n⊢ NeBot (f ⊓ g) ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in g, p x) → ∃ᶠ (x : α) in f, p x\n[PROOFSTEP]\nrw [inf_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf g : Filter α\n⊢ NeBot (g ⊓ f) ↔ ∀ {p : α → Prop}, (∀ᶠ (x : α) in g, p x) → ∃ᶠ (x : α) in f, p x\n[PROOFSTEP]\nexact inf_neBot_iff_frequently_left\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nx✝ : Set α\n⊢ x✝ ∈ l ↔ ∃ i, p i ∧ x✝ ∈ 𝓟 (s i)\n[PROOFSTEP]\nsimp only [h.mem_iff, mem_principal, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l (fun x => True) s\n⊢ l = ⨅ (i : ι), 𝓟 (s i)\n[PROOFSTEP]\nsimpa only [iInf_true] using h.eq_biInf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : ι → Set α\nh : Directed (fun x x_1 => x ≥ x_1) s\ninst✝ : Nonempty ι\nt : Set α\n⊢ t ∈ ⨅ (i : ι), 𝓟 (s i) ↔ ∃ i, True ∧ s i ⊆ t\n[PROOFSTEP]\nsimpa only [true_and] using mem_iInf_of_directed (h.mono_comp monotone_principal.dual) t\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nι : Type u_6\ns : ι → Set α\n⊢ HasBasis (⨅ (i : ι), 𝓟 (s i)) (fun t => Set.Finite t) fun t => ⋂ (i : ι) (_ : i ∈ t), s i\n[PROOFSTEP]\nrefine' ⟨fun U => (mem_iInf_finite _).trans _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι✝ → Prop\ns✝ : ι✝ → Set α\nt : Set α\ni : ι✝\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nι : Type u_6\ns : ι → Set α\nU : Set α\n⊢ (∃ t, U ∈ ⨅ (i : ι) (_ : i ∈ t), 𝓟 (s i)) ↔ ∃ i, Set.Finite i ∧ ⋂ (i_1 : ι) (_ : i_1 ∈ i), s i_1 ⊆ U\n[PROOFSTEP]\nsimp only [iInf_principal_finset, mem_iUnion, mem_principal, exists_prop, exists_finite_iff_finset,\n  Finset.set_biInter_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : β → Set α\nS : Set β\nh : DirectedOn (s ⁻¹'o fun x x_1 => x ≥ x_1) S\nne : Set.Nonempty S\nt : Set α\n⊢ t ∈ ⨅ (i : β) (_ : i ∈ S), 𝓟 (s i) ↔ ∃ i, i ∈ S ∧ s i ⊆ t\n[PROOFSTEP]\nrefine' mem_biInf_of_directed _ ne\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : β → Set α\nS : Set β\nh : DirectedOn (s ⁻¹'o fun x x_1 => x ≥ x_1) S\nne : Set.Nonempty S\nt : Set α\n⊢ DirectedOn ((fun i => 𝓟 (s i)) ⁻¹'o fun x x_1 => x ≥ x_1) S\n[PROOFSTEP]\nrw [directedOn_iff_directed, ← directed_comp] at h ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : β → Set α\nS : Set β\nh : Directed (fun x x_1 => x ≥ x_1) (s ∘ Subtype.val)\nne : Set.Nonempty S\nt : Set α\n⊢ Directed (fun x x_1 => x ≥ x_1) ((fun i => 𝓟 (s i)) ∘ Subtype.val)\n[PROOFSTEP]\nrefine' h.mono_comp _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns✝ : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\ns : β → Set α\nS : Set β\nh : Directed (fun x x_1 => x ≥ x_1) (s ∘ Subtype.val)\nne : Set.Nonempty S\nt : Set α\n⊢ ∀ ⦃x y : Set α⦄, x ≥ y → 𝓟 x ≥ 𝓟 y\n[PROOFSTEP]\nexact fun _ _ => principal_mono.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : α → β\nhl : HasBasis l p s\nt : Set β\n⊢ t ∈ Filter.map f l ↔ ∃ i, p i ∧ f '' s i ⊆ t\n[PROOFSTEP]\nsimp only [mem_map, image_subset_iff, hl.mem_iff, preimage]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : β → α\nhl : HasBasis l p s\nt : Set β\n⊢ t ∈ Filter.comap f l ↔ ∃ i, p i ∧ f ⁻¹' s i ⊆ t\n[PROOFSTEP]\nsimp only [mem_comap', hl.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : β → α\nhl : HasBasis l p s\nt : Set β\n⊢ (∃ i, p i ∧ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t}) ↔ ∃ i, p i ∧ f ⁻¹' s i ⊆ t\n[PROOFSTEP]\nrefine exists_congr (fun i => Iff.rfl.and ?_)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : β → α\nhl : HasBasis l p s\nt : Set β\ni : ι\n⊢ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t} ↔ f ⁻¹' s i ⊆ t\n[PROOFSTEP]\nexact ⟨fun h x hx => h hx rfl, fun h y hy x hx => h <| by rwa [mem_preimage, hx]⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt✝ : Set α\ni✝ : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nf : β → α\nhl : HasBasis l p s\nt : Set β\ni : ι\nh : f ⁻¹' s i ⊆ t\ny : α\nhy : y ∈ s i\nx : β\nhx : f x = y\n⊢ x ∈ f ⁻¹' s i\n[PROOFSTEP]\nrwa [mem_preimage, hx]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nx : α\n⊢ (∀ (t : Set α), t ∈ l → x ∈ t) ↔ ∀ (i : ι), p i → x ∈ s i\n[PROOFSTEP]\nsimp only [h.mem_iff, exists_imp, and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\nx : α\n⊢ (∀ (t : Set α) (x_1 : ι), p x_1 → s x_1 ⊆ t → x ∈ t) ↔ ∀ (i : ι), p i → x ∈ s i\n[PROOFSTEP]\nexact ⟨fun h i hi => h (s i) i hi Subset.rfl, fun h t i hi ht => ht (h i hi)⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\n⊢ ⋂₀ l.sets = ⋂ (i : ι) (_ : p i), s i\n[PROOFSTEP]\nrw [sInter_eq_biInter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nl l' : Filter α\np : ι → Prop\ns : ι → Set α\nt : Set α\ni : ι\np' : ι' → Prop\ns' : ι' → Set α\ni' : ι'\nh : HasBasis l p s\n⊢ ⋂ (i : Set α) (_ : i ∈ l.sets), i = ⋂ (i : ι) (_ : p i), s i\n[PROOFSTEP]\nexact h.biInter_mem monotone_id\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb : ι' → Set β\nf : α → β\nhla : HasBasis la pa sa\n⊢ Tendsto f la lb ↔ ∀ (t : Set β), t ∈ lb → ∃ i, pa i ∧ MapsTo f (sa i) t\n[PROOFSTEP]\nsimp only [Tendsto, (hla.map f).le_iff, image_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb : ι' → Set β\nf : α → β\nhla : HasBasis la pa sa\n⊢ (∀ (t : Set β), t ∈ lb → ∃ i, pa i ∧ sa i ⊆ f ⁻¹' t) ↔ ∀ (t : Set β), t ∈ lb → ∃ i, pa i ∧ MapsTo f (sa i) t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb : ι' → Set β\nf : α → β\nhlb : HasBasis lb pb sb\n⊢ Tendsto f la lb ↔ ∀ (i : ι'), pb i → ∀ᶠ (x : α) in la, f x ∈ sb i\n[PROOFSTEP]\nsimp only [Tendsto, hlb.ge_iff, mem_map', Filter.Eventually]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb : ι' → Set β\nf : α → β\nhla : HasBasis la pa sa\nhlb : HasBasis lb pb sb\n⊢ Tendsto f la lb ↔ ∀ (ib : ι'), pb ib → ∃ ia, pa ia ∧ ∀ (x : α), x ∈ sa ia → f x ∈ sb ib\n[PROOFSTEP]\nsimp [hlb.tendsto_right_iff, hla.eventually_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\n⊢ HasBasis (la ×ˢ lb) p fun i => sa i ×ˢ sb i\n[PROOFSTEP]\nsimp only [hasBasis_iff, (hla.prod_pprod hlb).mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\n⊢ ∀ (t : Set (α × β)), (∃ i, (p i.fst ∧ p i.snd) ∧ sa i.fst ×ˢ sb i.snd ⊆ t) ↔ ∃ i, p i ∧ sa i ×ˢ sb i ⊆ t\n[PROOFSTEP]\nrefine' fun t => ⟨_, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\nt : Set (α × β)\n⊢ (∃ i, (p i.fst ∧ p i.snd) ∧ sa i.fst ×ˢ sb i.snd ⊆ t) → ∃ i, p i ∧ sa i ×ˢ sb i ⊆ t\n[PROOFSTEP]\nrintro ⟨⟨i, j⟩, ⟨hi, hj⟩, hsub : sa i ×ˢ sb j ⊆ t⟩\n[GOAL]\ncase refine'_1.intro.mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\nt : Set (α × β)\ni j : ι\nhsub : sa i ×ˢ sb j ⊆ t\nhi : p { fst := i, snd := j }.fst\nhj : p { fst := i, snd := j }.snd\n⊢ ∃ i, p i ∧ sa i ×ˢ sb i ⊆ t\n[PROOFSTEP]\nrcases h_dir hi hj with ⟨k, hk, ki, kj⟩\n[GOAL]\ncase refine'_1.intro.mk.intro.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\nt : Set (α × β)\ni j : ι\nhsub : sa i ×ˢ sb j ⊆ t\nhi : p { fst := i, snd := j }.fst\nhj : p { fst := i, snd := j }.snd\nk : ι\nhk : p k\nki : sa k ⊆ sa { fst := i, snd := j }.fst\nkj : sb k ⊆ sb { fst := i, snd := j }.snd\n⊢ ∃ i, p i ∧ sa i ×ˢ sb i ⊆ t\n[PROOFSTEP]\nexact ⟨k, hk, (Set.prod_mono ki kj).trans hsub⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\nt : Set (α × β)\n⊢ (∃ i, p i ∧ sa i ×ˢ sb i ⊆ t) → ∃ i, (p i.fst ∧ p i.snd) ∧ sa i.fst ×ˢ sb i.snd ⊆ t\n[PROOFSTEP]\nrintro ⟨i, hi, h⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb✝ : ι' → Set β\nf : α → β\np : ι → Prop\nsb : ι → Set β\nhla : HasBasis la p sa\nhlb : HasBasis lb p sb\nh_dir : ∀ {i j : ι}, p i → p j → ∃ k, p k ∧ sa k ⊆ sa i ∧ sb k ⊆ sb j\nt : Set (α × β)\ni : ι\nhi : p i\nh : sa i ×ˢ sb i ⊆ t\n⊢ ∃ i, (p i.fst ∧ p i.snd) ∧ sa i.fst ×ˢ sb i.snd ⊆ t\n[PROOFSTEP]\nexact ⟨⟨i, i⟩, ⟨hi, hi⟩, h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nla : Filter α\npa : ι → Prop\nsa : ι → Set α\nlb : Filter β\npb : ι' → Prop\nsb : ι' → Set β\nf : α → β\nhl : HasBasis la pa sa\ni j : ι\nhi : pa i\nhj : pa j\n⊢ ∃ k, pa k ∧ sa k ⊆ sa i ∧ sa k ⊆ sa j\n[PROOFSTEP]\nsimpa only [exists_prop, subset_inter_iff] using hl.mem_iff.1 (inter_mem (hl.mem_of_mem hi) (hl.mem_of_mem hj))\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nπ : α → Type u_6\nπ' : β → Type u_7\nf : α → β\nhf : Function.Injective f\ng : (a : α) → π a → π' (f a)\na : α\nl : Filter (π' (f a))\n⊢ map (Sigma.mk a) (comap (g a) l) = comap (Sigma.map f g) (map (Sigma.mk (f a)) l)\n[PROOFSTEP]\nrefine' (((basis_sets _).comap _).map _).eq_of_same_basis _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nπ : α → Type u_6\nπ' : β → Type u_7\nf : α → β\nhf : Function.Injective f\ng : (a : α) → π a → π' (f a)\na : α\nl : Filter (π' (f a))\n⊢ HasBasis (comap (Sigma.map f g) (map (Sigma.mk (f a)) l)) (fun s => s ∈ l) fun i => Sigma.mk a '' (g a ⁻¹' id i)\n[PROOFSTEP]\nconvert ((basis_sets l).map (Sigma.mk (f a))).comap (Sigma.map f g)\n[GOAL]\ncase h.e'_5.h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Sort u_4\nι' : Sort u_5\nπ : α → Type u_6\nπ' : β → Type u_7\nf : α → β\nhf : Function.Injective f\ng : (a : α) → π a → π' (f a)\na : α\nl : Filter (π' (f a))\nx✝ : Set (π' (f a))\n⊢ Sigma.mk a '' (g a ⁻¹' id x✝) = Sigma.map f g ⁻¹' (Sigma.mk (f a) '' id x✝)\n[PROOFSTEP]\napply image_sigmaMk_preimage_sigmaMap hf\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ∃ t, Antitone t ∧ ⨅ (i : ℕ), 𝓟 (s i) = ⨅ (i : ℕ), 𝓟 (t i)\n[PROOFSTEP]\nuse fun n => ⋂ m ≤ n, s m\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ (Antitone fun n => ⋂ (m : ℕ) (_ : m ≤ n), s m) ∧ ⨅ (i : ℕ), 𝓟 (s i) = ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ Antitone fun n => ⋂ (m : ℕ) (_ : m ≤ n), s m\n[PROOFSTEP]\nexact fun i j hij => biInter_mono (Iic_subset_Iic.2 hij) fun n _ => Subset.rfl\n[GOAL]\ncase h.right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ⨅ (i : ℕ), 𝓟 (s i) = ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ⨅ (i : ℕ), 𝓟 (s i) ≤ ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m)\n[PROOFSTEP]\nrw [le_iInf_iff]\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m) ≤ ⨅ (i : ℕ), 𝓟 (s i)\n[PROOFSTEP]\nrw [le_iInf_iff]\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ∀ (i : ℕ), ⨅ (i : ℕ), 𝓟 (s i) ≤ 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\n⊢ ∀ (i : ℕ), ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m) ≤ 𝓟 (s i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\ni : ℕ\n⊢ ⨅ (i : ℕ), 𝓟 (s i) ≤ 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m)\n[PROOFSTEP]\nrw [le_principal_iff]\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\ni : ℕ\n⊢ ⋂ (m : ℕ) (_ : m ≤ i), s m ∈ ⨅ (i : ℕ), 𝓟 (s i)\n[PROOFSTEP]\nrefine' (biInter_mem (finite_le_nat _)).2 fun j _ => _\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\ni j : ℕ\nx✝ : j ∈ {i_1 | i_1 ≤ i}\n⊢ s j ∈ ⨅ (i : ℕ), 𝓟 (s i)\n[PROOFSTEP]\nexact mem_iInf_of_mem j (mem_principal_self _)\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\ni : ℕ\n⊢ ⨅ (i : ℕ), 𝓟 (⋂ (m : ℕ) (_ : m ≤ i), s m) ≤ 𝓟 (s i)\n[PROOFSTEP]\nrefine iInf_le_of_le i (principal_mono.2 <| iInter₂_subset i ?_)\n[GOAL]\ncase h.right.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ns : ℕ → Set α\ni : ℕ\n⊢ i ≤ i\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : CompleteLattice α\nB : Set ι\nBcbl : Set.Countable B\nf : ι → α\ni₀ : ι\nh : f i₀ = ⊤\n⊢ ∃ x, ⨅ (t : ι) (_ : t ∈ B), f t = ⨅ (i : ℕ), f (x i)\n[PROOFSTEP]\ncases' B.eq_empty_or_nonempty with hB Bnonempty\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : CompleteLattice α\nB : Set ι\nBcbl : Set.Countable B\nf : ι → α\ni₀ : ι\nh : f i₀ = ⊤\nhB : B = ∅\n⊢ ∃ x, ⨅ (t : ι) (_ : t ∈ B), f t = ⨅ (i : ℕ), f (x i)\n[PROOFSTEP]\nrw [hB, iInf_emptyset]\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : CompleteLattice α\nB : Set ι\nBcbl : Set.Countable B\nf : ι → α\ni₀ : ι\nh : f i₀ = ⊤\nhB : B = ∅\n⊢ ∃ x, ⊤ = ⨅ (i : ℕ), f (x i)\n[PROOFSTEP]\nuse fun _ => i₀\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : CompleteLattice α\nB : Set ι\nBcbl : Set.Countable B\nf : ι → α\ni₀ : ι\nh : f i₀ = ⊤\nhB : B = ∅\n⊢ ⊤ = ⨅ (i : ℕ), f i₀\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : CompleteLattice α\nB : Set ι\nBcbl : Set.Countable B\nf : ι → α\ni₀ : ι\nh : f i₀ = ⊤\nBnonempty : Set.Nonempty B\n⊢ ∃ x, ⨅ (t : ι) (_ : t ∈ B), f t = ⨅ (i : ℕ), f (x i)\n[PROOFSTEP]\nexact countable_biInf_eq_iInf_seq Bcbl Bnonempty f\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : Preorder ι\nl : Filter α\ns : ι → Set α\nhs : HasAntitoneBasis l s\nt : Set α\n⊢ (∃ i, True ∧ s i ⊆ t) ↔ ∃ i, s i ⊆ t\n[PROOFSTEP]\nsimp only [exists_prop, true_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nobtain ⟨x', hx'⟩ : ∃ x : ℕ → Set α, f = ⨅ i, 𝓟 (x i) :=\n  by\n  rcases h with ⟨s, hsc, rfl⟩\n  rw [generate_eq_biInf]\n  exact countable_biInf_principal_eq_seq_iInf hsc\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\n⊢ ∃ x, f = ⨅ (i : ℕ), 𝓟 (x i)\n[PROOFSTEP]\nrcases h with ⟨s, hsc, rfl⟩\n[GOAL]\ncase mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\np : ι' → Prop\ns✝ : ι' → Set α\ns : Set (Set α)\nhsc : Set.Countable s\nhs : HasBasis (generate s) p s✝\n⊢ ∃ x, generate s = ⨅ (i : ℕ), 𝓟 (x i)\n[PROOFSTEP]\nrw [generate_eq_biInf]\n[GOAL]\ncase mk.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\np : ι' → Prop\ns✝ : ι' → Set α\ns : Set (Set α)\nhsc : Set.Countable s\nhs : HasBasis (generate s) p s✝\n⊢ ∃ x, ⨅ (s_1 : Set α) (_ : s_1 ∈ s), 𝓟 s_1 = ⨅ (i : ℕ), 𝓟 (x i)\n[PROOFSTEP]\nexact countable_biInf_principal_eq_seq_iInf hsc\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nhave : ∀ i, x' i ∈ f := fun i => hx'.symm ▸ (iInf_le (fun i => 𝓟 (x' i)) i) (mem_principal_self _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nlet x : ℕ → { i : ι' // p i } := fun n =>\n  Nat.recOn n (hs.index _ <| this 0) fun n xn => hs.index _ <| inter_mem (this <| n + 1) (hs.mem_of_mem xn.2)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nhave x_mono : Antitone fun i => s (x i).1 :=\n  antitone_nat_of_succ_le fun i => (hs.set_index_subset _).trans (inter_subset_right _ _)\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nhave x_subset : ∀ i, s (x i).1 ⊆ x' i := by\n  rintro (_ | i)\n  exacts [hs.set_index_subset _, (hs.set_index_subset _).trans (inter_subset_left _ _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\n⊢ ∀ (i : ℕ), s ↑(x i) ⊆ x' i\n[PROOFSTEP]\nrintro (_ | i)\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\n⊢ s ↑(x Nat.zero) ⊆ x' Nat.zero\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\ni : ℕ\n⊢ s ↑(x (Nat.succ i)) ⊆ x' (Nat.succ i)\n[PROOFSTEP]\nexacts [hs.set_index_subset _, (hs.set_index_subset _).trans (inter_subset_left _ _)]\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\n⊢ ∃ x, (∀ (i : ℕ), p (x i)) ∧ HasAntitoneBasis f fun i => s (x i)\n[PROOFSTEP]\nrefine' ⟨fun i => (x i).1, fun i => (x i).2, _⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\n⊢ HasAntitoneBasis f fun i => s ((fun i => ↑(x i)) i)\n[PROOFSTEP]\nhave : (⨅ i, 𝓟 (s (x i).1)).HasAntitoneBasis fun i => s (x i).1 :=\n  ⟨hasBasis_iInf_principal (directed_of_sup x_mono), x_mono⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis✝ : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\nthis : HasAntitoneBasis (⨅ (i : ℕ), 𝓟 (s ↑(x i))) fun i => s ↑(x i)\n⊢ HasAntitoneBasis f fun i => s ((fun i => ↑(x i)) i)\n[PROOFSTEP]\nconvert this\n[GOAL]\ncase h.e'_4\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis✝ : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\nthis : HasAntitoneBasis (⨅ (i : ℕ), 𝓟 (s ↑(x i))) fun i => s ↑(x i)\n⊢ f = ⨅ (i : ℕ), 𝓟 (s ↑(x i))\n[PROOFSTEP]\nexact\n  le_antisymm (le_iInf fun i => le_principal_iff.2 <| by cases i <;> apply hs.set_index_mem)\n    (hx'.symm ▸ le_iInf fun i => le_principal_iff.2 <| this.1.mem_iff.2 ⟨i, trivial, x_subset i⟩)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis✝ : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\nthis : HasAntitoneBasis (⨅ (i : ℕ), 𝓟 (s ↑(x i))) fun i => s ↑(x i)\ni : ℕ\n⊢ s ↑(x i) ∈ f\n[PROOFSTEP]\ncases i\n[GOAL]\ncase zero\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis✝ : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\nthis : HasAntitoneBasis (⨅ (i : ℕ), 𝓟 (s ↑(x i))) fun i => s ↑(x i)\n⊢ s ↑(x Nat.zero) ∈ f\n[PROOFSTEP]\napply hs.set_index_mem\n[GOAL]\ncase succ\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\np : ι' → Prop\ns : ι' → Set α\nhs : HasBasis f p s\nx' : ℕ → Set α\nhx' : f = ⨅ (i : ℕ), 𝓟 (x' i)\nthis✝ : ∀ (i : ℕ), x' i ∈ f\nx : ℕ → { i // p i } :=\n  fun n =>\n    Nat.recOn n (index hs (x' 0) (_ : x' 0 ∈ f)) fun n xn => index hs (x' (n + 1) ∩ s ↑xn) (_ : x' (n + 1) ∩ s ↑xn ∈ f)\nx_mono : Antitone fun i => s ↑(x i)\nx_subset : ∀ (i : ℕ), s ↑(x i) ⊆ x' i\nthis : HasAntitoneBasis (⨅ (i : ℕ), 𝓟 (s ↑(x i))) fun i => s ↑(x i)\nn✝ : ℕ\n⊢ s ↑(x (Nat.succ n✝)) ∈ f\n[PROOFSTEP]\napply hs.set_index_mem\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\ninst✝ : IsCountablyGenerated f\nx : ℕ → Set α\nhx : HasAntitoneBasis f x\n⊢ ∀ {s : Set α}, s ∈ f ↔ ∃ i, x i ⊆ s\n[PROOFSTEP]\nsimp [hx.1.mem_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\n⊢ IsCountablyGenerated (f ⊓ g)\n[PROOFSTEP]\nrcases f.exists_antitone_basis with ⟨s, hs⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\ns : ℕ → Set α\nhs : HasAntitoneBasis f s\n⊢ IsCountablyGenerated (f ⊓ g)\n[PROOFSTEP]\nrcases g.exists_antitone_basis with ⟨t, ht⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\ns : ℕ → Set α\nhs : HasAntitoneBasis f s\nt : ℕ → Set α\nht : HasAntitoneBasis g t\n⊢ IsCountablyGenerated (f ⊓ g)\n[PROOFSTEP]\nexact HasCountableBasis.isCountablyGenerated ⟨hs.1.inf ht.1, Set.to_countable _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\n⊢ IsCountablyGenerated (f ⊔ g)\n[PROOFSTEP]\nrcases f.exists_antitone_basis with ⟨s, hs⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\ns : ℕ → Set α\nhs : HasAntitoneBasis f s\n⊢ IsCountablyGenerated (f ⊔ g)\n[PROOFSTEP]\nrcases g.exists_antitone_basis with ⟨t, ht⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf g : Filter α\ninst✝¹ : IsCountablyGenerated f\ninst✝ : IsCountablyGenerated g\ns : ℕ → Set α\nhs : HasAntitoneBasis f s\nt : ℕ → Set α\nht : HasAntitoneBasis g t\n⊢ IsCountablyGenerated (f ⊔ g)\n[PROOFSTEP]\nexact HasCountableBasis.isCountablyGenerated ⟨hs.1.sup ht.1, Set.to_countable _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : Countable β\nx : β → Set α\n⊢ IsCountablyGenerated (⨅ (i : β), 𝓟 (x i))\n[PROOFSTEP]\nuse range x, countable_range x\n[GOAL]\ncase right\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\ninst✝ : Countable β\nx : β → Set α\n⊢ ⨅ (i : β), 𝓟 (x i) = generate (range x)\n[PROOFSTEP]\nrw [generate_eq_biInf, iInf_range]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : ∃ x, f = ⨅ (i : ℕ), 𝓟 (x i)\n⊢ IsCountablyGenerated f\n[PROOFSTEP]\nrcases h with ⟨x, rfl⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nx : ℕ → Set α\n⊢ IsCountablyGenerated (⨅ (i : ℕ), 𝓟 (x i))\n[PROOFSTEP]\napply isCountablyGenerated_seq\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\n⊢ IsCountablyGenerated f ↔ ∃ x, HasAntitoneBasis f x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\n⊢ IsCountablyGenerated f → ∃ x, HasAntitoneBasis f x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nh : IsCountablyGenerated f\n⊢ ∃ x, HasAntitoneBasis f x\n[PROOFSTEP]\nexact f.exists_antitone_basis\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\n⊢ (∃ x, HasAntitoneBasis f x) → IsCountablyGenerated f\n[PROOFSTEP]\nrintro ⟨x, h⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nx : ℕ → Set α\nh : HasAntitoneBasis f x\n⊢ IsCountablyGenerated f\n[PROOFSTEP]\nrw [h.1.eq_iInf]\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\nf : Filter α\nx : ℕ → Set α\nh : HasAntitoneBasis f x\n⊢ IsCountablyGenerated (⨅ (i : ℕ), 𝓟 (x i))\n[PROOFSTEP]\nexact isCountablyGenerated_seq x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\na : α\n⊢ IsCountablyGenerated (pure a)\n[PROOFSTEP]\nrw [← principal_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nι : Type u_4\nι' : Sort u_5\na : α\n⊢ IsCountablyGenerated (𝓟 {a})\n[PROOFSTEP]\nexact isCountablyGenerated_principal _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f i)\n⊢ IsCountablyGenerated (⨅ (i : ι), f i)\n[PROOFSTEP]\nchoose s hs using fun i => exists_antitone_basis (f i)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f i) (s i)\n⊢ IsCountablyGenerated (⨅ (i : ι), f i)\n[PROOFSTEP]\nrw [← PLift.down_surjective.iInf_comp]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f i) (s i)\n⊢ IsCountablyGenerated (⨅ (x : PLift ι), f x.down)\n[PROOFSTEP]\nrefine' HasCountableBasis.isCountablyGenerated ⟨hasBasis_iInf fun n => (hs _).1, _⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f i) (s i)\n⊢ Set.Countable {If | Set.Finite If.fst ∧ (↑If.fst → True)}\n[PROOFSTEP]\nrefine' (countable_range <| Sigma.map ((↑) : Finset (PLift ι) → Set (PLift ι)) fun _ => id).mono _\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f i) (s i)\n⊢ {If | Set.Finite If.fst ∧ (↑If.fst → True)} ⊆ range (Sigma.map Finset.toSet fun x => id)\n[PROOFSTEP]\nrintro ⟨I, f⟩ ⟨hI, -⟩\n[GOAL]\ncase mk.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf✝ : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f✝ i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f✝ i) (s i)\nI : Set (PLift ι)\nf : ↑I → ℕ\nhI : Set.Finite { fst := I, snd := f }.fst\n⊢ { fst := I, snd := f } ∈ range (Sigma.map Finset.toSet fun x => id)\n[PROOFSTEP]\nlift I to Finset (PLift ι) using hI\n[GOAL]\ncase mk.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nι✝ : Type u_4\nι' : Sort u_5\nι : Sort u\nα : Type v\ninst✝¹ : Countable ι\nf✝ : ι → Filter α\ninst✝ : ∀ (i : ι), IsCountablyGenerated (f✝ i)\ns : ι → ℕ → Set α\nhs : ∀ (i : ι), HasAntitoneBasis (f✝ i) (s i)\nI : Finset (PLift ι)\nf : ↑↑I → ℕ\n⊢ { fst := ↑I, snd := f } ∈ range (Sigma.map Finset.toSet fun x => id)\n[PROOFSTEP]\nexact ⟨⟨I, f⟩, rfl⟩\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.Bases", "llama_tokens": 52216, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5621764862150634, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.2723070937713914}}
{"text": "[GOAL]\nA : Mon_ (Type u)\nx y z : A.X\n⊢ x * y * z = x * (y * z)\n[PROOFSTEP]\nconvert congr_fun A.mul_assoc ((x, y), z)\n[GOAL]\nA : Mon_ (Type u)\nx : A.X\n⊢ 1 * x = x\n[PROOFSTEP]\nconvert congr_fun A.one_mul (PUnit.unit, x)\n[GOAL]\nA : Mon_ (Type u)\nx : A.X\n⊢ x * 1 = x\n[PROOFSTEP]\nconvert congr_fun A.mul_one (x, PUnit.unit)\n[GOAL]\nA : MonCat\n⊢ (MonoidalCategory.tensorHom (fun x => 1) (𝟙 ↑A) ≫ fun p => p.fst * p.snd) = (MonoidalCategory.leftUnitor ↑A).hom\n[PROOFSTEP]\next ⟨_, _⟩\n[GOAL]\ncase h.mk\nA : MonCat\nfst✝ : MonoidalCategory.tensorUnit (Type u)\nsnd✝ : ↑A\n⊢ (MonoidalCategory.tensorHom (fun x => 1) (𝟙 ↑A) ≫ fun p => p.fst * p.snd) (fst✝, snd✝) =\n    (MonoidalCategory.leftUnitor ↑A).hom (fst✝, snd✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.mk\nA : MonCat\nfst✝ : MonoidalCategory.tensorUnit (Type u)\nsnd✝ : ↑A\n⊢ 1 * snd✝ = snd✝\n[PROOFSTEP]\nsimp\n[GOAL]\nA : MonCat\n⊢ ((MonoidalCategory.tensorHom (𝟙 ↑A) fun x => 1) ≫ fun p => p.fst * p.snd) = (MonoidalCategory.rightUnitor ↑A).hom\n[PROOFSTEP]\next ⟨_, _⟩\n[GOAL]\ncase h.mk\nA : MonCat\nfst✝ : ↑A\nsnd✝ : MonoidalCategory.tensorUnit (Type u)\n⊢ ((MonoidalCategory.tensorHom (𝟙 ↑A) fun x => 1) ≫ fun p => p.fst * p.snd) (fst✝, snd✝) =\n    (MonoidalCategory.rightUnitor ↑A).hom (fst✝, snd✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.mk\nA : MonCat\nfst✝ : ↑A\nsnd✝ : MonoidalCategory.tensorUnit (Type u)\n⊢ fst✝ * 1 = fst✝\n[PROOFSTEP]\nsimp\n[GOAL]\nA : MonCat\n⊢ (MonoidalCategory.tensorHom (fun p => p.fst * p.snd) (𝟙 ↑A) ≫ fun p => p.fst * p.snd) =\n    (MonoidalCategory.associator ↑A ↑A ↑A).hom ≫\n      (MonoidalCategory.tensorHom (𝟙 ↑A) fun p => p.fst * p.snd) ≫ fun p => p.fst * p.snd\n[PROOFSTEP]\next ⟨⟨x, y⟩, z⟩\n[GOAL]\ncase h.mk.mk\nA : MonCat\nz x y : ↑A\n⊢ (MonoidalCategory.tensorHom (fun p => p.fst * p.snd) (𝟙 ↑A) ≫ fun p => p.fst * p.snd) ((x, y), z) =\n    ((MonoidalCategory.associator ↑A ↑A ↑A).hom ≫\n        (MonoidalCategory.tensorHom (𝟙 ↑A) fun p => p.fst * p.snd) ≫ fun p => p.fst * p.snd)\n      ((x, y), z)\n[PROOFSTEP]\nsimp [mul_assoc]\n[GOAL]\n⊢ ∀ {X Y : Mon_ (Type u)} (f : X ⟶ Y),\n    (𝟭 (Mon_ (Type u))).map f ≫\n        ((fun A =>\n              Iso.mk (Mon_.Hom.mk (𝟙 ((𝟭 (Mon_ (Type u))).obj A).X)) (Mon_.Hom.mk (𝟙 ((functor ⋙ inverse).obj A).X)))\n            Y).hom =\n      ((fun A => Iso.mk (Mon_.Hom.mk (𝟙 ((𝟭 (Mon_ (Type u))).obj A).X)) (Mon_.Hom.mk (𝟙 ((functor ⋙ inverse).obj A).X)))\n            X).hom ≫\n        (functor ⋙ inverse).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {X Y : MonCat} (f : X ⟶ Y),\n    (inverse ⋙ functor).map f ≫\n        ((fun A =>\n              Iso.mk\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((inverse ⋙ functor).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) }\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((𝟭 MonCat).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) })\n            Y).hom =\n      ((fun A =>\n              Iso.mk\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((inverse ⋙ functor).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) }\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((𝟭 MonCat).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) })\n            X).hom ≫\n        (𝟭 MonCat).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {X Y : Mon_ (Type u)} (f : X ⟶ Y),\n    (functor ⋙ forget MonCat).map f ≫ ((fun A => Iso.refl ((functor ⋙ forget MonCat).obj A)) Y).hom =\n      ((fun A => Iso.refl ((functor ⋙ forget MonCat).obj A)) X).hom ≫ (Mon_.forget (Type u)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nA : CommMon_ (Type u)\nsrc✝ : Monoid A.X := monMonoid A.toMon_\nx y : A.X\n⊢ x * y = y * x\n[PROOFSTEP]\nconvert congr_fun A.mul_comm (y, x)\n[GOAL]\nA : CommMonCat\nsrc✝ : Mon_ (Type u) := MonTypeEquivalenceMon.inverse.obj ((forget₂ CommMonCat MonCat).obj A)\n⊢ (β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫\n      (Mon_.mk src✝.X src✝.one src✝.mul).mul =\n    (Mon_.mk src✝.X src✝.one src✝.mul).mul\n[PROOFSTEP]\next ⟨x : A, y : A⟩\n[GOAL]\ncase h.mk\nA : CommMonCat\nsrc✝ : Mon_ (Type u) := MonTypeEquivalenceMon.inverse.obj ((forget₂ CommMonCat MonCat).obj A)\nx y : ↑A\n⊢ ((β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫\n        (Mon_.mk src✝.X src✝.one src✝.mul).mul)\n      (x, y) =\n    Mon_.mul (Mon_.mk src✝.X src✝.one src✝.mul) (x, y)\n[PROOFSTEP]\nexact CommMonoid.mul_comm y x\n[GOAL]\n⊢ ∀ {X Y : CommMon_ (Type u)} (f : X ⟶ Y),\n    (𝟭 (CommMon_ (Type u))).map f ≫\n        ((fun A =>\n              Iso.mk (Mon_.Hom.mk (𝟙 ((𝟭 (CommMon_ (Type u))).obj A).X))\n                (Mon_.Hom.mk\n                  (𝟙 ((CommMonTypeEquivalenceCommMon.functor ⋙ CommMonTypeEquivalenceCommMon.inverse).obj A).X)))\n            Y).hom =\n      ((fun A =>\n              Iso.mk (Mon_.Hom.mk (𝟙 ((𝟭 (CommMon_ (Type u))).obj A).X))\n                (Mon_.Hom.mk\n                  (𝟙 ((CommMonTypeEquivalenceCommMon.functor ⋙ CommMonTypeEquivalenceCommMon.inverse).obj A).X)))\n            X).hom ≫\n        (CommMonTypeEquivalenceCommMon.functor ⋙ CommMonTypeEquivalenceCommMon.inverse).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {X Y : CommMonCat} (f : X ⟶ Y),\n    (CommMonTypeEquivalenceCommMon.inverse ⋙ CommMonTypeEquivalenceCommMon.functor).map f ≫\n        ((fun A =>\n              Iso.mk\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀\n                        (x y :\n                          ↑((CommMonTypeEquivalenceCommMon.inverse ⋙ CommMonTypeEquivalenceCommMon.functor).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) }\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((𝟭 CommMonCat).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) })\n            Y).hom =\n      ((fun A =>\n              Iso.mk\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀\n                        (x y :\n                          ↑((CommMonTypeEquivalenceCommMon.inverse ⋙ CommMonTypeEquivalenceCommMon.functor).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) }\n                { toOneHom := { toFun := id, map_one' := (_ : id 1 = id 1) },\n                  map_mul' :=\n                    (_ :\n                      ∀ (x y : ↑((𝟭 CommMonCat).obj A)),\n                        OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y) =\n                          OneHom.toFun { toFun := id, map_one' := (_ : id 1 = id 1) } (x * y)) })\n            X).hom ≫\n        (𝟭 CommMonCat).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\n⊢ ∀ {X Y : CommMon_ (Type u)} (f : X ⟶ Y),\n    (CommMonTypeEquivalenceCommMon.functor ⋙ forget₂ CommMonCat MonCat).map f ≫\n        ((fun A => Iso.refl ((CommMonTypeEquivalenceCommMon.functor ⋙ forget₂ CommMonCat MonCat).obj A)) Y).hom =\n      ((fun A => Iso.refl ((CommMonTypeEquivalenceCommMon.functor ⋙ forget₂ CommMonCat MonCat).obj A)) X).hom ≫\n        (CommMon_.forget₂Mon_ (Type u) ⋙ MonTypeEquivalenceMon.functor).map f\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Internal.Types", "llama_tokens": 3685, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.411110869232168, "lm_q1q2_score": 0.27212368885534755}}
{"text": "[GOAL]\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nh : a ∈ dedup l\n⊢ ¬∀ (b : α), b ∈ pwFilter (fun x x_1 => x ≠ x_1) l → a ≠ b\n[PROOFSTEP]\nsimpa only [forall_mem_ne, not_not] using h\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nh : ¬a ∈ dedup l\n⊢ ∀ (b : α), b ∈ pwFilter (fun x x_1 => x ≠ x_1) l → a ≠ b\n[PROOFSTEP]\nsimpa only [forall_mem_ne] using h\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ a ∈ dedup l ↔ a ∈ l\n[PROOFSTEP]\nhave := not_congr (@forall_mem_pwFilter α (· ≠ ·) _ ?_ a l)\n[GOAL]\ncase refine_2\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nthis : (¬∀ (b : α), b ∈ pwFilter (fun x x_1 => x ≠ x_1) l → a ≠ b) ↔ ¬∀ (b : α), b ∈ l → a ≠ b\n⊢ a ∈ dedup l ↔ a ∈ l\ncase refine_1\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ ∀ {x y z : α}, (fun x x_1 => x ≠ x_1) x z → (fun x x_1 => x ≠ x_1) x y ∨ (fun x x_1 => x ≠ x_1) y z\n[PROOFSTEP]\nsimpa only [dedup, forall_mem_ne, not_not] using this\n[GOAL]\ncase refine_1\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\n⊢ ∀ {x y z : α}, (fun x x_1 => x ≠ x_1) x z → (fun x x_1 => x ≠ x_1) x y ∨ (fun x x_1 => x ≠ x_1) y z\n[PROOFSTEP]\nintros x y z xz\n[GOAL]\ncase refine_1\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nx y z : α\nxz : x ≠ z\n⊢ (fun x x_1 => x ≠ x_1) x y ∨ (fun x x_1 => x ≠ x_1) y z\n[PROOFSTEP]\nexact not_and_or.1 <| mt (fun h ↦ h.1.trans h.2) xz\n[GOAL]\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\n⊢ headI (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then headI (dedup (tail (a :: l))) else headI (a :: l)\n[PROOFSTEP]\nby_cases ha : a ∈ l\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\nha : a ∈ l\n⊢ headI (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then headI (dedup (tail (a :: l))) else headI (a :: l)\n[PROOFSTEP]\nsimp [ha, List.dedup_cons_of_mem]\n[GOAL]\ncase neg\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\nha : ¬a ∈ l\n⊢ headI (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then headI (dedup (tail (a :: l))) else headI (a :: l)\n[PROOFSTEP]\nsimp [ha, List.dedup_cons_of_mem]\n[GOAL]\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\n⊢ tail (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then tail (dedup (tail (a :: l))) else dedup (tail (a :: l))\n[PROOFSTEP]\nby_cases ha : a ∈ l\n[GOAL]\ncase pos\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\nha : a ∈ l\n⊢ tail (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then tail (dedup (tail (a :: l))) else dedup (tail (a :: l))\n[PROOFSTEP]\nsimp [ha, List.dedup_cons_of_mem]\n[GOAL]\ncase neg\nα : Type u\ninst✝¹ : DecidableEq α\ninst✝ : Inhabited α\nl✝ : List α\na : α\nl : List α\nha : ¬a ∈ l\n⊢ tail (dedup (a :: l)) = if headI (a :: l) ∈ tail (a :: l) then tail (dedup (tail (a :: l))) else dedup (tail (a :: l))\n[PROOFSTEP]\nsimp [ha, List.dedup_cons_of_mem]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\n⊢ dedup l = a :: l' ↔ a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : dedup l = a :: l'\n⊢ a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\n[PROOFSTEP]\nrefine' ⟨mem_dedup.1 (h.symm ▸ mem_cons_self _ _), fun ha => _, by rw [h, tail_cons]⟩\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : dedup l = a :: l'\n⊢ tail (dedup l) = l'\n[PROOFSTEP]\nrw [h, tail_cons]\n[GOAL]\ncase refine'_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : dedup l = a :: l'\nha : a ∈ l'\n⊢ False\n[PROOFSTEP]\nhave : count a l.dedup ≤ 1 := nodup_iff_count_le_one.1 (nodup_dedup l) a\n[GOAL]\ncase refine'_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : dedup l = a :: l'\nha : a ∈ l'\nthis : count a (dedup l) ≤ 1\n⊢ False\n[PROOFSTEP]\nrw [h, count_cons_self, add_le_iff_nonpos_left] at this \n[GOAL]\ncase refine'_1\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : dedup l = a :: l'\nha : a ∈ l'\nthis : count a l' ≤ 0\n⊢ False\n[PROOFSTEP]\nexact not_le_of_lt (count_pos.2 ha) this\n[GOAL]\ncase refine'_2\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\n⊢ dedup l = a :: l'\n[PROOFSTEP]\nhave := @List.cons_head!_tail α ⟨a⟩ _ (ne_nil_of_mem (mem_dedup.2 h.1))\n[GOAL]\ncase refine'_2\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\nthis : head! (dedup l) :: tail (dedup l) = dedup l\n⊢ dedup l = a :: l'\n[PROOFSTEP]\nhave hal : a ∈ l.dedup := mem_dedup.2 h.1\n[GOAL]\ncase refine'_2\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\nthis : head! (dedup l) :: tail (dedup l) = dedup l\nhal : a ∈ dedup l\n⊢ dedup l = a :: l'\n[PROOFSTEP]\nrw [← this, mem_cons, or_iff_not_imp_right] at hal \n[GOAL]\ncase refine'_2\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\nl' : List α\nh : a ∈ l ∧ ¬a ∈ l' ∧ tail (dedup l) = l'\nthis : head! (dedup l) :: tail (dedup l) = dedup l\nhal : ¬a ∈ tail (dedup l) → a = head! (dedup l)\n⊢ dedup l = a :: l'\n[PROOFSTEP]\nexact this ▸ h.2.2.symm ▸ cons_eq_cons.2 ⟨(hal (h.2.2.symm ▸ h.2.1)).symm, rfl⟩\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl : List α\n⊢ dedup l = [] ↔ l = []\n[PROOFSTEP]\ninduction' l with a l hl\n[GOAL]\ncase nil\nα : Type u\ninst✝ : DecidableEq α\n⊢ dedup [] = [] ↔ [] = []\n[PROOFSTEP]\nexact Iff.rfl\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nhl : dedup l = [] ↔ l = []\n⊢ dedup (a :: l) = [] ↔ a :: l = []\n[PROOFSTEP]\nby_cases h : a ∈ l\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nhl : dedup l = [] ↔ l = []\nh : a ∈ l\n⊢ dedup (a :: l) = [] ↔ a :: l = []\n[PROOFSTEP]\nsimp only [List.dedup_cons_of_mem h, hl, List.ne_nil_of_mem h]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\na : α\nl : List α\nhl : dedup l = [] ↔ l = []\nh : ¬a ∈ l\n⊢ dedup (a :: l) = [] ↔ a :: l = []\n[PROOFSTEP]\nsimp only [List.dedup_cons_of_not_mem h, List.cons_ne_nil]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl₁ l₂ : List α\n⊢ dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\n[PROOFSTEP]\ninduction' l₁ with a l₁ IH\n[GOAL]\ncase nil\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\n⊢ dedup ([] ++ l₂) = [] ∪ dedup l₂\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\na : α\nl₁ : List α\nIH : dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\n⊢ dedup (a :: l₁ ++ l₂) = a :: l₁ ∪ dedup l₂\n[PROOFSTEP]\nsimp only [cons_union] at *\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\na : α\nl₁ : List α\nIH : dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\n⊢ dedup (a :: l₁ ++ l₂) = List.insert a (l₁ ∪ dedup l₂)\n[PROOFSTEP]\nrw [← IH, cons_append]\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\na : α\nl₁ : List α\nIH : dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\n⊢ dedup (a :: (l₁ ++ l₂)) = List.insert a (dedup (l₁ ++ l₂))\n[PROOFSTEP]\nby_cases h : a ∈ dedup (l₁ ++ l₂)\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\na : α\nl₁ : List α\nIH : dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\nh : a ∈ dedup (l₁ ++ l₂)\n⊢ dedup (a :: (l₁ ++ l₂)) = List.insert a (dedup (l₁ ++ l₂))\n[PROOFSTEP]\nrw [dedup_cons_of_mem' h, insert_of_mem h]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\nl₂ : List α\na : α\nl₁ : List α\nIH : dedup (l₁ ++ l₂) = l₁ ∪ dedup l₂\nh : ¬a ∈ dedup (l₁ ++ l₂)\n⊢ dedup (a :: (l₁ ++ l₂)) = List.insert a (dedup (l₁ ++ l₂))\n[PROOFSTEP]\nrw [dedup_cons_of_not_mem' h, insert_of_not_mem h]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nx : α\nn : ℕ\nx✝ : n + 2 ≠ 0\n⊢ dedup (replicate (n + 2) x) = [x]\n[PROOFSTEP]\nrw [replicate_succ, dedup_cons_of_mem (mem_replicate.2 ⟨n.succ_ne_zero, rfl⟩), replicate_dedup n.succ_ne_zero]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl : List α\na : α\n⊢ count a (dedup l) = if a ∈ l then 1 else 0\n[PROOFSTEP]\nsimp_rw [count_eq_of_nodup <| nodup_dedup l, mem_dedup]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\nl : List α\n⊢ sum (map (fun x => count x l) (filter p (dedup l))) = countp p l\n[PROOFSTEP]\ninduction' l with a as h\n[GOAL]\ncase nil\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\n⊢ sum (map (fun x => count x []) (filter p (dedup []))) = countp p []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\n⊢ sum (map (fun x => count x (a :: as)) (filter p (dedup (a :: as)))) = countp p (a :: as)\n[PROOFSTEP]\nsimp_rw [List.countp_cons, List.count_cons', List.sum_map_add]\n[GOAL]\ncase cons\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\n⊢ sum (map (fun i => count i as) (filter p (dedup (a :: as)))) +\n      sum (map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))) =\n    countp p as + if p a = true then 1 else 0\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase cons.e_a\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\n⊢ sum (map (fun i => count i as) (filter p (dedup (a :: as)))) = countp p as\n[PROOFSTEP]\nrefine' _root_.trans _ h\n[GOAL]\ncase cons.e_a\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\n⊢ sum (map (fun i => count i as) (filter p (dedup (a :: as)))) = sum (map (fun x => count x as) (filter p (dedup as)))\n[PROOFSTEP]\nby_cases ha : a ∈ as\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nha : a ∈ as\n⊢ sum (map (fun i => count i as) (filter p (dedup (a :: as)))) = sum (map (fun x => count x as) (filter p (dedup as)))\n[PROOFSTEP]\nsimp [dedup_cons_of_mem ha]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nha : ¬a ∈ as\n⊢ sum (map (fun i => count i as) (filter p (dedup (a :: as)))) = sum (map (fun x => count x as) (filter p (dedup as)))\n[PROOFSTEP]\nsimp only [dedup_cons_of_not_mem ha, List.filter]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nha : ¬a ∈ as\n⊢ sum\n      (map (fun i => count i as)\n        (match p a with\n        | true => a :: filter p (dedup as)\n        | false => filter p (dedup as))) =\n    sum (map (fun i => count i as) (filter p (dedup as)))\n[PROOFSTEP]\nmatch p a with\n| true => simp only [List.map_cons, List.sum_cons, List.count_eq_zero.2 ha, zero_add]\n| false => simp only\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nha : ¬a ∈ as\n⊢ sum\n      (map (fun i => count i as)\n        (match true with\n        | true => a :: filter p (dedup as)\n        | false => filter p (dedup as))) =\n    sum (map (fun i => count i as) (filter p (dedup as)))\n[PROOFSTEP]\nsimp only [List.map_cons, List.sum_cons, List.count_eq_zero.2 ha, zero_add]\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nha : ¬a ∈ as\n⊢ sum\n      (map (fun i => count i as)\n        (match false with\n        | true => a :: filter p (dedup as)\n        | false => filter p (dedup as))) =\n    sum (map (fun i => count i as) (filter p (dedup as)))\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase cons.e_a\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\n⊢ sum (map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))) = if p a = true then 1 else 0\n[PROOFSTEP]\nby_cases hp : p a\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : p a = true\n⊢ sum (map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))) = if p a = true then 1 else 0\n[PROOFSTEP]\nrefine' _root_.trans (sum_map_eq_nsmul_single a _ fun _ h _ => by simp [h]) _\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh✝ : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : p a = true\nx✝¹ : α\nh : x✝¹ ≠ a\nx✝ : x✝¹ ∈ filter p (dedup (a :: as))\n⊢ (if x✝¹ = a then 1 else 0) = 0\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : p a = true\n⊢ (count a (filter p (dedup (a :: as))) • if a = a then 1 else 0) = if p a = true then 1 else 0\n[PROOFSTEP]\nsimp [hp, count_dedup]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\n⊢ sum (map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))) = if p a = true then 1 else 0\n[PROOFSTEP]\nrefine' _root_.trans (List.sum_eq_zero fun n hn => _) (by simp [hp])\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\n⊢ 0 = if p a = true then 1 else 0\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\nn : ℕ\nhn : n ∈ map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))\n⊢ n = 0\n[PROOFSTEP]\nobtain ⟨a', ha'⟩ := List.mem_map.1 hn\n[GOAL]\ncase neg.intro\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\nn : ℕ\nhn : n ∈ map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))\na' : α\nha' : a' ∈ filter p (dedup (a :: as)) ∧ (if a' = a then 1 else 0) = n\n⊢ n = 0\n[PROOFSTEP]\nsplit_ifs at ha'  with ha\n[GOAL]\ncase pos\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\nn : ℕ\nhn : n ∈ map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))\na' : α\nha : a' = a\nha' : a' ∈ filter p (dedup (a :: as)) ∧ 1 = n\n⊢ n = 0\n[PROOFSTEP]\nsimp only [ha, mem_filter, mem_dedup, find?, mem_cons, true_or, hp, and_false, false_and] at ha' \n[GOAL]\ncase neg\nα : Type u\ninst✝ : DecidableEq α\np : α → Bool\na : α\nas : List α\nh : sum (map (fun x => count x as) (filter p (dedup as))) = countp p as\nhp : ¬p a = true\nn : ℕ\nhn : n ∈ map (fun i => if i = a then 1 else 0) (filter p (dedup (a :: as)))\na' : α\nha : ¬a' = a\nha' : a' ∈ filter p (dedup (a :: as)) ∧ 0 = n\n⊢ n = 0\n[PROOFSTEP]\nexact ha'.2.symm\n[GOAL]\nα : Type u\ninst✝ : DecidableEq α\nl : List α\n⊢ sum (map (fun x => count x l) (dedup l)) = length l\n[PROOFSTEP]\nsimpa using sum_map_count_dedup_filter_eq_countp (fun _ => True) l\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Dedup", "llama_tokens": 7103, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5660185351961015, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.2719598375416356}}
{"text": "[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nh : degree f ≠ 0\n⊢ span {f} ≠ ⊤\n[PROOFSTEP]\nsimp_rw [Ne.def, span_singleton_eq_top, Polynomial.isUnit_iff, not_exists, not_and]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nh : degree f ≠ 0\n⊢ ∀ (x : R), IsUnit x → ¬↑C x = f\n[PROOFSTEP]\nrintro x hx rfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\nx : R\nhx : IsUnit x\nh : degree (↑C x) ≠ 0\n⊢ False\n[PROOFSTEP]\nexact h (degree_C hx.ne_zero)\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : DistribSMul S R\ninst✝ : IsScalarTower S R R\na : S\nx : R\n⊢ a • ↑(of f) x = ↑(of f) (a • x)\n[PROOFSTEP]\nrw [of, RingHom.comp_apply, RingHom.comp_apply, smul_mk, smul_C]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf g : R[X]\n⊢ f ∣ g - 0 ↔ f ∣ g\n[PROOFSTEP]\nrw [sub_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf : R[X]\n⊢ f ∣ -f + 0\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\nx : R\n⊢ ↑(aeval (root f)) (↑C x) = ↑(mk f) (↑C x)\n[PROOFSTEP]\nrw [aeval_C]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\nx : R\n⊢ ↑(algebraMap R (AdjoinRoot f)) x = ↑(mk f) (↑C x)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p✝ p q : R[X]\nihp : ↑(aeval (root f)) p = ↑(mk f) p\nihq : ↑(aeval (root f)) q = ↑(mk f) q\n⊢ ↑(aeval (root f)) (p + q) = ↑(mk f) (p + q)\n[PROOFSTEP]\nrw [AlgHom.map_add, RingHom.map_add, ihp, ihq]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\nn : ℕ\nx : R\nx✝ : ↑(aeval (root f)) (↑C x * X ^ n) = ↑(mk f) (↑C x * X ^ n)\n⊢ ↑(aeval (root f)) (↑C x * X ^ (n + 1)) = ↑(mk f) (↑C x * X ^ (n + 1))\n[PROOFSTEP]\nrw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, mk_C, RingHom.map_pow, mk_X]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\nn : ℕ\nx : R\nx✝ : ↑(aeval (root f)) (↑C x * X ^ n) = ↑(mk f) (↑C x * X ^ n)\n⊢ ↑(algebraMap R (AdjoinRoot f)) x * root f ^ (n + 1) = ↑(of f) x * root f ^ (n + 1)\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf : R[X]\n⊢ Algebra.adjoin R {root f} = ⊤\n[PROOFSTEP]\nrefine Algebra.eq_top_iff.2 fun x => ?_\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf : R[X]\nx : AdjoinRoot f\n⊢ x ∈ Algebra.adjoin R {root f}\n[PROOFSTEP]\ninduction x using AdjoinRoot.induction_on with\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval R (root f)).symm ▸ ⟨p, aeval_eq p⟩\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf : R[X]\nx : AdjoinRoot f\n⊢ x ∈ Algebra.adjoin R {root f}\n[PROOFSTEP]\ninduction x using AdjoinRoot.induction_on with\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval R (root f)).symm ▸ ⟨p, aeval_eq p⟩\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\n⊢ ↑(mk f) p ∈ Algebra.adjoin R {root f}\n[PROOFSTEP]\n\n| ih p => exact (Algebra.adjoin_singleton_eq_range_aeval R (root f)).symm ▸ ⟨p, aeval_eq p⟩\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf p : R[X]\n⊢ ↑(mk f) p ∈ Algebra.adjoin R {root f}\n[PROOFSTEP]\nexact (Algebra.adjoin_singleton_eq_range_aeval R (root f)).symm ▸ ⟨p, aeval_eq p⟩\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf✝ f : R[X]\n⊢ eval₂ (of f) (root f) f = 0\n[PROOFSTEP]\nrw [← algebraMap_eq, ← aeval_def, aeval_eq, mk_self]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nf✝ f : R[X]\n⊢ IsRoot (Polynomial.map (of f) f) (root f)\n[PROOFSTEP]\nrw [IsRoot, eval_map, eval₂_root]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\n⊢ Function.Injective ↑(of f)\n[PROOFSTEP]\nrw [injective_iff_map_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\n⊢ ∀ (a : R), ↑(of f) a = 0 → a = 0\n[PROOFSTEP]\nintro p hp\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\np : R\nhp : ↑(of f) p = 0\n⊢ p = 0\n[PROOFSTEP]\nrw [AdjoinRoot.of, RingHom.comp_apply, AdjoinRoot.mk_eq_zero] at hp \n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\np : R\nhp : f ∣ ↑C p\n⊢ p = 0\n[PROOFSTEP]\nby_cases h : f = 0\n[GOAL]\ncase pos\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\np : R\nhp : f ∣ ↑C p\nh : f = 0\n⊢ p = 0\n[PROOFSTEP]\nexact C_eq_zero.mp (eq_zero_of_zero_dvd (by rwa [h] at hp ))\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\np : R\nhp : f ∣ ↑C p\nh : f = 0\n⊢ 0 ∣ ↑C p\n[PROOFSTEP]\nrwa [h] at hp \n[GOAL]\ncase neg\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\nhf : degree f ≠ 0\np : R\nhp : f ∣ ↑C p\nh : ¬f = 0\n⊢ p = 0\n[PROOFSTEP]\ncontrapose! hf with h_contra\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\np : R\nhp : f ∣ ↑C p\nh : ¬f = 0\nh_contra : p ≠ 0\n⊢ degree f = 0\n[PROOFSTEP]\nrw [← degree_C h_contra]\n[GOAL]\ncase neg\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\np : R\nhp : f ∣ ↑C p\nh : ¬f = 0\nh_contra : p ≠ 0\n⊢ degree f = degree (↑C p)\n[PROOFSTEP]\napply le_antisymm (degree_le_of_dvd hp (by rwa [Ne.def, C_eq_zero])) _\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\np : R\nhp : f ∣ ↑C p\nh : ¬f = 0\nh_contra : p ≠ 0\n⊢ ↑C p ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, C_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : IsDomain R\np : R\nhp : f ∣ ↑C p\nh : ¬f = 0\nh_contra : p ≠ 0\n⊢ degree (↑C p) ≤ degree f\n[PROOFSTEP]\nrwa [degree_C h_contra, zero_le_degree_iff]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\nx : S\nh : eval₂ i x f = 0\n⊢ AdjoinRoot f →+* S\n[PROOFSTEP]\napply Ideal.Quotient.lift _ (eval₂RingHom i x)\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\nx : S\nh : eval₂ i x f = 0\n⊢ ∀ (a : R[X]), a ∈ span {f} → ↑(eval₂RingHom i x) a = 0\n[PROOFSTEP]\nintro g H\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\nx : S\nh : eval₂ i x f = 0\ng : R[X]\nH : g ∈ span {f}\n⊢ ↑(eval₂RingHom i x) g = 0\n[PROOFSTEP]\nrcases mem_span_singleton.1 H with ⟨y, hy⟩\n[GOAL]\ncase intro\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\nx : S\nh : eval₂ i x f = 0\ng : R[X]\nH : g ∈ span {f}\ny : R[X]\nhy : g = f * y\n⊢ ↑(eval₂RingHom i x) g = 0\n[PROOFSTEP]\nrw [hy, RingHom.map_mul, coe_eval₂RingHom, h, zero_mul]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\n⊢ ↑(lift i a h) (root f) = a\n[PROOFSTEP]\nrw [root, lift_mk, eval₂_X]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\nf : R[X]\ninst✝ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\nx : R\n⊢ ↑(lift i a h) (↑(of f) x) = ↑i x\n[PROOFSTEP]\nrw [← mk_C x, lift_mk, eval₂_C]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\ninst✝ : Algebra R S\nϕ : AdjoinRoot f →ₐ[R] S\n⊢ ↑(aeval (↑ϕ (root f))) f = 0\n[PROOFSTEP]\nhave h : ϕ.toRingHom.comp (of f) = algebraMap R S := RingHom.ext_iff.mpr ϕ.commutes\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh✝ : eval₂ i a f = 0\ninst✝ : Algebra R S\nϕ : AdjoinRoot f →ₐ[R] S\nh : RingHom.comp (↑ϕ) (of f) = algebraMap R S\n⊢ ↑(aeval (↑ϕ (root f))) f = 0\n[PROOFSTEP]\nrw [aeval_def, ← h, ← RingHom.map_zero ϕ.toRingHom, ← eval₂_root f, hom_eval₂]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh✝ : eval₂ i a f = 0\ninst✝ : Algebra R S\nϕ : AdjoinRoot f →ₐ[R] S\nh : RingHom.comp (↑ϕ) (of f) = algebraMap R S\n⊢ eval₂ (RingHom.comp (↑ϕ) (of f)) (↑ϕ (root f)) f = eval₂ (RingHom.comp (↑ϕ) (of f)) (↑↑ϕ (root f)) f\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf✝ : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f✝ = 0\ninst✝ : Algebra R S\nf : R[X]\nϕ : AdjoinRoot f →ₐ[R] S\n⊢ liftHom f (↑ϕ (root f)) (_ : ↑(aeval (↑ϕ (root f))) f = 0) = ϕ\n[PROOFSTEP]\nsuffices ϕ.equalizer (liftHom f (ϕ (root f)) (aeval_algHom_eq_zero f ϕ)) = ⊤ by\n  exact (AlgHom.ext fun x => (SetLike.ext_iff.mp this x).mpr Algebra.mem_top).symm\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf✝ : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f✝ = 0\ninst✝ : Algebra R S\nf : R[X]\nϕ : AdjoinRoot f →ₐ[R] S\nthis : AlgHom.equalizer ϕ (liftHom f (↑ϕ (root f)) (_ : ↑(aeval (↑ϕ (root f))) f = 0)) = ⊤\n⊢ liftHom f (↑ϕ (root f)) (_ : ↑(aeval (↑ϕ (root f))) f = 0) = ϕ\n[PROOFSTEP]\nexact (AlgHom.ext fun x => (SetLike.ext_iff.mp this x).mpr Algebra.mem_top).symm\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf✝ : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f✝ = 0\ninst✝ : Algebra R S\nf : R[X]\nϕ : AdjoinRoot f →ₐ[R] S\n⊢ AlgHom.equalizer ϕ (liftHom f (↑ϕ (root f)) (_ : ↑(aeval (↑ϕ (root f))) f = 0)) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, ← adjoinRoot_eq_top, Algebra.adjoin_le_iff, Set.singleton_subset_iff]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf✝ : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f✝ = 0\ninst✝ : Algebra R S\nf : R[X]\nϕ : AdjoinRoot f →ₐ[R] S\n⊢ root f ∈ ↑(AlgHom.equalizer ϕ (liftHom f (↑ϕ (root f)) (_ : ↑(aeval (↑ϕ (root f))) f = 0)))\n[PROOFSTEP]\nexact (@lift_root _ _ _ _ _ _ _ (aeval_algHom_eq_zero f ϕ)).symm\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\ninst✝ : Algebra R S\nhfx : ↑(aeval a) f = 0\nr : R\n⊢ ↑(of (↑C r * X - 1)) r * root (↑C r * X - 1) = 1\n[PROOFSTEP]\nconvert sub_eq_zero.1 ((eval₂_sub _).symm.trans <| eval₂_root <| C r * X - 1)\n[GOAL]\ncase h.e'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\ninst✝ : Algebra R S\nhfx : ↑(aeval a) f = 0\nr : R\n⊢ ↑(of (↑C r * X - 1)) r * root (↑C r * X - 1) = eval₂ (of (↑C r * X - 1)) (root (↑C r * X - 1)) (↑C r * X)\n[PROOFSTEP]\nsimp only [eval₂_mul, eval₂_C, eval₂_X, eval₂_one]\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\nf : R[X]\ninst✝¹ : CommRing S\ni : R →+* S\na : S\nh : eval₂ i a f = 0\ninst✝ : Algebra R S\nhfx : ↑(aeval a) f = 0\nr : R\n⊢ 1 = eval₂ (of (↑C r * X - 1)) (root (↑C r * X - 1)) 1\n[PROOFSTEP]\nsimp only [eval₂_mul, eval₂_C, eval₂_X, eval₂_one]\n[GOAL]\nR : Type u\nS✝ : Type v\nK : Type w\ninst✝⁴ : CommRing R\nf✝ : R[X]\ninst✝³ : CommRing S✝\ni : R →+* S✝\na : S✝\nh : eval₂ i a f✝ = 0\ninst✝² : Algebra R S✝\nhfx : ↑(aeval a) f✝ = 0\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nr : R\nf g : AdjoinRoot (↑C r * X - 1) →ₐ[R] S\n⊢ ↑(algebraMap R S) r * ↑f (root (↑C r * X - 1)) = 1\n[PROOFSTEP]\nrw [← f.commutes, ← f.map_mul, algebraMap_eq, root_isInv, map_one]\n[GOAL]\nR : Type u\nS✝ : Type v\nK : Type w\ninst✝⁴ : CommRing R\nf✝ : R[X]\ninst✝³ : CommRing S✝\ni : R →+* S✝\na : S✝\nh : eval₂ i a f✝ = 0\ninst✝² : Algebra R S✝\nhfx : ↑(aeval a) f✝ = 0\nS : Type u_1\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nr : R\nf g : AdjoinRoot (↑C r * X - 1) →ₐ[R] S\n⊢ ↑(algebraMap R S) r * ↑g (root (↑C r * X - 1)) = 1\n[PROOFSTEP]\nrw [← g.commutes, ← g.map_mul, algebraMap_eq, root_isInv, map_one]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : Field K\nf : K[X]\ninst✝ : Fact (Irreducible f)\nsrc✝ : GroupWithZero (K[X] ⧸ span {f}) := Quotient.groupWithZero (span {f})\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\nletI : GroupWithZero (AdjoinRoot f) :=\n  Ideal.Quotient.groupWithZero\n    _\n      -- porting note: was\n            -- `rw [Rat.cast_mk' (K := ℚ), _root_.map_mul, _root_.map_intCast, map_inv₀, map_natCast]`\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : Field K\nf : K[X]\ninst✝ : Fact (Irreducible f)\nsrc✝ : GroupWithZero (K[X] ⧸ span {f}) := Quotient.groupWithZero (span {f})\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\nthis : GroupWithZero (AdjoinRoot f) := Quotient.groupWithZero (span {f})\n⊢ ↑(Rat.mk' a b) = ↑a * (↑b)⁻¹\n[PROOFSTEP]\nconvert_to ((Rat.mk' a b h1 h2 : K) : AdjoinRoot f) = ((↑a * (↑b)⁻¹ : K) : AdjoinRoot f)\n[GOAL]\ncase h.e'_3\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : Field K\nf : K[X]\ninst✝ : Fact (Irreducible f)\nsrc✝ : GroupWithZero (K[X] ⧸ span {f}) := Quotient.groupWithZero (span {f})\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\nthis : GroupWithZero (AdjoinRoot f) := Quotient.groupWithZero (span {f})\n⊢ ↑a * (↑b)⁻¹ = ↑(of f) (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nsimp only [_root_.map_mul, map_intCast, map_inv₀, map_natCast]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : Field K\nf : K[X]\ninst✝ : Fact (Irreducible f)\nsrc✝ : GroupWithZero (K[X] ⧸ span {f}) := Quotient.groupWithZero (span {f})\na : ℤ\nb : ℕ\nh1 : b ≠ 0\nh2 : Nat.coprime (Int.natAbs a) b\nthis : GroupWithZero (AdjoinRoot f) := Quotient.groupWithZero (span {f})\n⊢ ↑(of f) ↑(Rat.mk' a b) = ↑(of f) (↑a * (↑b)⁻¹)\n[PROOFSTEP]\nsimp only [Rat.cast_mk', _root_.map_mul, map_intCast, map_inv₀, map_natCast]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : Field K\nf : K[X]\ninst✝ : Fact (Irreducible f)\nsrc✝ : GroupWithZero (K[X] ⧸ span {f}) := Quotient.groupWithZero (span {f})\na : ℚ\nx : AdjoinRoot f\np : K[X]\n⊢ (fun y => a • y = ↑(of f) ↑a * y) (↑(mk f) p)\n[PROOFSTEP]\nsimp only [smul_mk, of, RingHom.comp_apply, ← (mk f).map_mul, Polynomial.rat_smul_eq_C_mul]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\n⊢ Function.LeftInverse ↑(mk g) ↑(modByMonicHom hg)\n[PROOFSTEP]\nintro f\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nf : AdjoinRoot g\n⊢ ↑(mk g) (↑(modByMonicHom hg) f) = f\n[PROOFSTEP]\ninduction f using AdjoinRoot.induction_on\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ ↑(mk g) (↑(modByMonicHom hg) (↑(mk g) p✝)) = ↑(mk g) p✝\n[PROOFSTEP]\nrw [modByMonicHom_mk hg, mk_eq_mk, modByMonic_eq_sub_mul_div _ hg, sub_sub_cancel_left, dvd_neg]\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ g ∣ g * (p✝ /ₘ g)\n[PROOFSTEP]\napply dvd_mul_right\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nf₁ f₂ : AdjoinRoot g\ni : Fin (natDegree g)\n⊢ (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) i =\n    ((fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ + (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) i\n[PROOFSTEP]\nsimp only [(modByMonicHom hg).map_add, coeff_add, Pi.add_apply]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nf₁ : R\nf₂ : AdjoinRoot g\ni : Fin (natDegree g)\n⊢ AddHom.toFun\n      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n        map_add' :=\n          (_ :\n            ∀ (f₁ f₂ : AdjoinRoot g),\n              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ + (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n      (f₁ • f₂) i =\n    (↑(RingHom.id R) f₁ •\n        AddHom.toFun\n          { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n            map_add' :=\n              (_ :\n                ∀ (f₁ f₂ : AdjoinRoot g),\n                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n          f₂)\n      i\n[PROOFSTEP]\nsimp only [(modByMonicHom hg).map_smul, coeff_smul, Pi.smul_apply, RingHom.id_apply]\n  -- porting note: another proof that I converted to tactic mode\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\n⊢ Function.LeftInverse (fun c => ↑(mk g) (∑ i : Fin (natDegree g), ↑(monomial ↑i) (c i)))\n    {\n          toAddHom :=\n            { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : AdjoinRoot g),\n                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                        (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) },\n          map_smul' :=\n            (_ :\n              ∀ (f₁ : R) (f₂ : AdjoinRoot g),\n                AddHom.toFun\n                    { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f₁ f₂ : AdjoinRoot g),\n                            (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                    (f₁ • f₂) =\n                  ↑(RingHom.id R) f₁ •\n                    AddHom.toFun\n                      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : AdjoinRoot g),\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                      f₂) }.toAddHom.toFun\n[PROOFSTEP]\nintro f\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nf : AdjoinRoot g\n⊢ (fun c => ↑(mk g) (∑ i : Fin (natDegree g), ↑(monomial ↑i) (c i)))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                map_add' :=\n                  (_ :\n                    ∀ (f₁ f₂ : AdjoinRoot g),\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                        (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                          (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) },\n            map_smul' :=\n              (_ :\n                ∀ (f₁ : R) (f₂ : AdjoinRoot g),\n                  AddHom.toFun\n                      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : AdjoinRoot g),\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                      (f₁ • f₂) =\n                    ↑(RingHom.id R) f₁ •\n                      AddHom.toFun\n                        { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f₁ f₂ : AdjoinRoot g),\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                        f₂) }.toAddHom\n        f) =\n    f\n[PROOFSTEP]\ninduction f using AdjoinRoot.induction_on\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ (fun c => ↑(mk g) (∑ i : Fin (natDegree g), ↑(monomial ↑i) (c i)))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                map_add' :=\n                  (_ :\n                    ∀ (f₁ f₂ : AdjoinRoot g),\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                        (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                          (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) },\n            map_smul' :=\n              (_ :\n                ∀ (f₁ : R) (f₂ : AdjoinRoot g),\n                  AddHom.toFun\n                      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : AdjoinRoot g),\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                      (f₁ • f₂) =\n                    ↑(RingHom.id R) f₁ •\n                      AddHom.toFun\n                        { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                          map_add' :=\n                            (_ :\n                              ∀ (f₁ f₂ : AdjoinRoot g),\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                        f₂) }.toAddHom\n        (↑(mk g) p✝)) =\n    ↑(mk g) p✝\n[PROOFSTEP]\nsimp only [modByMonicHom_mk, sum_modByMonic_coeff hg degree_le_natDegree]\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ ↑(mk g) (p✝ %ₘ g) = ↑(mk g) p✝\n[PROOFSTEP]\nrefine (mk_eq_mk.mpr ?_).symm\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ g ∣ p✝ - p✝ %ₘ g\n[PROOFSTEP]\nrw [modByMonic_eq_sub_mul_div _ hg, sub_sub_cancel]\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\np✝ : R[X]\n⊢ g ∣ g * (p✝ /ₘ g)\n[PROOFSTEP]\nexact dvd_mul_right _ _\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : AdjoinRoot g),\n                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                        (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) },\n          map_smul' :=\n            (_ :\n              ∀ (f₁ : R) (f₂ : AdjoinRoot g),\n                AddHom.toFun\n                    { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f₁ f₂ : AdjoinRoot g),\n                            (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                    (f₁ • f₂) =\n                  ↑(RingHom.id R) f₁ •\n                    AddHom.toFun\n                      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : AdjoinRoot g),\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                      f₂) }.toAddHom\n      ((fun c => ↑(mk g) (∑ i : Fin (natDegree g), ↑(monomial ↑i) (c i))) x) i =\n    x i\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n✝ : Nontrivial R\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n              map_add' :=\n                (_ :\n                  ∀ (f₁ f₂ : AdjoinRoot g),\n                    (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                      (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                        (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) },\n          map_smul' :=\n            (_ :\n              ∀ (f₁ : R) (f₂ : AdjoinRoot g),\n                AddHom.toFun\n                    { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                      map_add' :=\n                        (_ :\n                          ∀ (f₁ f₂ : AdjoinRoot g),\n                            (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                    (f₁ • f₂) =\n                  ↑(RingHom.id R) f₁ •\n                    AddHom.toFun\n                      { toFun := fun f i => coeff (↑(modByMonicHom hg) f) ↑i,\n                        map_add' :=\n                          (_ :\n                            ∀ (f₁ f₂ : AdjoinRoot g),\n                              (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) (f₁ + f₂) =\n                                (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₁ +\n                                  (fun f i => coeff (↑(modByMonicHom hg) f) ↑i) f₂) }\n                      f₂) }.toAddHom\n      ((fun c => ↑(mk g) (∑ i : Fin (natDegree g), ↑(monomial ↑i) (c i))) x) i =\n    x i\n[PROOFSTEP]\nsimp only [modByMonicHom_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n✝ : Nontrivial R\n⊢ coeff ((∑ x_1 : Fin (natDegree g), ↑(monomial ↑x_1) (x x_1)) %ₘ g) ↑i = x i\n[PROOFSTEP]\nrw [(modByMonic_eq_self_iff hg).mpr, finset_sum_coeff]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n✝ : Nontrivial R\n⊢ ∑ b : Fin (natDegree g), coeff (↑(monomial ↑b) (x b)) ↑i = x i\n[PROOFSTEP]\nsimp_rw [coeff_monomial, Fin.val_eq_val, Finset.sum_ite_eq', if_pos (Finset.mem_univ _)]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n✝ : Nontrivial R\n⊢ degree (∑ x_1 : Fin (natDegree g), ↑(monomial ↑x_1) (x x_1)) < degree g\n[PROOFSTEP]\nsimp_rw [← C_mul_X_pow_eq_monomial]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\nx : Fin (natDegree g) → R\ni : Fin (natDegree g)\n✝ : Nontrivial R\n⊢ degree (∑ x_1 : Fin (natDegree g), ↑C (x x_1) * X ^ ↑x_1) < degree g\n[PROOFSTEP]\nexact (degree_eq_natDegree <| hg.ne_zero).symm ▸ degree_sum_fin_lt _\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\n⊢ ↑(powerBasisAux' hg) i = root g ^ ↑i\n[PROOFSTEP]\nsimp only [powerBasisAux', Basis.coe_ofEquivFun, LinearEquiv.coe_symm_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\n⊢ ↑(mk g) (∑ x : Fin (natDegree g), ↑(monomial ↑x) (Function.update 0 i 1 x)) = root g ^ ↑i\n[PROOFSTEP]\nrw [Finset.sum_eq_single i]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\n⊢ ↑(mk g) (↑(monomial ↑i) (Function.update 0 i 1 i)) = root g ^ ↑i\n[PROOFSTEP]\nrw [Function.update_same, monomial_one_right_eq_X_pow, (mk g).map_pow, mk_X]\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\n⊢ ∀ (b : Fin (natDegree g)), b ∈ Finset.univ → b ≠ i → ↑(monomial ↑b) (Function.update 0 i 1 b) = 0\n[PROOFSTEP]\nintro j _ hj\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni j : Fin (natDegree g)\na✝ : j ∈ Finset.univ\nhj : j ≠ i\n⊢ ↑(monomial ↑j) (Function.update 0 i 1 j) = 0\n[PROOFSTEP]\nrw [← monomial_zero_right _]\n[GOAL]\ncase h₀\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni j : Fin (natDegree g)\na✝ : j ∈ Finset.univ\nhj : j ≠ i\n⊢ ↑(monomial ↑j) (Function.update 0 i 1 j) = ↑(monomial ?m.1619036) 0\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni j : Fin (natDegree g)\na✝ : j ∈ Finset.univ\nhj : j ≠ i\n⊢ ℕ\n[PROOFSTEP]\nconvert\n  congr_arg _\n    (Function.update_noteq hj _ _)\n      -- Fix `DecidableEq` mismatch\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\n⊢ ¬i ∈ Finset.univ → ↑(monomial ↑i) (Function.update 0 i 1 i) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\na✝ : ¬i ∈ Finset.univ\n⊢ ↑(monomial ↑i) (Function.update 0 i 1 i) = 0\n[PROOFSTEP]\nhave := Finset.mem_univ i\n[GOAL]\ncase h₁\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\ng : R[X]\nhg : Monic g\ni : Fin (natDegree g)\na✝ : ¬i ∈ Finset.univ\nthis : i ∈ Finset.univ\n⊢ ↑(monomial ↑i) (Function.update 0 i 1 i) = 0\n[PROOFSTEP]\ncontradiction\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\n⊢ minpoly K (root f) = f * ↑C (Polynomial.leadingCoeff f)⁻¹\n[PROOFSTEP]\nhave f'_monic : Monic _ := monic_mul_leadingCoeff_inv hf\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\n⊢ minpoly K (root f) = f * ↑C (Polynomial.leadingCoeff f)⁻¹\n[PROOFSTEP]\nrefine' (minpoly.unique K _ f'_monic _ _).symm\n[GOAL]\ncase refine'_1\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\n⊢ ↑(aeval (root f)) (f * ↑C (Polynomial.leadingCoeff f)⁻¹) = 0\n[PROOFSTEP]\nrw [AlgHom.map_mul, aeval_eq, mk_self, zero_mul]\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\n⊢ ∀ (q : K[X]), Monic q → ↑(aeval (root f)) q = 0 → degree (f * ↑C (Polynomial.leadingCoeff f)⁻¹) ≤ degree q\n[PROOFSTEP]\nintro q q_monic q_aeval\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\n⊢ degree (f * ↑C (Polynomial.leadingCoeff f)⁻¹) ≤ degree q\n[PROOFSTEP]\nhave commutes : (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval).comp (mk q) = mk f :=\n  by\n  ext\n  · simp only [RingHom.comp_apply, mk_C, lift_of]\n    rfl\n  · simp only [RingHom.comp_apply, mk_X, lift_root]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\n⊢ RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n[PROOFSTEP]\next\n[GOAL]\ncase h₁.a\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\nx✝ : K\n⊢ ↑(RingHom.comp (RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q)) C) x✝ =\n    ↑(RingHom.comp (mk f) C) x✝\n[PROOFSTEP]\nsimp only [RingHom.comp_apply, mk_C, lift_of]\n[GOAL]\ncase h₁.a\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\nx✝ : K\n⊢ ↑(algebraMap K (AdjoinRoot f)) x✝ = ↑(of f) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h₂\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\n⊢ ↑(RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q)) X = ↑(mk f) X\n[PROOFSTEP]\nsimp only [RingHom.comp_apply, mk_X, lift_root]\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ degree (f * ↑C (Polynomial.leadingCoeff f)⁻¹) ≤ degree q\n[PROOFSTEP]\nrw [degree_eq_natDegree f'_monic.ne_zero, degree_eq_natDegree q_monic.ne_zero, Nat.cast_withBot, Nat.cast_withBot,\n  -- porting note: addedWithBot.coe_le_coe, natDegree_mul hf, natDegree_C, add_zero]\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ natDegree f ≤ natDegree q\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ ↑C (Polynomial.leadingCoeff f)⁻¹ ≠ 0\n[PROOFSTEP]\napply natDegree_le_of_dvd\n[GOAL]\ncase refine'_2.h1\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ f ∣ q\n[PROOFSTEP]\nhave : mk f q = 0 := by rw [← commutes, RingHom.comp_apply, mk_self, RingHom.map_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ ↑(mk f) q = 0\n[PROOFSTEP]\nrw [← commutes, RingHom.comp_apply, mk_self, RingHom.map_zero]\n[GOAL]\ncase refine'_2.h1\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\nthis : ↑(mk f) q = 0\n⊢ f ∣ q\n[PROOFSTEP]\nexact mk_eq_zero.1 this\n[GOAL]\ncase refine'_2.h2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ q ≠ 0\n[PROOFSTEP]\nexact q_monic.ne_zero\n[GOAL]\ncase refine'_2\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf'_monic : Monic (f * ↑C (Polynomial.leadingCoeff f)⁻¹)\nq : K[X]\nq_monic : Monic q\nq_aeval : ↑(aeval (root f)) q = 0\ncommutes : RingHom.comp (lift (algebraMap K (AdjoinRoot f)) (root f) q_aeval) (mk q) = mk f\n⊢ ↑C (Polynomial.leadingCoeff f)⁻¹ ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, C_eq_zero, inv_eq_zero, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\n⊢ Basis (Fin (natDegree f)) K (AdjoinRoot f)\n[PROOFSTEP]\nlet f' := f * C f.leadingCoeff⁻¹\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\n⊢ Basis (Fin (natDegree f)) K (AdjoinRoot f)\n[PROOFSTEP]\nhave deg_f' : f'.natDegree = f.natDegree :=\n  by\n  rw [natDegree_mul hf, natDegree_C, add_zero]\n  · rwa [Ne.def, C_eq_zero, inv_eq_zero, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\n⊢ natDegree f' = natDegree f\n[PROOFSTEP]\nrw [natDegree_mul hf, natDegree_C, add_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\n⊢ ↑C (Polynomial.leadingCoeff f)⁻¹ ≠ 0\n[PROOFSTEP]\nrwa [Ne.def, C_eq_zero, inv_eq_zero, leadingCoeff_eq_zero]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\n⊢ Basis (Fin (natDegree f)) K (AdjoinRoot f)\n[PROOFSTEP]\nhave minpoly_eq : minpoly K (root f) = f' := minpoly_root hf\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\n⊢ Basis (Fin (natDegree f)) K (AdjoinRoot f)\n[PROOFSTEP]\napply @Basis.mk _ _ _ fun i : Fin f.natDegree => root f ^ i.val\n[GOAL]\ncase hli\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\n⊢ LinearIndependent K fun i => root f ^ ↑i\n[PROOFSTEP]\nrw [← deg_f', ← minpoly_eq]\n[GOAL]\ncase hli\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\n⊢ LinearIndependent K fun i => root f ^ ↑i\n[PROOFSTEP]\nexact linearIndependent_pow (root f)\n[GOAL]\ncase hsp\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\n⊢ ⊤ ≤ Submodule.span K (Set.range fun i => root f ^ ↑i)\n[PROOFSTEP]\nrintro y -\n[GOAL]\ncase hsp\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\n⊢ y ∈ Submodule.span K (Set.range fun i => root f ^ ↑i)\n[PROOFSTEP]\nrw [← deg_f', ← minpoly_eq]\n[GOAL]\ncase hsp\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\n⊢ y ∈ Submodule.span K (Set.range fun i => root f ^ ↑i)\n[PROOFSTEP]\napply (isIntegral_root hf).mem_span_pow\n[GOAL]\ncase hsp\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\n⊢ ∃ f_1, y = ↑(aeval (root f)) f_1\n[PROOFSTEP]\nobtain ⟨g⟩ := y\n[GOAL]\ncase hsp.mk\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng✝ : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\ng : K[X]\n⊢ ∃ f_1, Quot.mk Setoid.r g = ↑(aeval (root f)) f_1\n[PROOFSTEP]\nuse g\n[GOAL]\ncase h\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng✝ : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\ng : K[X]\n⊢ Quot.mk Setoid.r g = ↑(aeval (root f)) g\n[PROOFSTEP]\nrw [aeval_eq]\n[GOAL]\ncase h\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng✝ : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\nf' : K[X] := f * ↑C (Polynomial.leadingCoeff f)⁻¹\ndeg_f' : natDegree f' = natDegree f\nminpoly_eq : minpoly K (root f) = f'\ny : AdjoinRoot f\ng : K[X]\n⊢ Quot.mk Setoid.r g = ↑(mk f) g\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\n⊢ ∀ (i : Fin (natDegree f)), ↑(powerBasisAux hf) i = root f ^ ↑i\n[PROOFSTEP]\nsimp [powerBasisAux]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : f ≠ 0\n⊢ minpoly K (powerBasis hf).gen = f * ↑C (Polynomial.leadingCoeff f)⁻¹\n[PROOFSTEP]\nrw [powerBasis_gen, minpoly_root hf]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝¹ : CommRing R\ng : R[X]\ninst✝ : Field K\nf : K[X]\nhf : Monic f\nhf' : optParam (f ≠ 0) (_ : f ≠ 0)\n⊢ minpoly K (powerBasis hf').gen = f\n[PROOFSTEP]\nrw [minpoly_powerBasis_gen hf', hf.leadingCoeff, inv_one, C.map_one, mul_one]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ ↑(aeval { val := x, property := (_ : x ∈ adjoin R {x}) }) (minpoly R x) = 0\n[PROOFSTEP]\nsimp [← Subalgebra.coe_eq_zero, aeval_subalgebra_coe]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\na : AdjoinRoot (minpoly R x)\n⊢ ↑(aeval { val := x, property := (_ : x ∈ adjoin R {x}) }) (minpoly R x) = 0\n[PROOFSTEP]\nsimp [← Subalgebra.coe_eq_zero, aeval_subalgebra_coe]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ ↑(toAdjoin R x) (↑(mk (minpoly R x)) X) = { val := x, property := (_ : x ∈ adjoin R {x}) }\n[PROOFSTEP]\nsimp [toAdjoin]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ Function.Surjective ↑(toAdjoin R x)\n[PROOFSTEP]\nrw [← range_top_iff_surjective, _root_.eq_top_iff, ← adjoin_adjoin_coe_preimage]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ adjoin R (Subtype.val ⁻¹' {x}) ≤ AlgHom.range (toAdjoin R x)\n[PROOFSTEP]\nrefine' adjoin_le _\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ Subtype.val ⁻¹' {x} ⊆ ↑(AlgHom.range (toAdjoin R x))\n[PROOFSTEP]\nsimp only [AlgHom.coe_range, Set.mem_range]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx : S\n⊢ Subtype.val ⁻¹' {x} ⊆ Set.range ↑(toAdjoin R x)\n[PROOFSTEP]\nrintro ⟨y₁, y₂⟩ h\n[GOAL]\ncase mk\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx y₁ : S\ny₂ : y₁ ∈ ↑(adjoin R {x})\nh : { val := y₁, property := y₂ } ∈ Subtype.val ⁻¹' {x}\n⊢ { val := y₁, property := y₂ } ∈ Set.range ↑(toAdjoin R x)\n[PROOFSTEP]\nrefine' ⟨mk (minpoly R x) X, by simpa [toAdjoin] using h.symm⟩\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\nx y₁ : S\ny₂ : y₁ ∈ ↑(adjoin R {x})\nh : { val := y₁, property := y₂ } ∈ Subtype.val ⁻¹' {x}\n⊢ ↑(toAdjoin R x) (↑(mk (minpoly R x)) X) = { val := y₁, property := y₂ }\n[PROOFSTEP]\nsimpa [toAdjoin] using h.symm\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\ng : R[X]\npb : PowerBasis R S\nh₁ : ↑(aeval (root g)) (minpoly R pb.gen) = 0\nh₂ : ↑(aeval pb.gen) g = 0\nsrc✝ : AdjoinRoot g →ₐ[R] S := liftHom g pb.gen h₂\nx : AdjoinRoot g\n⊢ ↑(PowerBasis.lift pb (root g) h₁) (↑(liftHom g pb.gen h₂) x) = x\n[PROOFSTEP]\ninduction x using AdjoinRoot.induction_on\n[GOAL]\ncase ih\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\ng : R[X]\npb : PowerBasis R S\nh₁ : ↑(aeval (root g)) (minpoly R pb.gen) = 0\nh₂ : ↑(aeval pb.gen) g = 0\nsrc✝ : AdjoinRoot g →ₐ[R] S := liftHom g pb.gen h₂\np✝ : R[X]\n⊢ ↑(PowerBasis.lift pb (root g) h₁) (↑(liftHom g pb.gen h₂) (↑(mk g) p✝)) = ↑(mk g) p✝\n[PROOFSTEP]\nrw [liftHom_mk, pb.lift_aeval, aeval_eq]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\ng : R[X]\npb : PowerBasis R S\nh₁ : ↑(aeval (root g)) (minpoly R pb.gen) = 0\nh₂ : ↑(aeval pb.gen) g = 0\nsrc✝ : AdjoinRoot g →ₐ[R] S := liftHom g pb.gen h₂\nx : S\n⊢ ↑(liftHom g pb.gen h₂) (↑(PowerBasis.lift pb (root g) h₁) x) = x\n[PROOFSTEP]\nnontriviality S\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\ng : R[X]\npb : PowerBasis R S\nh₁ : ↑(aeval (root g)) (minpoly R pb.gen) = 0\nh₂ : ↑(aeval pb.gen) g = 0\nsrc✝ : AdjoinRoot g →ₐ[R] S := liftHom g pb.gen h₂\nx : S\n✝ : Nontrivial S\n⊢ ↑(liftHom g pb.gen h₂) (↑(PowerBasis.lift pb (root g) h₁) x) = x\n[PROOFSTEP]\nobtain ⟨f, _hf, rfl⟩ := pb.exists_eq_aeval x\n[GOAL]\ncase intro.intro\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\ng : R[X]\npb : PowerBasis R S\nh₁ : ↑(aeval (root g)) (minpoly R pb.gen) = 0\nh₂ : ↑(aeval pb.gen) g = 0\nsrc✝ : AdjoinRoot g →ₐ[R] S := liftHom g pb.gen h₂\n✝ : Nontrivial S\nf : R[X]\n_hf : natDegree f < pb.dim\n⊢ ↑(liftHom g pb.gen h₂) (↑(PowerBasis.lift pb (root g) h₁) (↑(aeval pb.gen) f)) = ↑(aeval pb.gen) f\n[PROOFSTEP]\nrw [pb.lift_aeval, aeval_eq, liftHom_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\nL : Type u_1\nF : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\npb : PowerBasis F K\nf : F[X]\nhf : f ≠ 0\nx : L\n⊢ x ∈ roots (Polynomial.map (algebraMap F L) (minpoly F (powerBasis hf).gen)) ↔\n    ↑(Equiv.refl L) x ∈ roots (Polynomial.map (algebraMap F L) f)\n[PROOFSTEP]\nrw [powerBasis_gen, minpoly_root hf, Polynomial.map_mul, roots_mul, Polynomial.map_C, roots_C, add_zero,\n  Equiv.refl_apply]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\nL : Type u_1\nF : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\npb : PowerBasis F K\nf : F[X]\nhf : f ≠ 0\nx : L\n⊢ Polynomial.map (algebraMap F L) f * Polynomial.map (algebraMap F L) (↑C (Polynomial.leadingCoeff f)⁻¹) ≠ 0\n[PROOFSTEP]\nrw [← Polynomial.map_mul]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\nL : Type u_1\nF : Type u_2\ninst✝⁴ : Field F\ninst✝³ : Field K\ninst✝² : Field L\ninst✝¹ : Algebra F K\ninst✝ : Algebra F L\npb : PowerBasis F K\nf : F[X]\nhf : f ≠ 0\nx : L\n⊢ Polynomial.map (algebraMap F L) (f * ↑C (Polynomial.leadingCoeff f)⁻¹) ≠ 0\n[PROOFSTEP]\nexact map_monic_ne_zero (monic_mul_leadingCoeff_inv hf)\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf : R[X]\n⊢ Ideal.map (of f) I = Ideal.map (Ideal.Quotient.mk (span {f})) (Ideal.map C I)\n[PROOFSTEP]\nrw [of, AdjoinRoot.mk, Ideal.map_map]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf : R[X]\nx : AdjoinRoot f\n⊢ ↑(RingEquiv.symm (quotMapOfEquivQuotMapCMapSpanMk I f))\n      (↑(Ideal.Quotient.mk (Ideal.map (Ideal.Quotient.mk (span {f})) (Ideal.map C I))) x) =\n    ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) x\n[PROOFSTEP]\nrw [quotMapOfEquivQuotMapCMapSpanMk, Ideal.quotEquivOfEq_symm]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf : R[X]\nx : AdjoinRoot f\n⊢ ↑(quotEquivOfEq (_ : Ideal.map (Ideal.Quotient.mk (span {f})) (Ideal.map C I) = Ideal.map (of f) I))\n      (↑(Ideal.Quotient.mk (Ideal.map (Ideal.Quotient.mk (span {f})) (Ideal.map C I))) x) =\n    ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) x\n[PROOFSTEP]\nexact Ideal.quotEquivOfEq_mk _ _\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf : R[X]\n⊢ span {↑(Ideal.Quotient.mk (Ideal.map C I)) f} =\n    Ideal.map (↑(polynomialQuotientEquivQuotientPolynomial I)) (span {Polynomial.map (Ideal.Quotient.mk I) f})\n[PROOFSTEP]\nrw [map_span, Set.image_singleton, RingEquiv.coe_toRingHom, polynomialQuotientEquivQuotientPolynomial_map_mk I f]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf p : R[X]\n⊢ ↑(quotQuotEquivComm I f)\n      (↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) p)) =\n    ↑(Ideal.Quotient.mk (span {↑(Ideal.Quotient.mk (Ideal.map C I)) f})) (↑(Ideal.Quotient.mk (Ideal.map C I)) p)\n[PROOFSTEP]\nsimp only [Polynomial.quotQuotEquivComm, quotientEquiv_mk, polynomialQuotientEquivQuotientPolynomial_map_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf p : R[X]\n⊢ ↑(RingEquiv.symm (quotQuotEquivComm I f))\n      (↑(Ideal.Quotient.mk (span {↑(Ideal.Quotient.mk (Ideal.map C I)) f})) (↑(Ideal.Quotient.mk (Ideal.map C I)) p)) =\n    ↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) p)\n[PROOFSTEP]\nsimp only [Polynomial.quotQuotEquivComm, quotientEquiv_symm_mk, polynomialQuotientEquivQuotientPolynomial_symm_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf : R[X]\n⊢ Ideal.map (Ideal.Quotient.mk (Ideal.map C I)) (span {f}) = span {↑(Ideal.Quotient.mk (Ideal.map C I)) f}\n[PROOFSTEP]\nrw [map_span, Set.image_singleton]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI : Ideal R\nf p : R[X]\n⊢ ↑(RingEquiv.symm (quotAdjoinRootEquivQuotPolynomialQuot I f))\n      (↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) p)) =\n    ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) p)\n[PROOFSTEP]\nrw [quotAdjoinRootEquivQuotPolynomialQuot, RingEquiv.symm_trans_apply, RingEquiv.symm_trans_apply,\n  RingEquiv.symm_trans_apply, RingEquiv.symm_symm, Polynomial.quotQuotEquivComm_mk, Ideal.quotEquivOfEq_symm,\n  Ideal.quotEquivOfEq_mk, ← RingHom.comp_apply, ← DoubleQuot.quotQuotMk,\n  quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk_symm_quotQuotMk, quotMapOfEquivQuotMapCMapSpanMk_symm_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI✝ : Ideal R\nf✝ f : R[X]\nI : Ideal R\nx : R\n⊢ ↑(quotAdjoinRootEquivQuotPolynomialQuot I f) (↑(algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x) =\n    ↑(algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x\n[PROOFSTEP]\nhave :\n  algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I) x =\n    Ideal.Quotient.mk (Ideal.map (AdjoinRoot.of f) I) ((mk f) (C x)) :=\n  rfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI✝ : Ideal R\nf✝ f : R[X]\nI : Ideal R\nx : R\nthis :\n  ↑(algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) (↑C x))\n⊢ ↑(quotAdjoinRootEquivQuotPolynomialQuot I f) (↑(algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x) =\n    ↑(algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x\n[PROOFSTEP]\nrw [this, quotAdjoinRootEquivQuotPolynomialQuot_mk_of, map_C]\n  -- Porting note: the following `rfl` was not needed\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI✝ : Ideal R\nf✝ f : R[X]\nI : Ideal R\nx : R\nthis :\n  ↑(algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) (↑C x))\n⊢ ↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (↑C (↑(Ideal.Quotient.mk I) x)) =\n    ↑(algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI✝ : Ideal R\nf✝ f g : R[X]\nI : Ideal R\n⊢ ↑(quotEquivQuotMap f I) (↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) g)) =\n    ↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) g)\n[PROOFSTEP]\nrw [AdjoinRoot.quotEquivQuotMap_apply, AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot_mk_of]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝ : CommRing R\nI✝ : Ideal R\nf✝ f g : R[X]\nI : Ideal R\n⊢ ↑(AlgEquiv.symm (quotEquivQuotMap f I))\n      (↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) g)) =\n    ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) g)\n[PROOFSTEP]\nrw [AdjoinRoot.quotEquivQuotMap_symm_apply, AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot_symm_mk_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\nx : R\n⊢ ↑(aeval (root (minpoly R pb.gen))) (minpoly R pb.gen) = 0\n[PROOFSTEP]\nrw [AdjoinRoot.aeval_eq, AdjoinRoot.mk_self]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\nx : R\n⊢ Ideal.map (of (minpoly R pb.gen)) I =\n    Ideal.map\n      (↑(toRingEquiv\n          (AlgEquiv.symm\n            (equiv' (minpoly R pb.gen) pb (_ : ↑(aeval (root (minpoly R pb.gen))) (minpoly R pb.gen) = 0)\n              (_ : ↑(aeval pb.gen) (minpoly R pb.gen) = 0)))))\n      (Ideal.map (algebraMap R S) I)\n[PROOFSTEP]\nrw [Ideal.map_map, AlgEquiv.toRingEquiv_eq_coe, ← AlgEquiv.coe_ringHom_commutes, ← AdjoinRoot.algebraMap_eq,\n  AlgHom.comp_algebraMap]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\nx : R\n⊢ ↑(quotientEquiv (Ideal.map (algebraMap R S) I) (Ideal.map (of (minpoly R pb.gen)) I)\n          (toRingEquiv\n            (AlgEquiv.symm\n              (equiv' (minpoly R pb.gen) pb (_ : ↑(aeval (root (minpoly R pb.gen))) (minpoly R pb.gen) = 0)\n                (_ : ↑(aeval pb.gen) (minpoly R pb.gen) = 0))))\n          (_ :\n            Ideal.map (of (minpoly R pb.gen)) I =\n              Ideal.map\n                (↑(toRingEquiv\n                    (AlgEquiv.symm\n                      (equiv' (minpoly R pb.gen) pb (_ : ↑(aeval (root (minpoly R pb.gen))) (minpoly R pb.gen) = 0)\n                        (_ : ↑(aeval pb.gen) (minpoly R pb.gen) = 0)))))\n                (Ideal.map (algebraMap R S) I)))\n      (↑(algebraMap R (S ⧸ Ideal.map (algebraMap R S) I)) x) =\n    ↑(algebraMap R (AdjoinRoot (minpoly R pb.gen) ⧸ Ideal.map (of (minpoly R pb.gen)) I)) x\n[PROOFSTEP]\nrw [← Ideal.Quotient.mk_algebraMap, Ideal.quotientEquiv_apply, RingHom.toFun_eq_coe, Ideal.quotientMap_mk,\n  AlgEquiv.toRingEquiv_eq_coe, RingEquiv.coe_toRingHom, AlgEquiv.coe_ringEquiv, AlgEquiv.commutes,\n  Quotient.mk_algebraMap]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\nx : R\n⊢ ↑(Ideal.Quotient.mk (Ideal.map (of (minpoly R pb.gen)) I)) (↑(algebraMap R (AdjoinRoot (minpoly R pb.gen))) x) =\n    ↑(algebraMap R (AdjoinRoot (minpoly R pb.gen) ⧸ Ideal.map (of (minpoly R pb.gen)) I)) x\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\ng : R[X]\n⊢ ↑(quotientEquivQuotientMinpolyMap pb I) (↑(Ideal.Quotient.mk (Ideal.map (algebraMap R S) I)) (↑(aeval pb.gen) g)) =\n    ↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) (minpoly R pb.gen)}))\n      (Polynomial.map (Ideal.Quotient.mk I) g)\n[PROOFSTEP]\nrw [PowerBasis.quotientEquivQuotientMinpolyMap, AlgEquiv.trans_apply, AlgEquiv.ofRingEquiv_apply, quotientEquiv_mk,\n  AlgEquiv.coe_ringEquiv', AdjoinRoot.equiv'_symm_apply, PowerBasis.lift_aeval, AdjoinRoot.aeval_eq,\n  AdjoinRoot.quotEquivQuotMap_apply_mk]\n[GOAL]\nR : Type u\nS : Type v\nK : Type w\ninst✝² : CommRing R\ninst✝¹ : CommRing S\ninst✝ : Algebra R S\npb : PowerBasis R S\nI : Ideal R\ng : R[X]\n⊢ ↑(AlgEquiv.symm (quotientEquivQuotientMinpolyMap pb I))\n      (↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) (minpoly R pb.gen)}))\n        (Polynomial.map (Ideal.Quotient.mk I) g)) =\n    ↑(Ideal.Quotient.mk (Ideal.map (algebraMap R S) I)) (↑(aeval pb.gen) g)\n[PROOFSTEP]\nsimp only [quotientEquivQuotientMinpolyMap, toRingEquiv_eq_coe, symm_trans_apply, quotEquivQuotMap_symm_apply_mk,\n  ofRingEquiv_symm_apply, quotientEquiv_symm_mk, toRingEquiv_symm, RingEquiv.symm_symm, AdjoinRoot.equiv'_apply,\n  coe_ringEquiv, liftHom_mk, symm_toRingEquiv]\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.AdjoinRoot", "llama_tokens": 27404, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5698526514141571, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.27158017776866955}}
{"text": "[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : L → R\nm : M\n⊢ m ∈ preWeightSpace M χ ↔ ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nsimp [preWeightSpace]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : IsNoetherian R M\nx : L\n⊢ ∃ k, preWeightSpace M 0 ≤ LinearMap.ker (↑(toEndomorphism R L M) x ^ k)\n[PROOFSTEP]\nuse(toEndomorphism R L M x).maximalGeneralizedEigenspaceIndex 0\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : IsNoetherian R M\nx : L\n⊢ preWeightSpace M 0 ≤\n    LinearMap.ker\n      (↑(toEndomorphism R L M) x ^ Module.End.maximalGeneralizedEigenspaceIndex (↑(toEndomorphism R L M) x) 0)\n[PROOFSTEP]\nsimp only [← Module.End.generalizedEigenspace_zero, preWeightSpace, Pi.zero_apply, iInf_le, ←\n  (toEndomorphism R L M x).maximalGeneralizedEigenspace_eq]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\n⊢ LinearMap.range (LinearMap.comp (↑g) (TensorProduct.mapIncl (preWeightSpace M₁ χ₁) (preWeightSpace M₂ χ₂))) ≤\n    preWeightSpace M₃ (χ₁ + χ₂)\n[PROOFSTEP]\nintro m₃\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nm₃ : M₃\n⊢ m₃ ∈ LinearMap.range (LinearMap.comp (↑g) (TensorProduct.mapIncl (preWeightSpace M₁ χ₁) (preWeightSpace M₂ χ₂))) →\n    m₃ ∈ preWeightSpace M₃ (χ₁ + χ₂)\n[PROOFSTEP]\nsimp only [LieModuleHom.coe_toLinearMap, Pi.add_apply, Function.comp_apply, mem_preWeightSpace, LinearMap.coe_comp,\n  TensorProduct.mapIncl, exists_imp, LinearMap.mem_range]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nm₃ : M₃\n⊢ ∀ (x : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }),\n    ↑g (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂))) x) =\n        m₃ →\n      ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k) m₃ = 0\n[PROOFSTEP]\nrintro t rfl x\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            t)) =\n      0\n[PROOFSTEP]\nlet F : Module.End R M₃ :=\n  toEndomorphism R L M₃ x -\n    (χ₁ x + χ₂ x) •\n      ↑1\n          -- The goal is linear in `t` so use induction to reduce to the case that `t` is a pure tensor.\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            t)) =\n      0\n[PROOFSTEP]\nrefine t.induction_on ?_ ?_ ?_\n[GOAL]\ncase refine_1\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            0)) =\n      0\n[PROOFSTEP]\nuse 0\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ 0)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          0)) =\n    0\n[PROOFSTEP]\nsimp only [LinearMap.map_zero, LieModuleHom.map_zero]\n[GOAL]\ncase refine_2\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∀ (x_1 : { x // x ∈ preWeightSpace M₁ χ₁ }) (y : { x // x ∈ preWeightSpace M₂ χ₂ }),\n    ∃ k,\n      ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n          (↑g\n            (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n              (x_1 ⊗ₜ[R] y))) =\n        0\ncase refine_3\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∀ (x_1 y : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }),\n    (∃ k,\n        ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n            (↑g\n              (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                    (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                x_1)) =\n          0) →\n      (∃ k,\n          ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n              (↑g\n                (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                      (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                  y)) =\n            0) →\n        ∃ k,\n          ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n              (↑g\n                (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                      (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                  (x_1 + y))) =\n            0\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine_3\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∀ (x_1 y : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }),\n    (∃ k,\n        ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n            (↑g\n              (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                    (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                x_1)) =\n          0) →\n      (∃ k,\n          ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n              (↑g\n                (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                      (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                  y)) =\n            0) →\n        ∃ k,\n          ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n              (↑g\n                (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁))\n                      (Submodule.subtype (preWeightSpace M₂ χ₂)))\n                  (x_1 + y))) =\n            0\n[PROOFSTEP]\nrintro t₁ t₂ ⟨k₁, hk₁⟩ ⟨k₂, hk₂⟩\n[GOAL]\ncase refine_3.intro.intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nt₁ t₂ : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nk₁ : ℕ\nhk₁ :\n  ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k₁)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          t₁)) =\n    0\nk₂ : ℕ\nhk₂ :\n  ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k₂)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          t₂)) =\n    0\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            (t₁ + t₂))) =\n      0\n[PROOFSTEP]\nuse max k₁ k₂\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nt₁ t₂ : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nk₁ : ℕ\nhk₁ :\n  ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k₁)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          t₁)) =\n    0\nk₂ : ℕ\nhk₂ :\n  ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k₂)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          t₂)) =\n    0\n⊢ ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ max k₁ k₂)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          (t₁ + t₂))) =\n    0\n[PROOFSTEP]\nsimp only [LieModuleHom.map_add, LinearMap.map_add, LinearMap.pow_map_zero_of_le (le_max_left k₁ k₂) hk₁,\n  LinearMap.pow_map_zero_of_le (le_max_right k₁ k₂) hk₂, add_zero]\n  -- Now the main argument: pure tensors.\n[GOAL]\ncase refine_2\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\n⊢ ∀ (x_1 : { x // x ∈ preWeightSpace M₁ χ₁ }) (y : { x // x ∈ preWeightSpace M₂ χ₂ }),\n    ∃ k,\n      ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n          (↑g\n            (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n              (x_1 ⊗ₜ[R] y))) =\n        0\n[PROOFSTEP]\nrintro ⟨m₁, hm₁⟩\n  ⟨m₂, hm₂⟩\n      --  change ∃ k, (F ^ k) ((g : M₁ ⊗[R] M₂ →ₗ[R] M₃) (m₁ ⊗ₜ m₂)) = 0\n        -- Eliminate `g` from the picture.\n[GOAL]\ncase refine_2.mk.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n      0\n[PROOFSTEP]\nlet f₁ : Module.End R (M₁ ⊗[R] M₂) := (toEndomorphism R L M₁ x - χ₁ x • ↑1).rTensor M₂\n[GOAL]\ncase refine_2.mk.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n      0\n[PROOFSTEP]\nlet f₂ : Module.End R (M₁ ⊗[R] M₂) := (toEndomorphism R L M₂ x - χ₂ x • ↑1).lTensor M₁\n[GOAL]\ncase refine_2.mk.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n      0\n[PROOFSTEP]\nhave h_comm_square : F ∘ₗ ↑g = (g : M₁ ⊗[R] M₂ →ₗ[R] M₃).comp (f₁ + f₂) :=\n  by\n  ext m₁ m₂;\n  simp only [← g.map_lie x (m₁ ⊗ₜ m₂), add_smul, sub_tmul, tmul_sub, smul_tmul, lie_tmul_right, tmul_smul,\n    toEndomorphism_apply_apply, LieModuleHom.map_smul, LinearMap.one_apply, LieModuleHom.coe_toLinearMap,\n    LinearMap.smul_apply, Function.comp_apply, LinearMap.coe_comp, LinearMap.rTensor_tmul, LieModuleHom.map_add,\n    LinearMap.add_apply, LieModuleHom.map_sub, LinearMap.sub_apply, LinearMap.lTensor_tmul,\n    AlgebraTensorModule.curry_apply, curry_apply, LinearMap.toFun_eq_coe, LinearMap.coe_restrictScalars]\n  abel\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\n⊢ LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\n[PROOFSTEP]\next m₁ m₂\n[GOAL]\ncase a.h.h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁✝ : M₁\nhm₁ : m₁✝ ∈ preWeightSpace M₁ χ₁\nm₂✝ : M₂\nhm₂ : m₂✝ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nm₁ : M₁\nm₂ : M₂\n⊢ ↑(↑(AlgebraTensorModule.curry (LinearMap.comp F ↑g)) m₁) m₂ =\n    ↑(↑(AlgebraTensorModule.curry (LinearMap.comp (↑g) (f₁ + f₂))) m₁) m₂\n[PROOFSTEP]\nsimp only [← g.map_lie x (m₁ ⊗ₜ m₂), add_smul, sub_tmul, tmul_sub, smul_tmul, lie_tmul_right, tmul_smul,\n  toEndomorphism_apply_apply, LieModuleHom.map_smul, LinearMap.one_apply, LieModuleHom.coe_toLinearMap,\n  LinearMap.smul_apply, Function.comp_apply, LinearMap.coe_comp, LinearMap.rTensor_tmul, LieModuleHom.map_add,\n  LinearMap.add_apply, LieModuleHom.map_sub, LinearMap.sub_apply, LinearMap.lTensor_tmul,\n  AlgebraTensorModule.curry_apply, curry_apply, LinearMap.toFun_eq_coe, LinearMap.coe_restrictScalars]\n[GOAL]\ncase a.h.h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁✝ : M₁\nhm₁ : m₁✝ ∈ preWeightSpace M₁ χ₁\nm₂✝ : M₂\nhm₂ : m₂✝ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nm₁ : M₁\nm₂ : M₂\n⊢ ↑g (⁅x, m₁⁆ ⊗ₜ[R] m₂) + ↑g (m₁ ⊗ₜ[R] ⁅x, m₂⁆) - (χ₁ x • ↑g (m₁ ⊗ₜ[R] m₂) + χ₂ x • ↑g (m₁ ⊗ₜ[R] m₂)) =\n    ↑g (⁅x, m₁⁆ ⊗ₜ[R] m₂) - χ₁ x • ↑g (m₁ ⊗ₜ[R] m₂) + (↑g (m₁ ⊗ₜ[R] ⁅x, m₂⁆) - χ₂ x • ↑g (m₁ ⊗ₜ[R] m₂))\n[PROOFSTEP]\nabel\n[GOAL]\ncase a.h.h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁✝ : M₁\nhm₁ : m₁✝ ∈ preWeightSpace M₁ χ₁\nm₂✝ : M₂\nhm₂ : m₂✝ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nm₁ : M₁\nm₂ : M₂\n⊢ ↑g (⁅x, m₁⁆ ⊗ₜ[R] m₂) + ↑g (m₁ ⊗ₜ[R] ⁅x, m₂⁆) - (χ₁ x • ↑g (m₁ ⊗ₜ[R] m₂) + χ₂ x • ↑g (m₁ ⊗ₜ[R] m₂)) =\n    ↑g (⁅x, m₁⁆ ⊗ₜ[R] m₂) - χ₁ x • ↑g (m₁ ⊗ₜ[R] m₂) + (↑g (m₁ ⊗ₜ[R] ⁅x, m₂⁆) - χ₂ x • ↑g (m₁ ⊗ₜ[R] m₂))\n[PROOFSTEP]\nabel\n[GOAL]\ncase refine_2.mk.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n      0\n[PROOFSTEP]\nrsuffices ⟨k, hk⟩ : ∃ k : ℕ, ((f₁ + f₂) ^ k) (m₁ ⊗ₜ m₂) = 0\n[GOAL]\ncase refine_2.mk.mk.intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nk : ℕ\nhk : ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ∃ k,\n    ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n        (↑g\n          (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n            ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n      0\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nk : ℕ\nhk : ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ↑((↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1) ^ k)\n      (↑g\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace M₁ χ₁)) (Submodule.subtype (preWeightSpace M₂ χ₂)))\n          ({ val := m₁, property := hm₁ } ⊗ₜ[R] { val := m₂, property := hm₂ }))) =\n    0\n[PROOFSTEP]\nchange (F ^ k) (g.toLinearMap (m₁ ⊗ₜ[R] m₂)) = 0\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nk : ℕ\nhk : ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ↑(F ^ k) (↑↑g (m₁ ⊗ₜ[R] m₂)) = 0\n[PROOFSTEP]\nrw [← LinearMap.comp_apply, LinearMap.commute_pow_left_of_commute h_comm_square, LinearMap.comp_apply, hk,\n  LinearMap.map_zero]\n  -- Unpack the information we have about `m₁`, `m₂`.\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nhm₁ : m₁ ∈ preWeightSpace M₁ χ₁\nm₂ : M₂\nhm₂ : m₂ ∈ preWeightSpace M₂ χ₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nsimp only [mem_preWeightSpace] at hm₁ hm₂ \n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nobtain ⟨k₁, hk₁⟩ := hm₁ x\n[GOAL]\ncase intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nobtain ⟨k₂, hk₂⟩ := hm₂ x\n[GOAL]\ncase intro.intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nhave hf₁ : (f₁ ^ k₁) (m₁ ⊗ₜ m₂) = 0 := by simp only [hk₁, zero_tmul, LinearMap.rTensor_tmul, LinearMap.rTensor_pow]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\n⊢ ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nsimp only [hk₁, zero_tmul, LinearMap.rTensor_tmul, LinearMap.rTensor_pow]\n[GOAL]\ncase intro.intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nhave hf₂ : (f₂ ^ k₂) (m₁ ⊗ₜ m₂) = 0 := by\n  simp only [hk₂, tmul_zero, LinearMap.lTensor_tmul, LinearMap.lTensor_pow]\n    -- It's now just an application of the binomial theorem.\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nsimp only [hk₂, tmul_zero, LinearMap.lTensor_tmul, LinearMap.lTensor_pow]\n  -- It's now just an application of the binomial theorem.\n[GOAL]\ncase intro.intro\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ∃ k, ↑((f₁ + f₂) ^ k) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nuse k₁ + k₂ - 1\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ ↑((f₁ + f₂) ^ (k₁ + k₂ - 1)) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nhave hf_comm : Commute f₁ f₂ := by\n  ext m₁ m₂\n  simp only [LinearMap.mul_apply, LinearMap.rTensor_tmul, LinearMap.lTensor_tmul, AlgebraTensorModule.curry_apply,\n    LinearMap.toFun_eq_coe, LinearMap.lTensor_tmul, curry_apply, LinearMap.coe_restrictScalars]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ Commute f₁ f₂\n[PROOFSTEP]\next m₁ m₂\n[GOAL]\ncase a.h.h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁✝ : M₁\nm₂✝ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁✝ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂✝ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁✝ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂✝ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁✝ ⊗ₜ[R] m₂✝) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁✝ ⊗ₜ[R] m₂✝) = 0\nm₁ : M₁\nm₂ : M₂\n⊢ ↑(↑(AlgebraTensorModule.curry (f₁ * f₂)) m₁) m₂ = ↑(↑(AlgebraTensorModule.curry (f₂ * f₁)) m₁) m₂\n[PROOFSTEP]\nsimp only [LinearMap.mul_apply, LinearMap.rTensor_tmul, LinearMap.lTensor_tmul, AlgebraTensorModule.curry_apply,\n  LinearMap.toFun_eq_coe, LinearMap.lTensor_tmul, curry_apply, LinearMap.coe_restrictScalars]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\n⊢ ↑((f₁ + f₂) ^ (k₁ + k₂ - 1)) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nrw [hf_comm.add_pow']\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\n⊢ ↑(∑ m in Finset.Nat.antidiagonal (k₁ + k₂ - 1), Nat.choose (k₁ + k₂ - 1) m.fst • (f₁ ^ m.fst * f₂ ^ m.snd))\n      (m₁ ⊗ₜ[R] m₂) =\n    0\n[PROOFSTEP]\nsimp only [TensorProduct.mapIncl, Submodule.subtype_apply, Finset.sum_apply, Submodule.coe_mk, LinearMap.coeFn_sum,\n  TensorProduct.map_tmul, LinearMap.smul_apply]\n  -- The required sum is zero because each individual term is zero.\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\n⊢ ∑ x_1 in Finset.Nat.antidiagonal (k₁ + k₂ - 1),\n      Nat.choose (k₁ + k₂ - 1) x_1.fst •\n        ↑(LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ x_1.fst *\n              LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ x_1.snd)\n          (m₁ ⊗ₜ[R] m₂) =\n    0\n[PROOFSTEP]\napply Finset.sum_eq_zero\n[GOAL]\ncase h.h\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\n⊢ ∀ (x_1 : ℕ × ℕ),\n    x_1 ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1) →\n      Nat.choose (k₁ + k₂ - 1) x_1.fst •\n          ↑(LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ x_1.fst *\n                LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ x_1.snd)\n            (m₁ ⊗ₜ[R] m₂) =\n        0\n[PROOFSTEP]\nrintro ⟨i, j⟩ hij\n[GOAL]\ncase h.h.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\n⊢ Nat.choose (k₁ + k₂ - 1) (i, j).fst •\n      ↑(LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ (i, j).fst *\n            LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ (i, j).snd)\n        (m₁ ⊗ₜ[R] m₂) =\n    0\n[PROOFSTEP]\nsuffices (f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ m₂) = 0 by rw [this]; apply smul_zero\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\nthis : ↑(f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ Nat.choose (k₁ + k₂ - 1) (i, j).fst •\n      ↑(LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ (i, j).fst *\n            LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ (i, j).snd)\n        (m₁ ⊗ₜ[R] m₂) =\n    0\n[PROOFSTEP]\nrw [this]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\nthis : ↑(f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ[R] m₂) = 0\n⊢ Nat.choose (k₁ + k₂ - 1) (i, j).fst • 0 = 0\n[PROOFSTEP]\napply smul_zero\n[GOAL]\ncase h.h.mk\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\n⊢ ↑(f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\ncases' Nat.le_or_le_of_add_eq_add_pred (Finset.Nat.mem_antidiagonal.mp hij) with hi hj\n[GOAL]\ncase h.h.mk.inl\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\nhi : k₁ ≤ (i, j).fst\n⊢ ↑(f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nrw [(hf_comm.pow_pow i j).eq, LinearMap.mul_apply, LinearMap.pow_map_zero_of_le hi hf₁, LinearMap.map_zero]\n[GOAL]\ncase h.h.mk.inr\nR : Type u\nL : Type v\ninst✝¹⁹ : CommRing R\ninst✝¹⁸ : LieRing L\ninst✝¹⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝¹⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝¹⁵ : AddCommGroup M\ninst✝¹⁴ : Module R M\ninst✝¹³ : LieRingModule L M\ninst✝¹² : LieModule R L M\nM₁ : Type w₁\nM₂ : Type w₂\nM₃ : Type w₃\ninst✝¹¹ : AddCommGroup M₁\ninst✝¹⁰ : Module R M₁\ninst✝⁹ : LieRingModule L M₁\ninst✝⁸ : LieModule R L M₁\ninst✝⁷ : AddCommGroup M₂\ninst✝⁶ : Module R M₂\ninst✝⁵ : LieRingModule L M₂\ninst✝⁴ : LieModule R L M₂\ninst✝³ : AddCommGroup M₃\ninst✝² : Module R M₃\ninst✝¹ : LieRingModule L M₃\ninst✝ : LieModule R L M₃\ng : M₁ ⊗[R] M₂ →ₗ⁅R,L⁆ M₃\nχ₁ χ₂ : L → R\nt : { x // x ∈ preWeightSpace M₁ χ₁ } ⊗[R] { x // x ∈ preWeightSpace M₂ χ₂ }\nx : L\nF : Module.End R M₃ := ↑(toEndomorphism R L M₃) x - (χ₁ x + χ₂ x) • 1\nm₁ : M₁\nm₂ : M₂\nf₁ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.rTensor M₂ (↑(toEndomorphism R L M₁) x - χ₁ x • 1)\nf₂ : Module.End R (M₁ ⊗[R] M₂) := LinearMap.lTensor M₁ (↑(toEndomorphism R L M₂) x - χ₂ x • 1)\nh_comm_square : LinearMap.comp F ↑g = LinearMap.comp (↑g) (f₁ + f₂)\nhm₁ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k) m₁ = 0\nhm₂ : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k) m₂ = 0\nk₁ : ℕ\nhk₁ : ↑((↑(toEndomorphism R L M₁) x - χ₁ x • 1) ^ k₁) m₁ = 0\nk₂ : ℕ\nhk₂ : ↑((↑(toEndomorphism R L M₂) x - χ₂ x • 1) ^ k₂) m₂ = 0\nhf₁ : ↑(f₁ ^ k₁) (m₁ ⊗ₜ[R] m₂) = 0\nhf₂ : ↑(f₂ ^ k₂) (m₁ ⊗ₜ[R] m₂) = 0\nhf_comm : Commute f₁ f₂\ni j : ℕ\nhij : (i, j) ∈ Finset.Nat.antidiagonal (k₁ + k₂ - 1)\nhj : k₂ ≤ (i, j).snd\n⊢ ↑(f₁ ^ i * f₂ ^ j) (m₁ ⊗ₜ[R] m₂) = 0\n[PROOFSTEP]\nrw [LinearMap.mul_apply, LinearMap.pow_map_zero_of_le hj hf₂, LinearMap.map_zero]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : L → R\nx : L\nm : M\nhx : x ∈ preWeightSpace L χ₁\nhm : m ∈ preWeightSpace M χ₂\n⊢ ⁅x, m⁆ ∈ preWeightSpace M (χ₁ + χ₂)\n[PROOFSTEP]\napply LieModule.weight_vector_multiplication L L M M (toModuleHom R L M) χ₁ χ₂\n[GOAL]\ncase a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : L → R\nx : L\nm : M\nhx : x ∈ preWeightSpace L χ₁\nhm : m ∈ preWeightSpace M χ₂\n⊢ ⁅x, m⁆ ∈\n    LinearMap.range\n      (LinearMap.comp (↑(toModuleHom R L M)) (TensorProduct.mapIncl (preWeightSpace L χ₁) (preWeightSpace M χ₂)))\n[PROOFSTEP]\nsimp only [LieModuleHom.coe_toLinearMap, Function.comp_apply, LinearMap.coe_comp, TensorProduct.mapIncl,\n  LinearMap.mem_range]\n[GOAL]\ncase a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : L → R\nx : L\nm : M\nhx : x ∈ preWeightSpace L χ₁\nhm : m ∈ preWeightSpace M χ₂\n⊢ ∃ y,\n    ↑(toModuleHom R L M)\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace L χ₁)) (Submodule.subtype (preWeightSpace M χ₂))) y) =\n      ⁅x, m⁆\n[PROOFSTEP]\nuse⟨x, hx⟩ ⊗ₜ ⟨m, hm⟩\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : L → R\nx : L\nm : M\nhx : x ∈ preWeightSpace L χ₁\nhm : m ∈ preWeightSpace M χ₂\n⊢ ↑(toModuleHom R L M)\n      (↑(TensorProduct.map (Submodule.subtype (preWeightSpace L χ₁)) (Submodule.subtype (preWeightSpace M χ₂)))\n        ({ val := x, property := hx } ⊗ₜ[R] { val := m, property := hm })) =\n    ⁅x, m⁆\n[PROOFSTEP]\nsimp only [Submodule.subtype_apply, toModuleHom_apply, TensorProduct.map_tmul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x✝, m✝⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x✝, m✝⁆ ∈ (preWeightSpace M χ).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [← zero_add χ]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x✝, m✝⁆ ∈ (preWeightSpace M (0 + χ)).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrefine lie_mem_preWeightSpace_of_mem_preWeightSpace ?_ hm\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ x✝ ∈ preWeightSpace L 0\n[PROOFSTEP]\nsuffices preWeightSpace L (0 : L → R) = ⊤ by simp only [this, Submodule.mem_top]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nthis : preWeightSpace L 0 = ⊤\n⊢ x✝ ∈ preWeightSpace L 0\n[PROOFSTEP]\nsimp only [this, Submodule.mem_top]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nsrc✝ : Submodule R M := preWeightSpace M χ\nx✝ : L\nm✝ : M\nhm :\n  m✝ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ preWeightSpace L 0 = ⊤\n[PROOFSTEP]\nexact LieAlgebra.iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ weightSpace M 0 = ⊤\n[PROOFSTEP]\nrw [← LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.top_coeSubmodule]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ ↑(weightSpace M 0) = ⊤\n[PROOFSTEP]\nexact iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L M\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\n⊢ ↑(weightSpace M (χ ∘ ↑(LieSubalgebra.incl ⊤))) = ↑(weightSpace M χ)\n[PROOFSTEP]\next m\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\n⊢ m ∈ ↑(weightSpace M (χ ∘ ↑(LieSubalgebra.incl ⊤))) ↔ m ∈ ↑(weightSpace M χ)\n[PROOFSTEP]\nsimp only [weightSpace, LieSubmodule.coe_toSubmodule_mk, LieSubalgebra.coe_bracket_of_module, Function.comp_apply,\n  mem_preWeightSpace]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\n⊢ (∀ (x : { x // x ∈ ⊤ }),\n      ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0) ↔\n    ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\n⊢ (∀ (x : { x // x ∈ ⊤ }),\n      ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0) →\n    ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase h.mpr\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\n⊢ (∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0) →\n    ∀ (x : { x // x ∈ ⊤ }),\n      ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase h.mp\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh :\n  ∀ (x : { x // x ∈ ⊤ }), ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\nx : L\n⊢ ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h ⟨x, Set.mem_univ x⟩\n[GOAL]\ncase h.mp.intro\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh :\n  ∀ (x : { x // x ∈ ⊤ }), ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\nx : L\nk : ℕ\nhk :\n  ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) { val := x, property := (_ : x ∈ Set.univ) } -\n            χ (↑(LieSubalgebra.incl ⊤) { val := x, property := (_ : x ∈ Set.univ) }) • 1) ^\n          k)\n      m =\n    0\n⊢ ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh :\n  ∀ (x : { x // x ∈ ⊤ }), ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\nx : L\nk : ℕ\nhk :\n  ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) { val := x, property := (_ : x ∈ Set.univ) } -\n            χ (↑(LieSubalgebra.incl ⊤) { val := x, property := (_ : x ∈ Set.univ) }) • 1) ^\n          k)\n      m =\n    0\n⊢ ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\n[PROOFSTEP]\nexact hk\n[GOAL]\ncase h.mpr\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\nx : { x // x ∈ ⊤ }\n⊢ ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := h x\n[GOAL]\ncase h.mpr.intro\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\nx : { x // x ∈ ⊤ }\nk : ℕ\nhk : ↑((↑(toEndomorphism R L M) ↑x - χ ↑x • 1) ^ k) m = 0\n⊢ ∃ k, ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : LieAlgebra.IsNilpotent R L\nχ : L → R\nm : M\nh : ∀ (x : L), ∃ k, ↑((↑(toEndomorphism R L M) x - χ x • 1) ^ k) m = 0\nx : { x // x ∈ ⊤ }\nk : ℕ\nhk : ↑((↑(toEndomorphism R L M) ↑x - χ ↑x • 1) ^ k) m = 0\n⊢ ↑((↑(toEndomorphism R { x // x ∈ ⊤ } M) x - χ (↑(LieSubalgebra.incl ⊤) x) • 1) ^ k) m = 0\n[PROOFSTEP]\nexact hk\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ weightSpace M 0 = ⊤\n[PROOFSTEP]\nhave h₀ : (0 : L → R) ∘ (⊤ : LieSubalgebra R L).incl = 0 := by ext; rfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ 0 ∘ ↑(LieSubalgebra.incl ⊤) = 0\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\nx✝ : { x // x ∈ ⊤ }\n⊢ (0 ∘ ↑(LieSubalgebra.incl ⊤)) x✝ = OfNat.ofNat 0 x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\nh₀ : 0 ∘ ↑(LieSubalgebra.incl ⊤) = 0\n⊢ weightSpace M 0 = ⊤\n[PROOFSTEP]\nrw [← LieSubmodule.coe_toSubmodule_eq_iff, LieSubmodule.top_coeSubmodule, ← h₀, coe_weightSpace_of_top, ←\n  iInf_max_gen_zero_eigenspace_eq_top_of_nilpotent R L M]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\nh₀ : 0 ∘ ↑(LieSubalgebra.incl ⊤) = 0\n⊢ ↑(weightSpace M 0) = ⨅ (x : L), Module.End.maximalGeneralizedEigenspace (↑(toEndomorphism R L M) x) 0\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁷ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : Module R M\ninst✝⁴ : LieRingModule L M\ninst✝³ : LieModule R L M\ninst✝² : Nontrivial M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ IsWeight ⊤ M 0\n[PROOFSTEP]\nrw [IsWeight, LieHom.coe_zero, zero_weightSpace_eq_top_of_nilpotent]\n[GOAL]\nR : Type u\nL : Type v\ninst✝¹⁰ : CommRing R\ninst✝⁹ : LieRing L\ninst✝⁸ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁷ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁶ : AddCommGroup M\ninst✝⁵ : Module R M\ninst✝⁴ : LieRingModule L M\ninst✝³ : LieModule R L M\ninst✝² : Nontrivial M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNilpotent R L M\n⊢ ⊤ ≠ ⊥\n[PROOFSTEP]\nexact top_ne_bot\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNoetherian R M\nx : L\n⊢ _root_.IsNilpotent (↑(toEndomorphism R L { x // x ∈ ↑(weightSpace M 0) }) x)\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := exists_preWeightSpace_zero_le_ker_of_isNoetherian R M x\n[GOAL]\ncase intro\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNoetherian R M\nx : L\nk : ℕ\nhk : preWeightSpace M 0 ≤ LinearMap.ker (↑(toEndomorphism R L M) x ^ k)\n⊢ _root_.IsNilpotent (↑(toEndomorphism R L { x // x ∈ ↑(weightSpace M 0) }) x)\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNoetherian R M\nx : L\nk : ℕ\nhk : preWeightSpace M 0 ≤ LinearMap.ker (↑(toEndomorphism R L M) x ^ k)\n⊢ ↑(toEndomorphism R L { x // x ∈ ↑(weightSpace M 0) }) x ^ k = 0\n[PROOFSTEP]\next ⟨m, hm⟩\n[GOAL]\ncase h.h.mk.a\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNoetherian R M\nx : L\nk : ℕ\nhk : preWeightSpace M 0 ≤ LinearMap.ker (↑(toEndomorphism R L M) x ^ k)\nm : M\nhm : m ∈ ↑(weightSpace M 0)\n⊢ ↑(↑(↑(toEndomorphism R L { x // x ∈ ↑(weightSpace M 0) }) x ^ k) { val := m, property := hm }) =\n    ↑(↑0 { val := m, property := hm })\n[PROOFSTEP]\nrw [LinearMap.zero_apply, LieSubmodule.coe_zero, Submodule.coe_eq_zero, ←\n  LieSubmodule.toEndomorphism_restrict_eq_toEndomorphism, LinearMap.pow_restrict, ← SetLike.coe_eq_coe,\n  LinearMap.restrict_apply, Submodule.coe_mk, Submodule.coe_zero]\n[GOAL]\ncase h.h.mk.a\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁶ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\ninst✝¹ : LieAlgebra.IsNilpotent R L\ninst✝ : IsNoetherian R M\nx : L\nk : ℕ\nhk : preWeightSpace M 0 ≤ LinearMap.ker (↑(toEndomorphism R L M) x ^ k)\nm : M\nhm : m ∈ ↑(weightSpace M 0)\n⊢ ↑(↑(toEndomorphism R L M) x ^ k) ↑{ val := m, property := hm } = 0\n[PROOFSTEP]\nexact hk hm\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\n⊢ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) = weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\n⊢ x ∈ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) ↔ x ∈ weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\nlet f : H → Module.End R L := fun y => toEndomorphism R H L y - χ y • ↑1\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\n⊢ x ∈ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) ↔ x ∈ weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\nlet g : H → Module.End R H := fun y => toEndomorphism R H H y - χ y • ↑1\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\n⊢ x ∈ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) ↔ x ∈ weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\nsuffices\n  (∀ y : H, ∃ k : ℕ, (f y ^ k).comp (H.incl : H →ₗ[R] L) x = 0) ↔\n    ∀ y : H, ∃ k : ℕ, (H.incl : H →ₗ[R] L).comp (g y ^ k) x = 0\n  by\n  simp only [LieHom.coe_toLinearMap, LieSubalgebra.coe_incl, Function.comp_apply, LinearMap.coe_comp,\n    Submodule.coe_eq_zero] at this \n  simp only [mem_weightSpace, mem_preWeightSpace, LieSubalgebra.coe_incl', LieSubmodule.mem_comap, this]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\nthis :\n  (∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (f y ^ k) ↑(LieSubalgebra.incl H)) x = 0) ↔\n    ∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (↑(LieSubalgebra.incl H)) (g y ^ k)) x = 0\n⊢ x ∈ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) ↔ x ∈ weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\nsimp only [LieHom.coe_toLinearMap, LieSubalgebra.coe_incl, Function.comp_apply, LinearMap.coe_comp,\n  Submodule.coe_eq_zero] at this \n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\nthis :\n  (∀ (y : { x // x ∈ H }), ∃ k, ↑((↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1) ^ k) ↑x = 0) ↔\n    ∀ (y : { x // x ∈ H }), ∃ k, ↑((↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1) ^ k) x = 0\n⊢ x ∈ LieSubmodule.comap (LieSubalgebra.incl' H) (rootSpace H χ) ↔ x ∈ weightSpace { x // x ∈ H } χ\n[PROOFSTEP]\nsimp only [mem_weightSpace, mem_preWeightSpace, LieSubalgebra.coe_incl', LieSubmodule.mem_comap, this]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\n⊢ (∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (f y ^ k) ↑(LieSubalgebra.incl H)) x = 0) ↔\n    ∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (↑(LieSubalgebra.incl H)) (g y ^ k)) x = 0\n[PROOFSTEP]\nhave hfg : ∀ y : H, (f y).comp (H.incl : H →ₗ[R] L) = (H.incl : H →ₗ[R] L).comp (g y) :=\n  by\n  rintro ⟨y, hy⟩; ext ⟨z, _⟩\n  simp only [Submodule.coe_sub, toEndomorphism_apply_apply, LieHom.coe_toLinearMap, LinearMap.one_apply,\n    LieSubalgebra.coe_incl, LieSubalgebra.coe_bracket_of_module, LieSubalgebra.coe_bracket, LinearMap.smul_apply,\n    Function.comp_apply, Submodule.coe_smul_of_tower, LinearMap.coe_comp, LinearMap.sub_apply]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\n⊢ ∀ (y : { x // x ∈ H }), LinearMap.comp (f y) ↑(LieSubalgebra.incl H) = LinearMap.comp (↑(LieSubalgebra.incl H)) (g y)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mk\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\ny : L\nhy : y ∈ H\n⊢ LinearMap.comp (f { val := y, property := hy }) ↑(LieSubalgebra.incl H) =\n    LinearMap.comp (↑(LieSubalgebra.incl H)) (g { val := y, property := hy })\n[PROOFSTEP]\next ⟨z, _⟩\n[GOAL]\ncase mk.h.mk\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\ny : L\nhy : y ∈ H\nz : L\nproperty✝ : z ∈ H\n⊢ ↑(LinearMap.comp (f { val := y, property := hy }) ↑(LieSubalgebra.incl H)) { val := z, property := property✝ } =\n    ↑(LinearMap.comp (↑(LieSubalgebra.incl H)) (g { val := y, property := hy })) { val := z, property := property✝ }\n[PROOFSTEP]\nsimp only [Submodule.coe_sub, toEndomorphism_apply_apply, LieHom.coe_toLinearMap, LinearMap.one_apply,\n  LieSubalgebra.coe_incl, LieSubalgebra.coe_bracket_of_module, LieSubalgebra.coe_bracket, LinearMap.smul_apply,\n  Function.comp_apply, Submodule.coe_smul_of_tower, LinearMap.coe_comp, LinearMap.sub_apply]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nx : { x // x ∈ H }\nf : { x // x ∈ H } → Module.End R L := fun y => ↑(toEndomorphism R { x // x ∈ H } L) y - χ y • 1\ng : { x // x ∈ H } → Module.End R { x // x ∈ H } :=\n  fun y => ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y - χ y • 1\nhfg :\n  ∀ (y : { x // x ∈ H }), LinearMap.comp (f y) ↑(LieSubalgebra.incl H) = LinearMap.comp (↑(LieSubalgebra.incl H)) (g y)\n⊢ (∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (f y ^ k) ↑(LieSubalgebra.incl H)) x = 0) ↔\n    ∀ (y : { x // x ∈ H }), ∃ k, ↑(LinearMap.comp (↑(LieSubalgebra.incl H)) (g y ^ k)) x = 0\n[PROOFSTEP]\nsimp_rw [LinearMap.commute_pow_left_of_commute (hfg _)]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : { x // x ∈ H } → R\nx : L\nm : M\nhx : x ∈ rootSpace H χ₁\nhm : m ∈ weightSpace M χ₂\n⊢ ⁅x, m⁆ ∈ weightSpace M (χ₁ + χ₂)\n[PROOFSTEP]\napply LieModule.weight_vector_multiplication H L M M ((toModuleHom R L M).restrictLie H) χ₁ χ₂\n[GOAL]\ncase a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : { x // x ∈ H } → R\nx : L\nm : M\nhx : x ∈ rootSpace H χ₁\nhm : m ∈ weightSpace M χ₂\n⊢ ⁅x, m⁆ ∈\n    LinearMap.range\n      (LinearMap.comp (↑(LieModuleHom.restrictLie (toModuleHom R L M) H))\n        (TensorProduct.mapIncl (preWeightSpace L χ₁) (preWeightSpace M χ₂)))\n[PROOFSTEP]\nsimp only [LieModuleHom.coe_toLinearMap, Function.comp_apply, LinearMap.coe_comp, TensorProduct.mapIncl,\n  LinearMap.mem_range]\n[GOAL]\ncase a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : { x // x ∈ H } → R\nx : L\nm : M\nhx : x ∈ rootSpace H χ₁\nhm : m ∈ weightSpace M χ₂\n⊢ ∃ y,\n    ↑(LieModuleHom.restrictLie (toModuleHom R L M) H)\n        (↑(TensorProduct.map (Submodule.subtype (preWeightSpace L χ₁)) (Submodule.subtype (preWeightSpace M χ₂))) y) =\n      ⁅x, m⁆\n[PROOFSTEP]\nuse⟨x, hx⟩ ⊗ₜ ⟨m, hm⟩\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ : { x // x ∈ H } → R\nx : L\nm : M\nhx : x ∈ rootSpace H χ₁\nhm : m ∈ weightSpace M χ₂\n⊢ ↑(LieModuleHom.restrictLie (toModuleHom R L M) H)\n      (↑(TensorProduct.map (Submodule.subtype (preWeightSpace L χ₁)) (Submodule.subtype (preWeightSpace M χ₂)))\n        ({ val := x, property := hx } ⊗ₜ[R] { val := m, property := hm })) =\n    ⁅x, m⁆\n[PROOFSTEP]\nsimp only [Submodule.subtype_apply, toModuleHom_apply, Submodule.coe_mk, LieModuleHom.coe_restrictLie,\n  TensorProduct.map_tmul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nm n : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n\n[PROOFSTEP]\nsimp only [LieSubmodule.coe_add, lie_add]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nm n : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ { val := ⁅↑x, ↑m⁆ + ⁅↑x, ↑n⁆, property := (_ : (fun x => x ∈ ↑(weightSpace M χ₃)) (⁅↑x, ↑m⁆ + ⁅↑x, ↑n⁆)) } =\n    { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) } +\n      { val := ⁅↑x, ↑n⁆, property := (_ : ⁅↑x, ↑n⁆ ∈ ↑(weightSpace M χ₃)) }\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ AddHom.toFun\n      { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n        map_add' :=\n          (_ :\n            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n      (t • m) =\n    ↑(RingHom.id R) t •\n      AddHom.toFun\n        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n          map_add' :=\n            (_ :\n              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n        m\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ { val := ⁅↑x, ↑(t • m)⁆, property := (_ : ⁅↑x, ↑(t • m)⁆ ∈ ↑(weightSpace M χ₃)) } =\n    ↑(RingHom.id R) t • { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }\n[PROOFSTEP]\nconv_lhs =>\n  congr\n  rw [LieSubmodule.coe_smul, lie_smul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n| { val := ⁅↑x, ↑(t • m)⁆, property := (_ : ⁅↑x, ↑(t • m)⁆ ∈ ↑(weightSpace M χ₃)) }\n[PROOFSTEP]\n  congr\n  rw [LieSubmodule.coe_smul, lie_smul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n| { val := ⁅↑x, ↑(t • m)⁆, property := (_ : ⁅↑x, ↑(t • m)⁆ ∈ ↑(weightSpace M χ₃)) }\n[PROOFSTEP]\n  congr\n  rw [LieSubmodule.coe_smul, lie_smul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n| { val := ⁅↑x, ↑(t • m)⁆, property := (_ : ⁅↑x, ↑(t • m)⁆ ∈ ↑(weightSpace M χ₃)) }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase val\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nt : R\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n| ⁅↑x, ↑(t • m)⁆\n[PROOFSTEP]\nrw [LieSubmodule.coe_smul, lie_smul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx y : { x // x ∈ ↑(rootSpace H χ₁) }\n⊢ (fun x =>\n        {\n          toAddHom :=\n            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n              map_add' :=\n                (_ :\n                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n          map_smul' :=\n            (_ :\n              ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                AddHom.toFun\n                    { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                    (t • m) =\n                  ↑(RingHom.id R) t •\n                    AddHom.toFun\n                      { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                      m) })\n      (x + y) =\n    (fun x =>\n          {\n            toAddHom :=\n              { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                map_add' :=\n                  (_ :\n                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                  AddHom.toFun\n                      { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                      (t • m) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        m) })\n        x +\n      (fun x =>\n          {\n            toAddHom :=\n              { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                map_add' :=\n                  (_ :\n                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                  AddHom.toFun\n                      { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                      (t • m) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        m) })\n        y\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx y : { x // x ∈ ↑(rootSpace H χ₁) }\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ ↑(↑((fun x =>\n              {\n                toAddHom :=\n                  { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n                map_smul' :=\n                  (_ :\n                    ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                      AddHom.toFun\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) }\n                          (t • m) =\n                        ↑(RingHom.id R) t •\n                          AddHom.toFun\n                            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        (m + n) =\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          m +\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          n) }\n                            m) })\n            (x + y))\n        m) =\n    ↑(↑((fun x =>\n                {\n                  toAddHom :=\n                    { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                        AddHom.toFun\n                            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        (m + n) =\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          m +\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          n) }\n                            (t • m) =\n                          ↑(RingHom.id R) t •\n                            AddHom.toFun\n                              { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          (m + n) =\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                            m +\n                                          (fun m =>\n                                              { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                            n) }\n                              m) })\n              x +\n            (fun x =>\n                {\n                  toAddHom :=\n                    { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                        AddHom.toFun\n                            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        (m + n) =\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          m +\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          n) }\n                            (t • m) =\n                          ↑(RingHom.id R) t •\n                            AddHom.toFun\n                              { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                map_add' :=\n                                  (_ :\n                                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          (m + n) =\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                            m +\n                                          (fun m =>\n                                              { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                            n) }\n                              m) })\n              y)\n        m)\n[PROOFSTEP]\nsimp only [AddSubmonoid.coe_add, Submodule.coe_toAddSubmonoid, add_lie, LinearMap.coe_mk, AddHom.coe_mk,\n  LinearMap.add_apply, AddSubmonoid.mk_add_mk]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nt : R\nx : { x // x ∈ ↑(rootSpace H χ₁) }\n⊢ AddHom.toFun\n      {\n        toFun := fun x =>\n          {\n            toAddHom :=\n              { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                map_add' :=\n                  (_ :\n                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n            map_smul' :=\n              (_ :\n                ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                  AddHom.toFun\n                      { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                      (t • m) =\n                    ↑(RingHom.id R) t •\n                      AddHom.toFun\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        m) },\n        map_add' :=\n          (_ :\n            ∀ (x y : { x // x ∈ ↑(rootSpace H χ₁) }),\n              (fun x =>\n                    {\n                      toAddHom :=\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) },\n                      map_smul' :=\n                        (_ :\n                          ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                            AddHom.toFun\n                                {\n                                  toFun := fun m =>\n                                    { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                  map_add' :=\n                                    (_ :\n                                      ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                            (m + n) =\n                                          (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              m +\n                                            (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              n) }\n                                (t • m) =\n                              ↑(RingHom.id R) t •\n                                AddHom.toFun\n                                  {\n                                    toFun := fun m =>\n                                      { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                          (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              (m + n) =\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                m +\n                                              (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                n) }\n                                  m) })\n                  (x + y) =\n                (fun x =>\n                      {\n                        toAddHom :=\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              AddHom.toFun\n                                  {\n                                    toFun := fun m =>\n                                      { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                          (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              (m + n) =\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                m +\n                                              (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                n) }\n                                  (t • m) =\n                                ↑(RingHom.id R) t •\n                                  AddHom.toFun\n                                    {\n                                      toFun := fun m =>\n                                        { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                (m + n) =\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  m +\n                                                (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  n) }\n                                    m) })\n                    x +\n                  (fun x =>\n                      {\n                        toAddHom :=\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              AddHom.toFun\n                                  {\n                                    toFun := fun m =>\n                                      { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                          (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              (m + n) =\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                m +\n                                              (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                n) }\n                                  (t • m) =\n                                ↑(RingHom.id R) t •\n                                  AddHom.toFun\n                                    {\n                                      toFun := fun m =>\n                                        { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                (m + n) =\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  m +\n                                                (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  n) }\n                                    m) })\n                    y) }\n      (t • x) =\n    ↑(RingHom.id R) t •\n      AddHom.toFun\n        {\n          toFun := fun x =>\n            {\n              toAddHom :=\n                { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                  map_add' :=\n                    (_ :\n                      ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n              map_smul' :=\n                (_ :\n                  ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                    AddHom.toFun\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        (t • m) =\n                      ↑(RingHom.id R) t •\n                        AddHom.toFun\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) }\n                          m) },\n          map_add' :=\n            (_ :\n              ∀ (x y : { x // x ∈ ↑(rootSpace H χ₁) }),\n                (fun x =>\n                      {\n                        toAddHom :=\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) },\n                        map_smul' :=\n                          (_ :\n                            ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              AddHom.toFun\n                                  {\n                                    toFun := fun m =>\n                                      { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                    map_add' :=\n                                      (_ :\n                                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                          (fun m =>\n                                                { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                              (m + n) =\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                m +\n                                              (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                n) }\n                                  (t • m) =\n                                ↑(RingHom.id R) t •\n                                  AddHom.toFun\n                                    {\n                                      toFun := fun m =>\n                                        { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                (m + n) =\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  m +\n                                                (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  n) }\n                                    m) })\n                    (x + y) =\n                  (fun x =>\n                        {\n                          toAddHom :=\n                            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        (m + n) =\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          m +\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          n) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun m =>\n                                        { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                (m + n) =\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  m +\n                                                (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  n) }\n                                    (t • m) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun m =>\n                                          { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  (m + n) =\n                                                (fun m =>\n                                                      { val := ⁅↑x, ↑m⁆,\n                                                        property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                    m +\n                                                  (fun m =>\n                                                      { val := ⁅↑x, ↑m⁆,\n                                                        property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                    n) }\n                                      m) })\n                      x +\n                    (fun x =>\n                        {\n                          toAddHom :=\n                            { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                              map_add' :=\n                                (_ :\n                                  ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        (m + n) =\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          m +\n                                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                          n) },\n                          map_smul' :=\n                            (_ :\n                              ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                AddHom.toFun\n                                    {\n                                      toFun := fun m =>\n                                        { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                      map_add' :=\n                                        (_ :\n                                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                            (fun m =>\n                                                  { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                (m + n) =\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  m +\n                                                (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  n) }\n                                    (t • m) =\n                                  ↑(RingHom.id R) t •\n                                    AddHom.toFun\n                                      {\n                                        toFun := fun m =>\n                                          { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                                        map_add' :=\n                                          (_ :\n                                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                              (fun m =>\n                                                    { val := ⁅↑x, ↑m⁆,\n                                                      property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                  (m + n) =\n                                                (fun m =>\n                                                      { val := ⁅↑x, ↑m⁆,\n                                                        property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                    m +\n                                                  (fun m =>\n                                                      { val := ⁅↑x, ↑m⁆,\n                                                        property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                                    n) }\n                                      m) })\n                      y) }\n        x\n[PROOFSTEP]\nsimp only [RingHom.id_apply]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nt : R\nx : { x // x ∈ ↑(rootSpace H χ₁) }\n⊢ {\n      toAddHom :=\n        { toFun := fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n          map_add' :=\n            (_ :\n              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                  (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                    (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n      map_smul' :=\n        (_ :\n          ∀ (t_1 : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n            AddHom.toFun\n                { toFun := fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                  map_add' :=\n                    (_ :\n                      ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                        (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                            (m + n) =\n                          (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                              m +\n                            (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                              n) }\n                (t_1 • m) =\n              ↑(RingHom.id R) t_1 •\n                AddHom.toFun\n                  { toFun := fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                          (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                              (m + n) =\n                            (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                m +\n                              (fun m =>\n                                  { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                n) }\n                  m) } =\n    t •\n      {\n        toAddHom :=\n          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n            map_add' :=\n              (_ :\n                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n        map_smul' :=\n          (_ :\n            ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n              AddHom.toFun\n                  { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                    map_add' :=\n                      (_ :\n                        ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                  (t • m) =\n                ↑(RingHom.id R) t •\n                  AddHom.toFun\n                    { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                      map_add' :=\n                        (_ :\n                          ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                              (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) }\n                    m) }\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nt : R\nx : { x // x ∈ ↑(rootSpace H χ₁) }\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ ↑(↑{\n            toAddHom :=\n              { toFun := fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                map_add' :=\n                  (_ :\n                    ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                      (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                          (m + n) =\n                        (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                          (fun m => { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                            n) },\n            map_smul' :=\n              (_ :\n                ∀ (t_1 : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                  AddHom.toFun\n                      {\n                        toFun := fun m =>\n                          { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                        map_add' :=\n                          (_ :\n                            ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                              (fun m =>\n                                    { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                  (m + n) =\n                                (fun m =>\n                                      { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    m +\n                                  (fun m =>\n                                      { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    n) }\n                      (t_1 • m) =\n                    ↑(RingHom.id R) t_1 •\n                      AddHom.toFun\n                        {\n                          toFun := fun m =>\n                            { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m =>\n                                      { val := ⁅↑(t • x), ↑m⁆, property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m =>\n                                        { val := ⁅↑(t • x), ↑m⁆,\n                                          property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      m +\n                                    (fun m =>\n                                        { val := ⁅↑(t • x), ↑m⁆,\n                                          property := (_ : ⁅↑(t • x), ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        m) }\n        m) =\n    ↑(↑(t •\n            {\n              toAddHom :=\n                { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                  map_add' :=\n                    (_ :\n                      ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                        (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) (m + n) =\n                          (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                            (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) n) },\n              map_smul' :=\n                (_ :\n                  ∀ (t : R) (m : { x // x ∈ ↑(weightSpace M χ₂) }),\n                    AddHom.toFun\n                        { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                          map_add' :=\n                            (_ :\n                              ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                    (m + n) =\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      n) }\n                        (t • m) =\n                      ↑(RingHom.id R) t •\n                        AddHom.toFun\n                          { toFun := fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) },\n                            map_add' :=\n                              (_ :\n                                ∀ (m n : { x // x ∈ ↑(weightSpace M χ₂) }),\n                                  (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                      (m + n) =\n                                    (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) }) m +\n                                      (fun m => { val := ⁅↑x, ↑m⁆, property := (_ : ⁅↑x, ↑m⁆ ∈ ↑(weightSpace M χ₃)) })\n                                        n) }\n                          m) })\n        m)\n[PROOFSTEP]\nsimp only [SetLike.val_smul, smul_lie, LinearMap.coe_mk, AddHom.coe_mk, LinearMap.smul_apply, SetLike.mk_smul_mk]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ H }\ny : { x // x ∈ ↑(rootSpace H χ₁) }\n⊢ AddHom.toFun (rootSpaceWeightSpaceProductAux R L H M hχ).toAddHom ⁅x, y⁆ =\n    ⁅x, AddHom.toFun (rootSpaceWeightSpaceProductAux R L H M hχ).toAddHom y⁆\n[PROOFSTEP]\next m\n[GOAL]\ncase h.a\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ H }\ny : { x // x ∈ ↑(rootSpace H χ₁) }\nm : { x // x ∈ ↑(weightSpace M χ₂) }\n⊢ ↑(↑(AddHom.toFun (rootSpaceWeightSpaceProductAux R L H M hχ).toAddHom ⁅x, y⁆) m) =\n    ↑(↑⁅x, AddHom.toFun (rootSpaceWeightSpaceProductAux R L H M hχ).toAddHom y⁆ m)\n[PROOFSTEP]\nsimp only [rootSpaceWeightSpaceProductAux, LieSubmodule.coe_bracket, LieSubalgebra.coe_bracket_of_module, lie_lie,\n  LinearMap.coe_mk, AddHom.coe_mk, Subtype.coe_mk, LieHom.lie_apply, LieSubmodule.coe_sub]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ rootSpace H χ₁ }\nm : { x // x ∈ weightSpace M χ₂ }\n⊢ ↑(↑(rootSpaceWeightSpaceProduct R L H M χ₁ χ₂ χ₃ hχ) (x ⊗ₜ[R] m)) = ⁅↑x, ↑m⁆\n[PROOFSTEP]\nsimp only [rootSpaceWeightSpaceProduct, rootSpaceWeightSpaceProductAux, coe_liftLie_eq_lift_coe, AddHom.toFun_eq_coe,\n  LinearMap.coe_toAddHom, lift_apply, LinearMap.coe_mk, AddHom.coe_mk, Submodule.coe_mk]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ₁ χ₂ χ₃ : { x // x ∈ H } → R\nhχ : χ₁ + χ₂ = χ₃\nx : { x // x ∈ rootSpace H χ₁ }\ny : { x // x ∈ rootSpace H χ₂ }\n⊢ ↑(↑(rootSpaceProduct R L H χ₁ χ₂ χ₃ hχ) (x ⊗ₜ[R] y)) = ⁅↑x, ↑y⁆\n[PROOFSTEP]\nsimp only [rootSpaceProduct_def, coe_rootSpaceWeightSpaceProduct_tmul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nsrc✝ : Submodule R L := ↑(rootSpace H 0)\nx y : L\nhx :\n  x ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhy :\n  y ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x, y⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nlet xy : rootSpace H 0 ⊗[R] rootSpace H 0 := ⟨x, hx⟩ ⊗ₜ ⟨y, hy⟩\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nsrc✝ : Submodule R L := ↑(rootSpace H 0)\nx y : L\nhx :\n  x ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhy :\n  y ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nxy : { x // x ∈ ↑(rootSpace H 0) } ⊗[R] { x // x ∈ ↑(rootSpace H 0) } :=\n  { val := x, property := hx } ⊗ₜ[R] { val := y, property := hy }\n⊢ ⁅x, y⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nsuffices (rootSpaceProduct R L H 0 0 0 (add_zero 0) xy : L) ∈ rootSpace H 0 by\n  rwa [rootSpaceProduct_tmul, Subtype.coe_mk, Subtype.coe_mk] at this \n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nsrc✝ : Submodule R L := ↑(rootSpace H 0)\nx y : L\nhx :\n  x ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhy :\n  y ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nxy : { x // x ∈ ↑(rootSpace H 0) } ⊗[R] { x // x ∈ ↑(rootSpace H 0) } :=\n  { val := x, property := hx } ⊗ₜ[R] { val := y, property := hy }\nthis : ↑(↑(rootSpaceProduct R L H 0 0 0 (_ : 0 + 0 = 0)) xy) ∈ rootSpace H 0\n⊢ ⁅x, y⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrwa [rootSpaceProduct_tmul, Subtype.coe_mk, Subtype.coe_mk] at this \n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nsrc✝ : Submodule R L := ↑(rootSpace H 0)\nx y : L\nhx :\n  x ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhy :\n  y ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nxy : { x // x ∈ ↑(rootSpace H 0) } ⊗[R] { x // x ∈ ↑(rootSpace H 0) } :=\n  { val := x, property := hx } ⊗ₜ[R] { val := y, property := hy }\n⊢ ↑(↑(rootSpaceProduct R L H 0 0 0 (_ : 0 + 0 = 0)) xy) ∈ rootSpace H 0\n[PROOFSTEP]\nexact (rootSpaceProduct R L H 0 0 0 (add_zero 0) xy).property\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\n⊢ x ∈ zeroRootSubalgebra R L H ↔ ∀ (y : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nrw [zeroRootSubalgebra]\n  -- Porting note: added the following `change` otherwise the `simp` fails\n    -- See https://github.com/leanprover-community/mathlib4/issues/5026\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\n⊢ (x ∈\n      let src := ↑(rootSpace H 0);\n      {\n        toSubmodule :=\n          { toAddSubmonoid := src.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : L},\n                  x ∈ (↑(rootSpace H 0)).toAddSubmonoid.toAddSubsemigroup.carrier →\n                    c • x ∈ (↑(rootSpace H 0)).toAddSubmonoid.toAddSubsemigroup.carrier) },\n        lie_mem' :=\n          (_ :\n            ∀ {x y : L}\n              {hx :\n                x ∈\n                  { toAddSubmonoid := (↑(rootSpace H 0)).toAddSubmonoid,\n                          smul_mem' :=\n                            (_ :\n                              ∀ (c : R) {x : L},\n                                x ∈ (↑(rootSpace H 0)).toAddSubmonoid.toAddSubsemigroup.carrier →\n                                  c • x ∈\n                                    (↑(rootSpace H\n                                              0)).toAddSubmonoid.toAddSubsemigroup.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier}\n              {hy :\n                y ∈\n                  { toAddSubmonoid := (↑(rootSpace H 0)).toAddSubmonoid,\n                          smul_mem' :=\n                            (_ :\n                              ∀ (c : R) {x : L},\n                                x ∈ (↑(rootSpace H 0)).toAddSubmonoid.toAddSubsemigroup.carrier →\n                                  c • x ∈\n                                    (↑(rootSpace H\n                                              0)).toAddSubmonoid.toAddSubsemigroup.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier},\n              ⁅x, y⁆ ∈ rootSpace H 0) }) ↔\n    ∀ (y : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nchange x ∈ rootSpace H 0 ↔ _\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\n⊢ x ∈ rootSpace H 0 ↔ ∀ (y : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nsimp only [mem_weightSpace, mem_preWeightSpace, Pi.zero_apply, zero_smul, sub_zero]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ LieSubalgebra.toLieSubmodule H ≤ rootSpace H 0\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ LieSubalgebra.toLieSubmodule H\n⊢ x ∈ rootSpace H 0\n[PROOFSTEP]\nsimp only [LieSubalgebra.mem_toLieSubmodule] at hx \n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\n⊢ x ∈ rootSpace H 0\n[PROOFSTEP]\nsimp only [mem_weightSpace, mem_preWeightSpace, Pi.zero_apply, sub_zero, zero_smul]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\n⊢ ∀ (x_1 : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) x_1 ^ k) x = 0\n[PROOFSTEP]\nintro y\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := (inferInstance : IsNilpotent R H)\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\n⊢ ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nlet f : Module.End R H := toEndomorphism R H H y\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\n⊢ ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nlet g : Module.End R L := toEndomorphism R H L y\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\n⊢ ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nhave hfg : g.comp (H : Submodule R L).subtype = (H : Submodule R L).subtype.comp f :=\n  by\n  ext z\n  simp only [toEndomorphism_apply_apply, Submodule.subtype_apply, LieSubalgebra.coe_bracket_of_module,\n    LieSubalgebra.coe_bracket, Function.comp_apply, LinearMap.coe_comp]\n  rfl\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\n⊢ LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\n[PROOFSTEP]\next z\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nz : { x // x ∈ H.toSubmodule }\n⊢ ↑(LinearMap.comp g (Submodule.subtype H.toSubmodule)) z = ↑(LinearMap.comp (Submodule.subtype H.toSubmodule) f) z\n[PROOFSTEP]\nsimp only [toEndomorphism_apply_apply, Submodule.subtype_apply, LieSubalgebra.coe_bracket_of_module,\n  LieSubalgebra.coe_bracket, Function.comp_apply, LinearMap.coe_comp]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nz : { x // x ∈ H.toSubmodule }\n⊢ ⁅↑y, ↑z⁆ = ↑(↑(↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y) z)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\n⊢ ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nchange (g ^ k).comp (H : Submodule R L).subtype ⟨x, hx⟩ = 0\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\n⊢ ↑(LinearMap.comp (g ^ k) (Submodule.subtype H.toSubmodule)) { val := x, property := hx } = 0\n[PROOFSTEP]\nrw [LinearMap.commute_pow_left_of_commute hfg k]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\n⊢ ↑(LinearMap.comp (Submodule.subtype H.toSubmodule) (f ^ k)) { val := x, property := hx } = 0\n[PROOFSTEP]\nhave h := iterate_toEndomorphism_mem_lowerCentralSeries R H H y ⟨x, hx⟩ k\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\nh :\n  (↑(↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y))^[k] { val := x, property := hx } ∈\n    lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k\n⊢ ↑(LinearMap.comp (Submodule.subtype H.toSubmodule) (f ^ k)) { val := x, property := hx } = 0\n[PROOFSTEP]\nrw [hk, LieSubmodule.mem_bot] at h \n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\nh : (↑(↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y))^[k] { val := x, property := hx } = 0\n⊢ ↑(LinearMap.comp (Submodule.subtype H.toSubmodule) (f ^ k)) { val := x, property := hx } = 0\n[PROOFSTEP]\nsimp only [Submodule.subtype_apply, Function.comp_apply, LinearMap.pow_apply, LinearMap.coe_comp, Submodule.coe_eq_zero]\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ H\ny : { x // x ∈ H }\nk : ℕ\nhk : lowerCentralSeries R { x // x ∈ H } { x // x ∈ H } k = ⊥\nf : Module.End R { x // x ∈ H } := ↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y\ng : Module.End R L := ↑(toEndomorphism R { x // x ∈ H } L) y\nhfg : LinearMap.comp g (Submodule.subtype H.toSubmodule) = LinearMap.comp (Submodule.subtype H.toSubmodule) f\nh : (↑(↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y))^[k] { val := x, property := hx } = 0\n⊢ (↑(↑(toEndomorphism R { x // x ∈ H } { x // x ∈ H }) y))^[k] { val := x, property := hx } = 0\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ H ≤ zeroRootSubalgebra R L H\n[PROOFSTEP]\nrw [← LieSubalgebra.coe_submodule_le_coe_submodule, ← H.coe_toLieSubmodule, coe_zeroRootSubalgebra,\n  LieSubmodule.coeSubmodule_le_coeSubmodule]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ LieSubalgebra.toLieSubmodule H ≤ rootSpace H 0\n[PROOFSTEP]\nexact toLieSubmodule_le_rootSpace_zero R L H\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ LieSubalgebra.normalizer (zeroRootSubalgebra R L H) = zeroRootSubalgebra R L H\n[PROOFSTEP]\nrefine' le_antisymm _ (LieSubalgebra.le_normalizer _)\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\n⊢ LieSubalgebra.normalizer (zeroRootSubalgebra R L H) ≤ zeroRootSubalgebra R L H\n[PROOFSTEP]\nintro x hx\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : x ∈ LieSubalgebra.normalizer (zeroRootSubalgebra R L H)\n⊢ x ∈ zeroRootSubalgebra R L H\n[PROOFSTEP]\nrw [LieSubalgebra.mem_normalizer_iff] at hx \n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : ∀ (y : L), y ∈ zeroRootSubalgebra R L H → ⁅x, y⁆ ∈ zeroRootSubalgebra R L H\n⊢ x ∈ zeroRootSubalgebra R L H\n[PROOFSTEP]\nrw [mem_zeroRootSubalgebra]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : ∀ (y : L), y ∈ zeroRootSubalgebra R L H → ⁅x, y⁆ ∈ zeroRootSubalgebra R L H\n⊢ ∀ (y : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y ^ k) x = 0\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mk\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx : L\nhx : ∀ (y : L), y ∈ zeroRootSubalgebra R L H → ⁅x, y⁆ ∈ zeroRootSubalgebra R L H\ny : L\nhy : y ∈ H\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) x = 0\n[PROOFSTEP]\nspecialize hx y (le_zeroRootSubalgebra R L H hy)\n[GOAL]\ncase mk\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nhy : y ∈ H\nhx : ⁅x, y⁆ ∈ zeroRootSubalgebra R L H\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) x = 0\n[PROOFSTEP]\nrw [mem_zeroRootSubalgebra] at hx \n[GOAL]\ncase mk\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nhy : y ∈ H\nhx : ∀ (y_1 : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y_1 ^ k) ⁅x, y⁆ = 0\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) x = 0\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := hx ⟨y, hy⟩\n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nhy : y ∈ H\nhx : ∀ (y_1 : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y_1 ^ k) ⁅x, y⁆ = 0\nk : ℕ\nhk : ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) ⁅x, y⁆ = 0\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) x = 0\n[PROOFSTEP]\nrw [← lie_skew, LinearMap.map_neg, neg_eq_zero] at hk \n[GOAL]\ncase mk.intro\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nhy : y ∈ H\nhx : ∀ (y_1 : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y_1 ^ k) ⁅x, y⁆ = 0\nk : ℕ\nhk : ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) ⁅y, x⁆ = 0\n⊢ ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) x = 0\n[PROOFSTEP]\nuse k + 1\n[GOAL]\ncase h\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nx y : L\nhy : y ∈ H\nhx : ∀ (y_1 : { x // x ∈ H }), ∃ k, ↑(↑(toEndomorphism R { x // x ∈ H } L) y_1 ^ k) ⁅x, y⁆ = 0\nk : ℕ\nhk : ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ k) ⁅y, x⁆ = 0\n⊢ ↑(↑(toEndomorphism R { x // x ∈ H } L) { val := y, property := hy } ^ (k + 1)) x = 0\n[PROOFSTEP]\nrw [LinearMap.iterate_succ, LinearMap.coe_comp, Function.comp_apply, toEndomorphism_apply_apply,\n  LieSubalgebra.coe_bracket_of_module, Submodule.coe_mk, hk]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nh : zeroRootSubalgebra R L H = H\n⊢ LieSubalgebra.normalizer H = H\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nh : zeroRootSubalgebra R L H = H\n⊢ LieSubalgebra.normalizer (zeroRootSubalgebra R L H) = zeroRootSubalgebra R L H\n[PROOFSTEP]\nexact zeroRootSubalgebra_normalizer_eq_self R L H\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\n⊢ zeroRootSubalgebra R L H = H\n[PROOFSTEP]\nrefine' le_antisymm _ (le_zeroRootSubalgebra R L H)\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\n⊢ zeroRootSubalgebra R L H ≤ H\n[PROOFSTEP]\nsuffices rootSpace H 0 ≤ H.toLieSubmodule by exact fun x hx => this hx\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\nthis : rootSpace H 0 ≤ LieSubalgebra.toLieSubmodule H\n⊢ zeroRootSubalgebra R L H ≤ H\n[PROOFSTEP]\nexact fun x hx => this hx\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\n⊢ rootSpace H 0 ≤ LieSubalgebra.toLieSubmodule H\n[PROOFSTEP]\nobtain ⟨k, hk⟩ := (rootSpace H 0).isNilpotent_iff_exists_self_le_ucs.mp (by infer_instance)\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\n⊢ LieModule.IsNilpotent R { x // x ∈ H } { x // x ∈ ↑(rootSpace H 0) }\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase intro\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\nk : ℕ\nhk : rootSpace H 0 ≤ LieSubmodule.ucs k ⊥\n⊢ rootSpace H 0 ≤ LieSubalgebra.toLieSubmodule H\n[PROOFSTEP]\nexact hk.trans (LieSubmodule.ucs_le_of_normalizer_eq_self (by simp) k)\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁹ : CommRing R\ninst✝⁸ : LieRing L\ninst✝⁷ : LieAlgebra R L\nH✝ : LieSubalgebra R L\ninst✝⁶ : IsNilpotent R { x // x ∈ H✝ }\nM : Type w\ninst✝⁵ : AddCommGroup M\ninst✝⁴ : Module R M\ninst✝³ : LieRingModule L M\ninst✝² : LieModule R L M\nH : LieSubalgebra R L\ninst✝¹ : LieSubalgebra.IsCartanSubalgebra H\ninst✝ : IsNoetherian R L\nk : ℕ\nhk : rootSpace H 0 ≤ LieSubmodule.ucs k ⊥\n⊢ LieSubmodule.normalizer (LieSubalgebra.toLieSubmodule H) = LieSubalgebra.toLieSubmodule H\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : IsNoetherian R L\n⊢ LieSubalgebra.IsCartanSubalgebra H → zeroRootSubalgebra R L H = H\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁸ : CommRing R\ninst✝⁷ : LieRing L\ninst✝⁶ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁵ : IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝⁴ : AddCommGroup M\ninst✝³ : Module R M\ninst✝² : LieRingModule L M\ninst✝¹ : LieModule R L M\ninst✝ : IsNoetherian R L\na✝ : LieSubalgebra.IsCartanSubalgebra H\n⊢ zeroRootSubalgebra R L H = H\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ⁅x, m⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nhave hx : (x : L) ∈ rootSpace H 0 := by rw [← LieSubmodule.mem_coeSubmodule, ← coe_zeroRootSubalgebra]; exact x.prop\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ↑x ∈ rootSpace H 0\n[PROOFSTEP]\nrw [← LieSubmodule.mem_coeSubmodule, ← coe_zeroRootSubalgebra]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n⊢ ↑x ∈ (zeroRootSubalgebra R L H).toSubmodule\n[PROOFSTEP]\nexact x.prop\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhx : ↑x ∈ rootSpace H 0\n⊢ ⁅x, m⁆ ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\ndsimp only\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhx : ↑x ∈ rootSpace H 0\n⊢ ⁅x, m⁆ ∈ (↑(weightSpace M χ)).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nrw [← zero_add χ]\n[GOAL]\nR : Type u\nL : Type v\ninst✝⁷ : CommRing R\ninst✝⁶ : LieRing L\ninst✝⁵ : LieAlgebra R L\nH : LieSubalgebra R L\ninst✝⁴ : LieAlgebra.IsNilpotent R { x // x ∈ H }\nM : Type w\ninst✝³ : AddCommGroup M\ninst✝² : Module R M\ninst✝¹ : LieRingModule L M\ninst✝ : LieModule R L M\nχ : { x // x ∈ H } → R\nsrc✝ : Submodule R M := ↑(weightSpace M χ)\nx : { x // x ∈ zeroRootSubalgebra R L H }\nm : M\nhm :\n  m ∈\n    { toAddSubmonoid := src✝.toAddSubmonoid,\n            smul_mem' :=\n              (_ :\n                ∀ (c : R) {x : M}, x ∈ src✝.carrier → c • x ∈ src✝.carrier) }.toAddSubmonoid.toAddSubsemigroup.carrier\nhx : ↑x ∈ rootSpace H 0\n⊢ ⁅x, m⁆ ∈ (↑(weightSpace M (0 + χ))).toAddSubmonoid.toAddSubsemigroup.carrier\n[PROOFSTEP]\nexact lie_mem_weightSpace_of_mem_weightSpace hx hm\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Lie.Weights", "llama_tokens": 91295, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6513548511303336, "lm_q2_score": 0.4148988457967688, "lm_q1q2_score": 0.2702463759381016}}
{"text": "[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\ninst✝ : Fintype α\na : Option α\n⊢ a ∈ ↑insertNone univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\ninst✝ : Fintype α\n⊢ ¬none ∈ map Embedding.some univ\n[PROOFSTEP]\nsimp\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ Trunc (P (ULift (Fin zero)))\n[PROOFSTEP]\nhave : card PEmpty = card (ULift (Fin 0)) := by simp only [card_fin, card_pempty, card_ulift]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ card PEmpty = card (ULift (Fin 0))\n[PROOFSTEP]\nsimp only [card_fin, card_pempty, card_ulift]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : card PEmpty = card (ULift (Fin 0))\n⊢ Trunc (P (ULift (Fin zero)))\n[PROOFSTEP]\napply Trunc.bind (truncEquivOfCardEq this)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : card PEmpty = card (ULift (Fin 0))\n⊢ PEmpty ≃ ULift (Fin 0) → Trunc (P (ULift (Fin zero)))\n[PROOFSTEP]\nintro e\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : card PEmpty = card (ULift (Fin 0))\ne : PEmpty ≃ ULift (Fin 0)\n⊢ Trunc (P (ULift (Fin zero)))\n[PROOFSTEP]\napply Trunc.mk\n[GOAL]\ncase a\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : card PEmpty = card (ULift (Fin 0))\ne : PEmpty ≃ ULift (Fin 0)\n⊢ P (ULift (Fin zero))\n[PROOFSTEP]\nrefine' of_equiv e h_empty\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\n⊢ Trunc (P (ULift (Fin (succ n))))\n[PROOFSTEP]\nhave : card (Option (ULift (Fin n))) = card (ULift (Fin n.succ)) := by simp only [card_fin, card_option, card_ulift]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\n⊢ card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\n[PROOFSTEP]\nsimp only [card_fin, card_option, card_ulift]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\nthis : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\n⊢ Trunc (P (ULift (Fin (succ n))))\n[PROOFSTEP]\napply Trunc.bind (truncEquivOfCardEq this)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\nthis : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\n⊢ Option (ULift (Fin n)) ≃ ULift (Fin (succ n)) → Trunc (P (ULift (Fin (succ n))))\n[PROOFSTEP]\nintro e\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\nthis : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\ne : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))\n⊢ Trunc (P (ULift (Fin (succ n))))\n[PROOFSTEP]\napply Trunc.map _ (ind n)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\nthis : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\ne : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))\n⊢ P (ULift (Fin n)) → P (ULift (Fin (succ n)))\n[PROOFSTEP]\nintro ih\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nn : ℕ\nthis : card (Option (ULift (Fin n))) = card (ULift (Fin (succ n)))\ne : Option (ULift (Fin n)) ≃ ULift (Fin (succ n))\nih : P (ULift (Fin n))\n⊢ P (ULift (Fin (succ n)))\n[PROOFSTEP]\nrefine' of_equiv e (h_option ih)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ Trunc (P α)\n[PROOFSTEP]\nsuffices ∀ n : ℕ, Trunc (P (ULift <| Fin n))\n  by\n  apply Trunc.bind (this (Fintype.card α))\n  intro h\n  apply Trunc.map _ (Fintype.truncEquivFin α)\n  intro e\n  exact of_equiv (Equiv.ulift.trans e.symm) h\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : (n : ℕ) → Trunc (P (ULift (Fin n)))\n⊢ Trunc (P α)\n[PROOFSTEP]\napply Trunc.bind (this (Fintype.card α))\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : (n : ℕ) → Trunc (P (ULift (Fin n)))\n⊢ P (ULift (Fin (card α))) → Trunc (P α)\n[PROOFSTEP]\nintro h\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : (n : ℕ) → Trunc (P (ULift (Fin n)))\nh : P (ULift (Fin (card α)))\n⊢ Trunc (P α)\n[PROOFSTEP]\napply Trunc.map _ (Fintype.truncEquivFin α)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : (n : ℕ) → Trunc (P (ULift (Fin n)))\nh : P (ULift (Fin (card α)))\n⊢ α ≃ Fin (card α) → P α\n[PROOFSTEP]\nintro e\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\nthis : (n : ℕ) → Trunc (P (ULift (Fin n)))\nh : P (ULift (Fin (card α)))\ne : α ≃ Fin (card α)\n⊢ P α\n[PROOFSTEP]\nexact of_equiv (Equiv.ulift.trans e.symm) h\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Sort v\nof_equiv : {α β : Type u} → α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : {α : Type u} → [inst : Fintype α] → [inst : DecidableEq α] → P α → P (Option α)\nα : Type u\ninst✝¹ : Fintype α\ninst✝ : DecidableEq α\n⊢ (n : ℕ) → Trunc (P (ULift (Fin n)))\n[PROOFSTEP]\napply ind\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (α : Type u) → [inst : Fintype α] → Prop\nof_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β\nh_empty : P PEmpty\nh_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\nα : Type u\nh_fintype : Fintype α\n⊢ P α\n[PROOFSTEP]\nobtain ⟨p⟩ :=\n  let f_empty := fun i => by convert h_empty\n  let h_option :\n    ∀ {α : Type u} [Fintype α] [DecidableEq α], (∀ (h : Fintype α), P α) → ∀ (h : Fintype (Option α)), P (Option α) :=\n    by\n    rintro α hα - Pα hα'\n    convert h_option α (Pα _)\n  @truncRecEmptyOption (fun α => ∀ h, @P α h) (@fun α β e hα hβ => @of_equiv α β hβ e (hα _)) f_empty h_option α _\n    (Classical.decEq α)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (α : Type u) → [inst : Fintype α] → Prop\nof_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β\nh_empty : P PEmpty\nh_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\nα : Type u\nh_fintype : Fintype α\ni : Fintype PEmpty\n⊢ P PEmpty\n[PROOFSTEP]\nconvert h_empty\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (α : Type u) → [inst : Fintype α] → Prop\nof_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β\nh_empty : P PEmpty\nh_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\nα : Type u\nh_fintype : Fintype α\nf_empty : ∀ (i : Fintype PEmpty), P PEmpty := fun i => ?m.7851 i\n⊢ ∀ {α : Type u} [inst : Fintype α] [inst : DecidableEq α],\n    (∀ (h : Fintype α), P α) → ∀ (h : Fintype (Option α)), P (Option α)\n[PROOFSTEP]\nrintro α hα - Pα hα'\n[GOAL]\nα✝¹ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (α : Type u) → [inst : Fintype α] → Prop\nof_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β\nh_empty : P PEmpty\nh_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\nα✝ : Type u\nh_fintype : Fintype α✝\nf_empty : ∀ (i : Fintype PEmpty), P PEmpty := fun i => ?m.7851 i\nα : Type u\nhα : Fintype α\nPα : ∀ (h : Fintype α), P α\nhα' : Fintype (Option α)\n⊢ P (Option α)\n[PROOFSTEP]\nconvert h_option α (Pα _)\n[GOAL]\ncase mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : (α : Type u) → [inst : Fintype α] → Prop\nof_equiv : ∀ (α β : Type u) [inst : Fintype β] (e : α ≃ β), P α → P β\nh_empty : P PEmpty\nh_option : ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\nα : Type u\nh_fintype : Fintype α\nx✝ : Trunc (∀ (h : Fintype α), P α)\np : ∀ (h : Fintype α), P α\n⊢ P α\n[PROOFSTEP]\nexact\n  p\n    _\n      -- ·\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Prop\nof_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)\nα : Type u\ninst✝ : Finite α\n⊢ P α\n[PROOFSTEP]\ncases nonempty_fintype α\n[GOAL]\ncase intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Prop\nof_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)\nα : Type u\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ P α\n[PROOFSTEP]\nrefine' Fintype.induction_empty_option _ _ _ α\n[GOAL]\ncase intro.refine'_1\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Prop\nof_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)\nα : Type u\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ ∀ (α β : Type u) [inst : Fintype β], α ≃ β → P α → P β\ncase intro.refine'_2\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Prop\nof_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)\nα : Type u\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ P PEmpty\ncase intro.refine'_3\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nP : Type u → Prop\nof_equiv : ∀ {α β : Type u}, α ≃ β → P α → P β\nh_empty : P PEmpty\nh_option : ∀ {α : Type u} [inst : Fintype α], P α → P (Option α)\nα : Type u\ninst✝ : Finite α\nval✝ : Fintype α\n⊢ ∀ (α : Type u) [inst : Fintype α], P α → P (Option α)\n[PROOFSTEP]\nexacts [fun α β _ => of_equiv, h_empty, @h_option]\n", "meta": {"mathlib_filename": "Mathlib.Data.Fintype.Option", "llama_tokens": 6142, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.519521321952093, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.26990240396285026}}
{"text": "[GOAL]\nC : Type u_1\ninst✝² : Category.{u_4, u_1} C\nD : Type u_2\ninst✝¹ : Category.{?u.745, u_2} D\nE : Type u_3\ninst✝ : Category.{?u.752, u_3} E\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nL : GrothendieckTopology E\nU✝ : C\nS✝ : Sieve ((𝟭 C).obj U✝)\nh : S✝ ∈ GrothendieckTopology.sieves J ((𝟭 C).obj U✝)\n⊢ Sieve.functorPullback (𝟭 C) S✝ ∈ GrothendieckTopology.sieves J U✝\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\n⊢ X ⟶ ℱ.val.obj Y.right\n[PROOFSTEP]\nletI hom_sh := whiskerRight ((Ran.adjunction A G.op).counit.app ℱ.val) (coyoneda.obj (op X))\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\nhom_sh : (ran G.op ⋙ (whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj ℱ.val ⋙ coyoneda.obj (op X) ⟶\n  (𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X) :=\n  whiskerRight (NatTrans.app (Ran.adjunction A G.op).counit ℱ.val) (coyoneda.obj (op X))\n⊢ X ⟶ ℱ.val.obj Y.right\n[PROOFSTEP]\nhaveI S' := K.pullback_stable Y.hom.unop hS\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\nhom_sh : (ran G.op ⋙ (whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj ℱ.val ⋙ coyoneda.obj (op X) ⟶\n  (𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X) :=\n  whiskerRight (NatTrans.app (Ran.adjunction A G.op).counit ℱ.val) (coyoneda.obj (op X))\nS' : Sieve.pullback Y.hom.unop S ∈ GrothendieckTopology.sieves K (G.op.obj Y.right).unop\n⊢ X ⟶ ℱ.val.obj Y.right\n[PROOFSTEP]\nhaveI hs' := ((hx.pullback Y.3.unop).functorPullback G).compPresheafMap hom_sh\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\nhom_sh : (ran G.op ⋙ (whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj ℱ.val ⋙ coyoneda.obj (op X) ⟶\n  (𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X) :=\n  whiskerRight (NatTrans.app (Ran.adjunction A G.op).counit ℱ.val) (coyoneda.obj (op X))\nS' : Sieve.pullback Y.hom.unop S ∈ GrothendieckTopology.sieves K (G.op.obj Y.right).unop\nhs' : Compatible (compPresheafMap hom_sh (FamilyOfElements.functorPullback G (FamilyOfElements.pullback Y.hom.unop x)))\n⊢ X ⟶ ℱ.val.obj Y.right\n[PROOFSTEP]\nexact (ℱ.2 X _ (hu.cover_lift S')).amalgamate _ hs'\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\ny : ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op Y.right.unop)\nH : IsAmalgamation (pulledbackFamily ℱ S x Y) y\n⊢ y = getSection hu ℱ hS hx Y\n[PROOFSTEP]\napply IsSheafFor.isSeparatedFor _ (pulledbackFamily ℱ S x Y)\n[GOAL]\ncase a\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\ny : ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op Y.right.unop)\nH : IsAmalgamation (pulledbackFamily ℱ S x Y) y\n⊢ IsAmalgamation (pulledbackFamily ℱ S x Y) y\n[PROOFSTEP]\nexact H\n[GOAL]\ncase a\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\ny : ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op Y.right.unop)\nH : IsAmalgamation (pulledbackFamily ℱ S x Y) y\n⊢ IsAmalgamation (pulledbackFamily ℱ S x Y) (getSection hu ℱ hS hx Y)\n[PROOFSTEP]\napply getSection_isAmalgamation\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY : StructuredArrow (op U) G.op\ny : ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op Y.right.unop)\nH : IsAmalgamation (pulledbackFamily ℱ S x Y) y\n⊢ IsSheafFor ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X))\n    (Presieve.functorPullback G (Sieve.pullback Y.hom.unop S).arrows)\n[PROOFSTEP]\nexact ℱ.2 X _ (hu.cover_lift (K.pullback_stable Y.hom.unop hS))\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\n⊢ getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right = getSection hu ℱ hS hx Z\n[PROOFSTEP]\napply getSection_is_unique\n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\n⊢ IsAmalgamation (pulledbackFamily ℱ S x Z) (getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right)\n[PROOFSTEP]\nintro V' fV' hV'\n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right) =\n    pulledbackFamily ℱ S x Z fV' hV'\n[PROOFSTEP]\nhave eq : Z.hom = Y.hom ≫ (G.map f.right.unop).op := by\n  convert f.w\n  erw [Category.id_comp]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\n⊢ Z.hom = Y.hom ≫ (G.map f.right.unop).op\n[PROOFSTEP]\nconvert f.w\n[GOAL]\ncase h.e'_2.h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\ne_1✝ :\n  ((Functor.fromPUnit (op U)).obj Z.left ⟶ G.op.obj Z.right) =\n    ((Functor.fromPUnit (op U)).obj Y.left ⟶ G.op.obj Z.right)\n⊢ Z.hom = (Functor.fromPUnit (op U)).map f.left ≫ Z.hom\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right) =\n    pulledbackFamily ℱ S x Z fV' hV'\n[PROOFSTEP]\nrw [eq] at hV' \n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right) =\n    pulledbackFamily ℱ S x Z fV' hV'✝\n[PROOFSTEP]\nconvert getSection_isAmalgamation hu ℱ hS hx Y (fV' ≫ f.right.unop) _ using 1\n[GOAL]\ncase h.e'_2\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (getSection hu ℱ hS hx Y ≫ ℱ.val.map f.right) =\n    ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map (fV' ≫ f.right.unop).op (getSection hu ℱ hS hx Y)\n[PROOFSTEP]\naesop_cat\n  -- porting note: the below proof was mildly rewritten because `simp` changed behaviour\n    -- slightly (a rewrite which seemed to work in Lean 3, didn't work in Lean 4 because of\n    -- motive is not type correct issues)\n[GOAL]\ncase h.e'_3\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ pulledbackFamily ℱ S x Z fV' hV'✝ = pulledbackFamily ℱ S x Y (fV' ≫ f.right.unop) ?H\n[PROOFSTEP]\nrw [pulledbackFamily_apply, pulledbackFamily_apply]\n[GOAL]\ncase h.e'_3\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ x (G.map fV' ≫ Z.hom.unop) hV'✝ ≫ NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit ℱ.val) (op V') =\n    x (G.map (fV' ≫ f.right.unop) ≫ Y.hom.unop) ?H ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit ℱ.val) (op V')\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.e'_3.e_a.e_f\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ G.map fV' ≫ Z.hom.unop = G.map (fV' ≫ f.right.unop) ≫ Y.hom.unop\n[PROOFSTEP]\nsimp [eq]\n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ Presieve.functorPullback G (Sieve.pullback Y.hom.unop S).arrows (fV' ≫ f.right.unop)\n[PROOFSTEP]\nchange S (G.map _ ≫ Y.hom.unop)\n[GOAL]\ncase H\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nY Z : StructuredArrow (op U) G.op\nf : Y ⟶ Z\nV' : C\nfV' : V' ⟶ Z.right.unop\nhV'✝ : Presieve.functorPullback G (Sieve.pullback Z.hom.unop S).arrows fV'\nhV' : Presieve.functorPullback G (Sieve.pullback (Y.hom ≫ (G.map f.right.unop).op).unop S).arrows fV'\neq : Z.hom = Y.hom ≫ (G.map f.right.unop).op\n⊢ S.arrows (G.map (fV' ≫ f.right.unop) ≫ Y.hom.unop)\n[PROOFSTEP]\nsimpa only [Functor.map_comp, Category.assoc] using hV'\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W =\n    NatTrans.app (gluedLimitCone hu ℱ hS hx).π ((StructuredArrow.map f.op).obj W)\n[PROOFSTEP]\ndsimp only [gluedLimitCone_π_app]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W = getSection hu ℱ hS hx ((StructuredArrow.map f.op).obj W)\n[PROOFSTEP]\napply getSection_is_unique hu ℱ hS hx ((StructuredArrow.map f.op).obj W)\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\n⊢ IsAmalgamation (pulledbackFamily ℱ S x ((StructuredArrow.map f.op).obj W))\n    (y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W)\n[PROOFSTEP]\nintro V' fV' hV'\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W) =\n    pulledbackFamily ℱ S x ((StructuredArrow.map f.op).obj W) fV' hV'\n[PROOFSTEP]\ndsimp only [Ran.adjunction, Ran.equiv, pulledbackFamily_apply]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W) =\n    x (G.map fV' ≫ ((StructuredArrow.map f.op).obj W).hom.unop) hV' ≫\n      NatTrans.app\n        (NatTrans.app\n          (Adjunction.adjunctionOfEquivRight\n              (fun F G_1 =>\n                {\n                    toFun := fun f =>\n                      NatTrans.mk fun x =>\n                        NatTrans.app f (G.op.obj x) ≫\n                          limit.π (Ran.diagram G.op G_1 (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))),\n                    invFun := fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op G_1 x) (Ran.cone x f),\n                    left_inv :=\n                      (_ :\n                        ∀ (x : F ⟶ Ran.loc G.op G_1),\n                          (fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op G_1 x) (Ran.cone x f))\n                              ((fun f =>\n                                  NatTrans.mk fun x =>\n                                    NatTrans.app f (G.op.obj x) ≫\n                                      limit.π (Ran.diagram G.op G_1 (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                                x) =\n                            x),\n                    right_inv :=\n                      (_ :\n                        ∀ (x : ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj F ⟶ G_1),\n                          (fun f =>\n                                NatTrans.mk fun x =>\n                                  NatTrans.app f (G.op.obj x) ≫\n                                    limit.π (Ran.diagram G.op G_1 (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                              ((fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op G_1 x) (Ran.cone x f)) x) =\n                            x) }.symm)\n              (_ :\n                ∀ (X' X : Dᵒᵖ ⥤ A) (Y : Cᵒᵖ ⥤ A) (f : X' ⟶ X) (g : ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj X ⟶ Y),\n                  ↑((fun F G_1 => (Ran.equiv G.op G_1 F).symm) X' Y) (((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).map f ≫ g) =\n                    f ≫ ↑((fun F G_1 => (Ran.equiv G.op G_1 F).symm) X Y) g)).counit\n          ℱ.val)\n        (op V')\n[PROOFSTEP]\nerw [Adjunction.adjunctionOfEquivRight_counit_app]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W) =\n    x (G.map fV' ≫ ((StructuredArrow.map f.op).obj W).hom.unop) hV' ≫\n      NatTrans.app\n        (↑{\n                  toFun := fun f =>\n                    NatTrans.mk fun x =>\n                      NatTrans.app f (G.op.obj x) ≫\n                        limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))),\n                  invFun := fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f),\n                  left_inv :=\n                    (_ :\n                      ∀ (x : Ran.loc G.op ℱ.val ⟶ Ran.loc G.op ℱ.val),\n                        (fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f))\n                            ((fun f =>\n                                NatTrans.mk fun x =>\n                                  NatTrans.app f (G.op.obj x) ≫\n                                    limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                              x) =\n                          x),\n                  right_inv :=\n                    (_ :\n                      ∀ (x : ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj (Ran.loc G.op ℱ.val) ⟶ ℱ.val),\n                        (fun f =>\n                              NatTrans.mk fun x =>\n                                NatTrans.app f (G.op.obj x) ≫\n                                  limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                            ((fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f)) x) =\n                          x) }.symm.symm\n          (𝟙 (Ran.loc G.op ℱ.val)))\n        (op V')\n[PROOFSTEP]\nhave :\n  y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op =\n    x (G.map fV' ≫ W.hom.unop ≫ f) (by simpa only using hV') :=\n  by\n  convert H (show S ((G.map fV' ≫ W.hom.unop) ≫ f) by simpa only [Category.assoc] using hV') using 2\n  simp only [Category.assoc]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ S.arrows (G.map fV' ≫ W.hom.unop ≫ f)\n[PROOFSTEP]\nsimpa only using hV'\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\n[PROOFSTEP]\nconvert H (show S ((G.map fV' ≫ W.hom.unop) ≫ f) by simpa only [Category.assoc] using hV') using 2\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ S.arrows ((G.map fV' ≫ W.hom.unop) ≫ f)\n[PROOFSTEP]\nsimpa only [Category.assoc] using hV'\n[GOAL]\ncase h.e'_3.h.e'_2\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\n⊢ G.map fV' ≫ W.hom.unop ≫ f = (G.map fV' ≫ W.hom.unop) ≫ f\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\n⊢ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV'.op (y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W) =\n    x (G.map fV' ≫ ((StructuredArrow.map f.op).obj W).hom.unop) hV' ≫\n      NatTrans.app\n        (↑{\n                  toFun := fun f =>\n                    NatTrans.mk fun x =>\n                      NatTrans.app f (G.op.obj x) ≫\n                        limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))),\n                  invFun := fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f),\n                  left_inv :=\n                    (_ :\n                      ∀ (x : Ran.loc G.op ℱ.val ⟶ Ran.loc G.op ℱ.val),\n                        (fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f))\n                            ((fun f =>\n                                NatTrans.mk fun x =>\n                                  NatTrans.app f (G.op.obj x) ≫\n                                    limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                              x) =\n                          x),\n                  right_inv :=\n                    (_ :\n                      ∀ (x : ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj (Ran.loc G.op ℱ.val) ⟶ ℱ.val),\n                        (fun f =>\n                              NatTrans.mk fun x =>\n                                NatTrans.app f (G.op.obj x) ≫\n                                  limit.π (Ran.diagram G.op ℱ.val (G.op.obj x)) (StructuredArrow.mk (𝟙 (G.op.obj x))))\n                            ((fun f => NatTrans.mk fun x => limit.lift (Ran.diagram G.op ℱ.val x) (Ran.cone x f)) x) =\n                          x) }.symm.symm\n          (𝟙 (Ran.loc G.op ℱ.val)))\n        (op V')\n[PROOFSTEP]\nsimp only [Quiver.Hom.unop_op, Equiv.symm_symm, StructuredArrow.map_obj_hom, unop_comp, Equiv.coe_fn_mk,\n  Functor.comp_map, coyoneda_obj_map, Category.assoc, ← this, op_comp, ran_obj_map, NatTrans.id_app]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W ≫ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).map fV'.op =\n    y ≫\n      limit.pre (Ran.diagram G.op ℱ.val (op V)) (StructuredArrow.map (W.hom.unop.op ≫ (G.map fV').op)) ≫\n        𝟙 ((Ran.loc G.op ℱ.val).obj (G.op.obj (op V'))) ≫\n          limit.π (Ran.diagram G.op ℱ.val (G.op.obj (op V'))) (StructuredArrow.mk (𝟙 (G.op.obj (op V'))))\n[PROOFSTEP]\nerw [Category.id_comp, limit.pre_π]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W ≫ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).map fV'.op =\n    y ≫\n      limit.π (Ran.diagram G.op ℱ.val (op V))\n        ((StructuredArrow.map (W.hom.unop.op ≫ (G.map fV').op)).obj (StructuredArrow.mk (𝟙 (G.op.obj (op V')))))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\n⊢ limit.π (Ran.diagram G.op ℱ.val (op V)) W ≫ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).map fV'.op =\n    limit.π (Ran.diagram G.op ℱ.val (op V))\n      ((StructuredArrow.map (W.hom.unop.op ≫ (G.map fV').op)).obj (StructuredArrow.mk (𝟙 (G.op.obj (op V')))))\n[PROOFSTEP]\nconvert limit.w (Ran.diagram G.op ℱ.val (op V)) (StructuredArrow.homMk' W fV'.op)\n[GOAL]\ncase h.e'_3.h.h.e'_7\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\ne_1✝ :\n  (((ran G.op).obj ℱ.val).obj (op V) ⟶ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).obj (op V')) =\n    (limit (Ran.diagram G.op ℱ.val (op V)) ⟶\n      (Ran.diagram G.op ℱ.val (op V)).obj (StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)))\n⊢ (StructuredArrow.map (W.hom.unop.op ≫ (G.map fV').op)).obj (StructuredArrow.mk (𝟙 (G.op.obj (op V')))) =\n    StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)\n[PROOFSTEP]\nrw [StructuredArrow.map_mk]\n[GOAL]\ncase h.e'_3.h.h.e'_7\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\ne_1✝ :\n  (((ran G.op).obj ℱ.val).obj (op V) ⟶ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).obj (op V')) =\n    (limit (Ran.diagram G.op ℱ.val (op V)) ⟶\n      (Ran.diagram G.op ℱ.val (op V)).obj (StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)))\n⊢ StructuredArrow.mk ((W.hom.unop.op ≫ (G.map fV').op) ≫ 𝟙 (G.op.obj (op V'))) =\n    StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\ncase h.e'_3.h.h.e'_7\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nf : V ⟶ U\ny : X ⟶ ((ran G.op).obj ℱ.val).obj (op V)\nW : StructuredArrow (op V) G.op\nH : ∀ {V' : C} {fV : G.obj V' ⟶ V} (hV : S.arrows (fV ≫ f)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ f) hV\nV' : C\nfV' : V' ⟶ ((StructuredArrow.map f.op).obj W).right.unop\nhV' : Presieve.functorPullback G (Sieve.pullback ((StructuredArrow.map f.op).obj W).hom.unop S).arrows fV'\nthis : y ≫ ((ran G.op).obj ℱ.val).map (G.map fV' ≫ W.hom.unop).op = x (G.map fV' ≫ W.hom.unop ≫ f) hV'\ne_1✝ :\n  (((ran G.op).obj ℱ.val).obj (op V) ⟶ ((𝟭 (Cᵒᵖ ⥤ A)).obj ℱ.val).obj (op V')) =\n    (limit (Ran.diagram G.op ℱ.val (op V)) ⟶\n      (Ran.diagram G.op ℱ.val (op V)).obj (StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)))\n⊢ StructuredArrow.mk (W.hom.unop.op ≫ (G.map fV').op) = StructuredArrow.mk (W.hom ≫ G.op.map fV'.op)\n[PROOFSTEP]\nsimp only [Quiver.Hom.unop_op, Functor.op_map, Quiver.Hom.op_unop]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ IsAmalgamation x (gluedSection hu ℱ hS hx)\n[PROOFSTEP]\nintro V fV hV\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\n⊢ ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV.op (gluedSection hu ℱ hS hx) = x fV hV\n[PROOFSTEP]\nrefine limit.hom_ext (λ (W : StructuredArrow (op V) G.op) => ?_)\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\n⊢ ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).map fV.op (gluedSection hu ℱ hS hx) ≫\n      limit.π (Ran.diagram G.op ℱ.val (op V)) W =\n    x fV hV ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W\n[PROOFSTEP]\nsimp only [Functor.comp_map, limit.lift_pre, coyoneda_obj_map, ran_obj_map, gluedSection]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\n⊢ limit.lift (StructuredArrow.map fV.op ⋙ Ran.diagram G.op ℱ.val (op U))\n        (Cone.whisker (StructuredArrow.map fV.op) (gluedLimitCone hu ℱ hS hx)) ≫\n      limit.π (Ran.diagram G.op ℱ.val (op V)) W =\n    x fV hV ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W\n[PROOFSTEP]\nerw [limit.lift_π]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\n⊢ NatTrans.app (Cone.whisker (StructuredArrow.map fV.op) (gluedLimitCone hu ℱ hS hx)).π W =\n    x fV hV ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W\n[PROOFSTEP]\nsymm\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\n⊢ x fV hV ≫ limit.π (Ran.diagram G.op ℱ.val (op V)) W =\n    NatTrans.app (Cone.whisker (StructuredArrow.map fV.op) (gluedLimitCone hu ℱ hS hx)).π W\n[PROOFSTEP]\nconvert helper hu ℱ hS hx _ (x fV hV) _ _ using 1\n[GOAL]\ncase convert_3\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\n⊢ ∀ {V' : C} {fV_1 : G.obj V' ⟶ V} (hV_1 : S.arrows (fV_1 ≫ fV)),\n    x fV hV ≫ ((ran G.op).obj ℱ.val).map fV_1.op = x (fV_1 ≫ fV) hV_1\n[PROOFSTEP]\nintro V' fV' hV'\n[GOAL]\ncase convert_3\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\nV' : C\nfV' : G.obj V' ⟶ V\nhV' : S.arrows (fV' ≫ fV)\n⊢ x fV hV ≫ ((ran G.op).obj ℱ.val).map fV'.op = x (fV' ≫ fV) hV'\n[PROOFSTEP]\nconvert hx fV' (𝟙 _) hV hV' (by rw [Category.id_comp])\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\nV' : C\nfV' : G.obj V' ⟶ V\nhV' : S.arrows (fV' ≫ fV)\n⊢ fV' ≫ fV = 𝟙 (G.obj V') ≫ fV' ≫ fV\n[PROOFSTEP]\nrw [Category.id_comp]\n[GOAL]\ncase h.e'_3.h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\nV : D\nfV : V ⟶ U\nhV : S.arrows fV\nW : StructuredArrow (op V) G.op\nV' : C\nfV' : G.obj V' ⟶ V\nhV' : S.arrows (fV' ≫ fV)\ne_1✝ :\n  (X ⟶ ((ran G.op).obj ℱ.val).obj (op (G.obj V'))) = ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op (G.obj V'))\n⊢ x (fV' ≫ fV) hV' = ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).map (𝟙 (G.obj V')).op (x (fV' ≫ fV) hV')\n[PROOFSTEP]\nsimp only [op_id, FunctorToTypes.map_id_apply]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\n⊢ y = gluedSection hu ℱ hS hx\n[PROOFSTEP]\nunfold gluedSection limit.lift\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\n⊢ y = IsLimit.lift (limit.isLimit (Ran.diagram G.op ℱ.val (op U))) (gluedLimitCone hu ℱ hS hx)\n[PROOFSTEP]\nrefine limit.hom_ext (λ (W : StructuredArrow (op U) G.op) => ?_)\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op U)) W =\n    IsLimit.lift (limit.isLimit (Ran.diagram G.op ℱ.val (op U))) (gluedLimitCone hu ℱ hS hx) ≫\n      limit.π (Ran.diagram G.op ℱ.val (op U)) W\n[PROOFSTEP]\nerw [limit.lift_π]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\n⊢ y ≫ limit.π (Ran.diagram G.op ℱ.val (op U)) W = NatTrans.app (gluedLimitCone hu ℱ hS hx).π W\n[PROOFSTEP]\nconvert helper hu ℱ hS hx (𝟙 _) y W _\n[GOAL]\ncase h.e'_3.h.h.e'_8\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\ne_1✝ : ((op X).unop ⟶ (Ran.diagram G.op ℱ.val (op U)).obj W) = (X ⟶ (Ran.diagram G.op ℱ.val (op U)).obj W)\n⊢ W = (StructuredArrow.map (𝟙 U).op).obj W\n[PROOFSTEP]\nsimp only [op_id, StructuredArrow.map_id]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\n⊢ ∀ {V' : C} {fV : G.obj V' ⟶ U} (hV : S.arrows (fV ≫ 𝟙 U)), y ≫ ((ran G.op).obj ℱ.val).map fV.op = x (fV ≫ 𝟙 U) hV\n[PROOFSTEP]\nintro V' fV' hV'\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\nV' : C\nfV' : G.obj V' ⟶ U\nhV' : S.arrows (fV' ≫ 𝟙 U)\n⊢ y ≫ ((ran G.op).obj ℱ.val).map fV'.op = x (fV' ≫ 𝟙 U) hV'\n[PROOFSTEP]\nconvert hy fV' (by simpa only [Category.comp_id] using hV')\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\nV' : C\nfV' : G.obj V' ⟶ U\nhV' : S.arrows (fV' ≫ 𝟙 U)\n⊢ S.arrows fV'\n[PROOFSTEP]\nsimpa only [Category.comp_id] using hV'\n[GOAL]\ncase h.e'_3.h.h.e'_2\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhu : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\ny : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\nhy : IsAmalgamation x y\nW : StructuredArrow (op U) G.op\nV' : C\nfV' : G.obj V' ⟶ U\nhV' : S.arrows (fV' ≫ 𝟙 U)\ne_1✝ :\n  (X ⟶ ((ran G.op).obj ℱ.val).obj (op (G.obj V'))) = ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op (G.obj V'))\n⊢ fV' ≫ 𝟙 U = fV'\n[PROOFSTEP]\nerw [Category.comp_id]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\n⊢ Presheaf.IsSheaf K ((ran G.op).obj ℱ.val)\n[PROOFSTEP]\nintro X U S hS x hx\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ ∃! t, IsAmalgamation x t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ (fun t => IsAmalgamation x t) ?w ∧\n    ∀ (y : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)), (fun t => IsAmalgamation x t) y → y = ?w\ncase w\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\n[PROOFSTEP]\nswap\n[GOAL]\ncase w\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)\n[PROOFSTEP]\napply RanIsSheafOfCoverLifting.gluedSection hG ℱ hS hx\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ (fun t => IsAmalgamation x t) (RanIsSheafOfCoverLifting.gluedSection hG ℱ hS hx) ∧\n    ∀ (y : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)),\n      (fun t => IsAmalgamation x t) y → y = RanIsSheafOfCoverLifting.gluedSection hG ℱ hS hx\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ (fun t => IsAmalgamation x t) (RanIsSheafOfCoverLifting.gluedSection hG ℱ hS hx)\n[PROOFSTEP]\napply RanIsSheafOfCoverLifting.gluedSection_isAmalgamation\n[GOAL]\ncase h.right\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nhG : CoverLifting J K G\nℱ : Sheaf J A\nX : A\nU : D\nS : Sieve U\nhS : S ∈ GrothendieckTopology.sieves K U\nx : FamilyOfElements ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)) S.arrows\nhx : Compatible x\n⊢ ∀ (y : ((ran G.op).obj ℱ.val ⋙ coyoneda.obj (op X)).obj (op U)),\n    (fun t => IsAmalgamation x t) y → y = RanIsSheafOfCoverLifting.gluedSection hG ℱ hS hx\n[PROOFSTEP]\napply RanIsSheafOfCoverLifting.gluedSection_is_unique\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : (pullback A Hc Hp).obj X ⟶ Y\n⊢ (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n      ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f) =\n    f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : (pullback A Hc Hp).obj X ⟶ Y\n⊢ ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n        ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f)).val =\n    f.val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : (pullback A Hc Hp).obj X ⟶ Y\n⊢ ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm\n      (↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val) =\n    f.val\n[PROOFSTEP]\nrw [Equiv.symm_apply_apply]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : X ⟶ (copullback A Hl).obj Y\n⊢ (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n      ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val }) f) =\n    f\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : X ⟶ (copullback A Hl).obj Y\n⊢ ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n        ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val }) f)).val =\n    f.val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX : Sheaf K A\nY : Sheaf J A\nf : X ⟶ (copullback A Hl).obj Y\n⊢ ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val)\n      (↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val) =\n    f.val\n[PROOFSTEP]\nrw [Equiv.apply_symm_apply]\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\n⊢ ∀ {X : Sheaf K A} {Y : Sheaf J A} {f : (pullback A Hc Hp).obj X ⟶ Y},\n    ↑((fun X Y =>\n              { toFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val },\n                invFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val },\n                left_inv :=\n                  (_ :\n                    ∀ (f : (pullback A Hc Hp).obj X ⟶ Y),\n                      (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                          ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f) =\n                        f),\n                right_inv :=\n                  (_ :\n                    ∀ (f : X ⟶ (copullback A Hl).obj Y),\n                      (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n                          ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                            f) =\n                        f) })\n            X Y)\n        f =\n      NatTrans.app (NatTrans.mk fun X => { val := NatTrans.app (Ran.adjunction A G.op).unit X.val }) X ≫\n        (copullback A Hl).map f\n[PROOFSTEP]\nrefine Sheaf.Hom.ext _ _ ?_\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX✝ : Sheaf K A\nY✝ : Sheaf J A\nf✝ : (pullback A Hc Hp).obj X✝ ⟶ Y✝\n⊢ (↑((fun X Y =>\n              { toFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val },\n                invFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val },\n                left_inv :=\n                  (_ :\n                    ∀ (f : (pullback A Hc Hp).obj X ⟶ Y),\n                      (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                          ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f) =\n                        f),\n                right_inv :=\n                  (_ :\n                    ∀ (f : X ⟶ (copullback A Hl).obj Y),\n                      (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n                          ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                            f) =\n                        f) })\n            X✝ Y✝)\n        f✝).val =\n    (NatTrans.app (NatTrans.mk fun X => { val := NatTrans.app (Ran.adjunction A G.op).unit X.val }) X✝ ≫\n        (copullback A Hl).map f✝).val\n[PROOFSTEP]\napply (Ran.adjunction A G.op).homEquiv_unit\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\n⊢ ∀ {X : Sheaf K A} {Y : Sheaf J A} {g : X ⟶ (copullback A Hl).obj Y},\n    ↑((fun X Y =>\n                { toFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val },\n                  invFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : (pullback A Hc Hp).obj X ⟶ Y),\n                        (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                            ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (copullback A Hl).obj Y),\n                        (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n                            ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                              f) =\n                          f) })\n              X Y).symm\n        g =\n      (pullback A Hc Hp).map g ≫\n        NatTrans.app (NatTrans.mk fun X => { val := NatTrans.app (Ran.adjunction A G.op).counit X.val }) Y\n[PROOFSTEP]\nrefine Sheaf.Hom.ext _ _ ?_\n[GOAL]\nC D : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : Category.{v, u} D\nA : Type w\ninst✝¹ : Category.{max u v, w} A\ninst✝ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nX✝ : Sheaf K A\nY✝ : Sheaf J A\ng✝ : X✝ ⟶ (copullback A Hl).obj Y✝\n⊢ (↑((fun X Y =>\n                { toFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val },\n                  invFun := fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val },\n                  left_inv :=\n                    (_ :\n                      ∀ (f : (pullback A Hc Hp).obj X ⟶ Y),\n                        (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                            ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val }) f) =\n                          f),\n                  right_inv :=\n                    (_ :\n                      ∀ (f : X ⟶ (copullback A Hl).obj Y),\n                        (fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val) f.val })\n                            ((fun f => { val := ↑(Adjunction.homEquiv (Ran.adjunction A G.op) X.val Y.val).symm f.val })\n                              f) =\n                          f) })\n              X✝ Y✝).symm\n        g✝).val =\n    ((pullback A Hc Hp).map g✝ ≫\n        NatTrans.app (NatTrans.mk fun X => { val := NatTrans.app (Ran.adjunction A G.op).counit X.val }) Y✝).val\n[PROOFSTEP]\napply (Ran.adjunction A G.op).homEquiv_counit\n[GOAL]\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n      (NatTrans.app (pullbackSheafificationCompatibility A Hp Hl Hc).hom F).val =\n    whiskerLeft G.op (GrothendieckTopology.toSheafify K F)\n[PROOFSTEP]\ndsimp [pullbackSheafificationCompatibility, Adjunction.leftAdjointUniq]\n[GOAL]\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n      (coyoneda.preimage\n            (NatTrans.app\n              (Adjunction.leftAdjointsCoyonedaEquiv\n                  (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc))\n                  (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A))).hom\n              (op F))).unop.val =\n    whiskerLeft G.op (GrothendieckTopology.toSheafify K F)\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n        (coyoneda.preimage\n              (NatTrans.app\n                (Adjunction.leftAdjointsCoyonedaEquiv\n                    (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc))\n                    (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A))).hom\n                (op F))).unop.val).op =\n    (whiskerLeft G.op (GrothendieckTopology.toSheafify K F)).op\n[PROOFSTEP]\napply coyoneda.map_injective\n[GOAL]\ncase a.a\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ coyoneda.map\n      (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n          (coyoneda.preimage\n                (NatTrans.app\n                  (Adjunction.leftAdjointsCoyonedaEquiv\n                      (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc))\n                      (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A))).hom\n                  (op F))).unop.val).op =\n    coyoneda.map (whiskerLeft G.op (GrothendieckTopology.toSheafify K F)).op\n[PROOFSTEP]\next E : 2\n[GOAL]\ncase a.a.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\n⊢ NatTrans.app\n      (coyoneda.map\n        (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n            (coyoneda.preimage\n                  (NatTrans.app\n                    (Adjunction.leftAdjointsCoyonedaEquiv\n                        (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc))\n                        (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A))).hom\n                    (op F))).unop.val).op)\n      E =\n    NatTrans.app (coyoneda.map (whiskerLeft G.op (GrothendieckTopology.toSheafify K F)).op) E\n[PROOFSTEP]\ndsimp [Functor.preimage, Full.preimage, coyoneda, Adjunction.leftAdjointsCoyonedaEquiv]\n[GOAL]\ncase a.a.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\n⊢ (fun g =>\n      (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n          (↑(Adjunction.homEquiv (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A)) F\n                    (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F))).symm\n              (↑(Adjunction.homEquiv\n                    (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc)) F\n                    (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)))\n                (𝟙 (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F))))).val) ≫\n        g) =\n    fun g => whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫ g\n[PROOFSTEP]\nerw [Adjunction.homEquiv_unit, Adjunction.homEquiv_counit]\n[GOAL]\ncase a.a.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\n⊢ (fun g =>\n      (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n          (((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op ⋙ presheafToSheaf J A).map\n                (NatTrans.app\n                    (Adjunction.comp (sheafificationAdjunction K A) (pullbackCopullbackAdjunction A Hp Hl Hc)).unit F ≫\n                  (sheafToPresheaf J A ⋙ ran G.op).map (𝟙 (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)))) ≫\n              NatTrans.app (Adjunction.comp (Ran.adjunction A G.op) (sheafificationAdjunction J A)).counit\n                (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F))).val) ≫\n        g) =\n    fun g => whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫ g\n[PROOFSTEP]\ndsimp [Adjunction.comp]\n[GOAL]\ncase a.a.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\n⊢ (fun g =>\n      (GrothendieckTopology.toSheafify J (G.op ⋙ F) ≫\n          GrothendieckTopology.sheafifyMap J\n              ((whiskerLeft G.op (NatTrans.app (sheafificationAdjunction K A).unit F) ≫\n                  whiskerLeft G.op (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) ≫\n                    𝟙 (G.op ⋙ ((copullback A Hl).obj (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F))).val)) ≫\n                whiskerLeft G.op ((ran G.op).map (𝟙 (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val))) ≫\n            𝟙\n                (GrothendieckTopology.sheafify J\n                  (G.op ⋙ (ran G.op).obj (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val)) ≫\n              GrothendieckTopology.sheafifyMap J\n                  (NatTrans.app (Ran.adjunction A G.op).counit\n                    (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val) ≫\n                GrothendieckTopology.sheafifyLift J (𝟙 (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val)\n                  (_ : Presheaf.IsSheaf J (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val)) ≫\n        g) =\n    fun g => whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫ g\n[PROOFSTEP]\nsimp only [sheafificationAdjunction_unit_app, Category.comp_id, Functor.map_id, whiskerLeft_id',\n  GrothendieckTopology.sheafifyMap_comp, GrothendieckTopology.sheafifyMap_sheafifyLift, Category.id_comp,\n  Category.assoc, GrothendieckTopology.toSheafify_sheafifyLift]\n[GOAL]\ncase a.a.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\n⊢ (fun g =>\n      whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫\n        whiskerLeft G.op (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) ≫\n          NatTrans.app (Ran.adjunction A G.op).counit (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ≫ g) =\n    fun g => whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫ g\n[PROOFSTEP]\next t s : 3\n[GOAL]\ncase a.a.w.h.h.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\n⊢ NatTrans.app\n      (whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫\n        whiskerLeft G.op (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) ≫\n          NatTrans.app (Ran.adjunction A G.op).counit (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ≫ t)\n      s =\n    NatTrans.app (whiskerLeft G.op (GrothendieckTopology.toSheafify K F) ≫ t) s\n[PROOFSTEP]\ndsimp [pullbackSheaf]\n[GOAL]\ncase a.a.w.h.h.w.h\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\n⊢ NatTrans.app (GrothendieckTopology.toSheafify K F) (op (G.obj s.unop)) ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n        NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s ≫\n          NatTrans.app t s =\n    NatTrans.app (GrothendieckTopology.toSheafify K F) (op (G.obj s.unop)) ≫ NatTrans.app t s\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase a.a.w.h.h.w.h.e_a\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\n⊢ NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s ≫\n        NatTrans.app t s =\n    NatTrans.app t s\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase a.a.w.h.h.w.h.e_a\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\n⊢ (NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n        NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s) ≫\n      NatTrans.app t s =\n    NatTrans.app t s\n[PROOFSTEP]\nconvert Category.id_comp (obj := A) _\n[GOAL]\ncase h.e'_2.h.h.e'_6\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\n⊢ NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s =\n    𝟙 ((GrothendieckTopology.sheafify K F).obj (op (G.obj s.unop)))\n[PROOFSTEP]\nhave := (Ran.adjunction A G.op).left_triangle\n[GOAL]\ncase h.e'_2.h.h.e'_6\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\nthis :\n  whiskerRight (Ran.adjunction A G.op).unit ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op) ≫\n      whiskerLeft ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op) (Ran.adjunction A G.op).counit =\n    𝟙 (𝟭 (Dᵒᵖ ⥤ A) ⋙ (whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op)\n⊢ NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s =\n    𝟙 ((GrothendieckTopology.sheafify K F).obj (op (G.obj s.unop)))\n[PROOFSTEP]\napply_fun (fun e => (e.app (K.sheafify F)).app s) at this \n[GOAL]\ncase h.e'_2.h.h.e'_6\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\nE : Cᵒᵖ ⥤ A\nt : (pullbackSheaf Hc Hp ((presheafToSheaf K A).obj F)).val ⟶ E\ns : Cᵒᵖ\nthis :\n  NatTrans.app\n      (NatTrans.app\n        (whiskerRight (Ran.adjunction A G.op).unit ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op) ≫\n          whiskerLeft ((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op) (Ran.adjunction A G.op).counit)\n        (GrothendieckTopology.sheafify K F))\n      s =\n    NatTrans.app\n      (NatTrans.app (𝟙 (𝟭 (Dᵒᵖ ⥤ A) ⋙ (whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op)) (GrothendieckTopology.sheafify K F)) s\n⊢ NatTrans.app (NatTrans.app (Ran.adjunction A G.op).unit (GrothendieckTopology.sheafify K F)) (op (G.obj s.unop)) ≫\n      NatTrans.app (NatTrans.app (Ran.adjunction A G.op).counit (G.op ⋙ GrothendieckTopology.sheafify K F)) s =\n    𝟙 ((GrothendieckTopology.sheafify K F).obj (op (G.obj s.unop)))\n[PROOFSTEP]\nexact this\n[GOAL]\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ (NatTrans.app (pullbackSheafificationCompatibility A Hp Hl Hc).hom F).val =\n    GrothendieckTopology.sheafifyLift J (whiskerLeft G.op (GrothendieckTopology.toSheafify K F))\n      (_ : Presheaf.IsSheaf J ((presheafToSheaf K A ⋙ pullback A Hc Hp).obj F).val)\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase a\nC D : Type u\ninst✝¹⁰ : Category.{v, u} C\ninst✝⁹ : Category.{v, u} D\nA : Type w\ninst✝⁸ : Category.{max u v, w} A\ninst✝⁷ : HasLimits A\nJ : GrothendieckTopology C\nK : GrothendieckTopology D\ninst✝⁶ : ConcreteCategory A\ninst✝⁵ : PreservesLimits (forget A)\ninst✝⁴ : ReflectsIsomorphisms (forget A)\ninst✝³ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget A)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ A\ninst✝¹ : (X : D) → PreservesColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ (forget A)\ninst✝ : ∀ (X : D), HasColimitsOfShape (GrothendieckTopology.Cover K X)ᵒᵖ A\nG : C ⥤ D\nHp : CoverPreserving J K G\nHl : CoverLifting J K G\nHc : CompatiblePreserving K G\nF : Dᵒᵖ ⥤ A\n⊢ GrothendieckTopology.toSheafify J (((whiskeringLeft Cᵒᵖ Dᵒᵖ A).obj G.op).obj F) ≫\n      (NatTrans.app (pullbackSheafificationCompatibility A Hp Hl Hc).hom F).val =\n    whiskerLeft G.op (GrothendieckTopology.toSheafify K F)\n[PROOFSTEP]\napply toSheafify_pullbackSheafificationCompatibility\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.CoverLifting", "llama_tokens": 43759, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011686727232, "lm_q2_score": 0.46101677931231594, "lm_q1q2_score": 0.269741456353371}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\n⊢ HasSum (fun n => 0 ^ n • a n) (a 0)\n[PROOFSTEP]\nconvert hasSum_single (α := E) 0 fun b h => _\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\n⊢ a 0 = 0 ^ 0 • a 0\n[PROOFSTEP]\nfirst\n| simp [Nat.pos_of_ne_zero h]\n| simp\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\n⊢ a 0 = 0 ^ 0 • a 0\n[PROOFSTEP]\nsimp [Nat.pos_of_ne_zero h]\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\n⊢ a 0 = 0 ^ 0 • a 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\nb : ℕ\nh : b ≠ 0\n⊢ 0 ^ b • a b = 0\n[PROOFSTEP]\nfirst\n| simp [Nat.pos_of_ne_zero h]\n| simp\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na✝ a : ℕ → E\nb : ℕ\nh : b ≠ 0\n⊢ 0 ^ b • a b = 0\n[PROOFSTEP]\nsimp [Nat.pos_of_ne_zero h]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\n⊢ ∃ t, z ^ n • t = s ∧ HasSum (fun m => z ^ m • a (m + n)) t\n[PROOFSTEP]\nobtain rfl | hn := n.eq_zero_or_pos\n[GOAL]\ncase inl\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < 0 → a k = 0\n⊢ ∃ t, z ^ 0 • t = s ∧ HasSum (fun m => z ^ m • a (m + 0)) t\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase inr\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\n⊢ ∃ t, z ^ n • t = s ∧ HasSum (fun m => z ^ m • a (m + n)) t\n[PROOFSTEP]\nby_cases h : z = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : z = 0\n⊢ ∃ t, z ^ n • t = s ∧ HasSum (fun m => z ^ m • a (m + n)) t\n[PROOFSTEP]\nhave : s = 0 := hs.unique (by simpa [ha 0 hn, h] using hasSum_at_zero a)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : z = 0\n⊢ HasSum (fun m => z ^ m • a m) 0\n[PROOFSTEP]\nsimpa [ha 0 hn, h] using hasSum_at_zero a\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : z = 0\nthis : s = 0\n⊢ ∃ t, z ^ n • t = s ∧ HasSum (fun m => z ^ m • a (m + n)) t\n[PROOFSTEP]\nexact ⟨a n, by simp [h, hn, this], by simpa [h] using hasSum_at_zero fun m => a (m + n)⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : z = 0\nthis : s = 0\n⊢ z ^ n • a n = s\n[PROOFSTEP]\nsimp [h, hn, this]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : z = 0\nthis : s = 0\n⊢ HasSum (fun m => z ^ m • a (m + n)) (a n)\n[PROOFSTEP]\nsimpa [h] using hasSum_at_zero fun m => a (m + n)\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\n⊢ ∃ t, z ^ n • t = s ∧ HasSum (fun m => z ^ m • a (m + n)) t\n[PROOFSTEP]\nrefine ⟨(z ^ n)⁻¹ • s, by field_simp [smul_smul], ?_⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\n⊢ z ^ n • (z ^ n)⁻¹ • s = s\n[PROOFSTEP]\nfield_simp [smul_smul]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\n⊢ HasSum (fun m => z ^ m • a (m + n)) ((z ^ n)⁻¹ • s)\n[PROOFSTEP]\nhave h1 : ∑ i in Finset.range n, z ^ i • a i = 0 :=\n  Finset.sum_eq_zero fun k hk => by simp [ha k (Finset.mem_range.mp hk)]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nk : ℕ\nhk : k ∈ Finset.range n\n⊢ z ^ k • a k = 0\n[PROOFSTEP]\nsimp [ha k (Finset.mem_range.mp hk)]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nh1 : ∑ i in Finset.range n, z ^ i • a i = 0\n⊢ HasSum (fun m => z ^ m • a (m + n)) ((z ^ n)⁻¹ • s)\n[PROOFSTEP]\nhave h2 : HasSum (fun m => z ^ (m + n) • a (m + n)) s := by simpa [h1] using (hasSum_nat_add_iff' n).mpr hs\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nh1 : ∑ i in Finset.range n, z ^ i • a i = 0\n⊢ HasSum (fun m => z ^ (m + n) • a (m + n)) s\n[PROOFSTEP]\nsimpa [h1] using (hasSum_nat_add_iff' n).mpr hs\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nh1 : ∑ i in Finset.range n, z ^ i • a i = 0\nh2 : HasSum (fun m => z ^ (m + n) • a (m + n)) s\n⊢ HasSum (fun m => z ^ m • a (m + n)) ((z ^ n)⁻¹ • s)\n[PROOFSTEP]\nconvert h2.const_smul (z⁻¹ ^ n) using 1\n[GOAL]\ncase h.e'_5\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nh1 : ∑ i in Finset.range n, z ^ i • a i = 0\nh2 : HasSum (fun m => z ^ (m + n) • a (m + n)) s\n⊢ (fun m => z ^ m • a (m + n)) = fun i => z⁻¹ ^ n • z ^ (i + n) • a (i + n)\n[PROOFSTEP]\nfield_simp [pow_add, smul_smul]\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\na : ℕ → E\nhs : HasSum (fun m => z ^ m • a m) s\nha : ∀ (k : ℕ), k < n → a k = 0\nhn : n > 0\nh : ¬z = 0\nh1 : ∑ i in Finset.range n, z ^ i • a i = 0\nh2 : HasSum (fun m => z ^ (m + n) • a (m + n)) s\n⊢ (z ^ n)⁻¹ • s = z⁻¹ ^ n • s\n[PROOFSTEP]\nsimp only [inv_pow]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\n⊢ HasFPowerSeriesAt (dslope f z₀) (fslope p) z₀\n[PROOFSTEP]\nhave hpd : deriv f z₀ = p.coeff 1 := hp.deriv\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhpd : deriv f z₀ = coeff p 1\n⊢ HasFPowerSeriesAt (dslope f z₀) (fslope p) z₀\n[PROOFSTEP]\nhave hp0 : p.coeff 0 = f z₀ := hp.coeff_zero 1\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\n⊢ HasFPowerSeriesAt (dslope f z₀) (fslope p) z₀\n[PROOFSTEP]\nsimp only [hasFPowerSeriesAt_iff, apply_eq_pow_smul_coeff, coeff_fslope] at hp ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\n⊢ ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + z))\n[PROOFSTEP]\nrefine hp.mono fun x hx => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\n⊢ HasSum (fun n => x ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + x))\n[PROOFSTEP]\nby_cases h : x = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : x = 0\n⊢ HasSum (fun n => x ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + x))\n[PROOFSTEP]\nconvert hasSum_single (α := E) 0 _\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : x = 0\n⊢ dslope f z₀ (z₀ + x) = x ^ 0 • coeff p (0 + 1)\n[PROOFSTEP]\nintros\n[GOAL]\ncase pos.convert_2\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : x = 0\n⊢ ∀ (b' : ℕ), b' ≠ 0 → x ^ b' • coeff p (b' + 1) = 0\n[PROOFSTEP]\nintros\n[GOAL]\ncase h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : x = 0\n⊢ dslope f z₀ (z₀ + x) = x ^ 0 • coeff p (0 + 1)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase pos.convert_2\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : x = 0\nb'✝ : ℕ\nx✝ : b'✝ ≠ 0\n⊢ x ^ b'✝ • coeff p (b'✝ + 1) = 0\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : ¬x = 0\n⊢ HasSum (fun n => x ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + x))\n[PROOFSTEP]\nhave hxx : ∀ n : ℕ, x⁻¹ * x ^ (n + 1) = x ^ n := fun n => by field_simp [h, _root_.pow_succ']\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn✝ : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : ¬x = 0\nn : ℕ\n⊢ x⁻¹ * x ^ (n + 1) = x ^ n\n[PROOFSTEP]\nfield_simp [h, _root_.pow_succ']\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : ¬x = 0\nhxx : ∀ (n : ℕ), x⁻¹ * x ^ (n + 1) = x ^ n\n⊢ HasSum (fun n => x ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + x))\n[PROOFSTEP]\nsuffices HasSum (fun n => x⁻¹ • x ^ (n + 1) • p.coeff (n + 1)) (x⁻¹ • (f (z₀ + x) - f z₀)) by\n  simpa [dslope, slope, h, smul_smul, hxx] using this\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : ¬x = 0\nhxx : ∀ (n : ℕ), x⁻¹ * x ^ (n + 1) = x ^ n\nthis : HasSum (fun n => x⁻¹ • x ^ (n + 1) • coeff p (n + 1)) (x⁻¹ • (f (z₀ + x) - f z₀))\n⊢ HasSum (fun n => x ^ n • coeff p (n + 1)) (dslope f z₀ (z₀ + x))\n[PROOFSTEP]\nsimpa [dslope, slope, h, smul_smul, hxx] using this\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhpd : deriv f z₀ = coeff p 1\nhp0 : coeff p 0 = f z₀\nhp : ∀ᶠ (z : 𝕜) in 𝓝 0, HasSum (fun n => z ^ n • coeff p n) (f (z₀ + z))\nx : 𝕜\nhx : HasSum (fun n => x ^ n • coeff p n) (f (z₀ + x))\nh : ¬x = 0\nhxx : ∀ (n : ℕ), x⁻¹ * x ^ (n + 1) = x ^ n\n⊢ HasSum (fun n => x⁻¹ • x ^ (n + 1) • coeff p (n + 1)) (x⁻¹ • (f (z₀ + x) - f z₀))\n[PROOFSTEP]\nsimpa [hp0] using ((hasSum_nat_add_iff' 1).mpr hx).const_smul x⁻¹\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn✝ : ℕ\nz z₀ : 𝕜\nn : ℕ\nhp : HasFPowerSeriesAt f p z₀\n⊢ HasFPowerSeriesAt ((swap dslope z₀)^[n] f) (fslope^[n] p) z₀\n[PROOFSTEP]\ninduction' n with n ih generalizing f p\n[GOAL]\ncase zero\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf✝ g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp✝ : HasFPowerSeriesAt f✝ p✝ z₀\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nhp : HasFPowerSeriesAt f p z₀\n⊢ HasFPowerSeriesAt ((swap dslope z₀)^[zero] f) (fslope^[zero] p) z₀\n[PROOFSTEP]\nexact hp\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf✝ g : 𝕜 → E\nn✝ : ℕ\nz z₀ : 𝕜\nhp✝ : HasFPowerSeriesAt f✝ p✝ z₀\nn : ℕ\nih :\n  ∀ {p : FormalMultilinearSeries 𝕜 𝕜 E} {f : 𝕜 → E},\n    HasFPowerSeriesAt f p z₀ → HasFPowerSeriesAt ((swap dslope z₀)^[n] f) (fslope^[n] p) z₀\np : FormalMultilinearSeries 𝕜 𝕜 E\nf : 𝕜 → E\nhp : HasFPowerSeriesAt f p z₀\n⊢ HasFPowerSeriesAt ((swap dslope z₀)^[succ n] f) (fslope^[succ n] p) z₀\n[PROOFSTEP]\nsimpa using ih (has_fpower_series_dslope_fslope hp)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\n⊢ (swap dslope z₀)^[order p] f z₀ ≠ 0\n[PROOFSTEP]\nrw [← coeff_zero (has_fpower_series_iterate_dslope_fslope p.order hp) 1]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\n⊢ ↑(fslope^[order p] p 0) 1 ≠ 0\n[PROOFSTEP]\nsimpa [coeff_eq_zero] using apply_order_ne_zero h\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\n⊢ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ order p • (swap dslope z₀)^[order p] f z\n[PROOFSTEP]\nhave hq := hasFPowerSeriesAt_iff'.mp (has_fpower_series_iterate_dslope_fslope p.order hp)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\n⊢ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = (z - z₀) ^ order p • (swap dslope z₀)^[order p] f z\n[PROOFSTEP]\nfilter_upwards [hq, hasFPowerSeriesAt_iff'.mp hp] with x hx1 hx2\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f x)\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\n⊢ f x = (x - z₀) ^ order p • (swap dslope z₀)^[order p] f x\n[PROOFSTEP]\nhave : ∀ k < p.order, p.coeff k = 0 := fun k hk => by simpa [coeff_eq_zero] using apply_eq_zero_of_lt_order hk\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f x)\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\nk : ℕ\nhk : k < order p\n⊢ coeff p k = 0\n[PROOFSTEP]\nsimpa [coeff_eq_zero] using apply_eq_zero_of_lt_order hk\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f x)\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\nthis : ∀ (k : ℕ), k < order p → coeff p k = 0\n⊢ f x = (x - z₀) ^ order p • (swap dslope z₀)^[order p] f x\n[PROOFSTEP]\nobtain ⟨s, hs1, hs2⟩ := HasSum.exists_hasSum_smul_of_apply_eq_zero hx2 this\n[GOAL]\ncase h.intro.intro\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns✝ : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f x)\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\nthis : ∀ (k : ℕ), k < order p → coeff p k = 0\ns : E\nhs1 : (x - z₀) ^ order p • s = f x\nhs2 : HasSum (fun m => (x - z₀) ^ m • coeff p (m + order p)) s\n⊢ f x = (x - z₀) ^ order p • (swap dslope z₀)^[order p] f x\n[PROOFSTEP]\nconvert hs1.symm\n[GOAL]\ncase h.e'_3.h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns✝ : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f x)\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\nthis : ∀ (k : ℕ), k < order p → coeff p k = 0\ns : E\nhs1 : (x - z₀) ^ order p • s = f x\nhs2 : HasSum (fun m => (x - z₀) ^ m • coeff p (m + order p)) s\n⊢ (swap dslope z₀)^[order p] f x = s\n[PROOFSTEP]\nsimp only [coeff_iterate_fslope] at hx1 \n[GOAL]\ncase h.e'_3.h.e'_6\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns✝ : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nhq : ∀ᶠ (z : 𝕜) in 𝓝 z₀, HasSum (fun n => (z - z₀) ^ n • coeff (fslope^[order p] p) n) ((swap dslope z₀)^[order p] f z)\nx : 𝕜\nhx2 : HasSum (fun n => (x - z₀) ^ n • coeff p n) (f x)\nthis : ∀ (k : ℕ), k < order p → coeff p k = 0\ns : E\nhs1 : (x - z₀) ^ order p • s = f x\nhs2 : HasSum (fun m => (x - z₀) ^ m • coeff p (m + order p)) s\nhx1 : HasSum (fun n => (x - z₀) ^ n • coeff p (n + order p)) ((swap dslope z₀)^[order p] f x)\n⊢ (swap dslope z₀)^[order p] f x = s\n[PROOFSTEP]\nexact hx1.unique hs2\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\n⊢ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ 0\n[PROOFSTEP]\nrw [eventually_nhdsWithin_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 z₀, x ∈ {z₀}ᶜ → f x ≠ 0\n[PROOFSTEP]\nhave h2 := (has_fpower_series_iterate_dslope_fslope p.order hp).continuousAt\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\nh2 : ContinuousAt ((swap dslope z₀)^[order p] f) z₀\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 z₀, x ∈ {z₀}ᶜ → f x ≠ 0\n[PROOFSTEP]\nhave h3 := h2.eventually_ne (iterate_dslope_fslope_ne_zero hp h)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\nh2 : ContinuousAt ((swap dslope z₀)^[order p] f) z₀\nh3 : ∀ᶠ (z : 𝕜) in 𝓝 z₀, (swap dslope z₀)^[order p] f z ≠ 0\n⊢ ∀ᶠ (x : 𝕜) in 𝓝 z₀, x ∈ {z₀}ᶜ → f x ≠ 0\n[PROOFSTEP]\nfilter_upwards [eq_pow_order_mul_iterate_dslope hp, h3] with z e1 e2 e3\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz✝ z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p ≠ 0\nh2 : ContinuousAt ((swap dslope z₀)^[order p] f) z₀\nh3 : ∀ᶠ (z : 𝕜) in 𝓝 z₀, (swap dslope z₀)^[order p] f z ≠ 0\nz : 𝕜\ne1 : f z = (z - z₀) ^ order p • (swap dslope z₀)^[order p] f z\ne2 : (swap dslope z₀)^[order p] f z ≠ 0\ne3 : z ∈ {z₀}ᶜ\n⊢ f z ≠ 0\n[PROOFSTEP]\nsimpa [e1, e2, e3] using pow_ne_zero p.order (sub_ne_zero.mpr e3)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhp : HasFPowerSeriesAt f p z₀\nh : p = 0\n⊢ HasFPowerSeriesAt (fun z => f z) 0 z₀\n[PROOFSTEP]\nrwa [h] at hp \n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhf : AnalyticAt 𝕜 f z₀\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0) ∨ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ 0\n[PROOFSTEP]\nrcases hf with ⟨p, hp⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\np : FormalMultilinearSeries 𝕜 𝕜 E\nhp : HasFPowerSeriesAt f p z₀\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0) ∨ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ 0\n[PROOFSTEP]\nby_cases h : p = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\np : FormalMultilinearSeries 𝕜 𝕜 E\nhp : HasFPowerSeriesAt f p z₀\nh : p = 0\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0) ∨ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ 0\n[PROOFSTEP]\nexact Or.inl (HasFPowerSeriesAt.eventually_eq_zero (by rwa [h] at hp ))\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\np : FormalMultilinearSeries 𝕜 𝕜 E\nhp : HasFPowerSeriesAt f p z₀\nh : p = 0\n⊢ HasFPowerSeriesAt (fun z => f z) 0 z₀\n[PROOFSTEP]\nrwa [h] at hp \n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np✝ q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\np : FormalMultilinearSeries 𝕜 𝕜 E\nhp : HasFPowerSeriesAt f p z₀\nh : ¬p = 0\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = 0) ∨ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ 0\n[PROOFSTEP]\nexact Or.inr (hp.locally_ne_zero h)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhf : AnalyticAt 𝕜 f z₀\nhg : AnalyticAt 𝕜 g z₀\n⊢ (∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = g z) ∨ ∀ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z ≠ g z\n[PROOFSTEP]\nsimpa [sub_eq_zero] using (hf.sub hg).eventually_eq_zero_or_eventually_ne_zero\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nhf : AnalyticAt 𝕜 f z₀\nhg : AnalyticAt 𝕜 g z₀\n⊢ (∃ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z = g z) ↔ ∀ᶠ (z : 𝕜) in 𝓝 z₀, f z = g z\n[PROOFSTEP]\nsimpa [sub_eq_zero] using frequently_zero_iff_eventually_zero (hf.sub hg)\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nU : Set 𝕜\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nh₀ : z₀ ∈ U\nhfg : ∃ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z = g z\n⊢ EqOn f g U\n[PROOFSTEP]\nhave hfg' : ∃ᶠ z in 𝓝[≠] z₀, (f - g) z = 0 := hfg.mono fun z h => by rw [Pi.sub_apply, h, sub_self]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz✝ z₀ : 𝕜\nU : Set 𝕜\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nh₀ : z₀ ∈ U\nhfg : ∃ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z = g z\nz : 𝕜\nh : f z = g z\n⊢ (f - g) z = 0\n[PROOFSTEP]\nrw [Pi.sub_apply, h, sub_self]\n[GOAL]\n𝕜 : Type u_1\ninst✝² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹ : NormedAddCommGroup E\ninst✝ : NormedSpace 𝕜 E\ns : E\np q : FormalMultilinearSeries 𝕜 𝕜 E\nf g : 𝕜 → E\nn : ℕ\nz z₀ : 𝕜\nU : Set 𝕜\nhf : AnalyticOn 𝕜 f U\nhg : AnalyticOn 𝕜 g U\nhU : IsPreconnected U\nh₀ : z₀ ∈ U\nhfg : ∃ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, f z = g z\nhfg' : ∃ᶠ (z : 𝕜) in 𝓝[{z₀}ᶜ] z₀, (f - g) z = 0\n⊢ EqOn f g U\n[PROOFSTEP]\nsimpa [sub_eq_zero] using fun z hz => (hf.sub hg).eqOn_zero_of_preconnected_of_frequently_eq_zero hU h₀ hfg' hz\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.IsolatedZeros", "llama_tokens": 16117, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5698526368038304, "lm_q2_score": 0.4726834766204328, "lm_q1q2_score": 0.26935992552575533}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : Category.{v', v} J\nF : J ⥤ Discrete PUnit\nc s : Cone F\n⊢ s.pt = c.pt\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type v\ninst✝ : Category.{v', v} J\nF : J ⥤ Discrete PUnit\nc s : Cocone F\n⊢ c.pt = s.pt\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Unit", "llama_tokens": 119, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5428632831725052, "lm_q2_score": 0.49609382947091946, "lm_q1q2_score": 0.26931112502820426}}
{"text": "[GOAL]\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nh : (forget₂ FinBoolAlgCat FinPartOrd).map f = (forget₂ FinBoolAlgCat FinPartOrd).map g\n⊢ f = g\n[PROOFSTEP]\ndsimp at *\n[GOAL]\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nh : ↑f = ↑g\n⊢ f = g\n[PROOFSTEP]\napply FunLike.coe_injective\n[GOAL]\ncase a\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nh : ↑f = ↑g\n⊢ (fun f => ↑f) f = (fun f => ↑f) g\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nh : ↑f = ↑g\n⊢ ↑f = ↑g\n[PROOFSTEP]\next x\n[GOAL]\ncase a.h\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nh : ↑f = ↑g\nx : ↑X.toBoolAlgCat\n⊢ ↑f x = ↑g x\n[PROOFSTEP]\napply_fun (fun f => f x) at h \n[GOAL]\ncase a.h\nX Y : FinBoolAlgCat\nf g : X ⟶ Y\nx : ↑X.toBoolAlgCat\nh : ↑↑f x = ↑↑g x\n⊢ ↑f x = ↑g x\n[PROOFSTEP]\nexact h\n[GOAL]\nα β : FinBoolAlgCat\ne : ↑α.toBoolAlgCat ≃o ↑β.toBoolAlgCat\n⊢ ((let src :=\n        { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n          map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑e,\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑α.toBoolAlgCat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                              map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e,\n                                    map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e,\n                                    map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑α.toBoolAlgCat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) ≫\n      let src :=\n        {\n          toSupHom :=\n            { toFun := ↑(OrderIso.symm e),\n              map_sup' :=\n                (_ :\n                  ∀ (a b : ↑β.toBoolAlgCat),\n                    ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n          map_inf' :=\n            (_ : ∀ (a b : ↑β.toBoolAlgCat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑β.toBoolAlgCat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑(OrderIso.symm e),\n                                  map_sup' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toBoolAlgCat),\n                                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                              map_inf' :=\n                                (_ :\n                                  ∀ (a b : ↑β.toBoolAlgCat),\n                                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toBoolAlgCat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toBoolAlgCat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑β.toBoolAlgCat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) =\n    𝟙 α\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : FinBoolAlgCat\ne : ↑α.toBoolAlgCat ≃o ↑β.toBoolAlgCat\nx✝ : (forget FinBoolAlgCat).obj α\n⊢ ↑((let src :=\n            { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n              map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑e,\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑α.toBoolAlgCat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑e,\n                                      map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                  map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e,\n                                        map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e,\n                                        map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑α.toBoolAlgCat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) ≫\n          let src :=\n            {\n              toSupHom :=\n                { toFun := ↑(OrderIso.symm e),\n                  map_sup' :=\n                    (_ :\n                      ∀ (a b : ↑β.toBoolAlgCat),\n                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n              map_inf' :=\n                (_ :\n                  ∀ (a b : ↑β.toBoolAlgCat),\n                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑β.toBoolAlgCat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑(OrderIso.symm e),\n                                      map_sup' :=\n                                        (_ :\n                                          ∀ (a b : ↑β.toBoolAlgCat),\n                                            ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                  map_inf' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toBoolAlgCat),\n                                        ↑(OrderIso.symm e) (a ⊓ b) =\n                                          ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toBoolAlgCat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toBoolAlgCat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑β.toBoolAlgCat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 α) x✝\n[PROOFSTEP]\nexact e.symm_apply_apply _\n[GOAL]\nα β : FinBoolAlgCat\ne : ↑α.toBoolAlgCat ≃o ↑β.toBoolAlgCat\n⊢ ((let src :=\n        {\n          toSupHom :=\n            { toFun := ↑(OrderIso.symm e),\n              map_sup' :=\n                (_ :\n                  ∀ (a b : ↑β.toBoolAlgCat),\n                    ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n          map_inf' :=\n            (_ : ∀ (a b : ↑β.toBoolAlgCat), ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑(OrderIso.symm e),\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑β.toBoolAlgCat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑(OrderIso.symm e),\n                                  map_sup' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toBoolAlgCat),\n                                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                              map_inf' :=\n                                (_ :\n                                  ∀ (a b : ↑β.toBoolAlgCat),\n                                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toBoolAlgCat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑(OrderIso.symm e),\n                                    map_sup' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                map_inf' :=\n                                  (_ :\n                                    ∀ (a b : ↑β.toBoolAlgCat),\n                                      ↑(OrderIso.symm e) (a ⊓ b) =\n                                        ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑β.toBoolAlgCat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) ≫\n      let src :=\n        { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n          map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n      {\n        toLatticeHom :=\n          {\n            toSupHom :=\n              { toFun := ↑e,\n                map_sup' :=\n                  (_ :\n                    ∀ (a b : ↑α.toBoolAlgCat),\n                      SupHom.toFun\n                          {\n                              toSupHom :=\n                                { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                              map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                          (a ⊔ b) =\n                        SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e,\n                                    map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            a ⊔\n                          SupHom.toFun\n                            {\n                                toSupHom :=\n                                  { toFun := ↑e,\n                                    map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                            b) },\n            map_inf' :=\n              (_ :\n                ∀ (a b : ↑α.toBoolAlgCat),\n                  SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n        map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) }) =\n    𝟙 β\n[PROOFSTEP]\next\n[GOAL]\ncase w\nα β : FinBoolAlgCat\ne : ↑α.toBoolAlgCat ≃o ↑β.toBoolAlgCat\nx✝ : (forget FinBoolAlgCat).obj β\n⊢ ↑((let src :=\n            {\n              toSupHom :=\n                { toFun := ↑(OrderIso.symm e),\n                  map_sup' :=\n                    (_ :\n                      ∀ (a b : ↑β.toBoolAlgCat),\n                        ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n              map_inf' :=\n                (_ :\n                  ∀ (a b : ↑β.toBoolAlgCat),\n                    ↑(OrderIso.symm e) (a ⊓ b) = ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑(OrderIso.symm e),\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑β.toBoolAlgCat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑(OrderIso.symm e),\n                                      map_sup' :=\n                                        (_ :\n                                          ∀ (a b : ↑β.toBoolAlgCat),\n                                            ↑(OrderIso.symm e) (a ⊔ b) = ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                  map_inf' :=\n                                    (_ :\n                                      ∀ (a b : ↑β.toBoolAlgCat),\n                                        ↑(OrderIso.symm e) (a ⊓ b) =\n                                          ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toBoolAlgCat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑(OrderIso.symm e),\n                                        map_sup' :=\n                                          (_ :\n                                            ∀ (a b : ↑β.toBoolAlgCat),\n                                              ↑(OrderIso.symm e) (a ⊔ b) =\n                                                ↑(OrderIso.symm e) a ⊔ ↑(OrderIso.symm e) b) },\n                                    map_inf' :=\n                                      (_ :\n                                        ∀ (a b : ↑β.toBoolAlgCat),\n                                          ↑(OrderIso.symm e) (a ⊓ b) =\n                                            ↑(OrderIso.symm e) a ⊓ ↑(OrderIso.symm e) b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑β.toBoolAlgCat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑(OrderIso.symm e) ⊤ = ⊤), map_bot' := (_ : ↑(OrderIso.symm e) ⊥ = ⊥) }) ≫\n          let src :=\n            { toSupHom := { toFun := ↑e, map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n              map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) };\n          {\n            toLatticeHom :=\n              {\n                toSupHom :=\n                  { toFun := ↑e,\n                    map_sup' :=\n                      (_ :\n                        ∀ (a b : ↑α.toBoolAlgCat),\n                          SupHom.toFun\n                              {\n                                  toSupHom :=\n                                    { toFun := ↑e,\n                                      map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                  map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                              (a ⊔ b) =\n                            SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e,\n                                        map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                a ⊔\n                              SupHom.toFun\n                                {\n                                    toSupHom :=\n                                      { toFun := ↑e,\n                                        map_sup' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊔ b) = ↑e a ⊔ ↑e b) },\n                                    map_inf' := (_ : ∀ (a b : ↑α.toBoolAlgCat), ↑e (a ⊓ b) = ↑e a ⊓ ↑e b) }.toSupHom\n                                b) },\n                map_inf' :=\n                  (_ :\n                    ∀ (a b : ↑α.toBoolAlgCat),\n                      SupHom.toFun src.toSupHom (a ⊓ b) = SupHom.toFun src.toSupHom a ⊓ SupHom.toFun src.toSupHom b) },\n            map_top' := (_ : ↑e ⊤ = ⊤), map_bot' := (_ : ↑e ⊥ = ⊥) })\n      x✝ =\n    ↑(𝟙 β) x✝\n[PROOFSTEP]\nexact e.apply_symm_apply _\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.FinBoolAlgCat", "llama_tokens": 7968, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6859494421679929, "lm_q2_score": 0.39233683016710835, "lm_q1q2_score": 0.26912322979508657}}
{"text": "[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nhave := I.locally_compact\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis : LocallyCompactSpace H\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nhave := ChartedSpace.locallyCompact H M\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝ : LocallyCompactSpace H\nthis : LocallyCompactSpace M\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nhave := I.secondCountableTopology\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝¹ : LocallyCompactSpace H\nthis✝ : LocallyCompactSpace M\nthis : SecondCountableTopology H\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nhave := ChartedSpace.secondCountable_of_sigma_compact H M\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝² : LocallyCompactSpace H\nthis✝¹ : LocallyCompactSpace M\nthis✝ : SecondCountableTopology H\nthis : SecondCountableTopology M\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nhave := ManifoldWithCorners.metrizableSpace I M\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\nlet _ : MetricSpace M := TopologicalSpace.metrizableSpaceMetric M\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\n⊢ ∀ᵐ (x : M) ∂μ, f x = 0\n[PROOFSTEP]\napply ae_eq_zero_of_forall_set_integral_isCompact_eq_zero' hf (fun s hs ↦ Eq.symm ?_)\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ δ, 0 < δ ∧ IsCompact (cthickening δ s) := hs.exists_isCompact_cthickening\n[GOAL]\ncase intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nobtain ⟨u, -, u_pos, u_lim⟩ : ∃ u, StrictAnti u ∧ (∀ (n : ℕ), u n ∈ Ioo 0 δ) ∧ Tendsto u atTop (𝓝 0) :=\n  exists_seq_strictAnti_tendsto' δpos\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nlet v : ℕ → Set M := fun n ↦ thickening (u n) s\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nobtain ⟨K, K_compact, vK⟩ : ∃ K, IsCompact K ∧ ∀ n, v n ⊆ K :=\n  ⟨_, hδ, fun n ↦ thickening_subset_cthickening_of_le (u_pos n).2.le _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nhave : ∀ n, ∃ (g : M → ℝ), support g = v n ∧ Smooth I 𝓘(ℝ) g ∧ Set.range g ⊆ Set.Icc 0 1 ∧ ∀ x ∈ s, g x = 1 :=\n  by\n  intro n\n  rcases exists_msmooth_support_eq_eq_one_iff I isOpen_thickening hs.isClosed\n      (self_subset_thickening (u_pos n).1 s) with\n    ⟨g, g_smooth, g_range, g_supp, hg⟩\n  exact ⟨g, g_supp, g_smooth, g_range, fun x hx ↦ (hg x).1 hx⟩\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\n⊢ ∀ (n : ℕ), ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ (x : M), x ∈ s → g x = 1\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\nn : ℕ\n⊢ ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ (x : M), x ∈ s → g x = 1\n[PROOFSTEP]\nrcases exists_msmooth_support_eq_eq_one_iff I isOpen_thickening hs.isClosed (self_subset_thickening (u_pos n).1 s) with\n  ⟨g, g_smooth, g_range, g_supp, hg⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\nn : ℕ\ng : M → ℝ\ng_smooth : Smooth I 𝓘(ℝ, ℝ) g\ng_range : range g ⊆ Icc 0 1\ng_supp : support g = thickening (u n) s\nhg : ∀ (x : M), x ∈ s ↔ g x = 1\n⊢ ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ (x : M), x ∈ s → g x = 1\n[PROOFSTEP]\nexact ⟨g, g_supp, g_smooth, g_range, fun x hx ↦ (hg x).1 hx⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\nthis : ∀ (n : ℕ), ∃ g, support g = v n ∧ Smooth I 𝓘(ℝ, ℝ) g ∧ range g ⊆ Icc 0 1 ∧ ∀ (x : M), x ∈ s → g x = 1\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nchoose g g_supp g_diff g_range hg using this\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nhave L : Tendsto (fun n ↦ ∫ x, g n x • f x ∂μ) atTop (𝓝 (∫ x in s, f x ∂μ)) :=\n  by\n  rw [← integral_indicator hs.measurableSet]\n  let bound : M → ℝ := K.indicator (fun x ↦ ‖f x‖)\n  have A : ∀ n, AEStronglyMeasurable (fun x ↦ g n x • f x) μ := fun n ↦\n    (g_diff n).continuous.aestronglyMeasurable.smul hf.aestronglyMeasurable\n  have B : Integrable bound μ := by\n    rw [integrable_indicator_iff K_compact.measurableSet]\n    exact (hf.integrableOn_isCompact K_compact).norm\n  have C : ∀ n, ∀ᵐ x ∂μ, ‖g n x • f x‖ ≤ bound x := by\n    intro n\n    apply eventually_of_forall (fun x ↦ ?_)\n    rw [norm_smul]\n    refine le_indicator_apply (fun _ ↦ ?_) (fun hxK ↦ ?_)\n    · have : ‖g n x‖ ≤ 1 := by\n        have := g_range n (mem_range_self (f := g n) x)\n        rw [Real.norm_of_nonneg this.1]\n        exact this.2\n      exact mul_le_of_le_one_left (norm_nonneg _) this\n    · have : g n x = 0 := by rw [← nmem_support, g_supp]; contrapose! hxK; exact vK n hxK\n      simp [this]\n  have D : ∀ᵐ x ∂μ, Tendsto (fun n => g n x • f x) atTop (𝓝 (s.indicator f x)) :=\n    by\n    apply eventually_of_forall (fun x ↦ ?_)\n    by_cases hxs : x ∈ s\n    · have : ∀ n, g n x = 1 := fun n ↦ hg n x hxs\n      simp [this, indicator_of_mem hxs f]\n    · simp_rw [indicator_of_not_mem hxs f]\n      apply tendsto_const_nhds.congr'\n      suffices H : ∀ᶠ n in atTop, g n x = 0\n      · filter_upwards [H] with n hn using by simp [hn]\n      obtain ⟨ε, εpos, hε⟩ : ∃ ε, 0 < ε ∧ x ∉ thickening ε s :=\n        by\n        rw [← hs.isClosed.closure_eq, closure_eq_iInter_thickening s] at hxs \n        simpa using hxs\n      filter_upwards [(tendsto_order.1 u_lim).2 _ εpos] with n hn\n      rw [← nmem_support, g_supp]\n      contrapose! hε\n      exact thickening_mono hn.le s hε\n  exact tendsto_integral_of_dominated_convergence bound A B C D\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\n[PROOFSTEP]\nrw [← integral_indicator hs.measurableSet]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nlet bound : M → ℝ := K.indicator (fun x ↦ ‖f x‖)\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nhave A : ∀ n, AEStronglyMeasurable (fun x ↦ g n x • f x) μ := fun n ↦\n  (g_diff n).continuous.aestronglyMeasurable.smul hf.aestronglyMeasurable\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nhave B : Integrable bound μ := by\n  rw [integrable_indicator_iff K_compact.measurableSet]\n  exact (hf.integrableOn_isCompact K_compact).norm\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\n⊢ Integrable bound\n[PROOFSTEP]\nrw [integrable_indicator_iff K_compact.measurableSet]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\n⊢ IntegrableOn (fun x => ‖f x‖) K\n[PROOFSTEP]\nexact (hf.integrableOn_isCompact K_compact).norm\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nhave C : ∀ n, ∀ᵐ x ∂μ, ‖g n x • f x‖ ≤ bound x := by\n  intro n\n  apply eventually_of_forall (fun x ↦ ?_)\n  rw [norm_smul]\n  refine le_indicator_apply (fun _ ↦ ?_) (fun hxK ↦ ?_)\n  · have : ‖g n x‖ ≤ 1 := by\n      have := g_range n (mem_range_self (f := g n) x)\n      rw [Real.norm_of_nonneg this.1]\n      exact this.2\n    exact mul_le_of_le_one_left (norm_nonneg _) this\n  · have : g n x = 0 := by rw [← nmem_support, g_supp]; contrapose! hxK; exact vK n hxK\n    simp [this]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\n⊢ ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\n⊢ ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\n[PROOFSTEP]\napply eventually_of_forall (fun x ↦ ?_)\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\n⊢ ‖g n x • f x‖ ≤ bound x\n[PROOFSTEP]\nrw [norm_smul]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\n⊢ ‖g n x‖ * ‖f x‖ ≤ bound x\n[PROOFSTEP]\nrefine le_indicator_apply (fun _ ↦ ?_) (fun hxK ↦ ?_)\n[GOAL]\ncase refine_1\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝¹ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nx✝ : x ∈ K\n⊢ ‖g n x‖ * ‖f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nhave : ‖g n x‖ ≤ 1 := by\n  have := g_range n (mem_range_self (f := g n) x)\n  rw [Real.norm_of_nonneg this.1]\n  exact this.2\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝¹ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nx✝ : x ∈ K\n⊢ ‖g n x‖ ≤ 1\n[PROOFSTEP]\nhave := g_range n (mem_range_self (f := g n) x)\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝¹ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nx✝ : x ∈ K\nthis : g n x ∈ Icc 0 1\n⊢ ‖g n x‖ ≤ 1\n[PROOFSTEP]\nrw [Real.norm_of_nonneg this.1]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝¹ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nx✝ : x ∈ K\nthis : g n x ∈ Icc 0 1\n⊢ g n x ≤ 1\n[PROOFSTEP]\nexact this.2\n[GOAL]\ncase refine_1\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝¹ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nx✝ : x ∈ K\nthis : ‖g n x‖ ≤ 1\n⊢ ‖g n x‖ * ‖f x‖ ≤ ‖f x‖\n[PROOFSTEP]\nexact mul_le_of_le_one_left (norm_nonneg _) this\n[GOAL]\ncase refine_2\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nhxK : ¬x ∈ K\n⊢ ‖g n x‖ * ‖f x‖ ≤ 0\n[PROOFSTEP]\nhave : g n x = 0 := by rw [← nmem_support, g_supp]; contrapose! hxK; exact vK n hxK\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nhxK : ¬x ∈ K\n⊢ g n x = 0\n[PROOFSTEP]\nrw [← nmem_support, g_supp]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nhxK : ¬x ∈ K\n⊢ ¬x ∈ v n\n[PROOFSTEP]\ncontrapose! hxK\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nhxK : x ∈ (fun n => thickening (u n) s) n\n⊢ x ∈ K\n[PROOFSTEP]\nexact vK n hxK\n[GOAL]\ncase refine_2\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nn : ℕ\nx : M\nhxK : ¬x ∈ K\nthis : g n x = 0\n⊢ ‖g n x‖ * ‖f x‖ ≤ 0\n[PROOFSTEP]\nsimp [this]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nhave D : ∀ᵐ x ∂μ, Tendsto (fun n => g n x • f x) atTop (𝓝 (s.indicator f x)) :=\n  by\n  apply eventually_of_forall (fun x ↦ ?_)\n  by_cases hxs : x ∈ s\n  · have : ∀ n, g n x = 1 := fun n ↦ hg n x hxs\n    simp [this, indicator_of_mem hxs f]\n  · simp_rw [indicator_of_not_mem hxs f]\n    apply tendsto_const_nhds.congr'\n    suffices H : ∀ᶠ n in atTop, g n x = 0\n    · filter_upwards [H] with n hn using by simp [hn]\n    obtain ⟨ε, εpos, hε⟩ : ∃ ε, 0 < ε ∧ x ∉ thickening ε s :=\n      by\n      rw [← hs.isClosed.closure_eq, closure_eq_iInter_thickening s] at hxs \n      simpa using hxs\n    filter_upwards [(tendsto_order.1 u_lim).2 _ εpos] with n hn\n    rw [← nmem_support, g_supp]\n    contrapose! hε\n    exact thickening_mono hn.le s hε\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\n⊢ ∀ᵐ (x : M) ∂μ, Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n[PROOFSTEP]\napply eventually_of_forall (fun x ↦ ?_)\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\n⊢ Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n[PROOFSTEP]\nby_cases hxs : x ∈ s\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : x ∈ s\n⊢ Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n[PROOFSTEP]\nhave : ∀ n, g n x = 1 := fun n ↦ hg n x hxs\n[GOAL]\ncase pos\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : x ∈ s\nthis : ∀ (n : ℕ), g n x = 1\n⊢ Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n[PROOFSTEP]\nsimp [this, indicator_of_mem hxs f]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\n⊢ Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n[PROOFSTEP]\nsimp_rw [indicator_of_not_mem hxs f]\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\n⊢ Tendsto (fun n => g n x • f x) atTop (𝓝 0)\n[PROOFSTEP]\napply tendsto_const_nhds.congr'\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\n⊢ (fun x => 0) =ᶠ[atTop] fun n => g n x • f x\n[PROOFSTEP]\nsuffices H : ∀ᶠ n in atTop, g n x = 0\n[GOAL]\ncase neg\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH✝ : Type u_3\ninst✝⁷ : TopologicalSpace H✝\nI : ModelWithCorners ℝ E H✝\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H✝ M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H✝\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H✝\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nH : ∀ᶠ (n : ℕ) in atTop, g n x = 0\n⊢ (fun x => 0) =ᶠ[atTop] fun n => g n x • f x\n[PROOFSTEP]\nfilter_upwards [H] with n hn using by simp [hn]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH✝ : Type u_3\ninst✝⁷ : TopologicalSpace H✝\nI : ModelWithCorners ℝ E H✝\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H✝ M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H✝\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H✝\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nH : ∀ᶠ (n : ℕ) in atTop, g n x = 0\nn : ℕ\nhn : g n x = 0\n⊢ 0 = g n x • f x\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase H\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\n⊢ ∀ᶠ (n : ℕ) in atTop, g n x = 0\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε⟩ : ∃ ε, 0 < ε ∧ x ∉ thickening ε s :=\n  by\n  rw [← hs.isClosed.closure_eq, closure_eq_iInter_thickening s] at hxs \n  simpa using hxs\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\n⊢ ∃ ε, 0 < ε ∧ ¬x ∈ thickening ε s\n[PROOFSTEP]\nrw [← hs.isClosed.closure_eq, closure_eq_iInter_thickening s] at hxs \n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ ⋂ (δ : ℝ) (_ : 0 < δ), thickening δ s\n⊢ ∃ ε, 0 < ε ∧ ¬x ∈ thickening ε s\n[PROOFSTEP]\nsimpa using hxs\n[GOAL]\ncase H.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nε : ℝ\nεpos : 0 < ε\nhε : ¬x ∈ thickening ε s\n⊢ ∀ᶠ (n : ℕ) in atTop, g n x = 0\n[PROOFSTEP]\nfilter_upwards [(tendsto_order.1 u_lim).2 _ εpos] with n hn\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nε : ℝ\nεpos : 0 < ε\nhε : ¬x ∈ thickening ε s\nn : ℕ\nhn : u n < ε\n⊢ g n x = 0\n[PROOFSTEP]\nrw [← nmem_support, g_supp]\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nε : ℝ\nεpos : 0 < ε\nhε : ¬x ∈ thickening ε s\nn : ℕ\nhn : u n < ε\n⊢ ¬x ∈ v n\n[PROOFSTEP]\ncontrapose! hε\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nx : M\nhxs : ¬x ∈ s\nε : ℝ\nεpos : 0 < ε\nn : ℕ\nhn : u n < ε\nhε : x ∈ (fun n => thickening (u n) s) n\n⊢ x ∈ thickening ε s\n[PROOFSTEP]\nexact thickening_mono hn.le s hε\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nbound : M → ℝ := indicator K fun x => ‖f x‖\nA : ∀ (n : ℕ), AEStronglyMeasurable (fun x => g n x • f x) μ\nB : Integrable bound\nC : ∀ (n : ℕ), ∀ᵐ (x : M) ∂μ, ‖g n x • f x‖ ≤ bound x\nD : ∀ᵐ (x : M) ∂μ, Tendsto (fun n => g n x • f x) atTop (𝓝 (indicator s f x))\n⊢ Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M), indicator s (fun x => f x) x ∂μ))\n[PROOFSTEP]\nexact tendsto_integral_of_dominated_convergence bound A B C D\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nL : Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nhave : ∀ n, ∫ x, g n x • f x ∂μ = 0 := by\n  refine' fun n ↦ h _ (g_diff n) _\n  apply HasCompactSupport.of_support_subset_isCompact K_compact\n  simpa [g_supp] using vK n\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nL : Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\n⊢ ∀ (n : ℕ), ∫ (x : M), g n x • f x ∂μ = 0\n[PROOFSTEP]\nrefine' fun n ↦ h _ (g_diff n) _\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nL : Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\nn : ℕ\n⊢ HasCompactSupport fun x => g n x\n[PROOFSTEP]\napply HasCompactSupport.of_support_subset_isCompact K_compact\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝³ : LocallyCompactSpace H\nthis✝² : LocallyCompactSpace M\nthis✝¹ : SecondCountableTopology H\nthis✝ : SecondCountableTopology M\nthis : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nL : Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\nn : ℕ\n⊢ (support fun x => g n x) ⊆ K\n[PROOFSTEP]\nsimpa [g_supp] using vK n\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = 0\nthis✝⁴ : LocallyCompactSpace H\nthis✝³ : LocallyCompactSpace M\nthis✝² : SecondCountableTopology H\nthis✝¹ : SecondCountableTopology M\nthis✝ : MetrizableSpace M\nx✝ : MetricSpace M := metrizableSpaceMetric M\ns : Set M\nhs : IsCompact s\nδ : ℝ\nδpos : 0 < δ\nhδ : IsCompact (cthickening δ s)\nu : ℕ → ℝ\nu_pos : ∀ (n : ℕ), u n ∈ Ioo 0 δ\nu_lim : Tendsto u atTop (𝓝 0)\nv : ℕ → Set M := fun n => thickening (u n) s\nK : Set M\nK_compact : IsCompact K\nvK : ∀ (n : ℕ), v n ⊆ K\ng : ℕ → M → ℝ\ng_supp : ∀ (n : ℕ), support (g n) = v n\ng_diff : ∀ (n : ℕ), Smooth I 𝓘(ℝ, ℝ) (g n)\ng_range : ∀ (n : ℕ), range (g n) ⊆ Icc 0 1\nhg : ∀ (n : ℕ) (x : M), x ∈ s → g n x = 1\nL : Tendsto (fun n => ∫ (x : M), g n x • f x ∂μ) atTop (𝓝 (∫ (x : M) in s, f x ∂μ))\nthis : ∀ (n : ℕ), ∫ (x : M), g n x • f x ∂μ = 0\n⊢ 0 = ∫ (x : M) in s, f x ∂μ\n[PROOFSTEP]\nsimpa [this] using L\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\n⊢ ∀ᵐ (x : M) ∂μ, f x = f' x\n[PROOFSTEP]\nhave : ∀ᵐ x ∂μ, (f - f') x = 0 :=\n  by\n  apply ae_eq_zero_of_integral_smooth_smul_eq_zero I (hf.sub hf')\n  intro g g_diff g_supp\n  simp only [Pi.sub_apply, smul_sub]\n  rw [integral_sub, sub_eq_zero]\n  · exact h g g_diff g_supp\n  · exact hf.integrable_smul_left_of_hasCompactSupport g_diff.continuous g_supp\n  · exact hf'.integrable_smul_left_of_hasCompactSupport g_diff.continuous g_supp\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\n⊢ ∀ᵐ (x : M) ∂μ, (f - f') x = 0\n[PROOFSTEP]\napply ae_eq_zero_of_integral_smooth_smul_eq_zero I (hf.sub hf')\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\n⊢ ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • (f - f') x ∂μ = 0\n[PROOFSTEP]\nintro g g_diff g_supp\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\ng : M → ℝ\ng_diff : Smooth I 𝓘(ℝ, ℝ) g\ng_supp : HasCompactSupport g\n⊢ ∫ (x : M), g x • (f - f') x ∂μ = 0\n[PROOFSTEP]\nsimp only [Pi.sub_apply, smul_sub]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\ng : M → ℝ\ng_diff : Smooth I 𝓘(ℝ, ℝ) g\ng_supp : HasCompactSupport g\n⊢ ∫ (x : M), g x • f x - g x • f' x ∂μ = 0\n[PROOFSTEP]\nrw [integral_sub, sub_eq_zero]\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\ng : M → ℝ\ng_diff : Smooth I 𝓘(ℝ, ℝ) g\ng_supp : HasCompactSupport g\n⊢ ∫ (a : M), g a • f a ∂μ = ∫ (a : M), g a • f' a ∂μ\n[PROOFSTEP]\nexact h g g_diff g_supp\n[GOAL]\ncase hf\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\ng : M → ℝ\ng_diff : Smooth I 𝓘(ℝ, ℝ) g\ng_supp : HasCompactSupport g\n⊢ Integrable fun x => g x • f x\n[PROOFSTEP]\nexact hf.integrable_smul_left_of_hasCompactSupport g_diff.continuous g_supp\n[GOAL]\ncase hg\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\ng : M → ℝ\ng_diff : Smooth I 𝓘(ℝ, ℝ) g\ng_supp : HasCompactSupport g\n⊢ Integrable fun x => g x • f' x\n[PROOFSTEP]\nexact hf'.integrable_smul_left_of_hasCompactSupport g_diff.continuous g_supp\n[GOAL]\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\nthis : ∀ᵐ (x : M) ∂μ, (f - f') x = 0\n⊢ ∀ᵐ (x : M) ∂μ, f x = f' x\n[PROOFSTEP]\nfilter_upwards [this] with x hx\n[GOAL]\ncase h\nE : Type u_1\ninst✝¹³ : NormedAddCommGroup E\ninst✝¹² : NormedSpace ℝ E\ninst✝¹¹ : FiniteDimensional ℝ E\nF : Type u_2\ninst✝¹⁰ : NormedAddCommGroup F\ninst✝⁹ : NormedSpace ℝ F\ninst✝⁸ : CompleteSpace F\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners ℝ E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\ninst✝⁴ : SmoothManifoldWithCorners I M\ninst✝³ : MeasurableSpace M\ninst✝² : BorelSpace M\ninst✝¹ : SigmaCompactSpace M\ninst✝ : T2Space M\nf f' : M → F\nμ : Measure M\nhf : LocallyIntegrable f\nhf' : LocallyIntegrable f'\nh : ∀ (g : M → ℝ), Smooth I 𝓘(ℝ, ℝ) g → HasCompactSupport g → ∫ (x : M), g x • f x ∂μ = ∫ (x : M), g x • f' x ∂μ\nthis : ∀ᵐ (x : M) ∂μ, (f - f') x = 0\nx : M\nhx : (f - f') x = 0\n⊢ f x = f' x\n[PROOFSTEP]\nsimpa [sub_eq_zero] using hx\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Distribution.AEEqOfIntegralContDiff", "llama_tokens": 48597, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6039318337259584, "lm_q2_score": 0.4455295350395727, "lm_q1q2_score": 0.26906946907552276}}
{"text": "[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\ns' s : σ →₀ ℕ\nx : MvPolynomial σ R\nh : ¬s ≤ s'\n⊢ ¬∃ d, s' = s + d\n[PROOFSTEP]\nrintro ⟨d, rfl⟩\n[GOAL]\ncase intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\ns : σ →₀ ℕ\nx : MvPolynomial σ R\nd : σ →₀ ℕ\nh : ¬s ≤ s + d\n⊢ False\n[PROOFSTEP]\nexact h le_self_add\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\n⊢ ↑(monomial i) r ∣ ↑(monomial j) s ↔ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\n⊢ ↑(monomial i) r ∣ ↑(monomial j) s → (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nrintro ⟨x, hx⟩\n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ↑(monomial j) s = ↑(monomial i) r * x\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nrw [MvPolynomial.ext_iff] at hx \n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nhave hj := hx j\n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhj : coeff j (↑(monomial j) s) = coeff j (↑(monomial i) r * x)\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nhave hi := hx i\n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhj : coeff j (↑(monomial j) s) = coeff j (↑(monomial i) r * x)\nhi : coeff i (↑(monomial j) s) = coeff i (↑(monomial i) r * x)\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nclassical\nsimp_rw [coeff_monomial, if_pos] at hj hi \nsimp_rw [coeff_monomial_mul'] at hi hj \nsplit_ifs at hi hj  with hi hi\n· exact ⟨Or.inr hi, _, hj⟩\n·\n  exact\n    ⟨Or.inl hj, hj.symm ▸ dvd_zero _⟩\n      -- Porting note: two goals remain at this point in Lean 4\n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhj : coeff j (↑(monomial j) s) = coeff j (↑(monomial i) r * x)\nhi : coeff i (↑(monomial j) s) = coeff i (↑(monomial i) r * x)\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nsimp_rw [coeff_monomial, if_pos] at hj hi \n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi : (if j = i then s else 0) = coeff i (↑(monomial i) r * x)\nhj : s = coeff j (↑(monomial i) r * x)\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nsimp_rw [coeff_monomial_mul'] at hi hj \n[GOAL]\ncase mp.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi : (if j = i then s else 0) = if i ≤ i then r * coeff (i - i) x else 0\nhj : s = if i ≤ j then r * coeff (j - i) x else 0\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nsplit_ifs at hi hj  with hi hi\n[GOAL]\ncase pos\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi✝¹ : (if j = i then s else 0) = if i ≤ i then r * coeff (i - i) x else 0\nhi✝ : j = i\nhi : i ≤ j\nhj : s = r * coeff (j - i) x\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nexact ⟨Or.inr hi, _, hj⟩\n[GOAL]\ncase neg\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi✝¹ : (if j = i then s else 0) = if i ≤ i then r * coeff (i - i) x else 0\nhi✝ : j = i\nhi : ¬i ≤ j\nhj : s = 0\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nexact\n  ⟨Or.inl hj, hj.symm ▸ dvd_zero _⟩\n    -- Porting note: two goals remain at this point in Lean 4\n[GOAL]\ncase pos\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi✝ : (if j = i then s else 0) = if i ≤ i then r * coeff (i - i) x else 0\nhi : ¬j = i\nh✝ : i ≤ j\nhj : s = r * coeff (j - i) x\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nsimp_all only [or_true, dvd_mul_right]\n[GOAL]\ncase neg\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\nx : MvPolynomial σ R\nhx : ∀ (m : σ →₀ ℕ), coeff m (↑(monomial j) s) = coeff m (↑(monomial i) r * x)\nhi✝ : (if j = i then s else 0) = if i ≤ i then r * coeff (i - i) x else 0\nhi : ¬j = i\nh✝ : ¬i ≤ j\nhj : s = 0\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s\n[PROOFSTEP]\nsimp_all only [ite_self, le_refl, ite_true, dvd_mul_right]\n[GOAL]\ncase mpr\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr s : R\ni j : σ →₀ ℕ\n⊢ (s = 0 ∨ i ≤ j) ∧ r ∣ s → ↑(monomial i) r ∣ ↑(monomial j) s\n[PROOFSTEP]\nrintro ⟨h | hij, d, rfl⟩\n[GOAL]\ncase mpr.intro.inl.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr : R\ni j : σ →₀ ℕ\nd : R\nh : r * d = 0\n⊢ ↑(monomial i) r ∣ ↑(monomial j) (r * d)\n[PROOFSTEP]\nsimp_rw [h, monomial_zero, dvd_zero]\n[GOAL]\ncase mpr.intro.inr.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr : R\ni j : σ →₀ ℕ\nhij : i ≤ j\nd : R\n⊢ ↑(monomial i) r ∣ ↑(monomial j) (r * d)\n[PROOFSTEP]\nrefine' ⟨monomial (j - i) d, _⟩\n[GOAL]\ncase mpr.intro.inr.intro\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\nr : R\ni j : σ →₀ ℕ\nhij : i ≤ j\nd : R\n⊢ ↑(monomial j) (r * d) = ↑(monomial i) r * ↑(monomial (j - i)) d\n[PROOFSTEP]\nrw [monomial_mul, add_tsub_cancel_of_le hij]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\ni j : σ →₀ ℕ\n⊢ ↑(monomial i) 1 ∣ ↑(monomial j) 1 ↔ i ≤ j\n[PROOFSTEP]\nrw [monomial_dvd_monomial]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\ni j : σ →₀ ℕ\n⊢ (1 = 0 ∨ i ≤ j) ∧ 1 ∣ 1 ↔ i ≤ j\n[PROOFSTEP]\nsimp_rw [one_ne_zero, false_or_iff, dvd_rfl, and_true_iff]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\ni j : σ\n⊢ X i ∣ X j ↔ i = j\n[PROOFSTEP]\nrefine' monomial_one_dvd_monomial_one.trans _\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝¹ : CommSemiring R\ninst✝ : Nontrivial R\ni j : σ\n⊢ Finsupp.single i 1 ≤ Finsupp.single j 1 ↔ i = j\n[PROOFSTEP]\nsimp_rw [Finsupp.single_le_iff, Nat.one_le_iff_ne_zero, Finsupp.single_apply_ne_zero, and_true_iff]\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\ni : σ\nj : σ →₀ ℕ\nr : R\n⊢ X i ∣ ↑(monomial j) r ↔ r = 0 ∨ ↑j i ≠ 0\n[PROOFSTEP]\nrefine' monomial_dvd_monomial.trans _\n[GOAL]\nσ : Type u_1\nR : Type u_2\ninst✝ : CommSemiring R\ni : σ\nj : σ →₀ ℕ\nr : R\n⊢ (r = 0 ∨ Finsupp.single i 1 ≤ j) ∧ 1 ∣ r ↔ r = 0 ∨ ↑j i ≠ 0\n[PROOFSTEP]\nsimp_rw [one_dvd, and_true_iff, Finsupp.single_le_iff, Nat.one_le_iff_ne_zero]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Division", "llama_tokens": 3715, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665855647395, "lm_q2_score": 0.45326184801538616, "lm_q1q2_score": 0.2686331518300428}}
{"text": "[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : NonUnitalNonAssocSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂✝ a₂ : α\nh : HasSum f a₁\n⊢ HasSum (fun i => a₂ * f i) (a₂ * a₁)\n[PROOFSTEP]\nsimpa only using h.map (AddMonoidHom.mulLeft a₂) (continuous_const.mul continuous_id)\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : NonUnitalNonAssocSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂✝ a₂ : α\nhf : HasSum f a₁\n⊢ HasSum (fun i => f i * a₂) (a₁ * a₂)\n[PROOFSTEP]\nsimpa only using hf.map (AddMonoidHom.mulRight a₂) (continuous_id.mul continuous_const)\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : HasSum f a\nb : α\n⊢ HasSum (fun i => f i / b) (a / b)\n[PROOFSTEP]\nsimp only [div_eq_mul_inv, h.mul_right b⁻¹]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a₂ ≠ 0\nH : HasSum (fun i => a₂ * f i) (a₂ * a₁)\n⊢ HasSum f a₁\n[PROOFSTEP]\nsimpa only [inv_mul_cancel_left₀ h] using H.mul_left a₂⁻¹\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a₂ ≠ 0\nH : HasSum (fun i => f i * a₂) (a₁ * a₂)\n⊢ HasSum f a₁\n[PROOFSTEP]\nsimpa only [mul_inv_cancel_right₀ h] using H.mul_right a₂⁻¹\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a₂ ≠ 0\n⊢ HasSum (fun i => f i / a₂) (a₁ / a₂) ↔ HasSum f a₁\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using hasSum_mul_right_iff (inv_ne_zero h)\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a ≠ 0\nH : Summable fun i => a * f i\n⊢ Summable f\n[PROOFSTEP]\nsimpa only [inv_mul_cancel_left₀ h] using H.mul_left a⁻¹\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a ≠ 0\nH : Summable fun i => f i * a\n⊢ Summable f\n[PROOFSTEP]\nsimpa only [mul_inv_cancel_right₀ h] using H.mul_right a⁻¹\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝² : DivisionSemiring α\ninst✝¹ : TopologicalSpace α\ninst✝ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\nh : a ≠ 0\n⊢ (Summable fun i => f i / a) ↔ Summable f\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using summable_mul_right_iff (inv_ne_zero h)\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : DivisionSemiring α\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\ninst✝ : T2Space α\nhf : ¬Summable f\nha : a = 0\n⊢ ∑' (x : ι), a * f x = a * ∑' (x : ι), f x\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : DivisionSemiring α\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\ninst✝ : T2Space α\nhf : ¬Summable f\nha : ¬a = 0\n⊢ ∑' (x : ι), a * f x = a * ∑' (x : ι), f x\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable (mt (summable_mul_left_iff ha).mp hf), mul_zero]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : DivisionSemiring α\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\ninst✝ : T2Space α\nhf : ¬Summable f\nha : a = 0\n⊢ ∑' (x : ι), f x * a = (∑' (x : ι), f x) * a\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : DivisionSemiring α\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\ninst✝ : T2Space α\nhf : ¬Summable f\nha : ¬a = 0\n⊢ ∑' (x : ι), f x * a = (∑' (x : ι), f x) * a\n[PROOFSTEP]\nrw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable (mt (summable_mul_right_iff ha).mp hf), zero_mul]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : DivisionSemiring α\ninst✝² : TopologicalSpace α\ninst✝¹ : TopologicalSemiring α\nf g : ι → α\na a₁ a₂ : α\ninst✝ : T2Space α\n⊢ ∑' (x : ι), f x / a = (∑' (x : ι), f x) / a\n[PROOFSTEP]\nsimpa only [div_eq_mul_inv] using tsum_mul_right\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f x.fst * g x.snd\n⊢ Summable fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\nrw [summable_mul_prod_iff_summable_mul_sigma_antidiagonal] at h \n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n⊢ Summable fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\nconv => congr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n| Summable fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n| Summable fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n| Summable fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n| fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\nx✝ : ℕ\n| ∑ kl in Nat.antidiagonal x✝, f kl.fst * g kl.snd\n[PROOFSTEP]\nrw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f (↑x.snd).fst * g (↑x.snd).snd\n⊢ Summable fun x => ∑' (b : ↑↑(Nat.antidiagonal x)), f (↑b).fst * g (↑b).snd\n[PROOFSTEP]\nexact h.sigma' fun n => (hasSum_fintype _).summable\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n⊢ (∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\nconv_rhs => congr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n| ∑' (n : ℕ), ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n| ∑' (n : ℕ), ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n| ∑' (n : ℕ), ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\ncongr\n[GOAL]\ncase f\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n| fun n => ∑ kl in Nat.antidiagonal n, f kl.fst * g kl.snd\n[PROOFSTEP]\next\n[GOAL]\ncase f.h\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\nx✝ : ℕ\n| ∑ kl in Nat.antidiagonal x✝, f kl.fst * g kl.snd\n[PROOFSTEP]\nrw [← Finset.sum_finset_coe, ← tsum_fintype]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n⊢ (∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (x : ℕ) (b : ↑↑(Nat.antidiagonal x)), f (↑b).fst * g (↑b).snd\n[PROOFSTEP]\nrw [tsum_mul_tsum hf hg hfg, ← Nat.sigmaAntidiagonalEquivProd.tsum_eq (_ : ℕ × ℕ → α)]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n⊢ ∑' (c : (n : ℕ) × { x // x ∈ Nat.antidiagonal n }),\n      f (↑Nat.sigmaAntidiagonalEquivProd c).fst * g (↑Nat.sigmaAntidiagonalEquivProd c).snd =\n    ∑' (x : ℕ) (b : ↑↑(Nat.antidiagonal x)), f (↑b).fst * g (↑b).snd\n[PROOFSTEP]\nexact tsum_sigma' (fun n => (hasSum_fintype _).summable) (summable_mul_prod_iff_summable_mul_sigma_antidiagonal.mp hfg)\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f x.fst * g x.snd\n⊢ Summable fun n => ∑ k in range (n + 1), f k * g (n - k)\n[PROOFSTEP]\nsimp_rw [← Nat.sum_antidiagonal_eq_sum_range_succ fun k l => f k * g l]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nh : Summable fun x => f x.fst * g x.snd\n⊢ Summable fun n => ∑ ij in Nat.antidiagonal n, f ij.fst * g ij.snd\n[PROOFSTEP]\nexact summable_sum_mul_antidiagonal_of_summable_mul h\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n⊢ (∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ k in range (n + 1), f k * g (n - k)\n[PROOFSTEP]\nsimp_rw [← Nat.sum_antidiagonal_eq_sum_range_succ fun k l => f k * g l]\n[GOAL]\nι : Type u_1\nκ : Type u_2\nR : Type u_3\nα : Type u_4\ninst✝³ : TopologicalSpace α\ninst✝² : NonUnitalNonAssocSemiring α\nf g : ℕ → α\ninst✝¹ : T3Space α\ninst✝ : TopologicalSemiring α\nhf : Summable f\nhg : Summable g\nhfg : Summable fun x => f x.fst * g x.snd\n⊢ (∑' (n : ℕ), f n) * ∑' (n : ℕ), g n = ∑' (n : ℕ), ∑ ij in Nat.antidiagonal n, f ij.fst * g ij.snd\n[PROOFSTEP]\nexact tsum_mul_tsum_eq_tsum_sum_antidiagonal hf hg hfg\n", "meta": {"mathlib_filename": "Mathlib.Topology.Algebra.InfiniteSum.Ring", "llama_tokens": 6161, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6187804196836383, "lm_q2_score": 0.43398146480389854, "lm_q1q2_score": 0.26853923292627646}}
{"text": "[GOAL]\nα : Type ?u.58\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nσ : Type u\nx✝ : Nonempty (Cardinal.{u} ↪ σ)\nf : Cardinal.{u} → σ\nhf : Injective f\ng : σ → Cardinal.{u} := Function.invFun f\nx : σ\nhx : g x = 2 ^ sum g\nthis : g x ≤ sum g\n⊢ g x > sum g\n[PROOFSTEP]\nrw [hx]\n[GOAL]\nα : Type ?u.58\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nσ : Type u\nx✝ : Nonempty (Cardinal.{u} ↪ σ)\nf : Cardinal.{u} → σ\nhf : Injective f\ng : σ → Cardinal.{u} := Function.invFun f\nx : σ\nhx : g x = 2 ^ sum g\nthis : g x ≤ sum g\n⊢ 2 ^ sum g > sum g\n[PROOFSTEP]\nexact cantor _\n[GOAL]\nα : Type ?u.20118\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : WellOrder\n⊢ { α := o.α, r := o.r, wo := (_ : IsWellOrder o.α o.r) } = o\n[PROOFSTEP]\ncases o\n[GOAL]\ncase mk\nα : Type ?u.20118\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ { α := { α := α✝, r := r✝, wo := wo✝ }.α, r := { α := α✝, r := r✝, wo := wo✝ }.r,\n      wo := (_ : IsWellOrder { α := α✝, r := r✝, wo := wo✝ }.α { α := α✝, r := r✝, wo := wo✝ }.r) } =\n    { α := α✝, r := r✝, wo := wo✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.24026\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nw : WellOrder\n⊢ Quotient.mk isEquivalent w = type w.r\n[PROOFSTEP]\ncases w\n[GOAL]\ncase mk\nα : Type ?u.24026\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα✝ : Type u_3\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } = type { α := α✝, r := r✝, wo := wo✝ }.r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\nwo : IsWellOrder α r\n⊢ Quotient.mk isEquivalent { α := α, r := r, wo := wo } = type r\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.24255\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ type (Quotient.out o).r = o\n[PROOFSTEP]\nrw [Ordinal.type, WellOrder.eta, Quotient.out_eq]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\ninst✝ : IsWellOrder α r\n⊢ type r ≠ 0 ↔ Nonempty α\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.28990\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ IsEmpty (Quotient.out o).α ↔ o = 0\n[PROOFSTEP]\nrw [← @type_eq_zero_iff_isEmpty o.out.α (· < ·), type_lt]\n[GOAL]\nα : Type ?u.29806\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ Nonempty (Quotient.out o).α ↔ o ≠ 0\n[PROOFSTEP]\nrw [← @type_ne_zero_iff_nonempty o.out.α (· < ·), type_lt]\n[GOAL]\nα✝ : Type ?u.31118\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nf : β ≃ α\n⊢ (type fun x y => r (↑f x) (↑f y)) = type r\n[PROOFSTEP]\nconvert (RelIso.preimage f r).ordinal_type_eq\n[GOAL]\nα✝ : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69219}\nh : α ≤ β\n⊢ (fun x x_1 => x < x_1) ≼i fun x x_1 => x < x_1\n[PROOFSTEP]\nchange α.out.r ≼i β.out.r\n[GOAL]\nα✝ : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69728}\nh : α ≤ β\n⊢ (Quotient.out α).r ≼i (Quotient.out β).r\n[PROOFSTEP]\nrw [← Quotient.out_eq α, ← Quotient.out_eq β] at h \n[GOAL]\nα✝ : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69728}\nh : Quotient.mk isEquivalent (Quotient.out α) ≤ Quotient.mk isEquivalent (Quotient.out β)\n⊢ (Quotient.out α).r ≼i (Quotient.out β).r\n[PROOFSTEP]\nrevert h\n[GOAL]\nα✝ : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69728}\n⊢ Quotient.mk isEquivalent (Quotient.out α) ≤ Quotient.mk isEquivalent (Quotient.out β) →\n    (Quotient.out α).r ≼i (Quotient.out β).r\n[PROOFSTEP]\ncases Quotient.out α\n[GOAL]\ncase mk\nα✝¹ : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝¹ → α✝¹ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69884}\nα✝ : Type ?u.69884\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } ≤ Quotient.mk isEquivalent (Quotient.out β) →\n    { α := α✝, r := r✝, wo := wo✝ }.r ≼i (Quotient.out β).r\n[PROOFSTEP]\ncases Quotient.out β\n[GOAL]\ncase mk.mk\nα✝² : Type ?u.68609\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝² → α✝² → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.69942}\nα✝¹ : Type ?u.69942\nr✝¹ : α✝¹ → α✝¹ → Prop\nwo✝¹ : IsWellOrder α✝¹ r✝¹\nα✝ : Type ?u.69942\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ Quotient.mk isEquivalent { α := α✝¹, r := r✝¹, wo := wo✝¹ } ≤\n      Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } →\n    { α := α✝¹, r := r✝¹, wo := wo✝¹ }.r ≼i { α := α✝, r := r✝, wo := wo✝ }.r\n[PROOFSTEP]\nexact Classical.choice\n[GOAL]\nα✝ : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.70918}\nh : α < β\n⊢ (fun x x_1 => x < x_1) ≺i fun x x_1 => x < x_1\n[PROOFSTEP]\nchange α.out.r ≺i β.out.r\n[GOAL]\nα✝ : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.71427}\nh : α < β\n⊢ (Quotient.out α).r ≺i (Quotient.out β).r\n[PROOFSTEP]\nrw [← Quotient.out_eq α, ← Quotient.out_eq β] at h \n[GOAL]\nα✝ : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.71427}\nh : Quotient.mk isEquivalent (Quotient.out α) < Quotient.mk isEquivalent (Quotient.out β)\n⊢ (Quotient.out α).r ≺i (Quotient.out β).r\n[PROOFSTEP]\nrevert h\n[GOAL]\nα✝ : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.71427}\n⊢ Quotient.mk isEquivalent (Quotient.out α) < Quotient.mk isEquivalent (Quotient.out β) →\n    (Quotient.out α).r ≺i (Quotient.out β).r\n[PROOFSTEP]\ncases Quotient.out α\n[GOAL]\ncase mk\nα✝¹ : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝¹ → α✝¹ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.71563}\nα✝ : Type ?u.71563\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } < Quotient.mk isEquivalent (Quotient.out β) →\n    { α := α✝, r := r✝, wo := wo✝ }.r ≺i (Quotient.out β).r\n[PROOFSTEP]\ncases Quotient.out β\n[GOAL]\ncase mk.mk\nα✝² : Type ?u.70308\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝² → α✝² → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Ordinal.{?u.71621}\nα✝¹ : Type ?u.71621\nr✝¹ : α✝¹ → α✝¹ → Prop\nwo✝¹ : IsWellOrder α✝¹ r✝¹\nα✝ : Type ?u.71621\nr✝ : α✝ → α✝ → Prop\nwo✝ : IsWellOrder α✝ r✝\n⊢ Quotient.mk isEquivalent { α := α✝¹, r := r✝¹, wo := wo✝¹ } <\n      Quotient.mk isEquivalent { α := α✝, r := r✝, wo := wo✝ } →\n    { α := α✝¹, r := r✝¹, wo := wo✝¹ }.r ≺i { α := α✝, r := r✝, wo := wo✝ }.r\n[PROOFSTEP]\nexact Classical.choice\n[GOAL]\nα : Type ?u.72085\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\ni : (Quotient.out o).α\n⊢ typein (fun x x_1 => x < x_1) i < o\n[PROOFSTEP]\nsimp_rw [← type_lt o]\n[GOAL]\nα : Type ?u.72085\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\ni : (Quotient.out o).α\n⊢ typein (fun x x_1 => x < x_1) i < type fun x x_1 => x < x_1\n[PROOFSTEP]\napply typein_lt_type\n[GOAL]\nα✝ : Type ?u.73586\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≺i s\nx✝ : ↑{b | s b f.top}\na : β\nh : a ∈ {b | s b f.top}\n⊢ ∃ a_1,\n    ↑(RelEmbedding.codRestrict {b | s b f.top}\n            { toRelEmbedding := f.toRelEmbedding,\n                init' :=\n                  (_ :\n                    ∀ (x : α) (x_1 : β),\n                      s x_1 (↑f.toRelEmbedding x) → ∃ a', ↑f.toRelEmbedding a' = x_1) }.toRelEmbedding\n            (_ : ∀ (a : α), s (↑f.toRelEmbedding a) f.top))\n        a_1 =\n      { val := a, property := h }\n[PROOFSTEP]\nrcases f.down.1 h with ⟨b, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type ?u.73586\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≺i s\nx✝ : ↑{b | s b f.top}\nb : α\nh : ↑f.toRelEmbedding b ∈ {b | s b f.top}\n⊢ ∃ a,\n    ↑(RelEmbedding.codRestrict {b | s b f.top}\n            { toRelEmbedding := f.toRelEmbedding,\n                init' :=\n                  (_ :\n                    ∀ (x : α) (x_1 : β),\n                      s x_1 (↑f.toRelEmbedding x) → ∃ a', ↑f.toRelEmbedding a' = x_1) }.toRelEmbedding\n            (_ : ∀ (a : α), s (↑f.toRelEmbedding a) f.top))\n        a =\n      { val := ↑f.toRelEmbedding b, property := h }\n[PROOFSTEP]\nexact ⟨b, rfl⟩\n[GOAL]\nα✝ : Type ?u.74324\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≼i s\na : α\nx✝ : ↑{b | r b a}\nx : α\nh : x ∈ {b | r b a}\n⊢ ↑(RelEmbedding.trans (Subrel.relEmbedding r {b | r b a}) f.toRelEmbedding) { val := x, property := h } ∈\n    {b | s b (↑f a)}\n[PROOFSTEP]\nrw [RelEmbedding.trans_apply]\n[GOAL]\nα✝ : Type ?u.74324\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≼i s\na : α\nx✝ : ↑{b | r b a}\nx : α\nh : x ∈ {b | r b a}\n⊢ ↑f.toRelEmbedding (↑(Subrel.relEmbedding r {b | r b a}) { val := x, property := h }) ∈ {b | s b (↑f a)}\n[PROOFSTEP]\nexact f.toRelEmbedding.map_rel_iff.2 h\n[GOAL]\nα✝ : Type ?u.74324\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≼i s\na : α\nx✝ : ↑{b | s b (↑f a)}\ny : β\nh : y ∈ {b | s b (↑f a)}\n⊢ ∃ a_1,\n    ↑(RelEmbedding.codRestrict {b | s b (↑f a)}\n            (RelEmbedding.trans (Subrel.relEmbedding r {b | r b a}) f.toRelEmbedding)\n            (_ :\n              ∀ (x : ↑{b | r b a}),\n                ↑(RelEmbedding.trans (Subrel.relEmbedding r {b | r b a}) f.toRelEmbedding) x ∈ {b | s b (↑f a)}))\n        a_1 =\n      { val := y, property := h }\n[PROOFSTEP]\nrcases f.init h with ⟨a, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type ?u.74324\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u_3\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≼i s\na✝ : α\nx✝ : ↑{b | s b (↑f a✝)}\na : α\nh : ↑f a ∈ {b | s b (↑f a✝)}\n⊢ ∃ a_1,\n    ↑(RelEmbedding.codRestrict {b | s b (↑f a✝)}\n            (RelEmbedding.trans (Subrel.relEmbedding r {b | r b a✝}) f.toRelEmbedding)\n            (_ :\n              ∀ (x : ↑{b | r b a✝}),\n                ↑(RelEmbedding.trans (Subrel.relEmbedding r {b | r b a✝}) f.toRelEmbedding) x ∈ {b | s b (↑f a✝)}))\n        a_1 =\n      { val := ↑f a, property := h }\n[PROOFSTEP]\nexact ⟨⟨a, f.toRelEmbedding.map_rel_iff.1 h⟩, Subtype.eq <| RelEmbedding.trans_apply _ _ _⟩\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\n⊢ r a b\n[PROOFSTEP]\nhave : f.top.1 = a := by\n  let f' := PrincipalSeg.ofElement r a\n  let g' := f.trans (PrincipalSeg.ofElement r b)\n  have : g'.top = f'.top := by rw [Subsingleton.elim f' g']\n  exact this\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\n⊢ ↑f.top = a\n[PROOFSTEP]\nlet f' := PrincipalSeg.ofElement r a\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nf' : Subrel r {b | r b a} ≺i r := PrincipalSeg.ofElement r a\n⊢ ↑f.top = a\n[PROOFSTEP]\nlet g' := f.trans (PrincipalSeg.ofElement r b)\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nf' : Subrel r {b | r b a} ≺i r := PrincipalSeg.ofElement r a\ng' : Subrel r {b | r b a} ≺i r := PrincipalSeg.trans f (PrincipalSeg.ofElement r b)\n⊢ ↑f.top = a\n[PROOFSTEP]\nhave : g'.top = f'.top := by rw [Subsingleton.elim f' g']\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nf' : Subrel r {b | r b a} ≺i r := PrincipalSeg.ofElement r a\ng' : Subrel r {b | r b a} ≺i r := PrincipalSeg.trans f (PrincipalSeg.ofElement r b)\n⊢ g'.top = f'.top\n[PROOFSTEP]\nrw [Subsingleton.elim f' g']\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nf' : Subrel r {b | r b a} ≺i r := PrincipalSeg.ofElement r a\ng' : Subrel r {b | r b a} ≺i r := PrincipalSeg.trans f (PrincipalSeg.ofElement r b)\nthis : g'.top = f'.top\n⊢ ↑f.top = a\n[PROOFSTEP]\nexact this\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nthis : ↑f.top = a\n⊢ r a b\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\na b : α\nx✝ : typein r a < typein r b\nf : Subrel r {b | r b a} ≺i Subrel r {b_1 | r b_1 b}\nthis : ↑f.top = a\n⊢ r (↑f.top) b\n[PROOFSTEP]\nexact f.top.2\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\no₁ o₂ : Ordinal.{u_3}\nh₁ : o₁ < type r\nh₂ : o₂ < type r\n⊢ r (enum r o₁ h₁) (enum r o₂ h₂) ↔ o₁ < o₂\n[PROOFSTEP]\nrw [← typein_lt_typein r, typein_enum, typein_enum]\n[GOAL]\nα✝ : Type ?u.98270\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\n⊢ ∀ (hr : o < type r) (hs : o < type s), ↑f (enum r o hr) = enum s o hs\n[PROOFSTEP]\nrefine' inductionOn o _\n[GOAL]\nα✝ : Type ?u.98270\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\n⊢ ∀ (α_1 : Type u) (r_1 : α_1 → α_1 → Prop) [inst : IsWellOrder α_1 r_1] (hr : type r_1 < type r)\n    (hs : type r_1 < type s), ↑f (enum r (type r_1) hr) = enum s (type r_1) hs\n[PROOFSTEP]\nrintro γ t wo ⟨g⟩ ⟨h⟩\n[GOAL]\ncase intro.intro\nα✝ : Type ?u.98270\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nγ : Type u\nt : γ → γ → Prop\nwo : IsWellOrder γ t\ng : t ≺i r\nh : t ≺i s\n⊢ ↑f (enum r (type t) (_ : Nonempty (t ≺i r))) = enum s (type t) (_ : Nonempty (t ≺i s))\n[PROOFSTEP]\nskip\n[GOAL]\ncase intro.intro\nα✝ : Type ?u.98270\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nγ : Type u\nt : γ → γ → Prop\nwo : IsWellOrder γ t\ng : t ≺i r\nh : t ≺i s\n⊢ ↑f (enum r (type t) (_ : Nonempty (t ≺i r))) = enum s (type t) (_ : Nonempty (t ≺i s))\n[PROOFSTEP]\nrw [enum_type g, enum_type (PrincipalSeg.ltEquiv g f)]\n[GOAL]\ncase intro.intro\nα✝ : Type ?u.98270\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nγ : Type u\nt : γ → γ → Prop\nwo : IsWellOrder γ t\ng : t ≺i r\nh : t ≺i s\n⊢ ↑f g.top = (PrincipalSeg.ltEquiv g f).top\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type ?u.98738\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nhr : o < type r\n⊢ o < type s\n[PROOFSTEP]\nconvert hr using 1\n[GOAL]\ncase h.e'_4\nα✝ : Type ?u.98738\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nhr : o < type r\n⊢ type s = type r\n[PROOFSTEP]\napply Quotient.sound\n[GOAL]\ncase h.e'_4.a\nα✝ : Type ?u.98738\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα β : Type u\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nf : r ≃r s\no : Ordinal.{u}\nhr : o < type r\n⊢ { α := β, r := s, wo := inst✝ } ≈ { α := α, r := r, wo := inst✝¹ }\n[PROOFSTEP]\nexact ⟨f.symm⟩\n[GOAL]\nα✝ : Type ?u.99459\nβ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nwo : IsWellOrder α r\na x : α\nx✝ : ∀ (y : α), r y x → Acc r y\nIH : ∀ (y : α), r y x → Acc (fun x x_1 => x < x_1) (typein r y)\no : Ordinal.{u_3}\nh : o < typein r x\n⊢ Acc (fun x x_1 => x < x_1) o\n[PROOFSTEP]\nrcases typein_surj r (lt_trans h (typein_lt_type r _)) with ⟨b, rfl⟩\n[GOAL]\ncase intro\nα✝ : Type ?u.99459\nβ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nwo : IsWellOrder α r\na x : α\nx✝ : ∀ (y : α), r y x → Acc r y\nIH : ∀ (y : α), r y x → Acc (fun x x_1 => x < x_1) (typein r y)\nb : α\nh : typein r b < typein r x\n⊢ Acc (fun x x_1 => x < x_1) (typein r b)\n[PROOFSTEP]\nexact IH _ ((typein_lt_typein r).1 h)\n[GOAL]\nα✝ : Type ?u.101731\nβ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nx✝ : IsWellOrder α r\nh : card (type r) = 0\n⊢ type r = 0\n[PROOFSTEP]\nhaveI := Cardinal.mk_eq_zero_iff.1 h\n[GOAL]\nα✝ : Type ?u.101731\nβ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nx✝ : IsWellOrder α r\nh : card (type r) = 0\nthis : IsEmpty { α := α, r := r, wo := x✝ }.α\n⊢ type r = 0\n[PROOFSTEP]\napply type_eq_zero_of_empty\n[GOAL]\nα : Type ?u.101731\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\ne : o = 0\n⊢ card o = 0\n[PROOFSTEP]\nsimp only [e, card_zero]\n[GOAL]\nα : Type u\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ type (ULift.down ⁻¹'o r) = lift (type r)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ (type fun x y => r x.down y.down) = lift (type r)\n[PROOFSTEP]\nrfl\n[GOAL]\nα✝ : Type ?u.108304\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\n⊢ lift (type r) < lift (type s) ↔ Nonempty (r ≺i s)\n[PROOFSTEP]\nhaveI := @RelEmbedding.isWellOrder _ _ (@Equiv.ulift.{max v w} α ⁻¹'o r) r (RelIso.preimage Equiv.ulift.{max v w} r) _\n[GOAL]\nα✝ : Type ?u.108304\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nthis : IsWellOrder (ULift α) (↑Equiv.ulift ⁻¹'o r)\n⊢ lift (type r) < lift (type s) ↔ Nonempty (r ≺i s)\n[PROOFSTEP]\nhaveI := @RelEmbedding.isWellOrder _ _ (@Equiv.ulift.{max u w} β ⁻¹'o s) s (RelIso.preimage Equiv.ulift.{max u w} s) _\n[GOAL]\nα✝ : Type ?u.108304\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nthis✝ : IsWellOrder (ULift α) (↑Equiv.ulift ⁻¹'o r)\nthis : IsWellOrder (ULift β) (↑Equiv.ulift ⁻¹'o s)\n⊢ lift (type r) < lift (type s) ↔ Nonempty (r ≺i s)\n[PROOFSTEP]\nexact\n  ⟨fun ⟨f⟩ =>\n    ⟨(f.equivLT (RelIso.preimage Equiv.ulift r).symm).ltLe (InitialSeg.ofIso (RelIso.preimage Equiv.ulift s))⟩,\n    fun ⟨f⟩ =>\n    ⟨(f.equivLT (RelIso.preimage Equiv.ulift r)).ltLe (InitialSeg.ofIso (RelIso.preimage Equiv.ulift s).symm)⟩⟩\n[GOAL]\nα✝ : Type ?u.110330\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{v}\nα : Type v\nr : α → α → Prop\nx✝¹ : IsWellOrder α r\nβ : Type v\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ lift (type r) ≤ lift (type s) ↔ type r ≤ type s\n[PROOFSTEP]\nrw [← lift_umax]\n[GOAL]\nα✝ : Type ?u.110330\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{v}\nα : Type v\nr : α → α → Prop\nx✝¹ : IsWellOrder α r\nβ : Type v\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ lift (type r) ≤ lift (type s) ↔ type r ≤ type s\n[PROOFSTEP]\nexact lift_type_le.{_, _, u}\n[GOAL]\nα : Type ?u.110723\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{v}\n⊢ lift a = lift b ↔ a = b\n[PROOFSTEP]\nsimp only [le_antisymm_iff, lift_le]\n[GOAL]\nα : Type ?u.110994\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{v}\n⊢ lift a < lift b ↔ a < b\n[PROOFSTEP]\nsimp only [lt_iff_le_not_le, lift_le]\n[GOAL]\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\ne' : Cardinal.lift #α = card (type s)\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nrw [card_type, ← Cardinal.lift_id'.{max u v, u} #β, ← Cardinal.lift_umax.{u, v}, lift_mk_eq.{u, max u v, max u v}] at e' \n[GOAL]\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\ne' : Nonempty (α ≃ β)\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\ncases' e' with f\n[GOAL]\ncase intro\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\nf : α ≃ β\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nhave g := RelIso.preimage f s\n[GOAL]\ncase intro\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\nf : α ≃ β\ng : ↑f ⁻¹'o s ≃r s\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nhaveI := (g : f ⁻¹'o s ↪r s).isWellOrder\n[GOAL]\ncase intro\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\nf : α ≃ β\ng : ↑f ⁻¹'o s ≃r s\nthis : IsWellOrder α (↑f ⁻¹'o s)\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nhave := lift_type_eq.{u, max u v, max u v}.2 ⟨g⟩\n[GOAL]\ncase intro\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\nf : α ≃ β\ng : ↑f ⁻¹'o s ≃r s\nthis✝ : IsWellOrder α (↑f ⁻¹'o s)\nthis : lift (type (↑f ⁻¹'o s)) = lift (type s)\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nrw [lift_id, lift_umax.{u, v}] at this \n[GOAL]\ncase intro\nα✝ : Type ?u.112020\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na : Cardinal.{u}\nb : Ordinal.{max u v}\nh : card b ≤ Cardinal.lift a\nc : Cardinal.{u}\ne : Cardinal.lift c = card b\nα : Type u\nβ : Type (max u v)\ns : β → β → Prop\nx✝ : IsWellOrder β s\nf : α ≃ β\ng : ↑f ⁻¹'o s ≃r s\nthis✝ : IsWellOrder α (↑f ⁻¹'o s)\nthis : lift (type (↑f ⁻¹'o s)) = type s\n⊢ ∃ a', lift a' = type s\n[PROOFSTEP]\nexact ⟨_, this⟩\n[GOAL]\nα : Type ?u.113147\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u}\nb : Ordinal.{max u v}\nh : b ≤ lift a\n⊢ card b ≤ Cardinal.lift (card a)\n[PROOFSTEP]\nrw [lift_card]\n[GOAL]\nα : Type ?u.113147\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u}\nb : Ordinal.{max u v}\nh : b ≤ lift a\n⊢ card b ≤ card (lift a)\n[PROOFSTEP]\nexact card_le_card h\n[GOAL]\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\n⊢ ∀ {a b : (α ⊕ β) ⊕ γ},\n    Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) a) (↑(sumAssoc α β γ) b) ↔ Sum.Lex (Sum.Lex r s) t a b\n[PROOFSTEP]\nintros a b\n[GOAL]\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na b : (α ⊕ β) ⊕ γ\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) a) (↑(sumAssoc α β γ) b) ↔ Sum.Lex (Sum.Lex r s) t a b\n[PROOFSTEP]\nrcases a with (⟨a | a⟩ | a)\n[GOAL]\ncase inl.inl\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nb : (α ⊕ β) ⊕ γ\na : α\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl a))) (↑(sumAssoc α β γ) b) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inl a)) b\n[PROOFSTEP]\nrcases b with (⟨b | b⟩ | b)\n[GOAL]\ncase inl.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nb : (α ⊕ β) ⊕ γ\na : β\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr a))) (↑(sumAssoc α β γ) b) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inr a)) b\n[PROOFSTEP]\nrcases b with (⟨b | b⟩ | b)\n[GOAL]\ncase inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\nb : (α ⊕ β) ⊕ γ\na : γ\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inr a)) (↑(sumAssoc α β γ) b) ↔ Sum.Lex (Sum.Lex r s) t (Sum.inr a) b\n[PROOFSTEP]\nrcases b with (⟨b | b⟩ | b)\n[GOAL]\ncase inl.inl.inl.inl\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na b : α\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl a))) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inl a)) (Sum.inl (Sum.inl b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inl.inl.inl.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : α\nb : β\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl a))) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inl a)) (Sum.inl (Sum.inr b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inl.inl.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : α\nb : γ\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl a))) (↑(sumAssoc α β γ) (Sum.inr b)) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inl a)) (Sum.inr b)\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inl.inr.inl.inl\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : β\nb : α\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr a))) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inr a)) (Sum.inl (Sum.inl b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inl.inr.inl.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na b : β\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr a))) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inr a)) (Sum.inl (Sum.inr b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inl.inr.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : β\nb : γ\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr a))) (↑(sumAssoc α β γ) (Sum.inr b)) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inl (Sum.inr a)) (Sum.inr b)\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inr.inl.inl\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : γ\nb : α\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inr a)) (↑(sumAssoc α β γ) (Sum.inl (Sum.inl b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inr a) (Sum.inl (Sum.inl b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inr.inl.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na : γ\nb : β\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inr a)) (↑(sumAssoc α β γ) (Sum.inl (Sum.inr b))) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inr a) (Sum.inl (Sum.inr b))\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\ncase inr.inr\nα✝ : Type ?u.132524\nβ✝ : Type u_1\nγ✝ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ✝ → γ✝ → Prop\no₁ o₂ o₃ : Ordinal.{u}\nx✝² x✝¹ x✝ : WellOrder\nα : Type u\nr : α → α → Prop\nwo✝² : IsWellOrder α r\nβ : Type u\ns : β → β → Prop\nwo✝¹ : IsWellOrder β s\nγ : Type u\nt : γ → γ → Prop\nwo✝ : IsWellOrder γ t\na b : γ\n⊢ Sum.Lex r (Sum.Lex s t) (↑(sumAssoc α β γ) (Sum.inr a)) (↑(sumAssoc α β γ) (Sum.inr b)) ↔\n    Sum.Lex (Sum.Lex r s) t (Sum.inr a) (Sum.inr b)\n[PROOFSTEP]\nsimp only [sumAssoc_apply_inl_inl, sumAssoc_apply_inl_inr, sumAssoc_apply_inr, Sum.lex_inl_inl, Sum.lex_inr_inr,\n  Sum.Lex.sep, Sum.lex_inr_inl]\n[GOAL]\nα : Type ?u.137403\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\n⊢ card ↑n = ↑n\n[PROOFSTEP]\ninduction n <;> [simp; simp only [card_add, card_one, Nat.cast_succ, *]]\n[GOAL]\nα : Type ?u.137403\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\n⊢ card ↑n = ↑n\n[PROOFSTEP]\ninduction n\n[GOAL]\ncase zero\nα : Type ?u.137403\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ card ↑Nat.zero = ↑Nat.zero\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nα : Type ?u.137403\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn✝ : ℕ\nn_ih✝ : card ↑n✝ = ↑n✝\n⊢ card ↑(Nat.succ n✝) = ↑(Nat.succ n✝)\n[PROOFSTEP]\nsimp only [card_add, card_one, Nat.cast_succ, *]\n[GOAL]\nα : Type ?u.138586\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc a b : Ordinal.{u}\nh : a ≤ b\n⊢ c + a ≤ c + b\n[PROOFSTEP]\nrevert h c\n[GOAL]\nα : Type ?u.138586\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\n⊢ ∀ (c : Ordinal.{u}), a ≤ b → c + a ≤ c + b\n[PROOFSTEP]\nrefine inductionOn a (fun α₁ r₁ _ ↦ ?_)\n[GOAL]\nα : Type ?u.138586\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝ : IsWellOrder α₁ r₁\n⊢ ∀ (c : Ordinal.{u}), type r₁ ≤ b → c + type r₁ ≤ c + b\n[PROOFSTEP]\nrefine inductionOn b (fun α₂ r₂ _ ↦ ?_)\n[GOAL]\nα : Type ?u.138586\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝¹ : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝ : IsWellOrder α₂ r₂\n⊢ ∀ (c : Ordinal.{u}), type r₁ ≤ type r₂ → c + type r₁ ≤ c + type r₂\n[PROOFSTEP]\nrintro c ⟨⟨⟨f, fo⟩, fi⟩⟩\n[GOAL]\ncase intro.mk.mk\nα : Type ?u.138586\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝¹ : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\n⊢ c + type r₁ ≤ c + type r₂\n[PROOFSTEP]\nrefine inductionOn c (fun β s _ ↦ ?_)\n[GOAL]\ncase intro.mk.mk\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ type s + type r₁ ≤ type s + type r₂\n[PROOFSTEP]\nhave := (Embedding.refl β).sumMap f\n[GOAL]\ncase intro.mk.mk\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\n⊢ type s + type r₁ ≤ type s + type r₂\n[PROOFSTEP]\nrefine ⟨⟨⟨(Embedding.refl.{u + 1} _).sumMap f, ?_⟩, ?_⟩⟩\n[GOAL]\ncase intro.mk.mk.refine_1\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\n⊢ ∀ {a b : β ⊕ α₁},\n    Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n      Sum.Lex s r₁ a b\n[PROOFSTEP]\nintros a b\n[GOAL]\ncase intro.mk.mk.refine_1\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na b : β ⊕ α₁\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n    Sum.Lex s r₁ a b\n[PROOFSTEP]\nmatch a, b with\n| Sum.inl a, Sum.inl b => exact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm\n| Sum.inl a, Sum.inr b => apply iff_of_true <;> apply Sum.Lex.sep\n| Sum.inr a, Sum.inl b => apply iff_of_false <;> exact Sum.lex_inr_inl\n| Sum.inr a, Sum.inr b => exact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na b : β\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))\n      (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl b)) ↔\n    Sum.Lex s r₁ (Sum.inl a) (Sum.inl b)\n[PROOFSTEP]\nexact Sum.lex_inl_inl.trans Sum.lex_inl_inl.symm\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : β\nb : α₁\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))\n      (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr b)) ↔\n    Sum.Lex s r₁ (Sum.inl a) (Sum.inr b)\n[PROOFSTEP]\napply iff_of_true\n[GOAL]\ncase ha\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : β\nb : α₁\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl a))\n    (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr b))\n[PROOFSTEP]\napply Sum.Lex.sep\n[GOAL]\ncase hb\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : β\nb : α₁\n⊢ Sum.Lex s r₁ (Sum.inl a) (Sum.inr b)\n[PROOFSTEP]\napply Sum.Lex.sep\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : α₁\nb : β\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))\n      (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl b)) ↔\n    Sum.Lex s r₁ (Sum.inr a) (Sum.inl b)\n[PROOFSTEP]\napply iff_of_false\n[GOAL]\ncase ha\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : α₁\nb : β\n⊢ ¬Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))\n      (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inl b))\n[PROOFSTEP]\nexact Sum.lex_inr_inl\n[GOAL]\ncase hb\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na : α₁\nb : β\n⊢ ¬Sum.Lex s r₁ (Sum.inr a) (Sum.inl b)\n[PROOFSTEP]\nexact Sum.lex_inr_inl\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ b✝ : β ⊕ α₁\na b : α₁\n⊢ Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr a))\n      (↑(Embedding.sumMap (Embedding.refl β) f) (Sum.inr b)) ↔\n    Sum.Lex s r₁ (Sum.inr a) (Sum.inr b)\n[PROOFSTEP]\nexact Sum.lex_inr_inr.trans <| fo.trans Sum.lex_inr_inr.symm\n[GOAL]\ncase intro.mk.mk.refine_2\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\n⊢ ∀ (a : β ⊕ α₁) (b : β ⊕ α₂),\n    Sum.Lex s r₂ b\n        (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n              map_rel_iff' :=\n                (_ :\n                  ∀ {a b : β ⊕ α₁},\n                    Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                        (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                      Sum.Lex s r₁ a b) }\n          a) →\n      ∃ a',\n        ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n                map_rel_iff' :=\n                  (_ :\n                    ∀ {a b : β ⊕ α₁},\n                      Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                          (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                        Sum.Lex s r₁ a b) }\n            a' =\n          b\n[PROOFSTEP]\nintros a b H\n[GOAL]\ncase intro.mk.mk.refine_2\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na : β ⊕ α₁\nb : β ⊕ α₂\nH :\n  Sum.Lex s r₂ b\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      a)\n⊢ ∃ a',\n    ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : β ⊕ α₁},\n                  Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                      (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                    Sum.Lex s r₁ a b) }\n        a' =\n      b\n[PROOFSTEP]\nmatch a, b, H with\n| _, Sum.inl b, _ => exact ⟨Sum.inl b, rfl⟩\n| Sum.inl a, Sum.inr b, H => exact (Sum.lex_inr_inl H).elim\n| Sum.inr a, Sum.inr b, H =>\n  let ⟨w, h⟩ := fi _ _ (Sum.lex_inr_inr.1 H)\n  exact ⟨Sum.inr w, congr_arg Sum.inr h⟩\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝⁴ : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝³ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝² : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na : β ⊕ α₁\nb✝ : β ⊕ α₂\nH :\n  Sum.Lex s r₂ b✝\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      a)\nx✝¹ : β ⊕ α₁\nb : β\nx✝ :\n  Sum.Lex s r₂ (Sum.inl b)\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      x✝¹)\n⊢ ∃ a',\n    ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : β ⊕ α₁},\n                  Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                      (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                    Sum.Lex s r₁ a b) }\n        a' =\n      Sum.inl b\n[PROOFSTEP]\nexact ⟨Sum.inl b, rfl⟩\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ : β ⊕ α₁\nb✝ : β ⊕ α₂\nH✝ :\n  Sum.Lex s r₂ b✝\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      a✝)\na : β\nb : α₂\nH :\n  Sum.Lex s r₂ (Sum.inr b)\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      (Sum.inl a))\n⊢ ∃ a',\n    ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : β ⊕ α₁},\n                  Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                      (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                    Sum.Lex s r₁ a b) }\n        a' =\n      Sum.inr b\n[PROOFSTEP]\nexact (Sum.lex_inr_inl H).elim\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ : β ⊕ α₁\nb✝ : β ⊕ α₂\nH✝ :\n  Sum.Lex s r₂ b✝\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      a✝)\na : α₁\nb : α₂\nH :\n  Sum.Lex s r₂ (Sum.inr b)\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      (Sum.inr a))\n⊢ ∃ a',\n    ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : β ⊕ α₁},\n                  Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                      (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                    Sum.Lex s r₁ a b) }\n        a' =\n      Sum.inr b\n[PROOFSTEP]\nlet ⟨w, h⟩ := fi _ _ (Sum.lex_inr_inr.1 H)\n[GOAL]\nα : Type ?u.138586\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝¹ b✝¹ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nthis : β ⊕ α₁ ↪ β ⊕ α₂\na✝ : β ⊕ α₁\nb✝ : β ⊕ α₂\nH✝ :\n  Sum.Lex s r₂ b✝\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      a✝)\na : α₁\nb : α₂\nH :\n  Sum.Lex s r₂ (Sum.inr b)\n    (↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n          map_rel_iff' :=\n            (_ :\n              ∀ {a b : β ⊕ α₁},\n                Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a) (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                  Sum.Lex s r₁ a b) }\n      (Sum.inr a))\nw : α₁\nh : ↑{ toEmbedding := f, map_rel_iff' := fo } w = b\n⊢ ∃ a',\n    ↑{ toEmbedding := Embedding.sumMap (Embedding.refl β) f,\n            map_rel_iff' :=\n              (_ :\n                ∀ {a b : β ⊕ α₁},\n                  Sum.Lex s r₂ (↑(Embedding.sumMap (Embedding.refl β) f) a)\n                      (↑(Embedding.sumMap (Embedding.refl β) f) b) ↔\n                    Sum.Lex s r₁ a b) }\n        a' =\n      Sum.inr b\n[PROOFSTEP]\nexact ⟨Sum.inr w, congr_arg Sum.inr h⟩\n[GOAL]\nα : Type ?u.140748\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc a b : Ordinal.{u}\nh : a ≤ b\n⊢ Function.swap (fun x x_1 => x + x_1) c a ≤ Function.swap (fun x x_1 => x + x_1) c b\n[PROOFSTEP]\nrevert h c\n[GOAL]\nα : Type ?u.140748\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\n⊢ ∀ (c : Ordinal.{u}), a ≤ b → Function.swap (fun x x_1 => x + x_1) c a ≤ Function.swap (fun x x_1 => x + x_1) c b\n[PROOFSTEP]\nrefine inductionOn a (fun α₁ r₁ _ ↦ ?_)\n[GOAL]\nα : Type ?u.140748\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝ : IsWellOrder α₁ r₁\n⊢ ∀ (c : Ordinal.{u}),\n    type r₁ ≤ b → Function.swap (fun x x_1 => x + x_1) c (type r₁) ≤ Function.swap (fun x x_1 => x + x_1) c b\n[PROOFSTEP]\nrefine inductionOn b (fun α₂ r₂ _ ↦ ?_)\n[GOAL]\nα : Type ?u.140748\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝¹ : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝ : IsWellOrder α₂ r₂\n⊢ ∀ (c : Ordinal.{u}),\n    type r₁ ≤ type r₂ →\n      Function.swap (fun x x_1 => x + x_1) c (type r₁) ≤ Function.swap (fun x x_1 => x + x_1) c (type r₂)\n[PROOFSTEP]\nrintro c ⟨⟨⟨f, fo⟩, fi⟩⟩\n[GOAL]\ncase intro.mk.mk\nα : Type ?u.140748\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝¹ : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\n⊢ Function.swap (fun x x_1 => x + x_1) c (type r₁) ≤ Function.swap (fun x x_1 => x + x_1) c (type r₂)\n[PROOFSTEP]\nrefine inductionOn c (fun β s _ ↦ ?_)\n[GOAL]\ncase intro.mk.mk\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ Function.swap (fun x x_1 => x + x_1) (type s) (type r₁) ≤ Function.swap (fun x x_1 => x + x_1) (type s) (type r₂)\n[PROOFSTEP]\nexact\n  @RelEmbedding.ordinal_type_le _ _ (Sum.Lex r₁ s) (Sum.Lex r₂ s) _ _\n    ⟨f.sumMap (Embedding.refl _), by\n      intro a b\n      constructor <;> intro H\n      · cases' a with a a <;> cases' b with b b <;> cases H <;> constructor <;> [rwa [← fo]; assumption]\n      · cases H <;> constructor <;> [rwa [fo]; assumption]⟩\n[GOAL]\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ ∀ {a b : α₁ ⊕ β},\n    Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b) ↔\n      Sum.Lex r₁ s a b\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b) ↔\n    Sum.Lex r₁ s a b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b) →\n    Sum.Lex r₁ s a b\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mpr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\n⊢ Sum.Lex r₁ s a b →\n    Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n[PROOFSTEP]\nintro H\n[GOAL]\ncase mp\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\nH : Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n⊢ Sum.Lex r₁ s a b\n[PROOFSTEP]\ncases' a with a a <;> cases' b with b b <;> cases H <;> constructor <;> [rwa [← fo]; assumption]\n[GOAL]\ncase mp\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\nH : Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n⊢ Sum.Lex r₁ s a b\n[PROOFSTEP]\ncases' a with a a\n[GOAL]\ncase mp.inl\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nb : α₁ ⊕ β\na : α₁\nH : Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a)) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n⊢ Sum.Lex r₁ s (Sum.inl a) b\n[PROOFSTEP]\ncases' b with b b\n[GOAL]\ncase mp.inr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nb : α₁ ⊕ β\na : β\nH : Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr a)) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n⊢ Sum.Lex r₁ s (Sum.inr a) b\n[PROOFSTEP]\ncases' b with b b\n[GOAL]\ncase mp.inl.inl\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁\nH :\n  Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl b))\n⊢ Sum.Lex r₁ s (Sum.inl a) (Sum.inl b)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mp.inl.inr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na : α₁\nb : β\nH :\n  Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr b))\n⊢ Sum.Lex r₁ s (Sum.inl a) (Sum.inr b)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mp.inr.inl\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na : β\nb : α₁\nH :\n  Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr a))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl b))\n⊢ Sum.Lex r₁ s (Sum.inr a) (Sum.inl b)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mp.inr.inr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : β\nH :\n  Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr a))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr b))\n⊢ Sum.Lex r₁ s (Sum.inr a) (Sum.inr b)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mp.inl.inl.inl\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁\nh✝ : r₂ (↑f a) (↑f b)\n⊢ Sum.Lex r₁ s (Sum.inl a) (Sum.inl b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.inl.inr.sep\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na : α₁\nb : β\n⊢ Sum.Lex r₁ s (Sum.inl a) (Sum.inr b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.inr.inr.inr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : β\nh✝ : s (↑(Embedding.refl β) a) (↑(Embedding.refl β) b)\n⊢ Sum.Lex r₁ s (Sum.inr a) (Sum.inr b)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.inl.inl.inl.h\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁\nh✝ : r₂ (↑f a) (↑f b)\n⊢ r₁ a b\n[PROOFSTEP]\nrwa [← fo]\n[GOAL]\ncase mp.inr.inr.inr.h\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : β\nh✝ : s (↑(Embedding.refl β) a) (↑(Embedding.refl β) b)\n⊢ s a b\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mpr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\nH : Sum.Lex r₁ s a b\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n[PROOFSTEP]\ncases H <;> constructor <;> [rwa [fo]; assumption]\n[GOAL]\ncase mpr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na✝ b✝ : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na b : α₁ ⊕ β\nH : Sum.Lex r₁ s a b\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) a) (↑(Embedding.sumMap f (Embedding.refl β)) b)\n[PROOFSTEP]\ncases H\n[GOAL]\ncase mpr.inl\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na₁✝ a₂✝ : α₁\nh✝ : r₁ a₁✝ a₂✝\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a₁✝))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a₂✝))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.inr\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nb₁✝ b₂✝ : β\nh✝ : s b₁✝ b₂✝\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr b₁✝))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr b₂✝))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.sep\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na✝ : α₁\nb✝ : β\n⊢ Sum.Lex r₂ s (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inl a✝))\n    (↑(Embedding.sumMap f (Embedding.refl β)) (Sum.inr b✝))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.inl.h\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\na₁✝ a₂✝ : α₁\nh✝ : r₁ a₁✝ a₂✝\n⊢ r₂ (↑f a₁✝) (↑f a₂✝)\n[PROOFSTEP]\nrwa [fo]\n[GOAL]\ncase mpr.inr.h\nα : Type ?u.140748\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\na b : Ordinal.{u}\nα₁ : Type u\nr₁ : α₁ → α₁ → Prop\nx✝² : IsWellOrder α₁ r₁\nα₂ : Type u\nr₂ : α₂ → α₂ → Prop\nx✝¹ : IsWellOrder α₂ r₂\nc : Ordinal.{u}\nf : α₁ ↪ α₂\nfo : ∀ {a b : α₁}, r₂ (↑f a) (↑f b) ↔ r₁ a b\nfi :\n  ∀ (a : α₁) (b : α₂),\n    r₂ b (↑{ toEmbedding := f, map_rel_iff' := fo } a) → ∃ a', ↑{ toEmbedding := f, map_rel_iff' := fo } a' = b\nβ : Type u\ns : β → β → Prop\nx✝ : IsWellOrder β s\nb₁✝ b₂✝ : β\nh✝ : s b₁✝ b₂✝\n⊢ s (↑(Embedding.refl β) b₁✝) (↑(Embedding.refl β) b₂✝)\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type ?u.163180\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_3}\n⊢ a ≤ a + b\n[PROOFSTEP]\nsimpa only [add_zero] using add_le_add_left (Ordinal.zero_le b) a\n[GOAL]\nα : Type ?u.163578\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na b : Ordinal.{u_3}\n⊢ a ≤ b + a\n[PROOFSTEP]\nsimpa only [zero_add] using add_le_add_right (Ordinal.zero_le b) a\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nh : b = a + b\nx✝ : a < a + b ∨ a = a + b\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nh : b = a + b\nx✝ : a < a + b ∨ a = a + b\n⊢ a ≤ a + b ∨ a + b ≤ a\n[PROOFSTEP]\nexact Or.inl (le_add_right _ _)\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nx✝ : b < a + b ∨ b = a + b\nh : a = a + b\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nx✝ : b < a + b ∨ b = a + b\nh : a = a + b\n⊢ a + b ≤ b ∨ b ≤ a + b\n[PROOFSTEP]\nexact Or.inr (le_add_left _ _)\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nh₁ : b < a + b\nh₂ : a < a + b\n⊢ a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrevert h₁ h₂\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\n⊢ b < a + b → a < a + b → a ≤ b ∨ b ≤ a\n[PROOFSTEP]\nrefine inductionOn a ?_\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\n⊢ ∀ (α : Type ?u.163980) (r : α → α → Prop) [inst : IsWellOrder α r],\n    b < type r + b → type r < type r + b → type r ≤ b ∨ b ≤ type r\n[PROOFSTEP]\nintro α₁ r₁ _\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝ : IsWellOrder α₁ r₁\n⊢ b < type r₁ + b → type r₁ < type r₁ + b → type r₁ ≤ b ∨ b ≤ type r₁\n[PROOFSTEP]\nrefine inductionOn b ?_\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝ : IsWellOrder α₁ r₁\n⊢ ∀ (α : Type ?u.163980) (r : α → α → Prop) [inst : IsWellOrder α r],\n    type r < type r₁ + type r → type r₁ < type r₁ + type r → type r₁ ≤ type r ∨ type r ≤ type r₁\n[PROOFSTEP]\nintro α₂ r₂ _ ⟨f⟩ ⟨g⟩\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\n⊢ type r₁ ≤ type r₂ ∨ type r₂ ≤ type r₁\n[PROOFSTEP]\nrw [← typein_top f, ← typein_top g, le_iff_lt_or_eq, le_iff_lt_or_eq, typein_lt_typein, typein_lt_typein]\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\n⊢ (Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top) ∨\n    Sum.Lex r₁ r₂ f.top g.top ∨ typein (Sum.Lex r₁ r₂) f.top = typein (Sum.Lex r₁ r₂) g.top\n[PROOFSTEP]\nrcases trichotomous_of (Sum.Lex r₁ r₂) g.top f.top with (h | h | h) <;> [exact Or.inl (Or.inl h); (left; right; rw [h]);\n  exact Or.inr (Or.inl h)]\n[GOAL]\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\n⊢ (Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top) ∨\n    Sum.Lex r₁ r₂ f.top g.top ∨ typein (Sum.Lex r₁ r₂) f.top = typein (Sum.Lex r₁ r₂) g.top\n[PROOFSTEP]\nrcases trichotomous_of (Sum.Lex r₁ r₂) g.top f.top with (h | h | h)\n[GOAL]\ncase inl\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\nh : Sum.Lex r₁ r₂ g.top f.top\n⊢ (Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top) ∨\n    Sum.Lex r₁ r₂ f.top g.top ∨ typein (Sum.Lex r₁ r₂) f.top = typein (Sum.Lex r₁ r₂) g.top\n[PROOFSTEP]\nexact Or.inl (Or.inl h)\n[GOAL]\ncase inr.inl\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\nh : g.top = f.top\n⊢ (Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top) ∨\n    Sum.Lex r₁ r₂ f.top g.top ∨ typein (Sum.Lex r₁ r₂) f.top = typein (Sum.Lex r₁ r₂) g.top\n[PROOFSTEP]\nleft\n[GOAL]\ncase inr.inl.h\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\nh : g.top = f.top\n⊢ Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top\n[PROOFSTEP]\nright\n[GOAL]\ncase inr.inl.h.h\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\nh : g.top = f.top\n⊢ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase inr.inr\nα : Type ?u.163946\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nsrc✝ : PartialOrder Ordinal.{?u.163980} := inferInstanceAs (PartialOrder Ordinal.{?u.163980})\na b : Ordinal.{?u.163980}\nα₁ : Type ?u.163980\nr₁ : α₁ → α₁ → Prop\ninst✝¹ : IsWellOrder α₁ r₁\nα₂ : Type ?u.163980\nr₂ : α₂ → α₂ → Prop\ninst✝ : IsWellOrder α₂ r₂\nf : r₂ ≺i Sum.Lex r₁ r₂\ng : r₁ ≺i Sum.Lex r₁ r₂\nh : Sum.Lex r₁ r₂ f.top g.top\n⊢ (Sum.Lex r₁ r₂ g.top f.top ∨ typein (Sum.Lex r₁ r₂) g.top = typein (Sum.Lex r₁ r₂) f.top) ∨\n    Sum.Lex r₁ r₂ f.top g.top ∨ typein (Sum.Lex r₁ r₂) f.top = typein (Sum.Lex r₁ r₂) g.top\n[PROOFSTEP]\nexact Or.inr (Or.inl h)\n[GOAL]\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\n⊢ type r + 1 ≤ type s\n[PROOFSTEP]\nhaveI := hs\n[GOAL]\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\n⊢ type r + 1 ≤ type s\n[PROOFSTEP]\nrefine' ⟨⟨RelEmbedding.ofMonotone (Sum.rec f fun _ => t) (fun a b ↦ _), fun a b ↦ _⟩⟩\n[GOAL]\ncase refine'_1\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na b : α ⊕ PUnit\n⊢ Sum.Lex r EmptyRelation a b →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)\n[PROOFSTEP]\nrcases a with (a | _)\n[GOAL]\ncase refine'_1.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : α ⊕ PUnit\na : α\n⊢ Sum.Lex r EmptyRelation (Sum.inl a) b →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl a)) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)\n[PROOFSTEP]\nrcases b with (b | _)\n[GOAL]\ncase refine'_1.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : α ⊕ PUnit\nval✝ : PUnit\n⊢ Sum.Lex r EmptyRelation (Sum.inr val✝) b →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝)) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)\n[PROOFSTEP]\nrcases b with (b | _)\n[GOAL]\ncase refine'_1.inl.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na b : α\n⊢ Sum.Lex r EmptyRelation (Sum.inl a) (Sum.inl b) →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl a)) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl b))\n[PROOFSTEP]\nsimpa only [Sum.lex_inl_inl] using f.map_rel_iff.2\n[GOAL]\ncase refine'_1.inl.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na : α\nval✝ : PUnit\n⊢ Sum.Lex r EmptyRelation (Sum.inl a) (Sum.inr val✝) →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl a))\n      ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝))\n[PROOFSTEP]\nintro\n[GOAL]\ncase refine'_1.inl.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝¹ b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na : α\nval✝ : PUnit\na✝ : Sum.Lex r EmptyRelation (Sum.inl a) (Sum.inr val✝)\n⊢ s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl a)) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝))\n[PROOFSTEP]\nrw [hf]\n[GOAL]\ncase refine'_1.inl.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝¹ b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na : α\nval✝ : PUnit\na✝ : Sum.Lex r EmptyRelation (Sum.inl a) (Sum.inr val✝)\n⊢ ∃ a_1, ↑f a_1 = (fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl a)\n[PROOFSTEP]\nexact ⟨_, rfl⟩\n[GOAL]\ncase refine'_1.inr.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nval✝ : PUnit\nb : α\n⊢ Sum.Lex r EmptyRelation (Sum.inr val✝) (Sum.inl b) →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝))\n      ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inl b))\n[PROOFSTEP]\nexact False.elim ∘ Sum.lex_inr_inl\n[GOAL]\ncase refine'_1.inr.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nval✝¹ val✝ : PUnit\n⊢ Sum.Lex r EmptyRelation (Sum.inr val✝¹) (Sum.inr val✝) →\n    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝¹))\n      ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) (Sum.inr val✝))\n[PROOFSTEP]\nexact False.elim ∘ Sum.lex_inr_inr.1\n[GOAL]\ncase refine'_2\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\na : α ⊕ PUnit\nb : β\n⊢ s b\n      (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a) →\n    ∃ a',\n      ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n              (_ :\n                ∀ (a b : α ⊕ PUnit),\n                  Sum.Lex r EmptyRelation a b →\n                    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n          a' =\n        b\n[PROOFSTEP]\nrcases a with (a | _)\n[GOAL]\ncase refine'_2.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\na : α\n⊢ s b\n      (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        (Sum.inl a)) →\n    ∃ a',\n      ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n              (_ :\n                ∀ (a b : α ⊕ PUnit),\n                  Sum.Lex r EmptyRelation a b →\n                    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n          a' =\n        b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\na : α\nh :\n  s b\n    (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n          (_ :\n            ∀ (a b : α ⊕ PUnit),\n              Sum.Lex r EmptyRelation a b →\n                s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n      (Sum.inl a))\n⊢ ∃ a',\n    ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a' =\n      b\n[PROOFSTEP]\nhave := @PrincipalSeg.init _ _ _ _ _ ⟨f, t, hf⟩ _ _ h\n[GOAL]\ncase refine'_2.inl\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis✝ : IsWellOrder β s\nb : β\na : α\nh :\n  s b\n    (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n          (_ :\n            ∀ (a b : α ⊕ PUnit),\n              Sum.Lex r EmptyRelation a b →\n                s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n      (Sum.inl a))\nthis : ∃ a', ↑{ toRelEmbedding := f, top := t, down' := hf }.toRelEmbedding a' = b\n⊢ ∃ a',\n    ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a' =\n      b\n[PROOFSTEP]\ncases' this with w h\n[GOAL]\ncase refine'_2.inl.intro\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na✝ b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\na : α\nh✝ :\n  s b\n    (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n          (_ :\n            ∀ (a b : α ⊕ PUnit),\n              Sum.Lex r EmptyRelation a b →\n                s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n      (Sum.inl a))\nw : α\nh : ↑{ toRelEmbedding := f, top := t, down' := hf }.toRelEmbedding w = b\n⊢ ∃ a',\n    ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a' =\n      b\n[PROOFSTEP]\nexact ⟨Sum.inl w, h⟩\n[GOAL]\ncase refine'_2.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\nval✝ : PUnit\n⊢ s b\n      (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        (Sum.inr val✝)) →\n    ∃ a',\n      ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n              (_ :\n                ∀ (a b : α ⊕ PUnit),\n                  Sum.Lex r EmptyRelation a b →\n                    s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n          a' =\n        b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_2.inr\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\nval✝ : PUnit\nh :\n  s b\n    (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n          (_ :\n            ∀ (a b : α ⊕ PUnit),\n              Sum.Lex r EmptyRelation a b →\n                s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n      (Sum.inr val✝))\n⊢ ∃ a',\n    ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a' =\n      b\n[PROOFSTEP]\ncases' (hf b).1 h with w h\n[GOAL]\ncase refine'_2.inr.intro\nα✝ : Type ?u.169275\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt✝ : γ → γ → Prop\na b✝ : Ordinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nhr : IsWellOrder α r\nβ : Type u_3\ns : β → β → Prop\nhs : IsWellOrder β s\nx✝ : type r < type s\nf : r ↪r s\nt : β\nhf : ∀ (b : β), s b t ↔ ∃ a, ↑f a = b\nthis : IsWellOrder β s\nb : β\nval✝ : PUnit\nh✝ :\n  s b\n    (↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n          (_ :\n            ∀ (a b : α ⊕ PUnit),\n              Sum.Lex r EmptyRelation a b →\n                s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n      (Sum.inr val✝))\nw : α\nh : ↑f w = b\n⊢ ∃ a',\n    ↑(RelEmbedding.ofMonotone (fun t_1 => Sum.rec (↑f) (fun x => t) t_1)\n            (_ :\n              ∀ (a b : α ⊕ PUnit),\n                Sum.Lex r EmptyRelation a b →\n                  s ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) a) ((fun t_1 => Sum.rec (↑f) (fun x => t) t_1) b)))\n        a' =\n      b\n[PROOFSTEP]\nexact ⟨Sum.inl w, h⟩\n[GOAL]\nα : Type ?u.179391\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ succ 1 = 2\n[PROOFSTEP]\nunfold instOfNat OfNat.ofNat\n[GOAL]\nα : Type ?u.179391\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ succ One.toOfNat1.1 = { ofNat := ↑2 }.1\n[PROOFSTEP]\nsimpa using by rfl\n[GOAL]\nα : Type ?u.179391\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ One.toOfNat1.1 = 1\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.180733\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ 1 ≤ o ↔ 0 < o\n[PROOFSTEP]\nrw [← succ_zero, succ_le_iff]\n[GOAL]\nα : Type ?u.181133\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ 1 ≤ o ↔ o ≠ 0\n[PROOFSTEP]\nrw [one_le_iff_pos, Ordinal.pos_iff_ne_zero]\n[GOAL]\nα : Type ?u.181722\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_3}\n⊢ a < 1 ↔ a = 0\n[PROOFSTEP]\nsimpa using @lt_succ_bot_iff _ _ _ a _ _\n[GOAL]\nα : Type ?u.182584\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : Ordinal.{u_3}\n⊢ a ≤ 1 ↔ a = 0 ∨ a = 1\n[PROOFSTEP]\nsimpa using @le_succ_bot_iff _ _ _ a _\n[GOAL]\nα : Type ?u.183756\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ card (succ o) = card o + 1\n[PROOFSTEP]\nsimp only [← add_one_eq_succ, card_add, card_one]\n[GOAL]\nα : Type ?u.184700\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ 0 ∈ Iio 1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ 0 < type fun x x_1 => x < x_1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : (Quotient.out 1).α\n⊢ a = default\n[PROOFSTEP]\nunfold default\n[GOAL]\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : (Quotient.out 1).α\n⊢ a = { default := enum (fun x x_1 => x < x_1) 0 (_ : 0 < type fun x x_1 => x < x_1) }.1\n[PROOFSTEP]\nrw [← @enum_typein _ (· < ·) (isWellOrder_out_lt _) a]\n[GOAL]\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : (Quotient.out 1).α\n⊢ enum (fun x x_1 => x < x_1) (typein (fun x x_1 => x < x_1) a)\n      (_ : typein (fun x x_1 => x < x_1) a < type fun x x_1 => x < x_1) =\n    { default := enum (fun x x_1 => x < x_1) 0 (_ : 0 < type fun x x_1 => x < x_1) }.1\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_o\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : (Quotient.out 1).α\n⊢ typein (fun x x_1 => x < x_1) a = 0\n[PROOFSTEP]\nrw [← lt_one_iff_zero]\n[GOAL]\ncase e_o\nα : Type ?u.185352\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na : (Quotient.out 1).α\n⊢ typein (fun x x_1 => x < x_1) a < 1\n[PROOFSTEP]\napply typein_lt_self\n[GOAL]\nα : Type ?u.187460\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nx : (Quotient.out 1).α\n⊢ 0 < type fun x x_1 => x < x_1\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.188563\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nx : (Quotient.out 1).α\n⊢ typein (fun x x_1 => x < x_1) x = 0\n[PROOFSTEP]\nrw [one_out_eq x, typein_enum]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nx x' : α\n⊢ typein r x ≤ typein r x' ↔ ¬r x' x\n[PROOFSTEP]\nrw [← not_lt, typein_lt_typein]\n[GOAL]\nα : Type ?u.190090\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nx x' : (Quotient.out o).α\n⊢ typein (fun x x_1 => x < x_1) x ≤ typein (fun x x_1 => x < x_1) x' ↔ x ≤ x'\n[PROOFSTEP]\nrw [typein_le_typein]\n[GOAL]\nα : Type ?u.190090\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nx x' : (Quotient.out o).α\n⊢ ¬x' < x ↔ x ≤ x'\n[PROOFSTEP]\nexact not_lt\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\no o' : Ordinal.{u_3}\nho : o < type r\nho' : o' < type r\n⊢ ¬r (enum r o' ho') (enum r o ho) ↔ o ≤ o'\n[PROOFSTEP]\nrw [← @not_lt _ _ o' o, enum_lt_enum ho']\n[GOAL]\nα : Type ?u.192624\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\na o o' : Ordinal.{u_3}\nho : o < type fun x x_1 => x < x_1\nho' : o' < type fun x x_1 => x < x_1\n⊢ enum (fun x x_1 => x < x_1) o ho ≤ enum (fun x x_1 => x < x_1) o' ho' ↔ o ≤ o'\n[PROOFSTEP]\nrw [← @enum_le_enum _ (· < ·) (isWellOrder_out_lt _), ← not_lt]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nh0 : 0 < type r\na : α\n⊢ ¬r a (enum r 0 h0)\n[PROOFSTEP]\nrw [← enum_typein r a, enum_le_enum r]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nh0 : 0 < type r\na : α\n⊢ 0 ≤ typein r a\n[PROOFSTEP]\napply Ordinal.zero_le\n[GOAL]\nα : Type ?u.196508\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.196642}\nh0 : 0 < o\na : (Quotient.out o).α\n⊢ 0 < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\nα : Type ?u.196508\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nh0 : 0 < o\na : (Quotient.out o).α\n⊢ enum (fun x x_1 => x < x_1) 0 (_ : 0 < type fun x x_1 => x < x_1) ≤ a\n[PROOFSTEP]\nrw [← not_lt]\n[GOAL]\nα : Type ?u.196508\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nh0 : 0 < o\na : (Quotient.out o).α\n⊢ ¬a < enum (fun x x_1 => x < x_1) 0 (_ : 0 < type fun x x_1 => x < x_1)\n[PROOFSTEP]\napply enum_zero_le\n[GOAL]\nα : Type ?u.197714\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.197839}\na : (Quotient.out (succ o)).α\n⊢ o < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [type_lt]\n[GOAL]\nα : Type ?u.197714\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.197839}\na : (Quotient.out (succ o)).α\n⊢ o < succ o\n[PROOFSTEP]\nexact lt_succ o\n[GOAL]\nα : Type ?u.197714\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\na : (Quotient.out (succ o)).α\n⊢ a ≤ enum (fun x x_1 => x < x_1) o (_ : o < type fun x x_1 => x < x_1)\n[PROOFSTEP]\nrw [← @enum_typein _ (· < ·) (isWellOrder_out_lt _) a, enum_le_enum', ← lt_succ_iff]\n[GOAL]\nα : Type ?u.197714\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\na : (Quotient.out (succ o)).α\n⊢ typein (fun x x_1 => x < x_1) a < succ o\n[PROOFSTEP]\napply typein_lt_self\n[GOAL]\nα : Type ?u.201785\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.203623}\nx : ↑(Iio o)\n⊢ ↑x < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrw [type_lt]\n[GOAL]\nα : Type ?u.201785\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.203623}\nx : ↑(Iio o)\n⊢ ↑x < o\n[PROOFSTEP]\nexact x.2\n[GOAL]\nα : Type ?u.201785\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.203623}\n⊢ ∀ {a b : ↑(Iio o)},\n    ↑{ toFun := fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1),\n              invFun := fun x =>\n                { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) },\n              left_inv :=\n                (_ :\n                  ∀ (x : ↑(Iio o)),\n                    (fun x =>\n                          { val := typein (fun x x_1 => x < x_1) x,\n                            property := (_ : typein (fun x x_1 => x < x_1) x < o) })\n                        ((fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1)) x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (h : (Quotient.out o).α),\n                    enum (fun x x_1 => x < x_1) (typein (fun x x_1 => x < x_1) h)\n                        (_ : typein (fun x x_1 => x < x_1) h < type fun x x_1 => x < x_1) =\n                      h) }\n          a ≤\n        ↑{ toFun := fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1),\n              invFun := fun x =>\n                { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) },\n              left_inv :=\n                (_ :\n                  ∀ (x : ↑(Iio o)),\n                    (fun x =>\n                          { val := typein (fun x x_1 => x < x_1) x,\n                            property := (_ : typein (fun x x_1 => x < x_1) x < o) })\n                        ((fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1)) x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (h : (Quotient.out o).α),\n                    enum (fun x x_1 => x < x_1) (typein (fun x x_1 => x < x_1) h)\n                        (_ : typein (fun x x_1 => x < x_1) h < type fun x x_1 => x < x_1) =\n                      h) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nrintro ⟨a, _⟩ ⟨b, _⟩\n[GOAL]\ncase mk.mk\nα : Type ?u.201785\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no a : Ordinal.{?u.203623}\nproperty✝¹ : a ∈ Iio o\nb : Ordinal.{?u.203623}\nproperty✝ : b ∈ Iio o\n⊢ ↑{ toFun := fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1),\n            invFun := fun x =>\n              { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Iio o)),\n                  (fun x =>\n                        { val := typein (fun x x_1 => x < x_1) x,\n                          property := (_ : typein (fun x x_1 => x < x_1) x < o) })\n                      ((fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1)) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (h : (Quotient.out o).α),\n                  enum (fun x x_1 => x < x_1) (typein (fun x x_1 => x < x_1) h)\n                      (_ : typein (fun x x_1 => x < x_1) h < type fun x x_1 => x < x_1) =\n                    h) }\n        { val := a, property := property✝¹ } ≤\n      ↑{ toFun := fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1),\n            invFun := fun x =>\n              { val := typein (fun x x_1 => x < x_1) x, property := (_ : typein (fun x x_1 => x < x_1) x < o) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Iio o)),\n                  (fun x =>\n                        { val := typein (fun x x_1 => x < x_1) x,\n                          property := (_ : typein (fun x x_1 => x < x_1) x < o) })\n                      ((fun x => enum (fun x x_1 => x < x_1) ↑x (_ : ↑x < type fun x x_1 => x < x_1)) x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (h : (Quotient.out o).α),\n                  enum (fun x x_1 => x < x_1) (typein (fun x x_1 => x < x_1) h)\n                      (_ : typein (fun x x_1 => x < x_1) h < type fun x x_1 => x < x_1) =\n                    h) }\n        { val := b, property := property✝ } ↔\n    { val := a, property := property✝¹ } ≤ { val := b, property := property✝ }\n[PROOFSTEP]\napply enum_le_enum'\n[GOAL]\nα : Type ?u.208873\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{?u.208900}\nho : 0 < o\n⊢ 0 < type fun x x_1 => x < x_1\n[PROOFSTEP]\nrwa [type_lt]\n[GOAL]\nα : Type ?u.211339\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ∀ (b : Ordinal.{max (u + 1) v}), b < univ ↔ ∃ a, ↑initialSeg.toRelEmbedding a = b\n[PROOFSTEP]\nrefine' fun b => inductionOn b _\n[GOAL]\nα : Type ?u.211339\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\n⊢ ∀ (α : Type (max (u + 1) v)) (r : α → α → Prop) [inst : IsWellOrder α r],\n    type r < univ ↔ ∃ a, ↑initialSeg.toRelEmbedding a = type r\n[PROOFSTEP]\nintro β s _\n[GOAL]\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\n⊢ type s < univ ↔ ∃ a, ↑initialSeg.toRelEmbedding a = type s\n[PROOFSTEP]\nrw [univ, ← lift_umax]\n[GOAL]\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\n⊢ type s < lift (type fun x x_1 => x < x_1) ↔ ∃ a, ↑initialSeg.toRelEmbedding a = type s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\n⊢ type s < lift (type fun x x_1 => x < x_1) → ∃ a, ↑initialSeg.toRelEmbedding a = type s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\n⊢ (∃ a, ↑initialSeg.toRelEmbedding a = type s) → type s < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : type s < lift (type fun x x_1 => x < x_1)\n⊢ ∃ a, ↑initialSeg.toRelEmbedding a = type s\n[PROOFSTEP]\nrw [← lift_id (type s)] at h ⊢\n[GOAL]\ncase mp\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\n⊢ ∃ a, ↑initialSeg.toRelEmbedding a = lift (type s)\n[PROOFSTEP]\ncases' lift_type_lt.{_, _, v}.1 h with f\n[GOAL]\ncase mp.intro\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ≺i fun x x_1 => x < x_1\n⊢ ∃ a, ↑initialSeg.toRelEmbedding a = lift (type s)\n[PROOFSTEP]\ncases' f with f a hf\n[GOAL]\ncase mp.intro.mk\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nhf : ∀ (b : Ordinal.{u}), b < a ↔ ∃ a, ↑f a = b\n⊢ ∃ a, ↑initialSeg.toRelEmbedding a = lift (type s)\n[PROOFSTEP]\nexists a\n[GOAL]\ncase mp.intro.mk\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nhf : ∀ (b : Ordinal.{u}), b < a ↔ ∃ a, ↑f a = b\n⊢ ↑initialSeg.toRelEmbedding a = lift (type s)\n[PROOFSTEP]\nrevert hf\n[GOAL]\ncase mp.intro.mk\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\n⊢ (∀ (b : Ordinal.{u}), b < a ↔ ∃ a, ↑f a = b) → ↑initialSeg.toRelEmbedding a = lift (type s)\n[PROOFSTEP]\nrefine inductionOn a ?_\n[GOAL]\ncase mp.intro.mk\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\n⊢ ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r],\n    (∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b) → ↑initialSeg.toRelEmbedding (type r) = lift (type s)\n[PROOFSTEP]\nintro α r _ hf\n[GOAL]\ncase mp.intro.mk\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\n⊢ ↑initialSeg.toRelEmbedding (type r) = lift (type s)\n[PROOFSTEP]\nrefine' lift_type_eq.{u, max (u + 1) v, max (u + 1) v}.2 ⟨(RelIso.ofSurjective (RelEmbedding.ofMonotone _ _) _).symm⟩\n[GOAL]\ncase mp.intro.mk.refine'_1\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\n⊢ β → α\n[PROOFSTEP]\nexact fun b => enum r (f b) ((hf _).2 ⟨_, rfl⟩)\n[GOAL]\ncase mp.intro.mk.refine'_2\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\n⊢ ∀ (a b : β), s a b → r (enum r (↑f a) (_ : ↑f a < type r)) (enum r (↑f b) (_ : ↑f b < type r))\n[PROOFSTEP]\nrefine' fun a b h => (typein_lt_typein r).1 _\n[GOAL]\ncase mp.intro.mk.refine'_2\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb✝ : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh✝ : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na b : β\nh : s a b\n⊢ typein r (enum r (↑f a) (_ : ↑f a < type r)) < typein r (enum r (↑f b) (_ : ↑f b < type r))\n[PROOFSTEP]\nrw [typein_enum, typein_enum]\n[GOAL]\ncase mp.intro.mk.refine'_2\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb✝ : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh✝ : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na✝ : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na b : β\nh : s a b\n⊢ ↑f a < ↑f b\n[PROOFSTEP]\nexact f.map_rel_iff.2 h\n[GOAL]\ncase mp.intro.mk.refine'_3\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\n⊢ Surjective\n    ↑(RelEmbedding.ofMonotone (fun b => enum r (↑f b) (_ : ↑f b < type r))\n        (_ : ∀ (a b : β), s a b → r (enum r (↑f a) (_ : ↑f a < type r)) (enum r (↑f b) (_ : ↑f b < type r))))\n[PROOFSTEP]\nintro a'\n[GOAL]\ncase mp.intro.mk.refine'_3\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na' : α\n⊢ ∃ a,\n    ↑(RelEmbedding.ofMonotone (fun b => enum r (↑f b) (_ : ↑f b < type r))\n            (_ : ∀ (a b : β), s a b → r (enum r (↑f a) (_ : ↑f a < type r)) (enum r (↑f b) (_ : ↑f b < type r))))\n        a =\n      a'\n[PROOFSTEP]\ncases' (hf _).1 (typein_lt_type _ a') with b e\n[GOAL]\ncase mp.intro.mk.refine'_3.intro\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb✝ : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na' : α\nb : β\ne : ↑f b = typein r a'\n⊢ ∃ a,\n    ↑(RelEmbedding.ofMonotone (fun b => enum r (↑f b) (_ : ↑f b < type r))\n            (_ : ∀ (a b : β), s a b → r (enum r (↑f a) (_ : ↑f a < type r)) (enum r (↑f b) (_ : ↑f b < type r))))\n        a =\n      a'\n[PROOFSTEP]\nexists b\n[GOAL]\ncase mp.intro.mk.refine'_3.intro\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb✝ : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na' : α\nb : β\ne : ↑f b = typein r a'\n⊢ ↑(RelEmbedding.ofMonotone (fun b => enum r (↑f b) (_ : ↑f b < type r))\n          (_ : ∀ (a b : β), s a b → r (enum r (↑f a) (_ : ↑f a < type r)) (enum r (↑f b) (_ : ↑f b < type r))))\n      b =\n    a'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mp.intro.mk.refine'_3.intro\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb✝ : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\nh : lift (type s) < lift (type fun x x_1 => x < x_1)\nf : s ↪r fun x x_1 => x < x_1\na : Ordinal.{u}\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nhf : ∀ (b : Ordinal.{u}), b < type r ↔ ∃ a, ↑f a = b\na' : α\nb : β\ne : ↑f b = typein r a'\n⊢ enum r (↑f b) (_ : ↑f b < type r) = a'\n[PROOFSTEP]\nsimp [e]\n[GOAL]\ncase mpr\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\nh : ∃ a, ↑initialSeg.toRelEmbedding a = type s\n⊢ type s < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\ncases' h with a e\n[GOAL]\ncase mpr.intro\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\na : Ordinal.{u}\ne : ↑initialSeg.toRelEmbedding a = type s\n⊢ type s < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\nrw [← e]\n[GOAL]\ncase mpr.intro\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\na : Ordinal.{u}\ne : ↑initialSeg.toRelEmbedding a = type s\n⊢ ↑initialSeg.toRelEmbedding a < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\nrefine inductionOn a ?_\n[GOAL]\ncase mpr.intro\nα : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝ : IsWellOrder β s\na : Ordinal.{u}\ne : ↑initialSeg.toRelEmbedding a = type s\n⊢ ∀ (α : Type u) (r : α → α → Prop) [inst : IsWellOrder α r],\n    ↑initialSeg.toRelEmbedding (type r) < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\nintro α r _\n[GOAL]\ncase mpr.intro\nα✝ : Type ?u.211339\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nb : Ordinal.{max (u + 1) v}\nβ : Type (max (u + 1) v)\ns : β → β → Prop\ninst✝¹ : IsWellOrder β s\na : Ordinal.{u}\ne : ↑initialSeg.toRelEmbedding a = type s\nα : Type u\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ ↑initialSeg.toRelEmbedding (type r) < lift (type fun x x_1 => x < x_1)\n[PROOFSTEP]\nexact lift_type_lt.{u, u + 1, max (u + 1) v}.2 ⟨typein.principalSeg r⟩\n[GOAL]\nα : Type ?u.221999\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ principalSeg.top = type fun x x_1 => x < x_1\n[PROOFSTEP]\nsimp only [lift.principalSeg_top, univ_id]\n[GOAL]\nα : Type ?u.222301\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\n⊢ card (type (?m.222405 o)) = card o\n[PROOFSTEP]\nrw [Ordinal.type_lt]\n[GOAL]\nα : Type ?u.222528\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\n⊢ ∀ (a b : Type u), Setoid.r a b → F a = F b\n[PROOFSTEP]\nsuffices : ∀ {α β}, α ≈ β → F α ≤ F β\n[GOAL]\nα : Type ?u.222528\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\nthis : ∀ {α β : Type u}, α ≈ β → F α ≤ F β\n⊢ ∀ (a b : Type u), Setoid.r a b → F a = F b\ncase this\nα : Type ?u.222528\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\n⊢ ∀ {α β : Type u}, α ≈ β → F α ≤ F β\n[PROOFSTEP]\nexact fun α β h => (this h).antisymm (this (Setoid.symm h))\n[GOAL]\ncase this\nα : Type ?u.222528\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\n⊢ ∀ {α β : Type u}, α ≈ β → F α ≤ F β\n[PROOFSTEP]\nrintro α β ⟨f⟩\n[GOAL]\ncase this.intro\nα✝ : Type ?u.222528\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\nα β : Type u\nf : α ≃ β\n⊢ F α ≤ F β\n[PROOFSTEP]\nrefine' le_ciInf_iff'.2 fun i => _\n[GOAL]\ncase this.intro\nα✝ : Type ?u.222528\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\nα β : Type u\nf : α ≃ β\ni : { r // IsWellOrder β r }\n⊢ F α ≤ type ↑i\n[PROOFSTEP]\nhaveI := @RelEmbedding.isWellOrder _ _ (f ⁻¹'o i.1) _ (↑(RelIso.preimage f i.1)) i.2\n[GOAL]\ncase this.intro\nα✝ : Type ?u.222528\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nF : Type u → Ordinal.{u} := fun α => ⨅ (r : { r // IsWellOrder α r }), type ↑r\nα β : Type u\nf : α ≃ β\ni : { r // IsWellOrder β r }\nthis : IsWellOrder α (↑f ⁻¹'o ↑i)\n⊢ F α ≤ type ↑i\n[PROOFSTEP]\nexact\n  (ciInf_le' _ (Subtype.mk (f ⁻¹'o i.val) (@RelEmbedding.isWellOrder _ _ _ _ (↑(RelIso.preimage f i.1)) i.2))).trans_eq\n    (Quot.sound ⟨RelIso.preimage f i.1⟩)\n[GOAL]\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\n⊢ ord #α ≤ type s ↔ #α ≤ card (type s)\n[PROOFSTEP]\nlet ⟨r, _, e⟩ := ord_eq α\n[GOAL]\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ ord #α ≤ type s ↔ #α ≤ card (type s)\n[PROOFSTEP]\nskip\n[GOAL]\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ ord #α ≤ type s ↔ #α ≤ card (type s)\n[PROOFSTEP]\nsimp only [card_type]\n[GOAL]\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ ord #α ≤ type s ↔ #α ≤ #β\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ ord #α ≤ type s → #α ≤ #β\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ #α ≤ #β → ord #α ≤ type s\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nh : ord #α ≤ type s\n⊢ #α ≤ #β\n[PROOFSTEP]\nrw [e] at h \n[GOAL]\ncase mp\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nh : type r ≤ type s\n⊢ #α ≤ #β\n[PROOFSTEP]\nexact\n  let ⟨f⟩ := h\n  ⟨f.toEmbedding⟩\n[GOAL]\ncase mpr\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nh : #α ≤ #β\n⊢ ord #α ≤ type s\n[PROOFSTEP]\ncases' h with f\n[GOAL]\ncase mpr.intro\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nf : α ↪ β\n⊢ ord #α ≤ type s\n[PROOFSTEP]\nhave g := RelEmbedding.preimage f s\n[GOAL]\ncase mpr.intro\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nf : α ↪ β\ng : ↑f ⁻¹'o s ↪r s\n⊢ ord #α ≤ type s\n[PROOFSTEP]\nhaveI := RelEmbedding.isWellOrder g\n[GOAL]\ncase mpr.intro\nα✝ : Type ?u.225629\nβ✝ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns✝ : β✝ → β✝ → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\no : Ordinal.{u_3}\nα β : Type u_3\ns : β → β → Prop\nx✝ : IsWellOrder β s\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\nf : α ↪ β\ng : ↑f ⁻¹'o s ↪r s\nthis : IsWellOrder α (↑f ⁻¹'o s)\n⊢ ord #α ≤ type s\n[PROOFSTEP]\nexact le_trans (ord_le_type _) g.ordinal_type_le\n[GOAL]\nα✝ : Type ?u.226993\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\nα : Type u_3\n⊢ card (ord (Quotient.mk isEquivalent α)) = Quotient.mk isEquivalent α\n[PROOFSTEP]\nlet ⟨r, _, e⟩ := ord_eq α\n[GOAL]\nα✝ : Type ?u.226993\nβ : Type u_1\nγ : Type u_2\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\nα : Type u_3\nr : α → α → Prop\nw✝ : IsWellOrder α r\ne : ord #α = type r\n⊢ card (ord (Quotient.mk isEquivalent α)) = Quotient.mk isEquivalent α\n[PROOFSTEP]\nsimp only [mk'_def, e, card_type]\n[GOAL]\nα : Type ?u.229821\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\n⊢ ↑n ≤ ord ↑n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type ?u.229821\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ↑Nat.zero ≤ ord ↑Nat.zero\n[PROOFSTEP]\napply Ordinal.zero_le\n[GOAL]\ncase succ\nα : Type ?u.229821\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\nIH : ↑n ≤ ord ↑n\n⊢ ↑(Nat.succ n) ≤ ord ↑(Nat.succ n)\n[PROOFSTEP]\nexact succ_le_of_lt (IH.trans_lt <| ord_lt_ord.2 <| natCast_lt.2 (Nat.lt_succ_self n))\n[GOAL]\nα : Type ?u.230856\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ord 1 = 1\n[PROOFSTEP]\nsimpa using ord_nat 1\n[GOAL]\nα : Type ?u.231632\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{v}\n⊢ Ordinal.lift (ord c) = ord (lift c)\n[PROOFSTEP]\nrefine' le_antisymm (le_of_forall_lt fun a ha => _) _\n[GOAL]\ncase refine'_1\nα : Type ?u.231632\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{v}\na : Ordinal.{max v u}\nha : a < Ordinal.lift (ord c)\n⊢ a < ord (lift c)\n[PROOFSTEP]\nrcases Ordinal.lt_lift_iff.1 ha with ⟨a, rfl, _⟩\n[GOAL]\ncase refine'_1.intro.intro\nα : Type ?u.231632\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{v}\na : Ordinal.{v}\nright✝ : a < ord c\nha : Ordinal.lift a < Ordinal.lift (ord c)\n⊢ Ordinal.lift a < ord (lift c)\n[PROOFSTEP]\nrwa [lt_ord, ← lift_card, lift_lt, ← lt_ord, ← Ordinal.lift_lt]\n[GOAL]\ncase refine'_2\nα : Type ?u.231632\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{v}\n⊢ ord (lift c) ≤ Ordinal.lift (ord c)\n[PROOFSTEP]\nrw [ord_le, ← lift_card, card_ord]\n[GOAL]\nα : Type ?u.232210\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\n⊢ #(Quotient.out (ord c)).α = c\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nx : α\nh : ord #α = type r\n⊢ card (typein r x) < #α\n[PROOFSTEP]\nrw [← lt_ord, h]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝ : IsWellOrder α r\nx : α\nh : ord #α = type r\n⊢ typein r x < type r\n[PROOFSTEP]\napply typein_lt_type\n[GOAL]\nα : Type ?u.232559\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\nx : (Quotient.out (ord c)).α\n⊢ card (typein (fun x x_1 => x < x_1) x) < c\n[PROOFSTEP]\nrw [← lt_ord]\n[GOAL]\nα : Type ?u.232559\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u_3}\nx : (Quotient.out (ord c)).α\n⊢ typein (fun x x_1 => x < x_1) x < ord c\n[PROOFSTEP]\napply typein_lt_self\n[GOAL]\nα : Type ?u.233731\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ Injective ord\n[PROOFSTEP]\nintro c c' h\n[GOAL]\nα : Type ?u.233731\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc c' : Cardinal.{u_3}\nh : ord c = ord c'\n⊢ c = c'\n[PROOFSTEP]\nrw [← card_ord c, ← card_ord c', h]\n[GOAL]\nα : Type ?u.236029\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\n⊢ lift c < univ\n[PROOFSTEP]\nsimpa only [lift.principalSeg_coe, lift_ord, lift_succ, ord_le, succ_le_iff] using\n  le_of_lt (lift.principalSeg.{u, u + 1}.lt_top (succ c).ord)\n[GOAL]\nα : Type ?u.236679\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\n⊢ lift c < univ\n[PROOFSTEP]\nhave := lift_lt.{_, max (u + 1) v}.2 (lift_lt_univ c)\n[GOAL]\nα : Type ?u.236679\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nthis : lift (lift c) < lift univ\n⊢ lift c < univ\n[PROOFSTEP]\nrw [lift_lift, lift_univ, univ_umax.{u, v}] at this \n[GOAL]\nα : Type ?u.236679\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u}\nthis : lift c < univ\n⊢ lift c < univ\n[PROOFSTEP]\nexact this\n[GOAL]\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\n⊢ ord univ = Ordinal.univ\n[PROOFSTEP]\nrefine' le_antisymm (ord_card_le _) <| le_of_forall_lt fun o h => lt_ord.2 ?_\n[GOAL]\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{max (u + 1) v}\nh : o < Ordinal.univ\n⊢ card o < univ\n[PROOFSTEP]\nhave := lift.principalSeg.{u, v}.down.1 (by simpa only [lift.principalSeg_coe] using h)\n[GOAL]\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{max (u + 1) v}\nh : o < Ordinal.univ\n⊢ ?m.237120 < lift.principalSeg.top\n[PROOFSTEP]\nsimpa only [lift.principalSeg_coe] using h\n[GOAL]\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{max (u + 1) v}\nh : o < Ordinal.univ\nthis : ∃ a, ↑lift.principalSeg.toRelEmbedding a = o\n⊢ card o < univ\n[PROOFSTEP]\nrcases this with ⟨o, h'⟩\n[GOAL]\ncase intro\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no✝ : Ordinal.{max (u + 1) v}\nh : o✝ < Ordinal.univ\no : Ordinal.{u}\nh' : ↑lift.principalSeg.toRelEmbedding o = o✝\n⊢ card o✝ < univ\n[PROOFSTEP]\nrw [← h', lift.principalSeg_coe, ← lift_card]\n[GOAL]\ncase intro\nα : Type ?u.236823\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no✝ : Ordinal.{max (u + 1) v}\nh : o✝ < Ordinal.univ\no : Ordinal.{u}\nh' : ↑lift.principalSeg.toRelEmbedding o = o✝\n⊢ lift (card o) < univ\n[PROOFSTEP]\napply lift_lt_univ'\n[GOAL]\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nhave := ord_lt_ord.2 h\n[GOAL]\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis : ord c < ord univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nrw [ord_univ] at this \n[GOAL]\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis : ord c < Ordinal.univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\ncases' lift.principalSeg.{u, u + 1}.down.1 (by simpa only [lift.principalSeg_top]) with o e\n[GOAL]\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis : ord c < Ordinal.univ\n⊢ ?m.237589 < lift.principalSeg.top\n[PROOFSTEP]\nsimpa only [lift.principalSeg_top]\n[GOAL]\ncase intro\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis : ord c < Ordinal.univ\no : Ordinal.{u}\ne : ↑lift.principalSeg.toRelEmbedding o = ord c\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nhave := card_ord c\n[GOAL]\ncase intro\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis✝ : ord c < Ordinal.univ\no : Ordinal.{u}\ne : ↑lift.principalSeg.toRelEmbedding o = ord c\nthis : card (ord c) = c\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nrw [← e, lift.principalSeg_coe, ← lift_card] at this \n[GOAL]\ncase intro\nα : Type ?u.237323\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{u + 1}\nh : c < univ\nthis✝ : ord c < Ordinal.univ\no : Ordinal.{u}\ne : ↑lift.principalSeg.toRelEmbedding o = ord c\nthis : lift (card o) = c\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nexact ⟨_, this.symm⟩\n[GOAL]\nα : Type ?u.237859\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{max (u + 1) v}\nh : c < univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nlet ⟨a, e, h'⟩ := lt_lift_iff.1 h\n[GOAL]\nα : Type ?u.237859\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{max (u + 1) v}\nh : c < univ\na : Cardinal.{u + 1}\ne : lift a = c\nh' : a < #Ordinal.{u}\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nrw [← univ_id] at h' \n[GOAL]\nα : Type ?u.237859\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{max (u + 1) v}\nh : c < univ\na : Cardinal.{u + 1}\ne : lift a = c\nh' : a < univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nrcases lt_univ.{u}.1 h' with ⟨c', rfl⟩\n[GOAL]\ncase intro\nα : Type ?u.237859\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{max (u + 1) v}\nh : c < univ\nc' : Cardinal.{u}\ne : lift (lift c') = c\nh' : lift c' < univ\n⊢ ∃ c', c = lift c'\n[PROOFSTEP]\nexact ⟨c', by simp only [e.symm, lift_lift]⟩\n[GOAL]\nα : Type ?u.237859\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nc : Cardinal.{max (u + 1) v}\nh : c < univ\nc' : Cardinal.{u}\ne : lift (lift c') = c\nh' : lift c' < univ\n⊢ c = lift c'\n[PROOFSTEP]\nsimp only [e.symm, lift_lift]\n[GOAL]\nα✝ : Type ?u.238384\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\n⊢ Small.{v, u} α ↔ lift #α < univ\n[PROOFSTEP]\nrw [lt_univ']\n[GOAL]\nα✝ : Type ?u.238384\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\n⊢ Small.{v, u} α ↔ ∃ c', lift #α = lift c'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα✝ : Type ?u.238384\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\n⊢ Small.{v, u} α → ∃ c', lift #α = lift c'\n[PROOFSTEP]\nrintro ⟨β, e⟩\n[GOAL]\ncase mp.mk.intro\nα✝ : Type ?u.238384\nβ✝ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β✝ → β✝ → Prop\nt : γ → γ → Prop\nα : Type u\nβ : Type v\ne : Nonempty (α ≃ β)\n⊢ ∃ c', lift #α = lift c'\n[PROOFSTEP]\nexact ⟨#β, lift_mk_eq.{u, _, v + 1}.2 e⟩\n[GOAL]\ncase mpr\nα✝ : Type ?u.238384\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\n⊢ (∃ c', lift #α = lift c') → Small.{v, u} α\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase mpr.intro\nα✝ : Type ?u.238384\nβ : Type u_1\nγ : Type u_2\nr : α✝ → α✝ → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nα : Type u\nc : Cardinal.{v}\nhc : lift #α = lift c\n⊢ Small.{v, u} α\n[PROOFSTEP]\nexact ⟨⟨c.out, lift_mk_eq.{u, _, v + 1}.1 (hc.trans (congr rfl c.mk_out.symm))⟩⟩\n[GOAL]\nα : Type ?u.238720\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nn : ℕ\n⊢ ↑n ≤ card o ↔ ↑n ≤ o\n[PROOFSTEP]\nrw [← Cardinal.ord_le, Cardinal.ord_nat]\n[GOAL]\nα : Type ?u.239208\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nn : ℕ\n⊢ ↑n < card o ↔ ↑n < o\n[PROOFSTEP]\nrw [← succ_le_iff, ← succ_le_iff, ← nat_succ, nat_le_card]\n[GOAL]\nα : Type ?u.239208\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nn : ℕ\n⊢ ↑(Nat.succ n) ≤ o ↔ succ ↑n ≤ o\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.241773\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\no : Ordinal.{u_3}\nn : ℕ\n⊢ card o = ↑n ↔ o = ↑n\n[PROOFSTEP]\nsimp only [le_antisymm_iff, card_le_nat, nat_le_card]\n[GOAL]\nα : Type u_3\nβ : Type u_1\nγ : Type u_2\nr✝ : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nr : α → α → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : Fintype α\n⊢ type r = ↑(Fintype.card α)\n[PROOFSTEP]\nrw [← card_eq_nat, card_type, mk_fintype]\n[GOAL]\nα : Type ?u.243192\nβ : Type u_1\nγ : Type u_2\nr : α → α → Prop\ns : β → β → Prop\nt : γ → γ → Prop\nn : ℕ\n⊢ (type fun x x_1 => x < x_1) = ↑n\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.SetTheory.Ordinal.Basic", "llama_tokens": 78206, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6224593171945417, "lm_q2_score": 0.4301473485858429, "lm_q1q2_score": 0.26774922489378633}}
{"text": "[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\n⊢ Inhabited (ColimitType F)\n[PROOFSTEP]\ndsimp [ColimitType]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\n⊢ Inhabited (Quotient (colimitSetoid F))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\n⊢ Monoid (ColimitType F)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫ coconeMorphism F j' = coconeMorphism F j\n[PROOFSTEP]\next\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\nj j' : J\nf : j ⟶ j'\nx✝ : ↑(F.obj j)\n⊢ ↑(F.map f ≫ coconeMorphism F j') x✝ = ↑(coconeMorphism F j) x✝\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase w.a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\nj j' : J\nf : j ⟶ j'\nx✝ : ↑(F.obj j)\n⊢ Setoid.r (Prequotient.of j' (↑(F.map f) x✝)) (Prequotient.of j x✝)\n[PROOFSTEP]\napply Relation.map\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(coconeMorphism F j) x\n[PROOFSTEP]\nrw [← cocone_naturality F f]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\nj j' : J\nf : j ⟶ j'\nx : ↑(F.obj j)\n⊢ ↑(coconeMorphism F j') (↑(F.map f) x) = ↑(F.map f ≫ coconeMorphism F j') x\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\n⊢ ColimitType F → ↑s.pt\n[PROOFSTEP]\nfapply Quot.lift\n[GOAL]\ncase f\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\n⊢ Prequotient F → ↑s.pt\n[PROOFSTEP]\nexact descFunLift F s\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\n⊢ ∀ (a b : Prequotient F), Setoid.r a b → descFunLift F s a = descFunLift F s b\n[PROOFSTEP]\nintro x y r\n[GOAL]\ncase a\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : Prequotient F\nr : Setoid.r x y\n⊢ descFunLift F s x = descFunLift F s y\n[PROOFSTEP]\ninduction' r with _ _ _ _ h _ _ _ _ _ h₁ h₂ _ _ f x _ _ _ _ _ _ _ _ h _ _ _ _ h\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.refl\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s x✝ = descFunLift F s x✝\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ : Prequotient F\nx✝ : Relation F x✝¹ y✝\nh : descFunLift F s x✝¹ = descFunLift F s y✝\n⊢ descFunLift F s y✝ = descFunLift F s x✝¹\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ : Prequotient F\nx✝ : Relation F x✝¹ y✝\nh : descFunLift F s x✝¹ = descFunLift F s y✝\n⊢ descFunLift F s y✝ = descFunLift F s x✝¹\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝² y✝ z✝ : Prequotient F\nx✝¹ : Relation F x✝² y✝\nx✝ : Relation F y✝ z✝\nh₁ : descFunLift F s x✝² = descFunLift F s y✝\nh₂ : descFunLift F s y✝ = descFunLift F s z✝\n⊢ descFunLift F s x✝² = descFunLift F s z✝\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝² y✝ z✝ : Prequotient F\nx✝¹ : Relation F x✝² y✝\nx✝ : Relation F y✝ z✝\nh₁ : descFunLift F s x✝² = descFunLift F s y✝\nh₂ : descFunLift F s y✝ = descFunLift F s z✝\n⊢ descFunLift F s x✝² = descFunLift F s z✝\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx✝ y : Prequotient F\nj✝ j'✝ : J\nf : j✝ ⟶ j'✝\nx : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j'✝ (↑(F.map f) x)) = descFunLift F s (Prequotient.of j✝ x)\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx✝ y : Prequotient F\nj✝ j'✝ : J\nf : j✝ ⟶ j'✝\nx : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j'✝ (↑(F.map f) x)) = descFunLift F s (Prequotient.of j✝ x)\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ y✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (x✝ * y✝)) = descFunLift F s (mul (Prequotient.of j✝ x✝) (Prequotient.of j✝ y✝))\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\nx✝ y✝ : ↑(F.obj j✝)\n⊢ descFunLift F s (Prequotient.of j✝ (x✝ * y✝)) = descFunLift F s (mul (Prequotient.of j✝ x✝) (Prequotient.of j✝ y✝))\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\n⊢ descFunLift F s (Prequotient.of j✝ 1) = descFunLift F s one\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : Prequotient F\nj✝ : J\n⊢ descFunLift F s (Prequotient.of j✝ 1) = descFunLift F s one\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nh : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (mul x✝¹ y✝) = descFunLift F s (mul x'✝ y✝)\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nh : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s (mul x✝¹ y✝) = descFunLift F s (mul x'✝ y✝)\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nh : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s (mul x✝¹ y✝) = descFunLift F s (mul x✝¹ y'✝)\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nh : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s (mul x✝¹ y✝) = descFunLift F s (mul x✝¹ y'✝)\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s (mul (mul x✝ y✝) z✝) = descFunLift F s (mul x✝ (mul y✝ z✝))\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s (mul (mul x✝ y✝) z✝) = descFunLift F s (mul x✝ (mul y✝ z✝))\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.one_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (mul one x✝) = descFunLift F s x✝\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.one_mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (mul one x✝) = descFunLift F s x✝\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.mul_one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (mul x✝ one) = descFunLift F s x✝\n[PROOFSTEP]\ntry\n  simp\n    -- symm\n[GOAL]\ncase a.mul_one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ : Prequotient F\n⊢ descFunLift F s (mul x✝ one) = descFunLift F s x✝\n[PROOFSTEP]\nsimp\n  -- symm\n[GOAL]\ncase a.symm\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ : Prequotient F\nx✝ : Relation F x✝¹ y✝\nh : descFunLift F s x✝¹ = descFunLift F s y✝\n⊢ descFunLift F s y✝ = descFunLift F s x✝¹\n[PROOFSTEP]\nexact h.symm\n[GOAL]\ncase a.trans\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝² y✝ z✝ : Prequotient F\nx✝¹ : Relation F x✝² y✝\nx✝ : Relation F y✝ z✝\nh₁ : descFunLift F s x✝² = descFunLift F s y✝\nh₂ : descFunLift F s y✝ = descFunLift F s z✝\n⊢ descFunLift F s x✝² = descFunLift F s z✝\n[PROOFSTEP]\nexact h₁.trans h₂\n[GOAL]\ncase a.map\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx✝ y : Prequotient F\nj✝ j'✝ : J\nf : j✝ ⟶ j'✝\nx : ↑(F.obj j✝)\n⊢ ↑(NatTrans.app s.ι j'✝) (↑(F.map f) x) = ↑(NatTrans.app s.ι j✝) x\n[PROOFSTEP]\nexact s.w_apply f x\n[GOAL]\ncase a.mul_1\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ x'✝ y✝ : Prequotient F\nx✝ : Relation F x✝¹ x'✝\nh : descFunLift F s x✝¹ = descFunLift F s x'✝\n⊢ descFunLift F s x✝¹ * descFunLift F s y✝ = descFunLift F s x'✝ * descFunLift F s y✝\n[PROOFSTEP]\nrw [h]\n  -- mul_2\n[GOAL]\ncase a.mul_2\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝¹ y✝ y'✝ : Prequotient F\nx✝ : Relation F y✝ y'✝\nh : descFunLift F s y✝ = descFunLift F s y'✝\n⊢ descFunLift F s x✝¹ * descFunLift F s y✝ = descFunLift F s x✝¹ * descFunLift F s y'✝\n[PROOFSTEP]\nrw [h]\n  -- mul_assoc\n[GOAL]\ncase a.mul_assoc\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y x✝ y✝ z✝ : Prequotient F\n⊢ descFunLift F s x✝ * descFunLift F s y✝ * descFunLift F s z✝ =\n    descFunLift F s x✝ * (descFunLift F s y✝ * descFunLift F s z✝)\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nx y : ↑(colimit F)\n⊢ OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =\n    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *\n      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y\n[PROOFSTEP]\ninduction x using Quot.inductionOn\n[GOAL]\ncase h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\ny : ↑(colimit F)\na✝ : Prequotient F\n⊢ OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (Quot.mk Setoid.r a✝ * y) =\n    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (Quot.mk Setoid.r a✝) *\n      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y\n[PROOFSTEP]\ninduction y using Quot.inductionOn\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\na✝¹ a✝ : Prequotient F\n⊢ OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) }\n      (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) =\n    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (Quot.mk Setoid.r a✝¹) *\n      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (Quot.mk Setoid.r a✝)\n[PROOFSTEP]\ndsimp [descFun]\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\na✝¹ a✝ : Prequotient F\n⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)\n      (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) =\n    descFunLift F s a✝¹ * descFunLift F s a✝\n[PROOFSTEP]\nrw [← quot_mul]\n[GOAL]\ncase h.h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\na✝¹ a✝ : Prequotient F\n⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)\n      (Quot.mk Setoid.r (mul a✝¹ a✝)) =\n    descFunLift F s a✝¹ * descFunLift F s a✝\n[PROOFSTEP]\nsimp only [descFunLift]\n[GOAL]\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => descMorphism F s) s\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : ↑(colimitCocone F).pt\n⊢ ↑m x = ↑((fun s => descMorphism F s) s) x\n[PROOFSTEP]\ninduction' x using Quot.inductionOn with x\n[GOAL]\ncase w.h\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx : Prequotient F\n⊢ ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction' x with j x x y hx hy\n[GOAL]\ncase w.h.of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (Prequotient.of j x))\n[PROOFSTEP]\nchange _ = s.ι.app j _\n[GOAL]\ncase w.h.of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑(NatTrans.app s.ι j) x\n[PROOFSTEP]\nrw [← w j]\n[GOAL]\ncase w.h.of\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx : ↑(F.obj j)\n⊢ ↑m (Quot.mk Setoid.r (Prequotient.of j x)) = ↑(NatTrans.app (colimitCocone F).ι j ≫ m) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w.h.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ ↑m (Quot.mk Setoid.r one) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r one)\n[PROOFSTEP]\nrw [quot_one, map_one]\n[GOAL]\ncase w.h.one\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ 1 = ↑((fun s => descMorphism F s) s) 1\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w.h.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nhx : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nhy : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑m (Quot.mk Setoid.r (mul x y)) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r (mul x y))\n[PROOFSTEP]\nrw [quot_mul, map_mul, hx, hy]\n[GOAL]\ncase w.h.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nhx : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nhy : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x) * ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y) =\n    ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x * Quot.mk Setoid.r y)\n[PROOFSTEP]\ndsimp [descMorphism, FunLike.coe, descFun]\n[GOAL]\ncase w.h.mul\nJ : Type v\ninst✝ : SmallCategory J\nF : J ⥤ MonCat\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nx y : Prequotient F\nhx : ↑m (Quot.mk Setoid.r x) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)\nhy : ↑m (Quot.mk Setoid.r y) = ↑((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)\n⊢ descFunLift F s x * descFunLift F s y =\n    Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)\n      (Quot.mk Setoid.r x * Quot.mk Setoid.r y)\n[PROOFSTEP]\nsimp only [← quot_mul, descFunLift]\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.MonCat.Colimits", "llama_tokens": 7968, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6113819732941511, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.26767739484299075}}
{"text": "[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nS : Sieve X\ng : Y ⟶ X\n⊢ S ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) X →\n    Sieve.pullback g S ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) Y\n[PROOFSTEP]\nrintro ⟨R, hR, RS⟩\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nS : Sieve X\ng : Y ⟶ X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ Sieve.pullback g S ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) Y\n[PROOFSTEP]\nrefine' ⟨_, K.pullbacks g _ hR, _⟩\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nS : Sieve X\ng : Y ⟶ X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ pullbackArrows g R ≤ (Sieve.pullback g S).arrows\n[PROOFSTEP]\nrw [← Sieve.sets_iff_generate, Sieve.pullbackArrows_comm]\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nS : Sieve X\ng : Y ⟶ X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ Sieve.pullback g (Sieve.generate R) ≤ Sieve.pullback g S\n[PROOFSTEP]\napply Sieve.pullback_monotone\n[GOAL]\ncase intro.intro.a\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nS : Sieve X\ng : Y ⟶ X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ Sieve.generate R ≤ S\n[PROOFSTEP]\nrwa [Sieve.giGenerate.gc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\n⊢ ∀ ⦃X : C⦄ ⦃S : Sieve X⦄,\n    S ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) X →\n      ∀ (R : Sieve X),\n        (∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄,\n            S.arrows f → Sieve.pullback f R ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) Y) →\n          R ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) X\n[PROOFSTEP]\nrintro X S ⟨R', hR', RS⟩ R t\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX : C\nS : Sieve X\nR' : Presieve X\nhR' : R' ∈ coverings K X\nRS : R' ≤ S.arrows\nR : Sieve X\nt : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄, S.arrows f → Sieve.pullback f R ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) Y\n⊢ R ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) X\n[PROOFSTEP]\nchoose t₁ t₂ t₃ using t\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX : C\nS : Sieve X\nR' : Presieve X\nhR' : R' ∈ coverings K X\nRS : R' ≤ S.arrows\nR : Sieve X\nt₁ : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S.arrows f → Presieve Y\nt₂ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ∈ coverings K Y\nt₃ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ≤ (Sieve.pullback f R).arrows\n⊢ R ∈ (fun X S => ∃ R, R ∈ coverings K X ∧ R ≤ S.arrows) X\n[PROOFSTEP]\nrefine' ⟨_, K.Transitive _ _ hR' fun _ f hf => t₂ (RS _ hf), _⟩\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX : C\nS : Sieve X\nR' : Presieve X\nhR' : R' ∈ coverings K X\nRS : R' ≤ S.arrows\nR : Sieve X\nt₁ : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S.arrows f → Presieve Y\nt₂ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ∈ coverings K Y\nt₃ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ≤ (Sieve.pullback f R).arrows\n⊢ (Presieve.bind R' fun x f hf => t₁ (_ : f ∈ S.arrows)) ≤ R.arrows\n[PROOFSTEP]\nrintro Y _ ⟨Z, g, f, hg, hf, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX : C\nS : Sieve X\nR' : Presieve X\nhR' : R' ∈ coverings K X\nRS : R' ≤ S.arrows\nR : Sieve X\nt₁ : ⦃Y : C⦄ → ⦃f : Y ⟶ X⦄ → S.arrows f → Presieve Y\nt₂ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ∈ coverings K Y\nt₃ : ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄ (a : S.arrows f), t₁ a ≤ (Sieve.pullback f R).arrows\nY Z : C\ng : Y ⟶ Z\nf : Z ⟶ X\nhg : R' f\nhf : t₁ (_ : f ∈ S.arrows) g\n⊢ g ≫ f ∈ R.arrows\n[PROOFSTEP]\napply t₃ (RS _ hg) _ hf\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX Y : C\nf : Y ⟶ X\ni : IsIso f\n⊢ Sieve.generate (Presieve.singleton f) = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nhR : R ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\n⊢ pullbackArrows f R ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\n[PROOFSTEP]\nsimp only [Set.mem_def, Sieve.pullbackArrows_comm]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX Y : C\nf : Y ⟶ X\nR : Presieve X\nhR : R ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\n⊢ GrothendieckTopology.sieves J Y (Sieve.pullback f (Sieve.generate R))\n[PROOFSTEP]\napply J.pullback_stable f hR\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\n⊢ Presieve.bind S Ti ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\n[PROOFSTEP]\napply J.transitive hS\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\n⊢ ∀ ⦃Y : C⦄ ⦃f : Y ⟶ X⦄,\n    (Sieve.generate S).arrows f →\n      Sieve.pullback f (Sieve.generate (Presieve.bind S Ti)) ∈ GrothendieckTopology.sieves J Y\n[PROOFSTEP]\nintro Y f\n[GOAL]\ncase h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY : C\nf : Y ⟶ X\n⊢ (Sieve.generate S).arrows f → Sieve.pullback f (Sieve.generate (Presieve.bind S Ti)) ∈ GrothendieckTopology.sieves J Y\n[PROOFSTEP]\nrintro ⟨Z, g, f, hf, rfl⟩\n[GOAL]\ncase h.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY Z : C\ng : Y ⟶ Z\nf : Z ⟶ X\nhf : S f\n⊢ Sieve.pullback (g ≫ f) (Sieve.generate (Presieve.bind S Ti)) ∈ GrothendieckTopology.sieves J Y\n[PROOFSTEP]\nrw [Sieve.pullback_comp]\n[GOAL]\ncase h.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY Z : C\ng : Y ⟶ Z\nf : Z ⟶ X\nhf : S f\n⊢ Sieve.pullback g (Sieve.pullback f (Sieve.generate (Presieve.bind S Ti))) ∈ GrothendieckTopology.sieves J Y\n[PROOFSTEP]\napply J.pullback_stable g\n[GOAL]\ncase h.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY Z : C\ng : Y ⟶ Z\nf : Z ⟶ X\nhf : S f\n⊢ Sieve.pullback f (Sieve.generate (Presieve.bind S Ti)) ∈ GrothendieckTopology.sieves J Z\n[PROOFSTEP]\napply J.superset_covering _ (hTi _ hf)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY Z : C\ng : Y ⟶ Z\nf : Z ⟶ X\nhf : S f\n⊢ Sieve.generate (Ti f hf) ≤ Sieve.pullback f (Sieve.generate (Presieve.bind S Ti))\n[PROOFSTEP]\nrintro Y g ⟨W, h, g, hg, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY✝ Z : C\ng✝ : Y✝ ⟶ Z\nf : Z ⟶ X\nhf : S f\nY W : C\nh : Y ⟶ W\ng : W ⟶ Z\nhg : Ti f hf g\n⊢ (Sieve.pullback f (Sieve.generate (Presieve.bind S Ti))).arrows (h ≫ g)\n[PROOFSTEP]\nexact ⟨_, h, _, ⟨_, _, _, hf, hg, rfl⟩, by simp⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nJ : GrothendieckTopology C\nX : C\nS : Presieve X\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y\nhS : S ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) X\nhTi : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X R => Sieve.generate R ∈ GrothendieckTopology.sieves J X) Y\nY✝ Z : C\ng✝ : Y✝ ⟶ Z\nf : Z ⟶ X\nhf : S f\nY W : C\nh : Y ⟶ W\ng : W ⟶ Z\nhg : Ti f hf g\n⊢ h ≫ g ≫ f = (h ≫ g) ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\n⊢ toGrothendieck C K ≤ J ↔ K ≤ ofGrothendieck C J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\n⊢ toGrothendieck C K ≤ J → K ≤ ofGrothendieck C J\n[PROOFSTEP]\nintro h X R hR\n[GOAL]\ncase mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\nh : toGrothendieck C K ≤ J\nX : C\nR : Presieve X\nhR : R ∈ coverings K X\n⊢ R ∈ coverings (ofGrothendieck C J) X\n[PROOFSTEP]\nexact h _ ⟨_, hR, Sieve.le_generate R⟩\n[GOAL]\ncase mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\n⊢ K ≤ ofGrothendieck C J → toGrothendieck C K ≤ J\n[PROOFSTEP]\nrintro h X S ⟨R, hR, RS⟩\n[GOAL]\ncase mpr.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\nh : K ≤ ofGrothendieck C J\nX : C\nS : Sieve X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ S ∈ GrothendieckTopology.sieves J X\n[PROOFSTEP]\napply J.superset_covering _ (h _ hR)\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nJ : GrothendieckTopology C\nh : K ≤ ofGrothendieck C J\nX : C\nS : Sieve X\nR : Presieve X\nhR : R ∈ coverings K X\nRS : R ≤ S.arrows\n⊢ Sieve.generate R ≤ S\n[PROOFSTEP]\nrwa [Sieve.giGenerate.gc]\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nS : Presieve X\n⊢ S ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) X →\n    pullbackArrows f S ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\n[PROOFSTEP]\nrintro ⟨Z, g, i, rfl⟩\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ pullbackArrows f (Presieve.singleton g) ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\n[PROOFSTEP]\nrefine' ⟨pullback g f, pullback.snd, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ IsIso pullback.snd\n[PROOFSTEP]\nrefine' ⟨⟨pullback.lift (f ≫ inv g) (𝟙 _) (by simp), ⟨_, by aesop_cat⟩⟩⟩\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ (f ≫ inv g) ≫ g = 𝟙 Y ≫ f\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ pullback.lift (f ≫ inv g) (𝟙 Y) (_ : (f ≫ inv g) ≫ g = 𝟙 Y ≫ f) ≫ pullback.snd = 𝟙 Y\n[PROOFSTEP]\naesop_cat\n[GOAL]\ncase intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ pullback.snd ≫ pullback.lift (f ≫ inv g) (𝟙 Y) (_ : (f ≫ inv g) ≫ g = 𝟙 Y ≫ f) = 𝟙 (pullback g f)\n[PROOFSTEP]\next\n[GOAL]\ncase intro.intro.intro.refine'_1.h₀\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ (pullback.snd ≫ pullback.lift (f ≫ inv g) (𝟙 Y) (_ : (f ≫ inv g) ≫ g = 𝟙 Y ≫ f)) ≫ pullback.fst =\n    𝟙 (pullback g f) ≫ pullback.fst\n[PROOFSTEP]\nrw [assoc, pullback.lift_fst, ← pullback.condition_assoc]\n[GOAL]\ncase intro.intro.intro.refine'_1.h₀\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ pullback.fst ≫ g ≫ inv g = 𝟙 (pullback g f) ≫ pullback.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.refine'_1.h₁\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ (pullback.snd ≫ pullback.lift (f ≫ inv g) (𝟙 Y) (_ : (f ≫ inv g) ≫ g = 𝟙 Y ≫ f)) ≫ pullback.snd =\n    𝟙 (pullback g f) ≫ pullback.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Y : C\nf : Y ⟶ X\nZ : C\ng : Z ⟶ X\ni : IsIso g\n⊢ pullbackArrows f (Presieve.singleton g) = Presieve.singleton pullback.snd\n[PROOFSTEP]\napply pullback_singleton\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\n⊢ ∀ ⦃X : C⦄ (S : Presieve X) (Ti : ⦃Y : C⦄ → (f : Y ⟶ X) → S f → Presieve Y),\n    S ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) X →\n      (∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : S f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y) →\n        Presieve.bind S Ti ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) X\n[PROOFSTEP]\nrintro X S Ti ⟨Z, g, i, rfl⟩ hS\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\n⊢ Presieve.bind (Presieve.singleton g) Ti ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) X\n[PROOFSTEP]\nrcases hS g (singleton_self g) with ⟨Y, f, i, hTi⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\n⊢ Presieve.bind (Presieve.singleton g) Ti ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) X\n[PROOFSTEP]\nrefine' ⟨_, f ≫ g, _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_1\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\n⊢ IsIso (f ≫ g)\n[PROOFSTEP]\ninfer_instance\n  -- Porting note: the next four lines were just \"ext (W k)\"\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\n⊢ Presieve.bind (Presieve.singleton g) Ti = Presieve.singleton (f ≫ g)\n[PROOFSTEP]\napply funext\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\n⊢ ∀ (x : C), Presieve.bind (Presieve.singleton g) Ti = Presieve.singleton (f ≫ g)\n[PROOFSTEP]\nrintro W\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW : C\n⊢ Presieve.bind (Presieve.singleton g) Ti = Presieve.singleton (f ≫ g)\n[PROOFSTEP]\napply Set.ext\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW : C\n⊢ ∀ (x : W ⟶ X), x ∈ Presieve.bind (Presieve.singleton g) Ti ↔ x ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\nrintro k\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW : C\nk : W ⟶ X\n⊢ k ∈ Presieve.bind (Presieve.singleton g) Ti ↔ k ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mp\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW : C\nk : W ⟶ X\n⊢ k ∈ Presieve.bind (Presieve.singleton g) Ti → k ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\nrintro ⟨V, h, k, ⟨_⟩, hh, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mp.intro.intro.intro.intro.mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW Y : C\nh : W ⟶ Z\nhh : Ti g (_ : singleton' g g) h\n⊢ h ≫ g ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\nrw [hTi] at hh \n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mp.intro.intro.intro.intro.mk.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW Y : C\nh : W ⟶ Z\nhh : Presieve.singleton f h\n⊢ h ≫ g ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\ncases hh\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mp.intro.intro.intro.intro.mk.intro.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nY : C\n⊢ f ≫ g ∈ Presieve.singleton (f ≫ g)\n[PROOFSTEP]\napply singleton.mk\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mpr\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY : C\nf : Y ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nW : C\nk : W ⟶ X\n⊢ k ∈ Presieve.singleton (f ≫ g) → k ∈ Presieve.bind (Presieve.singleton g) Ti\n[PROOFSTEP]\nrintro ⟨_⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mpr.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nY : C\n⊢ f ≫ g ∈ Presieve.bind (Presieve.singleton g) Ti\n[PROOFSTEP]\nrefine' bind_comp g singleton.mk _\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mpr.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nY : C\n⊢ Ti g (_ : Presieve.singleton g g) f\n[PROOFSTEP]\nrw [hTi]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.refine'_2.h.h.mpr.mk\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nX Z : C\ng : Z ⟶ X\ni✝ : IsIso g\nTi : ⦃Y : C⦄ → (f : Y ⟶ X) → Presieve.singleton g f → Presieve Y\nhS : ∀ ⦃Y : C⦄ (f : Y ⟶ X) (H : Presieve.singleton g f), Ti f H ∈ (fun X S => ∃ Y f x, S = Presieve.singleton f) Y\nY✝ : C\nf : Y✝ ⟶ Z\ni : IsIso f\nhTi : Ti g (_ : Presieve.singleton g g) = Presieve.singleton f\nY : C\n⊢ Presieve.singleton f f\n[PROOFSTEP]\napply singleton.mk\n[GOAL]\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX : C\nR : Presieve X\n⊢ R ∈ coverings ⊥ X → R ∈ coverings K X\n[PROOFSTEP]\nrintro ⟨Y, f, hf, rfl⟩\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasPullbacks C\nK : Pretopology C\nX Y : C\nf : Y ⟶ X\nhf : IsIso f\n⊢ Presieve.singleton f ∈ coverings K X\n[PROOFSTEP]\nexact K.has_isos f\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Pretopology", "llama_tokens": 11802, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.600188359260205, "lm_q2_score": 0.4455295350395727, "lm_q1q2_score": 0.26740164063736316}}
{"text": "[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\n⊢ ∀ {s : Set H} {x : H} {u : Set H} {f : H → H'},\n    IsOpen u → x ∈ u → (DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x)\n[PROOFSTEP]\nintro s x u f u_open xu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\n⊢ DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x\n[PROOFSTEP]\nhave : I.symm ⁻¹' (s ∩ u) ∩ Set.range I = I.symm ⁻¹' s ∩ Set.range I ∩ I.symm ⁻¹' u := by\n  simp only [Set.inter_right_comm, Set.preimage_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n[PROOFSTEP]\nsimp only [Set.inter_right_comm, Set.preimage_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ DifferentiableWithinAtProp I I' f s x ↔ DifferentiableWithinAtProp I I' f (s ∩ u) x\n[PROOFSTEP]\nrw [DifferentiableWithinAtProp, DifferentiableWithinAtProp, this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x) ↔\n    DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I))\n      (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u) (↑I x)\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I))\n      (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u) (↑I x) ↔\n    DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\n[PROOFSTEP]\napply differentiableWithinAt_inter\n[GOAL]\ncase ht\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' u ∈ 𝓝 (↑I x)\n[PROOFSTEP]\nhave : u ∈ 𝓝 (I.symm (I x)) := by\n  rw [ModelWithCorners.left_inv]\n  exact IsOpen.mem_nhds u_open xu\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ u ∈ 𝓝 (↑(ModelWithCorners.symm I) (↑I x))\n[PROOFSTEP]\nrw [ModelWithCorners.left_inv]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\n⊢ u ∈ 𝓝 x\n[PROOFSTEP]\nexact IsOpen.mem_nhds u_open xu\n[GOAL]\ncase ht\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nu : Set H\nf : H → H'\nu_open : IsOpen u\nxu : x ∈ u\nthis✝ :\n  ↑(ModelWithCorners.symm I) ⁻¹' (s ∩ u) ∩ range ↑I =\n    ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I ∩ ↑(ModelWithCorners.symm I) ⁻¹' u\nthis : u ∈ 𝓝 (↑(ModelWithCorners.symm I) (↑I x))\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' u ∈ 𝓝 (↑I x)\n[PROOFSTEP]\napply I.continuous_symm.continuousAt this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\n⊢ ∀ {s : Set H} {x : H} {f : H → H'} {e : LocalHomeomorph H H},\n    e ∈ contDiffGroupoid ⊤ I →\n      x ∈ e.source →\n        DifferentiableWithinAtProp I I' f s x →\n          DifferentiableWithinAtProp I I' (f ∘ ↑(LocalHomeomorph.symm e)) (↑(LocalHomeomorph.symm e) ⁻¹' s) (↑e x)\n[PROOFSTEP]\nintro s x f e he hx h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh : DifferentiableWithinAtProp I I' f s x\n⊢ DifferentiableWithinAtProp I I' (f ∘ ↑(LocalHomeomorph.symm e)) (↑(LocalHomeomorph.symm e) ⁻¹' s) (↑e x)\n[PROOFSTEP]\nrw [DifferentiableWithinAtProp] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x))\n[PROOFSTEP]\nhave : I x = (I ∘ e.symm ∘ I.symm) (I (e x)) := by simp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\n⊢ ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nthis : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x))\n[PROOFSTEP]\nrw [this] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x))\n[PROOFSTEP]\nhave : I (e x) ∈ I.symm ⁻¹' e.target ∩ Set.range I := by simp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\n⊢ ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x))\n[PROOFSTEP]\nhave := (mem_groupoid_of_pregroupoid.2 he).2.contDiffWithinAt this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) (↑I (↑e x))\n[PROOFSTEP]\nconvert (h.comp' _ (this.differentiableWithinAt le_top)).mono_of_mem _ using 1\n[GOAL]\ncase h.e'_9\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\n⊢ ↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I) =\n    (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) ∘ ↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_9.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\ny : E\n⊢ (↑I' ∘ (f ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I)) y =\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) ∘ ↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) y\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I ∩\n      ↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I) ⁻¹' (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) ∈\n    𝓝[↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I] ↑I (↑e x)\n[PROOFSTEP]\nrefine'\n  mem_nhdsWithin.mpr\n    ⟨I.symm ⁻¹' e.target, e.open_target.preimage I.continuous_symm, by\n      simp_rw [Set.mem_preimage, I.left_inv, e.mapsTo hx], _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\n⊢ ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target\n[PROOFSTEP]\nsimp_rw [Set.mem_preimage, I.left_inv, e.mapsTo hx]\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne : LocalHomeomorph H H\nhe : e ∈ contDiffGroupoid ⊤ I\nhx : x ∈ e.source\nh :\n  DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    ((↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x)))\nthis✝¹ : ↑I x = (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I)) (↑I (↑e x))\nthis✝ : ↑I (↑e x) ∈ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I) (↑I (↑e x))\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩\n      (↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm e) ⁻¹' s) ∩ range ↑I) ⊆\n    ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩ range ↑I ∩\n      ↑I ∘ ↑(LocalHomeomorph.symm e) ∘ ↑(ModelWithCorners.symm I) ⁻¹' (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\n⊢ ∀ {s : Set H} {x : H} {f g : H → H'},\n    (∀ (y : H), y ∈ s → f y = g y) →\n      f x = g x → DifferentiableWithinAtProp I I' f s x → DifferentiableWithinAtProp I I' g s x\n[PROOFSTEP]\nintro s x f g h hx hf\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf g : H → H'\nh : ∀ (y : H), y ∈ s → f y = g y\nhx : f x = g x\nhf : DifferentiableWithinAtProp I I' f s x\n⊢ DifferentiableWithinAtProp I I' g s x\n[PROOFSTEP]\napply hf.congr\n[GOAL]\ncase ht\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf g : H → H'\nh : ∀ (y : H), y ∈ s → f y = g y\nhx : f x = g x\nhf : DifferentiableWithinAtProp I I' f s x\n⊢ ∀ (x : E),\n    x ∈ ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I →\n      (↑I' ∘ g ∘ ↑(ModelWithCorners.symm I)) x = (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) x\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase ht\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf g : H → H'\nh : ∀ (y : H), y ∈ s → f y = g y\nhx : f x = g x\nhf : DifferentiableWithinAtProp I I' f s x\ny : E\nhy : y ∈ ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I\n⊢ (↑I' ∘ g ∘ ↑(ModelWithCorners.symm I)) y = (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) y\n[PROOFSTEP]\nsimp only [mfld_simps] at hy \n[GOAL]\ncase ht\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf g : H → H'\nh : ∀ (y : H), y ∈ s → f y = g y\nhx : f x = g x\nhf : DifferentiableWithinAtProp I I' f s x\ny : E\nhy : ↑(ModelWithCorners.symm I) y ∈ s ∧ y ∈ range ↑I\n⊢ (↑I' ∘ g ∘ ↑(ModelWithCorners.symm I)) y = (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) y\n[PROOFSTEP]\nsimp only [h, hy, mfld_simps]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf g : H → H'\nh : ∀ (y : H), y ∈ s → f y = g y\nhx : f x = g x\nhf : DifferentiableWithinAtProp I I' f s x\n⊢ (↑I' ∘ g ∘ ↑(ModelWithCorners.symm I)) (↑I x) = (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x)\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\n⊢ ∀ {s : Set H} {x : H} {f : H → H'} {e' : LocalHomeomorph H' H'},\n    e' ∈ contDiffGroupoid ⊤ I' →\n      s ⊆ f ⁻¹' e'.source →\n        f x ∈ e'.source → DifferentiableWithinAtProp I I' f s x → DifferentiableWithinAtProp I I' (↑e' ∘ f) s x\n[PROOFSTEP]\nintro s x f e' he' hs hx h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAtProp I I' f s x\n⊢ DifferentiableWithinAtProp I I' (↑e' ∘ f) s x\n[PROOFSTEP]\nrw [DifferentiableWithinAtProp] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (↑e' ∘ f) ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    (↑I x)\n[PROOFSTEP]\nhave A : (I' ∘ f ∘ I.symm) (I x) ∈ I'.symm ⁻¹' e'.source ∩ Set.range I' := by simp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\n⊢ (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (↑e' ∘ f) ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    (↑I x)\n[PROOFSTEP]\nhave := (mem_groupoid_of_pregroupoid.2 he').1.contDiffWithinAt A\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\n⊢ DifferentiableWithinAt 𝕜 (↑I' ∘ (↑e' ∘ f) ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    (↑I x)\n[PROOFSTEP]\nconvert (this.differentiableWithinAt le_top).comp _ h _\n[GOAL]\ncase h.e'_9\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\n⊢ ↑I' ∘ (↑e' ∘ f) ∘ ↑(ModelWithCorners.symm I) =\n    (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) ∘ ↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)\n[PROOFSTEP]\next y\n[GOAL]\ncase h.e'_9.h\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\ny : E\n⊢ (↑I' ∘ (↑e' ∘ f) ∘ ↑(ModelWithCorners.symm I)) y =\n    ((↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) ∘ ↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) y\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\n⊢ MapsTo (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I)\n    (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n[PROOFSTEP]\nintro y hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\ny : E\nhy : y ∈ ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I\n⊢ (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) y ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\n[PROOFSTEP]\nsimp only [mfld_simps] at hy \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\ns : Set H\nx : H\nf : H → H'\ne' : LocalHomeomorph H' H'\nhe' : e' ∈ contDiffGroupoid ⊤ I'\nhs : s ⊆ f ⁻¹' e'.source\nhx : f x ∈ e'.source\nh : DifferentiableWithinAt 𝕜 (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I x)\nA : (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x) ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\nthis :\n  ContDiffWithinAt 𝕜 ⊤ (↑I' ∘ ↑e' ∘ ↑(ModelWithCorners.symm I')) (↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I')\n    ((↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) (↑I x))\ny : E\nhy : ↑(ModelWithCorners.symm I) y ∈ s ∧ y ∈ range ↑I\n⊢ (↑I' ∘ f ∘ ↑(ModelWithCorners.symm I)) y ∈ ↑(ModelWithCorners.symm I') ⁻¹' e'.source ∩ range ↑I'\n[PROOFSTEP]\nsimpa only [hy, mfld_simps] using hs hy.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nf : M → M'\ns : Set M\nx : M\n⊢ MDifferentiableWithinAt I I' f s x ↔ LiftPropWithinAt (DifferentiableWithinAtProp I I') f s x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nf : M → M'\nx : M\n⊢ MDifferentiableAt I I' f x ↔ LiftPropAt (DifferentiableWithinAtProp I I') f x\n[PROOFSTEP]\napply Iff.and\n[GOAL]\ncase h₁\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nf : M → M'\nx : M\n⊢ ContinuousAt f x ↔ ContinuousWithinAt f univ x\n[PROOFSTEP]\nrw [continuousWithinAt_univ]\n[GOAL]\ncase h₂\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nf : M → M'\nx : M\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f) (range ↑I) (↑(extChartAt I x) x) ↔\n    DifferentiableWithinAtProp I I' (↑(chartAt H' (f x)) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)))\n      (↑(LocalHomeomorph.symm (chartAt H x)) ⁻¹' univ) (↑(chartAt H x) x)\n[PROOFSTEP]\nsimp [DifferentiableWithinAtProp, Set.univ_inter]\n[GOAL]\ncase h₂\n𝕜 : Type u_1\ninst✝¹⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝⁹ : NormedAddCommGroup E\ninst✝⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁶ : TopologicalSpace M\ninst✝⁵ : ChartedSpace H M\nE' : Type u_5\ninst✝⁴ : NormedAddCommGroup E'\ninst✝³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹ : TopologicalSpace M'\ninst✝ : ChartedSpace H' M'\nf : M → M'\nx : M\n⊢ DifferentiableWithinAt 𝕜\n      ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I)) (range ↑I)\n      (↑I (↑(chartAt H x) x)) ↔\n    DifferentiableWithinAt 𝕜\n      (↑I' ∘ (↑(chartAt H' (f x)) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x))) ∘ ↑(ModelWithCorners.symm I)) (range ↑I)\n      (↑I (↑(chartAt H x) x))\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\n⊢ UniqueMDiffWithinAt I univ x\n[PROOFSTEP]\nunfold UniqueMDiffWithinAt\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\n⊢ UniqueDiffWithinAt 𝕜 (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' univ ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [preimage_univ, univ_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\n⊢ UniqueDiffWithinAt 𝕜 (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nexact I.unique_diff _ (mem_range_self _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t : Set M\ng : M' → M''\nu : Set M'\ns : Set M\nx : M\n⊢ UniqueMDiffWithinAt I s x ↔\n    UniqueDiffWithinAt 𝕜 (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ (extChartAt I x).target) (↑(extChartAt I x) x)\n[PROOFSTEP]\napply uniqueDiffWithinAt_congr\n[GOAL]\ncase st\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t : Set M\ng : M' → M''\nu : Set M'\ns : Set M\nx : M\n⊢ 𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x =\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ (extChartAt I x).target] ↑(extChartAt I x) x\n[PROOFSTEP]\nrw [nhdsWithin_inter, nhdsWithin_inter, nhdsWithin_extChartAt_target_eq]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t✝ : Set M\ng : M' → M''\nu : Set M'\ns t : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nht : 𝓝[s] x ≤ 𝓝[t] x\n⊢ 𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x ≤\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∩ range ↑I] ↑(extChartAt I x) x\n[PROOFSTEP]\nsimpa only [← map_extChartAt_nhdsWithin] using Filter.map_mono ht\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nU : UniqueMDiffWithinAt I s x\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : HasMFDerivWithinAt I I' f s x f₁'\n⊢ f' = f₁'\n[PROOFSTEP]\nconvert U.eq h.2 h₁.2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t✝ : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\ny : M'\ns : Set M\nt : Set M'\nhs : UniqueMDiffWithinAt I s x\nht : UniqueMDiffWithinAt I' t y\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I I') (s ×ˢ t) (x, y)\n[PROOFSTEP]\nrefine (hs.prod ht).mono ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t✝ : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\ny : M'\ns : Set M\nt : Set M'\nhs : UniqueMDiffWithinAt I s x\nht : UniqueMDiffWithinAt I' t y\n⊢ (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) ×ˢ (↑(LocalEquiv.symm (extChartAt I' y)) ⁻¹' t ∩ range ↑I') ⊆\n    ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') (x, y))) ⁻¹' s ×ˢ t ∩ range ↑(ModelWithCorners.prod I I')\n[PROOFSTEP]\nrw [ModelWithCorners.range_prod, ← prod_inter_prod]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns✝ t✝ : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\ny : M'\ns : Set M\nt : Set M'\nhs : UniqueMDiffWithinAt I s x\nht : UniqueMDiffWithinAt I' t y\n⊢ (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s) ×ˢ (↑(LocalEquiv.symm (extChartAt I' y)) ⁻¹' t) ∩ range ↑I ×ˢ range ↑I' ⊆\n    ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') (x, y))) ⁻¹' s ×ˢ t ∩ range ↑I ×ˢ range ↑I'\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf✝ f₀ f₁ : M → M'\nx✝ : M\ns✝ t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f✝ x✝)\ng' : TangentSpace I' (f✝ x✝) →L[𝕜] TangentSpace I'' (g (f✝ x✝))\nf : M → M'\ns : Set M\nx : M\n⊢ MDifferentiableWithinAt I I' f s x ↔\n    ContinuousWithinAt f s x ∧\n      DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f)\n        ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrefine' and_congr Iff.rfl (exists_congr fun f' => _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf✝ f₀ f₁ : M → M'\nx✝ : M\ns✝ t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f✝ x✝)\ng' : TangentSpace I' (f✝ x✝) →L[𝕜] TangentSpace I'' (g (f✝ x✝))\nf : M → M'\ns : Set M\nx : M\nf' : E →L[𝕜] E'\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n      (↑(extChartAt I x) x) ↔\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf✝ f₀ f₁ : M → M'\nx✝ : M\ns✝ t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f✝ x✝)\ng' : TangentSpace I' (f✝ x✝) →L[𝕜] TangentSpace I'' (g (f✝ x✝))\nf : M → M'\ns : Set M\nx : M\nf' : E →L[𝕜] E'\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (range ↑I ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s)\n      (↑(extChartAt I x) x) ↔\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [HasFDerivWithinAt, nhdsWithin_inter, nhdsWithin_extChartAt_target_eq]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ¬MDifferentiableWithinAt I I' f s x\n⊢ mfderivWithin I I' f s x = 0\n[PROOFSTEP]\nsimp only [mfderivWithin, h, if_neg, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ¬MDifferentiableAt I I' f x\n⊢ mfderiv I I' f x = 0\n[PROOFSTEP]\nsimp only [mfderiv, h, if_neg, not_false_iff]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ HasMFDerivWithinAt I I' f univ x f' ↔ HasMFDerivAt I I' f x f'\n[PROOFSTEP]\nsimp only [HasMFDerivWithinAt, HasMFDerivAt, continuousWithinAt_univ, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₀ : HasMFDerivAt I I' f x f₀'\nh₁ : HasMFDerivAt I I' f x f₁'\n⊢ f₀' = f₁'\n[PROOFSTEP]\nrw [← hasMFDerivWithinAt_univ] at h₀ h₁ \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₀ : HasMFDerivWithinAt I I' f univ x f₀'\nh₁ : HasMFDerivWithinAt I I' f univ x f₁'\n⊢ f₀' = f₁'\n[PROOFSTEP]\nexact (uniqueMDiffWithinAt_univ I).eq h₀ h₁\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : t ∈ 𝓝[s] x\n⊢ HasMFDerivWithinAt I I' f (s ∩ t) x f' ↔ HasMFDerivWithinAt I I' f s x f'\n[PROOFSTEP]\nrw [HasMFDerivWithinAt, HasMFDerivWithinAt, extChartAt_preimage_inter_eq, hasFDerivWithinAt_inter',\n  continuousWithinAt_inter' h]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : t ∈ 𝓝[s] x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n[PROOFSTEP]\nexact extChartAt_preimage_mem_nhdsWithin I x h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : t ∈ 𝓝 x\n⊢ HasMFDerivWithinAt I I' f (s ∩ t) x f' ↔ HasMFDerivWithinAt I I' f s x f'\n[PROOFSTEP]\nrw [HasMFDerivWithinAt, HasMFDerivWithinAt, extChartAt_preimage_inter_eq, hasFDerivWithinAt_inter,\n  continuousWithinAt_inter h]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : t ∈ 𝓝 x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∈ 𝓝 (↑(extChartAt I x) x)\n[PROOFSTEP]\nexact extChartAt_preimage_mem_nhds I x h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : HasMFDerivWithinAt I I' f s x f'\nht : HasMFDerivWithinAt I I' f t x f'\n⊢ HasMFDerivWithinAt I I' f (s ∪ t) x f'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : HasMFDerivWithinAt I I' f s x f'\nht : HasMFDerivWithinAt I I' f t x f'\n⊢ ContinuousWithinAt f (s ∪ t) x\n[PROOFSTEP]\nexact ContinuousWithinAt.union hs.1 ht.1\n[GOAL]\ncase right\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : HasMFDerivWithinAt I I' f s x f'\nht : HasMFDerivWithinAt I I' f t x f'\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∪ t) ∩ range ↑I)\n    (↑(extChartAt I x) x)\n[PROOFSTEP]\nconvert HasFDerivWithinAt.union hs.2 ht.2 using 1\n[GOAL]\ncase h.e'_11\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : HasMFDerivWithinAt I I' f s x f'\nht : HasMFDerivWithinAt I I' f t x f'\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∪ t) ∩ range ↑I =\n    ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I ∪ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∩ range ↑I\n[PROOFSTEP]\nsimp only [union_inter_distrib_right, preimage_union]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nhs : s ∈ 𝓝 x\n⊢ HasMFDerivAt I I' f x f'\n[PROOFSTEP]\nrwa [← univ_inter s, hasMFDerivWithinAt_inter hs, hasMFDerivWithinAt_univ] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\n⊢ HasMFDerivWithinAt I I' f s x (mfderivWithin I I' f s x)\n[PROOFSTEP]\nrefine' ⟨h.1, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f) (mfderivWithin I I' f s x)\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfderivWithin, h, if_pos, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\n⊢ HasFDerivWithinAt\n    ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I))\n    (fderivWithin 𝕜\n      ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I))\n      (↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I (↑(chartAt H x) x)))\n    (↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I) ⁻¹' s ∩ range ↑I) (↑I (↑(chartAt H x) x))\n[PROOFSTEP]\nexact DifferentiableWithinAt.hasFDerivWithinAt h.2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\n⊢ mfderivWithin I I' f s x =\n    fderivWithin 𝕜 (writtenInExtChartAt I I' x f) (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n      (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfderivWithin, h, if_pos]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\n⊢ HasMFDerivAt I I' f x (mfderiv I I' f x)\n[PROOFSTEP]\nrefine' ⟨h.1, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f) (mfderiv I I' f x) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfderiv, h, if_pos, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\n⊢ HasFDerivWithinAt\n    ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I))\n    (fderivWithin 𝕜\n      ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I)) (range ↑I)\n      (↑I (↑(chartAt H x) x)))\n    (range ↑I) (↑I (↑(chartAt H x) x))\n[PROOFSTEP]\nexact DifferentiableWithinAt.hasFDerivWithinAt h.2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\n⊢ mfderiv I I' f x = fderivWithin 𝕜 (writtenInExtChartAt I I' x f) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfderiv, h, if_pos]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nhxs : UniqueMDiffWithinAt I s x\n⊢ _root_.mfderivWithin I I' f s x = f'\n[PROOFSTEP]\next\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nhxs : UniqueMDiffWithinAt I s x\nx✝ : TangentSpace I x\n⊢ ↑(_root_.mfderivWithin I I' f s x) x✝ = ↑f' x✝\n[PROOFSTEP]\nrw [hxs.eq h h.mdifferentiableWithinAt.hasMFDerivWithinAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\nhxs : UniqueMDiffWithinAt I s x\n⊢ _root_.mfderivWithin I I' f s x = mfderiv I I' f x\n[PROOFSTEP]\napply HasMFDerivWithinAt.mfderivWithin _ hxs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableAt I I' f x\nhxs : UniqueMDiffWithinAt I s x\n⊢ HasMFDerivWithinAt I I' f s x (mfderiv I I' f x)\n[PROOFSTEP]\nexact h.hasMFDerivAt.hasMFDerivWithinAt\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ MDifferentiableWithinAt I I' f univ x ↔ MDifferentiableAt I I' f x\n[PROOFSTEP]\nsimp only [MDifferentiableWithinAt, MDifferentiableAt, continuousWithinAt_univ, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nht : t ∈ 𝓝 x\n⊢ MDifferentiableWithinAt I I' f (s ∩ t) x ↔ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nrw [MDifferentiableWithinAt, MDifferentiableWithinAt, extChartAt_preimage_inter_eq, differentiableWithinAt_inter,\n  continuousWithinAt_inter ht]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nht : t ∈ 𝓝 x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∈ 𝓝 (↑(extChartAt I x) x)\n[PROOFSTEP]\nexact extChartAt_preimage_mem_nhds I x ht\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nht : t ∈ 𝓝[s] x\n⊢ MDifferentiableWithinAt I I' f (s ∩ t) x ↔ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nrw [MDifferentiableWithinAt, MDifferentiableWithinAt, extChartAt_preimage_inter_eq, differentiableWithinAt_inter',\n  continuousWithinAt_inter' ht]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nht : t ∈ 𝓝[s] x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' t ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n[PROOFSTEP]\nexact extChartAt_preimage_mem_nhdsWithin I x ht\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\nhs : s ∈ 𝓝 x\n⊢ MDifferentiableAt I I' f x\n[PROOFSTEP]\nhave : s = univ ∩ s := by rw [univ_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\nhs : s ∈ 𝓝 x\n⊢ s = univ ∩ s\n[PROOFSTEP]\nrw [univ_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : MDifferentiableWithinAt I I' f s x\nhs : s ∈ 𝓝 x\nthis : s = univ ∩ s\n⊢ MDifferentiableAt I I' f x\n[PROOFSTEP]\nrwa [this, mdifferentiableWithinAt_inter hs, mdifferentiableWithinAt_univ] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ MDifferentiableOn I I' f univ ↔ MDifferentiable I I' f\n[PROOFSTEP]\nsimp only [MDifferentiableOn, mdifferentiableWithinAt_univ, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ (∀ (x : M), MDifferentiableAt I I' f x) ↔ MDifferentiable I I' f\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ∀ (x : M), x ∈ s → ∃ u, IsOpen u ∧ x ∈ u ∧ MDifferentiableOn I I' f (s ∩ u)\n⊢ MDifferentiableOn I I' f s\n[PROOFSTEP]\nintro x xs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nh : ∀ (x : M), x ∈ s → ∃ u, IsOpen u ∧ x ∈ u ∧ MDifferentiableOn I I' f (s ∩ u)\nx : M\nxs : x ∈ s\n⊢ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nrcases h x xs with ⟨t, t_open, xt, ht⟩\n[GOAL]\ncase intro.intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t✝ : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nh : ∀ (x : M), x ∈ s → ∃ u, IsOpen u ∧ x ∈ u ∧ MDifferentiableOn I I' f (s ∩ u)\nx : M\nxs : x ∈ s\nt : Set M\nt_open : IsOpen t\nxt : x ∈ t\nht : MDifferentiableOn I I' f (s ∩ t)\n⊢ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nexact (mdifferentiableWithinAt_inter (IsOpen.mem_nhds t_open xt)).1 (ht x ⟨xs, xt⟩)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ mfderivWithin I I' f univ = mfderiv I I' f\n[PROOFSTEP]\next x : 1\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\n⊢ mfderivWithin I I' f univ x = mfderiv I I' f x\n[PROOFSTEP]\nsimp only [mfderivWithin, mfderiv, mfld_simps]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\n⊢ (if MDifferentiableWithinAt I I' f univ x then\n      fderivWithin 𝕜\n        ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I))\n        (range ↑I) (↑I (↑(chartAt H x) x))\n    else 0) =\n    if MDifferentiableAt I I' f x then\n      fderivWithin 𝕜\n        ((↑I' ∘ ↑(chartAt H' (f x))) ∘ f ∘ ↑(LocalHomeomorph.symm (chartAt H x)) ∘ ↑(ModelWithCorners.symm I))\n        (range ↑I) (↑I (↑(chartAt H x) x))\n    else 0\n[PROOFSTEP]\nrw [mdifferentiableWithinAt_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nht : t ∈ 𝓝 x\n⊢ mfderivWithin I I' f (s ∩ t) x = mfderivWithin I I' f s x\n[PROOFSTEP]\nrw [mfderivWithin, mfderivWithin, extChartAt_preimage_inter_eq, mdifferentiableWithinAt_inter ht,\n  fderivWithin_inter (extChartAt_preimage_mem_nhds I x ht)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nx' : M\ny : M'\nhx : x' ∈ (chartAt H x).toLocalEquiv.source\nhy : f x' ∈ (chartAt H' y).toLocalEquiv.source\n⊢ ContinuousWithinAt f univ x' ∧\n      DifferentiableWithinAt 𝕜 (↑(extChartAt I' y) ∘ f ∘ ↑(LocalEquiv.symm (extChartAt I x)))\n        (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' univ ∩ range ↑I) (↑(extChartAt I x) x') ↔\n    ContinuousAt f x' ∧\n      DifferentiableWithinAt 𝕜 (↑(extChartAt I' y) ∘ f ∘ ↑(LocalEquiv.symm (extChartAt I x))) (range ↑I)\n        (↑(extChartAt I x) x')\n[PROOFSTEP]\nrw [continuousWithinAt_univ, Set.preimage_univ, Set.univ_inter]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\n⊢ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nsuffices h : MDifferentiableWithinAt I I' f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\nh : MDifferentiableWithinAt I I' f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nrwa [mdifferentiableWithinAt_inter'] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\nh : MDifferentiableWithinAt I I' f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ f ⁻¹' (extChartAt I' (f x)).source ∈ 𝓝[s] x\n[PROOFSTEP]\napply hf.1.preimage_mem_nhdsWithin\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\nh : MDifferentiableWithinAt I I' f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ (extChartAt I' (f x)).source ∈ 𝓝 (f x)\n[PROOFSTEP]\nexact extChartAt_source_mem_nhds I' (f x)\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\n⊢ MDifferentiableWithinAt I I' f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n[PROOFSTEP]\nrw [mdifferentiableWithinAt_iff]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\n⊢ ContinuousWithinAt f (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x ∧\n    DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I' x f)\n      ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source))\n      (↑(extChartAt I x) x)\n[PROOFSTEP]\nexact ⟨hf.1.mono (inter_subset_left _ _), (hf.2.differentiableWithinAt hn).mono (by mfld_set_tac)⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nn : ℕ∞\nhf : ContMDiffWithinAt I I' n f s x\nhn : 1 ≤ n\n⊢ (extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ⊆\n    ↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm (chartAt H x)) ⁻¹' s) ∩ range ↑I\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nst : s ⊆ t\nhs : UniqueMDiffWithinAt I s p.proj\nh : MDifferentiableWithinAt I I' f t p.proj\n⊢ tangentMapWithin I I' f s p = tangentMapWithin I I' f t p\n[PROOFSTEP]\nsimp only [tangentMapWithin, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nst : s ⊆ t\nhs : UniqueMDiffWithinAt I s p.proj\nh : MDifferentiableWithinAt I I' f t p.proj\n⊢ ↑(mfderivWithin I I' f s p.proj) p.snd = ↑(mfderivWithin I I' f t p.proj) p.snd\n[PROOFSTEP]\nrw [mfderivWithin_subset st hs h]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ tangentMapWithin I I' f univ = tangentMap I I' f\n[PROOFSTEP]\next p : 1\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\n⊢ tangentMapWithin I I' f univ p = tangentMap I I' f p\n[PROOFSTEP]\nsimp only [tangentMapWithin, tangentMap, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\nh : MDifferentiableAt I I' f p.proj\n⊢ tangentMapWithin I I' f s p = tangentMap I I' f p\n[PROOFSTEP]\nrw [← mdifferentiableWithinAt_univ] at h \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\nh : MDifferentiableWithinAt I I' f univ p.proj\n⊢ tangentMapWithin I I' f s p = tangentMap I I' f p\n[PROOFSTEP]\nrw [← tangentMapWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\nh : MDifferentiableWithinAt I I' f univ p.proj\n⊢ tangentMapWithin I I' f s p = tangentMapWithin I I' f univ p\n[PROOFSTEP]\nexact tangentMapWithin_subset (subset_univ _) hs h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ HasMFDerivWithinAt I I' f₁ s x f'\n[PROOFSTEP]\nrefine' ⟨ContinuousWithinAt.congr_of_eventuallyEq h.1 h₁ hx, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x f₁) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n    (↑(extChartAt I x) x)\n[PROOFSTEP]\napply HasFDerivWithinAt.congr_of_eventuallyEq h.2\n[GOAL]\ncase h₁\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ writtenInExtChartAt I I' x f₁ =ᶠ[𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x]\n    writtenInExtChartAt I I' x f\n[PROOFSTEP]\nhave : (extChartAt I x).symm ⁻¹' {y | f₁ y = f y} ∈ 𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] (extChartAt I x) x :=\n  extChartAt_preimage_mem_nhdsWithin I x h₁\n[GOAL]\ncase h₁\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' {y | f₁ y = f y} ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ writtenInExtChartAt I I' x f₁ =ᶠ[𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x]\n    writtenInExtChartAt I I' x f\n[PROOFSTEP]\napply Filter.mem_of_superset this fun y => _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' {y | f₁ y = f y} ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ ∀ (y : E),\n    y ∈ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' {y | f₁ y = f y} →\n      y ∈ {x_1 | (fun x_2 => writtenInExtChartAt I I' x f₁ x_2 = writtenInExtChartAt I I' x f x_2) x_1}\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [hx, mfld_simps]\n[GOAL]\ncase hx\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f s x f'\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ writtenInExtChartAt I I' x f₁ (↑(extChartAt I x) x) = writtenInExtChartAt I I' x f (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivAt I I' f x f'\nh₁ : f₁ =ᶠ[𝓝 x] f\n⊢ HasMFDerivAt I I' f₁ x f'\n[PROOFSTEP]\nrw [← hasMFDerivWithinAt_univ] at h ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f univ x f'\nh₁ : f₁ =ᶠ[𝓝 x] f\n⊢ HasMFDerivWithinAt I I' f₁ univ x f'\n[PROOFSTEP]\napply h.congr_of_eventuallyEq _ (mem_of_mem_nhds h₁ : _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : HasMFDerivWithinAt I I' f univ x f'\nh₁ : f₁ =ᶠ[𝓝 x] f\n⊢ f₁ =ᶠ[𝓝[univ] x] f\n[PROOFSTEP]\nrwa [nhdsWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ MDifferentiableWithinAt I I' f s x ↔ MDifferentiableWithinAt I I' f₁ s x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ MDifferentiableWithinAt I I' f s x → MDifferentiableWithinAt I I' f₁ s x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f s x\n⊢ MDifferentiableWithinAt I I' f₁ s x\n[PROOFSTEP]\napply h.congr_of_eventuallyEq h₁ hx\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ MDifferentiableWithinAt I I' f₁ s x → MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f₁ s x\n⊢ MDifferentiableWithinAt I I' f s x\n[PROOFSTEP]\napply h.congr_of_eventuallyEq _ hx.symm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f₁ s x\n⊢ f =ᶠ[𝓝[s] x] f₁\n[PROOFSTEP]\napply h₁.mono\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f₁ s x\n⊢ ∀ (x : M), f₁ x = f x → f x = f₁ x\n[PROOFSTEP]\nintro y\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh₁ : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f₁ s x\ny : M\n⊢ f₁ y = f y → f y = f₁ y\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : UniqueMDiffWithinAt I s x\nhL : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\n⊢ mfderivWithin I I' f₁ s x = mfderivWithin I I' f s x\n[PROOFSTEP]\nby_cases h : MDifferentiableWithinAt I I' f s x\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : UniqueMDiffWithinAt I s x\nhL : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : MDifferentiableWithinAt I I' f s x\n⊢ mfderivWithin I I' f₁ s x = mfderivWithin I I' f s x\n[PROOFSTEP]\nexact (h.hasMFDerivWithinAt.congr_of_eventuallyEq hL hx).mfderivWithin hs\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : UniqueMDiffWithinAt I s x\nhL : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : ¬MDifferentiableWithinAt I I' f s x\n⊢ mfderivWithin I I' f₁ s x = mfderivWithin I I' f s x\n[PROOFSTEP]\nunfold mfderivWithin\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : UniqueMDiffWithinAt I s x\nhL : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : ¬MDifferentiableWithinAt I I' f s x\n⊢ (if MDifferentiableWithinAt I I' f₁ s x then\n      fderivWithin 𝕜 (writtenInExtChartAt I I' x f₁) (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n        (↑(extChartAt I x) x)\n    else 0) =\n    if MDifferentiableWithinAt I I' f s x then\n      fderivWithin 𝕜 (writtenInExtChartAt I I' x f) (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n        (↑(extChartAt I x) x)\n    else 0\n[PROOFSTEP]\nrw [if_neg h, if_neg]\n[GOAL]\ncase neg.hnc\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhs : UniqueMDiffWithinAt I s x\nhL : f₁ =ᶠ[𝓝[s] x] f\nhx : f₁ x = f x\nh : ¬MDifferentiableWithinAt I I' f s x\n⊢ ¬MDifferentiableWithinAt I I' f₁ s x\n[PROOFSTEP]\nrwa [← hL.mdifferentiableWithinAt_iff I I' hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ∀ (x : M), x ∈ s → f x = f₁ x\np : TangentBundle I M\nhp : p.proj ∈ s\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ tangentMapWithin I I' f s p = tangentMapWithin I I' f₁ s p\n[PROOFSTEP]\nrefine TotalSpace.ext _ _ (h p.1 hp) ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ∀ (x : M), x ∈ s → f x = f₁ x\np : TangentBundle I M\nhp : p.proj ∈ s\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ HEq (tangentMapWithin I I' f s p).snd (tangentMapWithin I I' f₁ s p).snd\n[PROOFSTEP]\nsimp only [tangentMapWithin, h p.1 hp, mfderivWithin_congr hs h (h _ hp), HEq.refl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhL : f₁ =ᶠ[𝓝 x] f\n⊢ mfderiv I I' f₁ x = mfderiv I I' f x\n[PROOFSTEP]\nhave A : f₁ x = f x := (mem_of_mem_nhds hL : _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhL : f₁ =ᶠ[𝓝 x] f\nA : f₁ x = f x\n⊢ mfderiv I I' f₁ x = mfderiv I I' f x\n[PROOFSTEP]\nrw [← mfderivWithin_univ, ← mfderivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhL : f₁ =ᶠ[𝓝 x] f\nA : f₁ x = f x\n⊢ mfderivWithin I I' f₁ univ x = mfderivWithin I I' f univ x\n[PROOFSTEP]\nrw [← nhdsWithin_univ] at hL \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhL : f₁ =ᶠ[𝓝[univ] x] f\nA : f₁ x = f x\n⊢ mfderivWithin I I' f₁ univ x = mfderivWithin I I' f univ x\n[PROOFSTEP]\nexact hL.mfderivWithin_eq (uniqueMDiffWithinAt_univ I) A\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nx' : M\nh : x = x'\n⊢ mfderiv I I' f x = mfderiv I I' f x'\n[PROOFSTEP]\nsubst h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ mfderiv I I' f x = mfderiv I I' f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nf' : M → M'\nh : f = f'\n⊢ mfderiv I I' f x = mfderiv I I' f' x\n[PROOFSTEP]\nsubst h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\n⊢ mfderiv I I' f x = mfderiv I I' f x\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ContinuousWithinAt f s x\n⊢ {y | writtenInExtChartAt I I'' x (g ∘ f) y = (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) y} ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n[PROOFSTEP]\napply\n  @Filter.mem_of_superset _ _ (f ∘ (extChartAt I x).symm ⁻¹' (extChartAt I' (f x)).source) _\n    (extChartAt_preimage_mem_nhdsWithin I x (h.preimage_mem_nhdsWithin (extChartAt_source_mem_nhds _ _)))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nh : ContinuousWithinAt f s x\n⊢ f ∘ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (extChartAt I' (f x)).source ⊆\n    {y | writtenInExtChartAt I I'' x (g ∘ f) y = (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) y}\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\n⊢ HasMFDerivWithinAt I I'' (g ∘ f) s x (ContinuousLinearMap.comp g' f')\n[PROOFSTEP]\nrefine' ⟨ContinuousWithinAt.comp hg.1 hf.1 hst, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I'' x (g ∘ f)) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave A :\n  HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f)\n    (ContinuousLinearMap.comp g' f' : E →L[𝕜] E'') ((extChartAt I x).symm ⁻¹' s ∩ range I) ((extChartAt I x) x) :=\n  by\n  have :\n    (extChartAt I x).symm ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n      𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] (extChartAt I x) x :=\n    extChartAt_preimage_mem_nhdsWithin I x (hf.1.preimage_mem_nhdsWithin (extChartAt_source_mem_nhds _ _))\n  unfold HasMFDerivWithinAt at *\n  rw [← hasFDerivWithinAt_inter' this, ← extChartAt_preimage_inter_eq] at hf ⊢\n  have : writtenInExtChartAt I I' x f ((extChartAt I x) x) = (extChartAt I' (f x)) (f x) := by simp only [mfld_simps]\n  rw [← this] at hg \n  apply HasFDerivWithinAt.comp ((extChartAt I x) x) hg.2 hf.2 _\n  intro y hy\n  simp only [mfld_simps] at hy \n  have : f (((chartAt H x).symm : H → M) (I.symm y)) ∈ u := hst hy.1.1\n  simp only [hy, this, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave :\n  (extChartAt I x).symm ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[(extChartAt I x).symm ⁻¹' s ∩ range I] (extChartAt I x) x :=\n  extChartAt_preimage_mem_nhdsWithin I x (hf.1.preimage_mem_nhdsWithin (extChartAt_source_mem_nhds _ _))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nunfold HasMFDerivWithinAt at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (↑(extChartAt I' (f x)) (f x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrw [← hasFDerivWithinAt_inter' this, ← extChartAt_preimage_inter_eq] at hf ⊢\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (↑(extChartAt I' (f x)) (f x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave : writtenInExtChartAt I I' x f ((extChartAt I x) x) = (extChartAt I' (f x)) (f x) := by simp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (↑(extChartAt I' (f x)) (f x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\n⊢ writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (↑(extChartAt I' (f x)) (f x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrw [← this] at hg \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (writtenInExtChartAt I I' x f (↑(extChartAt I x) x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n⊢ HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\napply HasFDerivWithinAt.comp ((extChartAt I x) x) hg.2 hf.2 _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (writtenInExtChartAt I I' x f (↑(extChartAt I x) x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n⊢ MapsTo (writtenInExtChartAt I I' x f)\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n    (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I')\n[PROOFSTEP]\nintro y hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (writtenInExtChartAt I I' x f (↑(extChartAt I x) x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\ny : E\nhy : y ∈ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I\n⊢ writtenInExtChartAt I I' x f y ∈ ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I'\n[PROOFSTEP]\nsimp only [mfld_simps] at hy \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (writtenInExtChartAt I I' x f (↑(extChartAt I x) x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\ny : E\nhy :\n  (↑(LocalHomeomorph.symm (chartAt H x)) (↑(ModelWithCorners.symm I) y) ∈ s ∧\n      f (↑(LocalHomeomorph.symm (chartAt H x)) (↑(ModelWithCorners.symm I) y)) ∈\n        (chartAt H' (f x)).toLocalEquiv.source) ∧\n    y ∈ range ↑I\n⊢ writtenInExtChartAt I I' x f y ∈ ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I'\n[PROOFSTEP]\nhave : f (((chartAt H x).symm : H → M) (I.symm y)) ∈ u := hst hy.1.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg :\n  ContinuousWithinAt g u (f x) ∧\n    HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g'\n      (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I') (writtenInExtChartAt I I' x f (↑(extChartAt I x) x))\nhf :\n  ContinuousWithinAt f s x ∧\n    HasFDerivWithinAt (writtenInExtChartAt I I' x f) f'\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I)\n      (↑(extChartAt I x) x)\nhst : s ⊆ f ⁻¹' u\nthis✝¹ :\n  ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (f ⁻¹' (extChartAt I' (f x)).source) ∈\n    𝓝[↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I] ↑(extChartAt I x) x\nthis✝ : writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\ny : E\nhy :\n  (↑(LocalHomeomorph.symm (chartAt H x)) (↑(ModelWithCorners.symm I) y) ∈ s ∧\n      f (↑(LocalHomeomorph.symm (chartAt H x)) (↑(ModelWithCorners.symm I) y)) ∈\n        (chartAt H' (f x)).toLocalEquiv.source) ∧\n    y ∈ range ↑I\nthis : f (↑(LocalHomeomorph.symm (chartAt H x)) (↑(ModelWithCorners.symm I) y)) ∈ u\n⊢ writtenInExtChartAt I I' x f y ∈ ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I'\n[PROOFSTEP]\nsimp only [hy, this, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\nA :\n  HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I'' x (g ∘ f)) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\napply A.congr_of_eventuallyEq (writtenInExtChartAt_comp hf.1)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g u (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\nhst : s ⊆ f ⁻¹' u\nA :\n  HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (ContinuousLinearMap.comp g' f')\n    (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I x) x)\n⊢ writtenInExtChartAt I I'' x (g ∘ f) (↑(extChartAt I x) x) =\n    (writtenInExtChartAt I' I'' (f x) g ∘ writtenInExtChartAt I I' x f) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivAt I' I'' g (f x) g'\nhf : HasMFDerivAt I I' f x f'\n⊢ HasMFDerivAt I I'' (g ∘ f) x (ContinuousLinearMap.comp g' f')\n[PROOFSTEP]\nrw [← hasMFDerivWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g univ (f x) g'\nhf : HasMFDerivWithinAt I I' f univ x f'\n⊢ HasMFDerivWithinAt I I'' (g ∘ f) univ x (ContinuousLinearMap.comp g' f')\n[PROOFSTEP]\nexact HasMFDerivWithinAt.comp x (hg.mono (subset_univ _)) hf subset_preimage_univ\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivAt I' I'' g (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\n⊢ HasMFDerivWithinAt I I'' (g ∘ f) s x (ContinuousLinearMap.comp g' f')\n[PROOFSTEP]\nrw [← hasMFDerivWithinAt_univ] at *\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : HasMFDerivWithinAt I' I'' g univ (f x) g'\nhf : HasMFDerivWithinAt I I' f s x f'\n⊢ HasMFDerivWithinAt I I'' (g ∘ f) s x (ContinuousLinearMap.comp g' f')\n[PROOFSTEP]\nexact HasMFDerivWithinAt.comp x (hg.mono (subset_univ _)) hf subset_preimage_univ\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\n⊢ MDifferentiableWithinAt I I'' (g ∘ f) s x\n[PROOFSTEP]\nrcases hf.2 with ⟨f', hf'⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nf' : E →L[𝕜] E'\nhf' :\n  HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n    (↑(extChartAt I x) x)\n⊢ MDifferentiableWithinAt I I'' (g ∘ f) s x\n[PROOFSTEP]\nhave F : HasMFDerivWithinAt I I' f s x f' := ⟨hf.1, hf'⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nf' : E →L[𝕜] E'\nhf' :\n  HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n    (↑(extChartAt I x) x)\nF : HasMFDerivWithinAt I I' f s x f'\n⊢ MDifferentiableWithinAt I I'' (g ∘ f) s x\n[PROOFSTEP]\nrcases hg.2 with ⟨g', hg'⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng'✝ : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nf' : E →L[𝕜] E'\nhf' :\n  HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n    (↑(extChartAt I x) x)\nF : HasMFDerivWithinAt I I' f s x f'\ng' : E' →L[𝕜] E''\nhg' :\n  HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g' (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I')\n    (↑(extChartAt I' (f x)) (f x))\n⊢ MDifferentiableWithinAt I I'' (g ∘ f) s x\n[PROOFSTEP]\nhave G : HasMFDerivWithinAt I' I'' g u (f x) g' := ⟨hg.1, hg'⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf'✝ f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng'✝ : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nf' : E →L[𝕜] E'\nhf' :\n  HasFDerivWithinAt (writtenInExtChartAt I I' x f) f' (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I)\n    (↑(extChartAt I x) x)\nF : HasMFDerivWithinAt I I' f s x f'\ng' : E' →L[𝕜] E''\nhg' :\n  HasFDerivWithinAt (writtenInExtChartAt I' I'' (f x) g) g' (↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' u ∩ range ↑I')\n    (↑(extChartAt I' (f x)) (f x))\nG : HasMFDerivWithinAt I' I'' g u (f x) g'\n⊢ MDifferentiableWithinAt I I'' (g ∘ f) s x\n[PROOFSTEP]\nexact (HasMFDerivWithinAt.comp x G F h).mdifferentiableWithinAt\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nhxs : UniqueMDiffWithinAt I s x\n⊢ mfderivWithin I I'' (g ∘ f) s x = ContinuousLinearMap.comp (mfderivWithin I' I'' g u (f x)) (mfderivWithin I I' f s x)\n[PROOFSTEP]\napply HasMFDerivWithinAt.mfderivWithin _ hxs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableWithinAt I' I'' g u (f x)\nhf : MDifferentiableWithinAt I I' f s x\nh : s ⊆ f ⁻¹' u\nhxs : UniqueMDiffWithinAt I s x\n⊢ HasMFDerivWithinAt I I'' (g ∘ f) s x\n    (ContinuousLinearMap.comp (mfderivWithin I' I'' g u (f x)) (mfderivWithin I I' f s x))\n[PROOFSTEP]\nexact HasMFDerivWithinAt.comp x hg.hasMFDerivWithinAt hf.hasMFDerivWithinAt h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableAt I' I'' g (f x)\nhf : MDifferentiableAt I I' f x\n⊢ mfderiv I I'' (g ∘ f) x = ContinuousLinearMap.comp (mfderiv I' I'' g (f x)) (mfderiv I I' f x)\n[PROOFSTEP]\napply HasMFDerivAt.mfderiv\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiableAt I' I'' g (f x)\nhf : MDifferentiableAt I I' f x\n⊢ HasMFDerivAt I I'' (g ∘ f) x (ContinuousLinearMap.comp (mfderiv I' I'' g (f x)) (mfderiv I I' f x))\n[PROOFSTEP]\nexact HasMFDerivAt.comp x hg.hasMFDerivAt hf.hasMFDerivAt\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\ny : M'\nhg : MDifferentiableAt I' I'' g y\nhf : MDifferentiableAt I I' f x\nhy : f x = y\n⊢ mfderiv I I'' (g ∘ f) x = ContinuousLinearMap.comp (mfderiv I' I'' g (f x)) (mfderiv I I' f x)\n[PROOFSTEP]\nsubst hy\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx✝ : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x✝ →L[𝕜] TangentSpace I' (f x✝)\ng' : TangentSpace I' (f x✝) →L[𝕜] TangentSpace I'' (g (f x✝))\nx : M\nhf : MDifferentiableAt I I' f x\nhg : MDifferentiableAt I' I'' g (f x)\n⊢ mfderiv I I'' (g ∘ f) x = ContinuousLinearMap.comp (mfderiv I' I'' g (f x)) (mfderiv I I' f x)\n[PROOFSTEP]\nexact mfderiv_comp x hg hf\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableWithinAt I' I'' g u (f p.proj)\nhf : MDifferentiableWithinAt I I' f s p.proj\nh : s ⊆ f ⁻¹' u\nhps : UniqueMDiffWithinAt I s p.proj\n⊢ tangentMapWithin I I'' (g ∘ f) s p = tangentMapWithin I' I'' g u (tangentMapWithin I I' f s p)\n[PROOFSTEP]\nsimp only [tangentMapWithin, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableWithinAt I' I'' g u (f p.proj)\nhf : MDifferentiableWithinAt I I' f s p.proj\nh : s ⊆ f ⁻¹' u\nhps : UniqueMDiffWithinAt I s p.proj\n⊢ ↑(mfderivWithin I I'' (g ∘ f) s p.proj) p.snd =\n    ↑(mfderivWithin I' I'' g u (f p.proj)) (↑(mfderivWithin I I' f s p.proj) p.snd)\n[PROOFSTEP]\nrw [mfderivWithin_comp p.1 hg hf h hps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableWithinAt I' I'' g u (f p.proj)\nhf : MDifferentiableWithinAt I I' f s p.proj\nh : s ⊆ f ⁻¹' u\nhps : UniqueMDiffWithinAt I s p.proj\n⊢ ↑(ContinuousLinearMap.comp (mfderivWithin I' I'' g u (f p.proj)) (mfderivWithin I I' f s p.proj)) p.snd =\n    ↑(mfderivWithin I' I'' g u (f p.proj)) (↑(mfderivWithin I I' f s p.proj) p.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableAt I' I'' g (f p.proj)\nhf : MDifferentiableAt I I' f p.proj\n⊢ tangentMap I I'' (g ∘ f) p = tangentMap I' I'' g (tangentMap I I' f p)\n[PROOFSTEP]\nsimp only [tangentMap, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableAt I' I'' g (f p.proj)\nhf : MDifferentiableAt I I' f p.proj\n⊢ ↑(mfderiv I I'' (g ∘ f) p.proj) p.snd = ↑(mfderiv I' I'' g (f p.proj)) (↑(mfderiv I I' f p.proj) p.snd)\n[PROOFSTEP]\nrw [mfderiv_comp p.1 hg hf]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\np : TangentBundle I M\nhg : MDifferentiableAt I' I'' g (f p.proj)\nhf : MDifferentiableAt I I' f p.proj\n⊢ ↑(ContinuousLinearMap.comp (mfderiv I' I'' g (f p.proj)) (mfderiv I I' f p.proj)) p.snd =\n    ↑(mfderiv I' I'' g (f p.proj)) (↑(mfderiv I I' f p.proj) p.snd)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiable I' I'' g\nhf : MDifferentiable I I' f\n⊢ tangentMap I I'' (g ∘ f) = tangentMap I' I'' g ∘ tangentMap I I' f\n[PROOFSTEP]\next p : 1\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁵ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁴ : NormedAddCommGroup E\ninst✝¹³ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹² : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹¹ : TopologicalSpace M\ninst✝¹⁰ : ChartedSpace H M\nE' : Type u_5\ninst✝⁹ : NormedAddCommGroup E'\ninst✝⁸ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁷ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁶ : TopologicalSpace M'\ninst✝⁵ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁴ : NormedAddCommGroup E''\ninst✝³ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝² : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝¹ : TopologicalSpace M''\ninst✝ : ChartedSpace H'' M''\nf f₀ f₁ : M → M'\nx : M\ns t : Set M\ng : M' → M''\nu : Set M'\nIs : SmoothManifoldWithCorners I M\nI's : SmoothManifoldWithCorners I' M'\nI''s : SmoothManifoldWithCorners I'' M''\nf' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)\ng' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))\nhg : MDifferentiable I' I'' g\nhf : MDifferentiable I I' f\np : TangentBundle I M\n⊢ tangentMap I I'' (g ∘ f) p = (tangentMap I' I'' g ∘ tangentMap I I' f) p\n[PROOFSTEP]\nexact tangentMap_comp_at _ (hg _) (hf _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ UniqueMDiffWithinAt 𝓘(𝕜, E) s x ↔ UniqueDiffWithinAt 𝕜 s x\n[PROOFSTEP]\nsimp only [UniqueMDiffWithinAt, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ UniqueMDiffOn 𝓘(𝕜, E) s ↔ UniqueDiffOn 𝕜 s\n[PROOFSTEP]\nsimp [UniqueMDiffOn, UniqueDiffOn, uniqueMDiffWithinAt_iff_uniqueDiffWithinAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nf' : TangentSpace 𝓘(𝕜, E) x →L[𝕜] TangentSpace 𝓘(𝕜, E') (f x)\n⊢ HasMFDerivWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x f' ↔ HasFDerivWithinAt f f' s x\n[PROOFSTEP]\nsimpa only [HasMFDerivWithinAt, and_iff_right_iff_imp, mfld_simps] using HasFDerivWithinAt.continuousWithinAt\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nf' : TangentSpace 𝓘(𝕜, E) x →L[𝕜] TangentSpace 𝓘(𝕜, E') (f x)\n⊢ HasMFDerivAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x f' ↔ HasFDerivAt f f' x\n[PROOFSTEP]\nrw [← hasMFDerivWithinAt_univ, hasMFDerivWithinAt_iff_hasFDerivWithinAt, hasFDerivWithinAt_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x ↔ DifferentiableWithinAt 𝕜 f s x\n[PROOFSTEP]\nsimp only [MDifferentiableWithinAt, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ ContinuousWithinAt f s x ∧ DifferentiableWithinAt 𝕜 f s x ↔ DifferentiableWithinAt 𝕜 f s x\n[PROOFSTEP]\nexact ⟨fun H => H.2, fun H => ⟨H.continuousWithinAt, H⟩⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ MDifferentiableAt 𝓘(𝕜, E) 𝓘(𝕜, E') f x ↔ DifferentiableAt 𝕜 f x\n[PROOFSTEP]\nsimp only [MDifferentiableAt, differentiableWithinAt_univ, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ ContinuousAt f x ∧ DifferentiableAt 𝕜 f x ↔ DifferentiableAt 𝕜 f x\n[PROOFSTEP]\nexact ⟨fun H => H.2, fun H => ⟨H.continuousAt, H⟩⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ MDifferentiableOn 𝓘(𝕜, E) 𝓘(𝕜, E') f s ↔ DifferentiableOn 𝕜 f s\n[PROOFSTEP]\nsimp only [MDifferentiableOn, DifferentiableOn, mdifferentiableWithinAt_iff_differentiableWithinAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ MDifferentiable 𝓘(𝕜, E) 𝓘(𝕜, E') f ↔ Differentiable 𝕜 f\n[PROOFSTEP]\nsimp only [MDifferentiable, Differentiable, mdifferentiableAt_iff_differentiableAt]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nby_cases h : MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nh : MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x\n⊢ mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nsimp only [mfderivWithin, h, if_pos, mfld_simps]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nh : ¬MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x\n⊢ mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f s x = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nsimp only [mfderivWithin, h, if_neg, not_false_iff]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nh : ¬MDifferentiableWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') f s x\n⊢ 0 = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nrw [mdifferentiableWithinAt_iff_differentiableWithinAt] at h \n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\nh : ¬DifferentiableWithinAt 𝕜 f s x\n⊢ 0 = fderivWithin 𝕜 f s x\n[PROOFSTEP]\nexact (fderivWithin_zero_of_not_differentiableWithinAt h).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ mfderiv 𝓘(𝕜, E) 𝓘(𝕜, E') f x = fderiv 𝕜 f x\n[PROOFSTEP]\nrw [← mfderivWithin_univ, ← fderivWithin_univ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nE' : Type u_3\ninst✝¹ : NormedAddCommGroup E'\ninst✝ : NormedSpace 𝕜 E'\nf : E → E'\ns : Set E\nx : E\n⊢ mfderivWithin 𝓘(𝕜, E) 𝓘(𝕜, E') f univ x = fderivWithin 𝕜 f univ x\n[PROOFSTEP]\nexact mfderivWithin_eq_fderivWithin\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\n⊢ HasMFDerivAt I I id x (ContinuousLinearMap.id 𝕜 (TangentSpace I x))\n[PROOFSTEP]\nrefine' ⟨continuousAt_id, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I x id) (ContinuousLinearMap.id 𝕜 (TangentSpace I x)) (range ↑I)\n    (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave : ∀ᶠ y in 𝓝[range I] (extChartAt I x) x, (extChartAt I x ∘ (extChartAt I x).symm) y = y\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\n⊢ ∀ᶠ (y : E) in 𝓝[range ↑I] ↑(extChartAt I x) x, (↑(extChartAt I x) ∘ ↑(LocalEquiv.symm (extChartAt I x))) y = y\n[PROOFSTEP]\napply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin I x)\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\n⊢ (extChartAt I x).target ⊆ {x_1 | (fun y => (↑(extChartAt I x) ∘ ↑(LocalEquiv.symm (extChartAt I x))) y = y) x_1}\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\nthis : ∀ᶠ (y : E) in 𝓝[range ↑I] ↑(extChartAt I x) x, (↑(extChartAt I x) ∘ ↑(LocalEquiv.symm (extChartAt I x))) y = y\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I x id) (ContinuousLinearMap.id 𝕜 (TangentSpace I x)) (range ↑I)\n    (↑(extChartAt I x) x)\n[PROOFSTEP]\napply HasFDerivWithinAt.congr_of_eventuallyEq (hasFDerivWithinAt_id _ _) this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\nthis : ∀ᶠ (y : E) in 𝓝[range ↑I] ↑(extChartAt I x) x, (↑(extChartAt I x) ∘ ↑(LocalEquiv.symm (extChartAt I x))) y = y\n⊢ (↑(extChartAt I x) ∘ ↑(LocalEquiv.symm (extChartAt I x))) (↑(extChartAt I x) x) = id (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nhxs : UniqueMDiffWithinAt I s x\n⊢ mfderivWithin I I id s x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nrw [MDifferentiable.mfderivWithin (mdifferentiableAt_id I) hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nhxs : UniqueMDiffWithinAt I s x\n⊢ mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nexact mfderiv_id I\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\n⊢ tangentMap I I id = id\n[PROOFSTEP]\next1 ⟨x, v⟩\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ x : M\nv : TangentSpace I x\n⊢ tangentMap I I id { proj := x, snd := v } = id { proj := x, snd := v }\n[PROOFSTEP]\nsimp [tangentMap]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ tangentMapWithin I I id s p = p\n[PROOFSTEP]\nsimp only [tangentMapWithin, id.def]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ { proj := p.proj, snd := ↑(mfderivWithin I I id s p.proj) p.snd } = p\n[PROOFSTEP]\nrw [mfderivWithin_id]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ { proj := p.proj, snd := ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I p.proj)) p.snd } = p\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx proj✝ : M\nsnd✝ : TangentSpace I proj✝\nhs : UniqueMDiffWithinAt I s { proj := proj✝, snd := snd✝ }.proj\n⊢ { proj := { proj := proj✝, snd := snd✝ }.proj,\n      snd :=\n        ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I { proj := proj✝, snd := snd✝ }.proj))\n          { proj := proj✝, snd := snd✝ }.snd } =\n    { proj := proj✝, snd := snd✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hxs\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle I M\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ UniqueMDiffWithinAt I s p.proj\n[PROOFSTEP]\nexact hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nc✝ c : M'\nx : M\n⊢ HasMFDerivAt I I' (fun x => c) x 0\n[PROOFSTEP]\nrefine' ⟨continuous_const.continuousAt, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nc✝ c : M'\nx : M\n⊢ HasFDerivWithinAt (writtenInExtChartAt I I' x fun x => c) 0 (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [writtenInExtChartAt, (· ∘ ·), hasFDerivWithinAt_const]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ HasMFDerivAt (ModelWithCorners.prod I I') I Prod.fst x\n    (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd))\n[PROOFSTEP]\nrefine' ⟨continuous_fst.continuousAt, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ HasFDerivWithinAt (writtenInExtChartAt (ModelWithCorners.prod I I') I x Prod.fst)\n    (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)) (range ↑(ModelWithCorners.prod I I'))\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x)\n[PROOFSTEP]\nhave :\n  ∀ᶠ y in 𝓝[range (I.prod I')] extChartAt (I.prod I') x x,\n    (extChartAt I x.1 ∘ Prod.fst ∘ (extChartAt (I.prod I') x).symm) y = y.1 :=\n  by\n  /- porting note: was\n      apply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin (I.prod I') x)\n      mfld_set_tac\n      -/\n  filter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy\n  rw [extChartAt_prod] at hy \n  exact (extChartAt I x.1).right_inv hy.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.fst\n[PROOFSTEP]\nfilter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\ny : E × E'\nhy : y ∈ (extChartAt (ModelWithCorners.prod I I') x).target\n⊢ (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.fst\n[PROOFSTEP]\nrw [extChartAt_prod] at hy \n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\ny : E × E'\nhy : y ∈ (LocalEquiv.prod (extChartAt I x.fst) (extChartAt I' x.snd)).target\n⊢ (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.fst\n[PROOFSTEP]\nexact (extChartAt I x.1).right_inv hy.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\nthis :\n  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.fst\n⊢ HasFDerivWithinAt (writtenInExtChartAt (ModelWithCorners.prod I I') I x Prod.fst)\n    (ContinuousLinearMap.fst 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)) (range ↑(ModelWithCorners.prod I I'))\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x)\n[PROOFSTEP]\napply HasFDerivWithinAt.congr_of_eventuallyEq hasFDerivWithinAt_fst this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\nthis :\n  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.fst\n⊢ (↑(extChartAt I x.fst) ∘ Prod.fst ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x)))\n      (↑(extChartAt (ModelWithCorners.prod I I') x) x) =\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x).fst\n[PROOFSTEP]\nexact (extChartAt I x.1).right_inv <| (extChartAt I x.1).map_source (mem_extChartAt_source _ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx✝ : M\ns : Set (M × M')\nx : M × M'\nhxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x\n⊢ mfderivWithin (ModelWithCorners.prod I I') I Prod.fst s x =\n    ContinuousLinearMap.fst 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)\n[PROOFSTEP]\nrw [MDifferentiable.mfderivWithin (mdifferentiableAt_fst I I') hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx✝ : M\ns : Set (M × M')\nx : M × M'\nhxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x\n⊢ mfderiv (ModelWithCorners.prod I I') I Prod.fst x =\n    ContinuousLinearMap.fst 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)\n[PROOFSTEP]\nexact mfderiv_fst I I'\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\n⊢ tangentMap (ModelWithCorners.prod I I') I Prod.fst p = { proj := p.proj.fst, snd := p.snd.fst }\n[PROOFSTEP]\nsimp [tangentMap]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\n⊢ ↑(ContinuousLinearMap.fst 𝕜 (TangentSpace I p.proj.fst) (TangentSpace I' p.proj.snd)) p.snd = p.snd.fst\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ tangentMapWithin (ModelWithCorners.prod I I') I Prod.fst s p = { proj := p.proj.fst, snd := p.snd.fst }\n[PROOFSTEP]\nsimp only [tangentMapWithin]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ { proj := p.proj.fst, snd := ↑(mfderivWithin (ModelWithCorners.prod I I') I Prod.fst s p.proj) p.snd } =\n    { proj := p.proj.fst, snd := p.snd.fst }\n[PROOFSTEP]\nrw [mfderivWithin_fst]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ { proj := p.proj.fst,\n      snd := ↑(ContinuousLinearMap.fst 𝕜 (TangentSpace I p.proj.fst) (TangentSpace I' p.proj.snd)) p.snd } =\n    { proj := p.proj.fst, snd := p.snd.fst }\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\nproj✝ : M × M'\nsnd✝ : TangentSpace (ModelWithCorners.prod I I') proj✝\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s { proj := proj✝, snd := snd✝ }.proj\n⊢ { proj := { proj := proj✝, snd := snd✝ }.proj.fst,\n      snd :=\n        ↑(ContinuousLinearMap.fst 𝕜 (TangentSpace I { proj := proj✝, snd := snd✝ }.proj.fst)\n              (TangentSpace I' { proj := proj✝, snd := snd✝ }.proj.snd))\n          { proj := proj✝, snd := snd✝ }.snd } =\n    { proj := { proj := proj✝, snd := snd✝ }.proj.fst, snd := { proj := proj✝, snd := snd✝ }.snd.fst }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hxs\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n[PROOFSTEP]\nexact hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ HasMFDerivAt (ModelWithCorners.prod I I') I' Prod.snd x\n    (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd))\n[PROOFSTEP]\nrefine' ⟨continuous_snd.continuousAt, _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ HasFDerivWithinAt (writtenInExtChartAt (ModelWithCorners.prod I I') I' x Prod.snd)\n    (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)) (range ↑(ModelWithCorners.prod I I'))\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x)\n[PROOFSTEP]\nhave :\n  ∀ᶠ y in 𝓝[range (I.prod I')] extChartAt (I.prod I') x x,\n    (extChartAt I' x.2 ∘ Prod.snd ∘ (extChartAt (I.prod I') x).symm) y = y.2 :=\n  by\n  /- porting note: was\n      apply Filter.mem_of_superset (extChartAt_target_mem_nhdsWithin (I.prod I') x)\n      mfld_set_tac\n      -/\n  filter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy\n  rw [extChartAt_prod] at hy \n  exact (extChartAt I' x.2).right_inv hy.2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\n⊢ ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.snd\n[PROOFSTEP]\nfilter_upwards [extChartAt_target_mem_nhdsWithin (I.prod I') x] with y hy\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\ny : E × E'\nhy : y ∈ (extChartAt (ModelWithCorners.prod I I') x).target\n⊢ (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.snd\n[PROOFSTEP]\nrw [extChartAt_prod] at hy \n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\ny : E × E'\nhy : y ∈ (LocalEquiv.prod (extChartAt I x.fst) (extChartAt I' x.snd)).target\n⊢ (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.snd\n[PROOFSTEP]\nexact (extChartAt I' x.2).right_inv hy.2\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\nthis :\n  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.snd\n⊢ HasFDerivWithinAt (writtenInExtChartAt (ModelWithCorners.prod I I') I' x Prod.snd)\n    (ContinuousLinearMap.snd 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)) (range ↑(ModelWithCorners.prod I I'))\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x)\n[PROOFSTEP]\napply HasFDerivWithinAt.congr_of_eventuallyEq hasFDerivWithinAt_snd this\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nx : M × M'\nthis :\n  ∀ᶠ (y : E × E') in 𝓝[range ↑(ModelWithCorners.prod I I')] ↑(extChartAt (ModelWithCorners.prod I I') x) x,\n    (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x))) y = y.snd\n⊢ (↑(extChartAt I' x.snd) ∘ Prod.snd ∘ ↑(LocalEquiv.symm (extChartAt (ModelWithCorners.prod I I') x)))\n      (↑(extChartAt (ModelWithCorners.prod I I') x) x) =\n    (↑(extChartAt (ModelWithCorners.prod I I') x) x).snd\n[PROOFSTEP]\nexact (extChartAt I' x.2).right_inv <| (extChartAt I' x.2).map_source (mem_extChartAt_source _ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx✝ : M\ns : Set (M × M')\nx : M × M'\nhxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x\n⊢ mfderivWithin (ModelWithCorners.prod I I') I' Prod.snd s x =\n    ContinuousLinearMap.snd 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)\n[PROOFSTEP]\nrw [MDifferentiable.mfderivWithin (mdifferentiableAt_snd I I') hxs]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx✝ : M\ns : Set (M × M')\nx : M × M'\nhxs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s x\n⊢ mfderiv (ModelWithCorners.prod I I') I' Prod.snd x =\n    ContinuousLinearMap.snd 𝕜 (TangentSpace I x.fst) (TangentSpace I' x.snd)\n[PROOFSTEP]\nexact mfderiv_snd I I'\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\n⊢ tangentMap (ModelWithCorners.prod I I') I' Prod.snd p = { proj := p.proj.snd, snd := p.snd.snd }\n[PROOFSTEP]\nsimp [tangentMap]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\n⊢ ↑(ContinuousLinearMap.snd 𝕜 (TangentSpace I p.proj.fst) (TangentSpace I' p.proj.snd)) p.snd = p.snd.snd\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ tangentMapWithin (ModelWithCorners.prod I I') I' Prod.snd s p = { proj := p.proj.snd, snd := p.snd.snd }\n[PROOFSTEP]\nsimp only [tangentMapWithin]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ { proj := p.proj.snd, snd := ↑(mfderivWithin (ModelWithCorners.prod I I') I' Prod.snd s p.proj) p.snd } =\n    { proj := p.proj.snd, snd := p.snd.snd }\n[PROOFSTEP]\nrw [mfderivWithin_snd]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ { proj := p.proj.snd,\n      snd := ↑(ContinuousLinearMap.snd 𝕜 (TangentSpace I p.proj.fst) (TangentSpace I' p.proj.snd)) p.snd } =\n    { proj := p.proj.snd, snd := p.snd.snd }\n[PROOFSTEP]\nrcases p with ⟨⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\nproj✝ : M × M'\nsnd✝ : TangentSpace (ModelWithCorners.prod I I') proj✝\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s { proj := proj✝, snd := snd✝ }.proj\n⊢ { proj := { proj := proj✝, snd := snd✝ }.proj.snd,\n      snd :=\n        ↑(ContinuousLinearMap.snd 𝕜 (TangentSpace I { proj := proj✝, snd := snd✝ }.proj.fst)\n              (TangentSpace I' { proj := proj✝, snd := snd✝ }.proj.snd))\n          { proj := proj✝, snd := snd✝ }.snd } =\n    { proj := { proj := proj✝, snd := snd✝ }.proj.snd, snd := { proj := proj✝, snd := snd✝ }.snd.snd }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hxs\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns✝ : Set M\nx : M\ns : Set (M × M')\np : TangentBundle (ModelWithCorners.prod I I') (M × M')\nhs : UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I I') s p.proj\n[PROOFSTEP]\nexact hs\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nf : M → M'\ng : M → M''\nx : M\nhf : MDifferentiableAt I I' f x\nhg : MDifferentiableAt I I'' g x\n⊢ mfderiv I (ModelWithCorners.prod I' I'') (fun x => (f x, g x)) x =\n    ContinuousLinearMap.prod (mfderiv I I' f x) (mfderiv I I'' g x)\n[PROOFSTEP]\nclassical\nsimp_rw [mfderiv, if_pos (hf.prod_mk hg), if_pos hf, if_pos hg]\nexact hf.2.fderivWithin_prod hg.2 (I.unique_diff _ (mem_range_self _))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nf : M → M'\ng : M → M''\nx : M\nhf : MDifferentiableAt I I' f x\nhg : MDifferentiableAt I I'' g x\n⊢ mfderiv I (ModelWithCorners.prod I' I'') (fun x => (f x, g x)) x =\n    ContinuousLinearMap.prod (mfderiv I I' f x) (mfderiv I I'' g x)\n[PROOFSTEP]\nsimp_rw [mfderiv, if_pos (hf.prod_mk hg), if_pos hf, if_pos hg]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\nf : M → M'\ng : M → M''\nx : M\nhf : MDifferentiableAt I I' f x\nhg : MDifferentiableAt I I'' g x\n⊢ fderivWithin 𝕜 (writtenInExtChartAt I (ModelWithCorners.prod I' I'') x fun x => (f x, g x)) (range ↑I)\n      (↑(extChartAt I x) x) =\n    ContinuousLinearMap.prod (fderivWithin 𝕜 (writtenInExtChartAt I I' x f) (range ↑I) (↑(extChartAt I x) x))\n      (fderivWithin 𝕜 (writtenInExtChartAt I I'' x g) (range ↑I) (↑(extChartAt I x) x))\n[PROOFSTEP]\nexact hf.2.fderivWithin_prod hg.2 (I.unique_diff _ (mem_range_self _))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx x₀ : M\ny₀ : M'\n⊢ mfderiv I (ModelWithCorners.prod I I') (fun x => (x, y₀)) x₀ =\n    ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)\n[PROOFSTEP]\nrefine' ((mdifferentiableAt_id I).mfderiv_prod (mdifferentiableAt_const I I')).trans _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx x₀ : M\ny₀ : M'\n⊢ ContinuousLinearMap.prod (mfderiv I I id x₀) (mfderiv I I' (fun x => y₀) x₀) =\n    ContinuousLinearMap.inl 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)\n[PROOFSTEP]\nrw [mfderiv_id, mfderiv_const, ContinuousLinearMap.inl]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx x₀ : M\ny₀ : M'\n⊢ mfderiv I' (ModelWithCorners.prod I I') (fun y => (x₀, y)) y₀ =\n    ContinuousLinearMap.inr 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)\n[PROOFSTEP]\nrefine' ((mdifferentiableAt_const I' I).mfderiv_prod (mdifferentiableAt_id I')).trans _\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx x₀ : M\ny₀ : M'\n⊢ ContinuousLinearMap.prod (mfderiv I' I (fun x => x₀) y₀) (mfderiv I' I' id y₀) =\n    ContinuousLinearMap.inr 𝕜 (TangentSpace I x₀) (TangentSpace I' y₀)\n[PROOFSTEP]\nrw [mfderiv_id, mfderiv_const, ContinuousLinearMap.inr]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f p\n⊢ mfderiv (ModelWithCorners.prod I I') I'' f p =\n    let_fun this :=\n      mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (z.fst, p.snd)) p +\n        mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (p.fst, z.snd)) p;\n    this\n[PROOFSTEP]\ndsimp only\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f p\n⊢ mfderiv (ModelWithCorners.prod I I') I'' f p =\n    mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (z.fst, p.snd)) p +\n      mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (p.fst, z.snd)) p\n[PROOFSTEP]\nrw [← @Prod.mk.eta _ _ p] at hf \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f (p.fst, p.snd)\n⊢ mfderiv (ModelWithCorners.prod I I') I'' f p =\n    mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (z.fst, p.snd)) p +\n      mfderiv (ModelWithCorners.prod I I') I'' (fun z => f (p.fst, z.snd)) p\n[PROOFSTEP]\nerw [mfderiv_comp_of_eq hf ((mdifferentiableAt_fst I I').prod_mk (mdifferentiableAt_const _ _)) rfl,\n  mfderiv_comp_of_eq hf ((mdifferentiableAt_const _ _).prod_mk (mdifferentiableAt_snd I I')) rfl, ←\n  ContinuousLinearMap.comp_add, (mdifferentiableAt_fst I I').mfderiv_prod (mdifferentiableAt_const (I.prod I') I'),\n  (mdifferentiableAt_const (I.prod I') I).mfderiv_prod (mdifferentiableAt_snd I I'), mfderiv_fst, mfderiv_snd,\n  mfderiv_const, mfderiv_const]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f (p.fst, p.snd)\n⊢ mfderiv (ModelWithCorners.prod I I') I'' f p =\n    ContinuousLinearMap.comp (mfderiv (ModelWithCorners.prod I I') I'' f (p.fst, p.snd))\n      (ContinuousLinearMap.prod (ContinuousLinearMap.fst 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd)) 0 +\n        ContinuousLinearMap.prod 0 (ContinuousLinearMap.snd 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd)))\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f (p.fst, p.snd)\n⊢ ContinuousLinearMap.comp (mfderiv (ModelWithCorners.prod I I') I'' f (p.fst, p.snd))\n      (ContinuousLinearMap.prod (ContinuousLinearMap.fst 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd)) 0 +\n        ContinuousLinearMap.prod 0 (ContinuousLinearMap.snd 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd))) =\n    mfderiv (ModelWithCorners.prod I I') I'' f p\n[PROOFSTEP]\nconvert ContinuousLinearMap.comp_id <| mfderiv (.prod I I') I'' f (p.1, p.2)\n[GOAL]\ncase h.e'_2.h.e'_24\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\nf : M × M' → M''\np : M × M'\nhf : MDifferentiableAt (ModelWithCorners.prod I I') I'' f (p.fst, p.snd)\n⊢ ContinuousLinearMap.prod (ContinuousLinearMap.fst 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd)) 0 +\n      ContinuousLinearMap.prod 0 (ContinuousLinearMap.snd 𝕜 (TangentSpace I p.fst) (TangentSpace I' p.snd)) =\n    ContinuousLinearMap.id 𝕜 (TangentSpace (ModelWithCorners.prod I I') (p.fst, p.snd))\n[PROOFSTEP]\nexact ContinuousLinearMap.coprod_inl_inr\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nf g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nhf : HasMFDerivAt I 𝓘(𝕜, E') (-f) z (-f')\n⊢ HasMFDerivAt I 𝓘(𝕜, E') f z f'\n[PROOFSTEP]\nconvert hf.neg\n[GOAL]\ncase h.e'_23\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nf g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nhf : HasMFDerivAt I 𝓘(𝕜, E') (-f) z (-f')\n⊢ f = - -f\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\ncase h.e'_25\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nf g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nhf : HasMFDerivAt I 𝓘(𝕜, E') (-f) z (-f')\ne_23✝ : f = - -f\n⊢ f' = - -f'\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nf g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nhf : MDifferentiableAt I 𝓘(𝕜, E') (-f) z\n⊢ MDifferentiableAt I 𝓘(𝕜, E') f z\n[PROOFSTEP]\nconvert hf.neg\n[GOAL]\ncase h.e'_21\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nf g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nhf : MDifferentiableAt I 𝓘(𝕜, E') (-f) z\n⊢ f = - -f\n[PROOFSTEP]\nrw [neg_neg]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\n⊢ mfderiv I 𝓘(𝕜, E') (-f) x = -mfderiv I 𝓘(𝕜, E') f x\n[PROOFSTEP]\nsimp_rw [mfderiv]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\n⊢ (if MDifferentiableAt I 𝓘(𝕜, E') (-f) x then\n      fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x (-f)) (range ↑I) (↑(extChartAt I x) x)\n    else 0) =\n    -if MDifferentiableAt I 𝓘(𝕜, E') f x then\n        fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x f) (range ↑I) (↑(extChartAt I x) x)\n      else 0\n[PROOFSTEP]\nby_cases hf : MDifferentiableAt I 𝓘(𝕜, E') f x\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\nhf : MDifferentiableAt I 𝓘(𝕜, E') f x\n⊢ (if MDifferentiableAt I 𝓘(𝕜, E') (-f) x then\n      fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x (-f)) (range ↑I) (↑(extChartAt I x) x)\n    else 0) =\n    -if MDifferentiableAt I 𝓘(𝕜, E') f x then\n        fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x f) (range ↑I) (↑(extChartAt I x) x)\n      else 0\n[PROOFSTEP]\nexact hf.hasMFDerivAt.neg.mfderiv\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\nhf : ¬MDifferentiableAt I 𝓘(𝕜, E') f x\n⊢ (if MDifferentiableAt I 𝓘(𝕜, E') (-f) x then\n      fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x (-f)) (range ↑I) (↑(extChartAt I x) x)\n    else 0) =\n    -if MDifferentiableAt I 𝓘(𝕜, E') f x then\n        fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x f) (range ↑I) (↑(extChartAt I x) x)\n      else 0\n[PROOFSTEP]\nrw [if_neg hf]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\nhf : ¬MDifferentiableAt I 𝓘(𝕜, E') f x\n⊢ (if MDifferentiableAt I 𝓘(𝕜, E') (-f) x then\n      fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x (-f)) (range ↑I) (↑(extChartAt I x) x)\n    else 0) =\n    -0\n[PROOFSTEP]\nrw [← mdifferentiableAt_neg] at hf \n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ z : M\nf✝ g : M → E'\nf' g' : TangentSpace I z →L[𝕜] E'\nf : M → E'\nx : M\nhf : ¬MDifferentiableAt I 𝓘(𝕜, E') (-f) x\n⊢ (if MDifferentiableAt I 𝓘(𝕜, E') (-f) x then\n      fderivWithin 𝕜 (writtenInExtChartAt I 𝓘(𝕜, E') x (-f)) (range ↑I) (↑(extChartAt I x) x)\n    else 0) =\n    -0\n[PROOFSTEP]\nrw [if_neg hf, neg_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁶ : TopologicalSpace M\ninst✝¹⁵ : ChartedSpace H M\ninst✝¹⁴ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹⁰ : TopologicalSpace M'\ninst✝⁹ : ChartedSpace H' M'\ninst✝⁸ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ninst✝² : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nF' : Type u_11\ninst✝¹ : NormedRing F'\ninst✝ : NormedAlgebra 𝕜 F'\np q : M → F'\np' q' : TangentSpace I z →L[𝕜] F'\nhp : HasMFDerivWithinAt I 𝓘(𝕜, F') p s z p'\nhq : HasMFDerivWithinAt I 𝓘(𝕜, F') q s z q'\n⊢ HasFDerivWithinAt (writtenInExtChartAt I 𝓘(𝕜, F') z (p * q)) (p z • q' + ContinuousLinearMap.smulRight p' (q z))\n    (↑(LocalEquiv.symm (extChartAt I z)) ⁻¹' s ∩ range ↑I) (↑(extChartAt I z) z)\n[PROOFSTEP]\nsimpa only [mfld_simps] using hp.2.mul' hq.2\n[GOAL]\n𝕜 : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁶ : TopologicalSpace M\ninst✝¹⁵ : ChartedSpace H M\ninst✝¹⁴ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹⁰ : TopologicalSpace M'\ninst✝⁹ : ChartedSpace H' M'\ninst✝⁸ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ninst✝² : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nF' : Type u_11\ninst✝¹ : NormedCommRing F'\ninst✝ : NormedAlgebra 𝕜 F'\np q : M → F'\np' q' : TangentSpace I z →L[𝕜] F'\nhp : HasMFDerivWithinAt I 𝓘(𝕜, F') p s z p'\nhq : HasMFDerivWithinAt I 𝓘(𝕜, F') q s z q'\n⊢ HasMFDerivWithinAt I 𝓘(𝕜, F') (p * q) s z (p z • q' + q z • p')\n[PROOFSTEP]\nconvert hp.mul' hq\n[GOAL]\ncase h.e'_26.h.e'_6\n𝕜 : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁶ : TopologicalSpace M\ninst✝¹⁵ : ChartedSpace H M\ninst✝¹⁴ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹⁰ : TopologicalSpace M'\ninst✝⁹ : ChartedSpace H' M'\ninst✝⁸ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ninst✝² : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nF' : Type u_11\ninst✝¹ : NormedCommRing F'\ninst✝ : NormedAlgebra 𝕜 F'\np q : M → F'\np' q' : TangentSpace I z →L[𝕜] F'\nhp : HasMFDerivWithinAt I 𝓘(𝕜, F') p s z p'\nhq : HasMFDerivWithinAt I 𝓘(𝕜, F') q s z q'\n⊢ q z • p' = ContinuousLinearMap.smulRight p' (q z)\n[PROOFSTEP]\next _\n[GOAL]\ncase h.e'_26.h.e'_6.h\n𝕜 : Type u_1\ninst✝²⁰ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁹ : NormedAddCommGroup E\ninst✝¹⁸ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁷ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁶ : TopologicalSpace M\ninst✝¹⁵ : ChartedSpace H M\ninst✝¹⁴ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹³ : NormedAddCommGroup E'\ninst✝¹² : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹¹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹⁰ : TopologicalSpace M'\ninst✝⁹ : ChartedSpace H' M'\ninst✝⁸ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ninst✝² : SmoothManifoldWithCorners I'' M''\ns : Set M\nx z : M\nF' : Type u_11\ninst✝¹ : NormedCommRing F'\ninst✝ : NormedAlgebra 𝕜 F'\np q : M → F'\np' q' : TangentSpace I z →L[𝕜] F'\nhp : HasMFDerivWithinAt I 𝓘(𝕜, F') p s z p'\nhq : HasMFDerivWithinAt I 𝓘(𝕜, F') q s z q'\nx✝ : TangentSpace I z\n⊢ ↑(q z • p') x✝ = ↑(ContinuousLinearMap.smulRight p' (q z)) x✝\n[PROOFSTEP]\napply mul_comm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\n⊢ MDifferentiableAt I I (↑e) x\n[PROOFSTEP]\nrefine' ⟨(e.continuousOn x hx).continuousAt (IsOpen.mem_nhds e.open_source hx), _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave mem : I ((chartAt H x : M → H) x) ∈ I.symm ⁻¹' ((chartAt H x).symm ≫ₕ e).source ∩ range I := by\n  simp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\n⊢ ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave : (chartAt H x).symm.trans e ∈ contDiffGroupoid ∞ I := HasGroupoid.compatible (chart_mem_atlas H x) h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave A :\n  ContDiffOn 𝕜 ∞ (I ∘ (chartAt H x).symm.trans e ∘ I.symm) (I.symm ⁻¹' ((chartAt H x).symm.trans e).source ∩ range I) :=\n  this.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave B := A.differentiableOn le_top (I ((chartAt H x : M → H) x)) mem\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\nB :\n  DifferentiableWithinAt 𝕜 (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\n    (↑I (↑(chartAt H x) x))\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfld_simps] at B \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\nB :\n  DifferentiableWithinAt 𝕜 (↑I ∘ (↑e ∘ ↑(LocalHomeomorph.symm (chartAt H x))) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (chartAt H x).toLocalEquiv.target ∩\n        ↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm (chartAt H x)) ⁻¹' e.source) ∩\n      range ↑I)\n    (↑I (↑(chartAt H x) x))\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrw [inter_comm, differentiableWithinAt_inter] at B \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\nB :\n  DifferentiableWithinAt 𝕜 (↑I ∘ (↑e ∘ ↑(LocalHomeomorph.symm (chartAt H x))) ∘ ↑(ModelWithCorners.symm I)) (range ↑I)\n    (↑I (↑(chartAt H x) x))\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑e) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimpa only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : M\nhx : x ∈ e.source\nmem :\n  ↑I (↑(chartAt H x) x) ∈\n    ↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I\nthis : LocalHomeomorph.symm (chartAt H x) ≫ₕ e ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm (chartAt H x) ≫ₕ e) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm (chartAt H x) ≫ₕ e).toLocalEquiv.source ∩ range ↑I)\nB :\n  DifferentiableWithinAt 𝕜 (↑I ∘ (↑e ∘ ↑(LocalHomeomorph.symm (chartAt H x))) ∘ ↑(ModelWithCorners.symm I))\n    (range ↑I ∩\n      (↑(ModelWithCorners.symm I) ⁻¹' (chartAt H x).toLocalEquiv.target ∩\n        ↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm (chartAt H x)) ⁻¹' e.source)))\n    (↑I (↑(chartAt H x) x))\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' (chartAt H x).toLocalEquiv.target ∩\n      ↑(ModelWithCorners.symm I) ⁻¹' (↑(LocalHomeomorph.symm (chartAt H x)) ⁻¹' e.source) ∈\n    𝓝 (↑I (↑(chartAt H x) x))\n[PROOFSTEP]\napply IsOpen.mem_nhds ((LocalHomeomorph.open_source _).preimage I.continuous_symm) mem.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\n⊢ MDifferentiableAt I I (↑(LocalHomeomorph.symm e)) x\n[PROOFSTEP]\nrefine' ⟨(e.continuousOn_symm x hx).continuousAt (IsOpen.mem_nhds e.open_target hx), _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave mem : I x ∈ I.symm ⁻¹' (e.symm ≫ₕ chartAt H (e.symm x)).source ∩ range I := by simp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\n⊢ ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\n[PROOFSTEP]\nsimp only [hx, mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave : e.symm.trans (chartAt H (e.symm x)) ∈ contDiffGroupoid ∞ I := HasGroupoid.compatible h (chart_mem_atlas H _)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave A :\n  ContDiffOn 𝕜 ∞ (I ∘ e.symm.trans (chartAt H (e.symm x)) ∘ I.symm)\n    (I.symm ⁻¹' (e.symm.trans (chartAt H (e.symm x))).source ∩ range I) :=\n  this.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nhave B := A.differentiableOn le_top (I x) mem\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\nB :\n  DifferentiableWithinAt 𝕜\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\n    (↑I x)\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimp only [mfld_simps] at B \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\nB :\n  DifferentiableWithinAt 𝕜\n    (↑I ∘ (↑(chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩\n        ↑(ModelWithCorners.symm I) ⁻¹'\n          (↑(LocalHomeomorph.symm e) ⁻¹' (chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source) ∩\n      range ↑I)\n    (↑I x)\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nrw [inter_comm, differentiableWithinAt_inter] at B \n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\nB :\n  DifferentiableWithinAt 𝕜\n    (↑I ∘ (↑(chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (range ↑I) (↑I x)\n⊢ DifferentiableWithinAt 𝕜 (writtenInExtChartAt I I x ↑(LocalHomeomorph.symm e)) (range ↑I) (↑(extChartAt I x) x)\n[PROOFSTEP]\nsimpa only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx✝ : M\ne : LocalHomeomorph M H\nh : e ∈ atlas H M\nx : H\nhx : x ∈ e.target\nmem :\n  ↑I x ∈\n    ↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I\nthis : LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x) ∈ contDiffGroupoid ⊤ I\nA :\n  ContDiffOn 𝕜 ⊤\n    (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(ModelWithCorners.symm I))\n    (↑(ModelWithCorners.symm I) ⁻¹'\n        (LocalHomeomorph.symm e ≫ₕ chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source ∩\n      range ↑I)\nB :\n  DifferentiableWithinAt 𝕜\n    (↑I ∘ (↑(chartAt H (↑(LocalHomeomorph.symm e) x)) ∘ ↑(LocalHomeomorph.symm e)) ∘ ↑(ModelWithCorners.symm I))\n    (range ↑I ∩\n      (↑(ModelWithCorners.symm I) ⁻¹' e.target ∩\n        ↑(ModelWithCorners.symm I) ⁻¹'\n          (↑(LocalHomeomorph.symm e) ⁻¹' (chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source)))\n    (↑I x)\n⊢ ↑(ModelWithCorners.symm I) ⁻¹' e.target ∩\n      ↑(ModelWithCorners.symm I) ⁻¹'\n        (↑(LocalHomeomorph.symm e) ⁻¹' (chartAt H (↑(LocalHomeomorph.symm e) x)).toLocalEquiv.source) ∈\n    𝓝 (↑I x)\n[PROOFSTEP]\napply IsOpen.mem_nhds ((LocalHomeomorph.open_source _).preimage I.continuous_symm) mem.1\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np q : TangentBundle I M\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.source\n⊢ tangentMap I I (↑(chartAt H p.proj)) q = ↑(TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)\n[PROOFSTEP]\ndsimp [tangentMap]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np q : TangentBundle I M\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.source\n⊢ { proj := ↑(chartAt H p.proj) q.proj, snd := ↑(mfderiv I I (↑(chartAt H p.proj)) q.proj) q.snd } =\n    ↑(TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)\n[PROOFSTEP]\nrw [MDifferentiableAt.mfderiv]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np q : TangentBundle I M\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.source\n⊢ { proj := ↑(chartAt H p.proj) q.proj,\n      snd :=\n        ↑(fderivWithin 𝕜 (writtenInExtChartAt I I q.proj ↑(chartAt H p.proj)) (range ↑I)\n              (↑(extChartAt I q.proj) q.proj))\n          q.snd } =\n    ↑(TotalSpace.toProd H E).symm (↑(chartAt (ModelProd H E) p) q)\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np q : TangentBundle I M\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.source\n⊢ MDifferentiableAt I I (↑(chartAt H p.proj)) q.proj\n[PROOFSTEP]\nexact mdifferentiableAt_atlas _ (chart_mem_atlas _ _) h\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np : TangentBundle I M\nq : TangentBundle I H\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.target\n⊢ tangentMap I I (↑(LocalHomeomorph.symm (chartAt H p.proj))) q =\n    ↑(LocalHomeomorph.symm (chartAt (ModelProd H E) p)) (↑(TotalSpace.toProd H E) q)\n[PROOFSTEP]\ndsimp only [tangentMap]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np : TangentBundle I M\nq : TangentBundle I H\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.target\n⊢ { proj := ↑(LocalHomeomorph.symm (chartAt H p.proj)) q.proj,\n      snd := ↑(mfderiv I I (↑(LocalHomeomorph.symm (chartAt H p.proj))) q.proj) q.snd } =\n    ↑(LocalHomeomorph.symm (chartAt (ModelProd H E) p)) (↑(TotalSpace.toProd H E) q)\n[PROOFSTEP]\nrw [MDifferentiableAt.mfderiv (mdifferentiableAt_atlas_symm _ (chart_mem_atlas _ _) h)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np : TangentBundle I M\nq : TangentBundle I H\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.target\n⊢ { proj := ↑(LocalHomeomorph.symm (chartAt H p.proj)) q.proj,\n      snd :=\n        ↑(fderivWithin 𝕜 (writtenInExtChartAt I I q.proj ↑(LocalHomeomorph.symm (chartAt H p.proj))) (range ↑I)\n              (↑(extChartAt I q.proj) q.proj))\n          q.snd } =\n    ↑(LocalHomeomorph.symm (chartAt (ModelProd H E) p)) (↑(TotalSpace.toProd H E) q)\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_coe, TangentBundle.chartAt, h, tangentBundleCore, mfld_simps, (· ∘ ·)]\n  -- `simp` fails to apply `LocalEquiv.prod_symm` with `ModelProd`\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np : TangentBundle I M\nq : TangentBundle I H\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.target\n⊢ { proj := ↑(LocalHomeomorph.symm (chartAt H p.proj)) q.proj,\n      snd :=\n        ↑(fderivWithin 𝕜\n              (fun x =>\n                ↑I\n                  (↑(chartAt H (↑(LocalHomeomorph.symm (chartAt H p.proj)) q.proj))\n                    (↑(LocalHomeomorph.symm (chartAt H p.proj)) (↑(ModelWithCorners.symm I) x))))\n              (range ↑I) (↑I q.proj))\n          q.snd } =\n    ↑(LocalHomeomorph.symm\n          (FiberBundleCore.localTriv\n              (VectorBundleCore.toFiberBundleCore\n                { baseSet := fun i => (↑i).source, isOpen_baseSet := (_ : ∀ (i : ↑(atlas H M)), IsOpen (↑i).source),\n                  indexAt := achart H, mem_baseSet_at := (_ : ∀ (x : M), x ∈ (chartAt H x).toLocalEquiv.source),\n                  coordChange := fun i j x =>\n                    fderivWithin 𝕜 (fun x => ↑I (↑↑j (↑(LocalHomeomorph.symm ↑i) (↑(ModelWithCorners.symm I) x))))\n                      (range ↑I) (↑I (↑↑i x)),\n                  coordChange_self :=\n                    (_ :\n                      ∀ (i : ↑(atlas H M)) (x : M),\n                        x ∈ (fun i => (↑i).source) i →\n                          ∀ (v : E),\n                            ↑((fun i j x =>\n                                      fderivWithin 𝕜\n                                        (↑(LocalHomeomorph.extend (↑j) I) ∘\n                                          ↑(LocalEquiv.symm (LocalHomeomorph.extend (↑i) I)))\n                                        (range ↑I) (↑(LocalHomeomorph.extend (↑i) I) x))\n                                    i i x)\n                                v =\n                              v),\n                  continuousOn_coordChange :=\n                    (_ :\n                      ∀ (i j : ↑(atlas H M)),\n                        ContinuousOn\n                          (fderivWithin 𝕜\n                              (↑(LocalHomeomorph.extend (↑j) I) ∘ ↑(LocalEquiv.symm (LocalHomeomorph.extend (↑i) I)))\n                              (range ↑I) ∘\n                            fun x => ↑(LocalHomeomorph.extend (↑i) I) x)\n                          ((fun i => (↑i).source) i ∩ (fun i => (↑i).source) j)),\n                  coordChange_comp :=\n                    (_ :\n                      ∀ (i j k : ↑(atlas H M)) (x : M),\n                        x ∈ (fun i => (↑i).source) i ∩ (fun i => (↑i).source) j ∩ (fun i => (↑i).source) k →\n                          ∀ (v : E),\n                            ↑((fun i j x =>\n                                      fderivWithin 𝕜\n                                        (↑(LocalHomeomorph.extend (↑j) I) ∘\n                                          ↑(LocalEquiv.symm (LocalHomeomorph.extend (↑i) I)))\n                                        (range ↑I) (↑(LocalHomeomorph.extend (↑i) I) x))\n                                    j k x)\n                                (↑((fun i j x =>\n                                        fderivWithin 𝕜\n                                          (↑(LocalHomeomorph.extend (↑j) I) ∘\n                                            ↑(LocalEquiv.symm (LocalHomeomorph.extend (↑i) I)))\n                                          (range ↑I) (↑(LocalHomeomorph.extend (↑i) I) x))\n                                      i j x)\n                                  v) =\n                              ↑((fun i j x =>\n                                      fderivWithin 𝕜\n                                        (↑(LocalHomeomorph.extend (↑j) I) ∘\n                                          ↑(LocalEquiv.symm (LocalHomeomorph.extend (↑i) I)))\n                                        (range ↑I) (↑(LocalHomeomorph.extend (↑i) I) x))\n                                    i k x)\n                                v) })\n              (achart H p.proj)).toLocalHomeomorph)\n      (↑(LocalHomeomorph.symm (LocalHomeomorph.prod (chartAt H p.proj) (LocalHomeomorph.refl E))) (q.proj, q.snd))\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_snd.e_a.e_x.e_a\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\ninst✝¹² : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹¹ : NormedAddCommGroup E'\ninst✝¹⁰ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝⁹ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁸ : TopologicalSpace M'\ninst✝⁷ : ChartedSpace H' M'\ninst✝⁶ : SmoothManifoldWithCorners I' M'\nE'' : Type u_8\ninst✝⁵ : NormedAddCommGroup E''\ninst✝⁴ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝³ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝² : TopologicalSpace M''\ninst✝¹ : ChartedSpace H'' M''\ninst✝ : SmoothManifoldWithCorners I'' M''\ns : Set M\nx : M\ne : LocalHomeomorph M H\np : TangentBundle I M\nq : TangentBundle I H\nh : q.proj ∈ (chartAt H p.proj).toLocalEquiv.target\n⊢ q.proj =\n    ↑↑(achart H p.proj)\n      (↑(LocalHomeomorph.symm (LocalHomeomorph.prod (chartAt H p.proj) (LocalHomeomorph.refl E))) (q.proj, q.snd)).fst\n[PROOFSTEP]\nexact ((chartAt H (TotalSpace.proj p)).right_inv h).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\n⊢ ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x) =\n    ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nhave : mfderiv I I (e.symm ∘ e) x = (mfderiv I' I e.symm (e x)).comp (mfderiv I I' e x) :=\n  mfderiv_comp x (he.mdifferentiableAt_symm (e.map_source hx)) (he.mdifferentiableAt hx)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\n⊢ ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x) =\n    ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\n⊢ mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nhave : mfderiv I I (_root_.id : M → M) x = ContinuousLinearMap.id _ _ := mfderiv_id I\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis✝ :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\nthis : mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n⊢ mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n[PROOFSTEP]\nrw [← this]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis✝ :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\nthis : mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n⊢ mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x = mfderiv I I id x\n[PROOFSTEP]\napply Filter.EventuallyEq.mfderiv_eq\n[GOAL]\ncase hL\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis✝ :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\nthis : mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\n⊢ ↑(LocalHomeomorph.symm e) ∘ ↑e =ᶠ[𝓝 x] id\n[PROOFSTEP]\nhave : e.source ∈ 𝓝 x := IsOpen.mem_nhds e.open_source hx\n[GOAL]\ncase hL\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis✝¹ :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\nthis✝ : mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\nthis : e.source ∈ 𝓝 x\n⊢ ↑(LocalHomeomorph.symm e) ∘ ↑e =ᶠ[𝓝 x] id\n[PROOFSTEP]\nexact Filter.mem_of_superset this (by mfld_set_tac)\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nthis✝¹ :\n  mfderiv I I (↑(LocalHomeomorph.symm e) ∘ ↑e) x =\n    ContinuousLinearMap.comp (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (mfderiv I I' (↑e) x)\nthis✝ : mfderiv I I id x = ContinuousLinearMap.id 𝕜 (TangentSpace I x)\nthis : e.source ∈ 𝓝 x\n⊢ e.source ⊆ {x | (fun x => (↑(LocalHomeomorph.symm e) ∘ ↑e) x = id x) x}\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I x\n⊢ ↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (AddHom.toFun src✝.toAddHom y) = y\n[PROOFSTEP]\nhave : (ContinuousLinearMap.id _ _ : TangentSpace I x →L[𝕜] TangentSpace I x) y = y := rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I x\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I x)) y = y\n⊢ ↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) (AddHom.toFun src✝.toAddHom y) = y\n[PROOFSTEP]\nconv_rhs => rw [← this, ← he.symm_comp_deriv hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I x\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I x)) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.symm_comp_deriv hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I x\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I x)) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.symm_comp_deriv hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I x\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I x)) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.symm_comp_deriv hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\n⊢ AddHom.toFun src✝.toAddHom (↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) y) = y\n[PROOFSTEP]\nhave : (ContinuousLinearMap.id 𝕜 _ : TangentSpace I' (e x) →L[𝕜] TangentSpace I' (e x)) y = y := rfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n⊢ AddHom.toFun src✝.toAddHom (↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) y) = y\n[PROOFSTEP]\nconv_rhs => rw [← this, ← he.comp_symm_deriv (e.map_source hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.comp_symm_deriv (e.map_source hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.comp_symm_deriv (e.map_source hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n| y\n[PROOFSTEP]\nrw [← this, ← he.comp_symm_deriv (e.map_source hx)]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n⊢ AddHom.toFun src✝.toAddHom (↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) y) =\n    ↑(ContinuousLinearMap.comp (mfderiv I I' (↑e) (↑(LocalHomeomorph.symm e) (↑e x)))\n          (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)))\n      y\n[PROOFSTEP]\nrw [e.left_inv hx]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nx : M\nhx : x ∈ e.source\nsrc✝ : TangentSpace I x →L[𝕜] TangentSpace I' (↑e x) := mfderiv I I' (↑e) x\ny : TangentSpace I' (↑e x)\nthis : ↑(ContinuousLinearMap.id 𝕜 (TangentSpace I' (↑e x))) y = y\n⊢ AddHom.toFun src✝.toAddHom (↑(mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x)) y) =\n    ↑(ContinuousLinearMap.comp (mfderiv I I' (↑e) x) (mfderiv I' I (↑(LocalHomeomorph.symm e)) (↑e x))) y\n[PROOFSTEP]\nrfl\n[GOAL]\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\n⊢ MDifferentiable I I'' (e ≫ₕ e')\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\n⊢ MDifferentiableOn I I'' (↑(e ≫ₕ e')) (e ≫ₕ e').toLocalEquiv.source\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase left\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\nx : M\nhx : x ∈ (e ≫ₕ e').toLocalEquiv.source\n⊢ MDifferentiableWithinAt I I'' (↑(e ≫ₕ e')) (e ≫ₕ e').toLocalEquiv.source x\n[PROOFSTEP]\nsimp only [mfld_simps] at hx \n[GOAL]\ncase left\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\nx : M\nhx : x ∈ e.source ∧ ↑e x ∈ e'.source\n⊢ MDifferentiableWithinAt I I'' (↑(e ≫ₕ e')) (e ≫ₕ e').toLocalEquiv.source x\n[PROOFSTEP]\nexact ((he'.mdifferentiableAt hx.2).comp _ (he.mdifferentiableAt hx.1)).mdifferentiableWithinAt\n[GOAL]\ncase right\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\n⊢ MDifferentiableOn I'' I (↑(LocalHomeomorph.symm (e ≫ₕ e'))) (e ≫ₕ e').toLocalEquiv.target\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase right\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\nx : M''\nhx : x ∈ (e ≫ₕ e').toLocalEquiv.target\n⊢ MDifferentiableWithinAt I'' I (↑(LocalHomeomorph.symm (e ≫ₕ e'))) (e ≫ₕ e').toLocalEquiv.target x\n[PROOFSTEP]\nsimp only [mfld_simps] at hx \n[GOAL]\ncase right\n𝕜 : Type u_1\ninst✝¹⁸ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹⁷ : NormedAddCommGroup E\ninst✝¹⁶ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁵ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁴ : TopologicalSpace M\ninst✝¹³ : ChartedSpace H M\nE' : Type u_5\ninst✝¹² : NormedAddCommGroup E'\ninst✝¹¹ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹⁰ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝⁹ : TopologicalSpace M'\ninst✝⁸ : ChartedSpace H' M'\nE'' : Type u_8\ninst✝⁷ : NormedAddCommGroup E''\ninst✝⁶ : NormedSpace 𝕜 E''\nH'' : Type u_9\ninst✝⁵ : TopologicalSpace H''\nI'' : ModelWithCorners 𝕜 E'' H''\nM'' : Type u_10\ninst✝⁴ : TopologicalSpace M''\ninst✝³ : ChartedSpace H'' M''\ne : LocalHomeomorph M M'\nhe : MDifferentiable I I' e\ne' : LocalHomeomorph M' M''\ninst✝² : SmoothManifoldWithCorners I M\ninst✝¹ : SmoothManifoldWithCorners I' M'\ninst✝ : SmoothManifoldWithCorners I'' M''\nhe' : MDifferentiable I' I'' e'\nx : M''\nhx : x ∈ e'.target ∧ ↑(LocalHomeomorph.symm e') x ∈ e.target\n⊢ MDifferentiableWithinAt I'' I (↑(LocalHomeomorph.symm (e ≫ₕ e'))) (e ≫ₕ e').toLocalEquiv.target x\n[PROOFSTEP]\nexact ((he.symm.mdifferentiableAt hx.2).comp _ (he'.symm.mdifferentiableAt hx.1)).mdifferentiableWithinAt\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\n⊢ UniqueMDiffWithinAt I' (f '' s) (f x)\n[PROOFSTEP]\nhave := hs.inter' <| hf.1 (extChartAt_source_mem_nhds I' (f x))\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ UniqueMDiffWithinAt I' (f '' s) (f x)\n[PROOFSTEP]\nrefine (((hf.2.mono ?sub1).uniqueDiffWithinAt this hd).mono ?sub2).congr_pt ?pt\n[GOAL]\ncase sub1\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I ⊆\n    ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I\ncase sub2\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f ''\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n    ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\ncase pt\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n[PROOFSTEP]\ncase pt => simp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n[PROOFSTEP]\ncase pt => simp only [mfld_simps]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f (↑(extChartAt I x) x) = ↑(extChartAt I' (f x)) (f x)\n[PROOFSTEP]\nsimp only [mfld_simps]\n[GOAL]\ncase sub1\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I ⊆\n    ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I\ncase sub2\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f ''\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n    ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\n[PROOFSTEP]\ncase sub1 => mfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I ⊆\n    ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I\n[PROOFSTEP]\ncase sub1 => mfld_set_tac\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I ⊆\n    ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s ∩ range ↑I\n[PROOFSTEP]\nmfld_set_tac\n[GOAL]\ncase sub2\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f ''\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n    ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\n[PROOFSTEP]\ncase sub2 =>\n  rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩\n  exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f ''\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n    ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\n[PROOFSTEP]\ncase sub2 =>\n  rintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩\n  exact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\n⊢ writtenInExtChartAt I I' x f ''\n      (↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' (s ∩ f ⁻¹' (extChartAt I' (f x)).source) ∩ range ↑I) ⊆\n    ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\n[PROOFSTEP]\nrintro _ ⟨y, ⟨⟨hys, hfy⟩, -⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\nf : M → M'\nf' : E →L[𝕜] E'\nhf : HasMFDerivWithinAt I I' f s x f'\nhd : DenseRange ↑f'\nthis : UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' (f x)).source) x\ny : E\nhys : ↑(LocalEquiv.symm (extChartAt I x)) y ∈ s\nhfy : ↑(LocalEquiv.symm (extChartAt I x)) y ∈ f ⁻¹' (extChartAt I' (f x)).source\n⊢ writtenInExtChartAt I I' x f y ∈ ↑(LocalEquiv.symm (extChartAt I' (f x))) ⁻¹' (f '' s) ∩ range ↑I'\n[PROOFSTEP]\nexact ⟨⟨_, hys, ((extChartAt I' (f x)).left_inv hfy).symm⟩, mem_range_self _⟩\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\ne : LocalHomeomorph M M'\nhe : LocalHomeomorph.MDifferentiable I I' e\nhx : x ∈ e.source\n⊢ UniqueMDiffWithinAt I' (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s) (↑e x)\n[PROOFSTEP]\nrw [← e.image_source_inter_eq', inter_comm]\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nx : M\nhs : UniqueMDiffWithinAt I s x\ne : LocalHomeomorph M M'\nhe : LocalHomeomorph.MDifferentiable I I' e\nhx : x ∈ e.source\n⊢ UniqueMDiffWithinAt I' (↑e '' (s ∩ e.source)) (↑e x)\n[PROOFSTEP]\nexact\n  (hs.inter (e.open_source.mem_nhds hx)).image_denseRange (he.mdifferentiableAt hx).hasMFDerivAt.hasMFDerivWithinAt\n    (he.mfderiv_surjective hx).denseRange\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\n⊢ UniqueDiffOn 𝕜 ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s)\n[PROOFSTEP]\napply UniqueMDiffOn.uniqueDiffOn\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\n⊢ UniqueMDiffOn 𝓘(𝕜, E) ((extChartAt I x).target ∩ ↑(LocalEquiv.symm (extChartAt I x)) ⁻¹' s)\n[PROOFSTEP]\nrw [← LocalEquiv.image_source_inter_eq', inter_comm, extChartAt_source]\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\n⊢ UniqueMDiffOn 𝓘(𝕜, E) (↑(extChartAt I x) '' (s ∩ (chartAt H x).toLocalEquiv.source))\n[PROOFSTEP]\nexact\n  (hs.inter (chartAt H x).open_source).image_denseRange' (fun y hy ↦ hasMFDerivWithinAt_extChartAt I hy.2) fun y hy ↦\n    ((mdifferentiable_chart _ _).mfderiv_surjective hy.2).denseRange\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\ny : M'\nf : M → M'\nhf : ContinuousOn f s\n⊢ UniqueMDiffOn I (s ∩ f ⁻¹' (extChartAt I' y).source)\n[PROOFSTEP]\nintro z hz\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\ny : M'\nf : M → M'\nhf : ContinuousOn f s\nz : M\nhz : z ∈ s ∩ f ⁻¹' (extChartAt I' y).source\n⊢ UniqueMDiffWithinAt I (s ∩ f ⁻¹' (extChartAt I' y).source) z\n[PROOFSTEP]\napply (hs z hz.1).inter'\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\ny : M'\nf : M → M'\nhf : ContinuousOn f s\nz : M\nhz : z ∈ s ∩ f ⁻¹' (extChartAt I' y).source\n⊢ f ⁻¹' (extChartAt I' y).source ∈ 𝓝[s] z\n[PROOFSTEP]\napply (hf z hz.1).preimage_mem_nhdsWithin\n[GOAL]\n𝕜 : Type u_1\ninst✝¹² : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝¹¹ : NormedAddCommGroup E\ninst✝¹⁰ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝⁹ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝⁸ : TopologicalSpace M\ninst✝⁷ : ChartedSpace H M\ninst✝⁶ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝⁵ : NormedAddCommGroup E'\ninst✝⁴ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝³ : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝² : TopologicalSpace M'\ninst✝¹ : ChartedSpace H' M'\ninst✝ : SmoothManifoldWithCorners I' M'\ns : Set M\nhs : UniqueMDiffOn I s\nx : M\ny : M'\nf : M → M'\nhf : ContinuousOn f s\nz : M\nhz : z ∈ s ∩ f ⁻¹' (extChartAt I' y).source\n⊢ (extChartAt I' y).source ∈ 𝓝 (f z)\n[PROOFSTEP]\nexact (isOpen_extChartAt_source I' y).mem_nhds hz.2\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (TotalSpace.proj ⁻¹' s) p\n[PROOFSTEP]\nset e := trivializationAt F Z p.proj\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (TotalSpace.proj ⁻¹' s) p\n[PROOFSTEP]\nhave hp : p ∈ e.source := FiberBundle.mem_trivializationAt_proj_source\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (TotalSpace.proj ⁻¹' s) p\n[PROOFSTEP]\nhave : UniqueMDiffWithinAt (I.prod 𝓘(𝕜, F)) (s ×ˢ univ) (e p)\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (↑e p)\n[PROOFSTEP]\nrw [← Prod.mk.eta (p := e p), FiberBundle.trivializationAt_proj_fst]\n[GOAL]\ncase this\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (p.proj, (↑e p).snd)\n[PROOFSTEP]\nexact hs.prod (uniqueMDiffWithinAt_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\nthis : UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (↑e p)\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (TotalSpace.proj ⁻¹' s) p\n[PROOFSTEP]\nrw [← e.left_inv hp]\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\nthis : UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (↑e p)\n⊢ UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (TotalSpace.proj ⁻¹' s)\n    (↑(LocalHomeomorph.symm e.toLocalHomeomorph) (↑e.toLocalHomeomorph p))\n[PROOFSTEP]\nrefine (this.preimage_localHomeomorph e.mdifferentiable.symm (e.map_source hp)).mono ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\nthis : UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (↑e p)\n⊢ (LocalHomeomorph.symm e.toLocalHomeomorph).toLocalEquiv.target ∩\n      ↑(LocalHomeomorph.symm (LocalHomeomorph.symm e.toLocalHomeomorph)) ⁻¹' s ×ˢ univ ⊆\n    TotalSpace.proj ⁻¹' s\n[PROOFSTEP]\nrintro y ⟨hy, hys, -⟩\n[GOAL]\ncase intro.intro\n𝕜 : Type u_1\ninst✝²¹ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝²⁰ : NormedAddCommGroup E\ninst✝¹⁹ : NormedSpace 𝕜 E\nH : Type u_3\ninst✝¹⁸ : TopologicalSpace H\nI : ModelWithCorners 𝕜 E H\nM : Type u_4\ninst✝¹⁷ : TopologicalSpace M\ninst✝¹⁶ : ChartedSpace H M\ninst✝¹⁵ : SmoothManifoldWithCorners I M\nE' : Type u_5\ninst✝¹⁴ : NormedAddCommGroup E'\ninst✝¹³ : NormedSpace 𝕜 E'\nH' : Type u_6\ninst✝¹² : TopologicalSpace H'\nI' : ModelWithCorners 𝕜 E' H'\nM' : Type u_7\ninst✝¹¹ : TopologicalSpace M'\ninst✝¹⁰ : ChartedSpace H' M'\ninst✝⁹ : SmoothManifoldWithCorners I' M'\ns : Set M\nF : Type u_8\ninst✝⁸ : NormedAddCommGroup F\ninst✝⁷ : NormedSpace 𝕜 F\nZ : M → Type u_9\ninst✝⁶ : TopologicalSpace (TotalSpace F Z)\ninst✝⁵ : (b : M) → TopologicalSpace (Z b)\ninst✝⁴ : (b : M) → AddCommMonoid (Z b)\ninst✝³ : (b : M) → Module 𝕜 (Z b)\ninst✝² : FiberBundle F Z\ninst✝¹ : VectorBundle 𝕜 F Z\ninst✝ : SmoothVectorBundle F Z I\np : TotalSpace F Z\nhs : UniqueMDiffWithinAt I s p.proj\ne : Trivialization F TotalSpace.proj := trivializationAt F Z p.proj\nhp : p ∈ e.source\nthis : UniqueMDiffWithinAt (ModelWithCorners.prod I 𝓘(𝕜, F)) (s ×ˢ univ) (↑e p)\ny : TotalSpace F Z\nhy : y ∈ (LocalHomeomorph.symm e.toLocalHomeomorph).toLocalEquiv.target\nhys : (↑(LocalHomeomorph.symm (LocalHomeomorph.symm e.toLocalHomeomorph)) y).fst ∈ s\n⊢ y ∈ TotalSpace.proj ⁻¹' s\n[PROOFSTEP]\nrwa [LocalHomeomorph.symm_symm, e.coe_coe, e.coe_fst hy] at hys \n", "meta": {"mathlib_filename": "Mathlib.Geometry.Manifold.MFDeriv", "llama_tokens": 208905, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6442250928250375, "lm_q2_score": 0.41489884579676883, "lm_q1q2_score": 0.2672882474464243}}
{"text": "[GOAL]\n⊢ |exp 1 - 2244083 / 825552| ≤ 1 / 10 ^ 10\n[PROOFSTEP]\napply exp_approx_start\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 0 1 (2244083 / 825552)| ≤ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 10)\n[PROOFSTEP]\niterate 13 refine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 0 1 (2244083 / 825552)| ≤ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 10)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 0 + 1 = ?m.664\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 1 = ?m.664\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑1 = ?m.675\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 1 1 ((2244083 / 825552 - 1) * 1)| ≤ |1| ^ 1 / ↑(Nat.factorial 1) * (1 / 10 ^ 10 * 1)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 1 + 1 = ?m.1007\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 2 = ?m.1007\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑2 = ?m.1009\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 2 1 (((2244083 / 825552 - 1) * 1 - 1) * 2)| ≤ |1| ^ 2 / ↑(Nat.factorial 2) * (1 / 10 ^ 10 * 1 * 2)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 2 + 1 = ?m.1077\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 3 = ?m.1077\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑3 = ?m.1079\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 3 1 ((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3)| ≤\n    |1| ^ 3 / ↑(Nat.factorial 3) * (1 / 10 ^ 10 * 1 * 2 * 3)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 3 + 1 = ?m.1147\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 4 = ?m.1147\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑4 = ?m.1149\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 4 1 (((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4)| ≤\n    |1| ^ 4 / ↑(Nat.factorial 4) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 4 + 1 = ?m.1217\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 5 = ?m.1217\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑5 = ?m.1219\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 5 1 ((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5)| ≤\n    |1| ^ 5 / ↑(Nat.factorial 5) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 5 + 1 = ?m.1287\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 6 = ?m.1287\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑6 = ?m.1289\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 6 1 (((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6)| ≤\n    |1| ^ 6 / ↑(Nat.factorial 6) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 6 + 1 = ?m.1357\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 7 = ?m.1357\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑7 = ?m.1359\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 7 1 ((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7)| ≤\n    |1| ^ 7 / ↑(Nat.factorial 7) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 7 + 1 = ?m.1427\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 8 = ?m.1427\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑8 = ?m.1429\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 8 1\n          (((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8)| ≤\n    |1| ^ 8 / ↑(Nat.factorial 8) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 8 + 1 = ?m.1497\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 9 = ?m.1497\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑9 = ?m.1499\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 9 1\n          ((((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8 - 1) *\n            9)| ≤\n    |1| ^ 9 / ↑(Nat.factorial 9) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 9 + 1 = ?m.1567\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 10 = ?m.1567\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑10 = ?m.1569\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 10 1\n          (((((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8 - 1) * 9 -\n              1) *\n            10)| ≤\n    |1| ^ 10 / ↑(Nat.factorial 10) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 10 + 1 = ?m.1637\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 11 = ?m.1637\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑11 = ?m.1639\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 11 1\n          ((((((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8 - 1) *\n                    9 -\n                  1) *\n                10 -\n              1) *\n            11)| ≤\n    |1| ^ 11 / ↑(Nat.factorial 11) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 11 + 1 = ?m.1707\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 12 = ?m.1707\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑12 = ?m.1709\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 12 1\n          (((((((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8 - 1) *\n                        9 -\n                      1) *\n                    10 -\n                  1) *\n                11 -\n              1) *\n            12)| ≤\n    |1| ^ 12 / ↑(Nat.factorial 12) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 12 + 1 = ?m.1777\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 13 = ?m.1777\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑13 = ?m.1779\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 13 1\n          ((((((((((((((2244083 / 825552 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) * 8 - 1) *\n                            9 -\n                          1) *\n                        10 -\n                      1) *\n                    11 -\n                  1) *\n                12 -\n              1) *\n            13)| ≤\n    |1| ^ 13 / ↑(Nat.factorial 13) * (1 / 10 ^ 10 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13)\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 13 1 (5 / 7)| ≤ |1| ^ 13 / ↑(Nat.factorial 13) * (243243 / 390625)\n[PROOFSTEP]\nrefine' exp_approx_end' _ (by norm_num1; rfl) _ (by norm_cast) (by simp) _\n[GOAL]\n⊢ 13 + 1 = ?m.2354\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 14 = ?m.2354\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑14 = ?m.2356\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n⊢ |1| ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n⊢ |1 - 5 / 7| ≤ 243243 / 390625 - |1| / 14 * ((14 + 1) / 14)\n[PROOFSTEP]\nrw [_root_.abs_one, abs_of_pos]\n[GOAL]\ncase h\n⊢ 1 - 5 / 7 ≤ 243243 / 390625 - 1 / 14 * ((14 + 1) / 14)\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase h\n⊢ 0 < 1 - 5 / 7\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ |exp 1 - 363916618873 / 133877442384| ≤ 1 / 10 ^ 20\n[PROOFSTEP]\napply exp_approx_start\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 0 1 (363916618873 / 133877442384)| ≤ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 20)\n[PROOFSTEP]\niterate 21 refine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 0 1 (363916618873 / 133877442384)| ≤ |1| ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 20)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 0 + 1 = ?m.3624\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 1 = ?m.3624\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑1 = ?m.3635\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 1 1 ((363916618873 / 133877442384 - 1) * 1)| ≤ |1| ^ 1 / ↑(Nat.factorial 1) * (1 / 10 ^ 20 * 1)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 1 + 1 = ?m.3967\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 2 = ?m.3967\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑2 = ?m.3969\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 2 1 (((363916618873 / 133877442384 - 1) * 1 - 1) * 2)| ≤\n    |1| ^ 2 / ↑(Nat.factorial 2) * (1 / 10 ^ 20 * 1 * 2)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 2 + 1 = ?m.4037\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 3 = ?m.4037\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑3 = ?m.4039\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 3 1 ((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3)| ≤\n    |1| ^ 3 / ↑(Nat.factorial 3) * (1 / 10 ^ 20 * 1 * 2 * 3)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 3 + 1 = ?m.4107\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 4 = ?m.4107\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑4 = ?m.4109\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 4 1 (((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4)| ≤\n    |1| ^ 4 / ↑(Nat.factorial 4) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 4 + 1 = ?m.4177\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 5 = ?m.4177\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑5 = ?m.4179\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 5 1 ((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5)| ≤\n    |1| ^ 5 / ↑(Nat.factorial 5) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 5 + 1 = ?m.4247\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 6 = ?m.4247\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑6 = ?m.4249\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 6 1 (((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6)| ≤\n    |1| ^ 6 / ↑(Nat.factorial 6) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 6 + 1 = ?m.4317\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 7 = ?m.4317\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑7 = ?m.4319\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 7 1\n          ((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7)| ≤\n    |1| ^ 7 / ↑(Nat.factorial 7) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 7 + 1 = ?m.4387\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 8 = ?m.4387\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑8 = ?m.4389\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 8 1\n          (((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) *\n            8)| ≤\n    |1| ^ 8 / ↑(Nat.factorial 8) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 8 + 1 = ?m.4457\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 9 = ?m.4457\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑9 = ?m.4459\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 9 1\n          ((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) *\n                8 -\n              1) *\n            9)| ≤\n    |1| ^ 9 / ↑(Nat.factorial 9) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 9 + 1 = ?m.4527\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 10 = ?m.4527\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑10 = ?m.4529\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 10 1\n          (((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) *\n                    8 -\n                  1) *\n                9 -\n              1) *\n            10)| ≤\n    |1| ^ 10 / ↑(Nat.factorial 10) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 10 + 1 = ?m.4597\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 11 = ?m.4597\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑11 = ?m.4599\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 11 1\n          ((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) *\n                        8 -\n                      1) *\n                    9 -\n                  1) *\n                10 -\n              1) *\n            11)| ≤\n    |1| ^ 11 / ↑(Nat.factorial 11) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 11 + 1 = ?m.4667\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 12 = ?m.4667\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑12 = ?m.4669\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 12 1\n          (((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 - 1) *\n                            8 -\n                          1) *\n                        9 -\n                      1) *\n                    10 -\n                  1) *\n                11 -\n              1) *\n            12)| ≤\n    |1| ^ 12 / ↑(Nat.factorial 12) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 12 + 1 = ?m.4737\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 13 = ?m.4737\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑13 = ?m.4739\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 13 1\n          ((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 -\n                                  1) *\n                                8 -\n                              1) *\n                            9 -\n                          1) *\n                        10 -\n                      1) *\n                    11 -\n                  1) *\n                12 -\n              1) *\n            13)| ≤\n    |1| ^ 13 / ↑(Nat.factorial 13) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 13 + 1 = ?m.4807\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 14 = ?m.4807\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑14 = ?m.4809\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 14 1\n          (((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 -\n                                      1) *\n                                    8 -\n                                  1) *\n                                9 -\n                              1) *\n                            10 -\n                          1) *\n                        11 -\n                      1) *\n                    12 -\n                  1) *\n                13 -\n              1) *\n            14)| ≤\n    |1| ^ 14 / ↑(Nat.factorial 14) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 14 + 1 = ?m.4877\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 15 = ?m.4877\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑15 = ?m.4879\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 15 1\n          ((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 -\n                                          1) *\n                                        8 -\n                                      1) *\n                                    9 -\n                                  1) *\n                                10 -\n                              1) *\n                            11 -\n                          1) *\n                        12 -\n                      1) *\n                    13 -\n                  1) *\n                14 -\n              1) *\n            15)| ≤\n    |1| ^ 15 / ↑(Nat.factorial 15) * (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 15 + 1 = ?m.4947\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 16 = ?m.4947\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑16 = ?m.4949\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 16 1\n          (((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 -\n                                              1) *\n                                            8 -\n                                          1) *\n                                        9 -\n                                      1) *\n                                    10 -\n                                  1) *\n                                11 -\n                              1) *\n                            12 -\n                          1) *\n                        13 -\n                      1) *\n                    14 -\n                  1) *\n                15 -\n              1) *\n            16)| ≤\n    |1| ^ 16 / ↑(Nat.factorial 16) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 16 + 1 = ?m.5017\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 17 = ?m.5017\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑17 = ?m.5019\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 17 1\n          ((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) * 7 -\n                                                  1) *\n                                                8 -\n                                              1) *\n                                            9 -\n                                          1) *\n                                        10 -\n                                      1) *\n                                    11 -\n                                  1) *\n                                12 -\n                              1) *\n                            13 -\n                          1) *\n                        14 -\n                      1) *\n                    15 -\n                  1) *\n                16 -\n              1) *\n            17)| ≤\n    |1| ^ 17 / ↑(Nat.factorial 17) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 17 + 1 = ?m.5087\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 18 = ?m.5087\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑18 = ?m.5089\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 18 1\n          (((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *\n                                                        7 -\n                                                      1) *\n                                                    8 -\n                                                  1) *\n                                                9 -\n                                              1) *\n                                            10 -\n                                          1) *\n                                        11 -\n                                      1) *\n                                    12 -\n                                  1) *\n                                13 -\n                              1) *\n                            14 -\n                          1) *\n                        15 -\n                      1) *\n                    16 -\n                  1) *\n                17 -\n              1) *\n            18)| ≤\n    |1| ^ 18 / ↑(Nat.factorial 18) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 18 + 1 = ?m.5157\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 19 = ?m.5157\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑19 = ?m.5159\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 19 1\n          ((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *\n                                                            7 -\n                                                          1) *\n                                                        8 -\n                                                      1) *\n                                                    9 -\n                                                  1) *\n                                                10 -\n                                              1) *\n                                            11 -\n                                          1) *\n                                        12 -\n                                      1) *\n                                    13 -\n                                  1) *\n                                14 -\n                              1) *\n                            15 -\n                          1) *\n                        16 -\n                      1) *\n                    17 -\n                  1) *\n                18 -\n              1) *\n            19)| ≤\n    |1| ^ 19 / ↑(Nat.factorial 19) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 19 + 1 = ?m.5227\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 20 = ?m.5227\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑20 = ?m.5229\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 20 1\n          (((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *\n                                                                7 -\n                                                              1) *\n                                                            8 -\n                                                          1) *\n                                                        9 -\n                                                      1) *\n                                                    10 -\n                                                  1) *\n                                                11 -\n                                              1) *\n                                            12 -\n                                          1) *\n                                        13 -\n                                      1) *\n                                    14 -\n                                  1) *\n                                15 -\n                              1) *\n                            16 -\n                          1) *\n                        17 -\n                      1) *\n                    18 -\n                  1) *\n                19 -\n              1) *\n            20)| ≤\n    |1| ^ 20 / ↑(Nat.factorial 20) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20)\n[PROOFSTEP]\nrefine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _\n[GOAL]\n⊢ 20 + 1 = ?m.5297\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 21 = ?m.5297\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑21 = ?m.5299\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h\n⊢ |exp 1 -\n        expNear 21 1\n          ((((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *\n                                                                    7 -\n                                                                  1) *\n                                                                8 -\n                                                              1) *\n                                                            9 -\n                                                          1) *\n                                                        10 -\n                                                      1) *\n                                                    11 -\n                                                  1) *\n                                                12 -\n                                              1) *\n                                            13 -\n                                          1) *\n                                        14 -\n                                      1) *\n                                    15 -\n                                  1) *\n                                16 -\n                              1) *\n                            17 -\n                          1) *\n                        18 -\n                      1) *\n                    19 -\n                  1) *\n                20 -\n              1) *\n            21)| ≤\n    |1| ^ 21 / ↑(Nat.factorial 21) *\n      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 * 21)\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase h\n⊢ |exp 1 - expNear 21 1 (36295539 / 44271641)| ≤ |1| ^ 21 / ↑(Nat.factorial 21) * (311834363841 / 610351562500)\n[PROOFSTEP]\nrefine' exp_approx_end' _ (by norm_num1; rfl) _ (by norm_cast) (by simp) _\n[GOAL]\n⊢ 21 + 1 = ?m.5994\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 22 = ?m.5994\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ↑22 = ?m.5996\n[PROOFSTEP]\nnorm_cast\n[GOAL]\n⊢ |1| ≤ 1\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n⊢ |1 - 36295539 / 44271641| ≤ 311834363841 / 610351562500 - |1| / 22 * ((22 + 1) / 22)\n[PROOFSTEP]\nrw [_root_.abs_one, abs_of_pos]\n[GOAL]\ncase h\n⊢ 1 - 36295539 / 44271641 ≤ 311834363841 / 610351562500 - 1 / 22 * ((22 + 1) / 22)\n[PROOFSTEP]\nnorm_num1\n[GOAL]\ncase h\n⊢ 0 < 1 - 36295539 / 44271641\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 2.7182818283 < 2244083 / 825552 - 1 / 10 ^ 10\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 1 / 10 ^ 10 + 2244083 / 825552 < 2.7182818286\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 0.36787944116 < exp (-1)\n[PROOFSTEP]\nrw [exp_neg, lt_inv _ (exp_pos _)]\n[GOAL]\n⊢ exp 1 < 0.36787944116⁻¹\n⊢ 0 < 0.36787944116\n[PROOFSTEP]\nrefine' lt_of_le_of_lt (sub_le_iff_le_add.1 (abs_sub_le_iff.1 exp_one_near_10).1) _\n[GOAL]\n⊢ 1 / 10 ^ 10 + 2244083 / 825552 < 0.36787944116⁻¹\n⊢ 0 < 0.36787944116\n[PROOFSTEP]\nall_goals norm_num\n[GOAL]\n⊢ 1 / 10 ^ 10 + 2244083 / 825552 < 0.36787944116⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 0 < 0.36787944116\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ exp (-1) < 0.3678794412\n[PROOFSTEP]\nrw [exp_neg, inv_lt (exp_pos _)]\n[GOAL]\n⊢ 0.3678794412⁻¹ < exp 1\n⊢ 0 < 0.3678794412\n[PROOFSTEP]\nrefine' lt_of_lt_of_le _ (sub_le_comm.1 (abs_sub_le_iff.1 exp_one_near_10).2)\n[GOAL]\n⊢ 0.3678794412⁻¹ < 2244083 / 825552 - 1 / 10 ^ 10\n⊢ 0 < 0.3678794412\n[PROOFSTEP]\nall_goals norm_num\n[GOAL]\n⊢ 0.3678794412⁻¹ < 2244083 / 825552 - 1 / 10 ^ 10\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 0 < 0.3678794412\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 10 ^ 10\n[PROOFSTEP]\nsuffices |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n  by\n  norm_num1 at *\n  assumption\n[GOAL]\nthis : |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 10 ^ 10\n[PROOFSTEP]\nnorm_num1 at *\n[GOAL]\nthis : |log 2 - 287209 / 414355| ≤ 1 / 10000000000\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 10000000000\n[PROOFSTEP]\nassumption\n[GOAL]\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\nhave t : |(2⁻¹ : ℝ)| = 2⁻¹ := by rw [abs_of_pos]; norm_num\n[GOAL]\n⊢ |2⁻¹| = 2⁻¹\n[PROOFSTEP]\nrw [abs_of_pos]\n[GOAL]\n⊢ 0 < 2⁻¹\n[PROOFSTEP]\nnorm_num\n[GOAL]\nt : |2⁻¹| = 2⁻¹\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\nhave z := Real.abs_log_sub_add_sum_range_le (show |(2⁻¹ : ℝ)| < 1 by rw [t]; norm_num) 34\n[GOAL]\nt : |2⁻¹| = 2⁻¹\n⊢ |2⁻¹| < 1\n[PROOFSTEP]\nrw [t]\n[GOAL]\nt : |2⁻¹| = 2⁻¹\n⊢ 2⁻¹ < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |(Finset.sum (range 34) fun i => 2⁻¹ ^ (i + 1) / (↑i + 1)) + log (1 - 2⁻¹)| ≤ |2⁻¹| ^ (34 + 1) / (1 - |2⁻¹|)\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\nrw [t] at z \n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |(Finset.sum (range 34) fun i => 2⁻¹ ^ (i + 1) / (↑i + 1)) + log (1 - 2⁻¹)| ≤ 2⁻¹ ^ (34 + 1) / (1 - 2⁻¹)\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\nnorm_num1 at z \n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |(Finset.sum (range 34) fun x => (1 / 2) ^ (x + 1) / (↑x + 1)) + log (1 / 2)| ≤ 1 / 17179869184\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\nrw [one_div (2 : ℝ), log_inv, ← sub_eq_add_neg, _root_.abs_sub_comm] at z \n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ |log 2 - 287209 / 414355| ≤ 1 / 17179869184 + (1 / 10 ^ 10 - 1 / 2 ^ 34)\n[PROOFSTEP]\napply le_trans (_root_.abs_sub_le _ _ _) (add_le_add z _)\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ |(Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)) - 287209 / 414355| ≤ 1 / 10 ^ 10 - 1 / 2 ^ 34\n[PROOFSTEP]\nsimp_rw [sum_range_succ]\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ |(Finset.sum (range 0) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)) + 2⁻¹ ^ (0 + 1) / (↑0 + 1) + 2⁻¹ ^ (1 + 1) / (↑1 + 1) +\n                                                                        2⁻¹ ^ (2 + 1) / (↑2 + 1) +\n                                                                      2⁻¹ ^ (3 + 1) / (↑3 + 1) +\n                                                                    2⁻¹ ^ (4 + 1) / (↑4 + 1) +\n                                                                  2⁻¹ ^ (5 + 1) / (↑5 + 1) +\n                                                                2⁻¹ ^ (6 + 1) / (↑6 + 1) +\n                                                              2⁻¹ ^ (7 + 1) / (↑7 + 1) +\n                                                            2⁻¹ ^ (8 + 1) / (↑8 + 1) +\n                                                          2⁻¹ ^ (9 + 1) / (↑9 + 1) +\n                                                        2⁻¹ ^ (10 + 1) / (↑10 + 1) +\n                                                      2⁻¹ ^ (11 + 1) / (↑11 + 1) +\n                                                    2⁻¹ ^ (12 + 1) / (↑12 + 1) +\n                                                  2⁻¹ ^ (13 + 1) / (↑13 + 1) +\n                                                2⁻¹ ^ (14 + 1) / (↑14 + 1) +\n                                              2⁻¹ ^ (15 + 1) / (↑15 + 1) +\n                                            2⁻¹ ^ (16 + 1) / (↑16 + 1) +\n                                          2⁻¹ ^ (17 + 1) / (↑17 + 1) +\n                                        2⁻¹ ^ (18 + 1) / (↑18 + 1) +\n                                      2⁻¹ ^ (19 + 1) / (↑19 + 1) +\n                                    2⁻¹ ^ (20 + 1) / (↑20 + 1) +\n                                  2⁻¹ ^ (21 + 1) / (↑21 + 1) +\n                                2⁻¹ ^ (22 + 1) / (↑22 + 1) +\n                              2⁻¹ ^ (23 + 1) / (↑23 + 1) +\n                            2⁻¹ ^ (24 + 1) / (↑24 + 1) +\n                          2⁻¹ ^ (25 + 1) / (↑25 + 1) +\n                        2⁻¹ ^ (26 + 1) / (↑26 + 1) +\n                      2⁻¹ ^ (27 + 1) / (↑27 + 1) +\n                    2⁻¹ ^ (28 + 1) / (↑28 + 1) +\n                  2⁻¹ ^ (29 + 1) / (↑29 + 1) +\n                2⁻¹ ^ (30 + 1) / (↑30 + 1) +\n              2⁻¹ ^ (31 + 1) / (↑31 + 1) +\n            2⁻¹ ^ (32 + 1) / (↑32 + 1) +\n          2⁻¹ ^ (33 + 1) / (↑33 + 1) -\n        287209 / 414355| ≤\n    1 / 10 ^ 10 - 1 / 2 ^ 34\n[PROOFSTEP]\nnorm_num\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ |30417026706710207 / 51397301678363663775930777600| ≤ 7011591 / 167772160000000000\n[PROOFSTEP]\nrw [abs_of_pos]\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ 30417026706710207 / 51397301678363663775930777600 ≤ 7011591 / 167772160000000000\n[PROOFSTEP]\nnorm_num\n[GOAL]\nt : |2⁻¹| = 2⁻¹\nz : |log 2 - Finset.sum (range 34) fun x => 2⁻¹ ^ (x + 1) / (↑x + 1)| ≤ 1 / 17179869184\n⊢ 0 < 30417026706710207 / 51397301678363663775930777600\n[PROOFSTEP]\nnorm_num\n[GOAL]\n⊢ 0.6931471803 < 287209 / 414355 - 1 / 10 ^ 10\n[PROOFSTEP]\nnorm_num1\n[GOAL]\n⊢ 1 / 10 ^ 10 + 287209 / 414355 < 0.6931471808\n[PROOFSTEP]\nnorm_num\n", "meta": {"mathlib_filename": "Mathlib.Data.Complex.ExponentialBounds", "llama_tokens": 16630, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6150878696277513, "lm_q2_score": 0.43398146480389854, "lm_q1q2_score": 0.2669367346441609}}
{"text": "[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nW : (Cover J X)ᵒᵖ\n⊢ (diagram J P X ⋙ F).obj W ≅ (diagram J (P ⋙ F) X).obj W\n[PROOFSTEP]\nrefine' _ ≪≫ HasLimit.isoOfNatIso (W.unop.multicospanComp _ _).symm\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nW : (Cover J X)ᵒᵖ\n⊢ (diagram J P X ⋙ F).obj W ≅ limit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)\n[PROOFSTEP]\nrefine' (isLimitOfPreserves F (limit.isLimit _)).conePointUniqueUpToIso (limit.isLimit _)\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\n⊢ ∀ {X_1 Y : (Cover J X)ᵒᵖ} (f : X_1 ⟶ Y),\n    (diagram J P X ⋙ F).map f ≫\n        ((fun W =>\n              IsLimit.conePointUniqueUpToIso\n                  (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                  (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n                HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n            Y).hom =\n      ((fun W =>\n              IsLimit.conePointUniqueUpToIso\n                  (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                  (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n                HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n            X_1).hom ≫\n        (diagram J (P ⋙ F) X).map f\n[PROOFSTEP]\nintro A B f\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nA B : (Cover J X)ᵒᵖ\nf : A ⟶ B\n⊢ (diagram J P X ⋙ F).map f ≫\n      ((fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n          B).hom =\n    ((fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n          A).hom ≫\n      (diagram J (P ⋙ F) X).map f\n[PROOFSTEP]\napply Multiequalizer.hom_ext\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nA B : (Cover J X)ᵒᵖ\nf : A ⟶ B\n⊢ ∀ (a : (Cover.index B.unop (P ⋙ F)).L),\n    ((diagram J P X ⋙ F).map f ≫\n          ((fun W =>\n                IsLimit.conePointUniqueUpToIso\n                    (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                    (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n                  HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n              B).hom) ≫\n        Multiequalizer.ι (Cover.index B.unop (P ⋙ F)) a =\n      (((fun W =>\n                IsLimit.conePointUniqueUpToIso\n                    (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                    (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n                  HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)\n              A).hom ≫\n          (diagram J (P ⋙ F) X).map f) ≫\n        Multiequalizer.ι (Cover.index B.unop (P ⋙ F)) a\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nA B : (Cover J X)ᵒᵖ\nf : A ⟶ B\n⊢ ∀ (a : (Cover.index B.unop (P ⋙ F)).L),\n    (F.map\n            (Multiequalizer.lift (Cover.index B.unop P) (multiequalizer (Cover.index A.unop P))\n              (fun I => Multiequalizer.ι (Cover.index A.unop P) (Cover.Arrow.map I f.unop))\n              (_ :\n                ∀ (I : (Cover.index B.unop P).R),\n                  Multiequalizer.ι (Cover.index A.unop P)\n                        (MulticospanIndex.fstTo (Cover.index A.unop P) (Cover.Relation.map I f.unop)) ≫\n                      MulticospanIndex.fst (Cover.index A.unop P) (Cover.Relation.map I f.unop) =\n                    Multiequalizer.ι (Cover.index A.unop P)\n                        (MulticospanIndex.sndTo (Cover.index A.unop P) (Cover.Relation.map I f.unop)) ≫\n                      MulticospanIndex.snd (Cover.index A.unop P) (Cover.Relation.map I f.unop))) ≫\n          (IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index B.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index B.unop P) ⋙ F))).hom ≫\n            (HasLimit.isoOfNatIso (Cover.multicospanComp F P B.unop).symm).hom) ≫\n        Multiequalizer.ι (Cover.index B.unop (P ⋙ F)) a =\n      (((IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index A.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index A.unop P) ⋙ F))).hom ≫\n            (HasLimit.isoOfNatIso (Cover.multicospanComp F P A.unop).symm).hom) ≫\n          Multiequalizer.lift (Cover.index B.unop (P ⋙ F)) (multiequalizer (Cover.index A.unop (P ⋙ F)))\n            (fun I => Multiequalizer.ι (Cover.index A.unop (P ⋙ F)) (Cover.Arrow.map I f.unop))\n            (_ :\n              ∀ (I : (Cover.index B.unop (P ⋙ F)).R),\n                Multiequalizer.ι (Cover.index A.unop (P ⋙ F))\n                      (MulticospanIndex.fstTo (Cover.index A.unop (P ⋙ F)) (Cover.Relation.map I f.unop)) ≫\n                    MulticospanIndex.fst (Cover.index A.unop (P ⋙ F)) (Cover.Relation.map I f.unop) =\n                  Multiequalizer.ι (Cover.index A.unop (P ⋙ F))\n                      (MulticospanIndex.sndTo (Cover.index A.unop (P ⋙ F)) (Cover.Relation.map I f.unop)) ≫\n                    MulticospanIndex.snd (Cover.index A.unop (P ⋙ F)) (Cover.Relation.map I f.unop))) ≫\n        Multiequalizer.ι (Cover.index B.unop (P ⋙ F)) a\n[PROOFSTEP]\nsimp only [Functor.mapCone_π_app, Multiequalizer.multifork_π_app_left, Iso.symm_hom, Multiequalizer.lift_ι,\n  eqToHom_refl, Category.comp_id, limit.conePointUniqueUpToIso_hom_comp,\n  GrothendieckTopology.Cover.multicospanComp_hom_inv_left, HasLimit.isoOfNatIso_hom_π, Category.assoc]\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nA B : (Cover J X)ᵒᵖ\nf : A ⟶ B\n⊢ ∀ (a : (Cover.index B.unop (P ⋙ F)).L),\n    F.map\n          (Multiequalizer.lift (Cover.index B.unop P) (multiequalizer (Cover.index A.unop P))\n            (fun I => Multiequalizer.ι (Cover.index A.unop P) (Cover.Arrow.map I f.unop))\n            (_ :\n              ∀ (I : (Cover.index B.unop P).R),\n                Multiequalizer.ι (Cover.index A.unop P)\n                      (MulticospanIndex.fstTo (Cover.index A.unop P) (Cover.Relation.map I f.unop)) ≫\n                    MulticospanIndex.fst (Cover.index A.unop P) (Cover.Relation.map I f.unop) =\n                  Multiequalizer.ι (Cover.index A.unop P)\n                      (MulticospanIndex.sndTo (Cover.index A.unop P) (Cover.Relation.map I f.unop)) ≫\n                    MulticospanIndex.snd (Cover.index A.unop P) (Cover.Relation.map I f.unop))) ≫\n        F.map (Multiequalizer.ι (Cover.index B.unop P) a) =\n      F.map (Multiequalizer.ι (Cover.index A.unop P) (Cover.Arrow.map a f.unop))\n[PROOFSTEP]\nsimp only [← F.map_comp, limit.lift_π, Multifork.ofι_π_app, implies_true]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nW : (Cover J X)ᵒᵖ\ni : Cover.Arrow W.unop\n⊢ NatTrans.app (diagramCompIso J F P X).hom W ≫ Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i =\n    F.map (Multiequalizer.ι (Cover.index W.unop P) i)\n[PROOFSTEP]\ndelta diagramCompIso\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nW : (Cover J X)ᵒᵖ\ni : Cover.Arrow W.unop\n⊢ NatTrans.app\n        (NatIso.ofComponents fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm).hom\n        W ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i =\n    F.map (Multiequalizer.ι (Cover.index W.unop P) i)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁴ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝³ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝² : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝¹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\nX : C\nW : (Cover J X)ᵒᵖ\ni : Cover.Arrow W.unop\n⊢ ((IsLimit.conePointUniqueUpToIso\n            (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n            (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F))).hom ≫\n        (HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm).hom) ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i =\n    F.map (Multiequalizer.ι (Cover.index W.unop P) i)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\n⊢ (plusObj J P ⋙ F).obj X ≅ (plusObj J (P ⋙ F)).obj X\n[PROOFSTEP]\nrefine' _ ≪≫ HasColimit.isoOfNatIso (J.diagramCompIso F P X.unop)\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\n⊢ (plusObj J P ⋙ F).obj X ≅ colimit (diagram J P X.unop ⋙ F)\n[PROOFSTEP]\nrefine'\n  (isColimitOfPreserves F (colimit.isColimit (J.diagram P (unop X)))).coconePointUniqueUpToIso (colimit.isColimit _)\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\n⊢ ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y),\n    (plusObj J P ⋙ F).map f ≫\n        ((fun X =>\n              IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                  (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n            Y).hom =\n      ((fun X =>\n              IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                  (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n            X).hom ≫\n        (plusObj J (P ⋙ F)).map f\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ (plusObj J P ⋙ F).map f ≫\n      ((fun X =>\n            IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n              HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n          Y).hom =\n    ((fun X =>\n            IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n              HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n          X).hom ≫\n      (plusObj J (P ⋙ F)).map f\n[PROOFSTEP]\napply (isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).hom_ext\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ ∀ (j : (Cover J X.unop)ᵒᵖ),\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        (plusObj J P ⋙ F).map f ≫\n          ((fun X =>\n                IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                    (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                  HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n              Y).hom =\n      NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        ((fun X =>\n                IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                    (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                  HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n              X).hom ≫\n          (plusObj J (P ⋙ F)).map f\n[PROOFSTEP]\nintro W\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      (plusObj J P ⋙ F).map f ≫\n        ((fun X =>\n              IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                  (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n            Y).hom =\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      ((fun X =>\n              IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                  (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n                HasColimit.isoOfNatIso (diagramCompIso J F P X.unop))\n            X).hom ≫\n        (plusObj J (P ⋙ F)).map f\n[PROOFSTEP]\ndsimp [plusObj, plusMap]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      F.map (colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op) ≫\n        (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n              (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom ≫\n          (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    F.map (colimit.ι (diagram J P X.unop) W) ≫\n      ((IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n              (colimit.isColimit (diagram J P X.unop ⋙ F))).hom ≫\n          (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom) ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop) ≫ colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      F.map (colimMap (diagramPullback J P f.unop)) ≫\n        F.map (colimit.pre (diagram J P Y.unop) (pullback J f.unop).op) ≫\n          (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n                (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom ≫\n            (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    F.map (colimit.ι (diagram J P X.unop) W) ≫\n      (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n            (colimit.isColimit (diagram J P X.unop ⋙ F))).hom ≫\n        (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom ≫\n          colimMap (diagramPullback J (P ⋙ F) f.unop) ≫ colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nslice_rhs 1 2 => erw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).fac]\n[GOAL]\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n        (colimit.isColimit (diagram J P X.unop ⋙ F))).hom\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimMap (diagramPullback J (P ⋙ F) f.unop)\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).fac]\n[GOAL]\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n        (colimit.isColimit (diagram J P X.unop ⋙ F))).hom\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimMap (diagramPullback J (P ⋙ F) f.unop)\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).fac]\n[GOAL]\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n        (colimit.isColimit (diagram J P X.unop ⋙ F))).hom\ncase a.a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimMap (diagramPullback J (P ⋙ F) f.unop)\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).fac]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      F.map (colimMap (diagramPullback J P f.unop)) ≫\n        F.map (colimit.pre (diagram J P Y.unop) (pullback J f.unop).op) ≫\n          (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n                (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom ≫\n            (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    ((NatTrans.app (colimit.cocone (diagram J P X.unop ⋙ F)).ι W ≫\n          (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom) ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop)) ≫\n      colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nslice_lhs 1 3 =>\n  simp only [← F.map_comp]\n  dsimp [colimMap, IsColimit.map, colimit.pre]\n  simp only [colimit.ι_desc_assoc, colimit.ι_desc]\n  dsimp [Cocones.precompose]\n  simp only [Category.assoc, colimit.ι_desc]\n  dsimp [Cocone.whisker]\n  rw [F.map_comp]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    F.map (colimMap (diagramPullback J P f.unop)) ≫ F.map (colimit.pre (diagram J P Y.unop) (pullback J f.unop).op)\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\n  simp only [← F.map_comp]\n  dsimp [colimMap, IsColimit.map, colimit.pre]\n  simp only [colimit.ι_desc_assoc, colimit.ι_desc]\n  dsimp [Cocones.precompose]\n  simp only [Category.assoc, colimit.ι_desc]\n  dsimp [Cocone.whisker]\n  rw [F.map_comp]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    F.map (colimMap (diagramPullback J P f.unop)) ≫ F.map (colimit.pre (diagram J P Y.unop) (pullback J f.unop).op)\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\n  simp only [← F.map_comp]\n  dsimp [colimMap, IsColimit.map, colimit.pre]\n  simp only [colimit.ι_desc_assoc, colimit.ι_desc]\n  dsimp [Cocones.precompose]\n  simp only [Category.assoc, colimit.ι_desc]\n  dsimp [Cocone.whisker]\n  rw [F.map_comp]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P X.unop) W) ≫\n    F.map (colimMap (diagramPullback J P f.unop)) ≫ F.map (colimit.pre (diagram J P Y.unop) (pullback J f.unop).op)\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\nsimp only [← F.map_comp]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (colimit.ι (diagram J P X.unop) W ≫\n      colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op)\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\ndsimp [colimMap, IsColimit.map, colimit.pre]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (colimit.ι (diagram J P X.unop) W ≫\n      colimit.desc (diagram J P X.unop)\n          ((Cocones.precompose (diagramPullback J P f.unop)).obj\n            (colimit.cocone ((pullback J f.unop).op ⋙ diagram J P Y.unop))) ≫\n        colimit.desc ((pullback J f.unop).op ⋙ diagram J P Y.unop)\n          (Cocone.whisker (pullback J f.unop).op (colimit.cocone (diagram J P Y.unop))))\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\nsimp only [colimit.ι_desc_assoc, colimit.ι_desc]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (NatTrans.app\n        ((Cocones.precompose (diagramPullback J P f.unop)).obj\n            (colimit.cocone ((pullback J f.unop).op ⋙ diagram J P Y.unop))).ι\n        W ≫\n      colimit.desc ((pullback J f.unop).op ⋙ diagram J P Y.unop)\n        (Cocone.whisker (pullback J f.unop).op (colimit.cocone (diagram J P Y.unop))))\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\ndsimp [Cocones.precompose]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    ((Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n        colimit.ι ((pullback J f.unop).op ⋙ diagram J P Y.unop) W) ≫\n      colimit.desc ((pullback J f.unop).op ⋙ diagram J P Y.unop)\n        (Cocone.whisker (pullback J f.unop).op (colimit.cocone (diagram J P Y.unop))))\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\nsimp only [Category.assoc, colimit.ι_desc]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n        (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n        (_ :\n          ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n            Multiequalizer.ι (Cover.index W.unop P)\n                  (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n              Multiequalizer.ι (Cover.index W.unop P)\n                  (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n      NatTrans.app (Cocone.whisker (pullback J f.unop).op (colimit.cocone (diagram J P Y.unop))).ι W)\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\ndsimp [Cocone.whisker]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n        (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n        (_ :\n          ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n            Multiequalizer.ι (Cover.index W.unop P)\n                  (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n              Multiequalizer.ι (Cover.index W.unop P)\n                  (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n      colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop)))\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n      (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\n[PROOFSTEP]\nrw [F.map_comp]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ ((F.map\n            (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n              (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n              (_ :\n                ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n                  Multiequalizer.ι (Cover.index W.unop P)\n                        (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                      MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                    Multiequalizer.ι (Cover.index W.unop P)\n                        (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                      MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n          F.map (colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop)))) ≫\n        (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n            (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom) ≫\n      (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    ((NatTrans.app (colimit.cocone (diagram J P X.unop ⋙ F)).ι W ≫\n          (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom) ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop)) ≫\n      colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      F.map (colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop))) ≫\n        (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n              (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom ≫\n          (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    NatTrans.app (colimit.cocone (diagram J P X.unop ⋙ F)).ι W ≫\n      (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop) ≫ colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nslice_lhs 2 3 => erw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P Y.unop))).fac]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop))) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n        (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n      (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n      (_ :\n        ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n          Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n            Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)))\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P Y.unop))).fac]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop))) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n        (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n      (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n      (_ :\n        ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n          Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n            Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)))\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P Y.unop))).fac]\n[GOAL]\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map (colimit.ι (diagram J P Y.unop) (op (Cover.pullback W.unop f.unop))) ≫\n    (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P Y.unop)))\n        (colimit.isColimit (diagram J P Y.unop ⋙ F))).hom\ncase a.a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom\ncase a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n| F.map\n    (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n      (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n      (_ :\n        ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n          Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n            Multiequalizer.ι (Cover.index W.unop P)\n                (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n              MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I)))\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P Y.unop))).fac]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      NatTrans.app (colimit.cocone (diagram J P Y.unop ⋙ F)).ι (op (Cover.pullback W.unop f.unop)) ≫\n        (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    NatTrans.app (colimit.cocone (diagram J P X.unop ⋙ F)).ι W ≫\n      (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop) ≫ colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      colimit.ι (diagram J P Y.unop ⋙ F) (op (Cover.pullback W.unop f.unop)) ≫\n        (HasColimit.isoOfNatIso (diagramCompIso J F P Y.unop)).hom =\n    colimit.ι (diagram J P X.unop ⋙ F) W ≫\n      (HasColimit.isoOfNatIso (diagramCompIso J F P X.unop)).hom ≫\n        colimMap (diagramPullback J (P ⋙ F) f.unop) ≫ colimit.pre (diagram J (P ⋙ F) Y.unop) (pullback J f.unop).op\n[PROOFSTEP]\nsimp only [HasColimit.isoOfNatIso_ι_hom_assoc, GrothendieckTopology.diagramPullback_app, colimit.ι_pre,\n  HasColimit.isoOfNatIso_ι_hom, ι_colimMap_assoc]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop)) ≫\n        colimit.ι (diagram J (P ⋙ F) Y.unop) (op (Cover.pullback W.unop f.unop)) =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n        colimit.ι (diagram J (P ⋙ F) Y.unop) ((pullback J f.unop).op.obj W)\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n            (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n            (_ :\n              ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n                Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                  Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n        NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop))) ≫\n      colimit.ι (diagram J (P ⋙ F) Y.unop) (op (Cover.pullback W.unop f.unop)) =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I))) ≫\n      colimit.ι (diagram J (P ⋙ F) Y.unop) ((pullback J f.unop).op.obj W)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n            (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n            (_ :\n              ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n                Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                  Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n        NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop))) ≫\n      colimit.ι (diagram J (P ⋙ F) Y.unop) (op (Cover.pullback W.unop f.unop)) =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F))\n          (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I))) ≫\n      colimit.ι (diagram J (P ⋙ F) Y.unop) (op (Cover.pullback W.unop f.unop))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop)) =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F))\n        (multiequalizer (Cover.index W.unop (P ⋙ F)))\n        (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n        (_ :\n          ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n            Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                  (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                  (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I))\n[PROOFSTEP]\next\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\na✝ : (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)).L\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n            (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n            (_ :\n              ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n                Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                  Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n        NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop))) ≫\n      Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝ =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F))\n          (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I))) ≫\n      Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\na✝ : (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)).L\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n            (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n            (_ :\n              ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n                Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                  Multiequalizer.ι (Cover.index W.unop P)\n                      (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                    MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n        NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop))) ≫\n      Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝ =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F))\n          (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I))) ≫\n      Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝\n[PROOFSTEP]\nsimp only [Category.assoc]\n[GOAL]\ncase e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX Y : Cᵒᵖ\nf : X ⟶ Y\nW : (Cover J X.unop)ᵒᵖ\na✝ : (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)).L\n⊢ F.map\n        (Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) P) (multiequalizer (Cover.index W.unop P))\n          (fun I => Multiequalizer.ι (Cover.index W.unop P) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop P).R),\n              Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.fstTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop P) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop P)\n                    (MulticospanIndex.sndTo (Cover.index W.unop P) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop P) (Cover.Relation.base I))) ≫\n      NatTrans.app (diagramCompIso J F P Y.unop).hom (op (Cover.pullback W.unop f.unop)) ≫\n        Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝ =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F))\n          (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun I => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) (Cover.Arrow.base I))\n          (_ :\n            ∀ (I : (Cover.index ((pullback J f.unop).op.obj W).unop (P ⋙ F)).R),\n              Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I) =\n                Multiequalizer.ι (Cover.index W.unop (P ⋙ F))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ F)) (Cover.Relation.base I)) ≫\n        Multiequalizer.ι (Cover.index (Cover.pullback W.unop f.unop) (P ⋙ F)) a✝\n[PROOFSTEP]\nerw [Multiequalizer.lift_ι, diagramCompIso_hom_ι, diagramCompIso_hom_ι, ← F.map_comp, Multiequalizer.lift_ι]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫ NatTrans.app (plusCompIso J F P).hom X =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫ colimit.ι (diagram J (P ⋙ F) X.unop) W\n[PROOFSTEP]\ndelta diagramCompIso plusCompIso\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      NatTrans.app\n        (NatIso.ofComponents fun X =>\n            IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n                (colimit.isColimit (diagram J P X.unop ⋙ F)) ≪≫\n              HasColimit.isoOfNatIso\n                (NatIso.ofComponents fun W =>\n                  IsLimit.conePointUniqueUpToIso\n                      (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                      (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n                    HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)).hom\n        X =\n    NatTrans.app\n        (NatIso.ofComponents fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm).hom\n        W ≫\n      colimit.ι (diagram J (P ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [IsColimit.descCoconeMorphism_Hom, IsColimit.uniqueUpToIso_hom, Cocones.forget_map, Iso.trans_hom,\n  NatIso.ofComponents_hom_app, Functor.mapIso_hom, ← Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ (F.map (colimit.ι (diagram J P X.unop) W) ≫\n        (IsColimit.coconePointUniqueUpToIso (isColimitOfPreserves F (colimit.isColimit (diagram J P X.unop)))\n            (colimit.isColimit (diagram J P X.unop ⋙ F))).hom) ≫\n      (HasColimit.isoOfNatIso\n          (NatIso.ofComponents fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)).hom =\n    ((IsLimit.conePointUniqueUpToIso\n            (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n            (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F))).hom ≫\n        (HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm).hom) ≫\n      colimit.ι (diagram J (P ⋙ F) X.unop) W\n[PROOFSTEP]\nerw [(isColimitOfPreserves F (colimit.isColimit (J.diagram P (unop X)))).fac]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (colimit.cocone (diagram J P X.unop ⋙ F)).ι W ≫\n      (HasColimit.isoOfNatIso\n          (NatIso.ofComponents fun W =>\n            IsLimit.conePointUniqueUpToIso\n                (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n                (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F)) ≪≫\n              HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm)).hom =\n    ((IsLimit.conePointUniqueUpToIso\n            (isLimitOfPreserves F (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P))))\n            (limit.isLimit (MulticospanIndex.multicospan (Cover.index W.unop P) ⋙ F))).hom ≫\n        (HasLimit.isoOfNatIso (Cover.multicospanComp F P W.unop).symm).hom) ≫\n      colimit.ι (diagram J (P ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [Category.assoc, HasLimit.isoOfNatIso_hom_π, Iso.symm_hom, Cover.multicospanComp_hom_inv_left, eqToHom_refl,\n  Category.comp_id, limit.conePointUniqueUpToIso_hom_comp, Functor.mapCone_π_app, Multiequalizer.multifork_π_app_left,\n  Multiequalizer.lift_ι, Functor.map_comp, eq_self_iff_true, Category.assoc, Iso.trans_hom, Iso.cancel_iso_hom_left,\n  NatIso.ofComponents_hom_app, colimit.cocone_ι, Category.assoc, HasColimit.isoOfNatIso_ι_hom]\n[GOAL]\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\n⊢ whiskerLeft (plusObj J P) η ≫ (plusCompIso J G P).hom = (plusCompIso J F P).hom ≫ plusMap J (whiskerLeft P η)\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\n⊢ NatTrans.app (whiskerLeft (plusObj J P) η ≫ (plusCompIso J G P).hom) X =\n    NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerLeft P η)) X\n[PROOFSTEP]\napply (isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).hom_ext\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\n⊢ ∀ (j : (Cover J X.unop)ᵒᵖ),\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        NatTrans.app (whiskerLeft (plusObj J P) η ≫ (plusCompIso J G P).hom) X =\n      NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerLeft P η)) X\n[PROOFSTEP]\nintro W\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      NatTrans.app (whiskerLeft (plusObj J P) η ≫ (plusCompIso J G P).hom) X =\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerLeft P η)) X\n[PROOFSTEP]\ndsimp [plusObj, plusMap]\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      NatTrans.app η (colimit (diagram J P X.unop)) ≫ NatTrans.app (plusCompIso J G P).hom X =\n    F.map (colimit.ι (diagram J P X.unop) W) ≫\n      NatTrans.app (plusCompIso J F P).hom X ≫ colimMap (diagramNatTrans J (whiskerLeft P η) X.unop)\n[PROOFSTEP]\nsimp only [ι_plusCompIso_hom, ι_colimMap, whiskerLeft_app, ι_plusCompIso_hom_assoc, NatTrans.naturality_assoc,\n  GrothendieckTopology.diagramNatTrans_app]\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫\n      NatTrans.app (diagramCompIso J G P X.unop).hom W ≫ colimit.ι (diagram J (P ⋙ G) X.unop) W =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n          (_ :\n            ∀ (b : (Cover.index W.unop (P ⋙ G)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) b =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) b) ≫\n        colimit.ι (diagram J (P ⋙ G) X.unop) W\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase w.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ (NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ NatTrans.app (diagramCompIso J G P X.unop).hom W) ≫\n      colimit.ι (diagram J (P ⋙ G) X.unop) W =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n          (_ :\n            ∀ (b : (Cover.index W.unop (P ⋙ G)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) b =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) b)) ≫\n      colimit.ι (diagram J (P ⋙ G) X.unop) W\n[PROOFSTEP]\ncongr 1\n  -- porting note: this used to work with `ext`\n    -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\ncase w.h.e_a\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ NatTrans.app (diagramCompIso J G P X.unop).hom W =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) ((diagram J (P ⋙ F) X.unop).obj W)\n        (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n        (_ :\n          ∀ (b : (Cover.index W.unop (P ⋙ G)).R),\n            (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                  (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) b =\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                  (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) b)\n[PROOFSTEP]\napply Multiequalizer.hom_ext\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ ∀ (a : (Cover.index W.unop (P ⋙ G)).L),\n    (NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ NatTrans.app (diagramCompIso J G P X.unop).hom W) ≫\n        Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a =\n      (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n          Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) ((diagram J (P ⋙ F) X.unop).obj W)\n            (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n            (_ :\n              ∀ (b : (Cover.index W.unop (P ⋙ G)).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                      (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                    MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) b =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                      (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                    MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) b)) ≫\n        Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (P ⋙ G)).L\n⊢ (NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ NatTrans.app (diagramCompIso J G P X.unop).hom W) ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n          (_ :\n            ∀ (b : (Cover.index W.unop (P ⋙ G)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) b =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) b) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) b)) ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (P ⋙ G)).L\n⊢ (NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ NatTrans.app (diagramCompIso J G P X.unop).hom W) ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (P ⋙ G)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app η (P.obj (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (P ⋙ G)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerLeft P η) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (P ⋙ G)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (P ⋙ G)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerLeft P η) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (P ⋙ G)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (P ⋙ G)) i)) ≫\n      Multiequalizer.ι (Cover.index W.unop (P ⋙ G)) a\n[PROOFSTEP]\nsimp\n  -- Porting note: in mathlib3 `simp` managed to apply this.\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝¹² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝¹¹ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝¹⁰ : Category.{max v u, w₂} E\nF✝ : D ⥤ E\ninst✝⁹ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁸ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝⁷ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F✝\nP✝ : Cᵒᵖ ⥤ D\ninst✝⁶ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝⁵ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝⁴ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F✝\nF G : D ⥤ E\nη : F ⟶ G\nP : Cᵒᵖ ⥤ D\ninst✝³ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\ninst✝² : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ G\ninst✝ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) G\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (P ⋙ G)).L\n⊢ NatTrans.app η (multiequalizer (Cover.index W.unop P)) ≫ G.map (Multiequalizer.ι (Cover.index W.unop P) a) =\n    F.map (Multiequalizer.ι (Cover.index W.unop P) a) ≫ NatTrans.app η (P.obj (op a.Y))\n[PROOFSTEP]\nerw [η.naturality]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\n⊢ whiskerRight (plusMap J η) F ≫ (plusCompIso J F Q).hom = (plusCompIso J F P).hom ≫ plusMap J (whiskerRight η F)\n[PROOFSTEP]\next X\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\n⊢ NatTrans.app (whiskerRight (plusMap J η) F ≫ (plusCompIso J F Q).hom) X =\n    NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerRight η F)) X\n[PROOFSTEP]\napply (isColimitOfPreserves F (colimit.isColimit (J.diagram P X.unop))).hom_ext\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\n⊢ ∀ (j : (Cover J X.unop)ᵒᵖ),\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        NatTrans.app (whiskerRight (plusMap J η) F ≫ (plusCompIso J F Q).hom) X =\n      NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι j ≫\n        NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerRight η F)) X\n[PROOFSTEP]\nintro W\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      NatTrans.app (whiskerRight (plusMap J η) F ≫ (plusCompIso J F Q).hom) X =\n    NatTrans.app (F.mapCocone (colimit.cocone (diagram J P X.unop))).ι W ≫\n      NatTrans.app ((plusCompIso J F P).hom ≫ plusMap J (whiskerRight η F)) X\n[PROOFSTEP]\ndsimp [plusObj, plusMap]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      F.map (colimMap (diagramNatTrans J η X.unop)) ≫ NatTrans.app (plusCompIso J F Q).hom X =\n    F.map (colimit.ι (diagram J P X.unop) W) ≫\n      NatTrans.app (plusCompIso J F P).hom X ≫ colimMap (diagramNatTrans J (whiskerRight η F) X.unop)\n[PROOFSTEP]\nsimp only [ι_colimMap, whiskerRight_app, ι_plusCompIso_hom_assoc, GrothendieckTopology.diagramNatTrans_app]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W) ≫\n      F.map (colimMap (diagramNatTrans J η X.unop)) ≫ NatTrans.app (plusCompIso J F Q).hom X =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (b : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) b) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) b =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) b) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) b) ≫\n        colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [← Category.assoc, ← F.map_comp]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map (colimit.ι (diagram J P X.unop) W ≫ colimMap (diagramNatTrans J η X.unop)) ≫\n      NatTrans.app (plusCompIso J F Q).hom X =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) ((diagram J (P ⋙ F) X.unop).obj W)\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (b : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) b) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) b =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) b) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) b)) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\ndsimp [colimMap, IsColimit.map]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (colimit.ι (diagram J P X.unop) W ≫\n          colimit.desc (diagram J P X.unop)\n            ((Cocones.precompose (diagramNatTrans J η X.unop)).obj (colimit.cocone (diagram J Q X.unop)))) ≫\n      NatTrans.app (plusCompIso J F Q).hom X =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [colimit.ι_desc]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (NatTrans.app ((Cocones.precompose (diagramNatTrans J η X.unop)).obj (colimit.cocone (diagram J Q X.unop))).ι\n          W) ≫\n      NatTrans.app (plusCompIso J F Q).hom X =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\ndsimp [Cocones.precompose]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n            (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n            (_ :\n              ∀ (i : (Cover.index W.unop Q).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.fst (Cover.index W.unop Q) i =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.snd (Cover.index W.unop Q) i) ≫\n          colimit.ι (diagram J Q X.unop) W) ≫\n      NatTrans.app (plusCompIso J F Q).hom X =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [Functor.map_comp, Category.assoc, ι_plusCompIso_hom]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n          (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index W.unop Q).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop Q) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n      NatTrans.app (diagramCompIso J F Q X.unop).hom W ≫ colimit.ι (diagram J (Q ⋙ F) X.unop) W =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i) ≫\n        colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n            (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n            (_ :\n              ∀ (i : (Cover.index W.unop Q).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.fst (Cover.index W.unop Q) i =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n        NatTrans.app (diagramCompIso J F Q X.unop).hom W) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      colimit.ι (diagram J (Q ⋙ F) X.unop) W\n[PROOFSTEP]\ncongr 1\n  -- porting note: this used to work with `ext`\n    -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\ncase w.h.e_a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ F.map\n        (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n          (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index W.unop Q).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop Q) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n      NatTrans.app (diagramCompIso J F Q X.unop).hom W =\n    NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n      Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n        (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n        (_ :\n          ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n            (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                  (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                  (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)\n[PROOFSTEP]\napply Multiequalizer.hom_ext\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\n⊢ ∀ (a : (Cover.index W.unop (Q ⋙ F)).L),\n    (F.map\n            (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n              (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n              (_ :\n                ∀ (i : (Cover.index W.unop Q).R),\n                  (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                        (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                      MulticospanIndex.fst (Cover.index W.unop Q) i =\n                    (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                        (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                      MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n          NatTrans.app (diagramCompIso J F Q X.unop).hom W) ≫\n        Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a =\n      (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n          Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n            (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n            (_ :\n              ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                      (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                    MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                      (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                    MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n        Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a\n[PROOFSTEP]\nintro a\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (Q ⋙ F)).L\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n            (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n            (_ :\n              ∀ (i : (Cover.index W.unop Q).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.fst (Cover.index W.unop Q) i =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n        NatTrans.app (diagramCompIso J F Q X.unop).hom W) ≫\n      Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (Q ⋙ F)).L\n⊢ (F.map\n          (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n            (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n            (_ :\n              ∀ (i : (Cover.index W.unop Q).R),\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.fst (Cover.index W.unop Q) i =\n                  (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                      (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                    MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n        NatTrans.app (diagramCompIso J F Q X.unop).hom W) ≫\n      Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a =\n    (NatTrans.app (diagramCompIso J F P X.unop).hom W ≫\n        Multiequalizer.lift (Cover.index W.unop (Q ⋙ F)) (multiequalizer (Cover.index W.unop (P ⋙ F)))\n          (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ F.map (NatTrans.app η (op i.Y)))\n          (_ :\n            ∀ (i : (Cover.index W.unop (Q ⋙ F)).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop (Q ⋙ F)) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop (P ⋙ F)) i ≫ NatTrans.app (whiskerRight η F) (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop (Q ⋙ F)) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop (Q ⋙ F)) i)) ≫\n      Multiequalizer.ι (Cover.index W.unop (Q ⋙ F)) a\n[PROOFSTEP]\nsimp only [diagramCompIso_hom_ι_assoc, Multiequalizer.lift_ι, diagramCompIso_hom_ι, Category.assoc]\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP✝ : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nX : Cᵒᵖ\nW : (Cover J X.unop)ᵒᵖ\na : (Cover.index W.unop (Q ⋙ F)).L\n⊢ F.map\n        (Multiequalizer.lift (Cover.index W.unop Q) (multiequalizer (Cover.index W.unop P))\n          (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n          (_ :\n            ∀ (i : (Cover.index W.unop Q).R),\n              (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.fstTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.fst (Cover.index W.unop Q) i =\n                (fun i => Multiequalizer.ι (Cover.index W.unop P) i ≫ NatTrans.app η (op i.Y))\n                    (MulticospanIndex.sndTo (Cover.index W.unop Q) i) ≫\n                  MulticospanIndex.snd (Cover.index W.unop Q) i)) ≫\n      F.map (Multiequalizer.ι (Cover.index W.unop Q) a) =\n    F.map (Multiequalizer.ι (Cover.index W.unop P) a) ≫ F.map (NatTrans.app η (op a.Y))\n[PROOFSTEP]\nsimp only [← F.map_comp, Multiequalizer.lift_ι]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\n⊢ whiskerRight (toPlus J P) F ≫ (plusCompIso J F P).hom = toPlus J (P ⋙ F)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ NatTrans.app (whiskerRight (toPlus J P) F ≫ (plusCompIso J F P).hom) x✝ = NatTrans.app (toPlus J (P ⋙ F)) x✝\n[PROOFSTEP]\ndsimp [toPlus]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ F.map (Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P x✝.unop) (op ⊤)) ≫\n      NatTrans.app (plusCompIso J F P).hom x✝ =\n    Cover.toMultiequalizer ⊤ (P ⋙ F) ≫ colimit.ι (diagram J (P ⋙ F) x✝.unop) (op ⊤)\n[PROOFSTEP]\nsimp only [ι_plusCompIso_hom, Functor.map_comp, Category.assoc]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ F.map (Cover.toMultiequalizer ⊤ P) ≫\n      NatTrans.app (diagramCompIso J F P x✝.unop).hom (op ⊤) ≫ colimit.ι (diagram J (P ⋙ F) x✝.unop) (op ⊤) =\n    Cover.toMultiequalizer ⊤ (P ⋙ F) ≫ colimit.ι (diagram J (P ⋙ F) x✝.unop) (op ⊤)\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ (F.map (Cover.toMultiequalizer ⊤ P) ≫ NatTrans.app (diagramCompIso J F P x✝.unop).hom (op ⊤)) ≫\n      colimit.ι (diagram J (P ⋙ F) x✝.unop) (op ⊤) =\n    Cover.toMultiequalizer ⊤ (P ⋙ F) ≫ colimit.ι (diagram J (P ⋙ F) x✝.unop) (op ⊤)\n[PROOFSTEP]\ncongr 1\n  -- porting note: this used to work with `ext`\n    -- See https://github.com/leanprover-community/mathlib4/issues/5229\n[GOAL]\ncase w.h.e_a\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ F.map (Cover.toMultiequalizer ⊤ P) ≫ NatTrans.app (diagramCompIso J F P x✝.unop).hom (op ⊤) =\n    Cover.toMultiequalizer ⊤ (P ⋙ F)\n[PROOFSTEP]\napply Multiequalizer.hom_ext\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ ∀ (a : (Cover.index (op ⊤).unop (P ⋙ F)).L),\n    (F.map (Cover.toMultiequalizer ⊤ P) ≫ NatTrans.app (diagramCompIso J F P x✝.unop).hom (op ⊤)) ≫\n        Multiequalizer.ι (Cover.index (op ⊤).unop (P ⋙ F)) a =\n      Cover.toMultiequalizer ⊤ (P ⋙ F) ≫ Multiequalizer.ι (Cover.index (op ⊤).unop (P ⋙ F)) a\n[PROOFSTEP]\ndelta Cover.toMultiequalizer\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ ∀ (a : (Cover.index (op ⊤).unop (P ⋙ F)).L),\n    (F.map\n            (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op x✝.unop)) (fun I => P.map I.f.op)\n              (_ :\n                ∀ (I : (Cover.index ⊤ P).R),\n                  (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I =\n                    (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I)) ≫\n          NatTrans.app (diagramCompIso J F P x✝.unop).hom (op ⊤)) ≫\n        Multiequalizer.ι (Cover.index (op ⊤).unop (P ⋙ F)) a =\n      Multiequalizer.lift (Cover.index ⊤ (P ⋙ F)) ((P ⋙ F).obj (op x✝.unop)) (fun I => (P ⋙ F).map I.f.op)\n          (_ :\n            ∀ (I : (Cover.index ⊤ (P ⋙ F)).R),\n              (fun I => (P ⋙ F).map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ (P ⋙ F)) I) ≫\n                  MulticospanIndex.fst (Cover.index ⊤ (P ⋙ F)) I =\n                (fun I => (P ⋙ F).map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ (P ⋙ F)) I) ≫\n                  MulticospanIndex.snd (Cover.index ⊤ (P ⋙ F)) I) ≫\n        Multiequalizer.ι (Cover.index (op ⊤).unop (P ⋙ F)) a\n[PROOFSTEP]\nsimp only [diagramCompIso_hom_ι, Category.assoc, ← F.map_comp]\n[GOAL]\ncase w.h.e_a.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nx✝ : Cᵒᵖ\n⊢ ∀ (a : (Cover.index (op ⊤).unop (P ⋙ F)).L),\n    F.map\n        (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op x✝.unop)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I) ≫\n          Multiequalizer.ι (Cover.index (op ⊤).unop P) a) =\n      Multiequalizer.lift (Cover.index ⊤ (P ⋙ F)) ((P ⋙ F).obj (op x✝.unop)) (fun I => (P ⋙ F).map I.f.op)\n          (_ :\n            ∀ (I : (Cover.index ⊤ (P ⋙ F)).R),\n              (fun I => (P ⋙ F).map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ (P ⋙ F)) I) ≫\n                  MulticospanIndex.fst (Cover.index ⊤ (P ⋙ F)) I =\n                (fun I => (P ⋙ F).map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ (P ⋙ F)) I) ≫\n                  MulticospanIndex.snd (Cover.index ⊤ (P ⋙ F)) I) ≫\n        Multiequalizer.ι (Cover.index (op ⊤).unop (P ⋙ F)) a\n[PROOFSTEP]\nsimp only [unop_op, limit.lift_π, Multifork.ofι_π_app, Functor.comp_obj, Functor.comp_map, implies_true]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\n⊢ toPlus J (P ⋙ F) ≫ (plusCompIso J F P).inv = whiskerRight (toPlus J P) F\n[PROOFSTEP]\nsimp [Iso.comp_inv_eq]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nhP : Presheaf.IsSheaf J (plusObj J P ⋙ F)\n⊢ (plusCompIso J F P).inv = plusLift J (whiskerRight (toPlus J P) F) hP\n[PROOFSTEP]\napply J.plusLift_unique\n[GOAL]\ncase hγ\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁷ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁶ : Category.{max v u, w₂} E\nF : D ⥤ E\ninst✝⁵ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) D\ninst✝⁴ : ∀ (α β : Type (max v u)) (fst snd : β → α), HasLimitsOfShape (WalkingMulticospan fst snd) E\ninst✝³ : (X : C) → (W : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index W P)) F\nP : Cᵒᵖ ⥤ D\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ E\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ F\nhP : Presheaf.IsSheaf J (plusObj J P ⋙ F)\n⊢ toPlus J (P ⋙ F) ≫ (plusCompIso J F P).inv = whiskerRight (toPlus J P) F\n[PROOFSTEP]\nsimp [Iso.comp_inv_eq]\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.CompatiblePlus", "llama_tokens": 85421, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6654105454764747, "lm_q2_score": 0.399811640739795, "lm_q1q2_score": 0.26603888195251135}}
{"text": "[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\n⊢ ¬IsUnit p\n[PROOFSTEP]\nsimpa only [Associates.isUnit_iff_eq_one] using hp.1\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = a * b\nha : a = p\n⊢ IsUnit b\n[PROOFSTEP]\nrw [ha] at h \n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n⊢ IsUnit b\n[PROOFSTEP]\napply isUnit_of_associated_mul (show Associated (p * b) p by conv_rhs => rw [h]) h₁\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n⊢ Associated (p * b) p\n[PROOFSTEP]\nconv_rhs => rw [h]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p\n[PROOFSTEP]\nrw [h]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p\n[PROOFSTEP]\nrw [h]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : IsAtom p\na b : Associates M\nh : p = p * b\nha : a = p\n| p\n[PROOFSTEP]\nrw [h]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\n⊢ p ≠ ⊥\n[PROOFSTEP]\nsimpa only [Associates.isUnit_iff_eq_one, Associates.bot_eq_one] using hp.1\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\nb : Associates M\nx✝ : b < p\na : Associates M\nhab : p = b * a\nhb✝ : ¬p ∣ b\nhb : IsUnit b\n⊢ b = ⊥\n[PROOFSTEP]\nrwa [Associates.isUnit_iff_eq_one, ← Associates.bot_eq_one] at hb \n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\nb : Associates M\nx✝ : b < p\na : Associates M\nhab : p = b * a\nhb : ¬p ∣ b\nha : IsUnit a\n⊢ b = p * ↑(IsUnit.unit ha)⁻¹\n[PROOFSTEP]\nsimp [hab]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\nb : Associates M\nx✝ : b < p\na : Associates M\nhab : p = b * a\nhb : ¬p ∣ b\nha : IsUnit a\n⊢ b = b * a * ↑(IsUnit.unit ha)⁻¹\n[PROOFSTEP]\nrw [mul_assoc]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\nb : Associates M\nx✝ : b < p\na : Associates M\nhab : p = b * a\nhb : ¬p ∣ b\nha : IsUnit a\n⊢ b = b * (a * ↑(IsUnit.unit ha)⁻¹)\n[PROOFSTEP]\nrw [IsUnit.mul_val_inv ha]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nh₁ : p ≠ 0\nhp : Irreducible p\nb : Associates M\nx✝ : b < p\na : Associates M\nhab : p = b * a\nhb : ¬p ∣ b\nha : IsUnit a\n⊢ b = b * 1\n[PROOFSTEP]\nrw [mul_one]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\n⊢ ∃ c, c 1 = p ∧ StrictMono c ∧ ∀ {r : Associates M}, r ≤ p ^ n ↔ ∃ i, r = c i\n[PROOFSTEP]\nrefine' ⟨fun i => p ^ (i : ℕ), _, fun n m h => _, @fun y => ⟨fun h => _, _⟩⟩\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\n⊢ (fun i => p ^ ↑i) 1 = p\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\n⊢ p ^ ↑1 = p\n[PROOFSTEP]\nrw [Fin.val_one', Nat.mod_eq_of_lt, pow_one]\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\n⊢ 1 < n + 1\n[PROOFSTEP]\nexact Nat.lt_succ_of_le (Nat.one_le_iff_ne_zero.mpr hn)\n[GOAL]\ncase refine'_2\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn✝ : ℕ\nhn : n✝ ≠ 0\nhp : Prime p\nn m : Fin (n✝ + 1)\nh : n < m\n⊢ (fun i => p ^ ↑i) n < (fun i => p ^ ↑i) m\n[PROOFSTEP]\nexact\n  Associates.dvdNotUnit_iff_lt.mp\n    ⟨pow_ne_zero n hp.ne_zero, p ^ (m - n : ℕ),\n      not_isUnit_of_not_isUnit_dvd hp.not_unit (dvd_pow dvd_rfl (Nat.sub_pos_of_lt h).ne'),\n      (pow_mul_pow_sub p h.le).symm⟩\n[GOAL]\ncase refine'_3\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\ny : Associates M\nh : y ≤ p ^ n\n⊢ ∃ i, y = (fun i => p ^ ↑i) i\n[PROOFSTEP]\nobtain ⟨i, i_le, hi⟩ := (dvd_prime_pow hp n).1 h\n[GOAL]\ncase refine'_3.intro.intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\ny : Associates M\nh : y ≤ p ^ n\ni : ℕ\ni_le : i ≤ n\nhi : Associated y (p ^ i)\n⊢ ∃ i, y = (fun i => p ^ ↑i) i\n[PROOFSTEP]\nrw [associated_iff_eq] at hi \n[GOAL]\ncase refine'_3.intro.intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\ny : Associates M\nh : y ≤ p ^ n\ni : ℕ\ni_le : i ≤ n\nhi : y = p ^ i\n⊢ ∃ i, y = (fun i => p ^ ↑i) i\n[PROOFSTEP]\nexact ⟨⟨i, Nat.lt_succ_of_le i_le⟩, hi⟩\n[GOAL]\ncase refine'_4\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\ny : Associates M\n⊢ (∃ i, y = (fun i => p ^ ↑i) i) → y ≤ p ^ n\n[PROOFSTEP]\nrintro ⟨i, rfl⟩\n[GOAL]\ncase refine'_4.intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np : Associates M\nn : ℕ\nhn : n ≠ 0\nhp : Prime p\ni : Fin (n + 1)\n⊢ (fun i => p ^ ↑i) i ≤ p ^ n\n[PROOFSTEP]\nexact ⟨p ^ (n - i : ℕ), (pow_mul_pow_sub p (Nat.succ_le_succ_iff.mp i.2)).symm⟩\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ IsUnit (c 0)\n[PROOFSTEP]\nobtain ⟨i, hr⟩ := h₂.mp Associates.one_le\n[GOAL]\ncase intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (n + 1)\nhr : 1 = c i\n⊢ IsUnit (c 0)\n[PROOFSTEP]\nrw [Associates.isUnit_iff_eq_one, ← Associates.le_one_iff, hr]\n[GOAL]\ncase intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (n + 1)\nhr : 1 = c i\n⊢ c 0 ≤ c i\n[PROOFSTEP]\nexact h₁.monotone (Fin.zero_le i)\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\n⊢ Irreducible (c 1)\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nhn : Nat.zero ≠ 0\nc : Fin (Nat.zero + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ Irreducible (c 1)\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ Irreducible (c 1)\n[PROOFSTEP]\nrefine' (Associates.isAtom_iff (ne_zero_of_dvd_ne_zero hq (h₂.2 ⟨1, rfl⟩))).mp ⟨_, fun b hb => _⟩\n[GOAL]\ncase succ.refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ c 1 ≠ ⊥\n[PROOFSTEP]\nexact ne_bot_of_gt (h₁ (show (0 : Fin (n + 2)) < 1 from Fin.one_pos))\n[GOAL]\ncase succ.refine'_2\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nb : Associates M\nhb : b < c 1\n⊢ b = ⊥\n[PROOFSTEP]\nobtain ⟨⟨i, hi⟩, rfl⟩ := h₂.1 (hb.le.trans (h₂.2 ⟨1, rfl⟩))\n[GOAL]\ncase succ.refine'_2.intro.mk\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : ℕ\nhi : i < Nat.succ n + 1\nhb : c { val := i, isLt := hi } < c 1\n⊢ c { val := i, isLt := hi } = ⊥\n[PROOFSTEP]\ncases i\n[GOAL]\ncase succ.refine'_2.intro.mk.zero\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : Nat.zero < Nat.succ n + 1\nhb : c { val := Nat.zero, isLt := hi } < c 1\n⊢ c { val := Nat.zero, isLt := hi } = ⊥\n[PROOFSTEP]\nexact (Associates.isUnit_iff_eq_one _).mp (first_of_chain_isUnit h₁ @h₂)\n[GOAL]\ncase succ.refine'_2.intro.mk.succ\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nhq : q ≠ 0\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nn✝ : ℕ\nhi : Nat.succ n✝ < Nat.succ n + 1\nhb : c { val := Nat.succ n✝, isLt := hi } < c 1\n⊢ c { val := Nat.succ n✝, isLt := hi } = ⊥\n[PROOFSTEP]\nsimpa [Fin.lt_iff_val_lt_val] using h₁.lt_iff_lt.mp hb\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np q r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhp : Prime p\nhr : r ∣ q\nhp' : p ∣ r\n⊢ p = c 1\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np q r : Associates M\nhp : Prime p\nhr : r ∣ q\nhp' : p ∣ r\nhn : Nat.zero ≠ 0\nc : Fin (Nat.zero + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ p = c 1\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\np q r : Associates M\nhp : Prime p\nhr : r ∣ q\nhp' : p ∣ r\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\n⊢ p = c 1\n[PROOFSTEP]\nobtain ⟨i, rfl⟩ := h₂.1 (dvd_trans hp' hr)\n[GOAL]\ncase succ.intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (Nat.succ n + 1)\nhp : Prime (c i)\nhp' : c i ∣ r\n⊢ c i = c 1\n[PROOFSTEP]\nrefine' congr_arg c (eq_of_ge_of_not_gt _ fun hi => _)\n[GOAL]\ncase succ.intro.refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (Nat.succ n + 1)\nhp : Prime (c i)\nhp' : c i ∣ r\n⊢ 1 ≤ i\n[PROOFSTEP]\nrw [Fin.le_iff_val_le_val, Fin.val_one, Nat.succ_le_iff, ← Fin.val_zero' (n.succ + 1), ← Fin.lt_iff_val_lt_val,\n  Fin.pos_iff_ne_zero]\n[GOAL]\ncase succ.intro.refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (Nat.succ n + 1)\nhp : Prime (c i)\nhp' : c i ∣ r\n⊢ i ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase succ.intro.refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhp : Prime (c 0)\nhp' : c 0 ∣ r\n⊢ False\n[PROOFSTEP]\nexact hp.not_unit (first_of_chain_isUnit h₁ @h₂)\n[GOAL]\ncase succ.intro.refine'_2\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\ni : Fin (Nat.succ n + 1)\nhp : Prime (c i)\nhp' : c i ∣ r\nhi : 1 < i\n⊢ False\n[PROOFSTEP]\nobtain rfl | ⟨j, rfl⟩ := i.eq_zero_or_eq_succ\n[GOAL]\ncase succ.intro.refine'_2.inl\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhp : Prime (c 0)\nhp' : c 0 ∣ r\nhi : 1 < 0\n⊢ False\n[PROOFSTEP]\ncases hi\n[GOAL]\ncase succ.intro.refine'_2.inr.intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nj : Fin (n + 1)\nhp : Prime (c (Fin.succ j))\nhp' : c (Fin.succ j) ∣ r\nhi : 1 < Fin.succ j\n⊢ False\n[PROOFSTEP]\nrefine'\n  not_irreducible_of_not_unit_dvdNotUnit\n    (DvdNotUnit.not_unit (Associates.dvdNotUnit_iff_lt.2 (h₁ (show (0 : Fin (n + 2)) < j from _)))) _ hp.irreducible\n[GOAL]\ncase succ.intro.refine'_2.inr.intro.refine'_1\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nj : Fin (n + 1)\nhp : Prime (c (Fin.succ j))\nhp' : c (Fin.succ j) ∣ r\nhi : 1 < Fin.succ j\n⊢ 0 < ↑↑j\n[PROOFSTEP]\nsimpa [Fin.succ_lt_succ_iff, Fin.lt_iff_val_lt_val] using hi\n[GOAL]\ncase succ.intro.refine'_2.inr.intro.refine'_2\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nj : Fin (n + 1)\nhp : Prime (c (Fin.succ j))\nhp' : c (Fin.succ j) ∣ r\nhi : 1 < Fin.succ j\n⊢ DvdNotUnit (c ↑↑j) (c (Fin.succ j))\n[PROOFSTEP]\nrefine' Associates.dvdNotUnit_iff_lt.2 (h₁ _)\n[GOAL]\ncase succ.intro.refine'_2.inr.intro.refine'_2\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq r : Associates M\nhr : r ∣ q\nn : ℕ\nhn : Nat.succ n ≠ 0\nc : Fin (Nat.succ n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nj : Fin (n + 1)\nhp : Prime (c (Fin.succ j))\nhp' : c (Fin.succ j) ∣ r\nhi : 1 < Fin.succ j\n⊢ ↑↑j < Fin.succ j\n[PROOFSTEP]\nsimpa only [Fin.coe_eq_castSucc] using Fin.lt_succ\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\n⊢ Finset.card m ≤ n + 1\n[PROOFSTEP]\nclassical\nhave mem_image : ∀ r : Associates M, r ≤ q → r ∈ Finset.univ.image c :=\n  by\n  intro r hr\n  obtain ⟨i, hi⟩ := h₂.1 hr\n  exact Finset.mem_image.2 ⟨i, Finset.mem_univ _, hi.symm⟩\nrw [← Finset.card_fin (n + 1)]\nexact (Finset.card_le_of_subset fun x hx => mem_image x <| hm x hx).trans Finset.card_image_le\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\n⊢ Finset.card m ≤ n + 1\n[PROOFSTEP]\nhave mem_image : ∀ r : Associates M, r ≤ q → r ∈ Finset.univ.image c :=\n  by\n  intro r hr\n  obtain ⟨i, hi⟩ := h₂.1 hr\n  exact Finset.mem_image.2 ⟨i, Finset.mem_univ _, hi.symm⟩\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\n⊢ ∀ (r : Associates M), r ≤ q → r ∈ Finset.image c Finset.univ\n[PROOFSTEP]\nintro r hr\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\nr : Associates M\nhr : r ≤ q\n⊢ r ∈ Finset.image c Finset.univ\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := h₂.1 hr\n[GOAL]\ncase intro\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\nr : Associates M\nhr : r ≤ q\ni : Fin (n + 1)\nhi : r = c i\n⊢ r ∈ Finset.image c Finset.univ\n[PROOFSTEP]\nexact Finset.mem_image.2 ⟨i, Finset.mem_univ _, hi.symm⟩\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\nmem_image : ∀ (r : Associates M), r ≤ q → r ∈ Finset.image c Finset.univ\n⊢ Finset.card m ≤ n + 1\n[PROOFSTEP]\nrw [← Finset.card_fin (n + 1)]\n[GOAL]\nM : Type u_1\ninst✝ : CancelCommMonoidWithZero M\nq : Associates M\nn : ℕ\nc : Fin (n + 1) → Associates M\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nm : Finset (Associates M)\nhm : ∀ (r : Associates M), r ∈ m → r ≤ q\nmem_image : ∀ (r : Associates M), r ≤ q → r ∈ Finset.image c Finset.univ\n⊢ Finset.card m ≤ Finset.card Finset.univ\n[PROOFSTEP]\nexact (Finset.card_le_of_subset fun x hx => mem_image x <| hm x hx).trans Finset.card_image_le\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\n⊢ ∃ i, r = c 1 ^ ↑i\n[PROOFSTEP]\nclassical\nlet i := Multiset.card (normalizedFactors r)\nhave hi : normalizedFactors r = Multiset.replicate i (c 1) :=\n  by\n  apply Multiset.eq_replicate_of_mem\n  intro b hb\n  refine'\n    eq_second_of_chain_of_prime_dvd hn h₁ (@fun r' => h₂) (prime_of_normalized_factor b hb) hr\n      (dvd_of_mem_normalizedFactors hb)\nhave H : r = c 1 ^ i :=\n  by\n  have := UniqueFactorizationMonoid.normalizedFactors_prod (ne_zero_of_dvd_ne_zero hq hr)\n  rw [associated_iff_eq, hi, Multiset.prod_replicate] at this \n  rw [this]\nrefine' ⟨⟨i, _⟩, H⟩\nhave : (Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ)).card = i + 1 :=\n  by\n  conv_rhs => rw [← Finset.card_fin (i + 1)]\n  cases n\n  · contradiction\n  rw [Finset.card_image_iff]\n  refine' Set.injOn_of_injective (fun m m' h => Fin.ext _) _\n  refine' pow_injective_of_not_unit (element_of_chain_not_isUnit_of_index_ne_zero (by simp) h₁) _ h\n  exact Irreducible.ne_zero (second_of_chain_is_irreducible hn h₁ (@h₂) hq)\nsuffices H' : ∀ r ∈ Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ), r ≤ q\n· simp only [← Nat.succ_le_iff, Nat.succ_eq_add_one, ← this]\n  apply card_subset_divisors_le_length_of_chain (@h₂) H'\nsimp only [Finset.mem_image]\nrintro r ⟨a, _, rfl⟩\nrefine' dvd_trans _ hr\nuse c 1 ^ (i - (a : ℕ))\nrw [pow_mul_pow_sub (c 1)]\n· exact H\n· exact Nat.succ_le_succ_iff.mp a.2\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\n⊢ ∃ i, r = c 1 ^ ↑i\n[PROOFSTEP]\nlet i := Multiset.card (normalizedFactors r)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\n⊢ ∃ i, r = c 1 ^ ↑i\n[PROOFSTEP]\nhave hi : normalizedFactors r = Multiset.replicate i (c 1) :=\n  by\n  apply Multiset.eq_replicate_of_mem\n  intro b hb\n  refine'\n    eq_second_of_chain_of_prime_dvd hn h₁ (@fun r' => h₂) (prime_of_normalized_factor b hb) hr\n      (dvd_of_mem_normalizedFactors hb)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\n⊢ normalizedFactors r = Multiset.replicate i (c 1)\n[PROOFSTEP]\napply Multiset.eq_replicate_of_mem\n[GOAL]\ncase a\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\n⊢ ∀ (b : Associates M), b ∈ normalizedFactors r → b = c 1\n[PROOFSTEP]\nintro b hb\n[GOAL]\ncase a\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nb : Associates M\nhb : b ∈ normalizedFactors r\n⊢ b = c 1\n[PROOFSTEP]\nrefine'\n  eq_second_of_chain_of_prime_dvd hn h₁ (@fun r' => h₂) (prime_of_normalized_factor b hb) hr\n    (dvd_of_mem_normalizedFactors hb)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\n⊢ ∃ i, r = c 1 ^ ↑i\n[PROOFSTEP]\nhave H : r = c 1 ^ i :=\n  by\n  have := UniqueFactorizationMonoid.normalizedFactors_prod (ne_zero_of_dvd_ne_zero hq hr)\n  rw [associated_iff_eq, hi, Multiset.prod_replicate] at this \n  rw [this]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\n⊢ r = c 1 ^ i\n[PROOFSTEP]\nhave := UniqueFactorizationMonoid.normalizedFactors_prod (ne_zero_of_dvd_ne_zero hq hr)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nthis : Associated (Multiset.prod (normalizedFactors r)) r\n⊢ r = c 1 ^ i\n[PROOFSTEP]\nrw [associated_iff_eq, hi, Multiset.prod_replicate] at this \n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nthis : c 1 ^ i = r\n⊢ r = c 1 ^ i\n[PROOFSTEP]\nrw [this]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ ∃ i, r = c 1 ^ ↑i\n[PROOFSTEP]\nrefine' ⟨⟨i, _⟩, H⟩\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ i < n + 1\n[PROOFSTEP]\nhave : (Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ)).card = i + 1 :=\n  by\n  conv_rhs => rw [← Finset.card_fin (i + 1)]\n  cases n\n  · contradiction\n  rw [Finset.card_image_iff]\n  refine' Set.injOn_of_injective (fun m m' h => Fin.ext _) _\n  refine' pow_injective_of_not_unit (element_of_chain_not_isUnit_of_index_ne_zero (by simp) h₁) _ h\n  exact Irreducible.ne_zero (second_of_chain_is_irreducible hn h₁ (@h₂) hq)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\n[PROOFSTEP]\nconv_rhs => rw [← Finset.card_fin (i + 1)]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n| i + 1\n[PROOFSTEP]\nrw [← Finset.card_fin (i + 1)]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n| i + 1\n[PROOFSTEP]\nrw [← Finset.card_fin (i + 1)]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n| i + 1\n[PROOFSTEP]\nrw [← Finset.card_fin (i + 1)]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = Finset.card Finset.univ\n[PROOFSTEP]\ncases n\n[GOAL]\ncase zero\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhn : Nat.zero ≠ 0\nc : Fin (Nat.zero + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = Finset.card Finset.univ\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nn✝ : ℕ\nhn : Nat.succ n✝ ≠ 0\nc : Fin (Nat.succ n✝ + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = Finset.card Finset.univ\n[PROOFSTEP]\nrw [Finset.card_image_iff]\n[GOAL]\ncase succ\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nn✝ : ℕ\nhn : Nat.succ n✝ ≠ 0\nc : Fin (Nat.succ n✝ + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\n⊢ Set.InjOn (fun m => c 1 ^ ↑m) ↑Finset.univ\n[PROOFSTEP]\nrefine' Set.injOn_of_injective (fun m m' h => Fin.ext _) _\n[GOAL]\ncase succ\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nn✝ : ℕ\nhn : Nat.succ n✝ ≠ 0\nc : Fin (Nat.succ n✝ + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nm m' : Fin (i + 1)\nh : c 1 ^ ↑m = c 1 ^ ↑m'\n⊢ ↑m = ↑m'\n[PROOFSTEP]\nrefine' pow_injective_of_not_unit (element_of_chain_not_isUnit_of_index_ne_zero (by simp) h₁) _ h\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nn✝ : ℕ\nhn : Nat.succ n✝ ≠ 0\nc : Fin (Nat.succ n✝ + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nm m' : Fin (i + 1)\nh : c 1 ^ ↑m = c 1 ^ ↑m'\n⊢ 1 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase succ\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nn✝ : ℕ\nhn : Nat.succ n✝ ≠ 0\nc : Fin (Nat.succ n✝ + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nm m' : Fin (i + 1)\nh : c 1 ^ ↑m = c 1 ^ ↑m'\n⊢ c 1 ≠ 0\n[PROOFSTEP]\nexact Irreducible.ne_zero (second_of_chain_is_irreducible hn h₁ (@h₂) hq)\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\n⊢ i < n + 1\n[PROOFSTEP]\nsuffices H' : ∀ r ∈ Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ), r ≤ q\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\nH' : ∀ (r_1 : Associates M), r_1 ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ → r_1 ≤ q\n⊢ i < n + 1\n[PROOFSTEP]\nsimp only [← Nat.succ_le_iff, Nat.succ_eq_add_one, ← this]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\nH' : ∀ (r_1 : Associates M), r_1 ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ → r_1 ≤ q\n⊢ Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) ≤ n + 1\n[PROOFSTEP]\napply card_subset_divisors_le_length_of_chain (@h₂) H'\n[GOAL]\ncase H'\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\n⊢ ∀ (r_1 : Associates M), r_1 ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ → r_1 ≤ q\n[PROOFSTEP]\nsimp only [Finset.mem_image]\n[GOAL]\ncase H'\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\n⊢ ∀ (r_1 : Associates M), (∃ a, a ∈ Finset.univ ∧ c 1 ^ ↑a = r_1) → r_1 ≤ q\n[PROOFSTEP]\nrintro r ⟨a, _, rfl⟩\n[GOAL]\ncase H'.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\na : Fin (↑Multiset.card (normalizedFactors r) + 1)\nleft✝ : a ∈ Finset.univ\n⊢ c 1 ^ ↑a ≤ q\n[PROOFSTEP]\nrefine' dvd_trans _ hr\n[GOAL]\ncase H'.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\na : Fin (↑Multiset.card (normalizedFactors r) + 1)\nleft✝ : a ∈ Finset.univ\n⊢ c 1 ^ ↑a ∣ r\n[PROOFSTEP]\nuse c 1 ^ (i - (a : ℕ))\n[GOAL]\ncase h\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\na : Fin (↑Multiset.card (normalizedFactors r) + 1)\nleft✝ : a ∈ Finset.univ\n⊢ r = c 1 ^ ↑a * c 1 ^ (i - ↑a)\n[PROOFSTEP]\nrw [pow_mul_pow_sub (c 1)]\n[GOAL]\ncase h\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\na : Fin (↑Multiset.card (normalizedFactors r) + 1)\nleft✝ : a ∈ Finset.univ\n⊢ r = c 1 ^ i\n[PROOFSTEP]\nexact H\n[GOAL]\ncase h\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq r : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhr : r ∣ q\nhq : q ≠ 0\ni : (fun x => ℕ) (normalizedFactors r) := ↑Multiset.card (normalizedFactors r)\nhi : normalizedFactors r = Multiset.replicate i (c 1)\nH : r = c 1 ^ i\nthis : Finset.card (Finset.image (fun m => c 1 ^ ↑m) Finset.univ) = i + 1\na : Fin (↑Multiset.card (normalizedFactors r) + 1)\nleft✝ : a ∈ Finset.univ\n⊢ ↑a ≤ i\n[PROOFSTEP]\nexact Nat.succ_le_succ_iff.mp a.2\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\n⊢ q = c 1 ^ n\n[PROOFSTEP]\nclassical\nobtain ⟨i, hi'⟩ := element_of_chain_eq_pow_second_of_chain hn h₁ (@fun r => h₂) (dvd_refl q) hq\nconvert hi'\nrefine' (Nat.lt_succ_iff.1 i.prop).antisymm' (Nat.le_of_succ_le_succ _)\ncalc\n  n + 1 = (Finset.univ : Finset (Fin (n + 1))).card := (Finset.card_fin _).symm\n  _ = (Finset.univ.image c).card := (Finset.card_image_iff.mpr (h₁.injective.injOn _)).symm\n  _ ≤ (Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ)).card := (Finset.card_le_of_subset ?_)\n  _ ≤ (Finset.univ : Finset (Fin (i + 1))).card := Finset.card_image_le\n  _ = i + 1 := Finset.card_fin _\nintro r hr\nobtain ⟨j, -, rfl⟩ := Finset.mem_image.1 hr\nhave := h₂.2 ⟨j, rfl⟩\nrw [hi'] at this \nhave h := (dvd_prime_pow (show Prime (c 1) from ?_) i).1 this\nrcases h with ⟨u, hu, hu'⟩\nrefine' Finset.mem_image.mpr ⟨u, Finset.mem_univ _, _⟩\n· rw [associated_iff_eq] at hu' \n  rw [Fin.val_cast_of_lt (Nat.lt_succ_of_le hu), hu']\n· rw [← irreducible_iff_prime]\n  exact second_of_chain_is_irreducible hn h₁ (@h₂) hq\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\n⊢ q = c 1 ^ n\n[PROOFSTEP]\nobtain ⟨i, hi'⟩ := element_of_chain_eq_pow_second_of_chain hn h₁ (@fun r => h₂) (dvd_refl q) hq\n[GOAL]\ncase intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\n⊢ q = c 1 ^ n\n[PROOFSTEP]\nconvert hi'\n[GOAL]\ncase h.e'_3.h.e'_6\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\n⊢ n = ↑i\n[PROOFSTEP]\nrefine' (Nat.lt_succ_iff.1 i.prop).antisymm' (Nat.le_of_succ_le_succ _)\n[GOAL]\ncase h.e'_3.h.e'_6\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\n⊢ Nat.succ n ≤ Nat.succ ↑i\n[PROOFSTEP]\ncalc\n  n + 1 = (Finset.univ : Finset (Fin (n + 1))).card := (Finset.card_fin _).symm\n  _ = (Finset.univ.image c).card := (Finset.card_image_iff.mpr (h₁.injective.injOn _)).symm\n  _ ≤ (Finset.univ.image fun m : Fin (i + 1) => c 1 ^ (m : ℕ)).card := (Finset.card_le_of_subset ?_)\n  _ ≤ (Finset.univ : Finset (Fin (i + 1))).card := Finset.card_image_le\n  _ = i + 1 := Finset.card_fin _\n[GOAL]\ncase h.e'_3.h.e'_6\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\n⊢ Finset.image c Finset.univ ⊆ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\n[PROOFSTEP]\nintro r hr\n[GOAL]\ncase h.e'_3.h.e'_6\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nr : Associates M\nhr : r ∈ Finset.image c Finset.univ\n⊢ r ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\n[PROOFSTEP]\nobtain ⟨j, -, rfl⟩ := Finset.mem_image.1 hr\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\n⊢ c j ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\n[PROOFSTEP]\nhave := h₂.2 ⟨j, rfl⟩\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ q\n⊢ c j ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\n[PROOFSTEP]\nrw [hi'] at this \n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\n⊢ c j ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\n[PROOFSTEP]\nhave h := (dvd_prime_pow (show Prime (c 1) from ?_) i).1 this\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_2\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\nh : ∃ i_1, i_1 ≤ ↑i ∧ Associated (c j) (c 1 ^ i_1)\n⊢ c j ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\ncase h.e'_3.h.e'_6.intro.intro.refine_1\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\n⊢ Prime (c 1)\n[PROOFSTEP]\nrcases h with ⟨u, hu, hu'⟩\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_2.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\nu : ℕ\nhu : u ≤ ↑i\nhu' : Associated (c j) (c 1 ^ u)\n⊢ c j ∈ Finset.image (fun m => c 1 ^ ↑m) Finset.univ\ncase h.e'_3.h.e'_6.intro.intro.refine_1\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\n⊢ Prime (c 1)\n[PROOFSTEP]\nrefine' Finset.mem_image.mpr ⟨u, Finset.mem_univ _, _⟩\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_2.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\nu : ℕ\nhu : u ≤ ↑i\nhu' : Associated (c j) (c 1 ^ u)\n⊢ c 1 ^ ↑↑u = c j\n[PROOFSTEP]\nrw [associated_iff_eq] at hu' \n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_2.intro.intro\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\nu : ℕ\nhu : u ≤ ↑i\nhu' : c j = c 1 ^ u\n⊢ c 1 ^ ↑↑u = c j\n[PROOFSTEP]\nrw [Fin.val_cast_of_lt (Nat.lt_succ_of_le hu), hu']\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_1\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\n⊢ Prime (c 1)\n[PROOFSTEP]\nrw [← irreducible_iff_prime]\n[GOAL]\ncase h.e'_3.h.e'_6.intro.intro.refine_1\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\ninst✝ : UniqueFactorizationMonoid M\nq : Associates M\nn : ℕ\nhn : n ≠ 0\nc : Fin (n + 1) → Associates M\nh₁ : StrictMono c\nh₂ : ∀ {r : Associates M}, r ≤ q ↔ ∃ i, r = c i\nhq : q ≠ 0\ni : Fin (n + 1)\nhi' : q = c 1 ^ ↑i\nj : Fin (n + 1)\nhr : c j ∈ Finset.image c Finset.univ\nthis : c j ≤ c 1 ^ ↑i\n⊢ Irreducible (c 1)\n[PROOFSTEP]\nexact second_of_chain_is_irreducible hn h₁ (@h₂) hq\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm : Associates M\nn : Associates N\nd : { l // l ≤ m } ≃o { l // l ≤ n }\n⊢ ↑(↑d { val := 1, property := (_ : 1 ∣ m) }) = 1\n[PROOFSTEP]\nletI : OrderBot { l : Associates M // l ≤ m } := Subtype.orderBot bot_le\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm : Associates M\nn : Associates N\nd : { l // l ≤ m } ≃o { l // l ≤ n }\nthis : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\n⊢ ↑(↑d { val := 1, property := (_ : 1 ∣ m) }) = 1\n[PROOFSTEP]\nletI : OrderBot { l : Associates N // l ≤ n } := Subtype.orderBot bot_le\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm : Associates M\nn : Associates N\nd : { l // l ≤ m } ≃o { l // l ≤ n }\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\n⊢ ↑(↑d { val := 1, property := (_ : 1 ∣ m) }) = 1\n[PROOFSTEP]\nsimp only [← Associates.bot_eq_one, Subtype.mk_bot, bot_le, Subtype.coe_eq_bot_iff]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm : Associates M\nn : Associates N\nd : { l // l ≤ m } ≃o { l // l ≤ n }\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\n⊢ ↑d ⊥ = ⊥\n[PROOFSTEP]\nletI : BotHomClass ({ l // l ≤ m } ≃o { l // l ≤ n }) _ _ := OrderIsoClass.toBotHomClass\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm : Associates M\nn : Associates N\nd : { l // l ≤ m } ≃o { l // l ≤ n }\nthis✝¹ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis✝ : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\nthis : BotHomClass ({ l // l ≤ m } ≃o { l // l ≤ n }) { l // l ≤ m } { l // l ≤ n } := OrderIsoClass.toBotHomClass\n⊢ ↑d ⊥ = ⊥\n[PROOFSTEP]\nexact map_bot d\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n⊢ u = 1\n[PROOFSTEP]\nrw [show u = (d.symm ⟨d ⟨u, hu'⟩, (d ⟨u, hu'⟩).prop⟩) by\n    simp only [Subtype.coe_eta, OrderIso.symm_apply_apply, Subtype.coe_mk]]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n⊢ u =\n    ↑(↑(OrderIso.symm d)\n        { val := ↑(↑d { val := u, property := hu' }),\n          property := (_ : ↑(↑d { val := u, property := hu' }) ∈ Set.Iic n) })\n[PROOFSTEP]\nsimp only [Subtype.coe_eta, OrderIso.symm_apply_apply, Subtype.coe_mk]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n⊢ ↑(↑(OrderIso.symm d)\n        { val := ↑(↑d { val := u, property := hu' }),\n          property := (_ : ↑(↑d { val := u, property := hu' }) ∈ Set.Iic n) }) =\n    1\n[PROOFSTEP]\nconv_rhs => rw [← factor_orderIso_map_one_eq_bot d.symm]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d.symm]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d.symm]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d.symm]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : ↑(↑d { val := u, property := hu' }) = 1\n⊢ ↑(↑(OrderIso.symm d)\n        { val := ↑(↑d { val := u, property := hu' }),\n          property := (_ : ↑(↑d { val := u, property := hu' }) ∈ Set.Iic n) }) =\n    ↑(↑(OrderIso.symm d) { val := 1, property := (_ : 1 ∣ n) })\n[PROOFSTEP]\ncongr\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : u = 1\n⊢ ↑(↑d { val := u, property := hu' }) = 1\n[PROOFSTEP]\nsimp_rw [hu]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : u = 1\n⊢ ↑(↑d { val := 1, property := (_ : (fun x => x ∈ Set.Iic m) 1) }) = 1\n[PROOFSTEP]\nconv_rhs => rw [← factor_orderIso_map_one_eq_bot d]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : u = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : u = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d]\n[GOAL]\nM : Type u_1\ninst✝¹ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝ : CancelCommMonoidWithZero N\nm u : Associates M\nn : Associates N\nhu' : u ≤ m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhu : u = 1\n| 1\n[PROOFSTEP]\nrw [← factor_orderIso_map_one_eq_bot d]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s ≤ n\n[PROOFSTEP]\nby_cases hs : s = 0\n[GOAL]\ncase pos\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\nhs : s = 0\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s ≤ n\n[PROOFSTEP]\nsimp [hs]\n[GOAL]\ncase neg\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\nhs : ¬s = 0\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s ≤ n\n[PROOFSTEP]\nsuffices (d ⟨p, dvd_of_mem_normalizedFactors hp⟩ : Associates N) ^ s = (d ⟨p ^ s, hs'⟩)\n  by\n  rw [this]\n  apply Subtype.prop (d ⟨p ^ s, hs'⟩)\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\nhs : ¬s = 0\nthis : ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s = ↑(↑d { val := p ^ s, property := hs' })\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s ≤ n\n[PROOFSTEP]\nrw [this]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\nhs : ¬s = 0\nthis : ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s = ↑(↑d { val := p ^ s, property := hs' })\n⊢ ↑(↑d { val := p ^ s, property := hs' }) ≤ n\n[PROOFSTEP]\napply Subtype.prop (d ⟨p ^ s, hs'⟩)\n[GOAL]\ncase neg\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs' : p ^ s ≤ m\nhs : ¬s = 0\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ s = ↑(↑d { val := p ^ s, property := hs' })\n[PROOFSTEP]\nobtain ⟨c₁, rfl, hc₁', hc₁''⟩ := exists_chain_of_prime_pow hs (prime_of_normalized_factor p hp)\n[GOAL]\ncase neg.intro.intro.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\n⊢ ↑(↑d { val := c₁ 1, property := (_ : c₁ 1 ∣ m) }) ^ s = ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nlet c₂ : Fin (s + 1) → Associates N := fun t => d ⟨c₁ t, le_trans (hc₁''.2 ⟨t, by simp⟩) hs'⟩\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nt : Fin (s + 1)\n⊢ c₁ t = c₁ t\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg.intro.intro.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\n⊢ ↑(↑d { val := c₁ 1, property := (_ : c₁ 1 ∣ m) }) ^ s = ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nhave c₂_def : ∀ t, c₂ t = d ⟨c₁ t, _⟩ := fun t => rfl\n[GOAL]\ncase neg.intro.intro.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\n⊢ ↑(↑d { val := c₁ 1, property := (_ : c₁ 1 ∣ m) }) ^ s = ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nrw [← c₂_def]\n[GOAL]\ncase neg.intro.intro.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\n⊢ c₂ 1 ^ s = ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nrefine' (eq_pow_second_of_chain_of_has_chain hs (fun t u h => _) (@fun r => ⟨@fun hr => _, _⟩) _).symm\n[GOAL]\ncase neg.intro.intro.intro.refine'_1\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nt u : Fin (s + 1)\nh : t < u\n⊢ c₂ t < c₂ u\n[PROOFSTEP]\nrw [c₂_def, c₂_def, Subtype.coe_lt_coe, d.lt_iff_lt, Subtype.mk_lt_mk, hc₁'.lt_iff_lt]\n[GOAL]\ncase neg.intro.intro.intro.refine'_1\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nt u : Fin (s + 1)\nh : t < u\n⊢ t < u\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n⊢ ∃ i, r = c₂ i\n[PROOFSTEP]\nhave : r ≤ n := hr.trans (d ⟨c₁ 1 ^ s, _⟩).2\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n⊢ ∃ i, r = c₂ i\n[PROOFSTEP]\nsuffices d.symm ⟨r, this⟩ ≤ ⟨c₁ 1 ^ s, hs'⟩ by\n  obtain ⟨i, hi⟩ := hc₁''.1 this\n  use i\n  simp only [c₂_def, ← hi, d.apply_symm_apply, Subtype.coe_eta, Subtype.coe_mk]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis✝ : r ≤ n\nthis : ↑(OrderIso.symm d) { val := r, property := this✝ } ≤ { val := c₁ 1 ^ s, property := hs' }\n⊢ ∃ i, r = c₂ i\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := hc₁''.1 this\n[GOAL]\ncase intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis✝ : r ≤ n\nthis : ↑(OrderIso.symm d) { val := r, property := this✝ } ≤ { val := c₁ 1 ^ s, property := hs' }\ni : Fin (s + 1)\nhi : ↑(↑(OrderIso.symm d) { val := r, property := this✝ }) = c₁ i\n⊢ ∃ i, r = c₂ i\n[PROOFSTEP]\nuse i\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis✝ : r ≤ n\nthis : ↑(OrderIso.symm d) { val := r, property := this✝ } ≤ { val := c₁ 1 ^ s, property := hs' }\ni : Fin (s + 1)\nhi : ↑(↑(OrderIso.symm d) { val := r, property := this✝ }) = c₁ i\n⊢ r = c₂ i\n[PROOFSTEP]\nsimp only [c₂_def, ← hi, d.apply_symm_apply, Subtype.coe_eta, Subtype.coe_mk]\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n⊢ ↑(OrderIso.symm d) { val := r, property := this } ≤ { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nconv_rhs => rw [← d.symm_apply_apply ⟨c₁ 1 ^ s, hs'⟩]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n| { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nrw [← d.symm_apply_apply ⟨c₁ 1 ^ s, hs'⟩]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n| { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nrw [← d.symm_apply_apply ⟨c₁ 1 ^ s, hs'⟩]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n| { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nrw [← d.symm_apply_apply ⟨c₁ 1 ^ s, hs'⟩]\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n⊢ ↑(OrderIso.symm d) { val := r, property := this } ≤ ↑(OrderIso.symm d) (↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nrw [d.symm.le_iff_le]\n[GOAL]\ncase neg.intro.intro.intro.refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\nhr : r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\nthis : r ≤ n\n⊢ { val := r, property := this } ≤ ↑d { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nsimpa only [← Subtype.coe_le_coe, Subtype.coe_mk] using hr\n[GOAL]\ncase neg.intro.intro.intro.refine'_3\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\n⊢ (∃ i, r = c₂ i) → r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nrintro ⟨i, hr⟩\n[GOAL]\ncase neg.intro.intro.intro.refine'_3.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\ni : Fin (s + 1)\nhr : r = c₂ i\n⊢ r ≤ ↑(↑d { val := c₁ 1 ^ s, property := hs' })\n[PROOFSTEP]\nrw [hr, c₂_def, Subtype.coe_le_coe, d.le_iff_le]\n[GOAL]\ncase neg.intro.intro.intro.refine'_3.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nr : Associates N\ni : Fin (s + 1)\nhr : r = c₂ i\n⊢ { val := c₁ i, property := (_ : c₁ i ≤ m) } ≤ { val := c₁ 1 ^ s, property := hs' }\n[PROOFSTEP]\nsimpa [Subtype.mk_le_mk] using hc₁''.2 ⟨i, rfl⟩\n[GOAL]\ncase neg.intro.intro.intro.refine'_4\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\ns : ℕ\nhs : ¬s = 0\nc₁ : Fin (s + 1) → Associates M\nhp : c₁ 1 ∈ normalizedFactors m\nhs' : c₁ 1 ^ s ≤ m\nhc₁' : StrictMono c₁\nhc₁'' : ∀ {r : Associates M}, r ≤ c₁ 1 ^ s ↔ ∃ i, r = c₁ i\nc₂ : Fin (s + 1) → Associates N := fun t => ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\nc₂_def : ∀ (t : Fin (s + 1)), c₂ t = ↑(↑d { val := c₁ t, property := (_ : c₁ t ≤ m) })\n⊢ ↑(↑d { val := c₁ 1 ^ s, property := hs' }) ≠ 0\n[PROOFSTEP]\nexact ne_zero_of_dvd_ne_zero hn (Subtype.prop (d ⟨c₁ 1 ^ s, _⟩))\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ Prime ↑(↑d { val := p, property := (_ : p ∣ m) })\n[PROOFSTEP]\nrw [← irreducible_iff_prime]\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ Irreducible ↑(↑d { val := p, property := (_ : p ∣ m) })\n[PROOFSTEP]\nrefine' (Associates.isAtom_iff <| ne_zero_of_dvd_ne_zero hn (d ⟨p, _⟩).prop).mp ⟨_, fun b hb => _⟩\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ≠ ⊥\n[PROOFSTEP]\nrw [Ne.def, ← Associates.isUnit_iff_eq_bot, Associates.isUnit_iff_eq_one, coe_factor_orderIso_map_eq_one_iff _ d]\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ ¬p = 1\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm : Associates M\nn : Associates N\nhn : n ≠ 0\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhp : 1 ∈ normalizedFactors m\n⊢ False\n[PROOFSTEP]\nexact (prime_of_normalized_factor 1 hp).not_unit isUnit_one\n[GOAL]\ncase refine'_2\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\n⊢ b = ⊥\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := d.surjective ⟨b, le_trans (le_of_lt hb) (d ⟨p, dvd_of_mem_normalizedFactors hp⟩).prop⟩\n[GOAL]\ncase refine'_2.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\n⊢ b = ⊥\n[PROOFSTEP]\nrw [← Subtype.coe_mk b _, ← hx] at hb \n[GOAL]\ncase refine'_2.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\n⊢ b = ⊥\n[PROOFSTEP]\nletI : OrderBot { l : Associates M // l ≤ m } := Subtype.orderBot bot_le\n[GOAL]\ncase refine'_2.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\nthis : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\n⊢ b = ⊥\n[PROOFSTEP]\nletI : OrderBot { l : Associates N // l ≤ n } := Subtype.orderBot bot_le\n[GOAL]\ncase refine'_2.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\n⊢ b = ⊥\n[PROOFSTEP]\nsuffices x = ⊥ by\n  rw [this, OrderIso.map_bot d] at hx \n  refine' (Subtype.mk_eq_bot_iff _ _).mp hx.symm\n  simp\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\nthis✝¹ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis✝ : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\nthis : x = ⊥\n⊢ b = ⊥\n[PROOFSTEP]\nrw [this, OrderIso.map_bot d] at hx \n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ⊥ = { val := b, property := (_ : b ≤ n) }\nthis✝¹ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis✝ : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\nthis : x = ⊥\n⊢ b = ⊥\n[PROOFSTEP]\nrefine' (Subtype.mk_eq_bot_iff _ _).mp hx.symm\n[GOAL]\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ⊥ = { val := b, property := (_ : b ≤ n) }\nthis✝¹ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis✝ : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\nthis : x = ⊥\n⊢ ⊥ ∈ Set.Iic n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.intro\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nx : ↑(Set.Iic m)\nhb : ↑(↑d x) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d x = { val := b, property := (_ : b ≤ n) }\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\n⊢ x = ⊥\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := x\n[GOAL]\ncase refine'_2.intro.mk\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\na : Associates M\nha : a ∈ Set.Iic m\nhb : ↑(↑d { val := a, property := ha }) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d { val := a, property := ha } = { val := b, property := (_ : b ≤ n) }\n⊢ { val := a, property := ha } = ⊥\n[PROOFSTEP]\nrw [Subtype.mk_eq_bot_iff]\n[GOAL]\ncase refine'_2.intro.mk\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\na : Associates M\nha : a ∈ Set.Iic m\nhb : ↑(↑d { val := a, property := ha }) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d { val := a, property := ha } = { val := b, property := (_ : b ≤ n) }\n⊢ a = ⊥\n[PROOFSTEP]\nexact\n  ((Associates.isAtom_iff <| Prime.ne_zero <| prime_of_normalized_factor p hp).mpr <|\n        irreducible_of_normalized_factor p hp).right\n    a (Subtype.mk_lt_mk.mp <| d.lt_iff_lt.mp hb)\n[GOAL]\ncase refine'_2.intro.mk.hbot\nM : Type u_1\ninst✝⁴ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝³ : CancelCommMonoidWithZero N\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : UniqueFactorizationMonoid M\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nb : Associates N\nhb✝ : b < ↑(↑d { val := p, property := (_ : p ∣ m) })\nthis✝ : OrderBot { l // l ≤ m } := Subtype.orderBot (_ : ⊥ ≤ m)\nthis : OrderBot { l // l ≤ n } := Subtype.orderBot (_ : ⊥ ≤ n)\na : Associates M\nha : a ∈ Set.Iic m\nhb : ↑(↑d { val := a, property := ha }) < ↑(↑d { val := p, property := (_ : p ∣ m) })\nhx : ↑d { val := a, property := ha } = { val := b, property := (_ : b ≤ n) }\n⊢ ⊥ ∈ Set.Iic m\n[PROOFSTEP]\nsimp\n[GOAL]\nM : Type u_1\ninst✝⁵ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero N\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : UniqueFactorizationMonoid M\ninst✝¹ : DecidableEq (Associates M)\ninst✝ : DecidableEq (Associates N)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nobtain ⟨q, hq, hq'⟩ :=\n  exists_mem_normalizedFactors_of_dvd hn (map_prime_of_factor_orderIso hn hp d).irreducible\n    (d ⟨p, dvd_of_mem_normalizedFactors hp⟩).prop\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁵ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero N\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : UniqueFactorizationMonoid M\ninst✝¹ : DecidableEq (Associates M)\ninst✝ : DecidableEq (Associates N)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nq : Associates N\nhq : q ∈ normalizedFactors n\nhq' : Associated (↑(↑d { val := p, property := (_ : p ∣ m) })) q\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nrw [associated_iff_eq] at hq' \n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁵ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁴ : CancelCommMonoidWithZero N\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : UniqueFactorizationMonoid M\ninst✝¹ : DecidableEq (Associates M)\ninst✝ : DecidableEq (Associates N)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nq : Associates N\nhq : q ∈ normalizedFactors n\nhq' : ↑(↑d { val := p, property := (_ : p ∣ m) }) = q\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nrwa [hq']\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ multiplicity p m ≤ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhn : n = 0\n⊢ multiplicity p m ≤ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nsimp [hn]\n[GOAL]\ncase neg\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhn : ¬n = 0\n⊢ multiplicity p m ≤ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nby_cases hm : m = 0\n[GOAL]\ncase pos\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhn : ¬n = 0\nhm : m = 0\n⊢ multiplicity p m ≤ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nsimp [hm] at hp \n[GOAL]\ncase neg\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ multiplicity p m ≤ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nrw [← PartENat.natCast_get (finite_iff_dom.1 <| finite_prime_left (prime_of_normalized_factor p hp) hm), ←\n  pow_dvd_iff_le_multiplicity]\n[GOAL]\ncase neg\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nhn : ¬n = 0\nhm : ¬m = 0\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ^ Part.get (multiplicity p m) (_ : (multiplicity p m).Dom) ∣ n\n[PROOFSTEP]\nexact pow_image_of_prime_by_factor_orderIso_dvd hn hp d (pow_multiplicity_dvd _)\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ multiplicity p m = multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nrefine' le_antisymm (multiplicity_prime_le_multiplicity_image_by_factor_orderIso hp d) _\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m\n[PROOFSTEP]\nsuffices\n  multiplicity (↑(d ⟨p, dvd_of_mem_normalizedFactors hp⟩)) n ≤\n    multiplicity (↑(d.symm (d ⟨p, dvd_of_mem_normalizedFactors hp⟩))) m\n  by\n  rw [d.symm_apply_apply ⟨p, dvd_of_mem_normalizedFactors hp⟩, Subtype.coe_mk] at this \n  exact this\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nthis :\n  multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤\n    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m\n[PROOFSTEP]\nrw [d.symm_apply_apply ⟨p, dvd_of_mem_normalizedFactors hp⟩, Subtype.coe_mk] at this \n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nthis :\n  multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity (↑{ val := p, property := (_ : p ∣ m) }) m\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤ multiplicity p m\n[PROOFSTEP]\nexact this\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤\n    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m\n[PROOFSTEP]\nletI := Classical.decEq (Associates N)\n[GOAL]\nM : Type u_1\ninst✝⁶ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁵ : CancelCommMonoidWithZero N\ninst✝⁴ : UniqueFactorizationMonoid N\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : DecidableRel fun x x_1 => x ∣ x_1\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableEq (Associates M)\nm p : Associates M\nn : Associates N\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : ↑(Set.Iic m) ≃o ↑(Set.Iic n)\nthis : DecidableEq (Associates N) := Classical.decEq (Associates N)\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n ≤\n    multiplicity (↑(↑(OrderIso.symm d) (↑d { val := p, property := (_ : p ∣ m) }))) m\n[PROOFSTEP]\nsimpa only [Subtype.coe_eta] using\n  multiplicity_prime_le_multiplicity_image_by_factor_orderIso\n    (mem_normalizedFactors_factor_orderIso_of_mem_normalizedFactors hn hp d) d.symm\n[GOAL]\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nl : ↑(Set.Iic (Associates.mk m))\n⊢ ↑associatesEquivOfUniqueUnits ↑l ∣ m\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := l\n[GOAL]\ncase mk\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx : Associates M\nhx : x ∈ Set.Iic (Associates.mk m)\n⊢ ↑associatesEquivOfUniqueUnits ↑{ val := x, property := hx } ∣ m\n[PROOFSTEP]\nrw [Subtype.coe_mk, associatesEquivOfUniqueUnits_apply, out_dvd_iff]\n[GOAL]\ncase mk\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx : Associates M\nhx : x ∈ Set.Iic (Associates.mk m)\n⊢ x ≤ Associates.mk m\n[PROOFSTEP]\nexact hx\n[GOAL]\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nl : ↑(Set.Iic (Associates.mk n))\n⊢ ↑associatesEquivOfUniqueUnits ↑l ∣ n\n[PROOFSTEP]\nobtain ⟨x, hx⟩ := l\n[GOAL]\ncase mk\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx : Associates N\nhx : x ∈ Set.Iic (Associates.mk n)\n⊢ ↑associatesEquivOfUniqueUnits ↑{ val := x, property := hx } ∣ n\n[PROOFSTEP]\nrw [Subtype.coe_mk, associatesEquivOfUniqueUnits_apply, out_dvd_iff]\n[GOAL]\ncase mk\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx : Associates N\nhx : x ∈ Set.Iic (Associates.mk n)\n⊢ x ≤ Associates.mk n\n[PROOFSTEP]\nexact hx\n[GOAL]\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx✝ : ↑(Set.Iic (Associates.mk m))\nl : Associates M\nhl : l ∈ Set.Iic (Associates.mk m)\n⊢ (fun l =>\n        {\n          val :=\n            Associates.mk\n              ↑(↑d.symm\n                  { val := ↑associatesEquivOfUniqueUnits ↑l, property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n          property :=\n            (_ :\n              Associates.mk\n                  ↑(↑d.symm\n                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                Associates.mk m) })\n      ((fun l =>\n          {\n            val :=\n              Associates.mk\n                ↑(↑d\n                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n            property :=\n              (_ :\n                Associates.mk\n                    ↑(↑d\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                  Associates.mk n) })\n        { val := l, property := hl }) =\n    { val := l, property := hl }\n[PROOFSTEP]\nsimp only [Subtype.coe_eta, Equiv.symm_apply_apply, Subtype.coe_mk, associatesEquivOfUniqueUnits_apply, mk_out, out_mk,\n  normalize_eq]\n[GOAL]\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nx✝ : ↑(Set.Iic (Associates.mk n))\nl : Associates N\nhl : l ∈ Set.Iic (Associates.mk n)\n⊢ (fun l =>\n        {\n          val :=\n            Associates.mk\n              ↑(↑d { val := ↑associatesEquivOfUniqueUnits ↑l, property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n          property :=\n            (_ :\n              Associates.mk\n                  ↑(↑d\n                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                Associates.mk n) })\n      ((fun l =>\n          {\n            val :=\n              Associates.mk\n                ↑(↑d.symm\n                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n            property :=\n              (_ :\n                Associates.mk\n                    ↑(↑d.symm\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                  Associates.mk m) })\n        { val := l, property := hl }) =\n    { val := l, property := hl }\n[PROOFSTEP]\nsimp only [Subtype.coe_eta, Equiv.apply_symm_apply, Subtype.coe_mk, associatesEquivOfUniqueUnits_apply, out_mk,\n  normalize_eq, mk_out]\n[GOAL]\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ∀ {a b : ↑(Set.Iic (Associates.mk m))},\n    ↑{\n              toFun := fun l =>\n                {\n                  val :=\n                    Associates.mk\n                      ↑(↑d\n                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                  property :=\n                    (_ :\n                      Associates.mk\n                          ↑(↑d\n                              { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                        Associates.mk n) },\n              invFun := fun l =>\n                {\n                  val :=\n                    Associates.mk\n                      ↑(↑d.symm\n                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                  property :=\n                    (_ :\n                      Associates.mk\n                          ↑(↑d.symm\n                              { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                        Associates.mk m) },\n              left_inv :=\n                (_ :\n                  ∀ (x : ↑(Set.Iic (Associates.mk m))),\n                    (fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d.symm\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d.symm\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                  Associates.mk m) })\n                        ((fun l =>\n                            {\n                              val :=\n                                Associates.mk\n                                  ↑(↑d\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                              property :=\n                                (_ :\n                                  Associates.mk\n                                      ↑(↑d\n                                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                    Associates.mk n) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : ↑(Set.Iic (Associates.mk n))),\n                    (fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                  Associates.mk n) })\n                        ((fun l =>\n                            {\n                              val :=\n                                Associates.mk\n                                  ↑(↑d.symm\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                              property :=\n                                (_ :\n                                  Associates.mk\n                                      ↑(↑d.symm\n                                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                    Associates.mk m) })\n                          x) =\n                      x) }\n          a ≤\n        ↑{\n              toFun := fun l =>\n                {\n                  val :=\n                    Associates.mk\n                      ↑(↑d\n                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                  property :=\n                    (_ :\n                      Associates.mk\n                          ↑(↑d\n                              { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                        Associates.mk n) },\n              invFun := fun l =>\n                {\n                  val :=\n                    Associates.mk\n                      ↑(↑d.symm\n                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                  property :=\n                    (_ :\n                      Associates.mk\n                          ↑(↑d.symm\n                              { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                        Associates.mk m) },\n              left_inv :=\n                (_ :\n                  ∀ (x : ↑(Set.Iic (Associates.mk m))),\n                    (fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d.symm\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d.symm\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                  Associates.mk m) })\n                        ((fun l =>\n                            {\n                              val :=\n                                Associates.mk\n                                  ↑(↑d\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                              property :=\n                                (_ :\n                                  Associates.mk\n                                      ↑(↑d\n                                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                    Associates.mk n) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : ↑(Set.Iic (Associates.mk n))),\n                    (fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                  Associates.mk n) })\n                        ((fun l =>\n                            {\n                              val :=\n                                Associates.mk\n                                  ↑(↑d.symm\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                              property :=\n                                (_ :\n                                  Associates.mk\n                                      ↑(↑d.symm\n                                          { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                            property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                    Associates.mk m) })\n                          x) =\n                      x) }\n          b ↔\n      a ≤ b\n[PROOFSTEP]\nrintro ⟨a, ha⟩ ⟨b, hb⟩\n[GOAL]\ncase mk.mk\nM : Type u_1\ninst✝³ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝² : CancelCommMonoidWithZero N\ninst✝¹ : Unique Mˣ\ninst✝ : Unique Nˣ\nm : M\nn : N\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\na : Associates M\nha : a ∈ Set.Iic (Associates.mk m)\nb : Associates M\nhb : b ∈ Set.Iic (Associates.mk m)\n⊢ ↑{\n            toFun := fun l =>\n              {\n                val :=\n                  Associates.mk\n                    ↑(↑d\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                property :=\n                  (_ :\n                    Associates.mk\n                        ↑(↑d\n                            { val := ↑associatesEquivOfUniqueUnits ↑l,\n                              property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                      Associates.mk n) },\n            invFun := fun l =>\n              {\n                val :=\n                  Associates.mk\n                    ↑(↑d.symm\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                property :=\n                  (_ :\n                    Associates.mk\n                        ↑(↑d.symm\n                            { val := ↑associatesEquivOfUniqueUnits ↑l,\n                              property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                      Associates.mk m) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Set.Iic (Associates.mk m))),\n                  (fun l =>\n                        {\n                          val :=\n                            Associates.mk\n                              ↑(↑d.symm\n                                  { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                    property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                          property :=\n                            (_ :\n                              Associates.mk\n                                  ↑(↑d.symm\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                Associates.mk m) })\n                      ((fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                  Associates.mk n) })\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : ↑(Set.Iic (Associates.mk n))),\n                  (fun l =>\n                        {\n                          val :=\n                            Associates.mk\n                              ↑(↑d\n                                  { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                    property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                          property :=\n                            (_ :\n                              Associates.mk\n                                  ↑(↑d\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                Associates.mk n) })\n                      ((fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d.symm\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d.symm\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                  Associates.mk m) })\n                        x) =\n                    x) }\n        { val := a, property := ha } ≤\n      ↑{\n            toFun := fun l =>\n              {\n                val :=\n                  Associates.mk\n                    ↑(↑d\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                property :=\n                  (_ :\n                    Associates.mk\n                        ↑(↑d\n                            { val := ↑associatesEquivOfUniqueUnits ↑l,\n                              property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                      Associates.mk n) },\n            invFun := fun l =>\n              {\n                val :=\n                  Associates.mk\n                    ↑(↑d.symm\n                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                property :=\n                  (_ :\n                    Associates.mk\n                        ↑(↑d.symm\n                            { val := ↑associatesEquivOfUniqueUnits ↑l,\n                              property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                      Associates.mk m) },\n            left_inv :=\n              (_ :\n                ∀ (x : ↑(Set.Iic (Associates.mk m))),\n                  (fun l =>\n                        {\n                          val :=\n                            Associates.mk\n                              ↑(↑d.symm\n                                  { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                    property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                          property :=\n                            (_ :\n                              Associates.mk\n                                  ↑(↑d.symm\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                Associates.mk m) })\n                      ((fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                  Associates.mk n) })\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : ↑(Set.Iic (Associates.mk n))),\n                  (fun l =>\n                        {\n                          val :=\n                            Associates.mk\n                              ↑(↑d\n                                  { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                    property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }),\n                          property :=\n                            (_ :\n                              Associates.mk\n                                  ↑(↑d\n                                      { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                        property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ m) }) ≤\n                                Associates.mk n) })\n                      ((fun l =>\n                          {\n                            val :=\n                              Associates.mk\n                                ↑(↑d.symm\n                                    { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                      property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }),\n                            property :=\n                              (_ :\n                                Associates.mk\n                                    ↑(↑d.symm\n                                        { val := ↑associatesEquivOfUniqueUnits ↑l,\n                                          property := (_ : ↑associatesEquivOfUniqueUnits ↑l ∣ n) }) ≤\n                                  Associates.mk m) })\n                        x) =\n                    x) }\n        { val := b, property := hb } ↔\n    { val := a, property := ha } ≤ { val := b, property := hb }\n[PROOFSTEP]\nsimp only [Equiv.coe_fn_mk, Subtype.mk_le_mk, Associates.mk_le_mk_iff_dvd_iff, hd, Subtype.coe_mk,\n  associatesEquivOfUniqueUnits_apply, out_dvd_iff, mk_out]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nsuffices\n  Prime\n    (d ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by simp [dvd_of_mem_normalizedFactors hp]⟩ :\n      N)\n  by\n  simp only [associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq, associatesEquivOfUniqueUnits_symm_apply] at this \n  obtain ⟨q, hq, hq'⟩ :=\n    exists_mem_normalizedFactors_of_dvd hn this.irreducible\n      (d ⟨p, by apply dvd_of_mem_normalizedFactors; convert hp⟩).prop\n  rwa [associated_iff_eq.mp hq']\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p) ∣ m\n[PROOFSTEP]\nsimp [dvd_of_mem_normalizedFactors hp]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  Prime\n    ↑(↑d\n        { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n          property := (_ : p * 1 ∣ m) })\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nsimp only [associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq, associatesEquivOfUniqueUnits_symm_apply] at this \n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis : Prime ↑(↑d { val := p, property := (_ : (fun l => l ∣ m) p) })\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nobtain ⟨q, hq, hq'⟩ :=\n  exists_mem_normalizedFactors_of_dvd hn this.irreducible\n    (d ⟨p, by apply dvd_of_mem_normalizedFactors; convert hp⟩).prop\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis : Prime ↑(↑d { val := p, property := (_ : (fun l => l ∣ m) p) })\n⊢ p ∣ m\n[PROOFSTEP]\napply dvd_of_mem_normalizedFactors\n[GOAL]\ncase H\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis : Prime ↑(↑d { val := p, property := (_ : (fun l => l ∣ m) p) })\n⊢ p ∈ normalizedFactors m\n[PROOFSTEP]\nconvert hp\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis : Prime ↑(↑d { val := p, property := (_ : (fun l => l ∣ m) p) })\nq : N\nhq : q ∈ normalizedFactors n\nhq' : Associated (↑(↑d { val := p, property := (_ : (fun l => l ∣ m) p) })) q\n⊢ ↑(↑d { val := p, property := (_ : p ∣ m) }) ∈ normalizedFactors n\n[PROOFSTEP]\nrwa [associated_iff_eq.mp hq']\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ Prime\n    ↑(↑d\n        { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n          property := (_ : p * 1 ∣ m) })\n[PROOFSTEP]\nhave :\n  Associates.mk\n      (d\n          ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by\n            simp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq,\n              associatesEquivOfUniqueUnits_symm_apply]⟩ :\n        N) =\n    ↑(mkFactorOrderIsoOfFactorDvdEquiv hd\n        ⟨associatesEquivOfUniqueUnits.symm p,\n          by\n          simp only [associatesEquivOfUniqueUnits_symm_apply]\n          exact mk_dvd_mk.mpr (dvd_of_mem_normalizedFactors hp)⟩) :=\n  by rw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p) ∣ m\n[PROOFSTEP]\nsimp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq,\n  associatesEquivOfUniqueUnits_symm_apply]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)\n[PROOFSTEP]\nsimp only [associatesEquivOfUniqueUnits_symm_apply]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ Associates.mk p ∈ Set.Iic (Associates.mk m)\n[PROOFSTEP]\nexact mk_dvd_mk.mpr (dvd_of_mem_normalizedFactors hp)\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n[PROOFSTEP]\nrw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n⊢ Prime\n    ↑(↑d\n        { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n          property := (_ : p * 1 ∣ m) })\n[PROOFSTEP]\nrw [← Associates.prime_mk, this]\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n⊢ Prime\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n[PROOFSTEP]\nletI := Classical.decEq (Associates M)\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\n⊢ Prime\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n[PROOFSTEP]\nrefine' map_prime_of_factor_orderIso (mk_ne_zero.mpr hn) _ _\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\n⊢ ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ normalizedFactors (Associates.mk m)\n[PROOFSTEP]\nobtain ⟨q, hq, hq'⟩ :=\n  exists_mem_normalizedFactors_of_dvd (mk_ne_zero.mpr hm)\n    ((prime_mk p).mpr (prime_of_normalized_factor p (by convert hp))).irreducible\n    (mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp))\n[GOAL]\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\n⊢ p ∈ normalizedFactors ?m.1306674\n[PROOFSTEP]\nconvert hp\n[GOAL]\ncase intro.intro\nM : Type u_1\ninst✝⁷ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁶ : CancelCommMonoidWithZero N\ninst✝⁵ : Unique Mˣ\ninst✝⁴ : Unique Nˣ\ninst✝³ : UniqueFactorizationMonoid M\ninst✝² : UniqueFactorizationMonoid N\ninst✝¹ : DecidableEq M\ninst✝ : DecidableEq N\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\nq : Associates M\nhq : q ∈ normalizedFactors (Associates.mk m)\nhq' : Associated (Associates.mk p) q\n⊢ ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ normalizedFactors (Associates.mk m)\n[PROOFSTEP]\nsimpa only [associated_iff_eq.mp hq', associatesEquivOfUniqueUnits_symm_apply] using hq\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n = multiplicity p m\n[PROOFSTEP]\napply Eq.symm\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ multiplicity p m = multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nsuffices\n  multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (Associates.mk\n        ↑(d\n            ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by\n              simp [dvd_of_mem_normalizedFactors hp]⟩))\n      (Associates.mk n)\n  by\n  simpa only [multiplicity_mk_eq_multiplicity, associatesEquivOfUniqueUnits_symm_apply,\n    associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq] using this\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p) ∣ m\n[PROOFSTEP]\nsimp [dvd_of_mem_normalizedFactors hp]\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (Associates.mk\n        ↑(↑d\n            { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n              property := (_ : p * 1 ∣ m) }))\n      (Associates.mk n)\n⊢ multiplicity p m = multiplicity (↑(↑d { val := p, property := (_ : p ∣ m) })) n\n[PROOFSTEP]\nsimpa only [multiplicity_mk_eq_multiplicity, associatesEquivOfUniqueUnits_symm_apply,\n  associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq] using this\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (Associates.mk\n        ↑(↑d\n            { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n              property := (_ : p * 1 ∣ m) }))\n      (Associates.mk n)\n[PROOFSTEP]\nhave :\n  Associates.mk\n      (d\n          ⟨associatesEquivOfUniqueUnits (associatesEquivOfUniqueUnits.symm p), by\n            simp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_symm_apply,\n              associatesEquivOfUniqueUnits_apply, out_mk, normalize_eq]⟩ :\n        N) =\n    ↑(mkFactorOrderIsoOfFactorDvdEquiv hd\n        ⟨associatesEquivOfUniqueUnits.symm p,\n          by\n          rw [associatesEquivOfUniqueUnits_symm_apply]\n          exact mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp)⟩) :=\n  by rw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p) ∣ m\n[PROOFSTEP]\nsimp only [dvd_of_mem_normalizedFactors hp, associatesEquivOfUniqueUnits_symm_apply, associatesEquivOfUniqueUnits_apply,\n  out_mk, normalize_eq]\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)\n[PROOFSTEP]\nrw [associatesEquivOfUniqueUnits_symm_apply]\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ Associates.mk p ∈ Set.Iic (Associates.mk m)\n[PROOFSTEP]\nexact mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp)\n[GOAL]\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\n⊢ Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n[PROOFSTEP]\nrw [mkFactorOrderIsoOfFactorDvdEquiv_apply_coe]\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n⊢ multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (Associates.mk\n        ↑(↑d\n            { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n              property := (_ : p * 1 ∣ m) }))\n      (Associates.mk n)\n[PROOFSTEP]\nrw [this]\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\n⊢ multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n          { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n            property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) }))\n      (Associates.mk n)\n[PROOFSTEP]\nletI := Classical.decEq (Associates M)\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\n⊢ multiplicity (Associates.mk p) (Associates.mk m) =\n    multiplicity\n      (↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n          { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n            property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) }))\n      (Associates.mk n)\n[PROOFSTEP]\nrefine'\n  multiplicity_prime_eq_multiplicity_image_by_factor_orderIso (mk_ne_zero.mpr hn) _\n    (mkFactorOrderIsoOfFactorDvdEquiv hd)\n[GOAL]\ncase h\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\n⊢ Associates.mk p ∈ normalizedFactors (Associates.mk m)\n[PROOFSTEP]\nobtain ⟨q, hq, hq'⟩ :=\n  exists_mem_normalizedFactors_of_dvd (mk_ne_zero.mpr hm)\n    ((prime_mk p).mpr (prime_of_normalized_factor p hp)).irreducible (mk_le_mk_of_dvd (dvd_of_mem_normalizedFactors hp))\n[GOAL]\ncase h.intro.intro\nM : Type u_1\ninst✝⁸ : CancelCommMonoidWithZero M\nN : Type u_2\ninst✝⁷ : CancelCommMonoidWithZero N\ninst✝⁶ : Unique Mˣ\ninst✝⁵ : Unique Nˣ\ninst✝⁴ : UniqueFactorizationMonoid M\ninst✝³ : UniqueFactorizationMonoid N\ninst✝² : DecidableEq M\ninst✝¹ : DecidableRel fun x x_1 => x ∣ x_1\ninst✝ : DecidableRel fun x x_1 => x ∣ x_1\nm p : M\nn : N\nhm : m ≠ 0\nhn : n ≠ 0\nhp : p ∈ normalizedFactors m\nd : { l // l ∣ m } ≃ { l // l ∣ n }\nhd : ∀ (l l' : { l // l ∣ m }), ↑(↑d l) ∣ ↑(↑d l') ↔ ↑l ∣ ↑l'\nthis✝ :\n  Associates.mk\n      ↑(↑d\n          { val := ↑associatesEquivOfUniqueUnits (↑(MulEquiv.symm associatesEquivOfUniqueUnits) p),\n            property := (_ : ↑normalize p ∣ m) }) =\n    ↑(↑(mkFactorOrderIsoOfFactorDvdEquiv hd)\n        { val := ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p,\n          property := (_ : ↑(MulEquiv.symm associatesEquivOfUniqueUnits) p ∈ Set.Iic (Associates.mk m)) })\nthis : DecidableEq (Associates M) := Classical.decEq (Associates M)\nq : Associates M\nhq : q ∈ normalizedFactors (Associates.mk m)\nhq' : Associated (Associates.mk p) q\n⊢ Associates.mk p ∈ normalizedFactors (Associates.mk m)\n[PROOFSTEP]\nrwa [associated_iff_eq.mp hq']\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.ChainOfDivisors", "llama_tokens": 67327, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5117166047041654, "lm_q2_score": 0.519521321952093, "lm_q1q2_score": 0.2658476869407446}}
{"text": "[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nx✝ : OpensLeCover U\n⊢ {\n          obj := fun V =>\n            {\n              obj :=\n                { left := V.obj, right := { as := PUnit.unit },\n                  hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n              property :=\n                (_ :\n                  ∃ Y_1 h g,\n                    presieveOfCoveringAux U Y g ∧\n                      h ≫ g =\n                        { left := V.obj, right := { as := PUnit.unit },\n                            hom :=\n                              homOfLE\n                                (_ :\n                                  (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n          map := fun {x x_1} g => Over.homMk g }.map\n      (𝟙 x✝) =\n    𝟙\n      ({\n            obj := fun V =>\n              {\n                obj :=\n                  { left := V.obj, right := { as := PUnit.unit },\n                    hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                property :=\n                  (_ :\n                    ∃ Y_1 h g,\n                      presieveOfCoveringAux U Y g ∧\n                        h ≫ g =\n                          { left := V.obj, right := { as := PUnit.unit },\n                              hom :=\n                                homOfLE\n                                  (_ :\n                                    (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n            map := fun {x x_1} g => Over.homMk g }.obj\n        x✝)\n[PROOFSTEP]\nrefine Over.OverMorphism.ext ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nx✝ : OpensLeCover U\n⊢ ({\n            obj := fun V =>\n              {\n                obj :=\n                  { left := V.obj, right := { as := PUnit.unit },\n                    hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                property :=\n                  (_ :\n                    ∃ Y_1 h g,\n                      presieveOfCoveringAux U Y g ∧\n                        h ≫ g =\n                          { left := V.obj, right := { as := PUnit.unit },\n                              hom :=\n                                homOfLE\n                                  (_ :\n                                    (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n            map := fun {x x_1} g => Over.homMk g }.map\n        (𝟙 x✝)).left =\n    (𝟙\n        ({\n              obj := fun V =>\n                {\n                  obj :=\n                    { left := V.obj, right := { as := PUnit.unit },\n                      hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                  property :=\n                    (_ :\n                      ∃ Y_1 h g,\n                        presieveOfCoveringAux U Y g ∧\n                          h ≫ g =\n                            { left := V.obj, right := { as := PUnit.unit },\n                                hom :=\n                                  homOfLE\n                                    (_ :\n                                      (𝟭 (Opens ↑X)).obj V.obj ≤\n                                        (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n              map := fun {x x_1} g => Over.homMk g }.obj\n          x✝)).left\n[PROOFSTEP]\nsimp only [Functor.id_obj, Sieve.generate_apply, Functor.const_obj_obj, Over.homMk_left, eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nx✝² x✝¹ x✝ : OpensLeCover U\nf : x✝² ⟶ x✝¹\ng : x✝¹ ⟶ x✝\n⊢ {\n          obj := fun V =>\n            {\n              obj :=\n                { left := V.obj, right := { as := PUnit.unit },\n                  hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n              property :=\n                (_ :\n                  ∃ Y_1 h g,\n                    presieveOfCoveringAux U Y g ∧\n                      h ≫ g =\n                        { left := V.obj, right := { as := PUnit.unit },\n                            hom :=\n                              homOfLE\n                                (_ :\n                                  (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n          map := fun {x x_1} g => Over.homMk g }.map\n      (f ≫ g) =\n    {\n            obj := fun V =>\n              {\n                obj :=\n                  { left := V.obj, right := { as := PUnit.unit },\n                    hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                property :=\n                  (_ :\n                    ∃ Y_1 h g,\n                      presieveOfCoveringAux U Y g ∧\n                        h ≫ g =\n                          { left := V.obj, right := { as := PUnit.unit },\n                              hom :=\n                                homOfLE\n                                  (_ :\n                                    (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n            map := fun {x x_1} g => Over.homMk g }.map\n        f ≫\n      {\n            obj := fun V =>\n              {\n                obj :=\n                  { left := V.obj, right := { as := PUnit.unit },\n                    hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                property :=\n                  (_ :\n                    ∃ Y_1 h g,\n                      presieveOfCoveringAux U Y g ∧\n                        h ≫ g =\n                          { left := V.obj, right := { as := PUnit.unit },\n                              hom :=\n                                homOfLE\n                                  (_ :\n                                    (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n            map := fun {x x_1} g => Over.homMk g }.map\n        g\n[PROOFSTEP]\nrefine Over.OverMorphism.ext ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nx✝² x✝¹ x✝ : OpensLeCover U\nf : x✝² ⟶ x✝¹\ng : x✝¹ ⟶ x✝\n⊢ ({\n            obj := fun V =>\n              {\n                obj :=\n                  { left := V.obj, right := { as := PUnit.unit },\n                    hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                property :=\n                  (_ :\n                    ∃ Y_1 h g,\n                      presieveOfCoveringAux U Y g ∧\n                        h ≫ g =\n                          { left := V.obj, right := { as := PUnit.unit },\n                              hom :=\n                                homOfLE\n                                  (_ :\n                                    (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n            map := fun {x x_1} g => Over.homMk g }.map\n        (f ≫ g)).left =\n    ({\n              obj := fun V =>\n                {\n                  obj :=\n                    { left := V.obj, right := { as := PUnit.unit },\n                      hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                  property :=\n                    (_ :\n                      ∃ Y_1 h g,\n                        presieveOfCoveringAux U Y g ∧\n                          h ≫ g =\n                            { left := V.obj, right := { as := PUnit.unit },\n                                hom :=\n                                  homOfLE\n                                    (_ :\n                                      (𝟭 (Opens ↑X)).obj V.obj ≤\n                                        (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n              map := fun {x x_1} g => Over.homMk g }.map\n          f ≫\n        {\n              obj := fun V =>\n                {\n                  obj :=\n                    { left := V.obj, right := { as := PUnit.unit },\n                      hom := homOfLE (_ : (𝟭 (Opens ↑X)).obj V.obj ≤ (Functor.fromPUnit Y).obj { as := PUnit.unit }) },\n                  property :=\n                    (_ :\n                      ∃ Y_1 h g,\n                        presieveOfCoveringAux U Y g ∧\n                          h ≫ g =\n                            { left := V.obj, right := { as := PUnit.unit },\n                                hom :=\n                                  homOfLE\n                                    (_ :\n                                      (𝟭 (Opens ↑X)).obj V.obj ≤\n                                        (Functor.fromPUnit Y).obj { as := PUnit.unit }) }.hom) },\n              map := fun {x x_1} g => Over.homMk g }.map\n          g).left\n[PROOFSTEP]\nsimp only [Functor.id_obj, Sieve.generate_apply, Functor.const_obj_obj, Over.homMk_left, eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ∀ (X_1 : FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom),\n    (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj X_1 =\n      (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj X_1\n[PROOFSTEP]\nrintro ⟨⟨_, _⟩, _⟩\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nleft✝ : Opens ↑X\nright✝ : Discrete PUnit\nhom✝ : (𝟭 (Opens ↑X)).obj left✝ ⟶ (Functor.fromPUnit Y).obj right✝\nproperty✝ : (Sieve.generate (presieveOfCoveringAux U Y)).arrows { left := left✝, right := right✝, hom := hom✝ }.hom\n⊢ (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj\n      { obj := { left := left✝, right := right✝, hom := hom✝ }, property := property✝ } =\n    (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj\n      { obj := { left := left✝, right := right✝, hom := hom✝ }, property := property✝ }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nleft✝ : Opens ↑X\nright✝ : Discrete PUnit\nhom✝ : (𝟭 (Opens ↑X)).obj left✝ ⟶ (Functor.fromPUnit Y).obj right✝\nproperty✝ : (Sieve.generate (presieveOfCoveringAux U Y)).arrows { left := left✝, right := right✝, hom := hom✝ }.hom\n⊢ { obj := { left := left✝, right := right✝, hom := hom✝ }, property := property✝ } =\n    (generateEquivalenceOpensLe_inverse' U ?m.44608).obj\n      ((generateEquivalenceOpensLe_functor' U ?m.44561).obj\n        { obj := { left := left✝, right := right✝, hom := hom✝ }, property := property✝ })\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ∀ (X_1 Y_1 : FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom) (f : X_1 ⟶ Y_1),\n    (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).map f =\n      eqToHom\n          (_ :\n            (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj X_1 =\n              (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj\n                X_1) ≫\n        (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).map f ≫\n          eqToHom\n            (_ :\n              (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj\n                  Y_1 =\n                (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj Y_1)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nX✝ Y✝ : FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom\nf✝ : X✝ ⟶ Y✝\n⊢ (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).map f✝ =\n    eqToHom\n        (_ :\n          (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj X✝ =\n            (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj X✝) ≫\n      (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).map f✝ ≫\n        eqToHom\n          (_ :\n            (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj Y✝ =\n              (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj Y✝)\n[PROOFSTEP]\nrefine Over.OverMorphism.ext ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nX✝ Y✝ : FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom\nf✝ : X✝ ⟶ Y✝\n⊢ ((𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).map f✝).left =\n    (eqToHom\n          (_ :\n            (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj X✝ =\n              (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj\n                X✝) ≫\n        (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).map f✝ ≫\n          eqToHom\n            (_ :\n              (generateEquivalenceOpensLe_functor' U ?m.44561 ⋙ generateEquivalenceOpensLe_inverse' U ?m.44608).obj Y✝ =\n                (𝟭 (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)).obj Y✝)).left\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ∀ (X_1 : OpensLeCover U),\n    (generateEquivalenceOpensLe_inverse' U (_ : Y = iSup U) ⋙\n            generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).obj\n        X_1 =\n      (𝟭 (OpensLeCover U)).obj X_1\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nX✝ : OpensLeCover U\n⊢ (generateEquivalenceOpensLe_inverse' U (_ : Y = iSup U) ⋙ generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).obj\n      X✝ =\n    (𝟭 (OpensLeCover U)).obj X✝\n[PROOFSTEP]\nrefine FullSubcategory.ext _ _ ?_\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nX✝ : OpensLeCover U\n⊢ ((generateEquivalenceOpensLe_inverse' U (_ : Y = iSup U) ⋙ generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).obj\n        X✝).obj =\n    ((𝟭 (OpensLeCover U)).obj X✝).obj\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ∀ (X_1 Y_1 : OpensLeCover U) (f : X_1 ⟶ Y_1),\n    HEq\n      ((generateEquivalenceOpensLe_inverse' U (_ : Y = iSup U) ⋙\n            generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).map\n        f)\n      ((𝟭 (OpensLeCover U)).map f)\n[PROOFSTEP]\nintros\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nX✝ Y✝ : OpensLeCover U\nf✝ : X✝ ⟶ Y✝\n⊢ HEq\n    ((generateEquivalenceOpensLe_inverse' U (_ : Y = iSup U) ⋙\n          generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).map\n      f✝)\n    ((𝟭 (OpensLeCover U)).map f✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map\n        (eqToHom\n          (_ :\n            op (opensLeCoverCocone U).pt =\n              op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt)) ≫\n      NatTrans.app (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows))).π j =\n    NatTrans.app\n      (Cone.whisker (Equivalence.op (generateEquivalenceOpensLe U hY)).functor\n          (F.mapCone (Cocone.op (opensLeCoverCocone U)))).π\n      j\n[PROOFSTEP]\nerw [← F.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map\n      (eqToHom\n          (_ :\n            op (opensLeCoverCocone U).pt =\n              op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt) ≫\n        NatTrans.app (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows)).π j) =\n    NatTrans.app\n      (Cone.whisker (Equivalence.op (generateEquivalenceOpensLe U hY)).functor\n          (F.mapCone (Cocone.op (opensLeCoverCocone U)))).π\n      j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map (eqToHom (_ : op (opensLeCoverCocone U).pt = op Y) ≫ j.unop.obj.hom.op) =\n    F.map\n      (NatTrans.app (opensLeCoverCocone U).ι ((generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).obj j.unop)).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map\n        (eqToHom\n          (_ :\n            op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n              op (opensLeCoverCocone U).pt)) ≫\n      NatTrans.app\n        (Cone.whisker (Equivalence.op (generateEquivalenceOpensLe U hY)).functor\n            (F.mapCone (Cocone.op (opensLeCoverCocone U)))).π\n        j =\n    NatTrans.app (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows))).π j\n[PROOFSTEP]\nerw [← F.map_comp]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map\n      (eqToHom\n          (_ :\n            op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n              op (opensLeCoverCocone U).pt) ≫\n        NatTrans.app (Cocone.op (opensLeCoverCocone U)).π\n          ((Equivalence.op (generateEquivalenceOpensLe U hY)).functor.obj j)) =\n    NatTrans.app (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows))).π j\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nj : (FullSubcategory fun f => (Sieve.generate (presieveOfCoveringAux U Y)).arrows f.hom)ᵒᵖ\n⊢ F.map\n      (eqToHom (_ : op Y = op (opensLeCoverCocone U).pt) ≫\n        (NatTrans.app (opensLeCoverCocone U).ι\n            ((generateEquivalenceOpensLe_functor' U (_ : Y = iSup U)).obj j.unop)).op) =\n    F.map j.unop.obj.hom.op\n[PROOFSTEP]\ncongr 1\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ConeMorphism.mk\n        (F.map\n          (eqToHom\n            (_ :\n              op (opensLeCoverCocone U).pt =\n                op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt))) ≫\n      ConeMorphism.mk\n        (F.map\n          (eqToHom\n            (_ :\n              op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n                op (opensLeCoverCocone U).pt))) =\n    𝟙\n      (Cone.whisker (Equivalence.op (generateEquivalenceOpensLe U hY)).functor\n        (F.mapCone (Cocone.op (opensLeCoverCocone U))))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ (ConeMorphism.mk\n          (F.map\n            (eqToHom\n              (_ :\n                op (opensLeCoverCocone U).pt =\n                  op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt))) ≫\n        ConeMorphism.mk\n          (F.map\n            (eqToHom\n              (_ :\n                op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n                  op (opensLeCoverCocone U).pt)))).Hom =\n    (𝟙\n        (Cone.whisker (Equivalence.op (generateEquivalenceOpensLe U hY)).functor\n          (F.mapCone (Cocone.op (opensLeCoverCocone U))))).Hom\n[PROOFSTEP]\nsimp [eqToHom_map]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ ConeMorphism.mk\n        (F.map\n          (eqToHom\n            (_ :\n              op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n                op (opensLeCoverCocone U).pt))) ≫\n      ConeMorphism.mk\n        (F.map\n          (eqToHom\n            (_ :\n              op (opensLeCoverCocone U).pt =\n                op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt))) =\n    𝟙 (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows)))\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ (ConeMorphism.mk\n          (F.map\n            (eqToHom\n              (_ :\n                op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt =\n                  op (opensLeCoverCocone U).pt))) ≫\n        ConeMorphism.mk\n          (F.map\n            (eqToHom\n              (_ :\n                op (opensLeCoverCocone U).pt =\n                  op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows).pt)))).Hom =\n    (𝟙 (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U Y)).arrows)))).Hom\n[PROOFSTEP]\nsimp [eqToHom_map]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nR : Presieve Y\nhR : Sieve.generate R ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y\n⊢ IsLimit (F.mapCone (Cocone.op (opensLeCoverCocone (coveringOfPresieve Y R)))) ≃\n    IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate R).arrows)))\n[PROOFSTEP]\nconvert\n  isLimitOpensLeEquivGenerate₁ F (coveringOfPresieve Y R)\n    (coveringOfPresieve.iSup_eq_of_mem_grothendieck Y R hR).symm using\n  1\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\nR : Presieve Y\nhR : Sieve.generate R ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y\n⊢ IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate R).arrows))) =\n    IsLimit\n      (F.mapCone\n        (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux (coveringOfPresieve Y R) Y)).arrows)))\n[PROOFSTEP]\nrw [covering_presieve_eq_self R]\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ IsSheaf F ↔ IsSheafOpensLeCover F\n[PROOFSTEP]\nrefine' (Presheaf.isSheaf_iff_isLimit _ _).trans _\n[GOAL]\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ (∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))) ↔\n    IsSheafOpensLeCover F\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ (∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))) →\n    IsSheafOpensLeCover F\n[PROOFSTEP]\nintro h ι U\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι✝ : Type w\nU✝ : ι✝ → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U✝\nh :\n  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))\nι : Type w\nU : ι → Opens ↑X\n⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (opensLeCoverCocone U))))\n[PROOFSTEP]\nrw [(isLimitOpensLeEquivGenerate₁ F U rfl).nonempty_congr]\n[GOAL]\ncase mp\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι✝ : Type w\nU✝ : ι✝ → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U✝\nh :\n  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))\nι : Type w\nU : ι → Opens ↑X\n⊢ Nonempty\n    (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U (iSup U))).arrows))))\n[PROOFSTEP]\napply h\n[GOAL]\ncase mp.a\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι✝ : Type w\nU✝ : ι✝ → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U✝\nh :\n  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))\nι : Type w\nU : ι → Opens ↑X\n⊢ Sieve.generate (presieveOfCoveringAux U (iSup U)) ∈\n    GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) (iSup U)\n[PROOFSTEP]\napply presieveOfCovering.mem_grothendieckTopology\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY : Opens ↑X\nhY : Y = iSup U\n⊢ IsSheafOpensLeCover F →\n    ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),\n      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →\n        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))\n[PROOFSTEP]\nintro h Y S\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY✝ : Opens ↑X\nhY : Y✝ = iSup U\nh : IsSheafOpensLeCover F\nY : Opens ↑X\nS : Sieve Y\n⊢ S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y →\n    Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))\n[PROOFSTEP]\nrw [← Sieve.generate_sieve S]\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY✝ : Opens ↑X\nhY : Y✝ = iSup U\nh : IsSheafOpensLeCover F\nY : Opens ↑X\nS : Sieve Y\n⊢ Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y →\n    Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate S.arrows).arrows))))\n[PROOFSTEP]\nintro hS\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY✝ : Opens ↑X\nhY : Y✝ = iSup U\nh : IsSheafOpensLeCover F\nY : Opens ↑X\nS : Sieve Y\nhS : Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y\n⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate S.arrows).arrows))))\n[PROOFSTEP]\nrw [← (isLimitOpensLeEquivGenerate₂ F S.1 hS).nonempty_congr]\n[GOAL]\ncase mpr\nC : Type u\ninst✝ : Category.{v, u} C\nX : TopCat\nF : Presheaf C X\nι : Type w\nU : ι → Opens ↑X\nY✝ : Opens ↑X\nhY : Y✝ = iSup U\nh : IsSheafOpensLeCover F\nY : Opens ↑X\nS : Sieve Y\nhS : Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y\n⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (opensLeCoverCocone (coveringOfPresieve Y S.arrows)))))\n[PROOFSTEP]\napply h\n", "meta": {"mathlib_filename": "Mathlib.Topology.Sheaves.SheafCondition.OpensLeCover", "llama_tokens": 11635, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.658417500561683, "lm_q2_score": 0.40356685373537454, "lm_q1q2_score": 0.26571547914598764}}
{"text": "[GOAL]\nβ : Type v\nf : β → Type v\nP : Type v\ns : (b : β) → P ⟶ f b\nb : β\nx : P\n⊢ Pi.π f b (Pi.lift s x) = s b x\n[PROOFSTEP]\nsimp\n[GOAL]\nβ : Type v\nf g : β → Type v\nα : (j : β) → f j ⟶ g j\nb : β\nx : ∏ fun b => f b\n⊢ Pi.π g b (Pi.map α x) = α b (Pi.π f b x)\n[PROOFSTEP]\nsimp\n[GOAL]\nx✝ : Cone (Functor.empty (Type u))\n⊢ ∀ (j : Discrete PEmpty),\n    (fun x x => PUnit.unit) x✝ ≫\n        NatTrans.app { pt := PUnit, π := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PUnit)).hom }.π\n          j =\n      NatTrans.app x✝.π j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\nx✝² : Cone (Functor.empty (Type u))\nx✝¹ : x✝².pt ⟶ { pt := PUnit, π := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PUnit)).hom }.pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    x✝¹ ≫\n        NatTrans.app { pt := PUnit, π := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PUnit)).hom }.π\n          j =\n      NatTrans.app x✝².π j\n⊢ x✝¹ = (fun x x => PUnit.unit) x✝²\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nx✝³ : Cone (Functor.empty (Type u))\nx✝² : x✝³.pt ⟶ { pt := PUnit, π := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PUnit)).hom }.pt\nx✝¹ :\n  ∀ (j : Discrete PEmpty),\n    x✝² ≫\n        NatTrans.app { pt := PUnit, π := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PUnit)).hom }.π\n          j =\n      NatTrans.app x✝³.π j\nx✝ : x✝³.pt\n⊢ x✝² x✝ = (fun x x => PUnit.unit) x✝³ x✝\n[PROOFSTEP]\napply Subsingleton.elim\n[GOAL]\nX : Type u\n⊢ IsTerminal X ≃ (X ≅ PUnit)\n[PROOFSTEP]\ncalc\n  IsTerminal X ≃ Unique X := isTerminalEquivUnique _\n  _ ≃ (X ≃ PUnit.{u + 1}) := (uniqueEquivEquivUnique _ _)\n  _ ≃ (X ≅ PUnit) := equivEquivIso\n[GOAL]\nx✝ : Cocone (Functor.empty (Type u))\n⊢ { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.pt ⟶ x✝.pt\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\nx✝ : Cocone (Functor.empty (Type u))\n⊢ ∀ (j : Discrete PEmpty),\n    NatTrans.app { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.ι\n          j ≫\n        (fun x a => PEmpty.casesOn (fun x_1 => x.pt) a) x✝ =\n      NatTrans.app x✝.ι j\n[PROOFSTEP]\nrintro ⟨⟨⟩⟩\n[GOAL]\nx✝² : Cocone (Functor.empty (Type u))\nx✝¹ : { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.pt ⟶ x✝².pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    NatTrans.app { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.ι\n          j ≫\n        x✝¹ =\n      NatTrans.app x✝².ι j\n⊢ x✝¹ = (fun x a => PEmpty.casesOn (fun x_1 => x.pt) a) x✝²\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase h\nx✝² : Cocone (Functor.empty (Type u))\nx✝¹ : { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.pt ⟶ x✝².pt\nx✝ :\n  ∀ (j : Discrete PEmpty),\n    NatTrans.app { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.ι\n          j ≫\n        x✝¹ =\n      NatTrans.app x✝².ι j\nx : { pt := PEmpty, ι := (Functor.uniqueFromEmpty ((Functor.const (Discrete PEmpty)).obj PEmpty)).inv }.pt\n⊢ x✝¹ x = (fun x a => PEmpty.casesOn (fun x_1 => x.pt) a) x✝² x\n[PROOFSTEP]\ncases x\n[GOAL]\n⊢ binaryProductFunctor ≅ prod.functor\n[PROOFSTEP]\nrefine' NatIso.ofComponents (fun X => _) (fun _ => _)\n[GOAL]\ncase refine'_1\nX : Type u\n⊢ binaryProductFunctor.obj X ≅ prod.functor.obj X\n[PROOFSTEP]\nrefine' NatIso.ofComponents (fun Y => _) (fun _ => _)\n[GOAL]\ncase refine'_1.refine'_1\nX Y : Type u\n⊢ (binaryProductFunctor.obj X).obj Y ≅ (prod.functor.obj X).obj Y\n[PROOFSTEP]\nexact ((limit.isLimit _).conePointUniqueUpToIso (binaryProductLimit X Y)).symm\n[GOAL]\ncase refine'_1.refine'_2\nX X✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ (binaryProductFunctor.obj X).map x✝ ≫\n      ((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) Y✝).hom =\n    ((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) X✝).hom ≫\n      (prod.functor.obj X).map x✝\n[PROOFSTEP]\napply Limits.prod.hom_ext\n[GOAL]\ncase refine'_1.refine'_2.h₁\nX X✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ ((binaryProductFunctor.obj X).map x✝ ≫\n        ((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) Y✝).hom) ≫\n      prod.fst =\n    (((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) X✝).hom ≫\n        (prod.functor.obj X).map x✝) ≫\n      prod.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.refine'_2.h₂\nX X✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ ((binaryProductFunctor.obj X).map x✝ ≫\n        ((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) Y✝).hom) ≫\n      prod.snd =\n    (((fun Y => (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm) X✝).hom ≫\n        (prod.functor.obj X).map x✝) ≫\n      prod.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_1.refine'_2.h₁\nX X✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ (binaryProductFunctor.obj X).map x✝ ≫ _root_.Prod.fst = _root_.Prod.fst\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_1.refine'_2.h₂\nX X✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ (binaryProductFunctor.obj X).map x✝ ≫ _root_.Prod.snd = _root_.Prod.snd ≫ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2\nX✝ Y✝ : Type u\nx✝ : X✝ ⟶ Y✝\n⊢ binaryProductFunctor.map x✝ ≫\n      ((fun X =>\n            NatIso.ofComponents fun Y =>\n              (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n          Y✝).hom =\n    ((fun X =>\n            NatIso.ofComponents fun Y =>\n              (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n          X✝).hom ≫\n      prod.functor.map x✝\n[PROOFSTEP]\next : 2\n[GOAL]\ncase refine'_2.w.h\nX✝ Y✝ : Type u\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Type u\n⊢ NatTrans.app\n      (binaryProductFunctor.map x✝¹ ≫\n        ((fun X =>\n              NatIso.ofComponents fun Y =>\n                (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n            Y✝).hom)\n      x✝ =\n    NatTrans.app\n      (((fun X =>\n              NatIso.ofComponents fun Y =>\n                (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n            X✝).hom ≫\n        prod.functor.map x✝¹)\n      x✝\n[PROOFSTEP]\napply Limits.prod.hom_ext\n[GOAL]\ncase refine'_2.w.h.h₁\nX✝ Y✝ : Type u\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Type u\n⊢ NatTrans.app\n        (binaryProductFunctor.map x✝¹ ≫\n          ((fun X =>\n                NatIso.ofComponents fun Y =>\n                  (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n              Y✝).hom)\n        x✝ ≫\n      prod.fst =\n    NatTrans.app\n        (((fun X =>\n                NatIso.ofComponents fun Y =>\n                  (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n              X✝).hom ≫\n          prod.functor.map x✝¹)\n        x✝ ≫\n      prod.fst\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.w.h.h₂\nX✝ Y✝ : Type u\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Type u\n⊢ NatTrans.app\n        (binaryProductFunctor.map x✝¹ ≫\n          ((fun X =>\n                NatIso.ofComponents fun Y =>\n                  (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n              Y✝).hom)\n        x✝ ≫\n      prod.snd =\n    NatTrans.app\n        (((fun X =>\n                NatIso.ofComponents fun Y =>\n                  (IsLimit.conePointUniqueUpToIso (limit.isLimit (pair X Y)) (binaryProductLimit X Y)).symm)\n              X✝).hom ≫\n          prod.functor.map x✝¹)\n        x✝ ≫\n      prod.snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2.w.h.h₁\nX✝ Y✝ : Type u\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Type u\n⊢ NatTrans.app (binaryProductFunctor.map x✝¹) x✝ ≫ _root_.Prod.fst = _root_.Prod.fst ≫ x✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine'_2.w.h.h₂\nX✝ Y✝ : Type u\nx✝¹ : X✝ ⟶ Y✝\nx✝ : Type u\n⊢ NatTrans.app (binaryProductFunctor.map x✝¹) x✝ ≫ _root_.Prod.snd = _root_.Prod.snd\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y : Type u\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) ↔\n    Injective (BinaryCofan.inl c) ∧\n      Injective (BinaryCofan.inr c) ∧ IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n[PROOFSTEP]\nclassical\nconstructor\n· rintro ⟨h⟩\n  rw [← show _ = c.inl from h.comp_coconePointUniqueUpToIso_inv (binaryCoproductColimit X Y) ⟨WalkingPair.left⟩, ←\n    show _ = c.inr from h.comp_coconePointUniqueUpToIso_inv (binaryCoproductColimit X Y) ⟨WalkingPair.right⟩]\n  dsimp [binaryCoproductCocone]\n  refine'\n    ⟨(h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.injective.comp Sum.inl_injective,\n      (h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.injective.comp Sum.inr_injective, _⟩\n  erw [Set.range_comp, ← eq_compl_iff_isCompl, Set.range_comp _ Sum.inr, ←\n    Set.image_compl_eq (h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.bijective]\n  simp\n· rintro ⟨h₁, h₂, h₃⟩\n  have : ∀ x, x ∈ Set.range c.inl ∨ x ∈ Set.range c.inr :=\n    by\n    rw [eq_compl_iff_isCompl.mpr h₃.symm]\n    exact fun _ => or_not\n  refine' ⟨BinaryCofan.IsColimit.mk _ _ _ _ _⟩\n  · intro T f g x\n    exact\n      if h : x ∈ Set.range c.inl then f ((Equiv.ofInjective _ h₁).symm ⟨x, h⟩)\n      else g ((Equiv.ofInjective _ h₂).symm ⟨x, (this x).resolve_left h⟩)\n  · intro T f g\n    funext x\n    dsimp\n    simp [h₁.eq_iff]\n  · intro T f g\n    funext x\n    dsimp\n    simp only [Set.mem_range, Equiv.ofInjective_symm_apply, dite_eq_right_iff, forall_exists_index]\n    intro y e\n    have : c.inr x ∈ Set.range c.inl ⊓ Set.range c.inr := ⟨⟨_, e⟩, ⟨_, rfl⟩⟩\n    rw [disjoint_iff.mp h₃.1] at this \n    exact this.elim\n  · rintro T _ _ m rfl rfl\n    funext x\n    dsimp\n    split_ifs <;> exact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n[GOAL]\nX Y : Type u\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) ↔\n    Injective (BinaryCofan.inl c) ∧\n      Injective (BinaryCofan.inr c) ∧ IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nX Y : Type u\nc : BinaryCofan X Y\n⊢ Nonempty (IsColimit c) →\n    Injective (BinaryCofan.inl c) ∧\n      Injective (BinaryCofan.inr c) ∧ IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n[PROOFSTEP]\nrintro ⟨h⟩\n[GOAL]\ncase mp.intro\nX Y : Type u\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ Injective (BinaryCofan.inl c) ∧\n    Injective (BinaryCofan.inr c) ∧ IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n[PROOFSTEP]\nrw [← show _ = c.inl from h.comp_coconePointUniqueUpToIso_inv (binaryCoproductColimit X Y) ⟨WalkingPair.left⟩, ←\n  show _ = c.inr from h.comp_coconePointUniqueUpToIso_inv (binaryCoproductColimit X Y) ⟨WalkingPair.right⟩]\n[GOAL]\ncase mp.intro\nX Y : Type u\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ Injective\n      (NatTrans.app (binaryCoproductCocone X Y).ι { as := left } ≫\n        (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv) ∧\n    Injective\n        (NatTrans.app (binaryCoproductCocone X Y).ι { as := right } ≫\n          (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv) ∧\n      IsCompl\n        (Set.range\n          (NatTrans.app (binaryCoproductCocone X Y).ι { as := left } ≫\n            (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n        (Set.range\n          (NatTrans.app (binaryCoproductCocone X Y).ι { as := right } ≫\n            (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n[PROOFSTEP]\ndsimp [binaryCoproductCocone]\n[GOAL]\ncase mp.intro\nX Y : Type u\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ Injective (Sum.inl ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv) ∧\n    Injective (Sum.inr ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv) ∧\n      IsCompl (Set.range (Sum.inl ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n        (Set.range (Sum.inr ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n[PROOFSTEP]\nrefine'\n  ⟨(h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.injective.comp Sum.inl_injective,\n    (h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.injective.comp Sum.inr_injective, _⟩\n[GOAL]\ncase mp.intro\nX Y : Type u\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ IsCompl (Set.range (Sum.inl ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n    (Set.range (Sum.inr ≫ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv))\n[PROOFSTEP]\nerw [Set.range_comp, ← eq_compl_iff_isCompl, Set.range_comp _ Sum.inr, ←\n  Set.image_compl_eq (h.coconePointUniqueUpToIso (binaryCoproductColimit X Y)).symm.toEquiv.bijective]\n[GOAL]\ncase mp.intro\nX Y : Type u\nc : BinaryCofan X Y\nh : IsColimit c\n⊢ (IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).inv '' Set.range Sum.inl =\n    ↑(IsColimit.coconePointUniqueUpToIso h (binaryCoproductColimit X Y)).symm.toEquiv '' (Set.range Sum.inr)ᶜ\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nX Y : Type u\nc : BinaryCofan X Y\n⊢ Injective (BinaryCofan.inl c) ∧\n      Injective (BinaryCofan.inr c) ∧ IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c)) →\n    Nonempty (IsColimit c)\n[PROOFSTEP]\nrintro ⟨h₁, h₂, h₃⟩\n[GOAL]\ncase mpr.intro.intro\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n⊢ Nonempty (IsColimit c)\n[PROOFSTEP]\nhave : ∀ x, x ∈ Set.range c.inl ∨ x ∈ Set.range c.inr :=\n  by\n  rw [eq_compl_iff_isCompl.mpr h₃.symm]\n  exact fun _ => or_not\n[GOAL]\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n⊢ ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n[PROOFSTEP]\nrw [eq_compl_iff_isCompl.mpr h₃.symm]\n[GOAL]\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\n⊢ ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ (Set.range (BinaryCofan.inl c))ᶜ\n[PROOFSTEP]\nexact fun _ => or_not\n[GOAL]\ncase mpr.intro.intro\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n⊢ Nonempty (IsColimit c)\n[PROOFSTEP]\nrefine' ⟨BinaryCofan.IsColimit.mk _ _ _ _ _⟩\n[GOAL]\ncase mpr.intro.intro.refine'_1\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n⊢ {T : Type u} → (X ⟶ T) → (Y ⟶ T) → (c.pt ⟶ T)\n[PROOFSTEP]\nintro T f g x\n[GOAL]\ncase mpr.intro.intro.refine'_1\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : c.pt\n⊢ T\n[PROOFSTEP]\nexact\n  if h : x ∈ Set.range c.inl then f ((Equiv.ofInjective _ h₁).symm ⟨x, h⟩)\n  else g ((Equiv.ofInjective _ h₂).symm ⟨x, (this x).resolve_left h⟩)\n[GOAL]\ncase mpr.intro.intro.refine'_2\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n⊢ ∀ {T : Type u} (f : X ⟶ T) (g : Y ⟶ T),\n    (BinaryCofan.inl c ≫ fun x =>\n        if h : x ∈ Set.range (BinaryCofan.inl c) then\n          f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n        else\n          g\n            (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n              { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })) =\n      f\n[PROOFSTEP]\nintro T f g\n[GOAL]\ncase mpr.intro.intro.refine'_2\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\n⊢ (BinaryCofan.inl c ≫ fun x =>\n      if h : x ∈ Set.range (BinaryCofan.inl c) then\n        f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n      else\n        g\n          (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n            { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })) =\n    f\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mpr.intro.intro.refine'_2.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := left }\n⊢ (BinaryCofan.inl c ≫ fun x =>\n        if h : x ∈ Set.range (BinaryCofan.inl c) then\n          f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n        else\n          g\n            (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n              { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) }))\n      x =\n    f x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.refine'_2.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := left }\n⊢ (if h : BinaryCofan.inl c x ∈ Set.range (BinaryCofan.inl c) then\n      f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := BinaryCofan.inl c x, property := h })\n    else\n      g\n        (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n          { val := BinaryCofan.inl c x, property := (_ : BinaryCofan.inl c x ∈ Set.range (BinaryCofan.inr c)) })) =\n    f x\n[PROOFSTEP]\nsimp [h₁.eq_iff]\n[GOAL]\ncase mpr.intro.intro.refine'_3\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n⊢ ∀ {T : Type u} (f : X ⟶ T) (g : Y ⟶ T),\n    (BinaryCofan.inr c ≫ fun x =>\n        if h : x ∈ Set.range (BinaryCofan.inl c) then\n          f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n        else\n          g\n            (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n              { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })) =\n      g\n[PROOFSTEP]\nintro T f g\n[GOAL]\ncase mpr.intro.intro.refine'_3\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\n⊢ (BinaryCofan.inr c ≫ fun x =>\n      if h : x ∈ Set.range (BinaryCofan.inl c) then\n        f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n      else\n        g\n          (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n            { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })) =\n    g\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\n⊢ (BinaryCofan.inr c ≫ fun x =>\n        if h : x ∈ Set.range (BinaryCofan.inl c) then\n          f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n        else\n          g\n            (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n              { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) }))\n      x =\n    g x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\n⊢ (if h : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c) then\n      f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := BinaryCofan.inr c x, property := h })\n    else\n      g\n        (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n          { val := BinaryCofan.inr c x, property := (_ : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inr c)) })) =\n    g x\n[PROOFSTEP]\nsimp only [Set.mem_range, Equiv.ofInjective_symm_apply, dite_eq_right_iff, forall_exists_index]\n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\n⊢ ∀ (x_1 : X) (h : BinaryCofan.inl c x_1 = BinaryCofan.inr c x),\n    f\n        (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm\n          { val := BinaryCofan.inr c x, property := (_ : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c)) }) =\n      g x\n[PROOFSTEP]\nintro y e\n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\ny : X\ne : BinaryCofan.inl c y = BinaryCofan.inr c x\n⊢ f\n      (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm\n        { val := BinaryCofan.inr c x, property := (_ : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c)) }) =\n    g x\n[PROOFSTEP]\nhave : c.inr x ∈ Set.range c.inl ⊓ Set.range c.inr := ⟨⟨_, e⟩, ⟨_, rfl⟩⟩\n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\ny : X\ne : BinaryCofan.inl c y = BinaryCofan.inr c x\nthis : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c) ⊓ Set.range (BinaryCofan.inr c)\n⊢ f\n      (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm\n        { val := BinaryCofan.inr c x, property := (_ : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c)) }) =\n    g x\n[PROOFSTEP]\nrw [disjoint_iff.mp h₃.1] at this \n[GOAL]\ncase mpr.intro.intro.refine'_3.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis✝ :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nf : X ⟶ T\ng : Y ⟶ T\nx : (pair X Y).obj { as := right }\ny : X\ne : BinaryCofan.inl c y = BinaryCofan.inr c x\nthis : BinaryCofan.inr c x ∈ ⊥\n⊢ f\n      (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm\n        { val := BinaryCofan.inr c x, property := (_ : BinaryCofan.inr c x ∈ Set.range (BinaryCofan.inl c)) }) =\n    g x\n[PROOFSTEP]\nexact this.elim\n[GOAL]\ncase mpr.intro.intro.refine'_4\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\n⊢ ∀ {T : Type u} (f : X ⟶ T) (g : Y ⟶ T) (m : c.pt ⟶ T),\n    BinaryCofan.inl c ≫ m = f →\n      BinaryCofan.inr c ≫ m = g →\n        m = fun x =>\n          if h : x ∈ Set.range (BinaryCofan.inl c) then\n            f (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n          else\n            g\n              (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n                { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })\n[PROOFSTEP]\nrintro T _ _ m rfl rfl\n[GOAL]\ncase mpr.intro.intro.refine'_4\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nm : c.pt ⟶ T\n⊢ m = fun x =>\n    if h : x ∈ Set.range (BinaryCofan.inl c) then\n      (BinaryCofan.inl c ≫ m) (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n    else\n      (BinaryCofan.inr c ≫ m)\n        (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n          { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mpr.intro.intro.refine'_4.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nm : c.pt ⟶ T\nx : c.pt\n⊢ m x =\n    if h : x ∈ Set.range (BinaryCofan.inl c) then\n      (BinaryCofan.inl c ≫ m) (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h })\n    else\n      (BinaryCofan.inr c ≫ m)\n        (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n          { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mpr.intro.intro.refine'_4.h\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nm : c.pt ⟶ T\nx : c.pt\n⊢ m x =\n    if h : x ∈ Set.range (BinaryCofan.inl c) then\n      m (BinaryCofan.inl c (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h }))\n    else\n      m\n        (BinaryCofan.inr c\n          (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n            { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) }))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nm : c.pt ⟶ T\nx : c.pt\nh✝ : x ∈ Set.range (BinaryCofan.inl c)\n⊢ m x = m (BinaryCofan.inl c (↑(Equiv.ofInjective (BinaryCofan.inl c) h₁).symm { val := x, property := h✝ }))\n[PROOFSTEP]\nexact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n[GOAL]\ncase neg\nX Y : Type u\nc : BinaryCofan X Y\nh₁ : Injective (BinaryCofan.inl c)\nh₂ : Injective (BinaryCofan.inr c)\nh₃ : IsCompl (Set.range (BinaryCofan.inl c)) (Set.range (BinaryCofan.inr c))\nthis :\n  ∀ (x : ((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left }),\n    x ∈ Set.range (BinaryCofan.inl c) ∨ x ∈ Set.range (BinaryCofan.inr c)\nT : Type u\nm : c.pt ⟶ T\nx : c.pt\nh✝ : ¬x ∈ Set.range (BinaryCofan.inl c)\n⊢ m x =\n    m\n      (BinaryCofan.inr c\n        (↑(Equiv.ofInjective (BinaryCofan.inr c) h₂).symm\n          { val := x, property := (_ : x ∈ Set.range (BinaryCofan.inr c)) }))\n[PROOFSTEP]\nexact congr_arg _ (Equiv.apply_ofInjective_symm _ ⟨_, _⟩).symm\n[GOAL]\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ IsColimit (BinaryCofan.mk f Subtype.val)\n[PROOFSTEP]\napply Nonempty.some\n[GOAL]\ncase h\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ Nonempty (IsColimit (BinaryCofan.mk f Subtype.val))\n[PROOFSTEP]\nrw [binaryCofan_isColimit_iff]\n[GOAL]\ncase h\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ Injective (BinaryCofan.inl (BinaryCofan.mk f Subtype.val)) ∧\n    Injective (BinaryCofan.inr (BinaryCofan.mk f Subtype.val)) ∧\n      IsCompl (Set.range (BinaryCofan.inl (BinaryCofan.mk f Subtype.val)))\n        (Set.range (BinaryCofan.inr (BinaryCofan.mk f Subtype.val)))\n[PROOFSTEP]\nrefine' ⟨(mono_iff_injective f).mp inferInstance, Subtype.val_injective, _⟩\n[GOAL]\ncase h\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ IsCompl (Set.range (BinaryCofan.inl (BinaryCofan.mk f Subtype.val)))\n    (Set.range (BinaryCofan.inr (BinaryCofan.mk f Subtype.val)))\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ IsCompl (Set.range (BinaryCofan.inr (BinaryCofan.mk f Subtype.val)))\n    (Set.range (BinaryCofan.inl (BinaryCofan.mk f Subtype.val)))\n[PROOFSTEP]\nrw [← eq_compl_iff_isCompl]\n[GOAL]\ncase h\nX Y : Type u\nf : X ⟶ Y\ninst✝ : Mono f\n⊢ Set.range (BinaryCofan.inr (BinaryCofan.mk f Subtype.val)) =\n    (Set.range (BinaryCofan.inl (BinaryCofan.mk f Subtype.val)))ᶜ\n[PROOFSTEP]\nexact Subtype.range_val\n[GOAL]\nJ : Type v\nF : J → Type u\ninst✝ : UnivLE.{v, u}\ns : Cone (Discrete.functor F)\nm :\n  s.pt ⟶\n    { pt := Shrink ((j : J) → F j),\n        π :=\n          Discrete.natTrans fun x f =>\n            match x, f with\n            | { as := j }, f => ↑(equivShrink ((j : J) → F j)).symm f j }.pt\nw :\n  ∀ (j : Discrete J),\n    m ≫\n        NatTrans.app\n          { pt := Shrink ((j : J) → F j),\n              π :=\n                Discrete.natTrans fun x f =>\n                  match x, f with\n                  | { as := j }, f => ↑(equivShrink ((j : J) → F j)).symm f j }.π\n          j =\n      NatTrans.app s.π j\nx : s.pt\nj : J\n⊢ ↑(equivShrink ((j : J) → F j)).symm (m x) j =\n    ↑(equivShrink ((j : J) → F j)).symm\n      ((fun s x =>\n          ↑(equivShrink ((j : J) → (Discrete.functor F).obj { as := j })) fun j => NatTrans.app s.π { as := j } x)\n        s x)\n      j\n[PROOFSTEP]\nsimpa using (congr_fun (w ⟨j⟩) x : _)\n[GOAL]\nJ : Type u\nF : J → Type u\ns : Cocone (Discrete.functor F)\nm :\n  { pt := (j : J) × F j,\n        ι :=\n          Discrete.natTrans fun x x_1 =>\n            match x, x_1 with\n            | { as := j }, x => { fst := j, snd := x } }.pt ⟶\n    s.pt\nw :\n  ∀ (j : Discrete J),\n    NatTrans.app\n          { pt := (j : J) × F j,\n              ι :=\n                Discrete.natTrans fun x x_1 =>\n                  match x, x_1 with\n                  | { as := j }, x => { fst := j, snd := x } }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\n⊢ m = (fun s x => NatTrans.app s.ι { as := x.fst } x.snd) s\n[PROOFSTEP]\nfunext ⟨j, x⟩\n[GOAL]\ncase h\nJ : Type u\nF : J → Type u\ns : Cocone (Discrete.functor F)\nm :\n  { pt := (j : J) × F j,\n        ι :=\n          Discrete.natTrans fun x x_1 =>\n            match x, x_1 with\n            | { as := j }, x => { fst := j, snd := x } }.pt ⟶\n    s.pt\nw :\n  ∀ (j : Discrete J),\n    NatTrans.app\n          { pt := (j : J) × F j,\n              ι :=\n                Discrete.natTrans fun x x_1 =>\n                  match x, x_1 with\n                  | { as := j }, x => { fst := j, snd := x } }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nj : J\nx : F j\n⊢ m { fst := j, snd := x } = (fun s x => NatTrans.app s.ι { as := x.fst } x.snd) s { fst := j, snd := x }\n[PROOFSTEP]\nexact congr_fun (w ⟨j⟩) x\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\n⊢ { l //\n    l ≫ Fork.ι (Fork.ofι f w) = Fork.ι s ∧\n      ∀\n        {m :\n          ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n            ((Functor.const WalkingParallelPair).obj (Fork.ofι f w).pt).obj WalkingParallelPair.zero},\n        m ≫ Fork.ι (Fork.ofι f w) = Fork.ι s → m = l }\n[PROOFSTEP]\nrefine' ⟨fun i => _, _, _⟩\n[GOAL]\ncase refine'_1\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\ni : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ ((Functor.const WalkingParallelPair).obj (Fork.ofι f w).pt).obj WalkingParallelPair.zero\n[PROOFSTEP]\napply Classical.choose (t (s.ι i) _)\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\ni : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ g (Fork.ι s i) = h (Fork.ι s i)\n[PROOFSTEP]\napply congr_fun s.condition i\n[GOAL]\ncase refine'_2\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\n⊢ (fun i => Classical.choose (_ : ∃! x, f x = Fork.ι s i)) ≫ Fork.ι (Fork.ofι f w) = Fork.ι s\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase refine'_2.h\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\ni : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ ((fun i => Classical.choose (_ : ∃! x, f x = Fork.ι s i)) ≫ Fork.ι (Fork.ofι f w)) i = Fork.ι s i\n[PROOFSTEP]\nexact (Classical.choose_spec (t (s.ι i) (congr_fun s.condition i))).1\n[GOAL]\ncase refine'_3\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\n⊢ ∀\n    {m :\n      ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n        ((Functor.const WalkingParallelPair).obj (Fork.ofι f w).pt).obj WalkingParallelPair.zero},\n    m ≫ Fork.ι (Fork.ofι f w) = Fork.ι s → m = fun i => Classical.choose (_ : ∃! x, f x = Fork.ι s i)\n[PROOFSTEP]\nintro m hm\n[GOAL]\ncase refine'_3\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι f w).pt).obj WalkingParallelPair.zero\nhm : m ≫ Fork.ι (Fork.ofι f w) = Fork.ι s\n⊢ m = fun i => Classical.choose (_ : ∃! x, f x = Fork.ι s i)\n[PROOFSTEP]\nfunext i\n[GOAL]\ncase refine'_3.h\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : ∀ (y : Y), g y = h y → ∃! x, f x = y\ns : Fork g h\nm :\n  ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero ⟶\n    ((Functor.const WalkingParallelPair).obj (Fork.ofι f w).pt).obj WalkingParallelPair.zero\nhm : m ≫ Fork.ι (Fork.ofι f w) = Fork.ι s\ni : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ m i = Classical.choose (_ : ∃! x, f x = Fork.ι s i)\n[PROOFSTEP]\nexact (Classical.choose_spec (t (s.ι i) (congr_fun s.condition i))).2 _ (congr_fun hm i)\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\n⊢ ∃! x, f x = y\n[PROOFSTEP]\nlet y' : PUnit ⟶ Y := fun _ => y\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\n⊢ ∃! x, f x = y\n[PROOFSTEP]\nhave hy' : y' ≫ g = y' ≫ h := funext fun _ => hy\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\n⊢ ∃! x, f x = y\n[PROOFSTEP]\nrefine' ⟨(Fork.IsLimit.lift' t _ hy').1 ⟨⟩, congr_fun (Fork.IsLimit.lift' t y' _).2 ⟨⟩, _⟩\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\n⊢ ∀ (y_1 : X), (fun x => f x = y) y_1 → y_1 = ↑(Fork.IsLimit.lift' t y' hy') PUnit.unit\n[PROOFSTEP]\nintro x' hx'\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\n⊢ x' = ↑(Fork.IsLimit.lift' t y' hy') PUnit.unit\n[PROOFSTEP]\nsuffices : (fun _ : PUnit => x') = (Fork.IsLimit.lift' t y' hy').1\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\nthis : (fun x => x') = ↑(Fork.IsLimit.lift' t y' hy')\n⊢ x' = ↑(Fork.IsLimit.lift' t y' hy') PUnit.unit\ncase this\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\n⊢ (fun x => x') = ↑(Fork.IsLimit.lift' t y' hy')\n[PROOFSTEP]\nrw [← this]\n[GOAL]\ncase this\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\n⊢ (fun x => x') = ↑(Fork.IsLimit.lift' t y' hy')\n[PROOFSTEP]\napply Fork.IsLimit.hom_ext t\n[GOAL]\ncase this\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\n⊢ (fun x => x') ≫ Fork.ι (Fork.ofι f w) = ↑(Fork.IsLimit.lift' t y' hy') ≫ Fork.ι (Fork.ofι f w)\n[PROOFSTEP]\nfunext ⟨⟩\n[GOAL]\ncase this.h\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\nt : IsLimit (Fork.ofι f w)\ny : Y\nhy : g y = h y\ny' : PUnit ⟶ Y := fun x => y\nhy' : y' ≫ g = y' ≫ h\nx' : X\nhx' : f x' = y\n⊢ ((fun x => x') ≫ Fork.ι (Fork.ofι f w)) PUnit.unit =\n    (↑(Fork.IsLimit.lift' t y' hy') ≫ Fork.ι (Fork.ofι f w)) PUnit.unit\n[PROOFSTEP]\napply hx'.trans (congr_fun (Fork.IsLimit.lift' t _ hy').2 ⟨⟩).symm\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\ns : Fork g h\ni : ((Functor.const WalkingParallelPair).obj s.pt).obj WalkingParallelPair.zero\n⊢ g (Fork.ι s i) = h (Fork.ι s i)\n[PROOFSTEP]\napply congr_fun s.condition i\n[GOAL]\nX Y Z : Type u\nf : X ⟶ Y\ng h : Y ⟶ Z\nw : f ≫ g = f ≫ h\n⊢ (equalizerIso g h).hom ≫ Subtype.val = equalizer.ι g h\n[PROOFSTEP]\nrfl\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\ns : Cofork f g\na b : Y\nh : CoequalizerRel f g a b\n⊢ Cofork.π s a = Cofork.π s b\n[PROOFSTEP]\ncases h\n[GOAL]\ncase Rel\nX Y Z : Type u\nf g : X ⟶ Y\ns : Cofork f g\nx✝ : X\n⊢ Cofork.π s (f x✝) = Cofork.π s (g x✝)\n[PROOFSTEP]\napply congr_fun s.condition\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\n⊢ π ⁻¹' (π '' U) = U\n[PROOFSTEP]\nhave lem : ∀ x y, CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U) :=\n  by\n  rintro _ _ ⟨x⟩\n  change x ∈ f ⁻¹' U ↔ x ∈ g ⁻¹' U\n  rw [H]\n    -- porting note: tidy was able to fill the structure automatically\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\n⊢ ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\n[PROOFSTEP]\nrintro _ _ ⟨x⟩\n[GOAL]\ncase Rel\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nx : X\n⊢ f x ∈ U ↔ g x ∈ U\n[PROOFSTEP]\nchange x ∈ f ⁻¹' U ↔ x ∈ g ⁻¹' U\n[GOAL]\ncase Rel\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nx : X\n⊢ x ∈ f ⁻¹' U ↔ x ∈ g ⁻¹' U\n[PROOFSTEP]\nrw [H]\n  -- porting note: tidy was able to fill the structure automatically\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\n⊢ π ⁻¹' (π '' U) = U\n[PROOFSTEP]\nhave eqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U :=\n  { refl := by tauto\n    symm := by tauto\n    trans := by tauto }\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\n⊢ ∀ (x : Y), x ∈ U ↔ x ∈ U\n[PROOFSTEP]\ntauto\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\n⊢ ∀ {x y : Y}, (x ∈ U ↔ y ∈ U) → (y ∈ U ↔ x ∈ U)\n[PROOFSTEP]\ntauto\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\n⊢ ∀ {x y z : Y}, (x ∈ U ↔ y ∈ U) → (y ∈ U ↔ z ∈ U) → (x ∈ U ↔ z ∈ U)\n[PROOFSTEP]\ntauto\n[GOAL]\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\n⊢ π ⁻¹' (π '' U) = U\n[PROOFSTEP]\next\n[GOAL]\ncase h\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ : Y\n⊢ x✝ ∈ π ⁻¹' (π '' U) ↔ x✝ ∈ U\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ : Y\n⊢ x✝ ∈ π ⁻¹' (π '' U) → x✝ ∈ U\n[PROOFSTEP]\nrw [← show _ = π from h.comp_coconePointUniqueUpToIso_inv (coequalizerColimit f g).2 WalkingParallelPair.one]\n[GOAL]\ncase h.mp\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ : Y\n⊢ x✝ ∈\n      (NatTrans.app (coequalizerColimit f g).cocone.ι WalkingParallelPair.one ≫\n          (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv) ⁻¹'\n        ((NatTrans.app (coequalizerColimit f g).cocone.ι WalkingParallelPair.one ≫\n            (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv) ''\n          U) →\n    x✝ ∈ U\n[PROOFSTEP]\nrintro ⟨y, hy, e'⟩\n[GOAL]\ncase h.mp.intro.intro\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ y : Y\nhy : y ∈ U\ne' :\n  (NatTrans.app (coequalizerColimit f g).cocone.ι WalkingParallelPair.one ≫\n        (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv)\n      y =\n    (NatTrans.app (coequalizerColimit f g).cocone.ι WalkingParallelPair.one ≫\n        (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv)\n      x✝\n⊢ x✝ ∈ U\n[PROOFSTEP]\ndsimp at e' \n[GOAL]\ncase h.mp.intro.intro\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ y : Y\nhy : y ∈ U\ne' :\n  (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv\n      (Cofork.π (coequalizerColimit f g).cocone y) =\n    (IsColimit.coconePointUniqueUpToIso h (coequalizerColimit f g).isColimit).inv\n      (Cofork.π (coequalizerColimit f g).cocone x✝)\n⊢ x✝ ∈ U\n[PROOFSTEP]\nreplace e' :=\n  (mono_iff_injective (h.coconePointUniqueUpToIso (coequalizerColimit f g).isColimit).inv).mp inferInstance e'\n[GOAL]\ncase h.mp.intro.intro\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ y : Y\nhy : y ∈ U\ne' : Cofork.π (coequalizerColimit f g).cocone y = Cofork.π (coequalizerColimit f g).cocone x✝\n⊢ x✝ ∈ U\n[PROOFSTEP]\nexact (eqv.eqvGen_iff.mp (EqvGen.mono lem (Quot.exact _ e'))).mp hy\n[GOAL]\ncase h.mpr\nX Y Z : Type u\nf g : X ⟶ Y\nπ : Y ⟶ Z\ne : f ≫ π = g ≫ π\nh : IsColimit (Cofork.ofπ π e)\nU : Set Y\nH : f ⁻¹' U = g ⁻¹' U\nlem : ∀ (x y : Y), CoequalizerRel f g x y → (x ∈ U ↔ y ∈ U)\neqv : _root_.Equivalence fun x y => x ∈ U ↔ y ∈ U\nx✝ : Y\n⊢ x✝ ∈ U → x✝ ∈ π ⁻¹' (π '' U)\n[PROOFSTEP]\nexact fun hx => ⟨_, hx, rfl⟩\n[GOAL]\nW X Y Z : Type u\nf✝ : X ⟶ Z\ng✝ : Y ⟶ Z\nf : X ⟶ Z\ng : Y ⟶ Z\n⊢ ∀ (s : PullbackCone f g),\n    (fun s x =>\n            { val := (PullbackCone.fst s x, PullbackCone.snd s x),\n              property := (_ : (PullbackCone.fst s ≫ f) x = (PullbackCone.snd s ≫ g) x) })\n          s ≫\n        PullbackCone.fst (pullbackCone f g) =\n      PullbackCone.fst s\n[PROOFSTEP]\naesop\n[GOAL]\nW X Y Z : Type u\nf✝ : X ⟶ Z\ng✝ : Y ⟶ Z\nf : X ⟶ Z\ng : Y ⟶ Z\n⊢ ∀ (s : PullbackCone f g),\n    (fun s x =>\n            { val := (PullbackCone.fst s x, PullbackCone.snd s x),\n              property := (_ : (PullbackCone.fst s ≫ f) x = (PullbackCone.snd s ≫ g) x) })\n          s ≫\n        PullbackCone.snd (pullbackCone f g) =\n      PullbackCone.snd s\n[PROOFSTEP]\naesop\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Types", "llama_tokens": 22021, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011686727231, "lm_q2_score": 0.4532618480153861, "lm_q1q2_score": 0.2652040369885606}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\nj : Discrete α\n⊢ j ∈ {j}\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\n⊢ m =\n    (fun s =>\n        colimit.desc (liftToFinset F) { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x })\n      s\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\n⊢ ∀ (j : Finset (Discrete α)),\n    colimit.ι (liftToFinset F) j ≫ m =\n      colimit.ι (liftToFinset F) j ≫\n        (fun s =>\n            colimit.desc (liftToFinset F)\n              { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x })\n          s\n[PROOFSTEP]\nrintro t\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\n⊢ colimit.ι (liftToFinset F) t ≫ m =\n    colimit.ι (liftToFinset F) t ≫\n      (fun s =>\n          colimit.desc (liftToFinset F)\n            { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x })\n        s\n[PROOFSTEP]\ndsimp [liftToFinset]\n[GOAL]\ncase w\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\n⊢ colimit.ι\n        (Functor.mk\n          { obj := fun s => ∐ fun x => F.obj ↑x,\n            map := fun {x Y} h =>\n              Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n        t ≫\n      m =\n    colimit.ι\n        (Functor.mk\n          { obj := fun s => ∐ fun x => F.obj ↑x,\n            map := fun {x Y} h =>\n              Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n        t ≫\n      colimit.desc\n        (Functor.mk\n          { obj := fun s => ∐ fun x => F.obj ↑x,\n            map := fun {x Y} h =>\n              Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n        { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x }\n[PROOFSTEP]\napply colimit.hom_ext\n[GOAL]\ncase w.w\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\n⊢ ∀ (j : Discrete { x // x ∈ t }),\n    colimit.ι (Discrete.functor fun x => F.obj ↑x) j ≫\n        colimit.ι\n            (Functor.mk\n              { obj := fun s => ∐ fun x => F.obj ↑x,\n                map := fun {x Y} h =>\n                  Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n            t ≫\n          m =\n      colimit.ι (Discrete.functor fun x => F.obj ↑x) j ≫\n        colimit.ι\n            (Functor.mk\n              { obj := fun s => ∐ fun x => F.obj ↑x,\n                map := fun {x Y} h =>\n                  Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n            t ≫\n          colimit.desc\n            (Functor.mk\n              { obj := fun s => ∐ fun x => F.obj ↑x,\n                map := fun {x Y} h =>\n                  Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n            { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x }\n[PROOFSTEP]\nrintro ⟨⟨j, hj⟩⟩\n[GOAL]\ncase w.w.mk.mk\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\nj : Discrete α\nhj : j ∈ t\n⊢ colimit.ι (Discrete.functor fun x => F.obj ↑x) { as := { val := j, property := hj } } ≫\n      colimit.ι\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          t ≫\n        m =\n    colimit.ι (Discrete.functor fun x => F.obj ↑x) { as := { val := j, property := hj } } ≫\n      colimit.ι\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          t ≫\n        colimit.desc\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x }\n[PROOFSTEP]\nconvert h j using 1\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\nj : Discrete α\nhj : j ∈ t\ne_1✝ : ((Discrete.functor fun x => F.obj ↑x).obj { as := { val := j, property := hj } } ⟶ s.pt) = (F.obj j ⟶ s.pt)\n⊢ colimit.ι (Discrete.functor fun x => F.obj ↑x) { as := { val := j, property := hj } } ≫\n      colimit.ι\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          t ≫\n        m =\n    NatTrans.app\n        { pt := colimit (liftToFinset F),\n            ι :=\n              Discrete.natTrans fun j =>\n                Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.ι\n        j ≫\n      m\n[PROOFSTEP]\nsimp [← colimit.w (liftToFinset F) ⟨⟨Finset.singleton_subset_iff.2 hj⟩⟩]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\nj : Discrete α\nhj : j ∈ t\ne_1✝ : ((Discrete.functor fun x => F.obj ↑x).obj { as := { val := j, property := hj } } ⟶ s.pt) = (F.obj j ⟶ s.pt)\n⊢ colimit.ι (Discrete.functor fun x => F.obj ↑x) { as := { val := j, property := hj } } ≫\n      colimit.ι\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          t ≫\n        m =\n    Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : ↑{ val := j, property := (_ : j ∈ {j}) } ∈ t) } ≫\n      colimit.ι (liftToFinset F) t ≫ m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝² : Category.{v, u} C\nα : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nF : Discrete α ⥤ C\ns : Cocone F\nm :\n  { pt := colimit (liftToFinset F),\n        ι :=\n          Discrete.natTrans fun j =>\n            Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫ colimit.ι (liftToFinset F) {j} }.pt ⟶\n    s.pt\nh :\n  ∀ (j : Discrete α),\n    NatTrans.app\n          { pt := colimit (liftToFinset F),\n              ι :=\n                Discrete.natTrans fun j =>\n                  Sigma.ι (fun x => F.obj ↑x) { val := j, property := (_ : j ∈ {j}) } ≫\n                    colimit.ι (liftToFinset F) {j} }.ι\n          j ≫\n        m =\n      NatTrans.app s.ι j\nt : Finset (Discrete α)\nj : Discrete α\nhj : j ∈ t\ne_1✝ : ((Discrete.functor fun x => F.obj ↑x).obj { as := { val := j, property := hj } } ⟶ s.pt) = (F.obj j ⟶ s.pt)\n⊢ colimit.ι (Discrete.functor fun x => F.obj ↑x) { as := { val := j, property := hj } } ≫\n      colimit.ι\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          t ≫\n        colimit.desc\n          (Functor.mk\n            { obj := fun s => ∐ fun x => F.obj ↑x,\n              map := fun {x Y} h =>\n                Sigma.desc fun y => Sigma.ι (fun x => F.obj ↑x) { val := ↑y, property := (_ : ↑y ∈ Y) } })\n          { pt := s.pt, ι := NatTrans.mk fun t => Sigma.desc fun x => NatTrans.app s.ι ↑x } =\n    NatTrans.app s.ι j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα✝ : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nα : Type w\n⊢ HasColimitsOfShape (Discrete α) C\n[PROOFSTEP]\nclassical exact ⟨fun F => HasColimit.mk (liftToFinsetColimitCocone F)⟩\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nα✝ : Type w\ninst✝¹ : HasFiniteCoproducts C\ninst✝ : HasFilteredColimitsOfSize.{w, w, v, u} C\nα : Type w\n⊢ HasColimitsOfShape (Discrete α) C\n[PROOFSTEP]\nexact ⟨fun F => HasColimit.mk (liftToFinsetColimitCocone F)⟩\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Constructions.Filtered", "llama_tokens": 5663, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5698526514141571, "lm_q2_score": 0.46490157137338844, "lm_q1q2_score": 0.2649253930937334}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ Finset.card (increment hP G ε).parts = stepBound (Finset.card P.parts)\n[PROOFSTEP]\nhave hPα' : stepBound P.parts.card ≤ card α := (mul_le_mul_left' (pow_le_pow_of_le_left' (by norm_num) _) _).trans hPα\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ 4 ≤ 16\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\n⊢ Finset.card (increment hP G ε).parts = stepBound (Finset.card P.parts)\n[PROOFSTEP]\nhave hPpos : 0 < stepBound P.parts.card := stepBound_pos (nonempty_of_not_uniform hPG).card_pos\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card (increment hP G ε).parts = stepBound (Finset.card P.parts)\n[PROOFSTEP]\nrw [increment, card_bind]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∑ A in attach P.parts, Finset.card (chunk hP G ε (_ : ↑A ∈ P.parts)).parts = stepBound (Finset.card P.parts)\n[PROOFSTEP]\nsimp_rw [chunk, apply_dite Finpartition.parts, apply_dite card, sum_dite]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∑ x in\n        attach\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)),\n        Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                        Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts +\n      ∑ x in\n        attach\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)),\n        Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                          1)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                        1) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n    stepBound (Finset.card P.parts)\n[PROOFSTEP]\nrw [sum_const_nat, sum_const_nat, card_attach, card_attach]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        ?m.158358 +\n      Finset.card\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        ?m.158415 =\n    stepBound (Finset.card P.parts)\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                          1)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                        1) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158415\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                        Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158358\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nrotate_left\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                          1)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                        1) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158415\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                        Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158358\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        ?m.158358 +\n      Finset.card\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        ?m.158415 =\n    stepBound (Finset.card P.parts)\n[PROOFSTEP]\nany_goals exact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                          1)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                        1) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158415\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ℕ\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ ∀\n    (x :\n      { x //\n        x ∈\n          filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts) }),\n    x ∈\n        attach\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) →\n      Finset.card\n          (equitabilise\n              (_ :\n                (4 ^ Finset.card P.parts -\n                        (Fintype.card α / Finset.card P.parts -\n                          Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) *\n                      (Fintype.card α / stepBound (Finset.card P.parts)) +\n                    (Fintype.card α / Finset.card P.parts -\n                        Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) *\n                      (Fintype.card α / stepBound (Finset.card P.parts) + 1) =\n                  Finset.card ↑↑x)).parts =\n        ?m.158358\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        (4 ^ Finset.card P.parts -\n            (Fintype.card α / Finset.card P.parts -\n              Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) +\n          (Fintype.card α / Finset.card P.parts -\n            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) +\n      Finset.card\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        (4 ^ Finset.card P.parts -\n            (Fintype.card α / Finset.card P.parts -\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n              1) +\n          (Fintype.card α / Finset.card P.parts -\n              Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n            1)) =\n    stepBound (Finset.card P.parts)\n[PROOFSTEP]\nexact fun x hx => card_parts_equitabilise _ _ (Nat.div_pos hPα' hPpos).ne'\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        (4 ^ Finset.card P.parts -\n            (Fintype.card α / Finset.card P.parts -\n              Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts) +\n          (Fintype.card α / Finset.card P.parts -\n            Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts)) +\n      Finset.card\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) *\n        (4 ^ Finset.card P.parts -\n            (Fintype.card α / Finset.card P.parts -\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n              1) +\n          (Fintype.card α / Finset.card P.parts -\n              Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n            1)) =\n    stepBound (Finset.card P.parts)\n[PROOFSTEP]\nrw [Nat.sub_add_cancel a_add_one_le_four_pow_parts_card,\n  Nat.sub_add_cancel ((Nat.le_succ _).trans a_add_one_le_four_pow_parts_card), ← add_mul]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ (Finset.card\n          (filter\n            (fun x =>\n              Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts)) +\n        Finset.card\n          (filter\n            (fun x =>\n              ¬Finset.card ↑x =\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                    (Fintype.card α / Finset.card P.parts -\n                      Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n            (attach P.parts))) *\n      4 ^ Finset.card P.parts =\n    stepBound (Finset.card P.parts)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhPα' : stepBound (Finset.card P.parts) ≤ Fintype.card α\nhPpos : 0 < stepBound (Finset.card P.parts)\n⊢ Finset.card\n        (filter\n          (fun x =>\n            Finset.card ↑x =\n              Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                (Fintype.card α / Finset.card P.parts -\n                  Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n          (attach P.parts)) +\n      Finset.card\n        (filter\n          (fun x =>\n            ¬Finset.card ↑x =\n                Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts +\n                  (Fintype.card α / Finset.card P.parts -\n                    Fintype.card α / stepBound (Finset.card P.parts) * 4 ^ Finset.card P.parts))\n          (attach P.parts)) =\n    Finset.card P.parts\n[PROOFSTEP]\nrw [filter_card_add_filter_neg_card_eq_card, card_attach]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG✝ : SimpleGraph α\nε✝ : ℝ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ IsEquipartition (increment hP G ε)\n[PROOFSTEP]\nsimp_rw [IsEquipartition, Set.equitableOn_iff_exists_eq_eq_add_one]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG✝ : SimpleGraph α\nε✝ : ℝ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ ∃ b, ∀ (a : Finset α), a ∈ ↑(increment hP G ε).parts → Finset.card a = b ∨ Finset.card a = b + 1\n[PROOFSTEP]\nrefine' ⟨m, fun A hA => _⟩\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG✝ : SimpleGraph α\nε✝ : ℝ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nA : Finset α\nhA : A ∈ ↑(increment hP G ε).parts\n⊢ Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) ∨\n    Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) + 1\n[PROOFSTEP]\nrw [mem_coe, increment, mem_bind] at hA \n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG✝ : SimpleGraph α\nε✝ : ℝ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nA : Finset α\nhA : ∃ A_1 hA, A ∈ (chunk hP G ε hA).parts\n⊢ Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) ∨\n    Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) + 1\n[PROOFSTEP]\nobtain ⟨U, hU, hA⟩ := hA\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG✝ : SimpleGraph α\nε✝ : ℝ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nA U : Finset α\nhU : U ∈ P.parts\nhA : A ∈ (chunk hP G ε hU).parts\n⊢ Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) ∨\n    Finset.card A = Fintype.card α / stepBound (Finset.card P.parts) + 1\n[PROOFSTEP]\nexact card_eq_of_mem_parts_chunk hA\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ (Finset.biUnion (attach (offDiag P.parts)) fun UV =>\n      (chunk hP G ε (_ : (↑UV).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑UV).snd ∈ P.parts)).parts) ⊆\n    offDiag (increment hP G ε).parts\n[PROOFSTEP]\nrintro ⟨Ui, Vj⟩\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nUi Vj : Finset α\n⊢ ((Ui, Vj) ∈\n      Finset.biUnion (attach (offDiag P.parts)) fun UV =>\n        (chunk hP G ε (_ : (↑UV).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑UV).snd ∈ P.parts)).parts) →\n    (Ui, Vj) ∈ offDiag (increment hP G ε).parts\n[PROOFSTEP]\nsimp only [increment, mem_offDiag, bind_parts, mem_biUnion, Prod.exists, exists_and_left, exists_prop, mem_product,\n  mem_attach, true_and_iff, Subtype.exists, and_imp, mem_offDiag, forall_exists_index, bex_imp, Ne.def]\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nUi Vj : Finset α\n⊢ ∀ (x x_1 : Finset α) (x_2 : x ∈ P.parts ∧ x_1 ∈ P.parts ∧ ¬x = x_1),\n    Ui ∈ (chunk hP G ε (_ : (↑{ val := (x, x_1), property := (_ : (x, x_1) ∈ offDiag P.parts) }).fst ∈ P.parts)).parts →\n      Vj ∈\n          (chunk hP G ε\n              (_ : (↑{ val := (x, x_1), property := (_ : (x, x_1) ∈ offDiag P.parts) }).snd ∈ P.parts)).parts →\n        (∃ a h, Ui ∈ (chunk hP G ε (_ : ↑{ val := a, property := (_ : a ∈ P.parts) } ∈ P.parts)).parts) ∧\n          (∃ a h, Vj ∈ (chunk hP G ε (_ : ↑{ val := a, property := (_ : a ∈ P.parts) } ∈ P.parts)).parts) ∧ ¬Ui = Vj\n[PROOFSTEP]\nrefine' fun U V hUV hUi hVj => ⟨⟨_, hUV.1, hUi⟩, ⟨_, hUV.2.1, hVj⟩, _⟩\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nUi Vj U V : Finset α\nhUV : U ∈ P.parts ∧ V ∈ P.parts ∧ ¬U = V\nhUi : Ui ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).fst ∈ P.parts)).parts\nhVj : Vj ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).snd ∈ P.parts)).parts\n⊢ ¬Ui = Vj\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nUi U V : Finset α\nhUV : U ∈ P.parts ∧ V ∈ P.parts ∧ ¬U = V\nhUi : Ui ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).fst ∈ P.parts)).parts\nhVj : Ui ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).snd ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nobtain ⟨i, hi⟩ := nonempty_of_mem_parts _ hUi\n[GOAL]\ncase mk.intro\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\nUi U V : Finset α\nhUV : U ∈ P.parts ∧ V ∈ P.parts ∧ ¬U = V\nhUi : Ui ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).fst ∈ P.parts)).parts\nhVj : Ui ∈ (chunk hP G ε (_ : (↑{ val := (U, V), property := (_ : (U, V) ∈ offDiag P.parts) }).snd ∈ P.parts)).parts\ni : α\nhi : i ∈ Ui\n⊢ False\n[PROOFSTEP]\nexact hUV.2.2 (P.disjoint.elim_finset hUV.1 hUV.2.1 i (Finpartition.le _ hUi hi) <| Finpartition.le _ hVj hi)\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ ∑ x in attach (offDiag P.parts),\n      SzemerediRegularity.pairContrib G ε hP x / ↑(Finset.card (increment hP G ε).parts) ^ 2 ≤\n    energy (increment hP G ε) G\n[PROOFSTEP]\nsimp_rw [pairContrib, ← sum_div]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ (∑ x in attach (offDiag P.parts),\n        ∑ i in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n          edgeDensity G i.fst i.snd ^ 2) /\n      ↑(Finset.card (increment hP G ε).parts) ^ 2 ≤\n    energy (increment hP G ε) G\n[PROOFSTEP]\nrefine' div_le_div_of_le_of_nonneg (α := ℚ) _ (sq_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ ∑ x in attach (offDiag P.parts),\n      ∑ i in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n        edgeDensity G i.fst i.snd ^ 2 ≤\n    ∑ uv in offDiag (increment hP G ε).parts, edgeDensity G uv.fst uv.snd ^ 2\n[PROOFSTEP]\nrw [← sum_biUnion]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ ∑ x in\n      Finset.biUnion (attach (offDiag P.parts)) fun x =>\n        (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n      edgeDensity G x.fst x.snd ^ 2 ≤\n    ∑ uv in offDiag (increment hP G ε).parts, edgeDensity G uv.fst uv.snd ^ 2\n[PROOFSTEP]\nexact sum_le_sum_of_subset_of_nonneg distinct_pairs_increment fun i _ _ => sq_nonneg _\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ Set.PairwiseDisjoint ↑(attach (offDiag P.parts)) fun x =>\n    (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts\n[PROOFSTEP]\nsimp only [Set.PairwiseDisjoint, Function.onFun, disjoint_left, inf_eq_inter, mem_inter, mem_product]\n[GOAL]\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\n⊢ Set.Pairwise ↑(attach (offDiag P.parts)) fun x y =>\n    ∀ ⦃a : Finset α × Finset α⦄,\n      a.fst ∈ (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ∧ a.snd ∈ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts →\n        ¬(a.fst ∈ (chunk hP G ε (_ : (↑y).fst ∈ P.parts)).parts ∧ a.snd ∈ (chunk hP G ε (_ : (↑y).snd ∈ P.parts)).parts)\n[PROOFSTEP]\nrintro ⟨⟨s₁, s₂⟩, hs⟩ _ ⟨⟨t₁, t₂⟩, ht⟩ _ hst ⟨u, v⟩ huv₁ huv₂\n[GOAL]\ncase mk.mk.mk.mk.mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ns₁ s₂ : Finset α\nhs : (s₁, s₂) ∈ offDiag P.parts\na✝¹ : { val := (s₁, s₂), property := hs } ∈ ↑(attach (offDiag P.parts))\nt₁ t₂ : Finset α\nht : (t₁, t₂) ∈ offDiag P.parts\na✝ : { val := (t₁, t₂), property := ht } ∈ ↑(attach (offDiag P.parts))\nhst : { val := (s₁, s₂), property := hs } ≠ { val := (t₁, t₂), property := ht }\nu v : Finset α\nhuv₁ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs }).snd ∈ P.parts)).parts\nhuv₂ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht }).snd ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nrw [mem_offDiag] at hs ht \n[GOAL]\ncase mk.mk.mk.mk.mk\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ns₁ s₂ : Finset α\nhs✝ : (s₁, s₂) ∈ offDiag P.parts\nhs : (s₁, s₂).fst ∈ P.parts ∧ (s₁, s₂).snd ∈ P.parts ∧ (s₁, s₂).fst ≠ (s₁, s₂).snd\na✝¹ : { val := (s₁, s₂), property := hs✝ } ∈ ↑(attach (offDiag P.parts))\nt₁ t₂ : Finset α\nht✝ : (t₁, t₂) ∈ offDiag P.parts\nht : (t₁, t₂).fst ∈ P.parts ∧ (t₁, t₂).snd ∈ P.parts ∧ (t₁, t₂).fst ≠ (t₁, t₂).snd\na✝ : { val := (t₁, t₂), property := ht✝ } ∈ ↑(attach (offDiag P.parts))\nhst : { val := (s₁, s₂), property := hs✝ } ≠ { val := (t₁, t₂), property := ht✝ }\nu v : Finset α\nhuv₁ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).snd ∈ P.parts)).parts\nhuv₂ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).snd ∈ P.parts)).parts\n⊢ False\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := Finpartition.nonempty_of_mem_parts _ huv₁.1\n[GOAL]\ncase mk.mk.mk.mk.mk.intro\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ns₁ s₂ : Finset α\nhs✝ : (s₁, s₂) ∈ offDiag P.parts\nhs : (s₁, s₂).fst ∈ P.parts ∧ (s₁, s₂).snd ∈ P.parts ∧ (s₁, s₂).fst ≠ (s₁, s₂).snd\na✝¹ : { val := (s₁, s₂), property := hs✝ } ∈ ↑(attach (offDiag P.parts))\nt₁ t₂ : Finset α\nht✝ : (t₁, t₂) ∈ offDiag P.parts\nht : (t₁, t₂).fst ∈ P.parts ∧ (t₁, t₂).snd ∈ P.parts ∧ (t₁, t₂).fst ≠ (t₁, t₂).snd\na✝ : { val := (t₁, t₂), property := ht✝ } ∈ ↑(attach (offDiag P.parts))\nhst : { val := (s₁, s₂), property := hs✝ } ≠ { val := (t₁, t₂), property := ht✝ }\nu v : Finset α\nhuv₁ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).snd ∈ P.parts)).parts\nhuv₂ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).snd ∈ P.parts)).parts\na : α\nha : a ∈ (u, v).fst\n⊢ False\n[PROOFSTEP]\nobtain ⟨b, hb⟩ := Finpartition.nonempty_of_mem_parts _ huv₁.2\n[GOAL]\ncase mk.mk.mk.mk.mk.intro.intro\nα : Type u_1\ninst✝ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ns₁ s₂ : Finset α\nhs✝ : (s₁, s₂) ∈ offDiag P.parts\nhs : (s₁, s₂).fst ∈ P.parts ∧ (s₁, s₂).snd ∈ P.parts ∧ (s₁, s₂).fst ≠ (s₁, s₂).snd\na✝¹ : { val := (s₁, s₂), property := hs✝ } ∈ ↑(attach (offDiag P.parts))\nt₁ t₂ : Finset α\nht✝ : (t₁, t₂) ∈ offDiag P.parts\nht : (t₁, t₂).fst ∈ P.parts ∧ (t₁, t₂).snd ∈ P.parts ∧ (t₁, t₂).fst ≠ (t₁, t₂).snd\na✝ : { val := (t₁, t₂), property := ht✝ } ∈ ↑(attach (offDiag P.parts))\nhst : { val := (s₁, s₂), property := hs✝ } ≠ { val := (t₁, t₂), property := ht✝ }\nu v : Finset α\nhuv₁ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (s₁, s₂), property := hs✝ }).snd ∈ P.parts)).parts\nhuv₂ :\n  (u, v).fst ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).fst ∈ P.parts)).parts ∧\n    (u, v).snd ∈ (chunk hP G ε (_ : (↑{ val := (t₁, t₂), property := ht✝ }).snd ∈ P.parts)).parts\na : α\nha : a ∈ (u, v).fst\nb : α\nhb : b ∈ (u, v).snd\n⊢ False\n[PROOFSTEP]\nexact\n  hst\n    (Subtype.ext_val <|\n      Prod.ext (P.disjoint.elim_finset hs.1 ht.1 a (Finpartition.le _ huv₁.1 ha) <| Finpartition.le _ huv₂.1 ha) <|\n        P.disjoint.elim_finset hs.2.1 ht.2.1 b (Finpartition.le _ huv₁.2 hb) <| Finpartition.le _ huv₂.2 hb)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\n⊢ (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n      if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) ≤\n    ↑(SzemerediRegularity.pairContrib G ε hP x) / 16 ^ Finset.card P.parts\n[PROOFSTEP]\nrw [pairContrib]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\n⊢ (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n      if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) ≤\n    ↑(∑ i in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n          edgeDensity G i.fst i.snd ^ 2) /\n      16 ^ Finset.card P.parts\n[PROOFSTEP]\npush_cast\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\n⊢ (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n      if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) ≤\n    (∑ x in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n        ↑(edgeDensity G x.fst x.snd) ^ 2) /\n      16 ^ Finset.card P.parts\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nh : SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd\n⊢ ↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 + 0 ≤\n    (∑ x in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n        ↑(edgeDensity G x.fst x.snd) ^ 2) /\n      16 ^ Finset.card P.parts\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\ncase pos\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nh : SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd\n⊢ ↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 ≤\n    (∑ x in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n        ↑(edgeDensity G x.fst x.snd) ^ 2) /\n      16 ^ Finset.card P.parts\n[PROOFSTEP]\nexact edgeDensity_chunk_uniform hPα hPε _ _\n[GOAL]\ncase neg\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nx : { i // i ∈ offDiag P.parts }\nhε₁ : ε ≤ 1\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nh : ¬SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd\n⊢ ↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 + ε ^ 4 / 3 ≤\n    (∑ x in (chunk hP G ε (_ : (↑x).fst ∈ P.parts)).parts ×ˢ (chunk hP G ε (_ : (↑x).snd ∈ P.parts)).parts,\n        ↑(edgeDensity G x.fst x.snd) ^ 2) /\n      16 ^ Finset.card P.parts\n[PROOFSTEP]\nexact edgeDensity_chunk_not_uniform hPα hPε hε₁ (mem_offDiag.1 x.2).2.2 h\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4)) /\n      ↑(Finset.card P.parts) ^ 2 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n[PROOFSTEP]\nconv_rhs =>\n  rw [← sum_div, card_increment hPα hPG, stepBound, ← Nat.cast_pow, mul_pow, pow_right_comm, Nat.cast_mul, mul_comm, ←\n    div_div, show 4 ^ 2 = 16 by norm_num, sum_div]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n| ∑ x in attach (offDiag P.parts),\n    ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n[PROOFSTEP]\nrw [← sum_div, card_increment hPα hPG, stepBound, ← Nat.cast_pow, mul_pow, pow_right_comm, Nat.cast_mul, mul_comm, ←\n    div_div, show 4 ^ 2 = 16 by norm_num, sum_div]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n| ∑ x in attach (offDiag P.parts),\n    ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n[PROOFSTEP]\nrw [← sum_div, card_increment hPα hPG, stepBound, ← Nat.cast_pow, mul_pow, pow_right_comm, Nat.cast_mul, mul_comm, ←\n    div_div, show 4 ^ 2 = 16 by norm_num, sum_div]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n| ∑ x in attach (offDiag P.parts),\n    ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n[PROOFSTEP]\nrw [← sum_div, card_increment hPα hPG, stepBound, ← Nat.cast_pow, mul_pow, pow_right_comm, Nat.cast_mul, mul_comm, ←\n  div_div, show 4 ^ 2 = 16 by norm_num, sum_div]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ 4 ^ 2 = 16\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4)) /\n      ↑(Finset.card P.parts) ^ 2 ≤\n    (∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(16 ^ Finset.card P.parts)) /\n      ↑(Finset.card P.parts ^ 2)\n[PROOFSTEP]\nrw [← Nat.cast_pow, Nat.cast_pow 16]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts ^ 2) * (ε ^ 5 / 4)) /\n      ↑(Finset.card P.parts ^ 2) ≤\n    (∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑16 ^ Finset.card P.parts) /\n      ↑(Finset.card P.parts ^ 2)\n[PROOFSTEP]\nrefine' div_le_div_of_le_of_nonneg _ (Nat.cast_nonneg _)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts ^ 2) * (ε ^ 5 / 4) ≤\n    ∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑16 ^ Finset.card P.parts\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / 16 ^ Finset.card P.parts\n[PROOFSTEP]\ntrans\n  ∑ x in P.parts.offDiag.attach,\n    ((G.edgeDensity x.1.1 x.1.2 : ℝ) ^ 2 - ε ^ 5 / ↑25 + if G.IsUniform ε x.1.1 x.1.2 then (0 : ℝ) else ε ^ 4 / 3 : ℝ)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3)\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) ≤\n    ∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / 16 ^ Finset.card P.parts\n[PROOFSTEP]\nswap\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) ≤\n    ∑ x in attach (offDiag P.parts), ↑(SzemerediRegularity.pairContrib G ε hP x) / 16 ^ Finset.card P.parts\n[PROOFSTEP]\nexact sum_le_sum fun i _ => pairContrib_lower_bound i hε₁ hPα hPε\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3)\n[PROOFSTEP]\nhave :\n  ∑ x in P.parts.offDiag.attach,\n      ((G.edgeDensity x.1.1 x.1.2 : ℝ) ^ 2 - ε ^ 5 / ↑25 + if G.IsUniform ε x.1.1 x.1.2 then (0 : ℝ) else ε ^ 4 / 3 :\n        ℝ) =\n    ∑ x in P.parts.offDiag,\n      ((G.edgeDensity x.1 x.2 : ℝ) ^ 2 - ε ^ 5 / ↑25 + if G.IsUniform ε x.1 x.2 then (0 : ℝ) else ε ^ 4 / 3) :=\n  by convert sum_attach (β := ℝ); rfl\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\n⊢ ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n[PROOFSTEP]\nconvert sum_attach (β := ℝ)\n[GOAL]\ncase h.e'_2.a\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\nx✝ : { x // x ∈ offDiag P.parts }\na✝ : x✝ ∈ attach (offDiag P.parts)\n⊢ (↑(edgeDensity G (↑x✝).fst (↑x✝).snd) ^ 2 - ε ^ 5 / 25 +\n      if SimpleGraph.IsUniform G ε (↑x✝).fst (↑x✝).snd then 0 else ε ^ 4 / 3) =\n    ↑(edgeDensity G (↑x✝).fst (↑x✝).snd) ^ 2 - ε ^ 5 / 25 +\n      if SimpleGraph.IsUniform G ε (↑x✝).fst (↑x✝).snd then 0 else ε ^ 4 / 3\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3)\n[PROOFSTEP]\nrw [this, sum_add_distrib, sum_sub_distrib, sum_const, nsmul_eq_mul, sum_ite, sum_const_zero, zero_add, sum_const,\n  nsmul_eq_mul, ← Finpartition.nonUniforms]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ¬Finpartition.IsUniform P G ε\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n      ↑(Finset.card (nonUniforms P G ε)) * (ε ^ 4 / 3)\n[PROOFSTEP]\nrw [Finpartition.IsUniform, not_le] at hPG \n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n      ↑(Finset.card (nonUniforms P G ε)) * (ε ^ 4 / 3)\n[PROOFSTEP]\nrefine' le_trans _ (add_le_add_left (mul_le_mul_of_nonneg_right hPG.le <| by positivity) _)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ 0 ≤ ε ^ 4 / 3\n[PROOFSTEP]\npositivity\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n      ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε * (ε ^ 4 / 3)\n[PROOFSTEP]\nconv_rhs =>\n  enter [1, 2]\n  rw [offDiag_card]\n  conv => enter [1, 1, 2]; rw [← mul_one P.parts.card]\n  rw [← Nat.mul_sub_left_distrib]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n    ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε * (ε ^ 4 / 3)\n[PROOFSTEP]\n  enter [1, 2]\n  rw [offDiag_card]\n  conv => enter [1, 1, 2]; rw [← mul_one P.parts.card]\n  rw [← Nat.mul_sub_left_distrib]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n    ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε * (ε ^ 4 / 3)\n[PROOFSTEP]\n  enter [1, 2]\n  rw [offDiag_card]\n  conv => enter [1, 1, 2]; rw [← mul_one P.parts.card]\n  rw [← Nat.mul_sub_left_distrib]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 - ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25) +\n    ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε * (ε ^ 4 / 3)\n[PROOFSTEP]\nenter [1, 2]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ↑(Finset.card (offDiag P.parts)) * (ε ^ 5 / 25)\n[PROOFSTEP]\nrw [offDiag_card]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ↑(Finset.card P.parts * Finset.card P.parts - Finset.card P.parts) * (ε ^ 5 / 25)\n[PROOFSTEP]\nconv => enter [1, 1, 2]; rw [← mul_one P.parts.card]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ↑(Finset.card P.parts * Finset.card P.parts - Finset.card P.parts) * (ε ^ 5 / 25)\n[PROOFSTEP]\nenter [1, 1, 2]; rw [← mul_one P.parts.card]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ↑(Finset.card P.parts * Finset.card P.parts - Finset.card P.parts) * (ε ^ 5 / 25)\n[PROOFSTEP]\nenter [1, 1, 2]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| Finset.card P.parts\n[PROOFSTEP]\nrw [← mul_one P.parts.card]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n| ↑(Finset.card P.parts * Finset.card P.parts - Finset.card P.parts * 1) * (ε ^ 5 / 25)\n[PROOFSTEP]\nrw [← Nat.mul_sub_left_distrib]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) ≤\n    ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 -\n        ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * (ε ^ 5 / 25) +\n      ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε * (ε ^ 4 / 3)\n[PROOFSTEP]\nsimp_rw [mul_assoc, sub_add_eq_add_sub, add_sub_assoc, ← mul_sub_left_distrib, mul_div_assoc' ε, ← pow_succ,\n  show 4 + 1 = 5 by rfl, div_eq_mul_one_div (ε ^ 5), ← mul_sub_left_distrib, mul_left_comm _ (ε ^ 5), sq, Nat.cast_mul,\n  mul_assoc, ← mul_assoc (ε ^ 5)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ 4 + 1 = 5\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) * ↑(edgeDensity G x.fst x.snd) +\n      ε ^ 5 * ↑(Finset.card P.parts) * (↑(Finset.card P.parts) * (1 / 4)) ≤\n    ∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) * ↑(edgeDensity G x.fst x.snd) +\n      ε ^ 5 * ↑(Finset.card P.parts) * (↑(Finset.card P.parts - 1) * (1 / 3 - 1 / 25))\n[PROOFSTEP]\nrefine' add_le_add_left (mul_le_mul_of_nonneg_left _ <| by sz_positivity) _\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ 0 ≤ ε ^ 5 * ↑(Finset.card P.parts)\n[PROOFSTEP]\nsz_positivity\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ ↑(Finset.card P.parts) * (1 / 4) ≤ ↑(Finset.card P.parts - 1) * (1 / 3 - 1 / 25)\n[PROOFSTEP]\nrw [Nat.cast_sub (P.parts_nonempty <| univ_nonempty.ne_empty).card_pos, mul_sub_right_distrib, Nat.cast_one, one_mul,\n  le_sub_comm, ← mul_sub_left_distrib, ← div_le_iff (show (0 : ℝ) < 1 / 3 - 1 / 25 - 1 / 4 by norm_num)]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ 0 < 1 / 3 - 1 / 25 - 1 / 4\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ (1 / 3 - 1 / 25) / (1 / 3 - 1 / 25 - 1 / 4) ≤ ↑(Finset.card P.parts)\n[PROOFSTEP]\nexact le_trans (show _ ≤ (7 : ℝ) by norm_num) (by exact_mod_cast hP₇)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ (1 / 3 - 1 / 25) / (1 / 3 - 1 / 25 - 1 / 4) ≤ 7\n[PROOFSTEP]\nnorm_num\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhε₁ : ε ≤ 1\nhP₇ : 7 ≤ Finset.card P.parts\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPε : 100 ≤ 4 ^ Finset.card P.parts * ε ^ 5\nhPG : ↑(Finset.card P.parts * (Finset.card P.parts - 1)) * ε < ↑(Finset.card (nonUniforms P G ε))\nthis :\n  ∑ x in attach (offDiag P.parts),\n      (↑(edgeDensity G (↑x).fst (↑x).snd) ^ 2 - ε ^ 5 / 25 +\n        if SimpleGraph.IsUniform G ε (↑x).fst (↑x).snd then 0 else ε ^ 4 / 3) =\n    ∑ x in offDiag P.parts,\n      (↑(edgeDensity G x.fst x.snd) ^ 2 - ε ^ 5 / 25 + if SimpleGraph.IsUniform G ε x.fst x.snd then 0 else ε ^ 4 / 3)\n⊢ 7 ≤ ↑(Finset.card P.parts)\n[PROOFSTEP]\nexact_mod_cast hP₇\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\n⊢ ↑(energy P G) + ε ^ 5 / 4 ≤ ↑(energy (increment hP G ε) G)\n[PROOFSTEP]\nrw [coe_energy]\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\n⊢ (∑ uv in offDiag P.parts, ↑(edgeDensity G uv.fst uv.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 + ε ^ 5 / 4 ≤\n    ↑(energy (increment hP G ε) G)\n[PROOFSTEP]\nhave h := uniform_add_nonuniform_eq_offDiag_pairs (hP := hP) hε₁ hP₇ hPα hε.le hPG\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\nh :\n  (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2 + ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4)) /\n      ↑(Finset.card P.parts) ^ 2 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n⊢ (∑ uv in offDiag P.parts, ↑(edgeDensity G uv.fst uv.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 + ε ^ 5 / 4 ≤\n    ↑(energy (increment hP G ε) G)\n[PROOFSTEP]\nrw [add_div, mul_div_cancel_left] at h \n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\nh :\n  (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 + ε ^ 5 / 4 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n⊢ (∑ uv in offDiag P.parts, ↑(edgeDensity G uv.fst uv.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 + ε ^ 5 / 4 ≤\n    ↑(energy (increment hP G ε) G)\ncase ha\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\nh :\n  (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 +\n      ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) / ↑(Finset.card P.parts) ^ 2 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n⊢ ↑(Finset.card P.parts) ^ 2 ≠ 0\n[PROOFSTEP]\nexact h.trans (by exact_mod_cast offDiag_pairs_le_increment_energy)\n[GOAL]\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\nh :\n  (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 + ε ^ 5 / 4 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n⊢ ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2 ≤\n    ↑(energy (increment hP G ε) G)\n[PROOFSTEP]\nexact_mod_cast offDiag_pairs_le_increment_energy\n[GOAL]\ncase ha\nα : Type u_1\ninst✝¹ : Fintype α\nP : Finpartition univ\nhP✝ : IsEquipartition P\nG : SimpleGraph α\nε : ℝ\ninst✝ : Nonempty α\nhP : IsEquipartition P\nhP₇ : 7 ≤ Finset.card P.parts\nhε : 100 < 4 ^ Finset.card P.parts * ε ^ 5\nhPα : Finset.card P.parts * 16 ^ Finset.card P.parts ≤ Fintype.card α\nhPG : ¬Finpartition.IsUniform P G ε\nhε₁ : ε ≤ 1\nh :\n  (∑ x in offDiag P.parts, ↑(edgeDensity G x.fst x.snd) ^ 2) / ↑(Finset.card P.parts) ^ 2 +\n      ↑(Finset.card P.parts) ^ 2 * (ε ^ 5 / 4) / ↑(Finset.card P.parts) ^ 2 ≤\n    ∑ x in attach (offDiag P.parts),\n      ↑(SzemerediRegularity.pairContrib G ε hP x) / ↑(Finset.card (increment hP G ε).parts) ^ 2\n⊢ ↑(Finset.card P.parts) ^ 2 ≠ 0\n[PROOFSTEP]\npositivity\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SimpleGraph.Regularity.Increment", "llama_tokens": 37618, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6442251201477016, "lm_q2_score": 0.411110869232168, "lm_q1q2_score": 0.2648479491251195}}
{"text": "[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\ns t : Set α\na : α\nx : α × α\n⊢ Prod.swap x ∈ mulAntidiagonal s t a ↔ x ∈ mulAntidiagonal t s a\n[PROOFSTEP]\nsimp [mul_comm, and_left_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CommSemigroup α\ns t : Set α\na : α\nx : α × α\n⊢ x.snd ∈ s ∧ x.fst ∈ t ∧ x.snd * x.fst = a ↔ x ∈ mulAntidiagonal t s a\n[PROOFSTEP]\nsimp [mul_comm, and_left_comm]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoid α\ns t : Set α\na : α\nx y : ↑(mulAntidiagonal s t a)\nh : (↑x).fst = (↑y).fst\n⊢ a = (↑y).fst * (↑x).snd\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoid α\ns t : Set α\na : α\nx y : ↑(mulAntidiagonal s t a)\nh : (↑x).fst = (↑y).fst\n⊢ a = (↑x).fst * (↑x).snd\n[PROOFSTEP]\nexact x.2.2.2.symm\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoid α\ns t : Set α\na : α\nx y : ↑(mulAntidiagonal s t a)\nh : (↑x).snd = (↑y).snd\n⊢ a = (↑x).fst * (↑y).snd\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\ninst✝ : CancelCommMonoid α\ns t : Set α\na : α\nx y : ↑(mulAntidiagonal s t a)\nh : (↑x).snd = (↑y).snd\n⊢ a = (↑x).fst * (↑x).snd\n[PROOFSTEP]\nexact x.2.2.2.symm\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\n⊢ Set.Finite (mulAntidiagonal s t a)\n[PROOFSTEP]\nrefine' not_infinite.1 fun h => _\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\n⊢ False\n[PROOFSTEP]\nhave h1 : (mulAntidiagonal s t a).PartiallyWellOrderedOn (Prod.fst ⁻¹'o (· ≤ ·)) := fun f hf =>\n  hs (Prod.fst ∘ f) fun n => (mem_mulAntidiagonal.1 (hf n)).1\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\nh1 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1)\n⊢ False\n[PROOFSTEP]\nhave h2 : (mulAntidiagonal s t a).PartiallyWellOrderedOn (Prod.snd ⁻¹'o (· ≤ ·)) := fun f hf =>\n  ht (Prod.snd ∘ f) fun n => (mem_mulAntidiagonal.1 (hf n)).2.1\n[GOAL]\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\nh1 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1)\nh2 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1)\n⊢ False\n[PROOFSTEP]\nobtain ⟨g, hg⟩ := h1.exists_monotone_subseq (fun n => h.natEmbedding _ n) fun n => (h.natEmbedding _ n).2\n[GOAL]\ncase intro\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\nh1 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1)\nh2 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1)\ng : ℕ ↪o ℕ\nhg :\n  ∀ (m n : ℕ),\n    m ≤ n →\n      (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1) ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m))\n        ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n))\n⊢ False\n[PROOFSTEP]\nobtain ⟨m, n, mn, h2'⟩ := h2 (fun x => (h.natEmbedding _) (g x)) fun n => (h.natEmbedding _ _).2\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\nh1 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1)\nh2 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1)\ng : ℕ ↪o ℕ\nhg :\n  ∀ (m n : ℕ),\n    m ≤ n →\n      (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1) ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m))\n        ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n))\nm n : ℕ\nmn : m < n\nh2' :\n  (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1) ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m))\n    ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n))\n⊢ False\n[PROOFSTEP]\nrefine' mn.ne (g.injective <| (h.natEmbedding _).injective _)\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\ninst✝ : OrderedCancelCommMonoid α\ns t : Set α\na✝ : α\nx y : ↑(mulAntidiagonal s t a✝)\nhs : IsPwo s\nht : IsPwo t\na : α\nh : Set.Infinite (mulAntidiagonal s t a)\nh1 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1)\nh2 : PartiallyWellOrderedOn (mulAntidiagonal s t a) (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1)\ng : ℕ ↪o ℕ\nhg :\n  ∀ (m n : ℕ),\n    m ≤ n →\n      (Prod.fst ⁻¹'o fun x x_1 => x ≤ x_1) ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m))\n        ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n))\nm n : ℕ\nmn : m < n\nh2' :\n  (Prod.snd ⁻¹'o fun x x_1 => x ≤ x_1) ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m))\n    ↑(↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n))\n⊢ ↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g m) = ↑(Infinite.natEmbedding (mulAntidiagonal s t a) h) (↑g n)\n[PROOFSTEP]\nexact eq_of_fst_le_fst_of_snd_le_snd _ _ _ (hg _ _ mn.le) h2'\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.MulAntidiagonal", "llama_tokens": 2683, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5506073802837478, "lm_q2_score": 0.480478678047907, "lm_q1q2_score": 0.26455510620215633}}
{"text": "[GOAL]\nα : Type u\nl : Thunk (List α)\nt : List α\n⊢ (fun xs => Thunk.get l ++ xs) t = (fun xs => Thunk.get l ++ xs) [] ++ t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl : List α\n⊢ toList (ofList l) = l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u\n⊢ toList (ofList []) = []\ncase cons α : Type u head✝ : α tail✝ : List α ⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u\nhead✝ : α\ntail✝ : List α\n⊢ toList (ofList (head✝ :: tail✝)) = head✝ :: tail✝\n[PROOFSTEP]\nsimp only [DList.toList, DList.ofList, List.cons_append, List.append_nil]\n[GOAL]\nα : Type u\nl : DList α\n⊢ ofList (toList l) = l\n[PROOFSTEP]\ncases' l with app inv\n[GOAL]\ncase mk\nα : Type u\napp : List α → List α\ninv : ∀ (l : List α), app l = app [] ++ l\n⊢ ofList (toList { apply := app, invariant := inv }) = { apply := app, invariant := inv }\n[PROOFSTEP]\nsimp only [ofList, toList, mk.injEq]\n[GOAL]\ncase mk\nα : Type u\napp : List α → List α\ninv : ∀ (l : List α), app l = app [] ++ l\n⊢ (fun x => app [] ++ x) = app\n[PROOFSTEP]\nfunext x\n[GOAL]\ncase mk.h\nα : Type u\napp : List α → List α\ninv : ∀ (l : List α), app l = app [] ++ l\nx : List α\n⊢ app [] ++ x = app x\n[PROOFSTEP]\nrw [(inv x)]\n[GOAL]\nα : Type u\n⊢ toList empty = []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nx : α\n⊢ toList (singleton x) = [x]\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nl₁ l₂ : DList α\n⊢ toList (append l₁ l₂) = toList l₁ ++ toList l₂\n[PROOFSTEP]\ncases' l₁ with _ l₁_invariant\n[GOAL]\ncase mk\nα : Type u\nl₂ : DList α\napply✝ : List α → List α\nl₁_invariant : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ toList (append { apply := apply✝, invariant := l₁_invariant } l₂) =\n    toList { apply := apply✝, invariant := l₁_invariant } ++ toList l₂\n[PROOFSTEP]\ncases' l₂\n[GOAL]\ncase mk.mk\nα : Type u\napply✝¹ : List α → List α\nl₁_invariant : ∀ (l : List α), apply✝¹ l = apply✝¹ [] ++ l\napply✝ : List α → List α\ninvariant✝ : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ toList (append { apply := apply✝¹, invariant := l₁_invariant } { apply := apply✝, invariant := invariant✝ }) =\n    toList { apply := apply✝¹, invariant := l₁_invariant } ++ toList { apply := apply✝, invariant := invariant✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk.mk\nα : Type u\napply✝¹ : List α → List α\nl₁_invariant : ∀ (l : List α), apply✝¹ l = apply✝¹ [] ++ l\napply✝ : List α → List α\ninvariant✝ : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ apply✝¹ (apply✝ []) = apply✝¹ [] ++ apply✝ []\n[PROOFSTEP]\nrw [l₁_invariant]\n[GOAL]\nα : Type u\nx : α\nl : DList α\n⊢ toList (cons x l) = x :: toList l\n[PROOFSTEP]\ncases l\n[GOAL]\ncase mk\nα : Type u\nx : α\napply✝ : List α → List α\ninvariant✝ : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ toList (cons x { apply := apply✝, invariant := invariant✝ }) =\n    x :: toList { apply := apply✝, invariant := invariant✝ }\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nx : α\nl : DList α\n⊢ toList (push l x) = toList l ++ [x]\n[PROOFSTEP]\ncases' l with _ l_invariant\n[GOAL]\ncase mk\nα : Type u\nx : α\napply✝ : List α → List α\nl_invariant : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ toList (push { apply := apply✝, invariant := l_invariant } x) =\n    toList { apply := apply✝, invariant := l_invariant } ++ [x]\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mk\nα : Type u\nx : α\napply✝ : List α → List α\nl_invariant : ∀ (l : List α), apply✝ l = apply✝ [] ++ l\n⊢ apply✝ [x] = apply✝ [] ++ [x]\n[PROOFSTEP]\nrw [l_invariant]\n", "meta": {"mathlib_filename": "Mathlib.Data.DList.Defs", "llama_tokens": 1506, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5506073655352404, "lm_q2_score": 0.480478678047907, "lm_q1q2_score": 0.264555099115813}}
{"text": "[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\n⊢ bind₁ X = AlgHom.id R (MvPolynomial σ R)\n[PROOFSTEP]\next1 i\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\ni : σ\n⊢ ↑(bind₁ X) (X i) = ↑(AlgHom.id R (MvPolynomial σ R)) (X i)\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ f : σ → MvPolynomial τ R\nx : R\n⊢ ↑(bind₁ f) (↑C x) = ↑C x\n[PROOFSTEP]\nsimp [bind₁, algebraMap_eq]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ bind₂ C = RingHom.id (MvPolynomial σ R)\n[PROOFSTEP]\next : 2\n[GOAL]\ncase hC.a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nx✝ : R\n⊢ ↑(RingHom.comp (bind₂ C) C) x✝ = ↑(RingHom.comp (RingHom.id (MvPolynomial σ R)) C) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hX.a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\ni✝ : σ\nm✝ : σ →₀ ℕ\n⊢ coeff m✝ (↑(bind₂ C) (X i✝)) = coeff m✝ (↑(RingHom.id (MvPolynomial σ R)) (X i✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\nφ : MvPolynomial σ R\n⊢ ↑join₂ (↑(map f) φ) = ↑(bind₂ f) φ\n[PROOFSTEP]\nsimp only [join₂, bind₂, eval₂Hom_map_hom, RingHom.id_comp]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ f : σ → MvPolynomial τ R\np : MvPolynomial σ R\n⊢ ↑(aeval id) (↑(rename f) p) = ↑(aeval f) p\n[PROOFSTEP]\nrw [aeval_rename, Function.comp.left_id]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : σ → MvPolynomial τ R\ng : τ → MvPolynomial υ R\nφ : MvPolynomial σ R\n⊢ ↑(bind₁ g) (↑(bind₁ f) φ) = ↑(bind₁ fun i => ↑(bind₁ g) (f i)) φ\n[PROOFSTEP]\nsimp [bind₁, ← comp_aeval]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : σ → MvPolynomial τ R\ng : τ → MvPolynomial υ R\n⊢ AlgHom.comp (bind₁ g) (bind₁ f) = bind₁ fun i => ↑(bind₁ g) (f i)\n[PROOFSTEP]\next1\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : σ → MvPolynomial τ R\ng : τ → MvPolynomial υ R\ni✝ : σ\n⊢ ↑(AlgHom.comp (bind₁ g) (bind₁ f)) (X i✝) = ↑(bind₁ fun i => ↑(bind₁ g) (f i)) (X i✝)\n[PROOFSTEP]\napply bind₁_bind₁\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* MvPolynomial σ T\n⊢ RingHom.comp (bind₂ g) (bind₂ f) = bind₂ (RingHom.comp (bind₂ g) f)\n[PROOFSTEP]\next : 2\n[GOAL]\ncase hC.a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* MvPolynomial σ T\nx✝ : R\n⊢ ↑(RingHom.comp (RingHom.comp (bind₂ g) (bind₂ f)) C) x✝ = ↑(RingHom.comp (bind₂ (RingHom.comp (bind₂ g) f)) C) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hX.a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* MvPolynomial σ T\ni✝ : σ\nm✝ : σ →₀ ℕ\n⊢ coeff m✝ (↑(RingHom.comp (bind₂ g) (bind₂ f)) (X i✝)) = coeff m✝ (↑(bind₂ (RingHom.comp (bind₂ g) f)) (X i✝))\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : σ → MvPolynomial τ R\ng : τ → υ\n⊢ AlgHom.comp (rename g) (bind₁ f) = bind₁ fun i => ↑(rename g) (f i)\n[PROOFSTEP]\next1 i\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : σ → MvPolynomial τ R\ng : τ → υ\ni : σ\n⊢ ↑(AlgHom.comp (rename g) (bind₁ f)) (X i) = ↑(bind₁ fun i => ↑(rename g) (f i)) (X i)\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* T\nφ : MvPolynomial σ R\n⊢ ↑(map g) (↑(bind₂ f) φ) = ↑(bind₂ (RingHom.comp (map g) f)) φ\n[PROOFSTEP]\nsimp only [bind₂, eval₂_comp_right, coe_eval₂Hom, eval₂_map]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* T\nφ : MvPolynomial σ R\n⊢ eval₂ (RingHom.comp (map g) f) (↑(map g) ∘ X) φ = eval₂ (RingHom.comp (map g) f) X φ\n[PROOFSTEP]\ncongr 1 with : 1\n[GOAL]\ncase e_g.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\ng : S →+* T\nφ : MvPolynomial σ R\nx✝ : σ\n⊢ (↑(map g) ∘ X) x✝ = X x✝\n[PROOFSTEP]\nsimp only [Function.comp_apply, map_X]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : τ → MvPolynomial υ R\ng : σ → τ\n⊢ AlgHom.comp (bind₁ f) (rename g) = bind₁ (f ∘ g)\n[PROOFSTEP]\next1 i\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nυ : Type u_6\nf : τ → MvPolynomial υ R\ng : σ → τ\ni : σ\n⊢ ↑(AlgHom.comp (bind₁ f) (rename g)) (X i) = ↑(bind₁ (f ∘ g)) (X i)\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : S →+* MvPolynomial σ T\ng : R →+* S\nφ : MvPolynomial σ R\n⊢ ↑(bind₂ f) (↑(map g) φ) = ↑(bind₂ (RingHom.comp f g)) φ\n[PROOFSTEP]\nsimp [bind₂]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\n⊢ RingHom.comp (map f) C = RingHom.comp C f\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\nx✝ : R\n⊢ ↑(RingHom.comp (map f) C) x✝ = ↑(RingHom.comp C f) x✝\n[PROOFSTEP]\napply map_C\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : MvPolynomial τ R →+* S\ng : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ↑f (↑(bind₁ g) φ) = ↑(eval₂Hom (RingHom.comp f C) fun i => ↑f (g i)) φ\n[PROOFSTEP]\nrw [bind₁, map_aeval, algebraMap_eq]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\ng : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ↑(map f) (↑(bind₁ g) φ) = ↑(bind₁ fun i => ↑(map f) (g i)) (↑(map f) φ)\n[PROOFSTEP]\nrw [hom_bind₁, map_comp_C, ← eval₂Hom_map_hom]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\ng : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ↑(eval₂Hom C fun i => ↑(map f) (g i)) (↑(map f) φ) = ↑(bind₁ fun i => ↑(map f) (g i)) (↑(map f) φ)\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\ng : σ → S\n⊢ RingHom.comp (eval₂Hom f g) C = f\n[PROOFSTEP]\next1 r\n[GOAL]\ncase a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\ng : σ → S\nr : R\n⊢ ↑(RingHom.comp (eval₂Hom f g) C) r = ↑f r\n[PROOFSTEP]\nexact eval₂_C f g r\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* S\ng : τ → S\nh : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ↑(eval₂Hom f g) (↑(bind₁ h) φ) = ↑(eval₂Hom f fun i => ↑(eval₂Hom f g) (h i)) φ\n[PROOFSTEP]\nrw [hom_bind₁, eval₂Hom_comp_C]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : Algebra R S\nf : τ → S\ng : σ → MvPolynomial τ R\n⊢ AlgHom.comp (aeval f) (bind₁ g) = aeval fun i => ↑(aeval f) (g i)\n[PROOFSTEP]\next1\n[GOAL]\ncase hf\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : Algebra R S\nf : τ → S\ng : σ → MvPolynomial τ R\ni✝ : σ\n⊢ ↑(AlgHom.comp (aeval f) (bind₁ g)) (X i✝) = ↑(aeval fun i => ↑(aeval f) (g i)) (X i✝)\n[PROOFSTEP]\napply aeval_bind₁\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : S →+* T\ng : σ → T\nh : R →+* MvPolynomial σ S\n⊢ RingHom.comp (eval₂Hom f g) (bind₂ h) = eval₂Hom (RingHom.comp (eval₂Hom f g) h) g\n[PROOFSTEP]\next : 2\n[GOAL]\ncase hC.a\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : S →+* T\ng : σ → T\nh : R →+* MvPolynomial σ S\nx✝ : R\n⊢ ↑(RingHom.comp (RingHom.comp (eval₂Hom f g) (bind₂ h)) C) x✝ =\n    ↑(RingHom.comp (eval₂Hom (RingHom.comp (eval₂Hom f g) h) g) C) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase hX\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : S →+* T\ng : σ → T\nh : R →+* MvPolynomial σ S\ni✝ : σ\n⊢ ↑(RingHom.comp (eval₂Hom f g) (bind₂ h)) (X i✝) = ↑(eval₂Hom (RingHom.comp (eval₂Hom f g) h) g) (X i✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ f : σ → MvPolynomial τ R\nd : σ →₀ ℕ\nr : R\n⊢ ↑(bind₁ f) (↑(monomial d) r) = ↑C r * ∏ i in d.support, f i ^ ↑d i\n[PROOFSTEP]\nsimp only [monomial_eq, AlgHom.map_mul, bind₁_C_right, Finsupp.prod, AlgHom.map_prod, AlgHom.map_pow, bind₁_X_right]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\nd : σ →₀ ℕ\nr : R\n⊢ ↑(bind₂ f) (↑(monomial d) r) = ↑f r * ↑(monomial d) 1\n[PROOFSTEP]\nsimp only [monomial_eq, RingHom.map_mul, bind₂_C_right, Finsupp.prod, map_prod, map_pow, bind₂_X_right, C_1, one_mul]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\nf : R →+* MvPolynomial σ S\nd : σ →₀ ℕ\n⊢ ↑(bind₂ f) (↑(monomial d) 1) = ↑(monomial d) 1\n[PROOFSTEP]\nrw [bind₂_monomial, f.map_one, one_mul]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ vars (↑(bind₁ f) φ) ⊆ Finset.biUnion (vars φ) fun i => vars (f i)\n[PROOFSTEP]\ncalc\n  (bind₁ f φ).vars = (φ.support.sum fun x : σ →₀ ℕ => (bind₁ f) (monomial x (coeff x φ))).vars := by\n    rw [← AlgHom.map_sum, ← φ.as_sum]\n  _ ≤ φ.support.biUnion fun i : σ →₀ ℕ => ((bind₁ f) (monomial i (coeff i φ))).vars := (vars_sum_subset _ _)\n  _ = φ.support.biUnion fun d : σ →₀ ℕ => vars (C (coeff d φ) * ∏ i in d.support, f i ^ d i) := by\n    simp only [bind₁_monomial]\n  _ ≤ φ.support.biUnion fun d : σ →₀ ℕ => d.support.biUnion fun i => vars (f i) :=\n    ?_\n      -- proof below\n  _ ≤ φ.vars.biUnion fun i : σ => vars (f i) :=\n    ?_\n      -- proof below\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ vars (↑(bind₁ f) φ) = vars (∑ x in support φ, ↑(bind₁ f) (↑(monomial x) (coeff x φ)))\n[PROOFSTEP]\nrw [← AlgHom.map_sum, ← φ.as_sum]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ (Finset.biUnion (support φ) fun i => vars (↑(bind₁ f) (↑(monomial i) (coeff i φ)))) =\n    Finset.biUnion (support φ) fun d => vars (↑C (coeff d φ) * ∏ i in d.support, f i ^ ↑d i)\n[PROOFSTEP]\nsimp only [bind₁_monomial]\n[GOAL]\ncase calc_1\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ (Finset.biUnion (support φ) fun d => vars (↑C (coeff d φ) * ∏ i in d.support, f i ^ ↑d i)) ≤\n    Finset.biUnion (support φ) fun d => Finset.biUnion d.support fun i => vars (f i)\n[PROOFSTEP]\napply Finset.biUnion_mono\n[GOAL]\ncase calc_1.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ ∀ (a : σ →₀ ℕ),\n    a ∈ support φ → vars (↑C (coeff a φ) * ∏ i in a.support, f i ^ ↑a i) ⊆ Finset.biUnion a.support fun i => vars (f i)\n[PROOFSTEP]\nintro d _hd\n[GOAL]\ncase calc_1.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nd : σ →₀ ℕ\n_hd : d ∈ support φ\n⊢ vars (↑C (coeff d φ) * ∏ i in d.support, f i ^ ↑d i) ⊆ Finset.biUnion d.support fun i => vars (f i)\n[PROOFSTEP]\ncalc\n  vars (C (coeff d φ) * ∏ i : σ in d.support, f i ^ d i) ≤\n      (C (coeff d φ)).vars ∪ (∏ i : σ in d.support, f i ^ d i).vars :=\n    vars_mul _ _\n  _ ≤ (∏ i : σ in d.support, f i ^ d i).vars := by\n    simp only [Finset.empty_union, vars_C, Finset.le_iff_subset, Finset.Subset.refl]\n  _ ≤ d.support.biUnion fun i : σ => vars (f i ^ d i) := (vars_prod _)\n  _ ≤ d.support.biUnion fun i : σ => (f i).vars := ?_\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nd : σ →₀ ℕ\n_hd : d ∈ support φ\n⊢ vars (↑C (coeff d φ)) ∪ vars (∏ i in d.support, f i ^ ↑d i) ≤ vars (∏ i in d.support, f i ^ ↑d i)\n[PROOFSTEP]\nsimp only [Finset.empty_union, vars_C, Finset.le_iff_subset, Finset.Subset.refl]\n[GOAL]\ncase calc_1.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nd : σ →₀ ℕ\n_hd : d ∈ support φ\n⊢ (Finset.biUnion d.support fun i => vars (f i ^ ↑d i)) ≤ Finset.biUnion d.support fun i => vars (f i)\n[PROOFSTEP]\napply Finset.biUnion_mono\n[GOAL]\ncase calc_1.h.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nd : σ →₀ ℕ\n_hd : d ∈ support φ\n⊢ ∀ (a : σ), a ∈ d.support → vars (f a ^ ↑d a) ⊆ vars (f a)\n[PROOFSTEP]\nintro i _hi\n[GOAL]\ncase calc_1.h.h\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nd : σ →₀ ℕ\n_hd : d ∈ support φ\ni : σ\n_hi : i ∈ d.support\n⊢ vars (f i ^ ↑d i) ⊆ vars (f i)\n[PROOFSTEP]\napply vars_pow\n[GOAL]\ncase calc_2\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\n⊢ (Finset.biUnion (support φ) fun d => Finset.biUnion d.support fun i => vars (f i)) ≤\n    Finset.biUnion (vars φ) fun i => vars (f i)\n[PROOFSTEP]\nintro j\n[GOAL]\ncase calc_2\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nj : τ\n⊢ (j ∈ Finset.biUnion (support φ) fun d => Finset.biUnion d.support fun i => vars (f i)) →\n    j ∈ Finset.biUnion (vars φ) fun i => vars (f i)\n[PROOFSTEP]\nsimp_rw [Finset.mem_biUnion]\n[GOAL]\ncase calc_2\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nj : τ\n⊢ (∃ a, a ∈ support φ ∧ ∃ a_1, a_1 ∈ a.support ∧ j ∈ vars (f a_1)) → ∃ a, a ∈ vars φ ∧ j ∈ vars (f a)\n[PROOFSTEP]\nrintro ⟨d, hd, ⟨i, hi, hj⟩⟩\n[GOAL]\ncase calc_2.intro.intro.intro.intro\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝³ : CommSemiring R\ninst✝² : CommSemiring S\ninst✝¹ : CommSemiring T\nf✝ : σ → MvPolynomial τ R\ninst✝ : DecidableEq τ\nf : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nj : τ\nd : σ →₀ ℕ\nhd : d ∈ support φ\ni : σ\nhi : i ∈ d.support\nhj : j ∈ vars (f i)\n⊢ ∃ a, a ∈ vars φ ∧ j ∈ vars (f a)\n[PROOFSTEP]\nexact ⟨i, (mem_vars _).mpr ⟨d, hd, hi⟩, hj⟩\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ f : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nj : τ\nh : j ∈ vars (↑(bind₁ f) φ)\n⊢ ∃ i, i ∈ vars φ ∧ j ∈ vars (f i)\n[PROOFSTEP]\nclassical simpa only [exists_prop, Finset.mem_biUnion, mem_support_iff, Ne.def] using vars_bind₁ f φ h\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf✝ f : σ → MvPolynomial τ R\nφ : MvPolynomial σ R\nj : τ\nh : j ∈ vars (↑(bind₁ f) φ)\n⊢ ∃ i, i ∈ vars φ ∧ j ∈ vars (f i)\n[PROOFSTEP]\nsimpa only [exists_prop, Finset.mem_biUnion, mem_support_iff, Ne.def] using vars_bind₁ f φ h\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1605153}, Functor.mapConst = Functor.map ∘ Function.const β\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1605153\n⊢ Functor.mapConst = Functor.map ∘ Function.const β✝\n[PROOFSTEP]\nrfl\n  -- porting note: I guess `map_const` no longer has a default implementation?\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α : Type ?u.1605153} (x : MvPolynomial α R), id <$> x = x\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ : Type ?u.1605153\nx✝ : MvPolynomial α✝ R\n⊢ id <$> x✝ = x✝\n[PROOFSTEP]\nsimp [(· <$> ·)]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β γ : Type ?u.1605153} (g : α → β) (h : β → γ) (x : MvPolynomial α R), (h ∘ g) <$> x = h <$> g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ γ✝ : Type ?u.1605153\ng✝ : α✝ → β✝\nh✝ : β✝ → γ✝\nx✝ : MvPolynomial α✝ R\n⊢ (h✝ ∘ g✝) <$> x✝ = h✝ <$> g✝ <$> x✝\n[PROOFSTEP]\nsimp [(· <$> ·)]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (x : MvPolynomial α R) (y : MvPolynomial β R),\n    (SeqLeft.seqLeft x fun x => y) = Seq.seq (Function.const β <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\nx✝ : MvPolynomial α✝ R\ny✝ : MvPolynomial β✝ R\n⊢ (SeqLeft.seqLeft x✝ fun x => y✝) = Seq.seq (Function.const β✝ <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [SeqLeft.seqLeft, Seq.seq, (· <$> ·), bind₁_rename]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\nx✝ : MvPolynomial α✝ R\ny✝ : MvPolynomial β✝ R\n⊢ ↑(bind₁ fun a => ↑(bind₁ fun x => X a) y✝) x✝ = ↑(bind₁ ((fun y => ↑(rename y) y✝) ∘ Function.const β✝)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (x : MvPolynomial α R) (y : MvPolynomial β R),\n    (SeqRight.seqRight x fun x => y) = Seq.seq (Function.const α id <$> x) fun x => y\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\nx✝ : MvPolynomial α✝ R\ny✝ : MvPolynomial β✝ R\n⊢ (SeqRight.seqRight x✝ fun x => y✝) = Seq.seq (Function.const α✝ id <$> x✝) fun x => y✝\n[PROOFSTEP]\nsimp [SeqRight.seqRight, Seq.seq, (· <$> ·), bind₁_rename]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\nx✝ : MvPolynomial α✝ R\ny✝ : MvPolynomial β✝ R\n⊢ ↑(bind₁ fun x => y✝) x✝ = ↑(bind₁ (Function.const α✝ y✝)) x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (g : α → β) (x : MvPolynomial α R), (Seq.seq (pure g) fun x_1 => x) = g <$> x\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\ng✝ : α✝ → β✝\nx✝ : MvPolynomial α✝ R\n⊢ (Seq.seq (pure g✝) fun x => x✝) = g✝ <$> x✝\n[PROOFSTEP]\nsimp [(· <$> ·), pure, Seq.seq]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (f : α → β) (x : MvPolynomial α R),\n    (do\n        let a ← x\n        pure (f a)) =\n      f <$> x\n[PROOFSTEP]\naesop\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (f : MvPolynomial (α → β) R) (x : MvPolynomial α R),\n    (do\n        let x_1 ← f\n        x_1 <$> x) =\n      Seq.seq f fun x_1 => x\n[PROOFSTEP]\naesop\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β : Type ?u.1607152} (x : α) (f : α → MvPolynomial β R), pure x >>= f = f x\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ : Type ?u.1607152\nx✝ : α✝\nf✝ : α✝ → MvPolynomial β✝ R\n⊢ pure x✝ >>= f✝ = f✝ x✝\n[PROOFSTEP]\nsimp [pure, bind]\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\n⊢ ∀ {α β γ : Type ?u.1607152} (x : MvPolynomial α R) (f : α → MvPolynomial β R) (g : β → MvPolynomial γ R),\n    x >>= f >>= g = x >>= fun x => f x >>= g\n[PROOFSTEP]\nintros\n[GOAL]\nσ : Type u_1\nτ : Type u_2\nR : Type u_3\nS : Type u_4\nT : Type u_5\ninst✝² : CommSemiring R\ninst✝¹ : CommSemiring S\ninst✝ : CommSemiring T\nf : σ → MvPolynomial τ R\nα✝ β✝ γ✝ : Type ?u.1607152\nx✝ : MvPolynomial α✝ R\nf✝ : α✝ → MvPolynomial β✝ R\ng✝ : β✝ → MvPolynomial γ✝ R\n⊢ x✝ >>= f✝ >>= g✝ = x✝ >>= fun x => f✝ x >>= g✝\n[PROOFSTEP]\nsimp [bind, ← bind₁_comp_bind₁]\n", "meta": {"mathlib_filename": "Mathlib.Data.MvPolynomial.Monad", "llama_tokens": 13801, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5544704649604273, "lm_q2_score": 0.476579651063676, "lm_q1q2_score": 0.26424934071595463}}
{"text": "[GOAL]\nα : Sort u\nβ : Sort v\nf g : α ↪ β\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\n{cases f; cases g; congr\n}\n[GOAL]\nα : Sort u\nβ : Sort v\nf g : α ↪ β\nh : f.toFun = g.toFun\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nα : Sort u\nβ : Sort v\ng : α ↪ β\ntoFun✝ : α → β\ninj'✝ : Injective toFun✝\nh : { toFun := toFun✝, inj' := inj'✝ }.toFun = g.toFun\n⊢ { toFun := toFun✝, inj' := inj'✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nα : Sort u\nβ : Sort v\ntoFun✝¹ : α → β\ninj'✝¹ : Injective toFun✝¹\ntoFun✝ : α → β\ninj'✝ : Injective toFun✝\nh : { toFun := toFun✝¹, inj' := inj'✝¹ }.toFun = { toFun := toFun✝, inj' := inj'✝ }.toFun\n⊢ { toFun := toFun✝¹, inj' := inj'✝¹ } = { toFun := toFun✝, inj' := inj'✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\n⊢ Embedding.trans (Equiv.toEmbedding e) (Equiv.toEmbedding e.symm) = Embedding.refl α\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\nx✝ : α\n⊢ ↑(Embedding.trans (Equiv.toEmbedding e) (Equiv.toEmbedding e.symm)) x✝ = ↑(Embedding.refl α) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\n⊢ Embedding.trans (Equiv.toEmbedding e.symm) (Equiv.toEmbedding e) = Embedding.refl β\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\ne : α ≃ β\nx✝ : β\n⊢ ↑(Embedding.trans (Equiv.toEmbedding e.symm) (Equiv.toEmbedding e)) x✝ = ↑(Embedding.refl β) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\n⊢ Injective fun a' => if a' = a then b else if ↑f a' = b then ↑f a else ↑f a'\n[PROOFSTEP]\nintro x y\n  (h : ite _ _ _ = ite _ _ _)\n    -- TODO: once we have `cc` we can avoid all the manual cases below by doing\n        -- split_ifs at h <;> (try subst b) <;> (try simp only [f.injective.eq_iff] at *) <;> cc\n[GOAL]\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh : (if x = a then b else if ↑f x = b then ↑f a else ↑f x) = if y = a then b else if ↑f y = b then ↑f a else ↑f y\n⊢ x = y\n[PROOFSTEP]\nsplit_ifs at h  with h₁ h₂ _ _ h₅ h₆\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : y = a\nh : b = b\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : y = a\nh : b = b\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\n_ : ↑f y = b\nh : b = ↑f a\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\n_ : ↑f y = b\nh : b = ↑f a\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\n_ : ¬↑f y = b\nh : b = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\n_ : ¬↑f y = b\nh : b = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : y = a\nh : ↑f a = b\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : y = a\nh : ↑f a = b\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : ¬y = a\nh₆ : ↑f y = b\nh : ↑f a = ↑f a\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : ¬y = a\nh₆ : ↑f y = b\nh : ↑f a = ↑f a\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : ¬y = a\nh₆ : ¬↑f y = b\nh : ↑f a = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ↑f x = b\nh₅ : ¬y = a\nh₆ : ¬↑f y = b\nh : ↑f a = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝ : y = a\nh : ↑f x = b\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝ : y = a\nh : ↑f x = b\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ↑f y = b\nh : ↑f x = ↑f a\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ↑f y = b\nh : ↑f x = ↑f a\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ¬↑f y = b\nh : ↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry subst b\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ¬↑f y = b\nh : ↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsubst b\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : y = a\nh : b = b\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : y = a\nh : b = b\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\nh : ↑f y = ↑f a\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\nh : ↑f y = ↑f a\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\n_ : ¬↑f y = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\n_ : ¬↑f y = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : ↑f a = ↑f x\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : ↑f a = ↑f x\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\nh : ↑f a = ↑f a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh₆ : ↑f y = ↑f x\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\nh : ↑f a = ↑f a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh₆ : ↑f y = ↑f x\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\nh : ↑f a = ↑f y\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh₆ : ¬↑f y = ↑f x\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\nh : ↑f a = ↑f y\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh₆ : ¬↑f y = ↑f x\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\n_ : ¬↑f x = ↑f x\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\n_ : ¬↑f x = ↑f x\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : ¬y = a\nh : ↑f x = ↑f a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\n_ : ¬↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : ¬y = a\nh : ↑f x = ↑f a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\n_ : ¬↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ¬↑f y = b\nh : ↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\ntry simp only [f.injective.eq_iff] at *\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ¬↑f y = b\nh : ↑f x = ↑f y\n⊢ x = y\n[PROOFSTEP]\nsimp only [f.injective.eq_iff] at *\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : x = a\nh₂ : y = a\nh : True\n⊢ x = y\n[PROOFSTEP]\nrw [h₁, h₂]\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : x = a\nh₂ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\nh : y = a\n⊢ x = y\n[PROOFSTEP]\nrw [h₁, h]\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : a = x\n⊢ x = y\n[PROOFSTEP]\nrw [h₅, ← h]\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : True\nh₆ : y = x\n⊢ x = y\n[PROOFSTEP]\nexact h₆.symm\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : a = y\nh₆ : ¬y = x\n⊢ x = y\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh₅ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f x)\nh : a = y\nh₆ : ¬y = x\n⊢ False\n[PROOFSTEP]\nexact h₅ h.symm\n[GOAL]\ncase pos\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\nh : x = a\n_ : ¬x = y\n⊢ x = y\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\ninst✝¹ : (a' : α) → Decidable (a' = a)\nx y : α\nh₁ : ¬x = a\nh✝ : ¬y = a\ninst✝ : (a' : α) → Decidable (↑f a' = ↑f y)\nh : x = a\n_ : ¬x = y\n⊢ False\n[PROOFSTEP]\nexact h₁ h\n[GOAL]\ncase neg\nα : Sort ?u.14414\nβ : Sort ?u.14415\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\nx y : α\nh₁ : ¬x = a\n_ : ¬↑f x = b\nh✝¹ : ¬y = a\nh✝ : ¬↑f y = b\nh : x = y\n⊢ x = y\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nf : α ↪ β\na : α\nb : β\ninst✝¹ : (a' : α) → Decidable (a' = a)\ninst✝ : (a' : α) → Decidable (↑f a' = b)\n⊢ ↑(setValue f a b) a = b\n[PROOFSTEP]\nsimp [setValue]\n[GOAL]\nβ : Sort u_1\nb : β\n⊢ Injective fun x => b\n[PROOFSTEP]\nrintro ⟨⟩ ⟨⟩ _\n[GOAL]\ncase unit.unit\nβ : Sort u_1\nb : β\na✝ : (fun x => b) PUnit.unit = (fun x => b) PUnit.unit\n⊢ PUnit.unit = PUnit.unit\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Sort u\nβ : Sort v\nγ : Sort w\ninst✝ : Inhabited γ\ne : α ↪ β\nf₁ f₂ : α → γ\nh : (fun f => extend (↑e) f default) f₁ = (fun f => extend (↑e) f default) f₂\nx : α\n⊢ f₁ x = f₂ x\n[PROOFSTEP]\nsimpa only [e.injective.extend_apply] using congr_fun h (e x)\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nδ : Sort u_4\nh : α ≃ β\nh' : γ ≃ δ\nx : α ↪ γ\n⊢ (fun f => Embedding.congr h.symm h'.symm f) ((fun f => Embedding.congr h h' f) x) = x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nδ : Sort u_4\nh : α ≃ β\nh' : γ ≃ δ\nx : α ↪ γ\nx✝ : α\n⊢ ↑((fun f => Embedding.congr h.symm h'.symm f) ((fun f => Embedding.congr h h' f) x)) x✝ = ↑x x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nδ : Sort u_4\nh : α ≃ β\nh' : γ ≃ δ\nx : β ↪ δ\n⊢ (fun f => Embedding.congr h h' f) ((fun f => Embedding.congr h.symm h'.symm f) x) = x\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Sort u_1\nβ : Sort u_2\nγ : Sort u_3\nδ : Sort u_4\nh : α ≃ β\nh' : γ ≃ δ\nx : β ↪ δ\nx✝ : β\n⊢ ↑((fun f => Embedding.congr h h' f) ((fun f => Embedding.congr h.symm h'.symm f) x)) x✝ = ↑x x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα₁ : Sort u_1\nβ₁ : Sort u_2\nγ₁ : Sort u_3\nα₂ : Sort u_4\nβ₂ : Sort u_5\nγ₂ : Sort u_6\nea : α₁ ≃ α₂\neb : β₁ ≃ β₂\nec : γ₁ ≃ γ₂\nf : α₁ ↪ β₁\ng : β₁ ↪ γ₁\n⊢ ↑(embeddingCongr ea ec) (Embedding.trans f g) =\n    Embedding.trans (↑(embeddingCongr ea eb) f) (↑(embeddingCongr eb ec) g)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα₁ : Sort u_1\nβ₁ : Sort u_2\nγ₁ : Sort u_3\nα₂ : Sort u_4\nβ₂ : Sort u_5\nγ₂ : Sort u_6\nea : α₁ ≃ α₂\neb : β₁ ≃ β₂\nec : γ₁ ≃ γ₂\nf : α₁ ↪ β₁\ng : β₁ ↪ γ₁\nx✝ : α₂\n⊢ ↑(↑(embeddingCongr ea ec) (Embedding.trans f g)) x✝ =\n    ↑(Embedding.trans (↑(embeddingCongr ea eb) f) (↑(embeddingCongr eb ec) g)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\n⊢ Function.Injective fun x =>\n    if h : p ↑x then Sum.inl { val := ↑x, property := h } else Sum.inr { val := ↑x, property := (_ : q ↑x) }\n[PROOFSTEP]\nintro x y\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\n⊢ (fun x => if h : p ↑x then Sum.inl { val := ↑x, property := h } else Sum.inr { val := ↑x, property := (_ : q ↑x) })\n        x =\n      (fun x =>\n          if h : p ↑x then Sum.inl { val := ↑x, property := h } else Sum.inr { val := ↑x, property := (_ : q ↑x) })\n        y →\n    x = y\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\n⊢ ((if h : p ↑x then Sum.inl { val := ↑x, property := h } else Sum.inr { val := ↑x, property := (_ : q ↑x) }) =\n      if h : p ↑y then Sum.inl { val := ↑y, property := h } else Sum.inr { val := ↑y, property := (_ : q ↑y) }) →\n    x = y\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\nh✝¹ : p ↑x\nh✝ : p ↑y\n⊢ Sum.inl { val := ↑x, property := h✝¹ } = Sum.inl { val := ↑y, property := h✝ } → x = y\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\ncase neg\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\nh✝¹ : p ↑x\nh✝ : ¬p ↑y\n⊢ False → x = y\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\ncase pos\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\nh✝¹ : ¬p ↑x\nh✝ : p ↑y\n⊢ False → x = y\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\ncase neg\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nx y : { x // p x ∨ q x }\nh✝¹ : ¬p ↑x\nh✝ : ¬p ↑y\n⊢ Sum.inr { val := ↑x, property := (_ : q ↑x) } = Sum.inr { val := ↑y, property := (_ : q ↑y) } → x = y\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\nα : Type u_1\np q : α → Prop\nh : ∀ (x : α), p x → q x\nx y : { x // p x }\n⊢ (fun x => { val := ↑x, property := (_ : q ↑x) }) x = (fun x => { val := ↑x, property := (_ : q ↑x) }) y → x = y\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n", "meta": {"mathlib_filename": "Mathlib.Logic.Embedding.Basic", "llama_tokens": 10570, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6187804337438502, "lm_q2_score": 0.4263215925474903, "lm_q1q2_score": 0.26379945995090504}}
{"text": "[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : K\n⊢ x✝ ∈ {x | ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) x ≤ 1} ↔\n    x✝ ∈\n      ↑(⨅ (v : HeightOneSpectrum R) (_ : ¬v ∈ S),\n          (Valuation.valuationSubring (HeightOneSpectrum.valuation v)).toSubring)\n[PROOFSTEP]\nsimp [SetLike.mem_coe, Subring.mem_iInf]\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\n⊢ ↑(Subalgebra.toSubring (integer S K)) =\n    ↑(⨅ (v : HeightOneSpectrum R) (_ : ¬v ∈ S), (Valuation.valuationSubring (HeightOneSpectrum.valuation v)).toSubring)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : K\n⊢ x✝ ∈ ↑(Subalgebra.toSubring (integer S K)) ↔\n    x✝ ∈\n      ↑(⨅ (v : HeightOneSpectrum R) (_ : ¬v ∈ S),\n          (Valuation.valuationSubring (HeightOneSpectrum.valuation v)).toSubring)\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : Kˣ\n⊢ x✝ ∈ {x | ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑x = 1} ↔\n    x✝ ∈\n      ↑(⨅ (v : HeightOneSpectrum R) (_ : ¬v ∈ S),\n          ValuationSubring.unitGroup (Valuation.valuationSubring (HeightOneSpectrum.valuation v)))\n[PROOFSTEP]\nsimp only [mem_setOf, SetLike.mem_coe, Subgroup.mem_iInf, Valuation.mem_unitGroup_iff]\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx : { x // x ∈ integer S K }ˣ\nv : HeightOneSpectrum R\nhv : ¬v ∈ S\n⊢ ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) * ↑(HeightOneSpectrum.valuation v) ↑x.inv = 1\n[PROOFSTEP]\nrw [Units.val_mk0, ← map_mul, Subtype.mk_eq_mk.mp x.val_inv, v.valuation.map_one]\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : { x // x ∈ unit S K }\n⊢ (fun x =>\n        { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n          property :=\n            (_ :\n              ∀ (v : HeightOneSpectrum R),\n                ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n      ((fun x =>\n          {\n            val :=\n              { val := ↑↑x,\n                property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n            inv :=\n              { val := ↑(↑x)⁻¹,\n                property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n            val_inv :=\n              (_ :\n                { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                    { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                  1),\n            inv_val :=\n              (_ :\n                { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                    { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                  1) })\n        x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : { x // x ∈ unit S K }\n⊢ ↑↑((fun x =>\n            { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n              property :=\n                (_ :\n                  ∀ (v : HeightOneSpectrum R),\n                    ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n          ((fun x =>\n              {\n                val :=\n                  { val := ↑↑x,\n                    property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                inv :=\n                  { val := ↑(↑x)⁻¹,\n                    property :=\n                      (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                val_inv :=\n                  (_ :\n                    { val := ↑↑x,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                        { val := ↑(↑x)⁻¹,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                      1),\n                inv_val :=\n                  (_ :\n                    { val := ↑(↑x)⁻¹,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                        { val := ↑↑x,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                      1) })\n            x✝)) =\n    ↑↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : { x // x ∈ integer S K }ˣ\n⊢ (fun x =>\n        {\n          val :=\n            { val := ↑↑x,\n              property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n          inv :=\n            { val := ↑(↑x)⁻¹,\n              property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n          val_inv :=\n            (_ :\n              { val := ↑↑x,\n                    property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                  { val := ↑(↑x)⁻¹,\n                    property :=\n                      (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                1),\n          inv_val :=\n            (_ :\n              { val := ↑(↑x)⁻¹,\n                    property :=\n                      (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                  { val := ↑↑x,\n                    property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                1) })\n      ((fun x =>\n          { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n            property :=\n              (_ :\n                ∀ (v : HeightOneSpectrum R),\n                  ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n        x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝ : { x // x ∈ integer S K }ˣ\n⊢ ↑↑((fun x =>\n            {\n              val :=\n                { val := ↑↑x,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n              inv :=\n                { val := ↑(↑x)⁻¹,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n              val_inv :=\n                (_ :\n                  { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                      { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                    1),\n              inv_val :=\n                (_ :\n                  { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                      { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                    1) })\n          ((fun x =>\n              { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                property :=\n                  (_ :\n                    ∀ (v : HeightOneSpectrum R),\n                      ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n            x✝)) =\n    ↑↑x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝¹ x✝ : { x // x ∈ unit S K }\n⊢ Equiv.toFun\n      {\n        toFun := fun x =>\n          {\n            val :=\n              { val := ↑↑x,\n                property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n            inv :=\n              { val := ↑(↑x)⁻¹,\n                property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n            val_inv :=\n              (_ :\n                { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                    { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                  1),\n            inv_val :=\n              (_ :\n                { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                    { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                  1) },\n        invFun := fun x =>\n          { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n            property :=\n              (_ :\n                ∀ (v : HeightOneSpectrum R),\n                  ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n        left_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ unit S K }),\n              (fun x =>\n                    { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                      property :=\n                        (_ :\n                          ∀ (v : HeightOneSpectrum R),\n                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                  ((fun x =>\n                      {\n                        val :=\n                          { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                        inv :=\n                          { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                              1) })\n                    x) =\n                x),\n        right_inv :=\n          (_ :\n            ∀ (x : { x // x ∈ integer S K }ˣ),\n              (fun x =>\n                    {\n                      val :=\n                        { val := ↑↑x,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                      inv :=\n                        { val := ↑(↑x)⁻¹,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                      val_inv :=\n                        (_ :\n                          { val := ↑↑x,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                              { val := ↑(↑x)⁻¹,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R),\n                                      ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                            1),\n                      inv_val :=\n                        (_ :\n                          { val := ↑(↑x)⁻¹,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R),\n                                      ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                              { val := ↑↑x,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                            1) })\n                  ((fun x =>\n                      { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                        property :=\n                          (_ :\n                            ∀ (v : HeightOneSpectrum R),\n                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                    x) =\n                x) }\n      (x✝¹ * x✝) =\n    Equiv.toFun\n        {\n          toFun := fun x =>\n            {\n              val :=\n                { val := ↑↑x,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n              inv :=\n                { val := ↑(↑x)⁻¹,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n              val_inv :=\n                (_ :\n                  { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                      { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                    1),\n              inv_val :=\n                (_ :\n                  { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                      { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                    1) },\n          invFun := fun x =>\n            { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n              property :=\n                (_ :\n                  ∀ (v : HeightOneSpectrum R),\n                    ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ unit S K }),\n                (fun x =>\n                      { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                        property :=\n                          (_ :\n                            ∀ (v : HeightOneSpectrum R),\n                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                    ((fun x =>\n                        {\n                          val :=\n                            { val := ↑↑x,\n                              property :=\n                                (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                          inv :=\n                            { val := ↑(↑x)⁻¹,\n                              property :=\n                                (_ :\n                                  ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                  { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                  { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                1) })\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ integer S K }ˣ),\n                (fun x =>\n                      {\n                        val :=\n                          { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                        inv :=\n                          { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                              1) })\n                    ((fun x =>\n                        { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                          property :=\n                            (_ :\n                              ∀ (v : HeightOneSpectrum R),\n                                ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                      x) =\n                  x) }\n        x✝¹ *\n      Equiv.toFun\n        {\n          toFun := fun x =>\n            {\n              val :=\n                { val := ↑↑x,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n              inv :=\n                { val := ↑(↑x)⁻¹,\n                  property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n              val_inv :=\n                (_ :\n                  { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                      { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                    1),\n              inv_val :=\n                (_ :\n                  { val := ↑(↑x)⁻¹,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                      { val := ↑↑x,\n                        property :=\n                          (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                    1) },\n          invFun := fun x =>\n            { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n              property :=\n                (_ :\n                  ∀ (v : HeightOneSpectrum R),\n                    ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n          left_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ unit S K }),\n                (fun x =>\n                      { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                        property :=\n                          (_ :\n                            ∀ (v : HeightOneSpectrum R),\n                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                    ((fun x =>\n                        {\n                          val :=\n                            { val := ↑↑x,\n                              property :=\n                                (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                          inv :=\n                            { val := ↑(↑x)⁻¹,\n                              property :=\n                                (_ :\n                                  ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                  { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                  { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                1) })\n                      x) =\n                  x),\n          right_inv :=\n            (_ :\n              ∀ (x : { x // x ∈ integer S K }ˣ),\n                (fun x =>\n                      {\n                        val :=\n                          { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                        inv :=\n                          { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                        val_inv :=\n                          (_ :\n                            { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                              1),\n                        inv_val :=\n                          (_ :\n                            { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                              1) })\n                    ((fun x =>\n                        { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                          property :=\n                            (_ :\n                              ∀ (v : HeightOneSpectrum R),\n                                ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                      x) =\n                  x) }\n        x✝\n[PROOFSTEP]\next\n[GOAL]\ncase a.a\nR : Type u\ninst✝⁵ : CommRing R\ninst✝⁴ : IsDomain R\ninst✝³ : IsDedekindDomain R\nS : Set (HeightOneSpectrum R)\nK : Type v\ninst✝² : Field K\ninst✝¹ : Algebra R K\ninst✝ : IsFractionRing R K\nx✝¹ x✝ : { x // x ∈ unit S K }\n⊢ ↑↑(Equiv.toFun\n          {\n            toFun := fun x =>\n              {\n                val :=\n                  { val := ↑↑x,\n                    property := (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                inv :=\n                  { val := ↑(↑x)⁻¹,\n                    property :=\n                      (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                val_inv :=\n                  (_ :\n                    { val := ↑↑x,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                        { val := ↑(↑x)⁻¹,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                      1),\n                inv_val :=\n                  (_ :\n                    { val := ↑(↑x)⁻¹,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                        { val := ↑↑x,\n                          property :=\n                            (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                      1) },\n            invFun := fun x =>\n              { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                property :=\n                  (_ :\n                    ∀ (v : HeightOneSpectrum R),\n                      ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n            left_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ unit S K }),\n                  (fun x =>\n                        { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                          property :=\n                            (_ :\n                              ∀ (v : HeightOneSpectrum R),\n                                ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                      ((fun x =>\n                          {\n                            val :=\n                              { val := ↑↑x,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                            inv :=\n                              { val := ↑(↑x)⁻¹,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                    { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                    { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                  1) })\n                        x) =\n                    x),\n            right_inv :=\n              (_ :\n                ∀ (x : { x // x ∈ integer S K }ˣ),\n                  (fun x =>\n                        {\n                          val :=\n                            { val := ↑↑x,\n                              property :=\n                                (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                          inv :=\n                            { val := ↑(↑x)⁻¹,\n                              property :=\n                                (_ :\n                                  ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                          val_inv :=\n                            (_ :\n                              { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                  { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                1),\n                          inv_val :=\n                            (_ :\n                              { val := ↑(↑x)⁻¹,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                  { val := ↑↑x,\n                                    property :=\n                                      (_ :\n                                        ∀ (v : HeightOneSpectrum R),\n                                          ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                1) })\n                      ((fun x =>\n                          { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                            property :=\n                              (_ :\n                                ∀ (v : HeightOneSpectrum R),\n                                  ¬v ∈ S →\n                                    ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                        x) =\n                    x) }\n          (x✝¹ * x✝)) =\n    ↑↑(Equiv.toFun\n            {\n              toFun := fun x =>\n                {\n                  val :=\n                    { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                  inv :=\n                    { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                  val_inv :=\n                    (_ :\n                      { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                          { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                        1),\n                  inv_val :=\n                    (_ :\n                      { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                          { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                        1) },\n              invFun := fun x =>\n                { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                  property :=\n                    (_ :\n                      ∀ (v : HeightOneSpectrum R),\n                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n              left_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ unit S K }),\n                    (fun x =>\n                          { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                            property :=\n                              (_ :\n                                ∀ (v : HeightOneSpectrum R),\n                                  ¬v ∈ S →\n                                    ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                        ((fun x =>\n                            {\n                              val :=\n                                { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                              inv :=\n                                { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                              val_inv :=\n                                (_ :\n                                  { val := ↑↑x,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                      { val := ↑(↑x)⁻¹,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                    1),\n                              inv_val :=\n                                (_ :\n                                  { val := ↑(↑x)⁻¹,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                      { val := ↑↑x,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                    1) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ integer S K }ˣ),\n                    (fun x =>\n                          {\n                            val :=\n                              { val := ↑↑x,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                            inv :=\n                              { val := ↑(↑x)⁻¹,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                    { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                    { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                  1) })\n                        ((fun x =>\n                            { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                              property :=\n                                (_ :\n                                  ∀ (v : HeightOneSpectrum R),\n                                    ¬v ∈ S →\n                                      ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                          x) =\n                      x) }\n            x✝¹ *\n          Equiv.toFun\n            {\n              toFun := fun x =>\n                {\n                  val :=\n                    { val := ↑↑x,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                  inv :=\n                    { val := ↑(↑x)⁻¹,\n                      property :=\n                        (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                  val_inv :=\n                    (_ :\n                      { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                          { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                        1),\n                  inv_val :=\n                    (_ :\n                      { val := ↑(↑x)⁻¹,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                          { val := ↑↑x,\n                            property :=\n                              (_ : ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                        1) },\n              invFun := fun x =>\n                { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                  property :=\n                    (_ :\n                      ∀ (v : HeightOneSpectrum R),\n                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) },\n              left_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ unit S K }),\n                    (fun x =>\n                          { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                            property :=\n                              (_ :\n                                ∀ (v : HeightOneSpectrum R),\n                                  ¬v ∈ S →\n                                    ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                        ((fun x =>\n                            {\n                              val :=\n                                { val := ↑↑x,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                              inv :=\n                                { val := ↑(↑x)⁻¹,\n                                  property :=\n                                    (_ :\n                                      ∀ (v : HeightOneSpectrum R),\n                                        ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                              val_inv :=\n                                (_ :\n                                  { val := ↑↑x,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                      { val := ↑(↑x)⁻¹,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                    1),\n                              inv_val :=\n                                (_ :\n                                  { val := ↑(↑x)⁻¹,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                      { val := ↑↑x,\n                                        property :=\n                                          (_ :\n                                            ∀ (v : HeightOneSpectrum R),\n                                              ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                    1) })\n                          x) =\n                      x),\n              right_inv :=\n                (_ :\n                  ∀ (x : { x // x ∈ integer S K }ˣ),\n                    (fun x =>\n                          {\n                            val :=\n                              { val := ↑↑x,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) },\n                            inv :=\n                              { val := ↑(↑x)⁻¹,\n                                property :=\n                                  (_ :\n                                    ∀ (v : HeightOneSpectrum R), ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) },\n                            val_inv :=\n                              (_ :\n                                { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } *\n                                    { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } =\n                                  1),\n                            inv_val :=\n                              (_ :\n                                { val := ↑(↑x)⁻¹,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x⁻¹ ≤ 1) } *\n                                    { val := ↑↑x,\n                                      property :=\n                                        (_ :\n                                          ∀ (v : HeightOneSpectrum R),\n                                            ¬v ∈ S → ↑(HeightOneSpectrum.valuation v) ↑↑x ≤ 1) } =\n                                  1) })\n                        ((fun x =>\n                            { val := Units.mk0 ↑↑x (_ : ↑↑x = 0 → False),\n                              property :=\n                                (_ :\n                                  ∀ (v : HeightOneSpectrum R),\n                                    ¬v ∈ S →\n                                      ↑(HeightOneSpectrum.valuation v) ↑(Units.mk0 ↑↑x (_ : ↑↑x = 0 → False)) = 1) })\n                          x) =\n                      x) }\n            x✝)\n[PROOFSTEP]\nrfl\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.DedekindDomain.SInteger", "llama_tokens": 15265, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5813030906443133, "lm_q2_score": 0.4532618480153861, "lm_q1q2_score": 0.26348251312249693}}
{"text": "[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\n⊢ Intersecting {a} ↔ a ≠ ⊥\n[PROOFSTEP]\nsimp [Intersecting]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\nhs : Intersecting s\nha : a ≠ ⊥\nh : ∀ (b : α), b ∈ s → ¬Disjoint a b\n⊢ Intersecting (insert a s)\n[PROOFSTEP]\nrintro b (rfl | hb) c (rfl | hc)\n[GOAL]\ncase inl.inl\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\nb c✝ : α\nhs : Intersecting s\nc : α\nha : c ≠ ⊥\nh : ∀ (b : α), b ∈ s → ¬Disjoint c b\n⊢ ¬Disjoint c c\n[PROOFSTEP]\nrwa [disjoint_self]\n[GOAL]\ncase inl.inr\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\nb✝ c✝ : α\nhs : Intersecting s\nb : α\nha : b ≠ ⊥\nh : ∀ (b_1 : α), b_1 ∈ s → ¬Disjoint b b_1\nc : α\nhc : c ∈ s\n⊢ ¬Disjoint b c\n[PROOFSTEP]\nexact h _ hc\n[GOAL]\ncase inr.inl\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\nb✝ c✝ : α\nhs : Intersecting s\nb : α\nhb : b ∈ s\nc : α\nha : c ≠ ⊥\nh : ∀ (b : α), b ∈ s → ¬Disjoint c b\n⊢ ¬Disjoint b c\n[PROOFSTEP]\nexact fun H => h _ hb H.symm\n[GOAL]\ncase inr.inr\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b✝ c✝ : α\nhs : Intersecting s\nha : a ≠ ⊥\nh : ∀ (b : α), b ∈ s → ¬Disjoint a b\nb : α\nhb : b ∈ s\nc : α\nhc : c ∈ s\n⊢ ¬Disjoint b c\n[PROOFSTEP]\nexact hs hb hc\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\n⊢ Intersecting s ↔ (Set.Pairwise s fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}\n[PROOFSTEP]\nrefine' ⟨fun h => ⟨fun a ha b hb _ => h ha hb, _⟩, fun h a ha b hb hab => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\nh : Intersecting s\n⊢ s ≠ {⊥}\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\nt : Set α\na b c : α\nh : Intersecting {⊥}\n⊢ False\n[PROOFSTEP]\nexact intersecting_singleton.1 h rfl\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nh : (Set.Pairwise s fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}\na : α\nha : a ∈ s\nb : α\nhb : b ∈ s\nhab : Disjoint a b\n⊢ False\n[PROOFSTEP]\nhave := h.1.eq ha hb (Classical.not_not.2 hab)\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nh : (Set.Pairwise s fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}\na : α\nha : a ∈ s\nb : α\nhb : b ∈ s\nhab : Disjoint a b\nthis : a = b\n⊢ False\n[PROOFSTEP]\nrw [this, disjoint_self] at hab \n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nh : (Set.Pairwise s fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}\na : α\nha : a ∈ s\nb : α\nhb : b ∈ s\nhab : b = ⊥\nthis : a = b\n⊢ False\n[PROOFSTEP]\nrw [hab] at hb \n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nh : (Set.Pairwise s fun a b => ¬Disjoint a b) ∧ s ≠ {⊥}\na : α\nha : a ∈ s\nb : α\nhb : ⊥ ∈ s\nhab : b = ⊥\nthis : a = b\n⊢ False\n[PROOFSTEP]\nexact h.2 (eq_singleton_iff_unique_mem.2 ⟨hb, fun c hc => not_ne_iff.1 fun H => h.1 hb hc H.symm disjoint_bot_left⟩)\n[GOAL]\nα : Type u_1\ninst✝² : SemilatticeInf α\ninst✝¹ : OrderBot α\ns✝ t : Set α\na b c : α\ninst✝ : Subsingleton α\ns : Set α\n⊢ Intersecting s ↔ s = ∅\n[PROOFSTEP]\nrefine'\n  subsingleton_of_subsingleton.intersecting.trans\n    ⟨not_imp_comm.2 fun h => subsingleton_of_subsingleton.eq_singleton_of_mem _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ninst✝² : SemilatticeInf α\ninst✝¹ : OrderBot α\ns✝ t : Set α\na b c : α\ninst✝ : Subsingleton α\ns : Set α\nh : ¬s = ∅\n⊢ ⊥ ∈ s\n[PROOFSTEP]\nobtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 h\n[GOAL]\ncase refine'_1.intro\nα : Type u_1\ninst✝² : SemilatticeInf α\ninst✝¹ : OrderBot α\ns✝ t : Set α\na✝ b c : α\ninst✝ : Subsingleton α\ns : Set α\nh : ¬s = ∅\na : α\nha : a ∈ s\n⊢ ⊥ ∈ s\n[PROOFSTEP]\nrwa [Subsingleton.elim ⊥ a]\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝² : SemilatticeInf α\ninst✝¹ : OrderBot α\ns✝ t : Set α\na b c : α\ninst✝ : Subsingleton α\ns : Set α\n⊢ s = ∅ → s ≠ {⊥}\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase refine'_2\nα : Type u_1\ninst✝² : SemilatticeInf α\ninst✝¹ : OrderBot α\ns t : Set α\na b c : α\ninst✝ : Subsingleton α\n⊢ ∅ ≠ {⊥}\n[PROOFSTEP]\nexact (Set.singleton_nonempty _).ne_empty.symm\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\nhs : Intersecting s\nh : ∀ (t : Set α), Intersecting t → s ⊆ t → s = t\n⊢ IsUpperSet s\n[PROOFSTEP]\nclassical\nrintro a b hab ha\nrw [h (Insert.insert b s) _ (subset_insert _ _)]\n· exact mem_insert _ _\nexact hs.insert (mt (eq_bot_mono hab) <| hs.ne_bot ha) fun c hc hbc => hs ha hc <| hbc.mono_left hab\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na b c : α\nhs : Intersecting s\nh : ∀ (t : Set α), Intersecting t → s ⊆ t → s = t\n⊢ IsUpperSet s\n[PROOFSTEP]\nrintro a b hab ha\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nhs : Intersecting s\nh : ∀ (t : Set α), Intersecting t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ s\n⊢ b ∈ s\n[PROOFSTEP]\nrw [h (Insert.insert b s) _ (subset_insert _ _)]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nhs : Intersecting s\nh : ∀ (t : Set α), Intersecting t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ s\n⊢ b ∈ insert b s\n[PROOFSTEP]\nexact mem_insert _ _\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns t : Set α\na✝ b✝ c : α\nhs : Intersecting s\nh : ∀ (t : Set α), Intersecting t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ s\n⊢ Intersecting (insert b s)\n[PROOFSTEP]\nexact hs.insert (mt (eq_bot_mono hab) <| hs.ne_bot ha) fun c hc hbc => hs ha hc <| hbc.mono_left hab\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na b c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ IsUpperSet ↑s\n[PROOFSTEP]\nclassical\nrintro a b hab ha\nrw [h (Insert.insert b s) _ (Finset.subset_insert _ _)]\n· exact mem_insert_self _ _\nrw [coe_insert]\nexact hs.insert (mt (eq_bot_mono hab) <| hs.ne_bot ha) fun c hc hbc => hs ha hc <| hbc.mono_left hab\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na b c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ IsUpperSet ↑s\n[PROOFSTEP]\nrintro a b hab ha\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na✝ b✝ c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ ↑s\n⊢ b ∈ ↑s\n[PROOFSTEP]\nrw [h (Insert.insert b s) _ (Finset.subset_insert _ _)]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na✝ b✝ c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ ↑s\n⊢ b ∈ ↑(insert b s)\n[PROOFSTEP]\nexact mem_insert_self _ _\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na✝ b✝ c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ ↑s\n⊢ Intersecting ↑(insert b s)\n[PROOFSTEP]\nrw [coe_insert]\n[GOAL]\nα : Type u_1\ninst✝¹ : SemilatticeInf α\ninst✝ : OrderBot α\ns✝ t : Set α\na✝ b✝ c : α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na b : α\nhab : a ≤ b\nha : a ∈ ↑s\n⊢ Intersecting (insert b ↑s)\n[PROOFSTEP]\nexact hs.insert (mt (eq_bot_mono hab) <| hs.ne_bot ha) fun c hc hbc => hs ha hc <| hbc.mono_left hab\n[GOAL]\nα : Type u_1\ninst✝ : BooleanAlgebra α\ns : Finset α\nhs : Intersecting ↑s\n⊢ Disjoint s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)\n[PROOFSTEP]\nrw [Finset.disjoint_left]\n[GOAL]\nα : Type u_1\ninst✝ : BooleanAlgebra α\ns : Finset α\nhs : Intersecting ↑s\n⊢ ∀ ⦃a : α⦄, a ∈ s → ¬a ∈ map { toFun := compl, inj' := (_ : Function.Injective compl) } s\n[PROOFSTEP]\nrintro x hx hxc\n[GOAL]\nα : Type u_1\ninst✝ : BooleanAlgebra α\ns : Finset α\nhs : Intersecting ↑s\nx : α\nhx : x ∈ s\nhxc : x ∈ map { toFun := compl, inj' := (_ : Function.Injective compl) } s\n⊢ False\n[PROOFSTEP]\nobtain ⟨x, hx', rfl⟩ := mem_map.mp hxc\n[GOAL]\ncase intro.intro\nα : Type u_1\ninst✝ : BooleanAlgebra α\ns : Finset α\nhs : Intersecting ↑s\nx : α\nhx' : x ∈ s\nhx : ↑{ toFun := compl, inj' := (_ : Function.Injective compl) } x ∈ s\nhxc :\n  ↑{ toFun := compl, inj' := (_ : Function.Injective compl) } x ∈\n    map { toFun := compl, inj' := (_ : Function.Injective compl) } s\n⊢ False\n[PROOFSTEP]\nexact hs.not_compl_mem hx' hx\n[GOAL]\nα : Type u_1\ninst✝¹ : BooleanAlgebra α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ 2 * card s ≤ Fintype.card α\n[PROOFSTEP]\nclassical\nrefine' (s.disjUnion _ hs.disjoint_map_compl).card_le_univ.trans_eq' _\nrw [two_mul, card_disjUnion, card_map]\n[GOAL]\nα : Type u_1\ninst✝¹ : BooleanAlgebra α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ 2 * card s ≤ Fintype.card α\n[PROOFSTEP]\nrefine' (s.disjUnion _ hs.disjoint_map_compl).card_le_univ.trans_eq' _\n[GOAL]\nα : Type u_1\ninst✝¹ : BooleanAlgebra α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ 2 * card s =\n    card\n      (disjUnion s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)\n        (_ : Disjoint s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)))\n[PROOFSTEP]\nrw [two_mul, card_disjUnion, card_map]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ (∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t) ↔ 2 * card s = Fintype.card α\n[PROOFSTEP]\nclassical\nrefine'\n  ⟨fun h => _, fun h t ht hst =>\n    Finset.eq_of_subset_of_card_le hst <| le_of_mul_le_mul_left (ht.card_le.trans_eq h.symm) two_pos⟩\nsuffices s.disjUnion (s.map ⟨compl, compl_injective⟩) hs.disjoint_map_compl = Finset.univ by\n  rw [Fintype.card, ← this, two_mul, card_disjUnion, card_map]\nrw [← coe_eq_univ, disjUnion_eq_union, coe_union, coe_map, Function.Embedding.coeFn_mk,\n  image_eq_preimage_of_inverse compl_compl compl_compl]\nrefine' eq_univ_of_forall fun a => _\nsimp_rw [mem_union, mem_preimage]\nby_contra' ha\nrefine' s.ne_insert_of_not_mem _ ha.1 (h _ _ <| s.subset_insert _)\nrw [coe_insert]\nrefine' hs.insert _ fun b hb hab => ha.2 <| (hs.isUpperSet' h) hab.le_compl_left hb\nrintro rfl\nhave := h {⊤} (by rw [coe_singleton]; exact intersecting_singleton.2 top_ne_bot)\nrw [compl_bot] at ha \nrw [coe_eq_empty.1 ((hs.isUpperSet' h).not_top_mem.1 ha.2)] at this \nexact Finset.singleton_ne_empty _ (this <| Finset.empty_subset _).symm\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ (∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t) ↔ 2 * card s = Fintype.card α\n[PROOFSTEP]\nrefine'\n  ⟨fun h => _, fun h t ht hst =>\n    Finset.eq_of_subset_of_card_le hst <| le_of_mul_le_mul_left (ht.card_le.trans_eq h.symm) two_pos⟩\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ 2 * card s = Fintype.card α\n[PROOFSTEP]\nsuffices s.disjUnion (s.map ⟨compl, compl_injective⟩) hs.disjoint_map_compl = Finset.univ by\n  rw [Fintype.card, ← this, two_mul, card_disjUnion, card_map]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nthis :\n  disjUnion s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)\n      (_ : Disjoint s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)) =\n    Finset.univ\n⊢ 2 * card s = Fintype.card α\n[PROOFSTEP]\nrw [Fintype.card, ← this, two_mul, card_disjUnion, card_map]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ disjUnion s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)\n      (_ : Disjoint s (map { toFun := compl, inj' := (_ : Function.Injective compl) } s)) =\n    Finset.univ\n[PROOFSTEP]\nrw [← coe_eq_univ, disjUnion_eq_union, coe_union, coe_map, Function.Embedding.coeFn_mk,\n  image_eq_preimage_of_inverse compl_compl compl_compl]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ ↑s ∪ compl ⁻¹' ↑s = univ\n[PROOFSTEP]\nrefine' eq_univ_of_forall fun a => _\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\n⊢ a ∈ ↑s ∪ compl ⁻¹' ↑s\n[PROOFSTEP]\nsimp_rw [mem_union, mem_preimage]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\n⊢ a ∈ ↑s ∨ aᶜ ∈ ↑s\n[PROOFSTEP]\nby_contra' ha\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\nha : ¬a ∈ ↑s ∧ ¬aᶜ ∈ ↑s\n⊢ False\n[PROOFSTEP]\nrefine' s.ne_insert_of_not_mem _ ha.1 (h _ _ <| s.subset_insert _)\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\nha : ¬a ∈ ↑s ∧ ¬aᶜ ∈ ↑s\n⊢ Intersecting ↑(insert a s)\n[PROOFSTEP]\nrw [coe_insert]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\nha : ¬a ∈ ↑s ∧ ¬aᶜ ∈ ↑s\n⊢ Intersecting (insert a ↑s)\n[PROOFSTEP]\nrefine' hs.insert _ fun b hb hab => ha.2 <| (hs.isUpperSet' h) hab.le_compl_left hb\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\na : α\nha : ¬a ∈ ↑s ∧ ¬aᶜ ∈ ↑s\n⊢ a ≠ ⊥\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊥ᶜ ∈ ↑s\n⊢ False\n[PROOFSTEP]\nhave := h {⊤} (by rw [coe_singleton]; exact intersecting_singleton.2 top_ne_bot)\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊥ᶜ ∈ ↑s\n⊢ Intersecting ↑{⊤}\n[PROOFSTEP]\nrw [coe_singleton]\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊥ᶜ ∈ ↑s\n⊢ Intersecting {⊤}\n[PROOFSTEP]\nexact intersecting_singleton.2 top_ne_bot\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊥ᶜ ∈ ↑s\nthis : s ⊆ {⊤} → s = {⊤}\n⊢ False\n[PROOFSTEP]\nrw [compl_bot] at ha \n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊤ ∈ ↑s\nthis : s ⊆ {⊤} → s = {⊤}\n⊢ False\n[PROOFSTEP]\nrw [coe_eq_empty.1 ((hs.isUpperSet' h).not_top_mem.1 ha.2)] at this \n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\nha : ¬⊥ ∈ ↑s ∧ ¬⊤ ∈ ↑s\nthis : ∅ ⊆ {⊤} → ∅ = {⊤}\n⊢ False\n[PROOFSTEP]\nexact Finset.singleton_ne_empty _ (this <| Finset.empty_subset _).symm\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nhave := hs.card_le\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nthis : 2 * card s ≤ Fintype.card α\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nrw [mul_comm, ← Nat.le_div_iff_mul_le' two_pos] at this \n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nhs : Intersecting ↑s\nthis : card s ≤ Fintype.card α / 2\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nrevert hs\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nthis : card s ≤ Fintype.card α / 2\n⊢ Intersecting ↑s → ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nrefine' s.strongDownwardInductionOn _ this\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns : Finset α\nthis : card s ≤ Fintype.card α / 2\n⊢ ∀ (t₁ : Finset α),\n    (∀ {t₂ : Finset α},\n        card t₂ ≤ Fintype.card α / 2 →\n          t₁ ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t) →\n      card t₁ ≤ Fintype.card α / 2 → Intersecting ↑t₁ → ∃ t, t₁ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nrintro s ih _hcard hs\n[GOAL]\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nby_cases h : ∀ t : Finset α, (t : Set α).Intersecting → s ⊆ t → s = t\n[GOAL]\ncase pos\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nh : ∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nexact ⟨s, Subset.rfl, hs.is_max_iff_card_eq.1 h, hs⟩\n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nh : ¬∀ (t : Finset α), Intersecting ↑t → s ⊆ t → s = t\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\npush_neg at h \n[GOAL]\ncase neg\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nh : ∃ t, Intersecting ↑t ∧ s ⊆ t ∧ s ≠ t\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nobtain ⟨t, ht, hst⟩ := h\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nt : Finset α\nht : Intersecting ↑t\nhst : s ⊆ t ∧ s ≠ t\n⊢ ∃ t, s ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n[PROOFSTEP]\nrefine' (ih _ (_root_.ssubset_iff_subset_ne.2 hst) ht).imp fun u => And.imp_left hst.1.trans\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nt : Finset α\nht : Intersecting ↑t\nhst : s ⊆ t ∧ s ≠ t\n⊢ card t ≤ Fintype.card α / 2\n[PROOFSTEP]\nrw [Nat.le_div_iff_mul_le' two_pos, mul_comm]\n[GOAL]\ncase neg.intro.intro\nα : Type u_1\ninst✝² : BooleanAlgebra α\ninst✝¹ : Nontrivial α\ninst✝ : Fintype α\ns✝ : Finset α\nthis : card s✝ ≤ Fintype.card α / 2\ns : Finset α\nih :\n  ∀ {t₂ : Finset α},\n    card t₂ ≤ Fintype.card α / 2 →\n      s ⊂ t₂ → Intersecting ↑t₂ → ∃ t, t₂ ⊆ t ∧ 2 * card t = Fintype.card α ∧ Intersecting ↑t\n_hcard : card s ≤ Fintype.card α / 2\nhs : Intersecting ↑s\nt : Finset α\nht : Intersecting ↑t\nhst : s ⊆ t ∧ s ≠ t\n⊢ 2 * card t ≤ Fintype.card α\n[PROOFSTEP]\nexact ht.card_le\n", "meta": {"mathlib_filename": "Mathlib.Combinatorics.SetFamily.Intersecting", "llama_tokens": 10481, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5389832206876841, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.2631765570048666}}
{"text": "[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\n⊢ (X_1 : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj X).obj X_1 ⟶ (Functor.empty C).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\n⊢ (X_1 : Discrete PEmpty) → (Functor.empty C).obj X_1 ⟶ ((Functor.const (Discrete PEmpty)).obj X).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ (X : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj Y).obj X ⟶ F.obj X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ ∀ ⦃X Y_1 : Discrete PEmpty⦄ (f : X ⟶ Y_1),\n    ((Functor.const (Discrete PEmpty)).obj Y).map f ≫ id (Discrete.casesOn Y_1 fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X fun as => False.elim (_ : False)) ≫ F.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nt : IsLimit { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }\nX : C\n⊢ (X_1 : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj X).obj X_1 ⟶ F.obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nt : IsLimit { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }\nX : C\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    ((Functor.const (Discrete PEmpty)).obj X).map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ F.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nt : IsLimit { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }\nX : C\nf : X ⟶ Y\n⊢ (X_1 : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj X).obj X_1 ⟶ F.obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nt : IsLimit { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }\nX : C\nf : X ⟶ Y\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    ((Functor.const (Discrete PEmpty)).obj X).map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ F.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nt : IsLimit { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }\nX : C\nf : X ⟶ Y\n⊢ ∀ (j : Discrete PEmpty),\n    f ≫\n        NatTrans.app { pt := Y, π := NatTrans.mk fun X => id (Discrete.casesOn X fun as => False.elim (_ : False)) }.π\n          j =\n      NatTrans.app { pt := X, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }.π\n        j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ Function.LeftInverse (fun u => IsLimit.mk fun s => default) fun t X =>\n    {\n      toInhabited :=\n        {\n          default :=\n            IsLimit.lift t\n              { pt := X, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) } },\n      uniq :=\n        (_ :\n          ∀ (f : X ⟶ Y),\n            f =\n              IsLimit.lift t\n                { pt := X, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }) }\n[PROOFSTEP]\ndsimp [Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ ∀ (x : IsLimit { pt := Y, π := NatTrans.mk fun X => False.elim (_ : False) }),\n    (IsLimit.mk fun s => IsLimit.lift x { pt := s.pt, π := NatTrans.mk fun X_1 => False.elim (_ : False) }) = x\n[PROOFSTEP]\nintro x\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nx : IsLimit { pt := Y, π := NatTrans.mk fun X => False.elim (_ : False) }\n⊢ (IsLimit.mk fun s => IsLimit.lift x { pt := s.pt, π := NatTrans.mk fun X_1 => False.elim (_ : False) }) = x\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ Function.RightInverse (fun u => IsLimit.mk fun s => default) fun t X =>\n    {\n      toInhabited :=\n        {\n          default :=\n            IsLimit.lift t\n              { pt := X, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) } },\n      uniq :=\n        (_ :\n          ∀ (f : X ⟶ Y),\n            f =\n              IsLimit.lift t\n                { pt := X, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }) }\n[PROOFSTEP]\ndsimp [Function.RightInverse, Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\n⊢ ∀ (x : (X : C) → Unique (X ⟶ Y)),\n    (fun X => { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ Y), f = default) }) = x\n[PROOFSTEP]\nintro u\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nu : (X : C) → Unique (X ⟶ Y)\n⊢ (fun X => { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ Y), f = default) }) = u\n[PROOFSTEP]\nfunext X\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nY : C\nu : (X : C) → Unique (X ⟶ Y)\nX : C\n⊢ { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ Y), f = default) } = u X\n[PROOFSTEP]\nsimp only\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ (X_1 : Discrete PEmpty) → F.obj X_1 ⟶ ((Functor.const (Discrete PEmpty)).obj X).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    F.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ ((Functor.const (Discrete PEmpty)).obj X).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX✝ : C\nt : IsColimit { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }\nX : C\n⊢ (X_1 : Discrete PEmpty) → F.obj X_1 ⟶ ((Functor.const (Discrete PEmpty)).obj X).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX✝ : C\nt : IsColimit { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }\nX : C\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    F.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ ((Functor.const (Discrete PEmpty)).obj X).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX✝ : C\nt : IsColimit { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }\nX : C\nf : X✝ ⟶ X\n⊢ (X_1 : Discrete PEmpty) → F.obj X_1 ⟶ ((Functor.const (Discrete PEmpty)).obj X).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX✝ : C\nt : IsColimit { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }\nX : C\nf : X✝ ⟶ X\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    F.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ ((Functor.const (Discrete PEmpty)).obj X).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX✝ : C\nt : IsColimit { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }\nX : C\nf : X✝ ⟶ X\n⊢ ∀ (j : Discrete PEmpty),\n    NatTrans.app { pt := X✝, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) }.ι\n          j ≫\n        f =\n      NatTrans.app { pt := X, ι := NatTrans.mk fun X_2 => id (Discrete.casesOn X_2 fun as => False.elim (_ : False)) }.ι\n        j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ Function.LeftInverse (fun u => IsColimit.mk fun s => default) fun t X_1 =>\n    {\n      toInhabited :=\n        {\n          default :=\n            IsColimit.desc t\n              { pt := X_1, ι := NatTrans.mk fun X_2 => id (Discrete.casesOn X_2 fun as => False.elim (_ : False)) } },\n      uniq :=\n        (_ :\n          ∀ (f : X ⟶ X_1),\n            f =\n              IsColimit.desc t\n                { pt := X_1, ι := NatTrans.mk fun X_2 => id (Discrete.casesOn X_2 fun as => False.elim (_ : False)) }) }\n[PROOFSTEP]\ndsimp [Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ ∀ (x : IsColimit { pt := X, ι := NatTrans.mk fun X_1 => False.elim (_ : False) }),\n    (IsColimit.mk fun s => IsColimit.desc x { pt := s.pt, ι := NatTrans.mk fun X_2 => False.elim (_ : False) }) = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\nx✝ : IsColimit { pt := X, ι := NatTrans.mk fun X_1 => False.elim (_ : False) }\n⊢ (IsColimit.mk fun s => IsColimit.desc x✝ { pt := s.pt, ι := NatTrans.mk fun X_2 => False.elim (_ : False) }) = x✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ Function.RightInverse (fun u => IsColimit.mk fun s => default) fun t X_1 =>\n    {\n      toInhabited :=\n        {\n          default :=\n            IsColimit.desc t\n              { pt := X_1, ι := NatTrans.mk fun X_2 => id (Discrete.casesOn X_2 fun as => False.elim (_ : False)) } },\n      uniq :=\n        (_ :\n          ∀ (f : X ⟶ X_1),\n            f =\n              IsColimit.desc t\n                { pt := X_1, ι := NatTrans.mk fun X_2 => id (Discrete.casesOn X_2 fun as => False.elim (_ : False)) }) }\n[PROOFSTEP]\ndsimp [Function.RightInverse, Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\n⊢ ∀ (x : (Y : C) → Unique (X ⟶ Y)),\n    (fun X_1 => { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ X_1), f = default) }) = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\nx✝ : (Y : C) → Unique (X ⟶ Y)\n⊢ (fun X_1 => { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ X_1), f = default) }) = x✝\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nF : Discrete PEmpty ⥤ C\nX : C\nx✝¹ : (Y : C) → Unique (X ⟶ Y)\nx✝ : C\n⊢ { toInhabited := { default := default }, uniq := (_ : ∀ (f : X ⟶ x✝), f = default) } = x✝¹ x✝\n[PROOFSTEP]\nsimp only\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsTerminal X\nf g : Y ⟶ X\n⊢ ∀ (j : Discrete PEmpty), f ≫ NatTrans.app (asEmptyCone X).π j = g ≫ NatTrans.app (asEmptyCone X).π j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsInitial X\nf g : X ⟶ Y\n⊢ ∀ (j : Discrete PEmpty), NatTrans.app (asEmptyCocone X).ι j ≫ f = NatTrans.app (asEmptyCocone X).ι j ≫ g\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsTerminal X\nf : X ⟶ Y\n⊢ Mono f\n[PROOFSTEP]\nhaveI := t.isSplitMono_from f\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsTerminal X\nf : X ⟶ Y\nthis : IsSplitMono f\n⊢ Mono f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsInitial X\nf : Y ⟶ X\n⊢ Epi f\n[PROOFSTEP]\nhaveI := t.isSplitEpi_to f\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : C\nt : IsInitial X\nf : Y ⟶ X\nthis : IsSplitEpi f\n⊢ Epi f\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\n⊢ (X : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj c.pt).obj X ⟶ F₁.obj X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\n⊢ ∀ ⦃X Y : Discrete PEmpty⦄ (f : X ⟶ Y),\n    ((Functor.const (Discrete PEmpty)).obj c.pt).map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X fun as => False.elim (_ : False)) ≫ F₁.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\nf : c.pt ⟶ c₂.pt\nx✝ : ∀ (j : Discrete PEmpty), f ≫ NatTrans.app c₂.π j = NatTrans.app c.π j\n⊢ f =\n    (fun c =>\n        IsLimit.lift hl\n            { pt := c.pt, π := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) } ≫\n          hi.hom)\n      c\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\nf : c.pt ⟶ c₂.pt\nx✝ : ∀ (j : Discrete PEmpty), f ≫ NatTrans.app c₂.π j = NatTrans.app c.π j\n⊢ f = IsLimit.lift hl { pt := c.pt, π := NatTrans.mk fun X_1 => False.elim (_ : False) } ≫ hi.hom\n[PROOFSTEP]\nrw [← hl.uniq _ (f ≫ hi.inv) _]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\nf : c.pt ⟶ c₂.pt\nx✝ : ∀ (j : Discrete PEmpty), f ≫ NatTrans.app c₂.π j = NatTrans.app c.π j\n⊢ f = (f ≫ hi.inv) ≫ hi.hom\n[PROOFSTEP]\nsimp only [Category.assoc, Iso.inv_hom_id, Category.comp_id]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nhl : IsLimit c₁\nc₂ : Cone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cone F₂\nf : c.pt ⟶ c₂.pt\nx✝ : ∀ (j : Discrete PEmpty), f ≫ NatTrans.app c₂.π j = NatTrans.app c.π j\n⊢ ∀ (j : Discrete PEmpty),\n    (f ≫ hi.inv) ≫ NatTrans.app c₁.π j =\n      NatTrans.app { pt := c.pt, π := NatTrans.mk fun X_1 => False.elim (_ : False) }.π j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ Function.LeftInverse (fun hl => isLimitChangeEmptyCone C hl c₁ h.symm) fun hl => isLimitChangeEmptyCone C hl c₂ h\n[PROOFSTEP]\ndsimp [Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ ∀ (x : IsLimit c₁), isLimitChangeEmptyCone C (isLimitChangeEmptyCone C x c₂ h) c₁ h.symm = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsLimit c₁\n⊢ isLimitChangeEmptyCone C (isLimitChangeEmptyCone C x✝ c₂ h) c₁ h.symm = x✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ Function.RightInverse (fun hl => isLimitChangeEmptyCone C hl c₁ h.symm) fun hl => isLimitChangeEmptyCone C hl c₂ h\n[PROOFSTEP]\ndsimp [Function.LeftInverse, Function.RightInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ ∀ (x : IsLimit c₂), isLimitChangeEmptyCone C (isLimitChangeEmptyCone C x c₁ h.symm) c₂ h = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsLimit c₂\n⊢ isLimitChangeEmptyCone C (isLimitChangeEmptyCone C x✝ c₁ h.symm) c₂ h = x✝\n[PROOFSTEP]\nfunext\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cone F₁\nc₂ : Cone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsLimit c₂\n⊢ isLimitChangeEmptyCone C (isLimitChangeEmptyCone C x✝ c₁ h.symm) c₂ h = x✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nh : HasLimit F₁\n⊢ (X : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj (limit F₁)).obj X ⟶ F₂.obj X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nh : HasLimit F₁\n⊢ ∀ ⦃X Y : Discrete PEmpty⦄ (f : X ⟶ Y),\n    ((Functor.const (Discrete PEmpty)).obj (limit F₁)).map f ≫\n        id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X fun as => False.elim (_ : False)) ≫ F₂.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\n⊢ (X : Discrete PEmpty) → F₁.obj X ⟶ ((Functor.const (Discrete PEmpty)).obj c.pt).obj X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\n⊢ ∀ ⦃X Y : Discrete PEmpty⦄ (f : X ⟶ Y),\n    F₁.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X fun as => False.elim (_ : False)) ≫ ((Functor.const (Discrete PEmpty)).obj c.pt).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\nf : c₂.pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app c₂.ι j ≫ f = NatTrans.app c.ι j\n⊢ f =\n    (fun c =>\n        hi.inv ≫\n          IsColimit.desc hl\n            { pt := c.pt, ι := NatTrans.mk fun X_1 => id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) })\n      c\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\nf : c₂.pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app c₂.ι j ≫ f = NatTrans.app c.ι j\n⊢ f = hi.inv ≫ IsColimit.desc hl { pt := c.pt, ι := NatTrans.mk fun X_1 => False.elim (_ : False) }\n[PROOFSTEP]\nrw [← hl.uniq _ (hi.hom ≫ f) _]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\nf : c₂.pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app c₂.ι j ≫ f = NatTrans.app c.ι j\n⊢ f = hi.inv ≫ hi.hom ≫ f\n[PROOFSTEP]\nsimp only [Iso.inv_hom_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nhl : IsColimit c₁\nc₂ : Cocone F₂\nhi : c₁.pt ≅ c₂.pt\nc : Cocone F₂\nf : c₂.pt ⟶ c.pt\nx✝ : ∀ (j : Discrete PEmpty), NatTrans.app c₂.ι j ≫ f = NatTrans.app c.ι j\n⊢ ∀ (j : Discrete PEmpty),\n    NatTrans.app c₁.ι j ≫ hi.hom ≫ f =\n      NatTrans.app { pt := c.pt, ι := NatTrans.mk fun X_1 => False.elim (_ : False) }.ι j\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ Function.LeftInverse (fun hl => isColimitChangeEmptyCocone C hl c₁ h.symm) fun hl =>\n    isColimitChangeEmptyCocone C hl c₂ h\n[PROOFSTEP]\ndsimp [Function.LeftInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ ∀ (x : IsColimit c₁), isColimitChangeEmptyCocone C (isColimitChangeEmptyCocone C x c₂ h) c₁ h.symm = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsColimit c₁\n⊢ isColimitChangeEmptyCocone C (isColimitChangeEmptyCocone C x✝ c₂ h) c₁ h.symm = x✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ Function.RightInverse (fun hl => isColimitChangeEmptyCocone C hl c₁ h.symm) fun hl =>\n    isColimitChangeEmptyCocone C hl c₂ h\n[PROOFSTEP]\ndsimp [Function.LeftInverse, Function.RightInverse]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\n⊢ ∀ (x : IsColimit c₂), isColimitChangeEmptyCocone C (isColimitChangeEmptyCocone C x c₁ h.symm) c₂ h = x\n[PROOFSTEP]\nintro\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsColimit c₂\n⊢ isColimitChangeEmptyCocone C (isColimitChangeEmptyCocone C x✝ c₁ h.symm) c₂ h = x✝\n[PROOFSTEP]\nfunext\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nc₁ : Cocone F₁\nc₂ : Cocone F₂\nh : c₁.pt ≅ c₂.pt\nx✝ : IsColimit c₂\n⊢ isColimitChangeEmptyCocone C (isColimitChangeEmptyCocone C x✝ c₁ h.symm) c₂ h = x✝\n[PROOFSTEP]\nsimp only [eq_iff_true_of_subsingleton]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nh : HasColimit F₁\n⊢ (X : Discrete PEmpty) → F₂.obj X ⟶ ((Functor.const (Discrete PEmpty)).obj (colimit F₁)).obj X\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nF₁ : Discrete PEmpty ⥤ C\nF₂ : Discrete PEmpty ⥤ C\nh : HasColimit F₁\n⊢ ∀ ⦃X Y : Discrete PEmpty⦄ (f : X ⟶ Y),\n    F₂.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X fun as => False.elim (_ : False)) ≫\n        ((Functor.const (Discrete PEmpty)).obj (colimit F₁)).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nh : IsTerminal X\nF : Discrete PEmpty ⥤ C\n⊢ (X_1 : Discrete PEmpty) → ((Functor.const (Discrete PEmpty)).obj X).obj X_1 ⟶ F.obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nh : IsTerminal X\nF : Discrete PEmpty ⥤ C\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    ((Functor.const (Discrete PEmpty)).obj X).map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ F.map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nh : IsInitial X\nF : Discrete PEmpty ⥤ C\n⊢ (X_1 : Discrete PEmpty) → F.obj X_1 ⟶ ((Functor.const (Discrete PEmpty)).obj X).obj X_1\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX : C\nh : IsInitial X\nF : Discrete PEmpty ⥤ C\n⊢ ∀ ⦃X_1 Y : Discrete PEmpty⦄ (f : X_1 ⟶ Y),\n    F.map f ≫ id (Discrete.casesOn Y fun as => False.elim (_ : False)) =\n      id (Discrete.casesOn X_1 fun as => False.elim (_ : False)) ≫ ((Functor.const (Discrete PEmpty)).obj X).map f\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : HasTerminal C\nP Q : C\nf : P ⟶ Q\n⊢ f ≫ from Q = from P\n[PROOFSTEP]\naesop\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : HasInitial C\nP Q : C\nf : P ⟶ Q\n⊢ to P ≫ f = to Q\n[PROOFSTEP]\naesop\n[GOAL]\nC✝ : Type u₁\ninst✝³ : Category.{v₁, u₁} C✝\nJ : Type u_1\ninst✝² : Category.{u_3, u_1} J\nC : Type u_2\ninst✝¹ : Category.{u_4, u_2} C\ninst✝ : HasTerminal C\nj : J\n⊢ limitConstTerminal.inv ≫ limit.π ((Functor.const J).obj (⊤_ C)) j = terminal.from (⊤_ C)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC✝ : Type u₁\ninst✝³ : Category.{v₁, u₁} C✝\nJ : Type u_1\ninst✝² : Category.{u_3, u_1} J\nC : Type u_2\ninst✝¹ : Category.{u_4, u_2} C\ninst✝ : HasInitial C\nj : J\n⊢ colimit.ι ((Functor.const J).obj (⊥_ C)) j ≫ colimitConstInitial.hom = initial.to (⊥_ C)\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : InitialMonoClass C\nI X : C\nhI : IsInitial I\nf : I ⟶ X\n⊢ Mono f\n[PROOFSTEP]\nrw [hI.hom_ext f (hI.to X)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\ninst✝ : InitialMonoClass C\nI X : C\nhI : IsInitial I\nf : I ⟶ X\n⊢ Mono (to hI X)\n[PROOFSTEP]\napply InitialMonoClass.isInitial_mono_from\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nI : C\nhI : IsInitial I\nh : ∀ (X : C), Mono (IsInitial.to hI X)\nI' X : C\nhI' : IsInitial I'\n⊢ Mono (IsInitial.to hI' X)\n[PROOFSTEP]\nrw [hI'.hom_ext (hI'.to X) ((hI'.uniqueUpToIso hI).hom ≫ hI.to X)]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nI : C\nhI : IsInitial I\nh : ∀ (X : C), Mono (IsInitial.to hI X)\nI' X : C\nhI' : IsInitial I'\n⊢ Mono ((IsInitial.uniqueUpToIso hI' hI).hom ≫ IsInitial.to hI X)\n[PROOFSTEP]\napply mono_comp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\nj j' : J\nk : j ⟶ j'\n⊢ ((Functor.const J).obj (F.obj X)).map k ≫ (fun j => F.map (IsInitial.to tX j)) j' =\n    (fun j => F.map (IsInitial.to tX j)) j ≫ F.map k\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\nj j' : J\nk : j ⟶ j'\n⊢ 𝟙 (F.obj X) ≫ F.map (IsInitial.to tX j') = F.map (IsInitial.to tX j) ≫ F.map k\n[PROOFSTEP]\nrw [← F.map_comp, Category.id_comp, tX.hom_ext (tX.to j ≫ k) (tX.to j')]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n⊢ m = (fun s => NatTrans.app s.π X) s\n[PROOFSTEP]\nconv_lhs => dsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n| m\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n| m\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n| m\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n⊢ m = (fun s => NatTrans.app s.π X) s\n[PROOFSTEP]\nsimp_rw [← w X, coneOfDiagramInitial_π_app, tX.hom_ext (tX.to X) (𝟙 _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n⊢ m = m ≫ F.map (𝟙 X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsInitial X\nF : J ⥤ C\ns : Cone F\nm : s.pt ⟶ (coneOfDiagramInitial tX F).pt\nw : ∀ (j : J), m ≫ NatTrans.app (coneOfDiagramInitial tX F).π j = NatTrans.app s.π j\n⊢ m = m ≫ F.map (𝟙 X)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsTerminal X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ ∀ ⦃X_1 Y : J⦄ (f : X_1 ⟶ Y),\n    ((Functor.const J).obj (F.obj X)).map f ≫ (fun i => inv (F.map (IsTerminal.from hX i))) Y =\n      (fun i => inv (F.map (IsTerminal.from hX i))) X_1 ≫ F.map f\n[PROOFSTEP]\nintro i j f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsTerminal X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\ni j : J\nf : i ⟶ j\n⊢ ((Functor.const J).obj (F.obj X)).map f ≫ (fun i => inv (F.map (IsTerminal.from hX i))) j =\n    (fun i => inv (F.map (IsTerminal.from hX i))) i ≫ F.map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsTerminal X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\ni j : J\nf : i ⟶ j\n⊢ 𝟙 (F.obj X) ≫ inv (F.map (IsTerminal.from hX j)) = inv (F.map (IsTerminal.from hX i)) ≫ F.map f\n[PROOFSTEP]\nsimp only [IsIso.eq_inv_comp, IsIso.comp_inv_eq, Category.id_comp, ← F.map_comp, hX.hom_ext (hX.from i) (f ≫ hX.from j)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\nj j' : J\nk : j ⟶ j'\n⊢ F.map k ≫ (fun j => F.map (IsTerminal.from tX j)) j' =\n    (fun j => F.map (IsTerminal.from tX j)) j ≫ ((Functor.const J).obj (F.obj X)).map k\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\nj j' : J\nk : j ⟶ j'\n⊢ F.map k ≫ F.map (IsTerminal.from tX j') = F.map (IsTerminal.from tX j) ≫ 𝟙 (F.obj X)\n[PROOFSTEP]\nrw [← F.map_comp, Category.comp_id, tX.hom_ext (k ≫ tX.from j') (tX.from j)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => NatTrans.app s.ι X) s\n[PROOFSTEP]\nconv_rhs =>\n  dsimp\n    -- Porting note: why do I need this much firepower?\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n| (fun s => NatTrans.app s.ι X) s\n[PROOFSTEP]\ndsimp\n    -- Porting note: why do I need this much firepower?\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n| (fun s => NatTrans.app s.ι X) s\n[PROOFSTEP]\ndsimp\n    -- Porting note: why do I need this much firepower?\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n| (fun s => NatTrans.app s.ι X) s\n[PROOFSTEP]\ndsimp\n  -- Porting note: why do I need this much firepower?\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = NatTrans.app s.ι X\n[PROOFSTEP]\nrw [← w X, coconeOfDiagramTerminal_ι_app, tX.hom_ext (tX.from X) (𝟙 _)]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nJ : Type u\ninst✝ : Category.{v, u} J\nX : J\ntX : IsTerminal X\nF : J ⥤ C\ns : Cocone F\nm : (coconeOfDiagramTerminal tX F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (coconeOfDiagramTerminal tX F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = F.map (𝟙 X) ≫ m\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsInitial X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ ∀ ⦃X_1 Y : J⦄ (f : X_1 ⟶ Y),\n    F.map f ≫ (fun i => inv (F.map (IsInitial.to hX i))) Y =\n      (fun i => inv (F.map (IsInitial.to hX i))) X_1 ≫ ((Functor.const J).obj (F.obj X)).map f\n[PROOFSTEP]\nintro i j f\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsInitial X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\ni j : J\nf : i ⟶ j\n⊢ F.map f ≫ (fun i => inv (F.map (IsInitial.to hX i))) j =\n    (fun i => inv (F.map (IsInitial.to hX i))) i ≫ ((Functor.const J).obj (F.obj X)).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nX : J\nhX : IsInitial X\nF : J ⥤ C\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\ni j : J\nf : i ⟶ j\n⊢ F.map f ≫ inv (F.map (IsInitial.to hX j)) = inv (F.map (IsInitial.to hX i)) ≫ 𝟙 (F.obj X)\n[PROOFSTEP]\nsimp only [IsIso.eq_inv_comp, IsIso.comp_inv_eq, Category.comp_id, ← F.map_comp, hX.hom_ext (hX.to i ≫ f) (hX.to j)]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝ : HasLimit F\n⊢ limit.π F j ≫ limit.lift F (coneOfDiagramInitial I F) = 𝟙 (limit F)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝ : HasLimit F\nj✝ : J\n⊢ (limit.π F j ≫ limit.lift F (coneOfDiagramInitial I F)) ≫ limit.π F j✝ = 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝ : HasLimit F\n⊢ limit.lift F (coneOfDiagramInitial I F) ≫ limit.π F j = 𝟙 (F.obj j)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝¹ : HasLimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ limit.π F j ≫ limit.lift F (coneOfDiagramTerminal I F) = 𝟙 (limit F)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝¹ : HasLimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\nj✝ : J\n⊢ (limit.π F j ≫ limit.lift F (coneOfDiagramTerminal I F)) ≫ limit.π F j✝ = 𝟙 (limit F) ≫ limit.π F j✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝¹ : HasLimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ limit.lift F (coneOfDiagramTerminal I F) ≫ limit.π F j = 𝟙 (F.obj j)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝ : HasColimit F\n⊢ colimit.ι F j ≫ colimit.desc F (coconeOfDiagramTerminal I F) = 𝟙 (F.obj j)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝ : HasColimit F\n⊢ colimit.desc F (coconeOfDiagramTerminal I F) ≫ colimit.ι F j = 𝟙 (colimit F)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nJ : Type u\ninst✝¹ : Category.{v, u} J\nj : J\nI : IsTerminal j\nF : J ⥤ C\ninst✝ : HasColimit F\nj✝ : J\n⊢ colimit.ι F j✝ ≫ colimit.desc F (coconeOfDiagramTerminal I F) ≫ colimit.ι F j = colimit.ι F j✝ ≫ 𝟙 (colimit F)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ colimit.ι F j ≫ colimit.desc F (coconeOfDiagramInitial I F) = 𝟙 (F.obj j) ∧\n    colimit.desc F (coconeOfDiagramInitial I F) ≫ colimit.ι F j = 𝟙 (colimit F)\n[PROOFSTEP]\nrefine ⟨?_, by ext; simp⟩\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ colimit.desc F (coconeOfDiagramInitial I F) ≫ colimit.ι F j = 𝟙 (colimit F)\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\nj✝ : J\n⊢ colimit.ι F j✝ ≫ colimit.desc F (coconeOfDiagramInitial I F) ≫ colimit.ι F j = colimit.ι F j✝ ≫ 𝟙 (colimit F)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ colimit.ι F j ≫ colimit.desc F (coconeOfDiagramInitial I F) = 𝟙 (F.obj j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ colimit.ι F j ≫ colimit.desc F (coconeOfDiagramInitial I F) = 𝟙 (F.obj j)\n[PROOFSTEP]\nsimp only [colimit.ι_desc, coconeOfDiagramInitial_pt, coconeOfDiagramInitial_ι_app, Functor.const_obj_obj,\n  IsInitial.to_self, Functor.map_id]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ inv (𝟙 (F.obj j)) = 𝟙 (F.obj j)\n[PROOFSTEP]\ndsimp [inv]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ Classical.choose (_ : ∃ inv, 𝟙 (F.obj j) ≫ inv = 𝟙 (F.obj j) ∧ inv ≫ 𝟙 (F.obj j) = 𝟙 (F.obj j)) = 𝟙 (F.obj j)\n[PROOFSTEP]\nsimp only [Category.id_comp, Category.comp_id, and_self]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\nJ : Type u\ninst✝² : Category.{v, u} J\nj : J\nI : IsInitial j\nF : J ⥤ C\ninst✝¹ : HasColimit F\ninst✝ : ∀ (i j : J) (f : i ⟶ j), IsIso (F.map f)\n⊢ Classical.choose (_ : ∃ x, (fun x => x = 𝟙 (F.obj j)) x) = 𝟙 (F.obj j)\n[PROOFSTEP]\napply @Classical.choose_spec _ (fun x => x = 𝟙 F.obj j) _\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Limits.Shapes.Terminal", "llama_tokens": 18448, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5851011542032312, "lm_q2_score": 0.44939263446475963, "lm_q1q2_score": 0.26294014911576163}}
{"text": "[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP : PresheafOfModules R\nX : Cᵒᵖ\n⊢ map P (𝟙 X) = id'\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP : PresheafOfModules R\nX : Cᵒᵖ\nx✝ : ↑(obj P X)\n⊢ ↑(map P (𝟙 X)) x✝ = ↑id' x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP : PresheafOfModules R\nX Y Z : Cᵒᵖ\nf : X ⟶ Y\ng : Y ⟶ Z\n⊢ map P (f ≫ g) = comp (map P g) (map P f)\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP : PresheafOfModules R\nX Y Z : Cᵒᵖ\nf : X ⟶ Y\ng : Y ⟶ Z\nx✝ : ↑(obj P X)\n⊢ ↑(map P (f ≫ g)) x✝ = ↑(comp (map P g) (map P f)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR✝ : Cᵒᵖ ⥤ RingCat\nP Q R : PresheafOfModules R✝\nf : Hom P Q\ng : Hom Q R\nx✝² : Cᵒᵖ\nx✝¹ : ↑(R✝.obj x✝²)\nx✝ : ↑(P.presheaf.obj x✝²)\n⊢ ↑(NatTrans.app (f.hom ≫ g.hom) x✝²) (x✝¹ • x✝) = x✝¹ • ↑(NatTrans.app (f.hom ≫ g.hom) x✝²) x✝\n[PROOFSTEP]\nsimp [Hom.map_smul]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP Q : PresheafOfModules R\nf g : P ⟶ Q\nw : ∀ (X : Cᵒᵖ), app f X = app g X\n⊢ f = g\n[PROOFSTEP]\ncases f\n[GOAL]\ncase mk\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP Q : PresheafOfModules R\ng : P ⟶ Q\nhom✝ : P.presheaf ⟶ Q.presheaf\nmap_smul✝ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)), ↑(NatTrans.app hom✝ X) (r • x) = r • ↑(NatTrans.app hom✝ X) x\nw : ∀ (X : Cᵒᵖ), app { hom := hom✝, map_smul := map_smul✝ } X = app g X\n⊢ { hom := hom✝, map_smul := map_smul✝ } = g\n[PROOFSTEP]\ncases g\n[GOAL]\ncase mk.mk\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP Q : PresheafOfModules R\nhom✝¹ : P.presheaf ⟶ Q.presheaf\nmap_smul✝¹ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)),\n    ↑(NatTrans.app hom✝¹ X) (r • x) = r • ↑(NatTrans.app hom✝¹ X) x\nhom✝ : P.presheaf ⟶ Q.presheaf\nmap_smul✝ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)), ↑(NatTrans.app hom✝ X) (r • x) = r • ↑(NatTrans.app hom✝ X) x\nw : ∀ (X : Cᵒᵖ), app { hom := hom✝¹, map_smul := map_smul✝¹ } X = app { hom := hom✝, map_smul := map_smul✝ } X\n⊢ { hom := hom✝¹, map_smul := map_smul✝¹ } = { hom := hom✝, map_smul := map_smul✝ }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase mk.mk.e_hom\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP Q : PresheafOfModules R\nhom✝¹ : P.presheaf ⟶ Q.presheaf\nmap_smul✝¹ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)),\n    ↑(NatTrans.app hom✝¹ X) (r • x) = r • ↑(NatTrans.app hom✝¹ X) x\nhom✝ : P.presheaf ⟶ Q.presheaf\nmap_smul✝ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)), ↑(NatTrans.app hom✝ X) (r • x) = r • ↑(NatTrans.app hom✝ X) x\nw : ∀ (X : Cᵒᵖ), app { hom := hom✝¹, map_smul := map_smul✝¹ } X = app { hom := hom✝, map_smul := map_smul✝ } X\n⊢ hom✝¹ = hom✝\n[PROOFSTEP]\next X x\n[GOAL]\ncase mk.mk.e_hom.w.h.w\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nR : Cᵒᵖ ⥤ RingCat\nP Q : PresheafOfModules R\nhom✝¹ : P.presheaf ⟶ Q.presheaf\nmap_smul✝¹ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)),\n    ↑(NatTrans.app hom✝¹ X) (r • x) = r • ↑(NatTrans.app hom✝¹ X) x\nhom✝ : P.presheaf ⟶ Q.presheaf\nmap_smul✝ :\n  ∀ (X : Cᵒᵖ) (r : ↑(R.obj X)) (x : ↑(P.presheaf.obj X)), ↑(NatTrans.app hom✝ X) (r • x) = r • ↑(NatTrans.app hom✝ X) x\nw : ∀ (X : Cᵒᵖ), app { hom := hom✝¹, map_smul := map_smul✝¹ } X = app { hom := hom✝, map_smul := map_smul✝ } X\nX : Cᵒᵖ\nx : ↑(P.presheaf.obj X)\n⊢ ↑(NatTrans.app hom✝¹ X) x = ↑(NatTrans.app hom✝ X) x\n[PROOFSTEP]\nexact LinearMap.congr_fun (w X) x\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Category.ModuleCat.Presheaf", "llama_tokens": 2184, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5851011542032312, "lm_q2_score": 0.4493926344647596, "lm_q1q2_score": 0.2629401491157616}}
{"text": "[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\na : R\nh : a ∈ closure s\nb : R\nih : ∃ L, (∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) ∧ List.sum (List.map List.prod L) = b\nL1 : List (List R)\nh1 : ∀ (l : List R), l ∈ L1 → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nx✝ : AddGroup.InClosure (Monoid.Closure s) (List.sum (List.map List.prod L1))\n⊢ List.sum (List.map List.prod (List.map (List.cons (-1)) L1)) = -List.sum (List.map List.prod L1)\n[PROOFSTEP]\nsimp only [List.map_map, (· ∘ ·), List.prod_cons, neg_one_mul]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\na : R\nh : a ∈ closure s\nb : R\nih : ∃ L, (∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) ∧ List.sum (List.map List.prod L) = b\nL1 : List (List R)\nh1 : ∀ (l : List R), l ∈ L1 → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nx✝ : AddGroup.InClosure (Monoid.Closure s) (List.sum (List.map List.prod L1))\n⊢ List.sum (List.map (fun x => -List.prod x) L1) = -List.sum (List.map List.prod L1)\n[PROOFSTEP]\nrefine' List.recOn L1 neg_zero.symm fun hd tl ih ↦ _\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\na : R\nh : a ∈ closure s\nb : R\nih✝ : ∃ L, (∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) ∧ List.sum (List.map List.prod L) = b\nL1 : List (List R)\nh1 : ∀ (l : List R), l ∈ L1 → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nx✝ : AddGroup.InClosure (Monoid.Closure s) (List.sum (List.map List.prod L1))\nhd : List R\ntl : List (List R)\nih : List.sum (List.map (fun x => -List.prod x) tl) = -List.sum (List.map List.prod tl)\n⊢ List.sum (List.map (fun x => -List.prod x) (hd :: tl)) = -List.sum (List.map List.prod (hd :: tl))\n[PROOFSTEP]\nrw [List.map_cons, List.sum_cons, ih, List.map_cons, List.sum_cons, neg_add]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\na : R\nh : a ∈ closure s\nr1 r2 : R\nih1 : ∃ L, (∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) ∧ List.sum (List.map List.prod L) = r1\nih2 : ∃ L, (∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) ∧ List.sum (List.map List.prod L) = r2\nL1 : List (List R)\nh1 : ∀ (l : List R), l ∈ L1 → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nL2 : List (List R)\nh2 : ∀ (l : List R), l ∈ L2 → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nx✝¹ : AddGroup.InClosure (Monoid.Closure s) (List.sum (List.map List.prod L1))\nx✝ : AddGroup.InClosure (Monoid.Closure s) (List.sum (List.map List.prod L2))\n⊢ List.sum (List.map List.prod (L1 ++ L2)) = List.sum (List.map List.prod L1) + List.sum (List.map List.prod L2)\n[PROOFSTEP]\nrw [List.map_append, List.sum_append]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nx : R\nhx : x ∈ closure s\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\n⊢ C x\n[PROOFSTEP]\nhave h0 : C 0 := add_neg_self (1 : R) ▸ ha h1 hneg1\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nx : R\nhx : x ∈ closure s\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\n⊢ C x\n[PROOFSTEP]\nrcases exists_list_of_mem_closure hx with ⟨L, HL, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhx : List.sum (List.map List.prod L) ∈ closure s\n⊢ C (List.sum (List.map List.prod L))\n[PROOFSTEP]\nclear hx\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\n⊢ C (List.sum (List.map List.prod L))\n[PROOFSTEP]\ninduction' L with hd tl ih\n[GOAL]\ncase intro.intro.nil\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nHL : ∀ (l : List R), l ∈ [] → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\n⊢ C (List.sum (List.map List.prod []))\n[PROOFSTEP]\nexact h0\n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : ∀ (l : List R), l ∈ hd :: tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\n⊢ C (List.sum (List.map List.prod (hd :: tl)))\n[PROOFSTEP]\nrw [List.forall_mem_cons] at HL \n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : (∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1) ∧ ∀ (x : List R), x ∈ tl → ∀ (x_1 : R), x_1 ∈ x → x_1 ∈ s ∨ x_1 = -1\n⊢ C (List.sum (List.map List.prod (hd :: tl)))\n[PROOFSTEP]\nsuffices C (List.prod hd) by\n  rw [List.map_cons, List.sum_cons]\n  exact ha this (ih HL.2)\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : (∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1) ∧ ∀ (x : List R), x ∈ tl → ∀ (x_1 : R), x_1 ∈ x → x_1 ∈ s ∨ x_1 = -1\nthis : C (List.prod hd)\n⊢ C (List.sum (List.map List.prod (hd :: tl)))\n[PROOFSTEP]\nrw [List.map_cons, List.sum_cons]\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : (∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1) ∧ ∀ (x : List R), x ∈ tl → ∀ (x_1 : R), x_1 ∈ x → x_1 ∈ s ∨ x_1 = -1\nthis : C (List.prod hd)\n⊢ C (List.prod hd + List.sum (List.map List.prod tl))\n[PROOFSTEP]\nexact ha this (ih HL.2)\n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : (∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1) ∧ ∀ (x : List R), x ∈ tl → ∀ (x_1 : R), x_1 ∈ x → x_1 ∈ s ∨ x_1 = -1\n⊢ C (List.prod hd)\n[PROOFSTEP]\nreplace HL := HL.1\n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\ntl : List (List R)\nih : (∀ (l : List R), l ∈ tl → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1) → C (List.sum (List.map List.prod tl))\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\n⊢ C (List.prod hd)\n[PROOFSTEP]\nclear ih tl\n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\n⊢ C (List.prod hd)\n[PROOFSTEP]\nsuffices ∃ L, (∀ x ∈ L, x ∈ s) ∧ (List.prod hd = List.prod L ∨ List.prod hd = -List.prod L)\n  by\n  rcases this with ⟨L, HL', HP | HP⟩ <;> rw [HP] <;> clear HP HL\n  · induction' L with hd tl ih\n    · exact h1\n    rw [List.forall_mem_cons] at HL' \n    rw [List.prod_cons]\n    exact hs _ HL'.1 _ (ih HL'.2)\n  · induction' L with hd tl ih\n    · exact hneg1\n    rw [List.prod_cons, neg_mul_eq_mul_neg]\n    rw [List.forall_mem_cons] at HL' \n    exact hs _ HL'.1 _ (ih HL'.2)\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nthis : ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod hd = List.prod L ∨ List.prod hd = -List.prod L)\n⊢ C (List.prod hd)\n[PROOFSTEP]\nrcases this with ⟨L, HL', HP | HP⟩\n[GOAL]\ncase intro.intro.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod hd = List.prod L\n⊢ C (List.prod hd)\n[PROOFSTEP]\nrw [HP]\n[GOAL]\ncase intro.intro.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod hd = -List.prod L\n⊢ C (List.prod hd)\n[PROOFSTEP]\nrw [HP]\n[GOAL]\ncase intro.intro.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod hd = List.prod L\n⊢ C (List.prod L)\n[PROOFSTEP]\nclear HP HL\n[GOAL]\ncase intro.intro.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod hd = -List.prod L\n⊢ C (-List.prod L)\n[PROOFSTEP]\nclear HP HL\n[GOAL]\ncase intro.intro.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd L : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\n⊢ C (List.prod L)\n[PROOFSTEP]\ninduction' L with hd tl ih\n[GOAL]\ncase intro.intro.inl.nil\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nHL' : ∀ (x : R), x ∈ [] → x ∈ s\n⊢ C (List.prod [])\n[PROOFSTEP]\nexact h1\n[GOAL]\ncase intro.intro.inl.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (List.prod tl)\nHL' : ∀ (x : R), x ∈ hd :: tl → x ∈ s\n⊢ C (List.prod (hd :: tl))\n[PROOFSTEP]\nrw [List.forall_mem_cons] at HL' \n[GOAL]\ncase intro.intro.inl.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (List.prod tl)\nHL' : hd ∈ s ∧ ∀ (x : R), x ∈ tl → x ∈ s\n⊢ C (List.prod (hd :: tl))\n[PROOFSTEP]\nrw [List.prod_cons]\n[GOAL]\ncase intro.intro.inl.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (List.prod tl)\nHL' : hd ∈ s ∧ ∀ (x : R), x ∈ tl → x ∈ s\n⊢ C (hd * List.prod tl)\n[PROOFSTEP]\nexact hs _ HL'.1 _ (ih HL'.2)\n[GOAL]\ncase intro.intro.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd L : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\n⊢ C (-List.prod L)\n[PROOFSTEP]\ninduction' L with hd tl ih\n[GOAL]\ncase intro.intro.inr.nil\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nHL' : ∀ (x : R), x ∈ [] → x ∈ s\n⊢ C (-List.prod [])\n[PROOFSTEP]\nexact hneg1\n[GOAL]\ncase intro.intro.inr.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (-List.prod tl)\nHL' : ∀ (x : R), x ∈ hd :: tl → x ∈ s\n⊢ C (-List.prod (hd :: tl))\n[PROOFSTEP]\nrw [List.prod_cons, neg_mul_eq_mul_neg]\n[GOAL]\ncase intro.intro.inr.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (-List.prod tl)\nHL' : ∀ (x : R), x ∈ hd :: tl → x ∈ s\n⊢ C (hd * -List.prod tl)\n[PROOFSTEP]\nrw [List.forall_mem_cons] at HL' \n[GOAL]\ncase intro.intro.inr.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ L : List R\nHL'✝ : ∀ (x : R), x ∈ L → x ∈ s\nhd : R\ntl : List R\nih : (∀ (x : R), x ∈ tl → x ∈ s) → C (-List.prod tl)\nHL' : hd ∈ s ∧ ∀ (x : R), x ∈ tl → x ∈ s\n⊢ C (hd * -List.prod tl)\n[PROOFSTEP]\nexact hs _ HL'.1 _ (ih HL'.2)\n[GOAL]\ncase intro.intro.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod hd = List.prod L ∨ List.prod hd = -List.prod L)\n[PROOFSTEP]\ninduction' hd with hd tl ih\n[GOAL]\ncase intro.intro.cons.nil\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd : List R\nHL✝ : ∀ (x : R), x ∈ hd → x ∈ s ∨ x = -1\nHL : ∀ (x : R), x ∈ [] → x ∈ s ∨ x = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod [] = List.prod L ∨ List.prod [] = -List.prod L)\n[PROOFSTEP]\nexact ⟨[], List.forall_mem_nil _, Or.inl rfl⟩\n[GOAL]\ncase intro.intro.cons.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : ∀ (x : R), x ∈ hd :: tl → x ∈ s ∨ x = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nrw [List.forall_mem_cons] at HL \n[GOAL]\ncase intro.intro.cons.cons\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nrcases ih HL.2 with ⟨L, HL', HP | HP⟩\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = List.prod L\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\ncases' HL.1 with hhd hhd\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = -List.prod L\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\ncases' HL.1 with hhd hhd\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inl.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = List.prod L\nhhd : hd ∈ s\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nexact ⟨hd :: L, List.forall_mem_cons.2 ⟨hhd, HL'⟩, Or.inl <| by rw [List.prod_cons, List.prod_cons, HP]⟩\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = List.prod L\nhhd : hd ∈ s\n⊢ List.prod (hd :: tl) = List.prod (hd :: L)\n[PROOFSTEP]\nrw [List.prod_cons, List.prod_cons, HP]\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inl.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = List.prod L\nhhd : hd = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nexact ⟨L, HL', Or.inr <| by rw [List.prod_cons, hhd, neg_one_mul, HP]⟩\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = List.prod L\nhhd : hd = -1\n⊢ List.prod (hd :: tl) = -List.prod L\n[PROOFSTEP]\nrw [List.prod_cons, hhd, neg_one_mul, HP]\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inr.inl\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = -List.prod L\nhhd : hd ∈ s\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nexact\n  ⟨hd :: L, List.forall_mem_cons.2 ⟨hhd, HL'⟩, Or.inr <| by rw [List.prod_cons, List.prod_cons, HP, neg_mul_eq_mul_neg]⟩\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = -List.prod L\nhhd : hd ∈ s\n⊢ List.prod (hd :: tl) = -List.prod (hd :: L)\n[PROOFSTEP]\nrw [List.prod_cons, List.prod_cons, HP, neg_mul_eq_mul_neg]\n[GOAL]\ncase intro.intro.cons.cons.intro.intro.inr.inr\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = -List.prod L\nhhd : hd = -1\n⊢ ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod (hd :: tl) = List.prod L ∨ List.prod (hd :: tl) = -List.prod L)\n[PROOFSTEP]\nexact ⟨L, HL', Or.inl <| by rw [List.prod_cons, hhd, HP, neg_one_mul, neg_neg]⟩\n[GOAL]\nR : Type u\ninst✝¹ : Ring R\ncR : Type u\ninst✝ : CommRing cR\ns : Set R\nC : R → Prop\nh1 : C 1\nhneg1 : C (-1)\nhs : ∀ (z : R), z ∈ s → ∀ (n : R), C n → C (z * n)\nha : ∀ {x y : R}, C x → C y → C (x + y)\nh0 : C 0\nL✝ : List (List R)\nHL✝¹ : ∀ (l : List R), l ∈ L✝ → ∀ (x : R), x ∈ l → x ∈ s ∨ x = -1\nhd✝ : List R\nHL✝ : ∀ (x : R), x ∈ hd✝ → x ∈ s ∨ x = -1\nhd : R\ntl : List R\nih :\n  (∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1) →\n    ∃ L, (∀ (x : R), x ∈ L → x ∈ s) ∧ (List.prod tl = List.prod L ∨ List.prod tl = -List.prod L)\nHL : (hd ∈ s ∨ hd = -1) ∧ ∀ (x : R), x ∈ tl → x ∈ s ∨ x = -1\nL : List R\nHL' : ∀ (x : R), x ∈ L → x ∈ s\nHP : List.prod tl = -List.prod L\nhhd : hd = -1\n⊢ List.prod (hd :: tl) = List.prod L\n[PROOFSTEP]\nrw [List.prod_cons, hhd, HP, neg_one_mul, neg_neg]\n[GOAL]\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\n⊢ ↑f '' closure s = closure (↑f '' s)\n[PROOFSTEP]\nrefine'\n  le_antisymm _ (closure_subset (RingHom.isSubring_image _ closure.isSubring) <| Set.image_subset _ subset_closure)\n[GOAL]\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\n⊢ ↑f '' closure s ≤ closure (↑f '' s)\n[PROOFSTEP]\nrintro _ ⟨x, hx, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ↑f x ∈ closure (↑f '' s)\n[PROOFSTEP]\napply AddGroup.InClosure.recOn (motive := fun {x} _ ↦ f x ∈ closure (f '' s)) hx _\n[GOAL]\ncase intro.intro.zero\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ↑f 0 ∈ closure (↑f '' s)\n[PROOFSTEP]\nintros\n[GOAL]\ncase intro.intro.neg\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ∀ {a : R}, AddGroup.InClosure (Monoid.Closure s) a → ↑f a ∈ closure (↑f '' s) → ↑f (-a) ∈ closure (↑f '' s)\n[PROOFSTEP]\nintros\n[GOAL]\ncase intro.intro.add\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ∀ {a b : R},\n    AddGroup.InClosure (Monoid.Closure s) a →\n      AddGroup.InClosure (Monoid.Closure s) b →\n        ↑f a ∈ closure (↑f '' s) → ↑f b ∈ closure (↑f '' s) → ↑f (a + b) ∈ closure (↑f '' s)\n[PROOFSTEP]\nintros\n[GOAL]\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ∀ {a : R} (a_1 : a ∈ Monoid.Closure s),\n    (fun {x} x_1 => ↑f x ∈ closure (↑f '' s)) (_ : AddGroup.InClosure (Monoid.Closure s) a)\n[PROOFSTEP]\nintros\n[GOAL]\ncase intro.intro.zero\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ ↑f 0 ∈ closure (↑f '' s)\n[PROOFSTEP]\nrw [f.map_zero]\n[GOAL]\ncase intro.intro.zero\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\n⊢ 0 ∈ closure (↑f '' s)\n[PROOFSTEP]\napply closure.isSubring.zero_mem\n[GOAL]\ncase intro.intro.neg\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹\na_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)\n⊢ ↑f (-a✝¹) ∈ closure (↑f '' s)\n[PROOFSTEP]\nrw [f.map_neg]\n[GOAL]\ncase intro.intro.neg\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹\na_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)\n⊢ -↑f a✝¹ ∈ closure (↑f '' s)\n[PROOFSTEP]\napply closure.isSubring.neg_mem\n[GOAL]\ncase intro.intro.neg\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : AddGroup.InClosure (Monoid.Closure s) a✝¹\na_ih✝ : ↑f a✝¹ ∈ closure (↑f '' s)\n⊢ ↑f a✝¹ ∈ closure (↑f '' s)\n[PROOFSTEP]\nassumption\n[GOAL]\ncase intro.intro.add\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝² b✝ : R\na✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²\na✝ : AddGroup.InClosure (Monoid.Closure s) b✝\na_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)\na_ih✝ : ↑f b✝ ∈ closure (↑f '' s)\n⊢ ↑f (a✝² + b✝) ∈ closure (↑f '' s)\n[PROOFSTEP]\nrw [f.map_add]\n[GOAL]\ncase intro.intro.add\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝² b✝ : R\na✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²\na✝ : AddGroup.InClosure (Monoid.Closure s) b✝\na_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)\na_ih✝ : ↑f b✝ ∈ closure (↑f '' s)\n⊢ ↑f a✝² + ↑f b✝ ∈ closure (↑f '' s)\n[PROOFSTEP]\napply closure.isSubring.add_mem\n[GOAL]\ncase intro.intro.add.a\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝² b✝ : R\na✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²\na✝ : AddGroup.InClosure (Monoid.Closure s) b✝\na_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)\na_ih✝ : ↑f b✝ ∈ closure (↑f '' s)\n⊢ ↑f a✝² ∈ closure (↑f '' s)\ncase intro.intro.add.a\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝² b✝ : R\na✝¹ : AddGroup.InClosure (Monoid.Closure s) a✝²\na✝ : AddGroup.InClosure (Monoid.Closure s) b✝\na_ih✝¹ : ↑f a✝² ∈ closure (↑f '' s)\na_ih✝ : ↑f b✝ ∈ closure (↑f '' s)\n⊢ ↑f b✝ ∈ closure (↑f '' s)\n[PROOFSTEP]\nassumption'\n[GOAL]\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : a✝¹ ∈ Monoid.Closure s\n⊢ ↑f a✝¹ ∈ closure (↑f '' s)\n[PROOFSTEP]\napply AddGroup.mem_closure\n[GOAL]\ncase a\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : a✝¹ ∈ Monoid.Closure s\n⊢ ↑f a✝¹ ∈ Monoid.Closure (↑f '' s)\n[PROOFSTEP]\nrw [← Monoid.image_closure f.to_isMonoidHom]\n[GOAL]\ncase a\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : a✝¹ ∈ Monoid.Closure s\n⊢ ↑f a✝¹ ∈ ↑f '' Monoid.Closure s\n[PROOFSTEP]\napply Set.mem_image_of_mem\n[GOAL]\ncase a.h\nR : Type u\ninst✝² : Ring R\ncR : Type u\ninst✝¹ : CommRing cR\ns✝ : Set R\nS : Type u_1\ninst✝ : Ring S\nf : R →+* S\ns : Set R\nx : R\nhx : x ∈ closure s\na✝¹ : R\na✝ : a✝¹ ∈ Monoid.Closure s\n⊢ a✝¹ ∈ Monoid.Closure s\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Deprecated.Subring", "llama_tokens": 18978, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.600188359260205, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.26277656757891465}}
{"text": "[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ lift #{ x // IsAlgebraic R x } ≤ lift #R[X] * ℵ₀\n[PROOFSTEP]\nrw [← mk_uLift, ← mk_uLift]\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ #(ULift { x // IsAlgebraic R x }) ≤ #(ULift R[X]) * ℵ₀\n[PROOFSTEP]\nchoose g hg₁ hg₂ using fun x : {x : A | IsAlgebraic R x} => x.coe_prop\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\n⊢ #(ULift { x // IsAlgebraic R x }) ≤ #(ULift R[X]) * ℵ₀\n[PROOFSTEP]\nrefine' lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g fun f => _\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nf : R[X]\n⊢ lift #↑(g ⁻¹' {f}) ≤ ℵ₀\n[PROOFSTEP]\nrw [lift_le_aleph0, le_aleph0_iff_set_countable]\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nf : R[X]\n⊢ Set.Countable (g ⁻¹' {f})\n[PROOFSTEP]\nsuffices : MapsTo (↑) (g ⁻¹' { f }) (f.rootSet A)\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nf : R[X]\nthis : MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)\n⊢ Set.Countable (g ⁻¹' {f})\ncase this\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nf : R[X]\n⊢ MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)\n[PROOFSTEP]\nexact this.countable_of_injOn (Subtype.coe_injective.injOn _) (f.rootSet_finite A).countable\n[GOAL]\ncase this\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nf : R[X]\n⊢ MapsTo Subtype.val (g ⁻¹' {f}) (rootSet f A)\n[PROOFSTEP]\nrintro x (rfl : g x = f)\n[GOAL]\ncase this\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\ng : ↑{x | IsAlgebraic R x} → R[X]\nhg₁ : ∀ (x : ↑{x | IsAlgebraic R x}), g x ≠ 0\nhg₂ : ∀ (x : ↑{x | IsAlgebraic R x}), ↑(aeval ↑x) (g x) = 0\nx : ↑{x | IsAlgebraic R x}\n⊢ ↑x ∈ rootSet (g x) A\n[PROOFSTEP]\nexact mem_rootSet.2 ⟨hg₁ x, hg₂ x⟩\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ lift (max #R ℵ₀) * ℵ₀ ≤ max (lift #R) ℵ₀\n[PROOFSTEP]\nsimp\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Algebra R A\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : Countable R\n⊢ Set.Countable {x | IsAlgebraic R x}\n[PROOFSTEP]\nrw [← le_aleph0_iff_set_countable, ← lift_le]\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Algebra R A\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : Countable R\n⊢ lift #↑{x | IsAlgebraic R x} ≤ lift ℵ₀\n[PROOFSTEP]\napply (cardinal_mk_lift_le_max R A).trans\n[GOAL]\nR : Type u\nA : Type v\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing A\ninst✝³ : IsDomain A\ninst✝² : Algebra R A\ninst✝¹ : NoZeroSMulDivisors R A\ninst✝ : Countable R\n⊢ max (lift #R) ℵ₀ ≤ lift ℵ₀\n[PROOFSTEP]\nsimp\n[GOAL]\nR A : Type u\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ #{ x // IsAlgebraic R x } ≤ #R[X] * ℵ₀\n[PROOFSTEP]\nrw [← lift_id #_, ← lift_id #(R[X])]\n[GOAL]\nR A : Type u\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ lift #{ x // IsAlgebraic R x } ≤ lift #R[X] * ℵ₀\n[PROOFSTEP]\nexact cardinal_mk_lift_le_mul R A\n[GOAL]\nR A : Type u\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ #{ x // IsAlgebraic R x } ≤ max #R ℵ₀\n[PROOFSTEP]\nrw [← lift_id #_, ← lift_id #R]\n[GOAL]\nR A : Type u\ninst✝⁴ : CommRing R\ninst✝³ : CommRing A\ninst✝² : IsDomain A\ninst✝¹ : Algebra R A\ninst✝ : NoZeroSMulDivisors R A\n⊢ lift #{ x // IsAlgebraic R x } ≤ max (lift #R) ℵ₀\n[PROOFSTEP]\nexact cardinal_mk_lift_le_max R A\n", "meta": {"mathlib_filename": "Mathlib.Algebra.AlgebraicCard", "llama_tokens": 2758, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.588889130767832, "lm_q2_score": 0.44552953503957266, "lm_q1q2_score": 0.2623675006208503}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\ny : α\nys : List α\nf : List α → β\n⊢ (permutationsAux2 t ts r (y :: ys) f).fst = y :: ys ++ ts\n[PROOFSTEP]\nsimp [permutationsAux2, permutationsAux2_fst t _ _ ys]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\ny : α\nys : List α\nf : List α → β\n⊢ (permutationsAux2 t ts r (y :: ys) f).snd =\n    f (t :: y :: ys ++ ts) :: (permutationsAux2 t ts r ys fun x => f (y :: x)).snd\n[PROOFSTEP]\nsimp [permutationsAux2, permutationsAux2_fst t _ _ ys]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nys : List α\nf : List α → β\n⊢ (permutationsAux2 t ts [] ys f).snd ++ r = (permutationsAux2 t ts r ys f).snd\n[PROOFSTEP]\ninduction ys generalizing f\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nf : List α → β\n⊢ (permutationsAux2 t ts [] [] f).snd ++ r = (permutationsAux2 t ts r [] f).snd\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (f : List α → β), (permutationsAux2 t ts [] tail✝ f).snd ++ r = (permutationsAux2 t ts r tail✝ f).snd\nf : List α → β\n⊢ (permutationsAux2 t ts [] (head✝ :: tail✝) f).snd ++ r = (permutationsAux2 t ts r (head✝ :: tail✝) f).snd\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nr : List β\nf : List α → β\n⊢ (permutationsAux2 t [] r ys fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r ys f).snd\n[PROOFSTEP]\ninduction' ys with ys_hd _ ys_ih generalizing f\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nf✝ f : List α → β\n⊢ (permutationsAux2 t [] r [] fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r [] f).snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β), (permutationsAux2 t [] r tail✝ fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r tail✝ f).snd\nf : List α → β\n⊢ (permutationsAux2 t [] r (ys_hd :: tail✝) fun x => f (x ++ ts)).snd = (permutationsAux2 t ts r (ys_hd :: tail✝) f).snd\n[PROOFSTEP]\nsimp [ys_ih fun xs => f (ys_hd :: xs)]\n[GOAL]\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts ys : List α\nr : List β\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ map g' (permutationsAux2 t ts r ys f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g ys) f').snd\n[PROOFSTEP]\ninduction' ys with ys_hd _ ys_ih generalizing f f'\n[GOAL]\ncase nil\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ map g' (permutationsAux2 t ts r [] f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g []) f').snd\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ map g' (permutationsAux2 t ts r (ys_hd :: tail✝) f).snd =\n    (permutationsAux2 (g t) (map g ts) (map g' r) (map g (ys_hd :: tail✝)) f').snd\n[PROOFSTEP]\nsimp only [map, permutationsAux2_snd_cons, cons_append, cons.injEq]\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ g' (f (t :: ys_hd :: (permutationsAux2 t ts r tail✝ fun x => f (ys_hd :: x)).fst)) =\n      f' (g t :: g ys_hd :: (map g tail✝ ++ map g ts)) ∧\n    map g' (permutationsAux2 t ts r tail✝ fun x => f (ys_hd :: x)).snd =\n      (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) fun x => f' (g ys_hd :: x)).snd\n[PROOFSTEP]\nrw [ys_ih, permutationsAux2_fst]\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ g' (f (t :: ys_hd :: (tail✝ ++ ts))) = f' (g t :: g ys_hd :: (map g tail✝ ++ map g ts)) ∧\n    (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) ?cons.f').snd =\n      (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) fun x => f' (g ys_hd :: x)).snd\ncase cons.f'\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ List α' → β'\ncase cons.f'\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ List α' → β'\ncase cons.H\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ ∀ (a : List α), g' (f (ys_hd :: a)) = ?cons.f' (map g a)\n[PROOFSTEP]\nrefine' ⟨_, rfl⟩\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ g' (f (t :: ys_hd :: (tail✝ ++ ts))) = f' (g t :: g ys_hd :: (map g tail✝ ++ map g ts))\n[PROOFSTEP]\nsimp only [← map_cons, ← map_append]\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ g' (f (t :: ys_hd :: (tail✝ ++ ts))) = f' (map g (t :: ys_hd :: (tail✝ ++ ts)))\n[PROOFSTEP]\napply H\n[GOAL]\ncase cons.H\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\n⊢ ∀ (a : List α), g' (f (ys_hd :: a)) = f' (g ys_hd :: map g a)\n[PROOFSTEP]\nintro a\n[GOAL]\ncase cons.H\nα✝ : Type u_1\nβ✝ : Type u_2\nα : Type u_3\nβ : Type u_4\nα' : Type u_5\nβ' : Type u_6\ng : α → α'\ng' : β → β'\nt : α\nts : List α\nr : List β\nf✝ : List α → β\nf'✝ : List α' → β'\nH✝ : ∀ (a : List α), g' (f✝ a) = f'✝ (map g a)\nys_hd : α\ntail✝ : List α\nys_ih :\n  ∀ (f : List α → β) (f' : List α' → β'),\n    (∀ (a : List α), g' (f a) = f' (map g a)) →\n      map g' (permutationsAux2 t ts r tail✝ f).snd = (permutationsAux2 (g t) (map g ts) (map g' r) (map g tail✝) f').snd\nf : List α → β\nf' : List α' → β'\nH : ∀ (a : List α), g' (f a) = f' (map g a)\na : List α\n⊢ g' (f (ys_hd :: a)) = f' (g ys_hd :: map g a)\n[PROOFSTEP]\napply H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ map f (permutationsAux2 t ts [] ys id).snd = (permutationsAux2 t ts [] ys f).snd\n[PROOFSTEP]\nrw [map_permutationsAux2' id, map_id, map_id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ (permutationsAux2 (id t) ts (map f []) ys ?f').snd = (permutationsAux2 t ts [] ys f).snd\ncase f'\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ List α → β\ncase f'\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ List α → β\ncase f'\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ List α → β\ncase H α : Type u_1 β : Type u_2 t : α ts ys : List α f : List α → β ⊢ ∀ (a : List α), f (id a) = ?f' (map id a)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase H\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ ∀ (a : List α), f (id a) = f (map id a)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List β\nys : List α\nf : List α → β\n⊢ (permutationsAux2 t ts r ys f).snd = map (fun x => f (x ++ ts)) (permutationsAux2 t [] [] ys id).snd ++ r\n[PROOFSTEP]\nrw [← permutationsAux2_append, map_permutationsAux2, permutationsAux2_comp_append]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\nts : List α\n⊢ map (map f) (permutations'Aux t ts) = permutations'Aux (f t) (map f ts)\n[PROOFSTEP]\ninduction' ts with a ts ih <;> [rfl; (simp [← ih]; rfl)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\nts : List α\n⊢ map (map f) (permutations'Aux t ts) = permutations'Aux (f t) (map f ts)\n[PROOFSTEP]\ninduction' ts with a ts ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\n⊢ map (map f) (permutations'Aux t []) = permutations'Aux (f t) (map f [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nf : α → β\nt a : α\nts : List α\nih : map (map f) (permutations'Aux t ts) = permutations'Aux (f t) (map f ts)\n⊢ map (map f) (permutations'Aux t (a :: ts)) = permutations'Aux (f t) (map f (a :: ts))\n[PROOFSTEP]\nsimp [← ih]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nf : α → β\nt a : α\nts : List α\nih : map (map f) (permutations'Aux t ts) = permutations'Aux (f t) (map f ts)\n⊢ map (map f ∘ cons a) (permutations'Aux t ts) = map (cons (f a) ∘ map f) (permutations'Aux t ts)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\n⊢ permutations'Aux t ts = (permutationsAux2 t [] [ts ++ [t]] ts id).snd\n[PROOFSTEP]\ninduction' ts with a ts ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\n⊢ permutations'Aux t [] = (permutationsAux2 t [] [[] ++ [t]] [] id).snd\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt a : α\nts : List α\nih : permutations'Aux t ts = (permutationsAux2 t [] [ts ++ [t]] ts id).snd\n⊢ permutations'Aux t (a :: ts) = (permutationsAux2 t [] [a :: ts ++ [t]] (a :: ts) id).snd\n[PROOFSTEP]\nsimp [permutations'Aux, permutationsAux2_snd_cons, ih]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt a : α\nts : List α\nih : permutations'Aux t ts = (permutationsAux2 t [] [ts ++ [t]] ts id).snd\n⊢ map (cons a) (permutationsAux2 t [] [ts ++ [t]] ts id).snd =\n    (permutationsAux2 t [] [a :: (ts ++ [t])] ts fun x => a :: x).snd\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← permutationsAux2_append]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt a : α\nts : List α\nih : permutations'Aux t ts = (permutationsAux2 t [] [ts ++ [t]] ts id).snd\n⊢ map (cons a) ((permutationsAux2 t [] [] ts id).snd ++ [ts ++ [t]]) =\n    (permutationsAux2 t [] [] ts fun x => a :: x).snd ++ [a :: (ts ++ [t])]\n[PROOFSTEP]\nsimp [map_permutationsAux2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys l l' : List α\n⊢ l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n    ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\ninduction' ys with y ys ih generalizing l\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' l : List α\n⊢ l' ∈ (permutationsAux2 t ts [] [] fun x => l ++ x).snd ↔\n    ∃ l₁ l₂, l₂ ≠ [] ∧ [] = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl : List α\n⊢ l' ∈ (permutationsAux2 t ts [] (y :: ys) fun x => l ++ x).snd ↔\n    ∃ l₁ l₂, l₂ ≠ [] ∧ y :: ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrw [permutationsAux2_snd_cons, show (fun x : List α => l ++ y :: x) = (l ++ [y] ++ ·) by funext _; simp, mem_cons, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl : List α\n⊢ (fun x => l ++ y :: x) = fun x => l ++ [y] ++ x\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl x✝ : List α\n⊢ l ++ y :: x✝ = l ++ [y] ++ x✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl : List α\n⊢ (l' = l ++ (t :: y :: ys ++ ts) ∨ ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ [y] ++ l₁ ++ t :: l₂ ++ ts) ↔\n    ∃ l₁ l₂, l₂ ≠ [] ∧ y :: ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase cons.mp\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl : List α\n⊢ (l' = l ++ (t :: y :: ys ++ ts) ∨ ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ [y] ++ l₁ ++ t :: l₂ ++ ts) →\n    ∃ l₁ l₂, l₂ ≠ [] ∧ y :: ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrintro (rfl | ⟨l₁, l₂, l0, rfl, rfl⟩)\n[GOAL]\ncase cons.mp.inl\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nys l : List α\nih :\n  ∀ {l_1 : List α},\n    l ++ (t :: y :: ys ++ ts) ∈ (permutationsAux2 t ts [] ys fun x => l_1 ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l ++ (t :: y :: ys ++ ts) = l_1 ++ l₁ ++ t :: l₂ ++ ts\n⊢ ∃ l₁ l₂, l₂ ≠ [] ∧ y :: ys = l₁ ++ l₂ ∧ l ++ (t :: y :: ys ++ ts) = l ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nexact ⟨[], y :: ys, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nys l : List α\nih :\n  ∀ {l_1 : List α},\n    l ++ (t :: y :: ys ++ ts) ∈ (permutationsAux2 t ts [] ys fun x => l_1 ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l ++ (t :: y :: ys ++ ts) = l_1 ++ l₁ ++ t :: l₂ ++ ts\n⊢ y :: ys ≠ [] ∧ y :: ys = [] ++ y :: ys ∧ l ++ (t :: y :: ys ++ ts) = l ++ [] ++ t :: y :: ys ++ ts\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.mp.inr.intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nl l₁ l₂ : List α\nl0 : l₂ ≠ []\nih :\n  ∀ {l_1 : List α},\n    l ++ [y] ++ l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] (l₁ ++ l₂) fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1,\n        l₂_1 ≠ [] ∧ l₁ ++ l₂ = l₁_1 ++ l₂_1 ∧ l ++ [y] ++ l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ ∃ l₁_1 l₂_1,\n    l₂_1 ≠ [] ∧ y :: (l₁ ++ l₂) = l₁_1 ++ l₂_1 ∧ l ++ [y] ++ l₁ ++ t :: l₂ ++ ts = l ++ l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nexact ⟨y :: l₁, l₂, l0, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nl l₁ l₂ : List α\nl0 : l₂ ≠ []\nih :\n  ∀ {l_1 : List α},\n    l ++ [y] ++ l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] (l₁ ++ l₂) fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1,\n        l₂_1 ≠ [] ∧ l₁ ++ l₂ = l₁_1 ++ l₂_1 ∧ l ++ [y] ++ l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ y :: (l₁ ++ l₂) = y :: l₁ ++ l₂ ∧ l ++ [y] ++ l₁ ++ t :: l₂ ++ ts = l ++ y :: l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons.mpr\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ l' : List α\ny : α\nys : List α\nih :\n  ∀ {l : List α},\n    l' ∈ (permutationsAux2 t ts [] ys fun x => l ++ x).snd ↔\n      ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts\nl : List α\n⊢ (∃ l₁ l₂, l₂ ≠ [] ∧ y :: ys = l₁ ++ l₂ ∧ l' = l ++ l₁ ++ t :: l₂ ++ ts) →\n    l' = l ++ (t :: y :: ys ++ ts) ∨ ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l' = l ++ [y] ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrintro ⟨_ | ⟨y', l₁⟩, l₂, l0, ye, rfl⟩\n[GOAL]\ncase cons.mpr.intro.nil.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nys l l₂ : List α\nl0 : l₂ ≠ []\nye : y :: ys = [] ++ l₂\nih :\n  ∀ {l_1 : List α},\n    l ++ [] ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] ys fun x => l_1 ++ x).snd ↔\n      ∃ l₁ l₂_1, l₂_1 ≠ [] ∧ ys = l₁ ++ l₂_1 ∧ l ++ [] ++ t :: l₂ ++ ts = l_1 ++ l₁ ++ t :: l₂_1 ++ ts\n⊢ l ++ [] ++ t :: l₂ ++ ts = l ++ (t :: y :: ys ++ ts) ∨\n    ∃ l₁ l₂_1, l₂_1 ≠ [] ∧ ys = l₁ ++ l₂_1 ∧ l ++ [] ++ t :: l₂ ++ ts = l ++ [y] ++ l₁ ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nsimp [ye]\n[GOAL]\ncase cons.mpr.intro.cons.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nys l : List α\ny' : α\nl₁ l₂ : List α\nl0 : l₂ ≠ []\nye : y :: ys = y' :: l₁ ++ l₂\nih :\n  ∀ {l_1 : List α},\n    l ++ y' :: l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] ys fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ ys = l₁_1 ++ l₂_1 ∧ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l ++ (t :: y :: ys ++ ts) ∨\n    ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ ys = l₁_1 ++ l₂_1 ∧ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l ++ [y] ++ l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nsimp only [cons_append] at ye \n[GOAL]\ncase cons.mpr.intro.cons.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nys l : List α\ny' : α\nl₁ l₂ : List α\nl0 : l₂ ≠ []\nye : y :: ys = y' :: (l₁ ++ l₂)\nih :\n  ∀ {l_1 : List α},\n    l ++ y' :: l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] ys fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ ys = l₁_1 ++ l₂_1 ∧ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l ++ (t :: y :: ys ++ ts) ∨\n    ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ ys = l₁_1 ++ l₂_1 ∧ l ++ y' :: l₁ ++ t :: l₂ ++ ts = l ++ [y] ++ l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nrcases ye with ⟨rfl, rfl⟩\n[GOAL]\ncase cons.mpr.intro.cons.intro.intro.intro.refl\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nl l₁ l₂ : List α\nl0 : l₂ ≠ []\nih :\n  ∀ {l_1 : List α},\n    l ++ y :: l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] (l₁ ++ l₂) fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ l₁ ++ l₂ = l₁_1 ++ l₂_1 ∧ l ++ y :: l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ l ++ y :: l₁ ++ t :: l₂ ++ ts = l ++ (t :: y :: (l₁ ++ l₂) ++ ts) ∨\n    ∃ l₁_1 l₂_1,\n      l₂_1 ≠ [] ∧ l₁ ++ l₂ = l₁_1 ++ l₂_1 ∧ l ++ y :: l₁ ++ t :: l₂ ++ ts = l ++ [y] ++ l₁_1 ++ t :: l₂_1 ++ ts\n[PROOFSTEP]\nexact Or.inr ⟨l₁, l₂, l0, by simp⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts l✝ : List α\ny : α\nl l₁ l₂ : List α\nl0 : l₂ ≠ []\nih :\n  ∀ {l_1 : List α},\n    l ++ y :: l₁ ++ t :: l₂ ++ ts ∈ (permutationsAux2 t ts [] (l₁ ++ l₂) fun x => l_1 ++ x).snd ↔\n      ∃ l₁_1 l₂_1, l₂_1 ≠ [] ∧ l₁ ++ l₂ = l₁_1 ++ l₂_1 ∧ l ++ y :: l₁ ++ t :: l₂ ++ ts = l_1 ++ l₁_1 ++ t :: l₂_1 ++ ts\n⊢ l₁ ++ l₂ = l₁ ++ l₂ ∧ l ++ y :: l₁ ++ t :: l₂ ++ ts = l ++ [y] ++ l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys l : List α\n⊢ l ∈ (permutationsAux2 t ts [] ys id).snd ↔ ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrw [show @id (List α) = ([] ++ ·) by funext _; rfl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys l : List α\n⊢ id = fun x => [] ++ x\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nt : α\nts ys l x✝ : List α\n⊢ id x✝ = [] ++ x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys l : List α\n⊢ l ∈ (permutationsAux2 t ts [] ys fun x => [] ++ x).snd ↔ ∃ l₁ l₂, l₂ ≠ [] ∧ ys = l₁ ++ l₂ ∧ l = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\napply mem_permutationsAux2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts ys : List α\nf : List α → β\n⊢ length (permutationsAux2 t ts [] ys f).snd = length ys\n[PROOFSTEP]\ninduction ys generalizing f\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nf : List α → β\n⊢ length (permutationsAux2 t ts [] [] f).snd = length []\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nhead✝ : α\ntail✝ : List α\ntail_ih✝ : ∀ (f : List α → β), length (permutationsAux2 t ts [] tail✝ f).snd = length tail✝\nf : List α → β\n⊢ length (permutationsAux2 t ts [] (head✝ :: tail✝) f).snd = length (head✝ :: tail✝)\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\n⊢ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L =\n    (List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r\n[PROOFSTEP]\ninduction' L with l L ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List (List α)\n⊢ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r [] =\n    (List.bind [] fun y => (permutationsAux2 t ts [] y id).snd) ++ r\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List (List α)\nl : List α\nL : List (List α)\nih :\n  foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L =\n    (List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r\n⊢ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r (l :: L) =\n    (List.bind (l :: L) fun y => (permutationsAux2 t ts [] y id).snd) ++ r\n[PROOFSTEP]\nsimp [ih]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr : List (List α)\nl : List α\nL : List (List α)\nih :\n  foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L =\n    (List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r\n⊢ (permutationsAux2 t ts ((List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r) l id).snd =\n    (permutationsAux2 t ts [] l id).snd ++ ((List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r)\n[PROOFSTEP]\nrw [← permutationsAux2_append]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nl' : List α\n⊢ l' ∈ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L ↔\n    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nhave :\n  (∃ a : List α, a ∈ L ∧ ∃ l₁ l₂ : List α, ¬l₂ = nil ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔\n    ∃ l₁ l₂ : List α, ¬l₂ = nil ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts) :=\n  ⟨fun ⟨_, aL, l₁, l₂, l0, e, h⟩ => ⟨l₁, l₂, l0, e ▸ aL, h⟩, fun ⟨l₁, l₂, l0, aL, h⟩ => ⟨_, aL, l₁, l₂, l0, rfl, h⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nl' : List α\nthis :\n  (∃ a, a ∈ L ∧ ∃ l₁ l₂, ¬l₂ = [] ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔\n    ∃ l₁ l₂, ¬l₂ = [] ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts)\n⊢ l' ∈ foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L ↔\n    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nrw [foldr_permutationsAux2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nl' : List α\nthis :\n  (∃ a, a ∈ L ∧ ∃ l₁ l₂, ¬l₂ = [] ∧ a = l₁ ++ l₂ ∧ l' = l₁ ++ t :: (l₂ ++ ts)) ↔\n    ∃ l₁ l₂, ¬l₂ = [] ∧ l₁ ++ l₂ ∈ L ∧ l' = l₁ ++ t :: (l₂ ++ ts)\n⊢ l' ∈ (List.bind L fun y => (permutationsAux2 t ts [] y id).snd) ++ r ↔\n    l' ∈ r ∨ ∃ l₁ l₂, l₁ ++ l₂ ∈ L ∧ l₂ ≠ [] ∧ l' = l₁ ++ t :: l₂ ++ ts\n[PROOFSTEP]\nsimp only [mem_permutationsAux2', ← this, or_comm, and_left_comm, mem_append, mem_bind, append_assoc, cons_append,\n  exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\n⊢ length (foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L) = sum (map length L) + length r\n[PROOFSTEP]\nsimp [foldr_permutationsAux2, (· ∘ ·), length_permutationsAux2]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nn : ℕ\nH : ∀ (l : List α), l ∈ L → length l = n\n⊢ length (foldr (fun y r => (permutationsAux2 t ts r y id).snd) r L) = n * length L + length r\n[PROOFSTEP]\nrw [length_foldr_permutationsAux2, (_ : List.sum (map length L) = n * length L)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nn : ℕ\nH : ∀ (l : List α), l ∈ L → length l = n\n⊢ sum (map length L) = n * length L\n[PROOFSTEP]\ninduction' L with l L ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L : List (List α)\nn : ℕ\nH✝ : ∀ (l : List α), l ∈ L → length l = n\nH : ∀ (l : List α), l ∈ [] → length l = n\n⊢ sum (map length []) = n * length []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L✝ : List (List α)\nn : ℕ\nH✝ : ∀ (l : List α), l ∈ L✝ → length l = n\nl : List α\nL : List (List α)\nih : (∀ (l : List α), l ∈ L → length l = n) → sum (map length L) = n * length L\nH : ∀ (l_1 : List α), l_1 ∈ l :: L → length l_1 = n\n⊢ sum (map length (l :: L)) = n * length (l :: L)\n[PROOFSTEP]\nhave sum_map : sum (map length L) = n * length L := ih fun l m => H l (mem_cons_of_mem _ m)\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L✝ : List (List α)\nn : ℕ\nH✝ : ∀ (l : List α), l ∈ L✝ → length l = n\nl : List α\nL : List (List α)\nih : (∀ (l : List α), l ∈ L → length l = n) → sum (map length L) = n * length L\nH : ∀ (l_1 : List α), l_1 ∈ l :: L → length l_1 = n\nsum_map : sum (map length L) = n * length L\n⊢ sum (map length (l :: L)) = n * length (l :: L)\n[PROOFSTEP]\nhave length_l : length l = n := H _ (mem_cons_self _ _)\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nt : α\nts : List α\nr L✝ : List (List α)\nn : ℕ\nH✝ : ∀ (l : List α), l ∈ L✝ → length l = n\nl : List α\nL : List (List α)\nih : (∀ (l : List α), l ∈ L → length l = n) → sum (map length L) = n * length L\nH : ∀ (l_1 : List α), l_1 ∈ l :: L → length l_1 = n\nsum_map : sum (map length L) = n * length L\nlength_l : length l = n\n⊢ sum (map length (l :: L)) = n * length (l :: L)\n[PROOFSTEP]\nsimp [sum_map, length_l, mul_add, add_comm, mul_succ]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nis : List α\n⊢ permutationsAux [] is = []\n[PROOFSTEP]\nrw [permutationsAux, permutationsAux.rec]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts is : List α\n⊢ permutationsAux (t :: ts) is =\n    foldr (fun y r => (permutationsAux2 t ts r y id).snd) (permutationsAux ts (t :: is)) (permutations is)\n[PROOFSTEP]\nrw [permutationsAux, permutationsAux.rec]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nt : α\nts is : List α\n⊢ foldr (fun y r => (permutationsAux2 t ts r y id).snd)\n      (permutationsAux.rec (fun x => [])\n        (fun t ts is IH1 IH2 => foldr (fun y r => (permutationsAux2 t ts r y id).snd) IH1 (is :: IH2)) ts (t :: is))\n      (is ::\n        permutationsAux.rec (fun x => [])\n          (fun t ts is IH1 IH2 => foldr (fun y r => (permutationsAux2 t ts r y id).snd) IH1 (is :: IH2)) is []) =\n    foldr (fun y r => (permutationsAux2 t ts r y id).snd)\n      (permutationsAux.rec (fun x => [])\n        (fun t ts is IH1 IH2 => foldr (fun y r => (permutationsAux2 t ts r y id).snd) IH1 (is :: IH2)) ts (t :: is))\n      (permutations is)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\n⊢ permutations [] = [[]]\n[PROOFSTEP]\nrw [permutations, permutationsAux_nil]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\n⊢ ∀ (ts is : List α), map (map f) (permutationsAux ts is) = permutationsAux (map f ts) (map f is)\n[PROOFSTEP]\nrefine' permutationsAux.rec (by simp) _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\n⊢ ∀ (is : List α), map (map f) (permutationsAux [] is) = permutationsAux (map f []) (map f is)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\n⊢ ∀ (t : α) (ts is : List α),\n    map (map f) (permutationsAux ts (t :: is)) = permutationsAux (map f ts) (map f (t :: is)) →\n      map (map f) (permutationsAux is []) = permutationsAux (map f is) (map f []) →\n        map (map f) (permutationsAux (t :: ts) is) = permutationsAux (map f (t :: ts)) (map f is)\n[PROOFSTEP]\nintrov IH1 IH2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\nts is : List α\nIH1 : map (map f) (permutationsAux ts (t :: is)) = permutationsAux (map f ts) (map f (t :: is))\nIH2 : map (map f) (permutationsAux is []) = permutationsAux (map f is) (map f [])\n⊢ map (map f) (permutationsAux (t :: ts) is) = permutationsAux (map f (t :: ts)) (map f is)\n[PROOFSTEP]\nrw [map] at IH2 \n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\nts is : List α\nIH1 : map (map f) (permutationsAux ts (t :: is)) = permutationsAux (map f ts) (map f (t :: is))\nIH2 : map (map f) (permutationsAux is []) = permutationsAux (map f is) []\n⊢ map (map f) (permutationsAux (t :: ts) is) = permutationsAux (map f (t :: ts)) (map f is)\n[PROOFSTEP]\nsimp only [foldr_permutationsAux2, map_append, map, map_map_permutationsAux2, permutations, bind_map, IH1, append_assoc,\n  permutationsAux_cons, cons_bind, ← IH2, map_bind]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nts : List α\n⊢ map (map f) (permutations ts) = permutations (map f ts)\n[PROOFSTEP]\nrw [permutations, permutations, map, map_permutationsAux, map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nts : List α\n⊢ map (map f) (permutations' ts) = permutations' (map f ts)\n[PROOFSTEP]\ninduction' ts with t ts ih <;> [rfl; simp [← ih, map_bind, ← map_map_permutations'Aux, bind_map]]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nf : α → β\nts : List α\n⊢ map (map f) (permutations' ts) = permutations' (map f ts)\n[PROOFSTEP]\ninduction' ts with t ts ih\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nf : α → β\n⊢ map (map f) (permutations' []) = permutations' (map f [])\n[PROOFSTEP]\nrfl\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nf : α → β\nt : α\nts : List α\nih : map (map f) (permutations' ts) = permutations' (map f ts)\n⊢ map (map f) (permutations' (t :: ts)) = permutations' (map f (t :: ts))\n[PROOFSTEP]\nsimp [← ih, map_bind, ← map_map_permutations'Aux, bind_map]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nis is' ts : List α\n⊢ permutationsAux (is ++ ts) is' =\n    map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\n[PROOFSTEP]\ninduction' is with t is ih generalizing is'\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nis'✝ ts is' : List α\n⊢ permutationsAux ([] ++ ts) is' =\n    map (fun x => x ++ ts) (permutationsAux [] is') ++ permutationsAux ts (reverse [] ++ is')\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' : List α\n⊢ permutationsAux (t :: is ++ ts) is' =\n    map (fun x => x ++ ts) (permutationsAux (t :: is) is') ++ permutationsAux ts (reverse (t :: is) ++ is')\n[PROOFSTEP]\nsimp only [foldr_permutationsAux2, ih, bind_map, cons_append, permutationsAux_cons, map_append, reverse_cons,\n  append_assoc, singleton_append]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' : List α\n⊢ (List.bind (permutations is') fun y => (permutationsAux2 t (is ++ ts) [] y id).snd) ++\n      (map (fun x => x ++ ts) (permutationsAux is (t :: is')) ++ permutationsAux ts (reverse is ++ t :: is')) =\n    (List.bind (permutations is') fun a => map (fun x => x ++ ts) (permutationsAux2 t is [] a id).snd) ++\n      (map (fun x => x ++ ts) (permutationsAux is (t :: is')) ++ permutationsAux ts (reverse is ++ t :: ([] ++ is')))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase cons.e_a.e_b\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' : List α\n⊢ (fun y => (permutationsAux2 t (is ++ ts) [] y id).snd) = fun a =>\n    map (fun x => x ++ ts) (permutationsAux2 t is [] a id).snd\n[PROOFSTEP]\nfunext _\n[GOAL]\ncase cons.e_a.e_b.h\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' x✝ : List α\n⊢ (permutationsAux2 t (is ++ ts) [] x✝ id).snd = map (fun x => x ++ ts) (permutationsAux2 t is [] x✝ id).snd\n[PROOFSTEP]\nrw [map_permutationsAux2]\n[GOAL]\ncase cons.e_a.e_b.h\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' x✝ : List α\n⊢ (permutationsAux2 t (is ++ ts) [] x✝ id).snd = (permutationsAux2 t is [] x✝ fun x => x ++ ts).snd\n[PROOFSTEP]\nsimp (config := { singlePass := true }) only [← permutationsAux2_comp_append]\n[GOAL]\ncase cons.e_a.e_b.h\nα : Type u_1\nβ : Type u_2\nis'✝ ts : List α\nt : α\nis : List α\nih :\n  ∀ (is' : List α),\n    permutationsAux (is ++ ts) is' =\n      map (fun x => x ++ ts) (permutationsAux is is') ++ permutationsAux ts (reverse is ++ is')\nis' x✝ : List α\n⊢ (permutationsAux2 t [] [] x✝ fun x => id (x ++ (is ++ ts))).snd =\n    (permutationsAux2 t [] [] x✝ fun x => x ++ is ++ ts).snd\n[PROOFSTEP]\nsimp only [id, append_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nis ts : List α\n⊢ permutations (is ++ ts) = map (fun x => x ++ ts) (permutations is) ++ permutationsAux ts (reverse is)\n[PROOFSTEP]\nsimp [permutations, permutationsAux_append]\n", "meta": {"mathlib_filename": "Mathlib.Data.List.Permutation", "llama_tokens": 17600, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5156199157230156, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.26183791066279083}}
{"text": "[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ ∀ (i j : ℕ),\n    ComplexShape.Rel (ComplexShape.down ℕ) i j →\n      ((fun n => Iso.refl (HomologicalComplex.X (Splitting.nondegComplex (Γ₀.splitting K)) n)) i).hom ≫\n          HomologicalComplex.d K i j =\n        HomologicalComplex.d (Splitting.nondegComplex (Γ₀.splitting K)) i j ≫\n          ((fun n => Iso.refl (HomologicalComplex.X (Splitting.nondegComplex (Γ₀.splitting K)) n)) j).hom\n[PROOFSTEP]\nrintro _ n (rfl : n + 1 = _)\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ ((fun n => Iso.refl (HomologicalComplex.X (Splitting.nondegComplex (Γ₀.splitting K)) n)) (n + 1)).hom ≫\n      HomologicalComplex.d K (n + 1) n =\n    HomologicalComplex.d (Splitting.nondegComplex (Γ₀.splitting K)) (n + 1) n ≫\n      ((fun n => Iso.refl (HomologicalComplex.X (Splitting.nondegComplex (Γ₀.splitting K)) n)) n).hom\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ 𝟙 (Splitting.N (Γ₀.splitting K) (n + 1)) ≫ HomologicalComplex.d K (n + 1) n =\n    (Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n        HomologicalComplex.d (AlternatingFaceMapComplex.obj (Γ₀.obj K)) (n + 1) n ≫\n          Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n]))) ≫\n      𝟙 (Splitting.N (Γ₀.splitting K) n)\n[PROOFSTEP]\nsimp only [id_comp, comp_id, AlternatingFaceMapComplex.obj_d_eq, Preadditive.sum_comp, Preadditive.comp_sum]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.d K (n + 1) n =\n    Finset.sum Finset.univ fun j =>\n      Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n        ((-1) ^ ↑j • δ (Γ₀.obj K) j) ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n]))\n[PROOFSTEP]\nrw [Fintype.sum_eq_single (0 : Fin (n + 2))]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.d K (n + 1) n =\n    Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n      ((-1) ^ ↑0 • δ (Γ₀.obj K) 0) ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n]))\n[PROOFSTEP]\nsimp only [Fin.val_zero, pow_zero, one_zsmul]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.d K (n + 1) n =\n    Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n      δ (Γ₀.obj K) 0 ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n]))\n[PROOFSTEP]\nerw [Γ₀.Obj.mapMono_on_summand_id_assoc, Γ₀.Obj.Termwise.mapMono_δ₀, Splitting.ι_πSummand_eq_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ ∀ (x : Fin (n + 2)),\n    x ≠ 0 →\n      Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n          ((-1) ^ ↑x • δ (Γ₀.obj K) x) ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n])) =\n        0\n[PROOFSTEP]\nintro i hi\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n      ((-1) ^ ↑i • δ (Γ₀.obj K) i) ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n])) =\n    0\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n      ((-1) ^ ↑i • δ (Γ₀.obj K) i) ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n])) =\n    0\n[PROOFSTEP]\nsimp only [Preadditive.zsmul_comp, Preadditive.comp_zsmul, assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ (-1) ^ ↑i •\n      Splitting.ιSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n + 1])) ≫\n        δ (Γ₀.obj K) i ≫ Splitting.πSummand (Γ₀.splitting K) (Splitting.IndexSet.id (op [n])) =\n    0\n[PROOFSTEP]\nerw [Γ₀.Obj.mapMono_on_summand_id_assoc, Γ₀.Obj.Termwise.mapMono_eq_zero, zero_comp, zsmul_zero]\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ [n + 1] ≠ [n]\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\nh : [n + 1] = [n]\n⊢ False\n[PROOFSTEP]\nreplace h := congr_arg SimplexCategory.len h\n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\nh : SimplexCategory.len [n + 1] = SimplexCategory.len [n]\n⊢ False\n[PROOFSTEP]\nchange n + 1 = n at h \n[GOAL]\ncase h₁\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\nh : n + 1 = n\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase h₂\nC : Type u_1\ninst✝² : Category.{?u.42, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\ni : Fin (n + 2)\nhi : i ≠ 0\n⊢ ¬Isδ₀ (SimplexCategory.δ i)\n[PROOFSTEP]\nsimpa only [Isδ₀.iff] using hi\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ N₁Γ₀.app K =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).symm ≪≫\n      (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ (N₁Γ₀.app K).hom =\n    ((Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).symm ≪≫\n        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).hom\n[PROOFSTEP]\ndsimp [N₁Γ₀]\n[GOAL]\ncase w\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ (((Karoubi.Hom.mk PInfty ≫ NatTrans.app Split.toKaroubiNondegComplexFunctorIsoN₁.inv (Split.mk' (Γ₀.splitting K))) ≫\n          Karoubi.Hom.mk (𝟙 (Splitting.nondegComplex (Γ₀.splitting K)))) ≫\n        (toKaroubi (ChainComplex C ℕ)).map (NatTrans.app Γ₀'CompNondegComplexFunctor.hom K)) ≫\n      Karoubi.Hom.mk (𝟙 K) =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n      (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom\n[PROOFSTEP]\nerw [id_comp, comp_id, comp_id]\n[GOAL]\ncase w\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app Split.toKaroubiNondegComplexFunctorIsoN₁.inv (Split.mk' (Γ₀.splitting K)) ≫\n      (toKaroubi (ChainComplex C ℕ)).map (NatTrans.app Γ₀'CompNondegComplexFunctor.hom K) =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n      (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app N₁Γ₀.hom K =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n      (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom\n[PROOFSTEP]\nchange (N₁Γ₀.app K).hom = _\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ (N₁Γ₀.app K).hom =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n      (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom\n[PROOFSTEP]\nsimp only [N₁Γ₀_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ ((Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).symm ≪≫\n        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).hom =\n    (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n      (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app N₁Γ₀.inv K =\n    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫\n      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom\n[PROOFSTEP]\nchange (N₁Γ₀.app K).inv = _\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ (N₁Γ₀.app K).inv =\n    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫\n      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom\n[PROOFSTEP]\nsimp only [N₁Γ₀_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ ((Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).symm ≪≫\n        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).inv =\n    (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫\n      (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₁Γ₀.hom K).f n =\n    HomologicalComplex.Hom.f (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv.f n\n[PROOFSTEP]\nrw [N₁Γ₀_hom_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n      ((Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv ≫\n          (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom).f\n      n =\n    HomologicalComplex.Hom.f (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).inv.f n\n[PROOFSTEP]\napply comp_id\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₁Γ₀.inv K).f n =\n    HomologicalComplex.Hom.f (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom.f n\n[PROOFSTEP]\nrw [N₁Γ₀_inv_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\nn : ℕ\n⊢ HomologicalComplex.Hom.f\n      ((toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).inv ≫\n          (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom).f\n      n =\n    HomologicalComplex.Hom.f (Splitting.toKaroubiNondegComplexIsoN₁ (Γ₀.splitting K)).hom.f n\n[PROOFSTEP]\napply id_comp\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁\n[PROOFSTEP]\nhave h := Functor.congr_obj (functorExtension₂_comp_whiskeringLeft_toKaroubi (ChainComplex C ℕ) (SimplicialObject C)) Γ₀\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nh :\n  (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C) ⋙\n          (whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (SimplicialObject C))).obj\n            (toKaroubi (ChainComplex C ℕ))).obj\n      Γ₀ =\n    ((whiskeringRight (ChainComplex C ℕ) (SimplicialObject C) (Karoubi (SimplicialObject C))).obj\n          (toKaroubi (SimplicialObject C))).obj\n      Γ₀\n⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁\n[PROOFSTEP]\nhave h' :=\n  Functor.congr_obj (functorExtension₁_comp_whiskeringLeft_toKaroubi (SimplicialObject C) (ChainComplex C ℕ)) N₁\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nh :\n  (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C) ⋙\n          (whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (SimplicialObject C))).obj\n            (toKaroubi (ChainComplex C ℕ))).obj\n      Γ₀ =\n    ((whiskeringRight (ChainComplex C ℕ) (SimplicialObject C) (Karoubi (SimplicialObject C))).obj\n          (toKaroubi (SimplicialObject C))).obj\n      Γ₀\nh' :\n  (functorExtension₁ (SimplicialObject C) (ChainComplex C ℕ) ⋙\n          (whiskeringLeft (SimplicialObject C) (Karoubi (SimplicialObject C)) (Karoubi (ChainComplex C ℕ))).obj\n            (toKaroubi (SimplicialObject C))).obj\n      N₁ =\n    (𝟭 (SimplicialObject C ⥤ Karoubi (ChainComplex C ℕ))).obj N₁\n⊢ toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ = Γ₀ ⋙ N₁\n[PROOFSTEP]\ndsimp [N₂, Γ₂, functorExtension₁] at h h' ⊢\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nh :\n  toKaroubi (ChainComplex C ℕ) ⋙ (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C)).obj Γ₀ =\n    Γ₀ ⋙ toKaroubi (SimplicialObject C)\nh' : toKaroubi (SimplicialObject C) ⋙ FunctorExtension₁.obj N₁ = N₁\n⊢ toKaroubi (ChainComplex C ℕ) ⋙\n      (functorExtension₂ (ChainComplex C ℕ) (SimplicialObject C)).obj Γ₀ ⋙ FunctorExtension₁.obj N₁ =\n    Γ₀ ⋙ N₁\n[PROOFSTEP]\nrw [← Functor.assoc, h, Functor.assoc, h']\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\nX : Karoubi (ChainComplex C ℕ)\nn : ℕ\n⊢ HomologicalComplex.Hom.f (NatTrans.app N₂Γ₂.inv X).f n =\n    HomologicalComplex.Hom.f X.p n ≫ Splitting.ιSummand (Γ₀.splitting X.X) (Splitting.IndexSet.id (op [n]))\n[PROOFSTEP]\nsimp only [N₂Γ₂, Functor.preimageIso, Iso.trans, whiskeringLeft_obj_preimage_app, N₂Γ₂ToKaroubiIso_inv, assoc,\n  Functor.id_map, NatTrans.comp_app, eqToHom_app, Karoubi.comp_f, Karoubi.eqToHom_f, Karoubi.decompId_p_f,\n  HomologicalComplex.comp_f, N₁Γ₀_inv_app_f_f, Splitting.toKaroubiNondegComplexIsoN₁_hom_f_f, Functor.comp_map,\n  Functor.comp_obj, Karoubi.decompId_i_f, eqToHom_refl, comp_id, N₂_map_f_f, Γ₂_map_f_app, N₁_obj_p,\n  PInfty_on_Γ₀_splitting_summand_eq_self_assoc, toKaroubi_obj_X, Splitting.ι_desc, Splitting.IndexSet.id_fst,\n  SimplexCategory.len_mk, unop_op, Karoubi.HomologicalComplex.p_idem_assoc]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\n⊢ whiskerLeft (toKaroubi (ChainComplex C ℕ)) N₂Γ₂.hom = N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom\n[PROOFSTEP]\nlet e : _ ≅ toKaroubi (ChainComplex C ℕ) ⋙ 𝟭 _ := N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\ne : toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ ≅ toKaroubi (ChainComplex C ℕ) ⋙ 𝟭 (Karoubi (ChainComplex C ℕ)) :=\n  N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀\n⊢ whiskerLeft (toKaroubi (ChainComplex C ℕ)) N₂Γ₂.hom = N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom\n[PROOFSTEP]\nhave h := ((whiskeringLeft _ _ (Karoubi (ChainComplex C ℕ))).obj (toKaroubi (ChainComplex C ℕ))).image_preimage e.hom\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\ne : toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ ≅ toKaroubi (ChainComplex C ℕ) ⋙ 𝟭 (Karoubi (ChainComplex C ℕ)) :=\n  N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀\nh :\n  ((whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (ChainComplex C ℕ))).obj\n          (toKaroubi (ChainComplex C ℕ))).map\n      (((whiskeringLeft (ChainComplex C ℕ) (Karoubi (ChainComplex C ℕ)) (Karoubi (ChainComplex C ℕ))).obj\n            (toKaroubi (ChainComplex C ℕ))).preimage\n        e.hom) =\n    e.hom\n⊢ whiskerLeft (toKaroubi (ChainComplex C ℕ)) N₂Γ₂.hom = N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom\n[PROOFSTEP]\ndsimp only [whiskeringLeft, N₂Γ₂, Functor.preimageIso] at h ⊢\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : Preadditive C\ninst✝ : HasFiniteCoproducts C\ne : toKaroubi (ChainComplex C ℕ) ⋙ Γ₂ ⋙ N₂ ≅ toKaroubi (ChainComplex C ℕ) ⋙ 𝟭 (Karoubi (ChainComplex C ℕ)) :=\n  N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀\nh :\n  whiskerLeft (toKaroubi (ChainComplex C ℕ))\n      ((CategoryTheory.Functor.mk\n            { obj := fun G => toKaroubi (ChainComplex C ℕ) ⋙ G,\n              map := fun {X Y} α => whiskerLeft (toKaroubi (ChainComplex C ℕ)) α }).preimage\n        (N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀).hom) =\n    (N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀).hom\n⊢ whiskerLeft (toKaroubi (ChainComplex C ℕ))\n      ((CategoryTheory.Functor.mk\n            { obj := fun G => toKaroubi (ChainComplex C ℕ) ⋙ G,\n              map := fun {X Y} α => whiskerLeft (toKaroubi (ChainComplex C ℕ)) α }).preimage\n        (N₂Γ₂ToKaroubiIso ≪≫ N₁Γ₀).hom) =\n    N₂Γ₂ToKaroubiIso.hom ≫ N₁Γ₀.hom\n[PROOFSTEP]\nexact h\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.GammaCompN", "llama_tokens": 8245, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6297746213017459, "lm_q2_score": 0.41489884579676883, "lm_q1q2_score": 0.26129276349019154}}
{"text": "[GOAL]\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj : J\nU : Opens ↑↑(F.obj j)\n⊢ 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj : J\nU : Opens ↑↑(F.obj j)\n⊢ NatTrans.app (F.map (𝟙 j)).c (op U) =\n    NatTrans.app (Pushforward.id (F.obj j).presheaf).inv (op U) ≫\n      NatTrans.app (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom (op U)\n[PROOFSTEP]\ncases U\n[GOAL]\ncase mk\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj : J\ncarrier✝ : Set ↑↑(F.obj j)\nis_open'✝ : IsOpen carrier✝\n⊢ NatTrans.app (F.map (𝟙 j)).c (op { carrier := carrier✝, is_open' := is_open'✝ }) =\n    NatTrans.app (Pushforward.id (F.obj j).presheaf).inv (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫\n      NatTrans.app (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom\n        (op { carrier := carrier✝, is_open' := is_open'✝ })\n[PROOFSTEP]\nsimp [PresheafedSpace.congr_app (F.map_id j)]\n[GOAL]\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : Opens ↑↑(F.obj j₃)\n⊢ (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base\n[PROOFSTEP]\nrw [F.map_comp]\n[GOAL]\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : Opens ↑↑(F.obj j₃)\n⊢ (F.map f).base ≫ (F.map g).base = (F.map f ≫ F.map g).base\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : Opens ↑↑(F.obj j₃)\n⊢ NatTrans.app (F.map (f ≫ g)).c (op U) =\n    NatTrans.app (F.map g).c (op U) ≫\n      NatTrans.app (pushforwardMap (F.map g).base (F.map f).c) (op U) ≫\n        NatTrans.app (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv (op U) ≫\n          NatTrans.app\n            (pushforwardEq (_ : (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base) (F.obj j₁).presheaf).hom (op U)\n[PROOFSTEP]\ncases U\n[GOAL]\ncase mk\nJ : Type u'\ninst✝¹ : Category.{v', u'} J\nC : Type u\ninst✝ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\ncarrier✝ : Set ↑↑(F.obj j₃)\nis_open'✝ : IsOpen carrier✝\n⊢ NatTrans.app (F.map (f ≫ g)).c (op { carrier := carrier✝, is_open' := is_open'✝ }) =\n    NatTrans.app (F.map g).c (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫\n      NatTrans.app (pushforwardMap (F.map g).base (F.map f).c) (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫\n        NatTrans.app (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv\n            (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫\n          NatTrans.app\n            (pushforwardEq (_ : (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base) (F.obj j₁).presheaf).hom\n            (op { carrier := carrier✝, is_open' := is_open'✝ })\n[PROOFSTEP]\nsimp [PresheafedSpace.congr_app (F.map_comp f g)]\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nj k : Jᵒᵖ\nf : j ⟶ k\n⊢ (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n    op ((Opens.map (colimit.ι F k.unop).base).obj U)\n[PROOFSTEP]\nrw [← colimit.w F f.unop, comp_base]\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nj k : Jᵒᵖ\nf : j ⟶ k\n⊢ (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n    op ((Opens.map ((F.map f.unop).base ≫ (colimit.ι F j.unop).base)).obj U)\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nx : Jᵒᵖ\n⊢ { obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),\n          map := fun {j k} f =>\n            NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n              (F.obj k.unop).presheaf.map\n                (eqToHom\n                  (_ :\n                    (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                      op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.map\n      (𝟙 x) =\n    𝟙\n      ({ obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),\n            map := fun {j k} f =>\n              NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n                (F.obj k.unop).presheaf.map\n                  (eqToHom\n                    (_ :\n                      (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                        op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.obj\n        x)\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nx : Jᵒᵖ\n⊢ NatTrans.app (F.map (𝟙 x.unop)).c (op ((Opens.map (colimit.ι F x.unop).base).obj U)) ≫\n      (F.obj x.unop).presheaf.map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map (𝟙 x.unop)).base).obj ((Opens.map (colimit.ι F x.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F x.unop).base).obj U))) =\n    𝟙 ((F.obj x.unop).presheaf.obj (op ((Opens.map (colimit.ι F x.unop).base).obj U)))\n[PROOFSTEP]\nsimp [map_id_c_app, pushforwardObj_obj, op_obj, unop_op, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, assoc,\n  eqToHom_trans, eqToHom_refl, comp_id, TopCat.Presheaf.Pushforward.id_inv_app']\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nx : Jᵒᵖ\n⊢ NatTrans.app (Pushforward.id (F.obj x.unop).presheaf).inv (op ((Opens.map (colimit.ι F x.unop).base).obj U)) =\n    𝟙 ((F.obj x.unop).presheaf.obj (op ((Opens.map (colimit.ι F x.unop).base).obj U)))\n[PROOFSTEP]\nrw [TopCat.Presheaf.Pushforward.id_inv_app']\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\nx : Jᵒᵖ\n⊢ (F.obj x.unop).presheaf.map\n      (𝟙\n        (op\n          { carrier := ((Opens.map (colimit.ι F x.unop).base).toPrefunctor.1 U).carrier,\n            is_open' := (_ : IsOpen ((Opens.map (colimit.ι F x.unop).base).toPrefunctor.1 U).carrier) })) =\n    𝟙 ((F.obj x.unop).presheaf.obj (op ((Opens.map (colimit.ι F x.unop).base).obj U)))\n[PROOFSTEP]\nsimp only [Opens.carrier_eq_coe, Opens.mk_coe, map_id]\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ { obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),\n          map := fun {j k} f =>\n            NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n              (F.obj k.unop).presheaf.map\n                (eqToHom\n                  (_ :\n                    (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                      op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.map\n      (f ≫ g) =\n    { obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),\n            map := fun {j k} f =>\n              NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n                (F.obj k.unop).presheaf.map\n                  (eqToHom\n                    (_ :\n                      (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                        op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.map\n        f ≫\n      { obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),\n            map := fun {j k} f =>\n              NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n                (F.obj k.unop).presheaf.map\n                  (eqToHom\n                    (_ :\n                      (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                        op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.map\n        g\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ NatTrans.app (F.map (g.unop ≫ f.unop)).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n      (F.obj k.unop).presheaf.map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    (NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F j.unop).base).obj U)))) ≫\n      NatTrans.app (F.map g.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n        (F.obj k.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\nsimp_rw [map_comp_c_app]\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ (NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n        NatTrans.app (pushforwardMap (F.map f.unop).base (F.map g.unop).c)\n            (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n          NatTrans.app (Pushforward.comp (F.obj k.unop).presheaf (F.map g.unop).base (F.map f.unop).base).inv\n              (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n            NatTrans.app\n              (pushforwardEq (_ : (F.map g.unop).base ≫ (F.map f.unop).base = (F.map (g.unop ≫ f.unop)).base)\n                  (F.obj k.unop).presheaf).hom\n              (op ((Opens.map (colimit.ι F i.unop).base).obj U))) ≫\n      (F.obj k.unop).presheaf.map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    (NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F j.unop).base).obj U)))) ≫\n      NatTrans.app (F.map g.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n        (F.obj k.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\nsimp only [op_obj, unop_op, eqToHom_op, id_eq, id_comp, assoc, eqToHom_trans]\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n      NatTrans.app (pushforwardMap (F.map f.unop).base (F.map g.unop).c)\n          (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n        NatTrans.app (Pushforward.comp (F.obj k.unop).presheaf (F.map g.unop).base (F.map f.unop).base).inv\n            (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n          NatTrans.app\n              (pushforwardEq (_ : (F.map g.unop).base ≫ (F.map f.unop).base = (F.map (g.unop ≫ f.unop)).base)\n                  (F.obj k.unop).presheaf).hom\n              (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n            (F.obj k.unop).presheaf.map\n              (eqToHom\n                (_ :\n                  op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                    op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    NatTrans.app (F.map f.unop).c (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n      (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F j.unop).base).obj U))) ≫\n        NatTrans.app (F.map g.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n          (F.obj k.unop).presheaf.map\n            (eqToHom\n              (_ :\n                op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                  op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ NatTrans.app (pushforwardMap (F.map f.unop).base (F.map g.unop).c)\n        (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n      NatTrans.app (Pushforward.comp (F.obj k.unop).presheaf (F.map g.unop).base (F.map f.unop).base).inv\n          (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n        NatTrans.app\n            (pushforwardEq (_ : (F.map g.unop).base ≫ (F.map f.unop).base = (F.map (g.unop ≫ f.unop)).base)\n                (F.obj k.unop).presheaf).hom\n            (op ((Opens.map (colimit.ι F i.unop).base).obj U)) ≫\n          (F.obj k.unop).presheaf.map\n            (eqToHom\n              (_ :\n                op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                  op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    (F.obj j.unop).presheaf.map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F j.unop).base).obj U))) ≫\n      NatTrans.app (F.map g.unop).c (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫\n        (F.obj k.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\nrw [TopCat.Presheaf.Pushforward.comp_inv_app, TopCat.Presheaf.pushforwardEq_hom_app,\n  CategoryTheory.NatTrans.naturality_assoc, TopCat.Presheaf.pushforwardMap_app]\n[GOAL]\ncase e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ NatTrans.app (F.map g.unop).c\n        ((Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F i.unop).base).obj U))) ≫\n      𝟙\n          (((F.map f.unop).base _* ((F.map g.unop).base _* (F.obj k.unop).presheaf)).obj\n            (op ((Opens.map (colimit.ι F i.unop).base).obj U))) ≫\n        (F.obj k.unop).presheaf.map\n            (_root_.id\n              (eqToHom\n                  (_ :\n                    (Opens.map (F.map (g.unop ≫ f.unop)).base).obj\n                        (op ((Opens.map (colimit.ι F i.unop).base).obj U)).unop =\n                      (Opens.map ((F.map g.unop).base ≫ (F.map f.unop).base)).obj\n                        (op ((Opens.map (colimit.ι F i.unop).base).obj U)).unop)).op) ≫\n          (F.obj k.unop).presheaf.map\n            (eqToHom\n              (_ :\n                op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                  op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    NatTrans.app (F.map g.unop).c\n        (op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U))) ≫\n      ((F.map g.unop).base _* (F.obj k.unop).presheaf).map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F j.unop).base).obj U))) ≫\n        (F.obj k.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a.e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(colimit F)\ni j k : Jᵒᵖ\nf : i ⟶ j\ng : j ⟶ k\n⊢ 𝟙\n        (((F.map f.unop).base _* ((F.map g.unop).base _* (F.obj k.unop).presheaf)).obj\n          (op ((Opens.map (colimit.ι F i.unop).base).obj U))) ≫\n      (F.obj k.unop).presheaf.map\n          (_root_.id\n            (eqToHom\n                (_ :\n                  (Opens.map (F.map (g.unop ≫ f.unop)).base).obj\n                      (op ((Opens.map (colimit.ι F i.unop).base).obj U)).unop =\n                    (Opens.map ((F.map g.unop).base ≫ (F.map f.unop).base)).obj\n                      (op ((Opens.map (colimit.ι F i.unop).base).obj U)).unop)).op) ≫\n        (F.obj k.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map (g.unop ≫ f.unop)).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F k.unop).base).obj U))) =\n    ((F.map g.unop).base _* (F.obj k.unop).presheaf).map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map f.unop).base).obj ((Opens.map (colimit.ι F i.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F j.unop).base).obj U))) ≫\n      (F.obj k.unop).presheaf.map\n        (eqToHom\n          (_ :\n            op ((Opens.map (F.map g.unop).base).obj ((Opens.map (colimit.ι F j.unop).base).obj U)) =\n              op ((Opens.map (colimit.ι F k.unop).base).obj U)))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\n⊢ { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n          map := fun {j j'} f =>\n            (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                  (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                      (F.obj j).presheaf).hom).op }.map\n      (𝟙 j) =\n    𝟙\n      ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n            map := fun {j j'} f =>\n              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                        (F.obj j).presheaf).hom).op }.obj\n        j)\n[PROOFSTEP]\napply (opEquiv _ _).injective\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\n⊢ ↑(opEquiv\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j))\n      ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n            map := fun {j j'} f =>\n              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                        (F.obj j).presheaf).hom).op }.map\n        (𝟙 j)) =\n    ↑(opEquiv\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j))\n      (𝟙\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.obj\n          j))\n[PROOFSTEP]\nrefine NatTrans.ext _ _ (funext fun U => ?_)\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (𝟙 j)))\n      U =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        (𝟙\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)))\n      U\n[PROOFSTEP]\ninduction U with\n| h U =>\n  rcases U with ⟨U, hU⟩\n  dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op, pushforwardObj_obj, op_obj,\n    Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp, Quiver.Hom.unop_op, unop_id]\n    -- Porting note : some `simp` lemmas are not picked up\n  rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]\n  simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj', map_id, pushforwardEq_hom_app, eqToHom_op,\n    id_eq, eqToHom_map, id_comp, TopCat.Presheaf.Pushforward.id_inv_app']\n  rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]\n  dsimp\n  simp\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (𝟙 j)))\n      U =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        (𝟙\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)))\n      U\n[PROOFSTEP]\ninduction U with\n| h U =>\n  rcases U with ⟨U, hU⟩\n  dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op, pushforwardObj_obj, op_obj,\n    Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp, Quiver.Hom.unop_op, unop_id]\n    -- Porting note : some `simp` lemmas are not picked up\n  rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]\n  simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj', map_id, pushforwardEq_hom_app, eqToHom_op,\n    id_eq, eqToHom_map, id_comp, TopCat.Presheaf.Pushforward.id_inv_app']\n  rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]\n  dsimp\n  simp\n[GOAL]\ncase a.h\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Opens ↑(colimit (F ⋙ forget C))\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (𝟙 j)))\n      (op U) =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        (𝟙\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)))\n      (op U)\n[PROOFSTEP]\n\n| h U =>\n  rcases U with ⟨U, hU⟩\n  dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op, pushforwardObj_obj, op_obj,\n    Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp, Quiver.Hom.unop_op, unop_id]\n    -- Porting note : some `simp` lemmas are not picked up\n  rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]\n  simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj', map_id, pushforwardEq_hom_app, eqToHom_op,\n    id_eq, eqToHom_map, id_comp, TopCat.Presheaf.Pushforward.id_inv_app']\n  rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]\n  dsimp\n  simp\n[GOAL]\ncase a.h\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Opens ↑(colimit (F ⋙ forget C))\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (𝟙 j)))\n      (op U) =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        (𝟙\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)))\n      (op U)\n[PROOFSTEP]\nrcases U with ⟨U, hU⟩\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (𝟙 j)))\n      (op { carrier := U, is_open' := hU }) =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j))\n        (𝟙\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j)))\n      (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\ndsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op, pushforwardObj_obj, op_obj, Opens.map_obj,\n  opEquiv, Equiv.coe_fn_mk, unop_comp, Quiver.Hom.unop_op, unop_id]\n  -- Porting note : some `simp` lemmas are not picked up\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ NatTrans.app\n      (pushforwardMap (colimit.ι (F ⋙ forget C) j) (F.map (𝟙 j)).c ≫\n        (Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫\n          (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)\n              (F.obj j).presheaf).hom)\n      (op { carrier := U, is_open' := hU }) =\n    NatTrans.app (𝟙 (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf)) (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\nrw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ NatTrans.app (F.map (𝟙 j)).c ((Opens.map (colimit.ι (F ⋙ forget C) j)).op.obj (op { carrier := U, is_open' := hU })) ≫\n      NatTrans.app\n        ((Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫\n          (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)\n              (F.obj j).presheaf).hom)\n        (op { carrier := U, is_open' := hU }) =\n    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))\n[PROOFSTEP]\nsimp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj', map_id, pushforwardEq_hom_app, eqToHom_op,\n  id_eq, eqToHom_map, id_comp, TopCat.Presheaf.Pushforward.id_inv_app']\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ eqToHom\n        (_ :\n          (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =\n            (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫\n      NatTrans.app\n        ((Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫\n          (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)\n              (F.obj j).presheaf).hom)\n        (op { carrier := U, is_open' := hU }) =\n    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))\n[PROOFSTEP]\nrw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ eqToHom\n        (_ :\n          (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =\n            (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫\n      NatTrans.app\n        (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)\n            (F.obj j).presheaf).hom\n        (op { carrier := U, is_open' := hU }) =\n    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a.h.mk\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj : J\nU : Set ↑(colimit (F ⋙ forget C))\nhU : IsOpen U\n⊢ eqToHom\n        (_ :\n          (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(𝟙 ↑(F.obj j)) ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =\n            (F.obj j).presheaf.obj\n              (op\n                { carrier := ↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),\n                  is_open' := (_ : IsOpen (↑(F.map (𝟙 j)).base ⁻¹' (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫\n      NatTrans.app\n        (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)\n            (F.obj j).presheaf).hom\n        (op { carrier := U, is_open' := hU }) =\n    𝟙\n      ((F.obj j).presheaf.obj\n        (op\n          { carrier := ↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U,\n            is_open' := (_ : IsOpen (↑(colimit.ι (F ⋙ forget C) j) ⁻¹' U)) }))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\n⊢ { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n          map := fun {j j'} f =>\n            (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                  (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                      (F.obj j).presheaf).hom).op }.map\n      (f ≫ g) =\n    { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n            map := fun {j j'} f =>\n              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                        (F.obj j).presheaf).hom).op }.map\n        f ≫\n      { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n            map := fun {j j'} f =>\n              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                        (F.obj j).presheaf).hom).op }.map\n        g\n[PROOFSTEP]\napply (opEquiv _ _).injective\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\n⊢ ↑(opEquiv\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j₁)\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j₃))\n      ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n            map := fun {j j'} f =>\n              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                        (F.obj j).presheaf).hom).op }.map\n        (f ≫ g)) =\n    ↑(opEquiv\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j₁)\n          ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.obj\n            j₃))\n      ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          f ≫\n        { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          g)\n[PROOFSTEP]\nrefine NatTrans.ext _ _ (funext fun U => ?_)\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j₁)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j₃))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n              map := fun {j j'} f =>\n                (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                    (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                      (pushforwardEq\n                          (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                          (F.obj j).presheaf).hom).op }.map\n          (f ≫ g)))\n      U =\n    NatTrans.app\n      (↑(opEquiv\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j₁)\n            ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                  map := fun {j j'} f =>\n                    (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                        (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                          (pushforwardEq\n                              (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                              (F.obj j).presheaf).hom).op }.obj\n              j₃))\n        ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.map\n            f ≫\n          { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),\n                map := fun {j j'} f =>\n                  (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n                      (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫\n                        (pushforwardEq\n                            (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                            (F.obj j).presheaf).hom).op }.map\n            g))\n      U\n[PROOFSTEP]\ndsimp only [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op, pushforwardObj_obj, op_obj, opEquiv,\n  Equiv.coe_fn_mk, unop_comp, Quiver.Hom.unop_op]\n  -- Porting note : some `simp` lemmas are not picked up\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app\n      (pushforwardMap (colimit.ι (F ⋙ forget C) j₃) (F.map (f ≫ g)).c ≫\n        (Pushforward.comp (F.obj j₁).presheaf (F.map (f ≫ g)).base (colimit.ι (F ⋙ forget C) j₃)).inv ≫\n          (pushforwardEq (_ : (F ⋙ forget C).map (f ≫ g) ≫ colimit.ι (F ⋙ forget C) j₃ = colimit.ι (F ⋙ forget C) j₁)\n              (F.obj j₁).presheaf).hom)\n      U =\n    NatTrans.app\n      ((pushforwardMap (colimit.ι (F ⋙ forget C) j₃) (F.map g).c ≫\n          (Pushforward.comp (F.obj j₂).presheaf (F.map g).base (colimit.ι (F ⋙ forget C) j₃)).inv ≫\n            (pushforwardEq (_ : (F ⋙ forget C).map g ≫ colimit.ι (F ⋙ forget C) j₃ = colimit.ι (F ⋙ forget C) j₂)\n                (F.obj j₂).presheaf).hom) ≫\n        pushforwardMap (colimit.ι (F ⋙ forget C) j₂) (F.map f).c ≫\n          (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (colimit.ι (F ⋙ forget C) j₂)).inv ≫\n            (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j₂ = colimit.ι (F ⋙ forget C) j₁)\n                (F.obj j₁).presheaf).hom)\n      U\n[PROOFSTEP]\nrw [NatTrans.comp_app, pushforwardMap_app, NatTrans.comp_app, Pushforward.comp_inv_app, id_comp, pushforwardEq_hom_app,\n  NatTrans.comp_app, NatTrans.comp_app, NatTrans.comp_app, pushforwardMap_app, Pushforward.comp_inv_app, id_comp,\n  pushforwardEq_hom_app, NatTrans.comp_app, NatTrans.comp_app, pushforwardEq_hom_app, Pushforward.comp_inv_app, id_comp,\n  pushforwardMap_app]\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app (F.map (f ≫ g)).c ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).op.obj U) ≫\n      (F.obj j₁).presheaf.map\n        (_root_.id\n          (eqToHom\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop =\n                  (Opens.map ((F.map (f ≫ g)).base ≫ colimit.ι (F ⋙ forget C) j₃)).obj U.unop)).op) =\n    (NatTrans.app (F.map g).c ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).op.obj U) ≫\n        (F.obj j₂).presheaf.map\n          (_root_.id\n            (eqToHom\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop =\n                    (Opens.map ((F.map g).base ≫ colimit.ι (F ⋙ forget C) j₃)).obj U.unop)).op)) ≫\n      NatTrans.app (F.map f).c ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).op.obj U) ≫\n        (F.obj j₁).presheaf.map\n          (_root_.id\n            (eqToHom\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop =\n                    (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j₂)).obj U.unop)).op)\n[PROOFSTEP]\nsimp only [pushforwardObj_obj, op_obj, unop_op, map_comp_c_app, pushforwardMap_app, Opens.map_comp_obj,\n  Pushforward.comp_inv_app, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, id_comp, assoc, eqToHom_trans]\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app (F.map g).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) ≫\n      NatTrans.app (F.map f).c\n          (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) ≫\n        eqToHom\n          (_ :\n            (F.obj j₁).presheaf.obj\n                (op\n                  ((Opens.map (F.map f).base).obj\n                    ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))) =\n              (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop))) =\n    NatTrans.app (F.map g).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) ≫\n      eqToHom\n          (_ :\n            (F.obj j₂).presheaf.obj\n                (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) =\n              (F.obj j₂).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n        NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n          eqToHom\n            (_ :\n              (F.obj j₁).presheaf.obj\n                  (op ((Opens.map (F.map f).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) =\n                (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop)))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app (F.map g).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) ≫\n      NatTrans.app (F.map f).c\n          (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) ≫\n        eqToHom\n          (_ :\n            (F.obj j₁).presheaf.obj\n                (op\n                  ((Opens.map (F.map f).base).obj\n                    ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))) =\n              (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop))) =\n    NatTrans.app (F.map g).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) ≫\n      eqToHom\n          (_ :\n            (F.obj j₂).presheaf.obj\n                (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) =\n              (F.obj j₂).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n        NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n          eqToHom\n            (_ :\n              (F.obj j₁).presheaf.obj\n                  (op ((Opens.map (F.map f).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) =\n                (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop)))\n[PROOFSTEP]\ncongr 1\n  -- The key fact is `(F.map f).c.congr`,\n      -- which allows us in rewrite in the argument of `(F.map f).c.app`.\n[GOAL]\ncase a.e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ NatTrans.app (F.map f).c\n        (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) ≫\n      eqToHom\n        (_ :\n          (F.obj j₁).presheaf.obj\n              (op\n                ((Opens.map (F.map f).base).obj\n                  ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))) =\n            (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop))) =\n    eqToHom\n        (_ :\n          (F.obj j₂).presheaf.obj\n              (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) =\n            (F.obj j₂).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n      NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n        eqToHom\n          (_ :\n            (F.obj j₁).presheaf.obj\n                (op ((Opens.map (F.map f).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) =\n              (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop)))\n[PROOFSTEP]\nrw [@NatTrans.congr (α := (F.map f).c)\n    (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))\n    (op ((Opens.map (colimit.ι (F ⋙ PresheafedSpace.forget C) j₂)).obj (unop U))) _]\n[GOAL]\ncase a.e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ ((F.obj j₂).presheaf.map (eqToHom ?m.93087) ≫\n        NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n          ((F.map f).base _* (F.obj j₁).presheaf).map\n            (eqToHom\n              (_ :\n                op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop) =\n                  op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))))) ≫\n      eqToHom\n        (_ :\n          (F.obj j₁).presheaf.obj\n              (op\n                ((Opens.map (F.map f).base).obj\n                  ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))) =\n            (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop))) =\n    eqToHom\n        (_ :\n          (F.obj j₂).presheaf.obj\n              (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) =\n            (F.obj j₂).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n      NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n        eqToHom\n          (_ :\n            (F.obj j₁).presheaf.obj\n                (op ((Opens.map (F.map f).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) =\n              (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop)))\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) =\n    op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)\n[PROOFSTEP]\nswap\n  -- Now we show the open sets are equal.\n[GOAL]\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) =\n    op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)\n[PROOFSTEP]\napply unop_injective\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))).unop =\n    (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)).unop\n[PROOFSTEP]\nrw [← Opens.map_comp_obj]\n[GOAL]\ncase a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ (op ((Opens.map ((F.map g).base ≫ colimit.ι (F ⋙ forget C) j₃)).obj U.unop)).unop =\n    (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)).unop\n[PROOFSTEP]\ncongr\n[GOAL]\ncase a.e_self.e_x.e_self.e_self.e_f\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ (F.map g).base ≫ colimit.ι (F ⋙ forget C) j₃ = colimit.ι (F ⋙ forget C) j₂\n[PROOFSTEP]\nexact colimit.w (F ⋙ PresheafedSpace.forget C) g\n[GOAL]\ncase a.e_a\nJ : Type u'\ninst✝² : Category.{v', u'} J\nC : Type u\ninst✝¹ : Category.{v, u} C\ninst✝ : HasColimitsOfShape J TopCat\nF : J ⥤ PresheafedSpace C\nj₁ j₂ j₃ : J\nf : j₁ ⟶ j₂\ng : j₂ ⟶ j₃\nU : (Opens ↑(colimit (F ⋙ forget C)))ᵒᵖ\n⊢ ((F.obj j₂).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)) =\n                op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n        NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n          ((F.map f).base _* (F.obj j₁).presheaf).map\n            (eqToHom\n              (_ :\n                op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop) =\n                  op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))))) ≫\n      eqToHom\n        (_ :\n          (F.obj j₁).presheaf.obj\n              (op\n                ((Opens.map (F.map f).base).obj\n                  ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop)))) =\n            (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop))) =\n    eqToHom\n        (_ :\n          (F.obj j₂).presheaf.obj\n              (op ((Opens.map (F.map g).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₃)).obj U.unop))) =\n            (F.obj j₂).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) ≫\n      NatTrans.app (F.map f).c (op ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop)) ≫\n        eqToHom\n          (_ :\n            (F.obj j₁).presheaf.obj\n                (op ((Opens.map (F.map f).base).obj ((Opens.map (colimit.ι (F ⋙ forget C) j₂)).obj U.unop))) =\n              (F.obj j₁).presheaf.obj (op ((Opens.map (colimit.ι (F ⋙ forget C) j₁)).obj U.unop)))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\n⊢ F.map f ≫\n      (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j' =\n    (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫\n      ((Functor.const J).obj (colimit F)).map f\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\n⊢ (F.map f ≫\n        (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n          j').base =\n    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫\n        ((Functor.const J).obj (colimit F)).map f).base\n[PROOFSTEP]\next x\n[GOAL]\ncase w.w\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nx : (CategoryTheory.forget TopCat).obj ↑(F.obj j)\n⊢ ↑(F.map f ≫\n            (fun j =>\n                { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n              j').base\n      x =\n    ↑((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫\n            ((Functor.const J).obj (colimit F)).map f).base\n      x\n[PROOFSTEP]\nexact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x\n[GOAL]\ncase h\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\n⊢ (F.map f ≫\n          (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n            j').c ≫\n      whiskerRight\n        (eqToHom\n          (_ :\n            (Opens.map\n                  (F.map f ≫\n                      (fun j =>\n                          { base := colimit.ι (F ⋙ forget C) j,\n                            c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n                        j').base).op =\n              (Opens.map\n                  ((fun j =>\n                          { base := colimit.ι (F ⋙ forget C) j,\n                            c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n                        j ≫\n                      ((Functor.const J).obj (colimit F)).map f).base).op))\n        (F.obj j).presheaf =\n    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫\n        ((Functor.const J).obj (colimit F)).map f).c\n[PROOFSTEP]\next ⟨U, hU⟩\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ NatTrans.app\n      ((F.map f ≫\n            (fun j =>\n                { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n              j').c ≫\n        whiskerRight\n          (eqToHom\n            (_ :\n              (Opens.map\n                    (F.map f ≫\n                        (fun j =>\n                            { base := colimit.ι (F ⋙ forget C) j,\n                              c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n                          j').base).op =\n                (Opens.map\n                    ((fun j =>\n                            { base := colimit.ι (F ⋙ forget C) j,\n                              c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })\n                          j ≫\n                        ((Functor.const J).obj (colimit F)).map f).base).op))\n          (F.obj j).presheaf)\n      (op { carrier := U, is_open' := hU }) =\n    NatTrans.app\n      ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫\n          ((Functor.const J).obj (colimit F)).map f).c\n      (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ NatTrans.app\n      ((F.map f ≫\n            { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }).c ≫\n        whiskerRight\n          (eqToHom\n            (_ :\n              (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op =\n                (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op))\n          (F.obj j).presheaf)\n      (op { carrier := U, is_open' := hU }) =\n    NatTrans.app (𝟙 (colimit F)).c (op { carrier := U, is_open' := hU }) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j)) (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\nrw [PresheafedSpace.id_c_app, map_id]\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ NatTrans.app\n      ((F.map f ≫\n            { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }).c ≫\n        whiskerRight\n          (eqToHom\n            (_ :\n              (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op =\n                (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op))\n          (F.obj j).presheaf)\n      (op { carrier := U, is_open' := hU }) =\n    𝟙 ((colimit F).presheaf.obj (op { carrier := U, is_open' := hU })) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j)) (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\nerw [id_comp]\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ NatTrans.app\n      ((F.map f ≫\n            { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }).c ≫\n        whiskerRight\n          (eqToHom\n            (_ :\n              (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op =\n                (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op))\n          (F.obj j).presheaf)\n      (op { carrier := U, is_open' := hU }) =\n    NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j)) (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\nrw [NatTrans.comp_app, PresheafedSpace.comp_c_app, whiskerRight_app, eqToHom_app, ←\n  congr_arg NatTrans.app (limit.w (pushforwardDiagramToColimit F).leftOp f.op), NatTrans.comp_app, Functor.leftOp_map,\n  pushforwardDiagramToColimit_map]\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ (NatTrans.app { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }.c\n          (op { carrier := U, is_open' := hU }) ≫\n        NatTrans.app (F.map f).c\n          (op\n            ((Opens.map\n                  { base := colimit.ι (F ⋙ forget C) j',\n                      c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }.base).obj\n              (op { carrier := U, is_open' := hU }).unop))) ≫\n      (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op.obj (op { carrier := U, is_open' := hU }) =\n              (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op.obj\n                (op { carrier := U, is_open' := hU }))) =\n    NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j')) (op { carrier := U, is_open' := hU }) ≫\n      NatTrans.app\n        (pushforwardMap (colimit.ι (F ⋙ forget C) (op j').unop) (F.map f.op.unop).c ≫\n              (Pushforward.comp (F.obj (op j).unop).presheaf ((F ⋙ forget C).map f.op.unop)\n                    (colimit.ι (F ⋙ forget C) (op j').unop)).inv ≫\n                (pushforwardEq\n                    (_ :\n                      (F ⋙ forget C).map f.op.unop ≫ colimit.ι (F ⋙ forget C) (op j').unop =\n                        colimit.ι (F ⋙ forget C) (op j).unop)\n                    (F.obj (op j).unop).presheaf).hom).op.unop\n        (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ (NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j')) (op { carrier := U, is_open' := hU }) ≫\n        NatTrans.app (F.map f).c\n          (op\n            { carrier := ↑(colimit.ι (F ⋙ forget C) j') ⁻¹' U,\n              is_open' := (_ : IsOpen (↑(colimit.ι (F ⋙ forget C) j') ⁻¹' U)) })) ≫\n      (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op.obj (op { carrier := U, is_open' := hU }) =\n              (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op.obj\n                (op { carrier := U, is_open' := hU }))) =\n    NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j')) (op { carrier := U, is_open' := hU }) ≫\n      NatTrans.app\n        (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫\n          (Pushforward.comp (F.obj j).presheaf (F.map f).base (colimit.ι (F ⋙ forget C) j')).inv ≫\n            (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)\n                (F.obj j).presheaf).hom)\n        (op { carrier := U, is_open' := hU })\n[PROOFSTEP]\nrw [NatTrans.comp_app, NatTrans.comp_app, pushforwardEq_hom_app, id.def, eqToHom_op, Pushforward.comp_inv_app, id_comp,\n  pushforwardMap_app, ← assoc]\n[GOAL]\ncase h.w.mk\nJ : Type u'\ninst✝³ : Category.{v', u'} J\nC : Type u\ninst✝² : Category.{v, u} C\ninst✝¹ : HasColimitsOfShape J TopCat\ninst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\nF : J ⥤ PresheafedSpace C\nj j' : J\nf : j ⟶ j'\nU : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')\nhU : IsOpen U\n⊢ (NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j')) (op { carrier := U, is_open' := hU }) ≫\n        NatTrans.app (F.map f).c\n          (op\n            { carrier := ↑(colimit.ι (F ⋙ forget C) j') ⁻¹' U,\n              is_open' := (_ : IsOpen (↑(colimit.ι (F ⋙ forget C) j') ⁻¹' U)) })) ≫\n      (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op.obj (op { carrier := U, is_open' := hU }) =\n              (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op.obj\n                (op { carrier := U, is_open' := hU }))) =\n    (NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j')) (op { carrier := U, is_open' := hU }) ≫\n        NatTrans.app (F.map f).c\n          ((Opens.map (colimit.ι (F ⋙ forget C) j')).op.obj (op { carrier := U, is_open' := hU }))) ≫\n      (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            op\n                ((Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).obj\n                  (op { carrier := U, is_open' := hU }).unop) =\n              op ((Opens.map (colimit.ι (F ⋙ forget C) j)).obj (op { carrier := U, is_open' := hU }).unop)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\n⊢ s.pt.presheaf.obj U ⟶\n    (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s) _* limit (pushforwardDiagramToColimit F).leftOp).obj U\n[PROOFSTEP]\nrefine'\n  limit.lift _\n      { pt := s.pt.presheaf.obj U\n        π :=\n          { app := fun j => _\n            naturality := fun j j' f => _ } } ≫\n    (limitObjIsoLimitCompEvaluation _ _).inv\n[GOAL]\ncase refine'_1\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ ((Functor.const Jᵒᵖ).obj (s.pt.presheaf.obj U)).obj j ⟶\n    ((pushforwardDiagramToColimit F).leftOp ⋙\n          (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n            ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U)).obj\n      j\n[PROOFSTEP]\nrefine' (s.ι.app (unop j)).c.app U ≫ (F.obj (unop j)).presheaf.map (eqToHom _)\n[GOAL]\ncase refine'_1\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n    (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_1\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n    op\n      ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nrw [← Opens.map_comp_obj]\n[GOAL]\ncase refine'_1\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n    op ((Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\n⊢ ((Functor.const Jᵒᵖ).obj (s.pt.presheaf.obj U)).map f ≫\n      (fun j =>\n          NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n            (F.obj j.unop).presheaf.map\n              (eqToHom\n                (_ :\n                  (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                    (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))))\n        j' =\n    (fun j =>\n          NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n            (F.obj j.unop).presheaf.map\n              (eqToHom\n                (_ :\n                  (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                    (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))))\n        j ≫\n      ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U)).map\n        f\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      NatTrans.app (NatTrans.app s.ι j'.unop).c U ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nrw [PresheafedSpace.congr_app (s.w f.unop).symm U]\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nhave w :=\n  Functor.congr_obj (congr_arg Opens.map (colimit.ι_desc ((PresheafedSpace.forget C).mapCocone s) (unop j))) (unop U)\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\nw :\n  (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop =\n    (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nsimp only [Opens.map_comp_obj_unop] at w \n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\nw :\n  (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop) =\n    (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nreplace w := congr_arg op w\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\nw :\n  op\n      ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nhave w' := NatTrans.congr (F.map f.unop).c w\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\nw :\n  op\n      ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)\nw' :\n  NatTrans.app (F.map f.unop).c\n      (op\n        ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) =\n    (F.obj j.unop).presheaf.map (eqToHom w) ≫\n      NatTrans.app (F.map f.unop).c (op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)) ≫\n        ((F.map f.unop).base _* (F.obj j'.unop).presheaf).map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      NatTrans.app (F.map f.unop).c\n          (op\n            ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nrw [w']\n[GOAL]\ncase refine'_2\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU : (Opens ↑↑s.pt)ᵒᵖ\nj j' : Jᵒᵖ\nf : j ⟶ j'\nw :\n  op\n      ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)\nw' :\n  NatTrans.app (F.map f.unop).c\n      (op\n        ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) =\n    (F.obj j.unop).presheaf.map (eqToHom w) ≫\n      NatTrans.app (F.map f.unop).c (op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)) ≫\n        ((F.map f.unop).base _* (F.obj j'.unop).presheaf).map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n⊢ 𝟙 (s.pt.presheaf.obj U) ≫\n      (NatTrans.app (F.map f.unop ≫ NatTrans.app s.ι j.unop).c U ≫\n          (F.obj j'.unop).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map (F.map f.unop ≫ NatTrans.app s.ι j.unop).base).op.obj U =\n                  (Opens.map (NatTrans.app s.ι j'.unop).base).op.obj U))) ≫\n        (F.obj j'.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j'.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j'.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) =\n    (NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop) =\n                op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n      ((F.obj j.unop).presheaf.map (eqToHom w) ≫\n          NatTrans.app (F.map f.unop).c (op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop)) ≫\n            ((F.map f.unop).base _* (F.obj j'.unop).presheaf).map\n              (eqToHom\n                (_ :\n                  op ((Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop) =\n                    op\n                      ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj j'.unop).presheaf (F.map f.unop).base (colimit.ι (F ⋙ forget C) j.unop)).inv\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) j.unop = colimit.ι (F ⋙ forget C) j'.unop)\n                (F.obj j'.unop).presheaf).hom\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\n⊢ s.pt.presheaf.map i ≫ descCApp F s V =\n    descCApp F s U ≫ (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s) _* (colimitCocone F).pt.presheaf).map i\n[PROOFSTEP]\ndsimp [descCApp]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\n⊢ s.pt.presheaf.map i ≫\n      limit.lift\n          ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))\n          { pt := s.pt.presheaf.obj V,\n            π :=\n              NatTrans.mk fun j =>\n                NatTrans.app (NatTrans.app s.ι j.unop).c V ≫\n                  (F.obj j.unop).presheaf.map\n                    (eqToHom\n                      (_ :\n                        (Opens.map (NatTrans.app s.ι j.unop).base).op.obj V =\n                          (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                            ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj V))) } ≫\n        (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop))).inv =\n    (limit.lift\n          ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))\n          { pt := s.pt.presheaf.obj U,\n            π :=\n              NatTrans.mk fun j =>\n                NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n                  (F.obj j.unop).presheaf.map\n                    (eqToHom\n                      (_ :\n                        (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                          (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                            ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))) } ≫\n        (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))).inv) ≫\n      (limit (pushforwardDiagramToColimit F).leftOp).map\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop).op\n[PROOFSTEP]\nrefine limit_obj_ext (fun j => ?_)\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\n⊢ (s.pt.presheaf.map i ≫\n        limit.lift\n            ((pushforwardDiagramToColimit F).leftOp ⋙\n              (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))\n            { pt := s.pt.presheaf.obj V,\n              π :=\n                NatTrans.mk fun j =>\n                  NatTrans.app (NatTrans.app s.ι j.unop).c V ≫\n                    (F.obj j.unop).presheaf.map\n                      (eqToHom\n                        (_ :\n                          (Opens.map (NatTrans.app s.ι j.unop).base).op.obj V =\n                            (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj V))) } ≫\n          (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop))).inv) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)) =\n    ((limit.lift\n            ((pushforwardDiagramToColimit F).leftOp ⋙\n              (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))\n            { pt := s.pt.presheaf.obj U,\n              π :=\n                NatTrans.mk fun j =>\n                  NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n                    (F.obj j.unop).presheaf.map\n                      (eqToHom\n                        (_ :\n                          (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                            (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))) } ≫\n          (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))).inv) ≫\n        (limit (pushforwardDiagramToColimit F).leftOp).map\n          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop).op) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop))\n[PROOFSTEP]\nsimp only [limit.lift_π, NatTrans.naturality, limit.lift_π_assoc, eqToHom_map, assoc, pushforwardObj_map,\n  NatTrans.naturality_assoc, op_map, limitObjIsoLimitCompEvaluation_inv_π_app_assoc,\n  limitObjIsoLimitCompEvaluation_inv_π_app]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        ((pushforwardDiagramToColimit F).leftOp.obj j).map\n          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop).op\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op\n[PROOFSTEP]\nhave w :=\n  Functor.congr_hom (congr_arg Opens.map (colimit.ι_desc ((PresheafedSpace.forget C).mapCocone s) (unop j))) i.unop\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\nw :\n  (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop =\n    eqToHom\n        (_ :\n          (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n              V.unop =\n            (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj V.unop) ≫\n      (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).map i.unop ≫\n        eqToHom\n          (_ :\n            (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop =\n              (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                U.unop)\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op\n[PROOFSTEP]\nsimp only [Opens.map_comp_map] at w \n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\nw :\n  (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop) =\n    eqToHom\n        (_ :\n          (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n              V.unop =\n            (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj V.unop) ≫\n      (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).map i.unop ≫\n        eqToHom\n          (_ :\n            (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop =\n              (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                U.unop)\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op\n[PROOFSTEP]\nreplace w := congr_arg Quiver.Hom.op w\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\nw :\n  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op =\n    (eqToHom\n          (_ :\n            (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                V.unop =\n              (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj V.unop) ≫\n        (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).map i.unop ≫\n          eqToHom\n            (_ :\n              (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop =\n                (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                  U.unop)).op\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op\n[PROOFSTEP]\nrw [w]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nU V : (Opens ↑↑s.pt)ᵒᵖ\ni : U ⟶ V\nj : Jᵒᵖ\nw :\n  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).map\n        ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).map i.unop)).op =\n    (eqToHom\n          (_ :\n            (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                V.unop =\n              (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj V.unop) ≫\n        (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).map i.unop ≫\n          eqToHom\n            (_ :\n              (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop =\n                (Opens.map (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                  U.unop)).op\n⊢ NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      (F.obj j.unop).presheaf.map ((Opens.map (NatTrans.app s.ι j.unop).base).map i.unop).op ≫\n        eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj V.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj V.unop)))) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n          (_ :\n            (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n              (F.obj j.unop).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n                (_ :\n                  (Opens.map\n                          (colimit.ι (F ⋙ forget C) j.unop ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                      V.unop =\n                    (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj V.unop) ≫\n              (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).map i.unop ≫\n                eqToHom\n                  (_ :\n                    (Opens.map (NatTrans.app ((forget C).mapCocone s).ι j.unop)).obj U.unop =\n                      (Opens.map\n                            (colimit.ι (F ⋙ forget C) j.unop ≫\n                              colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj\n                        U.unop)).op\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\n⊢ NatTrans.app (colimitCocone F).ι j ≫ desc F s = NatTrans.app s.ι j\n[PROOFSTEP]\next U\n[GOAL]\ncase w.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : (CategoryTheory.forget TopCat).obj ↑(F.obj j)\n⊢ ↑(NatTrans.app (colimitCocone F).ι j ≫ desc F s).base U = ↑(NatTrans.app s.ι j).base U\n[PROOFSTEP]\nsimp [desc]\n[GOAL]\ncase h.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : Opens ↑↑s.pt\n⊢ NatTrans.app\n      ((NatTrans.app (colimitCocone F).ι j ≫ desc F s).c ≫\n        whiskerRight\n          (eqToHom\n            (_ :\n              (Opens.map (NatTrans.app (colimitCocone F).ι j ≫ desc F s).base).op =\n                (Opens.map (NatTrans.app s.ι j).base).op))\n          (F.obj j).presheaf)\n      (op U) =\n    NatTrans.app (NatTrans.app s.ι j).c (op U)\n[PROOFSTEP]\nrw [NatTrans.comp_app, PresheafedSpace.comp_c_app, whiskerRight_app]\n[GOAL]\ncase h.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : Opens ↑↑s.pt\n⊢ (NatTrans.app (desc F s).c (op U) ≫\n        NatTrans.app (NatTrans.app (colimitCocone F).ι j).c (op ((Opens.map (desc F s).base).obj (op U).unop))) ≫\n      (F.obj j).presheaf.map\n        (NatTrans.app\n          (eqToHom\n            (_ :\n              (Opens.map (NatTrans.app (colimitCocone F).ι j ≫ desc F s).base).op =\n                (Opens.map (NatTrans.app s.ι j).base).op))\n          (op U)) =\n    NatTrans.app (NatTrans.app s.ι j).c (op U)\n[PROOFSTEP]\ndsimp [desc, descCApp]\n[GOAL]\ncase h.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : Opens ↑↑s.pt\n⊢ ((limit.lift\n            ((pushforwardDiagramToColimit F).leftOp ⋙\n              (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U)))\n            { pt := s.pt.presheaf.obj (op U),\n              π :=\n                NatTrans.mk fun j =>\n                  NatTrans.app (NatTrans.app s.ι j.unop).c (op U) ≫\n                    (F.obj j.unop).presheaf.map\n                      (eqToHom\n                        (_ :\n                          (Opens.map (NatTrans.app s.ι j.unop).base).op.obj (op U) =\n                            (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                              ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj (op U)))) } ≫\n          (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U))).inv) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp (op j))\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U))) ≫\n      (F.obj j).presheaf.map\n        (NatTrans.app\n          (eqToHom\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) j ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op =\n                (Opens.map (NatTrans.app s.ι j).base).op))\n          (op U)) =\n    NatTrans.app (NatTrans.app s.ι j).c (op U)\n[PROOFSTEP]\nsimp only [eqToHom_app, op_obj, Opens.map_comp_obj, eqToHom_map, Functor.leftOp, assoc]\n[GOAL]\ncase h.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : Opens ↑↑s.pt\n⊢ limit.lift\n        (CategoryTheory.Functor.mk\n            { obj := fun X => ((pushforwardDiagramToColimit F).obj X.unop).unop,\n              map := fun {X Y} f => ((pushforwardDiagramToColimit F).map f.unop).unop } ⋙\n          (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U)))\n        { pt := s.pt.presheaf.obj (op U),\n          π :=\n            NatTrans.mk fun j =>\n              NatTrans.app (NatTrans.app s.ι j.unop).c (op U) ≫\n                (F.obj j.unop).presheaf.map\n                  (eqToHom\n                    (_ :\n                      (Opens.map (NatTrans.app s.ι j.unop).base).op.obj (op U) =\n                        (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj (op U)))) } ≫\n      (limitObjIsoLimitCompEvaluation\n            (CategoryTheory.Functor.mk\n              { obj := fun X => ((pushforwardDiagramToColimit F).obj X.unop).unop,\n                map := fun {X Y} f => ((pushforwardDiagramToColimit F).map f.unop).unop })\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U))).inv ≫\n        NatTrans.app\n            (limit.π\n              (CategoryTheory.Functor.mk\n                { obj := fun X => ((pushforwardDiagramToColimit F).obj X.unop).unop,\n                  map := fun {X Y} f => ((pushforwardDiagramToColimit F).map f.unop).unop })\n              (op j))\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U)) ≫\n          eqToHom\n            (_ :\n              (F.obj j).presheaf.obj\n                  (op\n                    ((Opens.map (colimit.ι (F ⋙ forget C) j)).obj\n                      ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U))) =\n                (F.obj j).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j).base).obj U))) =\n    NatTrans.app (NatTrans.app s.ι j).c (op U)\n[PROOFSTEP]\nrw [limitObjIsoLimitCompEvaluation_inv_π_app_assoc]\n[GOAL]\ncase h.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nj : J\nU : Opens ↑↑s.pt\n⊢ limit.lift\n        (CategoryTheory.Functor.mk\n            { obj := fun X => ((pushforwardDiagramToColimit F).obj X.unop).unop,\n              map := fun {X Y} f => ((pushforwardDiagramToColimit F).map f.unop).unop } ⋙\n          (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U)))\n        { pt := s.pt.presheaf.obj (op U),\n          π :=\n            NatTrans.mk fun j =>\n              NatTrans.app (NatTrans.app s.ι j.unop).c (op U) ≫\n                (F.obj j.unop).presheaf.map\n                  (eqToHom\n                    (_ :\n                      (Opens.map (NatTrans.app s.ι j.unop).base).op.obj (op U) =\n                        (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                          ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj (op U)))) } ≫\n      limit.π\n          (CategoryTheory.Functor.mk\n              { obj := fun X => ((pushforwardDiagramToColimit F).obj X.unop).unop,\n                map := fun {X Y} f => ((pushforwardDiagramToColimit F).map f.unop).unop } ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U)))\n          (op j) ≫\n        eqToHom\n          (_ :\n            (F.obj j).presheaf.obj\n                (op\n                  ((Opens.map (colimit.ι (F ⋙ forget C) j)).obj\n                    ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U))) =\n              (F.obj j).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j).base).obj U))) =\n    NatTrans.app (NatTrans.app s.ι j).c (op U)\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m = (fun s => desc F s) s\n[PROOFSTEP]\nhave t : m.base = colimit.desc (F ⋙ PresheafedSpace.forget C) ((PresheafedSpace.forget C).mapCocone s) :=\n  by\n  dsimp\n  ext j\n  rw [colimit.ι_desc, mapCocone_ι_app, ← w j]\n  simp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\n⊢ m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\n[PROOFSTEP]\next j\n[GOAL]\ncase w.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx✝ : (CategoryTheory.forget TopCat).obj ((F ⋙ forget C).obj j)\n⊢ ↑(colimit.ι (F ⋙ forget C) j ≫ m.base) x✝ =\n    ↑(colimit.ι (F ⋙ forget C) j ≫ colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)) x✝\n[PROOFSTEP]\nrw [colimit.ι_desc, mapCocone_ι_app, ← w j]\n[GOAL]\ncase w.w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nj : J\nx✝ : (CategoryTheory.forget TopCat).obj ((F ⋙ forget C).obj j)\n⊢ ↑(colimit.ι (F ⋙ forget C) j ≫ m.base) x✝ = ↑((forget C).map (NatTrans.app (colimitCocone F).ι j ≫ m)) x✝\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\n⊢ m = (fun s => desc F s) s\n[PROOFSTEP]\next : 1\n[GOAL]\ncase w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\n⊢ m.base = ((fun s => desc F s) s).base\n[PROOFSTEP]\nexact t\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\n⊢ m.c ≫\n      whiskerRight (eqToHom (_ : (Opens.map m.base).op = (Opens.map ((fun s => desc F s) s).base).op))\n        (colimitCocone F).pt.presheaf =\n    ((fun s => desc F s) s).c\n[PROOFSTEP]\nrefine NatTrans.ext _ _ (funext fun U => limit_obj_ext fun j => ?_)\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ NatTrans.app\n        (m.c ≫\n          whiskerRight (eqToHom (_ : (Opens.map m.base).op = (Opens.map ((fun s => desc F s) s).base).op))\n            (colimitCocone F).pt.presheaf)\n        U ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        ((Opens.map ((fun s => desc F s) s).base).op.obj U) =\n    NatTrans.app ((fun s => desc F s) s).c U ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        ((Opens.map ((fun s => desc F s) s).base).op.obj U)\n[PROOFSTEP]\ndsimp only [colimitCocone_pt, colimit_carrier, leftOp_obj, pushforwardDiagramToColimit_obj, comp_obj, forget_obj,\n  unop_op, op_obj, desc, colimit_presheaf, descCApp, mapCocone_pt, pushforwardObj_obj, const_obj_obj, id_eq,\n  evaluation_obj_obj, Eq.ndrec, eq_mpr_eq_cast]\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ NatTrans.app\n        (m.c ≫\n          whiskerRight\n            (eqToHom\n              (_ : (Opens.map m.base).op = (Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op))\n            (limit (pushforwardDiagramToColimit F).leftOp))\n        U ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    (limit.lift\n          ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))\n          { pt := s.pt.presheaf.obj U,\n            π :=\n              NatTrans.mk fun j =>\n                NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n                  (F.obj j.unop).presheaf.map\n                    (eqToHom\n                      (_ :\n                        (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                          (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                            ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))) } ≫\n        (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))).inv) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nrw [NatTrans.comp_app, whiskerRight_app]\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ (NatTrans.app m.c U ≫\n        (limit (pushforwardDiagramToColimit F).leftOp).map\n          (NatTrans.app\n            (eqToHom\n              (_ : (Opens.map m.base).op = (Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op))\n            U)) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    (limit.lift\n          ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑(Limits.colimit (F ⋙ forget C)))ᵒᵖ C).obj\n              (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)))\n          { pt := s.pt.presheaf.obj U,\n            π :=\n              NatTrans.mk fun j =>\n                NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n                  (F.obj j.unop).presheaf.map\n                    (eqToHom\n                      (_ :\n                        (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U =\n                          (Opens.map (colimit.ι (F ⋙ forget C) j.unop)).op.obj\n                            ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).op.obj U))) } ≫\n        (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))).inv) ≫\n      NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n        (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))\n[PROOFSTEP]\nsimp only [pushforwardObj_obj, op_obj, comp_obj, eqToHom_app, eqToHom_map, assoc,\n  limitObjIsoLimitCompEvaluation_inv_π_app, limit.lift_π]\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ NatTrans.app m.c U ≫\n      eqToHom\n          (_ :\n            (limit (pushforwardDiagramToColimit F).leftOp).obj (op ((Opens.map m.base).obj U.unop)) =\n              (limit (pushforwardDiagramToColimit F).leftOp).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    NatTrans.app (NatTrans.app s.ι j.unop).c U ≫\n      eqToHom\n        (_ :\n          (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n            (F.obj j.unop).presheaf.obj\n              (op\n                ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                  ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n[PROOFSTEP]\nrw [PresheafedSpace.congr_app (w (unop j)).symm U]\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ NatTrans.app m.c U ≫\n      eqToHom\n          (_ :\n            (limit (pushforwardDiagramToColimit F).leftOp).obj (op ((Opens.map m.base).obj U.unop)) =\n              (limit (pushforwardDiagramToColimit F).leftOp).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    (NatTrans.app (NatTrans.app (colimitCocone F).ι j.unop ≫ m).c U ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map (NatTrans.app (colimitCocone F).ι j.unop ≫ m).base).op.obj U =\n                (Opens.map (NatTrans.app s.ι j.unop).base).op.obj U))) ≫\n      eqToHom\n        (_ :\n          (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n            (F.obj j.unop).presheaf.obj\n              (op\n                ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                  ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\n⊢ NatTrans.app m.c U ≫\n      eqToHom\n          (_ :\n            (limit (pushforwardDiagramToColimit F).leftOp).obj (op ((Opens.map m.base).obj U.unop)) =\n              (limit (pushforwardDiagramToColimit F).leftOp).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    ((NatTrans.app m.c U ≫\n          NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j) (op ((Opens.map m.base).obj U.unop))) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app (colimitCocone F).ι j.unop ≫ m).base).obj U.unop) =\n                op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)))) ≫\n      eqToHom\n        (_ :\n          (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n            (F.obj j.unop).presheaf.obj\n              (op\n                ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                  ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n[PROOFSTEP]\nhave w := congr_arg op (Functor.congr_obj (congr_arg Opens.map t) (unop U))\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw✝ : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\nw :\n  op ((Opens.map m.base).obj U.unop) =\n    op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)\n⊢ NatTrans.app m.c U ≫\n      eqToHom\n          (_ :\n            (limit (pushforwardDiagramToColimit F).leftOp).obj (op ((Opens.map m.base).obj U.unop)) =\n              (limit (pushforwardDiagramToColimit F).leftOp).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    ((NatTrans.app m.c U ≫\n          NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j) (op ((Opens.map m.base).obj U.unop))) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app (colimitCocone F).ι j.unop ≫ m).base).obj U.unop) =\n                op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)))) ≫\n      eqToHom\n        (_ :\n          (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n            (F.obj j.unop).presheaf.obj\n              (op\n                ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                  ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n[PROOFSTEP]\nrw [NatTrans.congr (limit.π (pushforwardDiagramToColimit F).leftOp j) w]\n[GOAL]\ncase h\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ns : Cocone F\nm : (colimitCocone F).pt ⟶ s.pt\nw✝ : ∀ (j : J), NatTrans.app (colimitCocone F).ι j ≫ m = NatTrans.app s.ι j\nt : m.base = colimit.desc (F ⋙ forget C) ((forget C).mapCocone s)\nU : (Opens ↑↑s.pt)ᵒᵖ\nj : Jᵒᵖ\nw :\n  op ((Opens.map m.base).obj U.unop) =\n    op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)\n⊢ NatTrans.app m.c U ≫\n      eqToHom\n          (_ :\n            (limit (pushforwardDiagramToColimit F).leftOp).obj (op ((Opens.map m.base).obj U.unop)) =\n              (limit (pushforwardDiagramToColimit F).leftOp).obj\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))) ≫\n        NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n          (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) =\n    ((NatTrans.app m.c U ≫\n          (limit (pushforwardDiagramToColimit F).leftOp).map (eqToHom w) ≫\n            NatTrans.app (limit.π (pushforwardDiagramToColimit F).leftOp j)\n                (op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop)) ≫\n              ((pushforwardDiagramToColimit F).leftOp.obj j).map\n                (eqToHom\n                  (_ :\n                    op ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop) =\n                      op ((Opens.map m.base).obj U.unop)))) ≫\n        (F.obj j.unop).presheaf.map\n          (eqToHom\n            (_ :\n              op ((Opens.map (NatTrans.app (colimitCocone F).ι j.unop ≫ m).base).obj U.unop) =\n                op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)))) ≫\n      eqToHom\n        (_ :\n          (F.obj j.unop).presheaf.obj (op ((Opens.map (NatTrans.app s.ι j.unop).base).obj U.unop)) =\n            (F.obj j.unop).presheaf.obj\n              (op\n                ((Opens.map (colimit.ι (F ⋙ forget C) j.unop)).obj\n                  ((Opens.map (colimit.desc (F ⋙ forget C) ((forget C).mapCocone s))).obj U.unop))))\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\n⊢ IsColimit ((forget C).mapCocone (colimitCocone F))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit (colimit.isColimit _)\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\n⊢ colimit.cocone (F ⋙ forget C) ≅ (forget C).mapCocone (colimitCocone F)\n[PROOFSTEP]\nfapply Cocones.ext\n[GOAL]\ncase φ\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\n⊢ (colimit.cocone (F ⋙ forget C)).pt ≅ ((forget C).mapCocone (colimitCocone F)).pt\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\n⊢ autoParam\n    (∀ (j : J),\n      NatTrans.app (colimit.cocone (F ⋙ forget C)).ι j ≫ (Iso.refl (colimit.cocone (F ⋙ forget C)).pt).hom =\n        NatTrans.app ((forget C).mapCocone (colimitCocone F)).ι j)\n    _auto✝\n[PROOFSTEP]\nintro j\n[GOAL]\ncase w\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nj : J\n⊢ NatTrans.app (colimit.cocone (F ⋙ forget C)).ι j ≫ (Iso.refl (colimit.cocone (F ⋙ forget C)).pt).hom =\n    NatTrans.app ((forget C).mapCocone (colimitCocone F)).ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ✝ : Type u'\ninst✝⁵ : Category.{v', u'} J✝\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J✝ TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape J✝ᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape J✝ᵒᵖ C\ninst✝ : HasLimits C\nJ : Type v\n𝒥 : Category.{v, v} J\nF : J ⥤ PresheafedSpace C\n⊢ IsColimit ((forget C).mapCocone (colimitCocone F))\n[PROOFSTEP]\napply IsColimit.ofIsoColimit (colimit.isColimit _)\n[GOAL]\nJ✝ : Type u'\ninst✝⁵ : Category.{v', u'} J✝\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J✝ TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape J✝ᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape J✝ᵒᵖ C\ninst✝ : HasLimits C\nJ : Type v\n𝒥 : Category.{v, v} J\nF : J ⥤ PresheafedSpace C\n⊢ colimit.cocone (F ⋙ forget C) ≅ (forget C).mapCocone (colimitCocone F)\n[PROOFSTEP]\nfapply Cocones.ext\n[GOAL]\ncase φ\nJ✝ : Type u'\ninst✝⁵ : Category.{v', u'} J✝\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J✝ TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape J✝ᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape J✝ᵒᵖ C\ninst✝ : HasLimits C\nJ : Type v\n𝒥 : Category.{v, v} J\nF : J ⥤ PresheafedSpace C\n⊢ (colimit.cocone (F ⋙ forget C)).pt ≅ ((forget C).mapCocone (colimitCocone F)).pt\n[PROOFSTEP]\nrfl\n[GOAL]\ncase w\nJ✝ : Type u'\ninst✝⁵ : Category.{v', u'} J✝\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J✝ TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape J✝ᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape J✝ᵒᵖ C\ninst✝ : HasLimits C\nJ : Type v\n𝒥 : Category.{v, v} J\nF : J ⥤ PresheafedSpace C\n⊢ autoParam\n    (∀ (j : J),\n      NatTrans.app (colimit.cocone (F ⋙ forget C)).ι j ≫ (Iso.refl (colimit.cocone (F ⋙ forget C)).pt).hom =\n        NatTrans.app ((forget C).mapCocone (colimitCocone F)).ι j)\n    _auto✝\n[PROOFSTEP]\nintro j\n[GOAL]\ncase w\nJ✝ : Type u'\ninst✝⁵ : Category.{v', u'} J✝\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J✝ TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape J✝ᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape J✝ᵒᵖ C\ninst✝ : HasLimits C\nJ : Type v\n𝒥 : Category.{v, v} J\nF : J ⥤ PresheafedSpace C\nj : J\n⊢ NatTrans.app (colimit.cocone (F ⋙ forget C)).ι j ≫ (Iso.refl (colimit.cocone (F ⋙ forget C)).pt).hom =\n    NatTrans.app ((forget C).mapCocone (colimitCocone F)).ι j\n[PROOFSTEP]\nsimp\n[GOAL]\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\n⊢ (Limits.colimit F).presheaf.obj (op U) ≅ limit (componentwiseDiagram F U)\n[PROOFSTEP]\nrefine' ((sheafIsoOfIso (colimit.isoColimitCocone ⟨_, colimitCoconeIsColimit F⟩).symm).app (op U)).trans _\n[GOAL]\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\n⊢ ((colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base _*\n          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt.presheaf).obj\n      (op U) ≅\n    limit (componentwiseDiagram F U)\n[PROOFSTEP]\nrefine' (limitObjIsoLimitCompEvaluation _ _).trans (Limits.lim.mapIso _)\n[GOAL]\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\n⊢ (pushforwardDiagramToColimit F).leftOp ⋙\n      (evaluation (Opens ↑↑{ cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt)ᵒᵖ C).obj\n        ((Opens.map\n                (colimit.isoColimitCocone\n                        { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n          (op U)) ≅\n    componentwiseDiagram F U\n[PROOFSTEP]\nfapply NatIso.ofComponents\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\n⊢ (X : Jᵒᵖ) →\n    ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑↑{ cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt)ᵒᵖ\n                  C).obj\n              ((Opens.map\n                      (colimit.isoColimitCocone\n                              { cocone := colimitCocone F,\n                                isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                (op U))).obj\n        X ≅\n      (componentwiseDiagram F U).obj X\n[PROOFSTEP]\nintro X\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\n⊢ ((pushforwardDiagramToColimit F).leftOp ⋙\n          (evaluation (Opens ↑↑{ cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt)ᵒᵖ C).obj\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))).obj\n      X ≅\n    (componentwiseDiagram F U).obj X\n[PROOFSTEP]\nrefine' (F.obj (unop X)).presheaf.mapIso (eqToIso _)\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\n⊢ (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n      ((Opens.map\n              (colimit.isoColimitCocone\n                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n        (op U)) =\n    op ((Opens.map (colimit.ι F X.unop).base).obj U)\n[PROOFSTEP]\nsimp only [Functor.op_obj, unop_op, op_inj_iff, Opens.map_coe, SetLike.ext'_iff, Set.preimage_preimage]\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\n⊢ (fun x =>\n        ↑(colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base\n          (↑(colimit.ι (F ⋙ forget C) X.unop) x)) ⁻¹'\n      ↑U =\n    ↑(colimit.ι F X.unop).base ⁻¹' ↑U\n[PROOFSTEP]\nrefine congr_arg (Set.preimage . U.1) (funext fun x => ?_)\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\nx : (CategoryTheory.forget TopCat).obj ((F ⋙ forget C).obj X.unop)\n⊢ ↑(colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base\n      (↑(colimit.ι (F ⋙ forget C) X.unop) x) =\n    ↑(colimit.ι F X.unop).base x\n[PROOFSTEP]\nerw [← comp_app]\n[GOAL]\ncase app\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\nx : (CategoryTheory.forget TopCat).obj ((F ⋙ forget C).obj X.unop)\n⊢ ↑(colimit.ι (F ⋙ forget C) X.unop ≫\n          (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base)\n      x =\n    ↑(colimit.ι F X.unop).base x\n[PROOFSTEP]\ncongr\n[GOAL]\ncase app.e_a\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX : Jᵒᵖ\nx : (CategoryTheory.forget TopCat).obj ((F ⋙ forget C).obj X.unop)\n⊢ colimit.ι (F ⋙ forget C) X.unop ≫\n      (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base =\n    (colimit.ι F X.unop).base\n[PROOFSTEP]\nexact ι_preservesColimitsIso_inv (forget C) F (unop X)\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\n⊢ autoParam\n    (∀ {X Y : Jᵒᵖ} (f : X ⟶ Y),\n      ((pushforwardDiagramToColimit F).leftOp ⋙\n                (evaluation (Opens ↑↑{ cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt)ᵒᵖ\n                      C).obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U))).map\n            f ≫\n          ((F.obj Y.unop).presheaf.mapIso\n              (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F Y.unop).base).obj U)))).hom =\n        ((F.obj X.unop).presheaf.mapIso\n              (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n          (componentwiseDiagram F U).map f)\n    _auto✝\n[PROOFSTEP]\nintro X Y f\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ ((pushforwardDiagramToColimit F).leftOp ⋙\n            (evaluation (Opens ↑↑{ cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.pt)ᵒᵖ\n                  C).obj\n              ((Opens.map\n                      (colimit.isoColimitCocone\n                              { cocone := colimitCocone F,\n                                isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                (op U))).map\n        f ≫\n      ((F.obj Y.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F Y.unop).base).obj U)))).hom =\n    ((F.obj X.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n      (componentwiseDiagram F U).map f\n[PROOFSTEP]\nchange ((F.map f.unop).c.app _ ≫ _ ≫ _) ≫ (F.obj (unop Y)).presheaf.map _ = _ ≫ _\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ (NatTrans.app (F.map f.unop).c\n          ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))) ≫\n        NatTrans.app\n            (Pushforward.comp (F.obj Y.unop).presheaf ((F ⋙ forget C).map f.unop) (colimit.ι (F ⋙ forget C) X.unop)).inv\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U)) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop = colimit.ι (F ⋙ forget C) Y.unop)\n                (F.obj Y.unop).presheaf).hom\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))) ≫\n      (F.obj Y.unop).presheaf.map\n        (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F Y.unop).base).obj U))).hom =\n    ((F.obj X.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n      (componentwiseDiagram F U).map f\n[PROOFSTEP]\nrw [TopCat.Presheaf.Pushforward.comp_inv_app]\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ (NatTrans.app (F.map f.unop).c\n          ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))) ≫\n        𝟙\n            ((colimit.ι (F ⋙ forget C) X.unop _* ((F ⋙ forget C).map f.unop _* (F.obj Y.unop).presheaf)).obj\n              ((Opens.map\n                      (colimit.isoColimitCocone\n                              { cocone := colimitCocone F,\n                                isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                (op U))) ≫\n          NatTrans.app\n            (pushforwardEq\n                (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop = colimit.ι (F ⋙ forget C) Y.unop)\n                (F.obj Y.unop).presheaf).hom\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))) ≫\n      (F.obj Y.unop).presheaf.map\n        (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F Y.unop).base).obj U))).hom =\n    ((F.obj X.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n      (componentwiseDiagram F U).map f\n[PROOFSTEP]\nerw [Category.id_comp]\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ (NatTrans.app (F.map f.unop).c\n          ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U))) ≫\n        NatTrans.app\n          (pushforwardEq\n              (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop = colimit.ι (F ⋙ forget C) Y.unop)\n              (F.obj Y.unop).presheaf).hom\n          ((Opens.map\n                  (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n            (op U))) ≫\n      (F.obj Y.unop).presheaf.map\n        (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F Y.unop).base).obj U))).hom =\n    ((F.obj X.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n      (componentwiseDiagram F U).map f\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ NatTrans.app (F.map f.unop).c\n        ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n          ((Opens.map\n                  (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n            (op U))) ≫\n      NatTrans.app\n          (pushforwardEq\n              (_ : (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop = colimit.ι (F ⋙ forget C) Y.unop)\n              (F.obj Y.unop).presheaf).hom\n          ((Opens.map\n                  (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n            (op U)) ≫\n        (F.obj Y.unop).presheaf.map\n          (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F Y.unop).base).obj U))).hom =\n    ((F.obj X.unop).presheaf.mapIso\n          (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F X.unop).base).obj U)))).hom ≫\n      (componentwiseDiagram F U).map f\n[PROOFSTEP]\nerw [← (F.obj (unop Y)).presheaf.map_comp, (F.map f.unop).c.naturality_assoc, ← (F.obj (unop Y)).presheaf.map_comp]\n[GOAL]\ncase naturality\nJ : Type u'\ninst✝⁵ : Category.{v', u'} J\nC : Type u\ninst✝⁴ : Category.{v, u} C\ninst✝³ : HasColimitsOfShape J TopCat\ninst✝² : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝¹ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\ninst✝ : HasColimit F\nU : Opens ↑↑(Limits.colimit F)\nX Y : Jᵒᵖ\nf : X ⟶ Y\n⊢ NatTrans.app (F.map f.unop).c\n        ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n          ((Opens.map\n                  (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n            (op U))) ≫\n      (F.obj Y.unop).presheaf.map\n        (NatTrans.app\n            (NatIso.op\n                (Opens.mapIso ((F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop)\n                    (colimit.ι (F ⋙ forget C) Y.unop)\n                    (_ :\n                      (F ⋙ forget C).map f.unop ≫ colimit.ι (F ⋙ forget C) X.unop =\n                        colimit.ι (F ⋙ forget C) Y.unop)).symm).hom\n            ((Opens.map\n                    (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n              (op U)) ≫\n          (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) Y.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F Y.unop).base).obj U))).hom) =\n    NatTrans.app (F.map f.unop).c\n        ((Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n          ((Opens.map\n                  (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n            (op U))) ≫\n      (F.obj Y.unop).presheaf.map\n        ((Opens.map (F.map f.unop).base).op.map\n            (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F X.unop).base).obj U))).hom ≫\n          eqToHom\n            (_ :\n              (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F X.unop).base).obj U)) =\n                op ((Opens.map (colimit.ι F Y.unop).base).obj U)))\n[PROOFSTEP]\nrfl\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ (colimitPresheafObjIsoComponentwiseLimit F U).inv ≫ NatTrans.app (colimit.ι F j).c (op U) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\ndelta colimitPresheafObjIsoComponentwiseLimit\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ ((sheafIsoOfIso\n                (colimit.isoColimitCocone\n                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).symm).app\n            (op U) ≪≫\n          limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              ((Opens.map\n                      (colimit.isoColimitCocone\n                              { cocone := colimitCocone F,\n                                isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                (op U)) ≪≫\n            Limits.lim.mapIso\n              (NatIso.ofComponents fun X =>\n                (F.obj X.unop).presheaf.mapIso\n                  (eqToIso\n                    (_ :\n                      (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                          ((Opens.map\n                                  (colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                            (op U)) =\n                        op ((Opens.map (colimit.ι F X.unop).base).obj U))))).inv ≫\n      NatTrans.app (colimit.ι F j).c (op U) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nrw [Iso.trans_inv, Iso.trans_inv, Iso.app_inv, sheafIsoOfIso_inv, pushforwardToOfIso_app, congr_app (Iso.symm_inv _)]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ (((Limits.lim.mapIso\n              (NatIso.ofComponents fun X =>\n                (F.obj X.unop).presheaf.mapIso\n                  (eqToIso\n                    (_ :\n                      (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                          ((Opens.map\n                                  (colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                            (op U)) =\n                        op ((Opens.map (colimit.ι F X.unop).base).obj U))))).inv ≫\n          (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              ((Opens.map\n                      (colimit.isoColimitCocone\n                              { cocone := colimitCocone F,\n                                isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                (op U))).inv) ≫\n        (NatTrans.app\n              (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.c\n              (op\n                ((Opens.map\n                      ((forget C).mapIso\n                            (colimit.isoColimitCocone\n                                { cocone := colimitCocone F,\n                                  isColimit := colimitCoconeIsColimit F }).symm).symm.inv).obj\n                  (op U).unop)) ≫\n            (Limits.colimit F).presheaf.map\n              (eqToHom\n                (_ :\n                  (Opens.map\n                            (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base).op.obj\n                      (op\n                        ((Opens.map\n                              ((forget C).mapIso\n                                    (colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).symm).symm.inv).obj\n                          (op U).unop)) =\n                    (Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.inv.base).op.obj\n                      (op\n                        ((Opens.map\n                              ((forget C).mapIso\n                                    (colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).symm).symm.inv).obj\n                          (op U).unop))))) ≫\n          (Limits.colimit F).presheaf.map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑((forget C).mapIso\n                                  (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm).symm.hom ⁻¹'\n                          ↑(op\n                                {\n                                  carrier :=\n                                    ↑((forget C).mapIso\n                                              (colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).symm).symm.inv ⁻¹'\n                                      ↑(op U).unop,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑((forget C).mapIso\n                                                  (colimit.isoColimitCocone\n                                                      { cocone := colimitCocone F,\n                                                        isColimit := colimitCoconeIsColimit F }).symm).symm.inv ⁻¹'\n                                          ↑(op U).unop)) }).unop,\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑((forget C).mapIso\n                                      (colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).symm).symm.hom ⁻¹'\n                              ↑(op\n                                    {\n                                      carrier :=\n                                        ↑((forget C).mapIso\n                                                  (colimit.isoColimitCocone\n                                                      { cocone := colimitCocone F,\n                                                        isColimit := colimitCoconeIsColimit F }).symm).symm.inv ⁻¹'\n                                          ↑(op U).unop,\n                                      is_open' :=\n                                        (_ :\n                                          IsOpen\n                                            (↑((forget C).mapIso\n                                                      (colimit.isoColimitCocone\n                                                          { cocone := colimitCocone F,\n                                                            isColimit := colimitCoconeIsColimit F }).symm).symm.inv ⁻¹'\n                                              ↑(op U).unop)) }).unop)) } =\n                  op U))) ≫\n      NatTrans.app (colimit.ι F j).c (op U) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\ndsimp\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ ((limMap\n            (NatIso.ofComponents fun X =>\n                (F.obj X.unop).presheaf.mapIso\n                  (eqToIso\n                    (_ :\n                      (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                          ((Opens.map\n                                  (colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                            (op U)) =\n                        op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv ≫\n          (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n              (op\n                ((Opens.map\n                      (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                  U))).inv) ≫\n        (NatTrans.app\n              (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.c\n              (op\n                ((Opens.map\n                      (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                  U)) ≫\n            (Limits.colimit F).presheaf.map\n              (𝟙\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base).obj\n                    ((Opens.map\n                          (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                      U))))) ≫\n          (Limits.colimit F).presheaf.map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                            ↑U),\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                              ↑{\n                                  carrier :=\n                                    ↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑(colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                          ↑U)) })) } =\n                  op U))) ≫\n      NatTrans.app (colimit.ι F j).c (op U) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nrw [map_id, comp_id, assoc, assoc, assoc, NatTrans.naturality]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ limMap\n        (NatIso.ofComponents fun X =>\n            (F.obj X.unop).presheaf.mapIso\n              (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv ≫\n      (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U))).inv ≫\n        NatTrans.app\n            (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.c\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U)) ≫\n          NatTrans.app (colimit.ι F j).c\n              (op\n                ((Opens.map\n                      (colimit.isoColimitCocone\n                            { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base).obj\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U))) ≫\n            ((colimit.ι F j).base _* (F.obj j).presheaf).map\n              (eqToHom\n                (_ :\n                  op\n                      {\n                        carrier :=\n                          ↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                              ↑U),\n                        is_open' :=\n                          (_ :\n                            IsOpen\n                              (↑(colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                                ↑{\n                                    carrier :=\n                                      ↑(colimit.isoColimitCocone\n                                                { cocone := colimitCocone F,\n                                                  isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                        ↑U,\n                                    is_open' :=\n                                      (_ :\n                                        IsOpen\n                                          (↑(colimit.isoColimitCocone\n                                                    { cocone := colimitCocone F,\n                                                      isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                            ↑U)) })) } =\n                    op U)) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nerw [← comp_c_app_assoc]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ limMap\n        (NatIso.ofComponents fun X =>\n            (F.obj X.unop).presheaf.mapIso\n              (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv ≫\n      (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U))).inv ≫\n        NatTrans.app\n            (colimit.ι F j ≫\n                (colimit.isoColimitCocone { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).c\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U)) ≫\n          ((colimit.ι F j).base _* (F.obj j).presheaf).map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                            ↑U),\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                              ↑{\n                                  carrier :=\n                                    ↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑(colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                          ↑U)) })) } =\n                  op U)) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nrw [congr_app (colimit.isoColimitCocone_ι_hom _ _), assoc]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ limMap\n        (NatIso.ofComponents fun X =>\n            (F.obj X.unop).presheaf.mapIso\n              (eqToIso\n                (_ :\n                  (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                      ((Opens.map\n                              (colimit.isoColimitCocone\n                                      { cocone := colimitCocone F,\n                                        isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                        (op U)) =\n                    op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv ≫\n      (limitObjIsoLimitCompEvaluation (pushforwardDiagramToColimit F).leftOp\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U))).inv ≫\n        NatTrans.app (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι j).c\n            (op\n              ((Opens.map\n                    (colimit.isoColimitCocone\n                          { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                U)) ≫\n          (F.obj j).presheaf.map\n              (eqToHom\n                (_ :\n                  (Opens.map\n                            (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                                j).base).op.obj\n                      (op\n                        ((Opens.map\n                              (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                          U)) =\n                    (Opens.map\n                            (colimit.ι F j ≫\n                                (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                      (op\n                        ((Opens.map\n                              (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                          U)))) ≫\n            ((colimit.ι F j).base _* (F.obj j).presheaf).map\n              (eqToHom\n                (_ :\n                  op\n                      {\n                        carrier :=\n                          ↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                              ↑U),\n                        is_open' :=\n                          (_ :\n                            IsOpen\n                              (↑(colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                                ↑{\n                                    carrier :=\n                                      ↑(colimit.isoColimitCocone\n                                                { cocone := colimitCocone F,\n                                                  isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                        ↑U,\n                                    is_open' :=\n                                      (_ :\n                                        IsOpen\n                                          (↑(colimit.isoColimitCocone\n                                                    { cocone := colimitCocone F,\n                                                      isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                            ↑U)) })) } =\n                    op U)) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nerw [limitObjIsoLimitCompEvaluation_inv_π_app_assoc, limMap_π_assoc]\n  -- Porting note : `convert` doesn't work due to meta variable, so change to a `suffices` block\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ limit.π (componentwiseDiagram F U) (op j) ≫\n      NatTrans.app\n          (NatIso.ofComponents fun X =>\n              (F.obj X.unop).presheaf.mapIso\n                (eqToIso\n                  (_ :\n                    (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                        ((Opens.map\n                                (colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                          (op U)) =\n                      op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n          (op j) ≫\n        (F.obj j).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                              j).base).op.obj\n                    (op\n                      ((Opens.map\n                            (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                        U)) =\n                  (Opens.map\n                          (colimit.ι F j ≫\n                              (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                    (op\n                      ((Opens.map\n                            (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                        U)))) ≫\n          ((colimit.ι F j).base _* (F.obj j).presheaf).map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                            ↑U),\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                              ↑{\n                                  carrier :=\n                                    ↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑(colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                          ↑U)) })) } =\n                  op U)) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nset f := _\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : ?m.311389 := ?m.311390\n⊢ limit.π (componentwiseDiagram F U) (op j) ≫\n      NatTrans.app\n          (NatIso.ofComponents fun X =>\n              (F.obj X.unop).presheaf.mapIso\n                (eqToIso\n                  (_ :\n                    (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                        ((Opens.map\n                                (colimit.isoColimitCocone\n                                        { cocone := colimitCocone F,\n                                          isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                          (op U)) =\n                      op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n          (op j) ≫\n        (F.obj j).presheaf.map\n            (eqToHom\n              (_ :\n                (Opens.map\n                          (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                              j).base).op.obj\n                    (op\n                      ((Opens.map\n                            (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                        U)) =\n                  (Opens.map\n                          (colimit.ι F j ≫\n                              (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                    (op\n                      ((Opens.map\n                            (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                        U)))) ≫\n          ((colimit.ι F j).base _* (F.obj j).presheaf).map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                            ↑U),\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                              ↑{\n                                  carrier :=\n                                    ↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑(colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                          ↑U)) })) } =\n                  op U)) =\n    limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nchange _ ≫ f = _\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\n⊢ limit.π (componentwiseDiagram F U) (op j) ≫ f = limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nsuffices f_eq : f = 𝟙 _ by rw [f_eq, comp_id]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\nf_eq : f = 𝟙 ((componentwiseDiagram F U).obj (op j))\n⊢ limit.π (componentwiseDiagram F U) (op j) ≫ f = limit.π (componentwiseDiagram F U) (op j)\n[PROOFSTEP]\nrw [f_eq, comp_id]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\n⊢ f = 𝟙 ((componentwiseDiagram F U).obj (op j))\n[PROOFSTEP]\nerw [← (F.obj j).presheaf.map_id]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\n⊢ f = (F.obj j).presheaf.map (𝟙 (op ((Opens.map (colimit.ι F (op j).unop).base).obj U)))\n[PROOFSTEP]\nchange (F.obj j).presheaf.map _ ≫ _ = _\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\n⊢ (F.obj j).presheaf.map\n        (eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) (op j).unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F (op j).unop).base).obj U))).inv ≫\n      (F.obj j).presheaf.map\n          (eqToHom\n            (_ :\n              (Opens.map\n                        (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                            j).base).op.obj\n                  (op\n                    ((Opens.map\n                          (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                      U)) =\n                (Opens.map\n                        (colimit.ι F j ≫\n                            (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                  (op\n                    ((Opens.map\n                          (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                      U)))) ≫\n        ((colimit.ι F j).base _* (F.obj j).presheaf).map\n          (eqToHom\n            (_ :\n              op\n                  {\n                    carrier :=\n                      ↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                          ↑U),\n                    is_open' :=\n                      (_ :\n                        IsOpen\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                            ↑{\n                                carrier :=\n                                  ↑(colimit.isoColimitCocone\n                                            { cocone := colimitCocone F,\n                                              isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                    ↑U,\n                                is_open' :=\n                                  (_ :\n                                    IsOpen\n                                      (↑(colimit.isoColimitCocone\n                                                { cocone := colimitCocone F,\n                                                  isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                        ↑U)) })) } =\n                op U)) =\n    (F.obj j).presheaf.map (𝟙 (op ((Opens.map (colimit.ι F (op j).unop).base).obj U)))\n[PROOFSTEP]\nerw [← (F.obj j).presheaf.map_comp, ← (F.obj j).presheaf.map_comp]\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\nf : (componentwiseDiagram F U).obj (op j) ⟶ (F.obj j).presheaf.obj (op ((Opens.map (colimit.ι F j).base).obj U)) :=\n  NatTrans.app\n      (NatIso.ofComponents fun X =>\n          (F.obj X.unop).presheaf.mapIso\n            (eqToIso\n              (_ :\n                (Opens.map (colimit.ι (F ⋙ forget C) X.unop)).op.obj\n                    ((Opens.map\n                            (colimit.isoColimitCocone\n                                    { cocone := colimitCocone F,\n                                      isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                      (op U)) =\n                  op ((Opens.map (colimit.ι F X.unop).base).obj U)))).inv\n      (op j) ≫\n    (F.obj j).presheaf.map\n        (eqToHom\n          (_ :\n            (Opens.map\n                      (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                          j).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)) =\n              (Opens.map\n                      (colimit.ι F j ≫\n                          (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                (op\n                  ((Opens.map\n                        (colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                    U)))) ≫\n      ((colimit.ι F j).base _* (F.obj j).presheaf).map\n        (eqToHom\n          (_ :\n            op\n                {\n                  carrier :=\n                    ↑(colimit.isoColimitCocone\n                              { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                      (↑(colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                        ↑U),\n                  is_open' :=\n                    (_ :\n                      IsOpen\n                        (↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          ↑{\n                              carrier :=\n                                ↑(colimit.isoColimitCocone\n                                          { cocone := colimitCocone F,\n                                            isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                  ↑U,\n                              is_open' :=\n                                (_ :\n                                  IsOpen\n                                    (↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U)) })) } =\n              op U))\n⊢ (F.obj j).presheaf.map\n      ((eqToIso\n            (_ :\n              (Opens.map (colimit.ι (F ⋙ forget C) (op j).unop)).op.obj\n                  ((Opens.map\n                          (colimit.isoColimitCocone\n                                  { cocone := colimitCocone F,\n                                    isColimit := colimitCoconeIsColimit F }).symm.hom.base).op.obj\n                    (op U)) =\n                op ((Opens.map (colimit.ι F (op j).unop).base).obj U))).inv ≫\n        eqToHom\n            (_ :\n              (Opens.map\n                        (NatTrans.app { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }.cocone.ι\n                            j).base).op.obj\n                  (op\n                    ((Opens.map\n                          (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                      U)) =\n                (Opens.map\n                        (colimit.ι F j ≫\n                            (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom).base).op.obj\n                  (op\n                    ((Opens.map\n                          (colimit.isoColimitCocone\n                                { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base).obj\n                      U))) ≫\n          (Opens.map (colimit.ι F j).base).op.map\n            (eqToHom\n              (_ :\n                op\n                    {\n                      carrier :=\n                        ↑(colimit.isoColimitCocone\n                                  { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                          (↑(colimit.isoColimitCocone\n                                    { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                            ↑U),\n                      is_open' :=\n                        (_ :\n                          IsOpen\n                            (↑(colimit.isoColimitCocone\n                                      { cocone := colimitCocone F, isColimit := colimitCoconeIsColimit F }).hom.base ⁻¹'\n                              ↑{\n                                  carrier :=\n                                    ↑(colimit.isoColimitCocone\n                                              { cocone := colimitCocone F,\n                                                isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                      ↑U,\n                                  is_open' :=\n                                    (_ :\n                                      IsOpen\n                                        (↑(colimit.isoColimitCocone\n                                                  { cocone := colimitCocone F,\n                                                    isColimit := colimitCoconeIsColimit F }).inv.base ⁻¹'\n                                          ↑U)) })) } =\n                  op U))) =\n    (F.obj j).presheaf.map (𝟙 (op ((Opens.map (colimit.ι F (op j).unop).base).obj U)))\n[PROOFSTEP]\ncongr 1\n[GOAL]\nJ : Type u'\ninst✝⁴ : Category.{v', u'} J\nC : Type u\ninst✝³ : Category.{v, u} C\ninst✝² : HasColimitsOfShape J TopCat\ninst✝¹ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)\ninst✝ : HasLimitsOfShape Jᵒᵖ C\nF : J ⥤ PresheafedSpace C\nU : Opens ↑↑(Limits.colimit F)\nj : J\n⊢ (colimitPresheafObjIsoComponentwiseLimit F U).hom ≫ limit.π (componentwiseDiagram F U) (op j) =\n    NatTrans.app (colimit.ι F j).c (op U)\n[PROOFSTEP]\nrw [← Iso.eq_inv_comp, colimitPresheafObjIsoComponentwiseLimit_inv_ι_app]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.PresheafedSpace.HasColimits", "llama_tokens": 95293, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5660185351961015, "lm_q2_score": 0.4610167793123159, "lm_q1q2_score": 0.2609440421271814}}
{"text": "[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun n => (-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!) c\nhs : HasSum (fun n => (-1) ^ n * ‖q‖ ^ (2 * n + 1) / ↑(2 * n + 1)!) s\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nreplace hc := hasSum_coe.mpr hc\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhs : HasSum (fun n => (-1) ^ n * ‖q‖ ^ (2 * n + 1) / ↑(2 * n + 1)!) s\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nreplace hs := (hs.div_const ‖q‖).smul_const q\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nobtain rfl | hq0 := eq_or_ne q 0\n[GOAL]\ncase inl\nc s : ℝ\nhq : 0.re = 0\nhc : HasSum (fun a => ↑((-1) ^ a * ‖0‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => 0) (↑c + (s / ‖0‖) • 0)\n[PROOFSTEP]\nsimp_rw [expSeries_apply_zero, norm_zero, div_zero, zero_smul, add_zero]\n[GOAL]\ncase inl\nc s : ℝ\nhq : 0.re = 0\nhc : HasSum (fun a => ↑((-1) ^ a * ‖0‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\n⊢ HasSum (fun n => Pi.single 0 1 n) ↑c\n[PROOFSTEP]\nsimp_rw [norm_zero] at hc \n[GOAL]\ncase inl\nc s : ℝ\nhq : 0.re = 0\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\nhc : HasSum (fun a => ↑((-1) ^ a * 0 ^ (2 * a) / ↑(2 * a)!)) ↑c\n⊢ HasSum (fun n => Pi.single 0 1 n) ↑c\n[PROOFSTEP]\nconvert hc using 1\n[GOAL]\ncase h.e'_5\nc s : ℝ\nhq : 0.re = 0\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\nhc : HasSum (fun a => ↑((-1) ^ a * 0 ^ (2 * a) / ↑(2 * a)!)) ↑c\n⊢ (fun n => Pi.single 0 1 n) = fun a => ↑((-1) ^ a * 0 ^ (2 * a) / ↑(2 * a)!)\n[PROOFSTEP]\next (_ | n) : 1\n[GOAL]\ncase h.e'_5.h.zero\nc s : ℝ\nhq : 0.re = 0\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\nhc : HasSum (fun a => ↑((-1) ^ a * 0 ^ (2 * a) / ↑(2 * a)!)) ↑c\n⊢ Pi.single 0 1 Nat.zero = ↑((-1) ^ Nat.zero * 0 ^ (2 * Nat.zero) / ↑(2 * Nat.zero)!)\n[PROOFSTEP]\nrw [pow_zero, Nat.zero_eq, mul_zero, pow_zero, Nat.factorial_zero, Nat.cast_one, div_one, one_mul, Pi.single_eq_same,\n  coe_one]\n[GOAL]\ncase h.e'_5.h.succ\nc s : ℝ\nhq : 0.re = 0\nhs : HasSum (fun z => ((-1) ^ z * ‖0‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖0‖) • 0) ((s / ‖0‖) • 0)\nhc : HasSum (fun a => ↑((-1) ^ a * 0 ^ (2 * a) / ↑(2 * a)!)) ↑c\nn : ℕ\n⊢ Pi.single 0 1 (Nat.succ n) = ↑((-1) ^ Nat.succ n * 0 ^ (2 * Nat.succ n) / ↑(2 * Nat.succ n)!)\n[PROOFSTEP]\nrw [zero_pow (mul_pos two_pos (Nat.succ_pos _)), mul_zero, zero_div, Pi.single_eq_of_ne n.succ_ne_zero, coe_zero]\n[GOAL]\ncase inr\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nsimp_rw [expSeries_apply_eq]\n[GOAL]\ncase inr\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\n⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nhave hq2 : q ^ 2 = -normSq q := sq_eq_neg_normSq.mpr hq\n[GOAL]\ncase inr\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\n⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nhave hqn := norm_ne_zero_iff.mpr hq0\n[GOAL]\ncase inr\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\n⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑c + (s / ‖q‖) • q)\n[PROOFSTEP]\nrefine' HasSum.even_add_odd _ _\n[GOAL]\ncase inr.refine'_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\n⊢ HasSum (fun k => (↑(2 * k)!)⁻¹ • q ^ (2 * k)) ↑c\n[PROOFSTEP]\nconvert hc using 1\n[GOAL]\ncase h.e'_5\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\n⊢ (fun k => (↑(2 * k)!)⁻¹ • q ^ (2 * k)) = fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)\n[PROOFSTEP]\next n : 1\n[GOAL]\ncase h.e'_5.h\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\n⊢ (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)\n[PROOFSTEP]\nletI k : ℝ := ↑(2 * n)!\n[GOAL]\ncase h.e'_5.h\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ (↑(2 * n)!)⁻¹ • q ^ (2 * n) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / ↑(2 * n)!)\n[PROOFSTEP]\ncalc\n  k⁻¹ • q ^ (2 * n) = k⁻¹ • (-normSq q) ^ n := by rw [pow_mul, hq2]; norm_cast\n  _ = k⁻¹ • ↑((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n)) := ?_\n  _ = ↑((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n) / k) := ?_\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ k⁻¹ • q ^ (2 * n) = ↑(k⁻¹ • (-↑normSq q) ^ n)\n[PROOFSTEP]\nrw [pow_mul, hq2]\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ k⁻¹ • (-↑(↑normSq q)) ^ n = ↑(k⁻¹ • (-↑normSq q) ^ n)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_5.h.calc_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ ↑(k⁻¹ • (-↑normSq q) ^ n) = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.h.calc_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ ↑(k⁻¹ • (-↑normSq q) ^ n) = k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n))\n[PROOFSTEP]\nrw [neg_pow, normSq_eq_norm_mul_self, pow_mul, sq]\n[GOAL]\ncase h.e'_5.h.calc_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ ↑(k⁻¹ • ((-1) ^ n * (‖q‖ * ‖q‖) ^ n)) = k⁻¹ • ↑((-1) ^ n * (‖q‖ * ‖q‖) ^ n)\n[PROOFSTEP]\npush_cast\n[GOAL]\ncase h.e'_5.h.calc_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ (↑(2 * n)!)⁻¹ • ((-1) ^ n * (↑‖q‖ * ↑‖q‖) ^ n) = (↑(2 * n)!)⁻¹ • ((-1) ^ n * (↑‖q‖ * ↑‖q‖) ^ n)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_5.h.calc_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ k⁻¹ • ↑((-1) ^ n * ‖q‖ ^ (2 * n)) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) / k)\n[PROOFSTEP]\nrw [← coe_mul_eq_smul, div_eq_mul_inv]\n[GOAL]\ncase h.e'_5.h.calc_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ ↑k⁻¹ * ↑((-1) ^ n * ‖q‖ ^ (2 * n)) = ↑((-1) ^ n * ‖q‖ ^ (2 * n) * k⁻¹)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_5.h.calc_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n)!\n⊢ ↑(k⁻¹ * (↑(Int.negSucc 0 ^ n) * ‖q‖ ^ (2 * n))) = ↑(↑(Int.negSucc 0 ^ n) * ‖q‖ ^ (2 * n) * k⁻¹)\n[PROOFSTEP]\nring_nf\n[GOAL]\ncase inr.refine'_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\n⊢ HasSum (fun k => (↑(2 * k + 1)!)⁻¹ • q ^ (2 * k + 1)) ((s / ‖q‖) • q)\n[PROOFSTEP]\nconvert hs using 1\n[GOAL]\ncase h.e'_5\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\n⊢ (fun k => (↑(2 * k + 1)!)⁻¹ • q ^ (2 * k + 1)) = fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q\n[PROOFSTEP]\next n : 1\n[GOAL]\ncase h.e'_5.h\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\n⊢ (↑(2 * n + 1)!)⁻¹ • q ^ (2 * n + 1) = ((-1) ^ n * ‖q‖ ^ (2 * n + 1) / ↑(2 * n + 1)! / ‖q‖) • q\n[PROOFSTEP]\nlet k : ℝ := ↑(2 * n + 1)!\n[GOAL]\ncase h.e'_5.h\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ (↑(2 * n + 1)!)⁻¹ • q ^ (2 * n + 1) = ((-1) ^ n * ‖q‖ ^ (2 * n + 1) / ↑(2 * n + 1)! / ‖q‖) • q\n[PROOFSTEP]\ncalc\n  k⁻¹ • q ^ (2 * n + 1) = k⁻¹ • ((-normSq q) ^ n * q) :=\n    by\n    rw [pow_succ', pow_mul, hq2]\n    norm_cast\n  _ = k⁻¹ • ((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n)) • q := ?_\n  _ = ((-1 : ℝ) ^ n * ‖q‖ ^ (2 * n + 1) / k / ‖q‖) • q := ?_\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ k⁻¹ • q ^ (2 * n + 1) = k⁻¹ • (↑((-↑normSq q) ^ n) * q)\n[PROOFSTEP]\nrw [pow_succ', pow_mul, hq2]\n[GOAL]\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ k⁻¹ • ((-↑(↑normSq q)) ^ n * q) = k⁻¹ • (↑((-↑normSq q) ^ n) * q)\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase h.e'_5.h.calc_1\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ k⁻¹ • (↑((-↑normSq q) ^ n) * q) = k⁻¹ • ((-1) ^ n * ‖q‖ ^ (2 * n)) • q\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.h.calc_1.e_a\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ ↑((-↑normSq q) ^ n) * q = ((-1) ^ n * ‖q‖ ^ (2 * n)) • q\n[PROOFSTEP]\nrw [neg_pow, normSq_eq_norm_mul_self, pow_mul, sq, ← coe_mul_eq_smul]\n[GOAL]\ncase h.e'_5.h.calc_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ k⁻¹ • ((-1) ^ n * ‖q‖ ^ (2 * n)) • q = ((-1) ^ n * ‖q‖ ^ (2 * n + 1) / k / ‖q‖) • q\n[PROOFSTEP]\nrw [smul_smul]\n[GOAL]\ncase h.e'_5.h.calc_2\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ (k⁻¹ * ((-1) ^ n * ‖q‖ ^ (2 * n))) • q = ((-1) ^ n * ‖q‖ ^ (2 * n + 1) / k / ‖q‖) • q\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase h.e'_5.h.calc_2.e_a\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ k⁻¹ * ((-1) ^ n * ‖q‖ ^ (2 * n)) = (-1) ^ n * ‖q‖ ^ (2 * n + 1) / k / ‖q‖\n[PROOFSTEP]\nsimp_rw [pow_succ', mul_div_assoc, div_div_cancel_left' hqn]\n[GOAL]\ncase h.e'_5.h.calc_2.e_a\nq : ℍ\nhq : q.re = 0\nc s : ℝ\nhc : HasSum (fun a => ↑((-1) ^ a * ‖q‖ ^ (2 * a) / ↑(2 * a)!)) ↑c\nhs : HasSum (fun z => ((-1) ^ z * ‖q‖ ^ (2 * z + 1) / ↑(2 * z + 1)! / ‖q‖) • q) ((s / ‖q‖) • q)\nhq0 : q ≠ 0\nhq2 : q ^ 2 = -↑(↑normSq q)\nhqn : ‖q‖ ≠ 0\nn : ℕ\nk : ℝ := ↑(2 * n + 1)!\n⊢ (↑(2 * n + 1)!)⁻¹ * ((-1) ^ n * ‖q‖ ^ (2 * n)) = (-1) ^ n * (‖q‖ ^ (2 * n) * (↑(2 * n + 1)!)⁻¹)\n[PROOFSTEP]\nring\n[GOAL]\nq : ℍ\nhq : q.re = 0\n⊢ exp ℝ q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q\n[PROOFSTEP]\nrw [exp_eq_tsum]\n[GOAL]\nq : ℍ\nhq : q.re = 0\n⊢ (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q\n[PROOFSTEP]\nrefine' HasSum.tsum_eq _\n[GOAL]\nq : ℍ\nhq : q.re = 0\n⊢ HasSum (fun n => (↑n !)⁻¹ • q ^ n) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)\n[PROOFSTEP]\nsimp_rw [← expSeries_apply_eq]\n[GOAL]\nq : ℍ\nhq : q.re = 0\n⊢ HasSum (fun n => ↑(expSeries ℝ ℍ n) fun x => q) (↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q)\n[PROOFSTEP]\nexact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)\n[GOAL]\nq : ℍ\n⊢ exp ℝ q = exp ℝ q.re • (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q)\n[PROOFSTEP]\nrw [← exp_of_re_eq_zero q.im q.im_re, ← coe_mul_eq_smul, ← exp_coe, ← exp_add_of_commute, re_add_im]\n[GOAL]\nq : ℍ\n⊢ Commute (↑q.re) (im q)\n[PROOFSTEP]\nexact Algebra.commutes q.re (_ : ℍ[ℝ])\n[GOAL]\nq : ℍ\n⊢ (exp ℝ q).re = exp ℝ q.re * Real.cos ‖q - ↑q.re‖\n[PROOFSTEP]\nsimp [exp_eq]\n[GOAL]\nq : ℍ\n⊢ im (exp ℝ q) = (exp ℝ q.re * (Real.sin ‖im q‖ / ‖im q‖)) • im q\n[PROOFSTEP]\nsimp [exp_eq, smul_smul]\n[GOAL]\nq : ℍ\n⊢ ↑normSq (exp ℝ q) = ↑normSq (exp ℝ q.re • (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q))\n[PROOFSTEP]\nrw [exp_eq]\n[GOAL]\nq : ℍ\n⊢ ↑normSq (exp ℝ q.re • (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q)) =\n    exp ℝ q.re ^ 2 * ↑normSq (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q)\n[PROOFSTEP]\nrw [normSq_smul]\n[GOAL]\nq : ℍ\n⊢ exp ℝ q.re ^ 2 * ↑normSq (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q) =\n    exp ℝ q.re ^ 2 * (Real.cos ‖im q‖ ^ 2 + Real.sin ‖im q‖ ^ 2)\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nq : ℍ\n⊢ ↑normSq (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q) = Real.cos ‖im q‖ ^ 2 + Real.sin ‖im q‖ ^ 2\n[PROOFSTEP]\nobtain hv | hv := eq_or_ne ‖q.im‖ 0\n[GOAL]\ncase e_a.inl\nq : ℍ\nhv : ‖im q‖ = 0\n⊢ ↑normSq (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q) = Real.cos ‖im q‖ ^ 2 + Real.sin ‖im q‖ ^ 2\n[PROOFSTEP]\nsimp [hv]\n[GOAL]\ncase e_a.inr\nq : ℍ\nhv : ‖im q‖ ≠ 0\n⊢ ↑normSq (↑(Real.cos ‖im q‖) + (Real.sin ‖im q‖ / ‖im q‖) • im q) = Real.cos ‖im q‖ ^ 2 + Real.sin ‖im q‖ ^ 2\n[PROOFSTEP]\nrw [normSq_add, normSq_smul, star_smul, coe_mul_eq_smul, smul_re, smul_re, star_re, im_re, smul_zero, smul_zero,\n  mul_zero, add_zero, div_pow, normSq_coe, normSq_eq_norm_mul_self, ← sq, div_mul_cancel _ (pow_ne_zero _ hv)]\n[GOAL]\nq : ℍ\n⊢ exp ℝ q.re ^ 2 * (Real.cos ‖im q‖ ^ 2 + Real.sin ‖im q‖ ^ 2) = exp ℝ q.re ^ 2\n[PROOFSTEP]\nrw [Real.cos_sq_add_sin_sq, mul_one]\n[GOAL]\nq : ℍ\n⊢ ‖exp ℝ q‖ = ‖exp ℝ q.re‖\n[PROOFSTEP]\nrw [norm_eq_sqrt_real_inner (exp ℝ q), inner_self, normSq_exp, Real.sqrt_sq_eq_abs, Real.norm_eq_abs]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.NormedSpace.QuaternionExponential", "llama_tokens": 11087, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5467381372136563, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.26056427065648846}}
{"text": "[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\ninst✝ : ConcreteCategory D\nY X : C\nP : Cᵒᵖ ⥤ D\nS : GrothendieckTopology.Cover J X\nx : Meq P S\nf : Y ⟶ X\nI : GrothendieckTopology.Cover.Relation ((GrothendieckTopology.pullback J f).obj S)\n⊢ I.g₁ ≫ I.f₁ ≫ f = I.g₂ ≫ I.f₂ ≫ f\n[PROOFSTEP]\nsimp [I.w_assoc]\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\ninst✝ : ConcreteCategory D\nX : C\nP : Cᵒᵖ ⥤ D\nS : GrothendieckTopology.Cover J X\nx : (forget D).obj (P.obj (op X))\nI : GrothendieckTopology.Cover.Relation S\n⊢ ↑(P.map I.g₁.op) ((fun I => ↑(P.map I.f.op) x) (GrothendieckTopology.Cover.Relation.fst I)) =\n    ↑(P.map I.g₂.op) ((fun I => ↑(P.map I.f.op) x) (GrothendieckTopology.Cover.Relation.snd I))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝² : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝¹ : Category.{max v u, w} D\ninst✝ : ConcreteCategory D\nX : C\nP : Cᵒᵖ ⥤ D\nS : GrothendieckTopology.Cover J X\nx : (forget D).obj (P.obj (op X))\nI : GrothendieckTopology.Cover.Relation S\n⊢ ↑(P.map I.g₁.op) (↑(P.map I.f₁.op) x) = ↑(P.map I.g₂.op) (↑(P.map I.f₂.op) x)\n[PROOFSTEP]\nsimp only [← comp_apply, ← P.map_comp, ← op_comp, I.w]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ConcreteCategory D\ninst✝¹ : PreservesLimits (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS : GrothendieckTopology.Cover J X\ninst✝ : HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nx : Meq P S\nI : GrothendieckTopology.Cover.Arrow S\n⊢ ↑(Multiequalizer.ι (GrothendieckTopology.Cover.index S P) I) (↑(equiv P S).symm x) = ↑x I\n[PROOFSTEP]\nrw [← equiv_apply]\n[GOAL]\nC : Type u\ninst✝⁴ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝³ : Category.{max v u, w} D\ninst✝² : ConcreteCategory D\ninst✝¹ : PreservesLimits (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS : GrothendieckTopology.Cover J X\ninst✝ : HasMultiequalizer (GrothendieckTopology.Cover.index S P)\nx : Meq P S\nI : GrothendieckTopology.Cover.Arrow S\n⊢ ↑(↑(equiv P S) (↑(equiv P S).symm x)) I = ↑x I\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑((plusObj J P).map f.op) (mk x) = mk (Meq.pullback x f)\n[PROOFSTEP]\ndsimp [mk, plusObj]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑(colimMap (diagramPullback J P f) ≫ colimit.pre (diagram J P Y) (pullback J f).op)\n      (↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm x)) =\n    ↑(colimit.ι (diagram J P Y) (op (Cover.pullback S f))) (↑(Meq.equiv P (Cover.pullback S f)).symm (Meq.pullback x f))\n[PROOFSTEP]\nrw [← comp_apply (x := (Meq.equiv P S).symm x), ι_colimMap_assoc, colimit.ι_pre,\n  comp_apply (x := (Meq.equiv P S).symm x)]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑(colimit.ι (diagram J P Y) ((pullback J f).op.obj (op S)))\n      (↑(NatTrans.app (diagramPullback J P f) (op S)) (↑(Meq.equiv P S).symm x)) =\n    ↑(colimit.ι (diagram J P Y) (op (Cover.pullback S f))) (↑(Meq.equiv P (Cover.pullback S f)).symm (Meq.pullback x f))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑(NatTrans.app (diagramPullback J P f) (op S)) (↑(Meq.equiv P S).symm x) =\n    ↑(Meq.equiv P (Cover.pullback S f)).symm (Meq.pullback x f)\n[PROOFSTEP]\napply (Meq.equiv P _).injective\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑(Meq.equiv P ((pullback J f).op.obj (op S)).unop)\n      (↑(NatTrans.app (diagramPullback J P f) (op S)) (↑(Meq.equiv P S).symm x)) =\n    ↑(Meq.equiv P ((pullback J f).op.obj (op S)).unop) (↑(Meq.equiv P (Cover.pullback S f)).symm (Meq.pullback x f))\n[PROOFSTEP]\nerw [Equiv.apply_symm_apply]\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\n⊢ ↑(Meq.equiv P ((pullback J f).op.obj (op S)).unop)\n      (↑(NatTrans.app (diagramPullback J P f) (op S)) (↑(Meq.equiv P S).symm x)) =\n    Meq.pullback x f\n[PROOFSTEP]\next i\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\ni : Cover.Arrow ((pullback J f).op.obj (op S)).unop\n⊢ ↑(↑(Meq.equiv P ((pullback J f).op.obj (op S)).unop)\n          (↑(NatTrans.app (diagramPullback J P f) (op S)) (↑(Meq.equiv P S).symm x)))\n      i =\n    ↑(Meq.pullback x f) i\n[PROOFSTEP]\nsimp only [Functor.op_obj, unop_op, pullback_obj, diagram_obj, Functor.comp_obj, diagramPullback_app, Meq.equiv_apply,\n  Meq.pullback_apply]\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\ni : Cover.Arrow ((pullback J f).op.obj (op S)).unop\n⊢ ↑(Multiequalizer.ι (Cover.index (Cover.pullback S f) P) i)\n      (↑(Multiequalizer.lift (Cover.index ((pullback J f).op.obj (op S)).unop P) ((diagram J P X).obj (op S))\n            (fun I => Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base I))\n            (_ :\n              ∀ (b : (Cover.index ((pullback J f).op.obj (op S)).unop P).R),\n                (fun I => Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base I))\n                      (MulticospanIndex.fstTo (Cover.index ((pullback J f).op.obj (op S)).unop P) b) ≫\n                    MulticospanIndex.fst (Cover.index ((pullback J f).op.obj (op S)).unop P) b =\n                  (fun I => Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base I))\n                      (MulticospanIndex.sndTo (Cover.index ((pullback J f).op.obj (op S)).unop P) b) ≫\n                    MulticospanIndex.snd (Cover.index ((pullback J f).op.obj (op S)).unop P) b))\n        (↑(Meq.equiv P S).symm x)) =\n    ↑x { Y := i.Y, f := i.f ≫ f, hf := (_ : (Cover.sieve (Cover.pullback S f)).arrows i.f) }\n[PROOFSTEP]\nerw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\ni : Cover.Arrow ((pullback J f).op.obj (op S)).unop\n⊢ ↑x (Cover.Arrow.base i) = ↑x { Y := i.Y, f := i.f ≫ f, hf := (_ : (Cover.sieve (Cover.pullback S f)).arrows i.f) }\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.a.h.mk\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nY X : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nf : Y ⟶ X\nY✝ : C\nf✝ : Y✝ ⟶ Y\nhf✝ : (Cover.sieve ((pullback J f).op.obj (op S)).unop).arrows f✝\n⊢ ↑x (Cover.Arrow.base { Y := Y✝, f := f✝, hf := hf✝ }) =\n    ↑x\n      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f ≫ f,\n        hf := (_ : (Cover.sieve (Cover.pullback S f)).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(NatTrans.app (toPlus J P) (op X)) x = mk (Meq.mk S x)\n[PROOFSTEP]\ndsimp [mk, toPlus]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X) (op ⊤)) x =\n    ↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\nlet e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑(Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X) (op ⊤)) x =\n    ↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\nrw [← colimit.w _ e.op]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑(Cover.toMultiequalizer ⊤ P ≫ (diagram J P X).map e.op ≫ colimit.ι (diagram J P X) (op S)) x =\n    ↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\ndelta Cover.toMultiequalizer\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I) ≫\n          (diagram J P X).map e.op ≫ colimit.ι (diagram J P X) (op S))\n      x =\n    ↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\nerw [comp_apply, comp_apply]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑(colimit.ι (diagram J P X) (op S))\n      (↑((diagram J P X).map e.op)\n        (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n              (_ :\n                ∀ (I : (Cover.index ⊤ P).R),\n                  (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I =\n                    (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I))\n          x)) =\n    ↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑((diagram J P X).map e.op)\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I))\n        x) =\n    ↑(Meq.equiv P S).symm (Meq.mk S x)\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ↑(Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))\n          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))\n          (_ :\n            ∀ (I : (Cover.index (op S).unop P).R),\n              Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                  MulticospanIndex.fst (Cover.index (op ⊤).unop P)\n                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =\n                Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                  MulticospanIndex.snd (Cover.index (op ⊤).unop P)\n                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I))\n        x) =\n    ↑(Meq.equiv P S).symm (Meq.mk S x)\n[PROOFSTEP]\napply Concrete.multiequalizer_ext\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\n⊢ ∀ (t : (Cover.index S P).L),\n    ↑(Multiequalizer.ι (Cover.index S P) t)\n        (↑(Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))\n              (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))\n              (_ :\n                ∀ (I : (Cover.index (op S).unop P).R),\n                  Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                        (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)\n                          (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                      MulticospanIndex.fst (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =\n                    Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                        (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)\n                          (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                      MulticospanIndex.snd (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))\n          (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n                (_ :\n                  ∀ (I : (Cover.index ⊤ P).R),\n                    (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                        MulticospanIndex.fst (Cover.index ⊤ P) I =\n                      (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                        MulticospanIndex.snd (Cover.index ⊤ P) I))\n            x)) =\n      ↑(Multiequalizer.ι (Cover.index S P) t) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\ni : (Cover.index S P).L\n⊢ ↑(Multiequalizer.ι (Cover.index S P) i)\n      (↑(Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))\n            (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))\n            (_ :\n              ∀ (I : (Cover.index (op S).unop P).R),\n                Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =\n                  Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))\n        (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n              (_ :\n                ∀ (I : (Cover.index ⊤ P).R),\n                  (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I =\n                    (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I))\n          x)) =\n    ↑(Multiequalizer.ι (Cover.index S P) i) (↑(Meq.equiv P S).symm (Meq.mk S x))\n[PROOFSTEP]\nsimp only [← comp_apply, Category.assoc, Multiequalizer.lift_ι, Category.comp_id, Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : (forget D).obj (P.obj (op X))\ne : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)\ni : (Cover.index S P).L\n⊢ ↑(P.map (Cover.Arrow.map i (homOfLE (_ : S ≤ ⊤))).f.op) x = ↑(Meq.mk S x) i\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(NatTrans.app (toPlus J P) (op I.Y)) (↑x I) = ↑((plusObj J P).map I.f.op) (mk x)\n[PROOFSTEP]\ndsimp only [toPlus, plusObj]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P (op I.Y).unop) (op ⊤)) (↑x I) =\n    ↑(colimMap (diagramPullback J P I.f.op.unop) ≫ colimit.pre (diagram J P (op I.Y).unop) (pullback J I.f.op.unop).op)\n      (mk x)\n[PROOFSTEP]\ndelta Cover.toMultiequalizer\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op (op I.Y).unop)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫\n          colimit.ι (diagram J P (op I.Y).unop) (op ⊤))\n      (↑x I) =\n    ↑(colimMap (diagramPullback J P I.f.op.unop) ≫ colimit.pre (diagram J P (op I.Y).unop) (pullback J I.f.op.unop).op)\n      (mk x)\n[PROOFSTEP]\ndsimp [mk]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫\n          colimit.ι (diagram J P I.Y) (op ⊤))\n      (↑x I) =\n    ↑(colimMap (diagramPullback J P I.f) ≫ colimit.pre (diagram J P I.Y) (pullback J I.f).op)\n      (↑(colimit.ι (diagram J P X) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nerw [← comp_apply]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫\n          colimit.ι (diagram J P I.Y) (op ⊤))\n      (↑x I) =\n    ↑(colimit.ι (diagram J P X) (op S) ≫\n          colimMap (diagramPullback J P I.f) ≫ colimit.pre (diagram J P I.Y) (pullback J I.f).op)\n      (↑(Meq.equiv P S).symm x)\n[PROOFSTEP]\nrw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(colimit.ι (diagram J P I.Y) (op ⊤))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n        (↑x I)) =\n    ↑(colimit.ι (diagram J P I.Y) ((pullback J I.f).op.obj (op S)))\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\ndsimp only [Functor.op]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\n⊢ ↑(colimit.ι (diagram J P I.Y) (op ⊤))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n        (↑x I)) =\n    ↑(colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nlet e : (J.pullback I.f).obj (unop (op S)) ⟶ ⊤ := homOfLE (OrderTop.le_top _)\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\n⊢ ↑(colimit.ι (diagram J P I.Y) (op ⊤))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n        (↑x I)) =\n    ↑(colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nrw [← colimit.w _ e.op]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\n⊢ ↑((diagram J P I.Y).map e.op ≫ colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n        (↑x I)) =\n    ↑(colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nerw [comp_apply]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\n⊢ ↑(colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑((diagram J P I.Y).map e.op)\n        (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n              (_ :\n                ∀ (I_1 : (Cover.index ⊤ P).R),\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                    (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n          (↑x I))) =\n    ↑(colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\n⊢ ↑((diagram J P I.Y).map e.op)\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n            (_ :\n              ∀ (I_1 : (Cover.index ⊤ P).R),\n                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n        (↑x I)) =\n    ↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x)\n[PROOFSTEP]\napply Concrete.multiequalizer_ext\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\n⊢ ∀ (t : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L),\n    ↑(Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) t)\n        (↑((diagram J P I.Y).map e.op)\n          (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n                (_ :\n                  ∀ (I_1 : (Cover.index ⊤ P).R),\n                    (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                        MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                      (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                        MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n            (↑x I))) =\n      ↑(Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) t)\n        (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\n⊢ ↑(Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) i)\n      (↑((diagram J P I.Y).map e.op)\n        (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n              (_ :\n                ∀ (I_1 : (Cover.index ⊤ P).R),\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                    (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n          (↑x I))) =\n    ↑(Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) i)\n      (↑(NatTrans.app (diagramPullback J P I.f) (op S)) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\n⊢ ↑(Multiequalizer.ι (Cover.index (Cover.pullback S I.f) P) i)\n      (↑(Multiequalizer.lift (Cover.index (Cover.pullback S I.f) P) (multiequalizer (Cover.index ⊤ P))\n            (fun I_1 =>\n              Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I_1 (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))))\n            (_ :\n              ∀ (I_1 : (Cover.index (op (Cover.pullback S I.f)).unop P).R),\n                Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I_1 (homOfLE (_ : Cover.pullback S I.f ≤ ⊤)).op.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I_1 (homOfLE (_ : Cover.pullback S I.f ≤ ⊤)).op.unop) =\n                  Multiequalizer.ι (Cover.index (op ⊤).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)\n                        (Cover.Relation.map I_1 (homOfLE (_ : Cover.pullback S I.f ≤ ⊤)).op.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op ⊤).unop P)\n                      (Cover.Relation.map I_1 (homOfLE (_ : Cover.pullback S I.f ≤ ⊤)).op.unop)))\n        (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)\n              (_ :\n                ∀ (I_1 : (Cover.index ⊤ P).R),\n                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.fst (Cover.index ⊤ P) I_1 =\n                    (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫\n                      MulticospanIndex.snd (Cover.index ⊤ P) I_1))\n          (↑x I))) =\n    ↑(Multiequalizer.ι (Cover.index (Cover.pullback S I.f) P) i)\n      (↑(Multiequalizer.lift (Cover.index (Cover.pullback S I.f) P) (multiequalizer (Cover.index S P))\n            (fun I_1 => Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base I_1))\n            (_ :\n              ∀ (I_1 : (Cover.index ((pullback J I.f).op.obj (op S)).unop P).R),\n                Multiequalizer.ι (Cover.index (op S).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op S).unop P) (Cover.Relation.base I_1)) ≫\n                    MulticospanIndex.fst (Cover.index (op S).unop P) (Cover.Relation.base I_1) =\n                  Multiequalizer.ι (Cover.index (op S).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op S).unop P) (Cover.Relation.base I_1)) ≫\n                    MulticospanIndex.snd (Cover.index (op S).unop P) (Cover.Relation.base I_1)))\n        (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nrw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι, Multiequalizer.lift_ι]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\n⊢ ↑(P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) =\n    ↑(Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base i)) (↑(Meq.equiv P S).symm x)\n[PROOFSTEP]\nerw [Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\n⊢ ↑(P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) = ↑x (Cover.Arrow.base i)\n[PROOFSTEP]\nlet RR : S.Relation := ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, by simp⟩\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\n⊢ i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\nRR : Cover.Relation S :=\n  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,\n    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),\n    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }\n⊢ ↑(P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) = ↑x (Cover.Arrow.base i)\n[PROOFSTEP]\nerw [x.condition RR]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\nRR : Cover.Relation S :=\n  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,\n    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),\n    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }\n⊢ ↑(P.map RR.g₂.op) (↑x (MulticospanIndex.sndTo (Cover.index S P) RR)) = ↑x (Cover.Arrow.base i)\n[PROOFSTEP]\nsimp only [unop_op, pullback_obj, op_id, Functor.map_id, id_apply]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx : Meq P S\nI : Cover.Arrow S\ne : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)\ni : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L\nRR : Cover.Relation S :=\n  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,\n    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),\n    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }\n⊢ ↑x\n      (MulticospanIndex.sndTo (Cover.index S P)\n        { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,\n          h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),\n          w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }) =\n    ↑x (Cover.Arrow.base i)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(NatTrans.app (toPlus J P) (op X)) x = mk (Meq.mk ⊤ x)\n[PROOFSTEP]\ndsimp [mk, toPlus]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X) (op ⊤)) x =\n    ↑(colimit.ι (diagram J P X) (op ⊤)) (↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x))\n[PROOFSTEP]\ndelta Cover.toMultiequalizer\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I) ≫\n          colimit.ι (diagram J P X) (op ⊤))\n      x =\n    ↑(colimit.ι (diagram J P X) (op ⊤)) (↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x))\n[PROOFSTEP]\nsimp only [comp_apply]\n[GOAL]\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(colimit.ι (diagram J P X) (op ⊤))\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I))\n        x) =\n    ↑(colimit.ι (diagram J P X) (op ⊤)) (↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x))\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n          (_ :\n            ∀ (I : (Cover.index ⊤ P).R),\n              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                  MulticospanIndex.fst (Cover.index ⊤ P) I =\n                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                  MulticospanIndex.snd (Cover.index ⊤ P) I))\n      x =\n    ↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x)\n[PROOFSTEP]\napply (Meq.equiv P ⊤).injective\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\n⊢ ↑(Meq.equiv P ⊤)\n      (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n            (_ :\n              ∀ (I : (Cover.index ⊤ P).R),\n                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.fst (Cover.index ⊤ P) I =\n                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                    MulticospanIndex.snd (Cover.index ⊤ P) I))\n        x) =\n    ↑(Meq.equiv P ⊤) (↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x))\n[PROOFSTEP]\next i\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\ni : Cover.Arrow ⊤\n⊢ ↑(↑(Meq.equiv P ⊤)\n          (↑(Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (fun I => P.map I.f.op)\n                (_ :\n                  ∀ (I : (Cover.index ⊤ P).R),\n                    (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫\n                        MulticospanIndex.fst (Cover.index ⊤ P) I =\n                      (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫\n                        MulticospanIndex.snd (Cover.index ⊤ P) I))\n            x))\n      i =\n    ↑(↑(Meq.equiv P ⊤) (↑(Meq.equiv P ⊤).symm (Meq.mk ⊤ x))) i\n[PROOFSTEP]\nrw [Meq.equiv_apply, Equiv.apply_symm_apply, ← comp_apply, Multiequalizer.lift_ι]\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁵ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁴ : Category.{max v u, w} D\ninst✝³ : ConcreteCategory D\ninst✝² : PreservesLimits (forget D)\ninst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj (P.obj (op X))\ni : Cover.Arrow ⊤\n⊢ ↑(P.map i.f.op) x = ↑(Meq.mk ⊤ x) i\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj ((plusObj J P).obj (op X))\n⊢ ∃ S y, x = mk y\n[PROOFSTEP]\nobtain ⟨S, y, h⟩ := Concrete.colimit_exists_rep (J.diagram P X) x\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj ((plusObj J P).obj (op X))\nS : (Cover J X)ᵒᵖ\ny : (forget D).obj ((diagram J P X).obj S)\nh : ↑(colimit.ι (diagram J P X) S) y = x\n⊢ ∃ S y, x = mk y\n[PROOFSTEP]\nuse S.unop, Meq.equiv _ _ y\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj ((plusObj J P).obj (op X))\nS : (Cover J X)ᵒᵖ\ny : (forget D).obj ((diagram J P X).obj S)\nh : ↑(colimit.ι (diagram J P X) S) y = x\n⊢ x = mk (↑(Meq.equiv P S.unop) y)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj ((plusObj J P).obj (op X))\nS : (Cover J X)ᵒᵖ\ny : (forget D).obj ((diagram J P X).obj S)\nh : ↑(colimit.ι (diagram J P X) S) y = x\n⊢ ↑(colimit.ι (diagram J P X) S) y = mk (↑(Meq.equiv P S.unop) y)\n[PROOFSTEP]\ndsimp [mk]\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nx : (forget D).obj ((plusObj J P).obj (op X))\nS : (Cover J X)ᵒᵖ\ny : (forget D).obj ((diagram J P X).obj S)\nh : ↑(colimit.ι (diagram J P X) S) y = x\n⊢ ↑(colimit.ι (diagram J P X) S) y =\n    ↑(colimit.ι (diagram J P X) S) (↑(Meq.equiv P S.unop).symm (↑(Meq.equiv P S.unop) y))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\n⊢ mk x = mk y ↔ ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\n⊢ mk x = mk y → ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\n⊢ ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nobtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h\n[GOAL]\ncase mp.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nhh : ↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x) = ↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y)\n⊢ ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nuse W.unop, h1.unop, h2.unop\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nhh : ↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x) = ↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y)\n⊢ Meq.refine x h1.unop = Meq.refine y h2.unop\n[PROOFSTEP]\next I\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nhh : ↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x) = ↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y)\nI : Cover.Arrow W.unop\n⊢ ↑(Meq.refine x h1.unop) I = ↑(Meq.refine y h2.unop) I\n[PROOFSTEP]\napply_fun Multiequalizer.ι (W.unop.index P) I at hh \n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\n⊢ ↑(Meq.refine x h1.unop) I = ↑(Meq.refine y h2.unop) I\n[PROOFSTEP]\nconvert hh\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑(Meq.refine x h1.unop) I =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑(Meq.refine y h2.unop) I =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\nall_goals\n  dsimp [diagram]\n  erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]\n  cases I; rfl\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑(Meq.refine x h1.unop) I =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑x { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) S).arrows I.f) } =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I)\n      (↑(Multiequalizer.lift (Cover.index W.unop P) (multiequalizer (Cover.index S P))\n            (fun I => Multiequalizer.ι (Cover.index S P) (Cover.Arrow.map I h1.unop))\n            (_ :\n              ∀ (I : (Cover.index W.unop P).R),\n                Multiequalizer.ι (Cover.index (op S).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op S).unop P) (Cover.Relation.map I h1.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op S).unop P) (Cover.Relation.map I h1.unop) =\n                  Multiequalizer.ι (Cover.index (op S).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op S).unop P) (Cover.Relation.map I h1.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op S).unop P) (Cover.Relation.map I h1.unop)))\n        (↑(Meq.equiv P S).symm x))\n[PROOFSTEP]\nerw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑x { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) S).arrows I.f) } = ↑x (Cover.Arrow.map I h1.unop)\n[PROOFSTEP]\ncases I\n[GOAL]\ncase h.e'_2.h.mk\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nY✝ : C\nf✝ : Y✝ ⟶ X\nhf✝ : (Cover.sieve W.unop).arrows f✝\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })\n      (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op { Y := Y✝, f := f✝, hf := hf✝ }.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ }))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑x\n      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,\n        hf := (_ : ((fun a => ↑a) S).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) } =\n    ↑x (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } h1.unop)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑(Meq.refine y h2.unop) I =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑y { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) T).arrows I.f) } =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I)\n      (↑(Multiequalizer.lift (Cover.index W.unop P) (multiequalizer (Cover.index T P))\n            (fun I => Multiequalizer.ι (Cover.index T P) (Cover.Arrow.map I h2.unop))\n            (_ :\n              ∀ (I : (Cover.index W.unop P).R),\n                Multiequalizer.ι (Cover.index (op T).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op T).unop P) (Cover.Relation.map I h2.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op T).unop P) (Cover.Relation.map I h2.unop) =\n                  Multiequalizer.ι (Cover.index (op T).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op T).unop P) (Cover.Relation.map I h2.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op T).unop P) (Cover.Relation.map I h2.unop)))\n        (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\nerw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nI : Cover.Arrow W.unop\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) I) (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op I.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑y { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) T).arrows I.f) } = ↑y (Cover.Arrow.map I h2.unop)\n[PROOFSTEP]\ncases I\n[GOAL]\ncase h.e'_3.h.mk\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\nh : mk x = mk y\nW : (Cover J X)ᵒᵖ\nh1 : op S ⟶ W\nh2 : op T ⟶ W\nY✝ : C\nf✝ : Y✝ ⟶ X\nhf✝ : (Cover.sieve W.unop).arrows f✝\nhh :\n  ↑(Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })\n      (↑((diagram J P X).map h2) (↑(Meq.equiv P T).symm y))\ne_1✝ :\n  (forget D).obj (P.obj (op { Y := Y✝, f := f✝, hf := hf✝ }.Y)) =\n    (fun x => (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ }))\n      (↑((diagram J P X).map h1) (↑(Meq.equiv P S).symm x))\n⊢ ↑y\n      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,\n        hf := (_ : ((fun a => ↑a) T).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) } =\n    ↑y (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } h2.unop)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS T : Cover J X\nx : Meq P S\ny : Meq P T\n⊢ (∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2) → mk x = mk y\n[PROOFSTEP]\nrintro ⟨S, h1, h2, e⟩\n[GOAL]\ncase mpr.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ne : Meq.refine x h1 = Meq.refine y h2\n⊢ mk x = mk y\n[PROOFSTEP]\napply Concrete.colimit_rep_eq_of_exists\n[GOAL]\ncase mpr.intro.intro.intro.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ne : Meq.refine x h1 = Meq.refine y h2\n⊢ ∃ k f g, ↑((diagram J P X).map f) (↑(Meq.equiv P S✝).symm x) = ↑((diagram J P X).map g) (↑(Meq.equiv P T).symm y)\n[PROOFSTEP]\nuse op S, h1.op, h2.op\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ne : Meq.refine x h1 = Meq.refine y h2\n⊢ ↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x) = ↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y)\n[PROOFSTEP]\napply Concrete.multiequalizer_ext\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ne : Meq.refine x h1 = Meq.refine y h2\n⊢ ∀ (t : (Cover.index (op S).unop P).L),\n    ↑(Multiequalizer.ι (Cover.index (op S).unop P) t) (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n      ↑(Multiequalizer.ι (Cover.index (op S).unop P) t) (↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ne : Meq.refine x h1 = Meq.refine y h2\ni : (Cover.index (op S).unop P).L\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\napply_fun fun ee => ee i at e \n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y))\n[PROOFSTEP]\nconvert e\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    ↑(Meq.refine x h1) i\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y)) =\n    ↑(Meq.refine y h2) i\n[PROOFSTEP]\nall_goals\n  dsimp [diagram]\n  rw [← comp_apply, Multiequalizer.lift_ι]\n  erw [Meq.equiv_symm_eq_apply]\n  cases i; rfl\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    ↑(Meq.refine x h1) i\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index S P) i)\n      (↑(Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index S✝ P))\n            (fun I => Multiequalizer.ι (Cover.index S✝ P) (Cover.Arrow.map I h1))\n            (_ :\n              ∀ (I : (Cover.index (op S).unop P).R),\n                Multiequalizer.ι (Cover.index (op S✝).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop) =\n                  Multiequalizer.ι (Cover.index (op S✝).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)))\n        (↑(Meq.equiv P S✝).symm x)) =\n    ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }\n[PROOFSTEP]\nrw [← comp_apply, Multiequalizer.lift_ι]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index S✝ P) (Cover.Arrow.map i h1)) (↑(Meq.equiv P S✝).symm x) =\n    ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }\n[PROOFSTEP]\nerw [Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑x (Cover.Arrow.map i h1) = ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.e'_2.h.mk\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\nY✝ : C\nf✝ : Y✝ ⟶ X\nhf✝ : (Cover.sieve (op S).unop).arrows f✝\ne : ↑(Meq.refine x h1) { Y := Y✝, f := f✝, hf := hf✝ } = ↑(Meq.refine y h2) { Y := Y✝, f := f✝, hf := hf✝ }\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) { Y := Y✝, f := f✝, hf := hf✝ }))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op { Y := Y✝, f := f✝, hf := hf✝ }.Y))\n⊢ ↑x (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } h1) =\n    ↑x\n      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,\n        hf := (_ : ((fun a => ↑a) S✝).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index (op S).unop P) i) (↑((diagram J P X).map h2.op) (↑(Meq.equiv P T).symm y)) =\n    ↑(Meq.refine y h2) i\n[PROOFSTEP]\ndsimp [diagram]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index S P) i)\n      (↑(Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index T P))\n            (fun I => Multiequalizer.ι (Cover.index T P) (Cover.Arrow.map I h2))\n            (_ :\n              ∀ (I : (Cover.index (op S).unop P).R),\n                Multiequalizer.ι (Cover.index (op T).unop P)\n                      (MulticospanIndex.fstTo (Cover.index (op T).unop P) (Cover.Relation.map I h2.op.unop)) ≫\n                    MulticospanIndex.fst (Cover.index (op T).unop P) (Cover.Relation.map I h2.op.unop) =\n                  Multiequalizer.ι (Cover.index (op T).unop P)\n                      (MulticospanIndex.sndTo (Cover.index (op T).unop P) (Cover.Relation.map I h2.op.unop)) ≫\n                    MulticospanIndex.snd (Cover.index (op T).unop P) (Cover.Relation.map I h2.op.unop)))\n        (↑(Meq.equiv P T).symm y)) =\n    ↑y { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) T).arrows i.f) }\n[PROOFSTEP]\nrw [← comp_apply, Multiequalizer.lift_ι]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑(Multiequalizer.ι (Cover.index T P) (Cover.Arrow.map i h2)) (↑(Meq.equiv P T).symm y) =\n    ↑y { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) T).arrows i.f) }\n[PROOFSTEP]\nerw [Meq.equiv_symm_eq_apply]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\ni : (Cover.index (op S).unop P).L\ne : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op i.Y))\n⊢ ↑y (Cover.Arrow.map i h2) = ↑y { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) T).arrows i.f) }\n[PROOFSTEP]\ncases i\n[GOAL]\ncase h.e'_3.h.mk\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS✝ T : Cover J X\nx : Meq P S✝\ny : Meq P T\nS : Cover J X\nh1 : S ⟶ S✝\nh2 : S ⟶ T\nY✝ : C\nf✝ : Y✝ ⟶ X\nhf✝ : (Cover.sieve (op S).unop).arrows f✝\ne : ↑(Meq.refine x h1) { Y := Y✝, f := f✝, hf := hf✝ } = ↑(Meq.refine y h2) { Y := Y✝, f := f✝, hf := hf✝ }\ne_1✝ :\n  (fun x => (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) { Y := Y✝, f := f✝, hf := hf✝ }))\n      (↑((diagram J P X).map h1.op) (↑(Meq.equiv P S✝).symm x)) =\n    (forget D).obj (P.obj (op { Y := Y✝, f := f✝, hf := hf✝ }.Y))\n⊢ ↑y (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } h2) =\n    ↑y\n      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,\n        hf := (_ : ((fun a => ↑a) T).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) }\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nh : ∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨Sx, x, rfl⟩ := exists_rep x\n[GOAL]\ncase intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS : Cover J X\ny : (forget D).obj ((plusObj J P).obj (op X))\nSx : Cover J X\nx : Meq P Sx\nh : ∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) (mk x) = ↑((plusObj J P).map I.f.op) y\n⊢ mk x = y\n[PROOFSTEP]\nobtain ⟨Sy, y, rfl⟩ := exists_rep y\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) (mk x) = ↑((plusObj J P).map I.f.op) (mk y)\n⊢ mk x = mk y\n[PROOFSTEP]\nsimp only [res_mk_eq_mk_pullback] at h \n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\n⊢ mk x = mk y\n[PROOFSTEP]\nchoose W h1 h2 hh using fun I : S.Arrow =>\n  (eq_mk_iff_exists _ _).mp\n    (h I)\n      -- To prove equality, it suffices to prove that there exists a cover over which\n        -- the representatives become equal.\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\n⊢ mk x = mk y\n[PROOFSTEP]\nrw [eq_mk_iff_exists]\n  -- Construct the cover over which the representatives become equal by combining the various\n    -- covers chosen above.\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\n⊢ ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nlet B : J.Cover X := S.bind W\n[GOAL]\ncase intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\n⊢ ∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nuse B\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\n⊢ ∃ h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nlet ex : B ⟶ Sx :=\n  homOfLE\n    (by\n      rintro Y f ⟨Z, e1, e2, he2, he1, hee⟩\n      rw [← hee]\n      apply leOfHom (h1 ⟨_, _, he2⟩)\n      exact he1)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\n⊢ B ≤ Sx\n[PROOFSTEP]\nrintro Y f ⟨Z, e1, e2, he2, he1, hee⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) Sx).arrows f\n[PROOFSTEP]\nrw [← hee]\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) Sx).arrows (e1 ≫ e2)\n[PROOFSTEP]\napply leOfHom (h1 ⟨_, _, he2⟩)\n[GOAL]\ncase intro.intro.intro.intro.intro.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) (W { Y := Z, f := e2, hf := he2 })).arrows e1\n[PROOFSTEP]\nexact he1\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\n⊢ ∃ h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nlet ey : B ⟶ Sy :=\n  homOfLE\n    (by\n      rintro Y f ⟨Z, e1, e2, he2, he1, hee⟩\n      rw [← hee]\n      apply leOfHom (h2 ⟨_, _, he2⟩)\n      exact he1)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\n⊢ B ≤ Sy\n[PROOFSTEP]\nrintro Y f ⟨Z, e1, e2, he2, he1, hee⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) Sy).arrows f\n[PROOFSTEP]\nrw [← hee]\n[GOAL]\ncase intro.intro.intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) Sy).arrows (e1 ≫ e2)\n[PROOFSTEP]\napply leOfHom (h2 ⟨_, _, he2⟩)\n[GOAL]\ncase intro.intro.intro.intro.intro.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\nY : C\nf : Y ⟶ X\nZ : C\ne1 : Y ⟶ Z\ne2 : Z ⟶ X\nhe2 : (Cover.sieve S).arrows e2\nhe1 : ((fun Y f hf => Cover.sieve (W { Y := Y, f := f, hf := hf })) Z e2 he2).arrows e1\nhee : e1 ≫ e2 = f\n⊢ ((fun a => ↑a) (W { Y := Z, f := e2, hf := he2 })).arrows e1\n[PROOFSTEP]\nexact he1\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\n⊢ ∃ h1 h2, Meq.refine x h1 = Meq.refine y h2\n[PROOFSTEP]\nuse ex, ey\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\n⊢ Meq.refine x ex = Meq.refine y ey\n[PROOFSTEP]\next1 I\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine y ey) I\n[PROOFSTEP]\nlet IS : S.Arrow := I.fromMiddle\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nhh : ∀ (I : Cover.Arrow S), Meq.refine (Meq.pullback x I.f) (h1 I) = Meq.refine (Meq.pullback y I.f) (h2 I)\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine y ey) I\n[PROOFSTEP]\nspecialize hh IS\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nhh : Meq.refine (Meq.pullback x IS.f) (h1 IS) = Meq.refine (Meq.pullback y IS.f) (h2 IS)\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine y ey) I\n[PROOFSTEP]\nlet IW : (W IS).Arrow := I.toMiddle\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nhh : Meq.refine (Meq.pullback x IS.f) (h1 IS) = Meq.refine (Meq.pullback y IS.f) (h2 IS)\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine y ey) I\n[PROOFSTEP]\napply_fun fun e => e IW at hh \n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine y ey) I\n[PROOFSTEP]\nconvert hh using 1\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW\n[PROOFSTEP]\nlet Rx : Sx.Relation :=\n  ⟨I.Y, I.Y, I.Y, 𝟙 _, 𝟙 _, I.f, I.toMiddleHom ≫ I.fromMiddleHom, leOfHom ex _ I.hf, by\n    simpa only [I.middle_spec] using leOfHom ex _ I.hf, by simp [I.middle_spec]⟩\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ (Cover.sieve Sx).arrows (Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I)\n[PROOFSTEP]\nsimpa only [I.middle_spec] using leOfHom ex _ I.hf\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ 𝟙 I.Y ≫ I.f = 𝟙 I.Y ≫ Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I\n[PROOFSTEP]\nsimp [I.middle_spec]\n[GOAL]\ncase h.e'_2.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\nRx : Cover.Relation Sx :=\n  { Y₁ := I.Y, Y₂ := I.Y, Z := I.Y, g₁ := 𝟙 I.Y, g₂ := 𝟙 I.Y, f₁ := I.f,\n    f₂ := Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I, h₁ := (_ : ((fun a => ↑a) Sx).arrows I.f),\n    h₂ := (_ : (Cover.sieve Sx).arrows (Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I)),\n    w := (_ : 𝟙 I.Y ≫ I.f = 𝟙 I.Y ≫ Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I) }\n⊢ ↑(Meq.refine x ex) I = ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW\n[PROOFSTEP]\nsimpa [id_apply] using x.condition Rx\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ ↑(Meq.refine y ey) I = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\n[PROOFSTEP]\nlet Ry : Sy.Relation :=\n  ⟨I.Y, I.Y, I.Y, 𝟙 _, 𝟙 _, I.f, I.toMiddleHom ≫ I.fromMiddleHom, leOfHom ey _ I.hf, by\n    simpa only [I.middle_spec] using leOfHom ey _ I.hf, by simp [I.middle_spec]⟩\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ (Cover.sieve Sy).arrows (Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I)\n[PROOFSTEP]\nsimpa only [I.middle_spec] using leOfHom ey _ I.hf\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\n⊢ 𝟙 I.Y ≫ I.f = 𝟙 I.Y ≫ Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I\n[PROOFSTEP]\nsimp [I.middle_spec]\n[GOAL]\ncase h.e'_3.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nX : C\nP : Cᵒᵖ ⥤ D\nS Sx : Cover J X\nx : Meq P Sx\nSy : Cover J X\ny : Meq P Sy\nh : ∀ (I : Cover.Arrow S), mk (Meq.pullback x I.f) = mk (Meq.pullback y I.f)\nW : (I : Cover.Arrow S) → Cover J I.Y\nh1 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sx\nh2 : (I : Cover.Arrow S) → W I ⟶ (pullback J I.f).obj Sy\nB : Cover J X := Cover.bind S W\nex : B ⟶ Sx := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sx).arrows f)\ney : B ⟶ Sy := homOfLE (_ : ∀ ⦃Y : C⦄ (f : Y ⟶ X), ((fun a => ↑a) B).arrows f → ((fun a => ↑a) Sy).arrows f)\nI : Cover.Arrow B\nIS : Cover.Arrow S := Cover.Arrow.fromMiddle I\nIW : Cover.Arrow (W IS) := Cover.Arrow.toMiddle I\nhh : ↑(Meq.refine (Meq.pullback x IS.f) (h1 IS)) IW = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\ne_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (P.obj (op IW.Y))\nRy : Cover.Relation Sy :=\n  { Y₁ := I.Y, Y₂ := I.Y, Z := I.Y, g₁ := 𝟙 I.Y, g₂ := 𝟙 I.Y, f₁ := I.f,\n    f₂ := Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I, h₁ := (_ : ((fun a => ↑a) Sy).arrows I.f),\n    h₂ := (_ : (Cover.sieve Sy).arrows (Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I)),\n    w := (_ : 𝟙 I.Y ≫ I.f = 𝟙 I.Y ≫ Cover.Arrow.toMiddleHom I ≫ Cover.Arrow.fromMiddleHom I) }\n⊢ ↑(Meq.refine y ey) I = ↑(Meq.refine (Meq.pullback y IS.f) (h2 IS)) IW\n[PROOFSTEP]\nsimpa [id_apply] using y.condition Ry\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\n⊢ Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\n[PROOFSTEP]\nintro x y h\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nh : ↑(NatTrans.app (toPlus J P) (op X)) x = ↑(NatTrans.app (toPlus J P) (op X)) y\n⊢ x = y\n[PROOFSTEP]\nsimp only [toPlus_eq_mk] at h \n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nh : mk (Meq.mk ⊤ x) = mk (Meq.mk ⊤ y)\n⊢ x = y\n[PROOFSTEP]\nrw [eq_mk_iff_exists] at h \n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nh : ∃ W h1 h2, Meq.refine (Meq.mk ⊤ x) h1 = Meq.refine (Meq.mk ⊤ y) h2\n⊢ x = y\n[PROOFSTEP]\nobtain ⟨W, h1, h2, hh⟩ := h\n[GOAL]\ncase intro.intro.intro\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nW : Cover J X\nh1 h2 : W ⟶ ⊤\nhh : Meq.refine (Meq.mk ⊤ x) h1 = Meq.refine (Meq.mk ⊤ y) h2\n⊢ x = y\n[PROOFSTEP]\napply hsep X W\n[GOAL]\ncase intro.intro.intro.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nW : Cover J X\nh1 h2 : W ⟶ ⊤\nhh : Meq.refine (Meq.mk ⊤ x) h1 = Meq.refine (Meq.mk ⊤ y) h2\n⊢ ∀ (I : Cover.Arrow W), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y\n[PROOFSTEP]\nintro I\n[GOAL]\ncase intro.intro.intro.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nW : Cover J X\nh1 h2 : W ⟶ ⊤\nhh : Meq.refine (Meq.mk ⊤ x) h1 = Meq.refine (Meq.mk ⊤ y) h2\nI : Cover.Arrow W\n⊢ ↑(P.map I.f.op) x = ↑(P.map I.f.op) y\n[PROOFSTEP]\napply_fun fun e => e I at hh \n[GOAL]\ncase intro.intro.intro.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nx y : (forget D).obj (P.obj (op X))\nW : Cover J X\nh1 h2 : W ⟶ ⊤\nI : Cover.Arrow W\nhh : ↑(Meq.refine (Meq.mk ⊤ x) h1) I = ↑(Meq.refine (Meq.mk ⊤ y) h2) I\n⊢ ↑(P.map I.f.op) x = ↑(P.map I.f.op) y\n[PROOFSTEP]\nexact hh\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\n⊢ ∀ (I : Cover.Relation (Cover.bind S T)),\n    ↑(P.map I.g₁.op) ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.fst I)) =\n      ↑(P.map I.g₂.op) ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.snd I))\n[PROOFSTEP]\nintro II\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ ↑(P.map II.g₁.op) ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.fst II)) =\n    ↑(P.map II.g₂.op) ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.snd II))\n[PROOFSTEP]\napply inj_of_sep P hsep\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ ↑(NatTrans.app (toPlus J P) (op II.Z))\n      (↑(P.map II.g₁.op)\n        ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.fst II))) =\n    ↑(NatTrans.app (toPlus J P) (op II.Z))\n      (↑(P.map II.g₂.op) ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.snd II)))\n[PROOFSTEP]\nrw [← comp_apply, ← comp_apply, (J.toPlus P).naturality, (J.toPlus P).naturality, comp_apply, comp_apply]\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ ↑((plusObj J P).map II.g₁.op)\n      (↑(NatTrans.app (toPlus J P) (op II.Y₁))\n        ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.fst II))) =\n    ↑((plusObj J P).map II.g₂.op)\n      (↑(NatTrans.app (toPlus J P) (op II.Y₂))\n        ((fun I => ↑(t (Cover.Arrow.fromMiddle I)) (Cover.Arrow.toMiddle I)) (Cover.Relation.snd II)))\n[PROOFSTEP]\nerw [toPlus_apply (T II.fst.fromMiddle) (t II.fst.fromMiddle) II.fst.toMiddle,\n  toPlus_apply (T II.snd.fromMiddle) (t II.snd.fromMiddle) II.snd.toMiddle, ← ht, ← ht, ← comp_apply, ← comp_apply, ←\n  (J.plusObj P).map_comp, ← (J.plusObj P).map_comp]\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ ↑((plusObj J P).map ((Cover.Arrow.toMiddle (Cover.Relation.fst II)).f.op ≫ II.g₁.op))\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.fst II))) =\n    ↑((plusObj J P).map ((Cover.Arrow.toMiddle (Cover.Relation.snd II)).f.op ≫ II.g₂.op))\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.snd II)))\n[PROOFSTEP]\nrw [← op_comp, ← op_comp]\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ ↑((plusObj J P).map (II.g₁ ≫ (Cover.Arrow.toMiddle (Cover.Relation.fst II)).f).op)\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.fst II))) =\n    ↑((plusObj J P).map (II.g₂ ≫ (Cover.Arrow.toMiddle (Cover.Relation.snd II)).f).op)\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.snd II)))\n[PROOFSTEP]\nlet IR : S.Relation :=\n  ⟨_, _, _, II.g₁ ≫ II.fst.toMiddleHom, II.g₂ ≫ II.snd.toMiddleHom, II.fst.fromMiddleHom, II.snd.fromMiddleHom,\n    II.fst.from_middle_condition, II.snd.from_middle_condition, by\n    simpa only [Category.assoc, II.fst.middle_spec, II.snd.middle_spec] using II.w⟩\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\n⊢ (II.g₁ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.fst II)) ≫ Cover.Arrow.fromMiddleHom (Cover.Relation.fst II) =\n    (II.g₂ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.snd II)) ≫ Cover.Arrow.fromMiddleHom (Cover.Relation.snd II)\n[PROOFSTEP]\nsimpa only [Category.assoc, II.fst.middle_spec, II.snd.middle_spec] using II.w\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nII : Cover.Relation (Cover.bind S T)\nIR : Cover.Relation S :=\n  { Y₁ := Cover.Arrow.middle (Cover.Relation.fst II), Y₂ := Cover.Arrow.middle (Cover.Relation.snd II), Z := II.Z,\n    g₁ := II.g₁ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.fst II),\n    g₂ := II.g₂ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.snd II),\n    f₁ := Cover.Arrow.fromMiddleHom (Cover.Relation.fst II), f₂ := Cover.Arrow.fromMiddleHom (Cover.Relation.snd II),\n    h₁ := (_ : (Cover.sieve S).arrows (Cover.Arrow.fromMiddleHom (Cover.Relation.fst II))),\n    h₂ := (_ : (Cover.sieve S).arrows (Cover.Arrow.fromMiddleHom (Cover.Relation.snd II))),\n    w :=\n      (_ :\n        (II.g₁ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.fst II)) ≫ Cover.Arrow.fromMiddleHom (Cover.Relation.fst II) =\n          (II.g₂ ≫ Cover.Arrow.toMiddleHom (Cover.Relation.snd II)) ≫\n            Cover.Arrow.fromMiddleHom (Cover.Relation.snd II)) }\n⊢ ↑((plusObj J P).map (II.g₁ ≫ (Cover.Arrow.toMiddle (Cover.Relation.fst II)).f).op)\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.fst II))) =\n    ↑((plusObj J P).map (II.g₂ ≫ (Cover.Arrow.toMiddle (Cover.Relation.snd II)).f).op)\n      (↑s (Cover.Arrow.fromMiddle (Cover.Relation.snd II)))\n[PROOFSTEP]\nexact s.condition IR\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nhave inj : ∀ X : C, Function.Injective ((J.toPlus P).app (op X)) := inj_of_sep _ hsep\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nchoose T t ht using fun I =>\n  exists_rep\n    (s I)\n      -- Construct a large cover over which we will define a representative that will\n        -- provide the gluing of the given local sections.\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nlet B : J.Cover X := S.bind T\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nchoose Z e1 e2 he2 _ _ using fun I : B.Arrow => I.hf\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nlet w : Meq P B := meqOfSep P hsep X S s T t ht\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\n⊢ ∃ t, Meq.mk S t = s\n[PROOFSTEP]\nuse mk w\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\n⊢ Meq.mk S (mk w) = s\n[PROOFSTEP]\next I\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\n⊢ ↑(Meq.mk S (mk w)) I = ↑s I\n[PROOFSTEP]\ndsimp [Meq.mk]\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\n⊢ ↑((plusObj J P).map I.f.op) (mk (meqOfSep P hsep X S s T t ht)) = ↑s I\n[PROOFSTEP]\nerw [ht, res_mk_eq_mk_pullback]\n  -- Use the separatedness of `P⁺` to prove that this is indeed a gluing of our\n    -- original local sections.\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\n⊢ mk (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) = mk (t I)\n[PROOFSTEP]\napply sep P (T I)\n[GOAL]\ncase h.h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\n⊢ ∀ (I_1 : Cover.Arrow (T I)),\n    ↑((plusObj J P).map I_1.f.op) (mk (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f)) =\n      ↑((plusObj J P).map I_1.f.op) (mk (t I))\n[PROOFSTEP]\nintro II\n[GOAL]\ncase h.h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\n⊢ ↑((plusObj J P).map II.f.op) (mk (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f)) =\n    ↑((plusObj J P).map II.f.op) (mk (t I))\n[PROOFSTEP]\nsimp only [res_mk_eq_mk_pullback, eq_mk_iff_exists]\n  -- It suffices to prove equality for representatives over a\n    -- convenient sufficiently large cover...\n[GOAL]\ncase h.h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\n⊢ ∃ W h1 h2,\n    Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) h1 =\n      Meq.refine (Meq.pullback (t I) II.f) h2\n[PROOFSTEP]\nuse(J.pullback II.f).obj (T I)\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\n⊢ ∃ h1 h2,\n    Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) h1 =\n      Meq.refine (Meq.pullback (t I) II.f) h2\n[PROOFSTEP]\nlet e0 : (J.pullback II.f).obj (T I) ⟶ (J.pullback II.f).obj ((J.pullback I.f).obj B) :=\n  homOfLE\n    (by\n      intro Y f hf\n      apply Sieve.le_pullback_bind _ _ _ I.hf\n      · cases I\n        exact hf)\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\n⊢ (pullback J II.f).obj (T I) ≤ (pullback J II.f).obj ((pullback J I.f).obj B)\n[PROOFSTEP]\nintro Y f hf\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\nY : C\nf : Y ⟶ II.Y\nhf : ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f\n⊢ ((fun a => ↑a) ((pullback J II.f).obj ((pullback J I.f).obj B))).arrows f\n[PROOFSTEP]\napply Sieve.le_pullback_bind _ _ _ I.hf\n[GOAL]\ncase a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\nY : C\nf : Y ⟶ II.Y\nhf : ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f\n⊢ ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) I.Y I.f (_ : (Cover.sieve S).arrows I.f)).arrows\n    (f ≫ II.f)\n[PROOFSTEP]\ncases I\n[GOAL]\ncase a.mk\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nY Y✝ : C\nf✝ : Y✝ ⟶ X\nhf✝ : (Cover.sieve S).arrows f✝\nII : Cover.Arrow (T { Y := Y✝, f := f✝, hf := hf✝ })\nf : Y ⟶ II.Y\nhf : ((fun a => ↑a) ((pullback J II.f).obj (T { Y := Y✝, f := f✝, hf := hf✝ }))).arrows f\n⊢ ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) { Y := Y✝, f := f✝, hf := hf✝ }.Y\n        { Y := Y✝, f := f✝, hf := hf✝ }.f (_ : (Cover.sieve S).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f)).arrows\n    (f ≫ II.f)\n[PROOFSTEP]\nexact hf\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\n⊢ ∃ h1 h2,\n    Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) h1 =\n      Meq.refine (Meq.pullback (t I) II.f) h2\n[PROOFSTEP]\nuse e0, 𝟙 _\n[GOAL]\ncase h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\n⊢ Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0 =\n    Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))\n[PROOFSTEP]\next IV\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\n⊢ ↑(Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0) IV =\n    ↑(Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))) IV\n[PROOFSTEP]\nlet IA : B.Arrow := ⟨_, (IV.f ≫ II.f) ≫ I.f, ⟨I.Y, _, _, I.hf, Sieve.downward_closed _ II.hf _, rfl⟩⟩\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\n⊢ ↑(Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0) IV =\n    ↑(Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))) IV\n[PROOFSTEP]\nlet IB : S.Arrow := IA.fromMiddle\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\n⊢ ↑(Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0) IV =\n    ↑(Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))) IV\n[PROOFSTEP]\nlet IC : (T IB).Arrow := IA.toMiddle\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\n⊢ ↑(Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0) IV =\n    ↑(Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))) IV\n[PROOFSTEP]\nlet ID : (T I).Arrow := ⟨IV.Y, IV.f ≫ II.f, Sieve.downward_closed (T I).sieve II.hf IV.f⟩\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\nID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }\n⊢ ↑(Meq.refine (Meq.pullback (Meq.pullback (meqOfSep P hsep X S s T t ht) I.f) II.f) e0) IV =\n    ↑(Meq.refine (Meq.pullback (t I) II.f) (𝟙 ((pullback J II.f).obj (T I)))) IV\n[PROOFSTEP]\nchange t IB IC = t I ID\n[GOAL]\ncase h.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\nID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }\n⊢ ↑(t IB) IC = ↑(t I) ID\n[PROOFSTEP]\napply inj IV.Y\n[GOAL]\ncase h.h.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\nID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }\n⊢ ↑(NatTrans.app (toPlus J P) (op IV.Y)) (↑(t IB) IC) = ↑(NatTrans.app (toPlus J P) (op IV.Y)) (↑(t I) ID)\n[PROOFSTEP]\nerw [toPlus_apply (T I) (t I) ID, toPlus_apply (T IB) (t IB) IC, ← ht, ← ht]\n  -- Conclude by constructing the relation showing equality...\n[GOAL]\ncase h.h.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\nID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }\n⊢ ↑((plusObj J P).map IC.f.op) (↑s IB) = ↑((plusObj J P).map ID.f.op) (↑s I)\n[PROOFSTEP]\nlet IR : S.Relation := ⟨_, _, IV.Y, IC.f, ID.f, IB.f, I.f, IB.hf, I.hf, IA.middle_spec⟩\n[GOAL]\ncase h.h.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁵ : Category.{max v u, w} D\ninst✝⁴ : ConcreteCategory D\ninst✝³ : PreservesLimits (forget D)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\ns : Meq (plusObj J P) S\ninj : ∀ (X : C), Function.Injective ↑(NatTrans.app (toPlus J P) (op X))\nT : (I : Cover.Arrow S) → Cover J I.Y\nt : (I : Cover.Arrow S) → Meq P (T I)\nht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)\nB : Cover J X := Cover.bind S T\nZ : Cover.Arrow B → C\ne1 : (I : Cover.Arrow B) → I.Y ⟶ Z I\ne2 : (I : Cover.Arrow B) → Z I ⟶ X\nhe2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)\nh✝ :\n  ∀ (I : Cover.Arrow B),\n    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)\n      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)\n✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f\nw : Meq P B := meqOfSep P hsep X S s T t ht\nI : Cover.Arrow S\nII : Cover.Arrow (T I)\ne0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=\n  homOfLE\n    (_ :\n      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),\n        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →\n          (Sieve.pullback I.f\n                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>\n                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows\n            (f ≫ II.f))\nIV : Cover.Arrow ((pullback J II.f).obj (T I))\nIA : Cover.Arrow B :=\n  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,\n    hf :=\n      (_ :\n        ∃ Y g f H,\n          (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧\n            g ≫ f = (IV.f ≫ II.f) ≫ I.f) }\nIB : Cover.Arrow S := Cover.Arrow.fromMiddle IA\nIC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA\nID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }\nIR : Cover.Relation S :=\n  { Y₁ := IB.Y, Y₂ := I.Y, Z := IV.Y, g₁ := IC.f, g₂ := ID.f, f₁ := IB.f, f₂ := I.f,\n    h₁ := (_ : (Cover.sieve S).arrows IB.f), h₂ := (_ : (Cover.sieve S).arrows I.f),\n    w := (_ : Cover.Arrow.toMiddleHom IA ≫ Cover.Arrow.fromMiddleHom IA = IA.f) }\n⊢ ↑((plusObj J P).map IC.f.op) (↑s IB) = ↑((plusObj J P).map ID.f.op) (↑s I)\n[PROOFSTEP]\nexact s.condition IR\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\n⊢ Presheaf.IsSheaf J (plusObj J P)\n[PROOFSTEP]\nrw [Presheaf.isSheaf_iff_multiequalizer]\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\n⊢ ∀ (X : C) (S : Cover J X), IsIso (Cover.toMultiequalizer S (plusObj J P))\n[PROOFSTEP]\nintro X S\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\n⊢ IsIso (Cover.toMultiequalizer S (plusObj J P))\n[PROOFSTEP]\napply @isIso_of_reflects_iso _ _ _ _ _ _ _ (forget D) ?_\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\n⊢ IsIso ((forget D).map (Cover.toMultiequalizer S (plusObj J P)))\n[PROOFSTEP]\nrw [isIso_iff_bijective]\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\n⊢ Function.Bijective ((forget D).map (Cover.toMultiequalizer S (plusObj J P)))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\n⊢ Function.Injective ((forget D).map (Cover.toMultiequalizer S (plusObj J P)))\n[PROOFSTEP]\nintro x y h\n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nh :\n  (forget D).map (Cover.toMultiequalizer S (plusObj J P)) x = (forget D).map (Cover.toMultiequalizer S (plusObj J P)) y\n⊢ x = y\n[PROOFSTEP]\napply sep P S _ _\n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nh :\n  (forget D).map (Cover.toMultiequalizer S (plusObj J P)) x = (forget D).map (Cover.toMultiequalizer S (plusObj J P)) y\n⊢ ∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y\n[PROOFSTEP]\nintro I\n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nh :\n  (forget D).map (Cover.toMultiequalizer S (plusObj J P)) x = (forget D).map (Cover.toMultiequalizer S (plusObj J P)) y\nI : Cover.Arrow S\n⊢ ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y\n[PROOFSTEP]\napply_fun Meq.equiv _ _ at h \n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x) =\n    ↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)\n⊢ ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y\n[PROOFSTEP]\napply_fun fun e => e I at h \n[GOAL]\ncase left\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n⊢ ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y\n[PROOFSTEP]\nconvert h\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n⊢ ↑((plusObj J P).map I.f.op) x =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I\n[PROOFSTEP]\nerw [Meq.equiv_apply, ← comp_apply, Multiequalizer.lift_ι]\n[GOAL]\ncase h.e'_3\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n⊢ ↑((plusObj J P).map I.f.op) y =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n[PROOFSTEP]\nerw [Meq.equiv_apply, ← comp_apply, Multiequalizer.lift_ι]\n[GOAL]\ncase h.e'_2\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n⊢ ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.e'_3\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\nI : Cover.Arrow S\nh :\n  ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) x)) I =\n    ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) y)) I\n⊢ ↑((plusObj J P).map I.f.op) y = ↑((plusObj J P).map I.f.op) y\n[PROOFSTEP]\nrfl\n[GOAL]\ncase right\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\n⊢ Function.Surjective ((forget D).map (Cover.toMultiequalizer S (plusObj J P)))\n[PROOFSTEP]\nrintro (x : (multiequalizer (S.index _) : D))\n[GOAL]\ncase right\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\n⊢ ∃ a, (forget D).map (Cover.toMultiequalizer S (plusObj J P)) a = x\n[PROOFSTEP]\nobtain ⟨t, ht⟩ := exists_of_sep P hsep X S (Meq.equiv _ _ x)\n[GOAL]\ncase right.intro\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\n⊢ ∃ a, (forget D).map (Cover.toMultiequalizer S (plusObj J P)) a = x\n[PROOFSTEP]\nuse t\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\n⊢ (forget D).map (Cover.toMultiequalizer S (plusObj J P)) t = x\n[PROOFSTEP]\napply (Meq.equiv _ _).injective\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\n⊢ ↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) t) =\n    ↑(Meq.equiv (plusObj J P) S) x\n[PROOFSTEP]\nrw [← ht]\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\n⊢ ↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) t) = Meq.mk S t\n[PROOFSTEP]\next i\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\ni : Cover.Arrow S\n⊢ ↑(↑(Meq.equiv (plusObj J P) S) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) t)) i = ↑(Meq.mk S t) i\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\ni : Cover.Arrow S\n⊢ ↑(Multiequalizer.ι (Cover.index S (plusObj J P)) i) ((forget D).map (Cover.toMultiequalizer S (plusObj J P)) t) =\n    ↑(Meq.mk S t) i\n[PROOFSTEP]\nerw [← comp_apply]\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\ni : Cover.Arrow S\n⊢ ↑(Cover.toMultiequalizer S (plusObj J P) ≫ Multiequalizer.ι (Cover.index S (plusObj J P)) i) t = ↑(Meq.mk S t) i\n[PROOFSTEP]\nrw [Multiequalizer.lift_ι]\n[GOAL]\ncase h.a.h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nhsep :\n  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑(P.map I.f.op) x = ↑(P.map I.f.op) y) → x = y\nX : C\nS : Cover J X\nx : (forget D).obj (multiequalizer (Cover.index S (plusObj J P)))\nt : (forget D).obj ((plusObj J P).obj (op X))\nht : Meq.mk S t = ↑(Meq.equiv (plusObj J P) S) x\ni : Cover.Arrow S\n⊢ ↑((plusObj J P).map i.f.op) t = ↑(Meq.mk S t) i\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\n⊢ Presheaf.IsSheaf J (plusObj J (plusObj J P))\n[PROOFSTEP]\napply isSheaf_of_sep\n[GOAL]\ncase hsep\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\n⊢ ∀ (X : C) (S : Cover J X) (x y : (forget D).obj ((plusObj J P).obj (op X))),\n    (∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y) → x = y\n[PROOFSTEP]\nintro X S x y\n[GOAL]\ncase hsep\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝² : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Cᵒᵖ ⥤ D\nX : C\nS : Cover J X\nx y : (forget D).obj ((plusObj J P).obj (op X))\n⊢ (∀ (I : Cover.Arrow S), ↑((plusObj J P).map I.f.op) x = ↑((plusObj J P).map I.f.op) y) → x = y\n[PROOFSTEP]\napply sep\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\n⊢ sheafifyMap J (𝟙 P) = 𝟙 (sheafify J P)\n[PROOFSTEP]\ndsimp [sheafifyMap, sheafify]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\n⊢ plusMap J (plusMap J (𝟙 P)) = 𝟙 (plusObj J (plusObj J P))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q R : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nγ : Q ⟶ R\n⊢ sheafifyMap J (η ≫ γ) = sheafifyMap J η ≫ sheafifyMap J γ\n[PROOFSTEP]\ndsimp [sheafifyMap, sheafify]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q R : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nγ : Q ⟶ R\n⊢ plusMap J (plusMap J (η ≫ γ)) = plusMap J (plusMap J η) ≫ plusMap J (plusMap J γ)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\n⊢ η ≫ toSheafify J Q = toSheafify J P ≫ sheafifyMap J η\n[PROOFSTEP]\ndsimp [sheafifyMap, sheafify, toSheafify]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\n⊢ η ≫ toPlus J Q ≫ plusMap J (toPlus J Q) = (toPlus J P ≫ plusMap J (toPlus J P)) ≫ plusMap J (plusMap J η)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\n⊢ IsIso (toSheafify J P)\n[PROOFSTEP]\ndsimp [toSheafify]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\n⊢ IsIso (toPlus J P ≫ plusMap J (toPlus J P))\n[PROOFSTEP]\nhaveI := isIso_toPlus_of_isSheaf J P hP\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\nthis : IsIso (toPlus J P)\n⊢ IsIso (toPlus J P ≫ plusMap J (toPlus J P))\n[PROOFSTEP]\nchange (IsIso (toPlus J P ≫ (J.plusFunctor D).map (toPlus J P)))\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\nthis : IsIso (toPlus J P)\n⊢ IsIso (toPlus J P ≫ (plusFunctor J D).map (toPlus J P))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\n⊢ toSheafify J P ≫ sheafifyLift J η hQ = η\n[PROOFSTEP]\ndsimp only [sheafifyLift, toSheafify]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\n⊢ (toPlus J P ≫ plusMap J (toPlus J P)) ≫ plusLift J (plusLift J η hQ) hQ = η\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nγ : sheafify J P ⟶ Q\n⊢ toSheafify J P ≫ γ = η → γ = sheafifyLift J η hQ\n[PROOFSTEP]\nintro h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nγ : sheafify J P ⟶ Q\nh : toSheafify J P ≫ γ = η\n⊢ γ = sheafifyLift J η hQ\n[PROOFSTEP]\napply plusLift_unique\n[GOAL]\ncase hγ\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nγ : sheafify J P ⟶ Q\nh : toSheafify J P ≫ γ = η\n⊢ toPlus J (plusObj J P) ≫ γ = plusLift J η hQ\n[PROOFSTEP]\napply plusLift_unique\n[GOAL]\ncase hγ.hγ\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nγ : sheafify J P ⟶ Q\nh : toSheafify J P ≫ γ = η\n⊢ toPlus J P ≫ toPlus J (plusObj J P) ≫ γ = η\n[PROOFSTEP]\nrw [← Category.assoc, ← plusMap_toPlus]\n[GOAL]\ncase hγ.hγ\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nγ : sheafify J P ⟶ Q\nh : toSheafify J P ≫ γ = η\n⊢ (toPlus J P ≫ plusMap J (toPlus J P)) ≫ γ = η\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\n⊢ (isoSheafify J hP).inv = sheafifyLift J (𝟙 P) hP\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase a\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP : Cᵒᵖ ⥤ D\nhP : Presheaf.IsSheaf J P\n⊢ toSheafify J P ≫ (isoSheafify J hP).inv = 𝟙 P\n[PROOFSTEP]\nsimp [Iso.comp_inv_eq]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη γ : sheafify J P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nh : toSheafify J P ≫ η = toSheafify J P ≫ γ\n⊢ η = γ\n[PROOFSTEP]\napply J.plus_hom_ext _ _ hQ\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη γ : sheafify J P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nh : toSheafify J P ≫ η = toSheafify J P ≫ γ\n⊢ toPlus J (plusObj J P) ≫ η = toPlus J (plusObj J P) ≫ γ\n[PROOFSTEP]\napply J.plus_hom_ext _ _ hQ\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη γ : sheafify J P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nh : toSheafify J P ≫ η = toSheafify J P ≫ γ\n⊢ toPlus J P ≫ toPlus J (plusObj J P) ≫ η = toPlus J P ≫ toPlus J (plusObj J P) ≫ γ\n[PROOFSTEP]\nrw [← Category.assoc, ← Category.assoc, ← plusMap_toPlus]\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q : Cᵒᵖ ⥤ D\nη γ : sheafify J P ⟶ Q\nhQ : Presheaf.IsSheaf J Q\nh : toSheafify J P ≫ η = toSheafify J P ≫ γ\n⊢ (toPlus J P ≫ plusMap J (toPlus J P)) ≫ η = (toPlus J P ≫ plusMap J (toPlus J P)) ≫ γ\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q R : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nγ : Q ⟶ R\nhR : Presheaf.IsSheaf J R\n⊢ sheafifyMap J η ≫ sheafifyLift J γ hR = sheafifyLift J (η ≫ γ) hR\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase a\nC : Type u\ninst✝³ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝² : Category.{max v u, w} D\ninst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\nP Q R : Cᵒᵖ ⥤ D\nη : P ⟶ Q\nγ : Q ⟶ R\nhR : Presheaf.IsSheaf J R\n⊢ toSheafify J P ≫ sheafifyMap J η ≫ sheafifyLift J γ hR = η ≫ γ\n[PROOFSTEP]\nrw [← Category.assoc, ← J.toSheafify_naturality, Category.assoc, toSheafify_sheafifyLift]\n[GOAL]\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝² : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝¹ : ReflectsIsomorphisms (forget D)\ninst✝ : Preadditive D\nF G : Cᵒᵖ ⥤ D\n⊢ (presheafToSheaf J D).map 0 = 0\n[PROOFSTEP]\next : 3\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝² : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝¹ : ReflectsIsomorphisms (forget D)\ninst✝ : Preadditive D\nF G : Cᵒᵖ ⥤ D\nx✝ : Cᵒᵖ\n⊢ NatTrans.app ((presheafToSheaf J D).map 0).val x✝ = NatTrans.app 0.val x✝\n[PROOFSTEP]\nrefine' colimit.hom_ext (fun j => _)\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁸ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁷ : Category.{max v u, w} D\ninst✝⁶ : ConcreteCategory D\ninst✝⁵ : PreservesLimits (forget D)\ninst✝⁴ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝³ : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝² : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝¹ : ReflectsIsomorphisms (forget D)\ninst✝ : Preadditive D\nF G : Cᵒᵖ ⥤ D\nx✝ : Cᵒᵖ\nj : (GrothendieckTopology.Cover J x✝.unop)ᵒᵖ\n⊢ colimit.ι (GrothendieckTopology.diagram J (GrothendieckTopology.plusObj J F) x✝.unop) j ≫\n      NatTrans.app ((presheafToSheaf J D).map 0).val x✝ =\n    colimit.ι (GrothendieckTopology.diagram J (GrothendieckTopology.plusObj J F) x✝.unop) j ≫ NatTrans.app 0.val x✝\n[PROOFSTEP]\nerw [colimit.ι_map, comp_zero, J.plusMap_zero, J.diagramNatTrans_zero, zero_comp]\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\n⊢ ∀ {X' X : Cᵒᵖ ⥤ D} {Y : Sheaf J D} (f : X' ⟶ X) (g : X ⟶ (sheafToPresheaf J D).obj Y),\n    ↑((fun P Q =>\n                { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                  invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                  left_inv :=\n                    (_ :\n                      ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                        (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                            ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                          e),\n                  right_inv :=\n                    (_ :\n                      ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                        GrothendieckTopology.toSheafify J P ≫\n                            GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                          e) })\n              X' Y).symm\n        (f ≫ g) =\n      (presheafToSheaf J D).map f ≫\n        ↑((fun P Q =>\n                  { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                    invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                    left_inv :=\n                      (_ :\n                        ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                          (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                              ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                            e),\n                    right_inv :=\n                      (_ :\n                        ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                          GrothendieckTopology.toSheafify J P ≫\n                              GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                            e) })\n                X Y).symm\n          g\n[PROOFSTEP]\nintro P Q R η γ\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP Q : Cᵒᵖ ⥤ D\nR : Sheaf J D\nη : P ⟶ Q\nγ : Q ⟶ (sheafToPresheaf J D).obj R\n⊢ ↑((fun P Q =>\n              { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                left_inv :=\n                  (_ :\n                    ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                      (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                          ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                        e),\n                right_inv :=\n                  (_ :\n                    ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                      GrothendieckTopology.toSheafify J P ≫\n                          GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                        e) })\n            P R).symm\n      (η ≫ γ) =\n    (presheafToSheaf J D).map η ≫\n      ↑((fun P Q =>\n                { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                  invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                  left_inv :=\n                    (_ :\n                      ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                        (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                            ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                          e),\n                  right_inv :=\n                    (_ :\n                      ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                        GrothendieckTopology.toSheafify J P ≫\n                            GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                          e) })\n              Q R).symm\n        γ\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP Q : Cᵒᵖ ⥤ D\nR : Sheaf J D\nη : P ⟶ Q\nγ : Q ⟶ (sheafToPresheaf J D).obj R\n⊢ (↑((fun P Q =>\n                { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                  invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                  left_inv :=\n                    (_ :\n                      ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                        (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                            ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                          e),\n                  right_inv :=\n                    (_ :\n                      ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                        GrothendieckTopology.toSheafify J P ≫\n                            GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                          e) })\n              P R).symm\n        (η ≫ γ)).val =\n    ((presheafToSheaf J D).map η ≫\n        ↑((fun P Q =>\n                  { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                    invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                    left_inv :=\n                      (_ :\n                        ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                          (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                              ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                            e),\n                    right_inv :=\n                      (_ :\n                        ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                          GrothendieckTopology.toSheafify J P ≫\n                              GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                            e) })\n                Q R).symm\n          γ).val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP Q : Cᵒᵖ ⥤ D\nR : Sheaf J D\nη : P ⟶ Q\nγ : Q ⟶ (sheafToPresheaf J D).obj R\n⊢ GrothendieckTopology.sheafifyLift J (η ≫ γ) (_ : Presheaf.IsSheaf J R.val) =\n    GrothendieckTopology.sheafifyMap J η ≫ GrothendieckTopology.sheafifyLift J γ (_ : Presheaf.IsSheaf J R.val)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP Q : Cᵒᵖ ⥤ D\nR : Sheaf J D\nη : P ⟶ Q\nγ : Q ⟶ (sheafToPresheaf J D).obj R\n⊢ GrothendieckTopology.sheafifyMap J η ≫ GrothendieckTopology.sheafifyLift J γ (_ : Presheaf.IsSheaf J R.val) =\n    GrothendieckTopology.sheafifyLift J (η ≫ γ) (_ : Presheaf.IsSheaf J R.val)\n[PROOFSTEP]\napply J.sheafifyMap_sheafifyLift\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nX✝ : Cᵒᵖ ⥤ D\nY✝ Y'✝ : Sheaf J D\nη : (presheafToSheaf J D).obj X✝ ⟶ Y✝\nγ : Y✝ ⟶ Y'✝\n⊢ ↑((fun P Q =>\n            { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n              invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n              left_inv :=\n                (_ :\n                  ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                    (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                        ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                      e),\n              right_inv :=\n                (_ :\n                  ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                    GrothendieckTopology.toSheafify J P ≫\n                        GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                      e) })\n          X✝ Y'✝)\n      (η ≫ γ) =\n    ↑((fun P Q =>\n              { toFun := fun e => GrothendieckTopology.toSheafify J P ≫ e.val,\n                invFun := fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) },\n                left_inv :=\n                  (_ :\n                    ∀ (e : (presheafToSheaf J D).obj P ⟶ Q),\n                      (fun e => { val := GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) })\n                          ((fun e => GrothendieckTopology.toSheafify J P ≫ e.val) e) =\n                        e),\n                right_inv :=\n                  (_ :\n                    ∀ (e : P ⟶ (sheafToPresheaf J D).obj Q),\n                      GrothendieckTopology.toSheafify J P ≫\n                          GrothendieckTopology.sheafifyLift J e (_ : Presheaf.IsSheaf J Q.val) =\n                        e) })\n            X✝ Y✝)\n        η ≫\n      (sheafToPresheaf J D).map γ\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nX✝ : Cᵒᵖ ⥤ D\nY✝ Y'✝ : Sheaf J D\nη : (presheafToSheaf J D).obj X✝ ⟶ Y✝\nγ : Y✝ ⟶ Y'✝\n⊢ GrothendieckTopology.toSheafify J X✝ ≫ η.val ≫ γ.val = (GrothendieckTopology.toSheafify J X✝ ≫ η.val) ≫ γ.val\n[PROOFSTEP]\nrw [Category.assoc]\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF G : Sheaf J D\nf : F ⟶ G\nm : Mono f\n⊢ Mono f.val\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nF G : Sheaf J D\nf : F ⟶ G\nm : Mono f.val\n⊢ Mono f\n[PROOFSTEP]\nexact Sheaf.Hom.mono_of_presheaf_mono J D f\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Sheaf J D\n⊢ { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).hom } ≫\n      { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).inv } =\n    𝟙 P\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Sheaf J D\n⊢ ({ val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).hom } ≫\n        { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).inv }).val =\n    (𝟙 P).val\n[PROOFSTEP]\napply (J.isoSheafify P.2).hom_inv_id\n[GOAL]\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Sheaf J D\n⊢ { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).inv } ≫\n      { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).hom } =\n    𝟙 ((presheafToSheaf J D).obj P.val)\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁷ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w\ninst✝⁶ : Category.{max v u, w} D\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ :\n  ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : GrothendieckTopology.Cover J X), HasMultiequalizer (GrothendieckTopology.Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (GrothendieckTopology.Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nP : Sheaf J D\n⊢ ({ val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).inv } ≫\n        { val := (GrothendieckTopology.isoSheafify J (_ : Presheaf.IsSheaf J P.val)).hom }).val =\n    (𝟙 ((presheafToSheaf J D).obj P.val)).val\n[PROOFSTEP]\napply (J.isoSheafify P.2).inv_hom_id\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Sheafification", "llama_tokens": 123866, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526514141572, "lm_q2_score": 0.4571367168274948, "lm_q1q2_score": 0.26050057014291067}}
{"text": "[GOAL]\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Nontrivial R\n⊢ ¬Separable 0\n[PROOFSTEP]\nrintro ⟨x, y, h⟩\n[GOAL]\ncase intro.intro\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Nontrivial R\nx y : R[X]\nh : x * 0 + y * ↑derivative 0 = 1\n⊢ False\n[PROOFSTEP]\nsimp only [derivative_zero, mul_zero, add_zero, zero_ne_one] at h \n[GOAL]\nR : Type u\ninst✝² : CommSemiring R\nS : Type v\ninst✝¹ : CommSemiring S\ninst✝ : Subsingleton R\nf : R[X]\n⊢ Separable f\n[PROOFSTEP]\nsimp [Separable, IsCoprime]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\na : R\n⊢ Separable (X + ↑C a)\n[PROOFSTEP]\nrw [separable_def, derivative_add, derivative_X, derivative_C, add_zero]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\na : R\n⊢ IsCoprime (X + ↑C a) 1\n[PROOFSTEP]\nexact isCoprime_one_right\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\n⊢ Separable X\n[PROOFSTEP]\nrw [separable_def, derivative_X]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\n⊢ IsCoprime X 1\n[PROOFSTEP]\nexact isCoprime_one_right\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nr : R\n⊢ Separable (↑C r) ↔ IsUnit r\n[PROOFSTEP]\nrw [separable_def, derivative_C, isCoprime_zero_right, isUnit_C]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\n⊢ Separable f\n[PROOFSTEP]\nhave := h.of_mul_left_left\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\nthis : IsCoprime f (↑derivative (f * g))\n⊢ Separable f\n[PROOFSTEP]\nrw [derivative_mul] at this \n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\nthis : IsCoprime f (↑derivative f * g + f * ↑derivative g)\n⊢ Separable f\n[PROOFSTEP]\nexact IsCoprime.of_mul_right_left (IsCoprime.of_add_mul_left_right this)\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\n⊢ Separable g\n[PROOFSTEP]\nrw [mul_comm] at h \n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (g * f)\n⊢ Separable g\n[PROOFSTEP]\nexact h.of_mul_left\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nhf : Separable f\nhfg : g ∣ f\n⊢ Separable g\n[PROOFSTEP]\nrcases hfg with ⟨f', rfl⟩\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\ng f' : R[X]\nhf : Separable (g * f')\n⊢ Separable g\n[PROOFSTEP]\nexact Separable.of_mul_left hf\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\n⊢ IsCoprime f g\n[PROOFSTEP]\nhave := h.of_mul_left_left\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\nthis : IsCoprime f (↑derivative (f * g))\n⊢ IsCoprime f g\n[PROOFSTEP]\nrw [derivative_mul] at this \n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf g : R[X]\nh : Separable (f * g)\nthis : IsCoprime f (↑derivative f * g + f * ↑derivative g)\n⊢ IsCoprime f g\n[PROOFSTEP]\nexact IsCoprime.of_mul_right_right (IsCoprime.of_add_mul_left_right this)\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf : R[X]\nn : ℕ\nh : Separable (f ^ (n + 2))\n⊢ IsUnit f ∨ Separable f ∧ n + 2 = 1 ∨ n + 2 = 0\n[PROOFSTEP]\nrw [pow_succ, pow_succ] at h \n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\nf : R[X]\nn : ℕ\nh : Separable (f * (f * f ^ n))\n⊢ IsUnit f ∨ Separable f ∧ n + 2 = 1 ∨ n + 2 = 0\n[PROOFSTEP]\nexact Or.inl (isCoprime_self.1 h.isCoprime.of_mul_right_left)\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np : R[X]\nh : Separable p\nf : R →+* S\na b : R[X]\nH : a * p + b * ↑derivative p = 1\n⊢ Polynomial.map f a * Polynomial.map f p + Polynomial.map f b * ↑derivative (Polynomial.map f p) = 1\n[PROOFSTEP]\nrw [derivative_map, ← Polynomial.map_mul, ← Polynomial.map_mul, ← Polynomial.map_add, H, Polynomial.map_one]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhp : Separable p\nhq : q * q ∣ p\n⊢ IsUnit q\n[PROOFSTEP]\nobtain ⟨p, rfl⟩ := hq\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : Separable (q * q * p)\n⊢ IsUnit q\n[PROOFSTEP]\napply isCoprime_self.mp\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : Separable (q * q * p)\n⊢ IsCoprime q q\n[PROOFSTEP]\nhave : IsCoprime (q * (q * p)) (q * (derivative q * p + derivative q * p + q * derivative p)) :=\n  by\n  simp only [← mul_assoc, mul_add]\n  dsimp only [Separable] at hp \n  convert hp using 1\n  rw [derivative_mul, derivative_mul]\n  ring\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : Separable (q * q * p)\n⊢ IsCoprime (q * (q * p)) (q * (↑derivative q * p + ↑derivative q * p + q * ↑derivative p))\n[PROOFSTEP]\nsimp only [← mul_assoc, mul_add]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : Separable (q * q * p)\n⊢ IsCoprime (q * q * p) (q * ↑derivative q * p + q * ↑derivative q * p + q * q * ↑derivative p)\n[PROOFSTEP]\ndsimp only [Separable] at hp \n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : IsCoprime (q * q * p) (↑derivative (q * q * p))\n⊢ IsCoprime (q * q * p) (q * ↑derivative q * p + q * ↑derivative q * p + q * q * ↑derivative p)\n[PROOFSTEP]\nconvert hp using 1\n[GOAL]\ncase h.e'_4\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : IsCoprime (q * q * p) (↑derivative (q * q * p))\n⊢ q * ↑derivative q * p + q * ↑derivative q * p + q * q * ↑derivative p = ↑derivative (q * q * p)\n[PROOFSTEP]\nrw [derivative_mul, derivative_mul]\n[GOAL]\ncase h.e'_4\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : IsCoprime (q * q * p) (↑derivative (q * q * p))\n⊢ q * ↑derivative q * p + q * ↑derivative q * p + q * q * ↑derivative p =\n    (↑derivative q * q + q * ↑derivative q) * p + q * q * ↑derivative p\n[PROOFSTEP]\nring\n[GOAL]\ncase intro\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\nq p : R[X]\nhp : Separable (q * q * p)\nthis : IsCoprime (q * (q * p)) (q * (↑derivative q * p + ↑derivative q * p + q * ↑derivative p))\n⊢ IsCoprime q q\n[PROOFSTEP]\nexact IsCoprime.of_mul_right_left (IsCoprime.of_mul_left_left this)\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhq : ¬IsUnit q\nhsep : Separable p\n⊢ multiplicity q p ≤ 1\n[PROOFSTEP]\ncontrapose! hq\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\n⊢ IsUnit q\n[PROOFSTEP]\napply isUnit_of_self_mul_dvd_separable hsep\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\n⊢ q * q ∣ p\n[PROOFSTEP]\nrw [← sq]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\n⊢ q ^ 2 ∣ p\n[PROOFSTEP]\napply multiplicity.pow_dvd_of_le_multiplicity\n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\n⊢ ↑2 ≤ multiplicity q p\n[PROOFSTEP]\nhave h : ⟨Part.Dom 1 ∧ Part.Dom 1, fun _ ↦ 2⟩ ≤ multiplicity q p := PartENat.add_one_le_of_lt hq\n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\nh : { Dom := 1.Dom ∧ 1.Dom, get := fun x => 2 } ≤ multiplicity q p\n⊢ ↑2 ≤ multiplicity q p\n[PROOFSTEP]\nrw [and_self] at h \n[GOAL]\ncase a\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q✝ : ℕ\np q : R[X]\nhsep : Separable p\nhq : 1 < multiplicity q p\nh : { Dom := 1.Dom, get := fun x => 2 } ≤ multiplicity q p\n⊢ ↑2 ≤ multiplicity q p\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q : ℕ\np : R[X]\nhsep : Separable p\n⊢ Squarefree p\n[PROOFSTEP]\nrw [multiplicity.squarefree_iff_multiplicity_le_one p]\n[GOAL]\nR : Type u\ninst✝¹ : CommSemiring R\nS : Type v\ninst✝ : CommSemiring S\np✝ q : ℕ\np : R[X]\nhsep : Separable p\n⊢ ∀ (x : R[X]), multiplicity x p ≤ 1 ∨ IsUnit x\n[PROOFSTEP]\nexact fun f => or_iff_not_imp_right.mpr fun hunit => multiplicity_le_one_of_separable hunit hsep\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nx : R\n⊢ Separable (X - ↑C x)\n[PROOFSTEP]\nsimpa only [sub_eq_add_neg, C_neg] using separable_X_add_C (-x)\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nf g : R[X]\nhf : Separable f\nhg : Separable g\nh : IsCoprime f g\n⊢ Separable (f * g)\n[PROOFSTEP]\nrw [separable_def, derivative_mul]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nf g : R[X]\nhf : Separable f\nhg : Separable g\nh : IsCoprime f g\n⊢ IsCoprime (f * g) (↑derivative f * g + f * ↑derivative g)\n[PROOFSTEP]\nexact ((hf.mul_right h).add_mul_left_right _).mul_left ((h.symm.mul_right hg).mul_add_right_right _)\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nι : Type u_1\nf : ι → R[X]\ns✝ : Finset ι\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih :\n  (∀ (x : ι), x ∈ s → ∀ (y : ι), y ∈ s → x ≠ y → IsCoprime (f x) (f y)) →\n    (∀ (x : ι), x ∈ s → Separable (f x)) → Separable (∏ x in s, f x)\nh1 : ∀ (x : ι), x ∈ insert a s → ∀ (y : ι), y ∈ insert a s → x ≠ y → IsCoprime (f x) (f y)\nh2 : ∀ (x : ι), x ∈ insert a s → Separable (f x)\n⊢ Separable (∏ x in insert a s, f x)\n[PROOFSTEP]\nsimp_rw [Finset.forall_mem_insert, forall_and] at h1 h2 \n[GOAL]\nR : Type u\ninst✝ : CommRing R\nι : Type u_1\nf : ι → R[X]\ns✝ : Finset ι\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih :\n  (∀ (x : ι), x ∈ s → ∀ (y : ι), y ∈ s → x ≠ y → IsCoprime (f x) (f y)) →\n    (∀ (x : ι), x ∈ s → Separable (f x)) → Separable (∏ x in s, f x)\nh2 : Separable (f a) ∧ ∀ (x : ι), x ∈ s → Separable (f x)\nh1 :\n  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ (x : ι), x ∈ s → a ≠ x → IsCoprime (f a) (f x)) ∧\n    (∀ (x : ι), x ∈ s → x ≠ a → IsCoprime (f x) (f a)) ∧\n      ∀ (x : ι), x ∈ s → ∀ (x_2 : ι), x_2 ∈ s → x ≠ x_2 → IsCoprime (f x) (f x_2)\n⊢ Separable (∏ x in insert a s, f x)\n[PROOFSTEP]\nrw [prod_insert has]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nι : Type u_1\nf : ι → R[X]\ns✝ : Finset ι\na : ι\ns : Finset ι\nhas : ¬a ∈ s\nih :\n  (∀ (x : ι), x ∈ s → ∀ (y : ι), y ∈ s → x ≠ y → IsCoprime (f x) (f y)) →\n    (∀ (x : ι), x ∈ s → Separable (f x)) → Separable (∏ x in s, f x)\nh2 : Separable (f a) ∧ ∀ (x : ι), x ∈ s → Separable (f x)\nh1 :\n  ((a ≠ a → IsCoprime (f a) (f a)) ∧ ∀ (x : ι), x ∈ s → a ≠ x → IsCoprime (f a) (f x)) ∧\n    (∀ (x : ι), x ∈ s → x ≠ a → IsCoprime (f x) (f a)) ∧\n      ∀ (x : ι), x ∈ s → ∀ (x_2 : ι), x_2 ∈ s → x ≠ x_2 → IsCoprime (f x) (f x_2)\n⊢ Separable (f a * ∏ x in s, f x)\n[PROOFSTEP]\nexact\n  h2.1.mul (ih h1.2.2 h2.2) (IsCoprime.prod_right fun i his => h1.1.2 i his <| Ne.symm <| ne_of_mem_of_not_mem his has)\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nι : Type u_1\nf : ι → R\ns : Finset ι\nhfs : Separable (∏ i in s, (X - ↑C (f i)))\nx y : ι\nhx : x ∈ s\nhy : y ∈ s\nhfxy : f x = f y\n⊢ x = y\n[PROOFSTEP]\nby_contra hxy\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nι : Type u_1\nf : ι → R\ns : Finset ι\nhfs : Separable (∏ i in s, (X - ↑C (f i)))\nx y : ι\nhx : x ∈ s\nhy : y ∈ s\nhfxy : f x = f y\nhxy : ¬x = y\n⊢ False\n[PROOFSTEP]\nrw [← insert_erase hx, prod_insert (not_mem_erase _ _), ← insert_erase (mem_erase_of_ne_of_mem (Ne.symm hxy) hy),\n  prod_insert (not_mem_erase _ _), ← mul_assoc, hfxy, ← sq] at hfs \n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\nι : Type u_1\nf : ι → R\ns : Finset ι\nx y : ι\nhfs : Separable ((X - ↑C (f y)) ^ 2 * ∏ x in Finset.erase (Finset.erase s x) y, (X - ↑C (f x)))\nhx : x ∈ s\nhy : y ∈ s\nhfxy : f x = f y\nhxy : ¬x = y\n⊢ False\n[PROOFSTEP]\ncases (hfs.of_mul_left.of_pow (not_isUnit_X_sub_C _) two_ne_zero).2\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\ns : Multiset R\nhs : Separable (Multiset.prod (Multiset.map (fun a => X - ↑C a) s))\n⊢ Multiset.Nodup s\n[PROOFSTEP]\nrw [Multiset.nodup_iff_ne_cons_cons]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\ns : Multiset R\nhs : Separable (Multiset.prod (Multiset.map (fun a => X - ↑C a) s))\n⊢ ∀ (a : R) (t : Multiset R), s ≠ a ::ₘ a ::ₘ t\n[PROOFSTEP]\nrintro a t rfl\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\na : R\nt : Multiset R\nhs : Separable (Multiset.prod (Multiset.map (fun a => X - ↑C a) (a ::ₘ a ::ₘ t)))\n⊢ False\n[PROOFSTEP]\nrefine' not_isUnit_X_sub_C a (isUnit_of_self_mul_dvd_separable hs _)\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\na : R\nt : Multiset R\nhs : Separable (Multiset.prod (Multiset.map (fun a => X - ↑C a) (a ::ₘ a ::ₘ t)))\n⊢ (X - ↑C a) * (X - ↑C a) ∣ Multiset.prod (Multiset.map (fun a => X - ↑C a) (a ::ₘ a ::ₘ t))\n[PROOFSTEP]\nsimpa only [Multiset.map_cons, Multiset.prod_cons] using mul_dvd_mul_left _ (dvd_mul_right _ _)\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n⊢ Separable (X ^ n - ↑C ↑u)\n[PROOFSTEP]\nnontriviality R\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\n⊢ Separable (X ^ n - ↑C ↑u)\n[PROOFSTEP]\nrcases n.eq_zero_or_pos with (rfl | hpos)\n[GOAL]\ncase inl\nR : Type u\ninst✝ : CommRing R\nu : Rˣ\n✝ : Nontrivial R\nhn : IsUnit ↑0\n⊢ Separable (X ^ 0 - ↑C ↑u)\n[PROOFSTEP]\nsimp at hn \n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\n⊢ Separable (X ^ n - ↑C ↑u)\n[PROOFSTEP]\napply (separable_def' (X ^ n - C (u : R))).2\n[GOAL]\ncase inr\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\n⊢ ∃ a b, a * (X ^ n - ↑C ↑u) + b * ↑derivative (X ^ n - ↑C ↑u) = 1\n[PROOFSTEP]\nobtain ⟨n', hn'⟩ := hn.exists_left_inv\n[GOAL]\ncase inr.intro\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ ∃ a b, a * (X ^ n - ↑C ↑u) + b * ↑derivative (X ^ n - ↑C ↑u) = 1\n[PROOFSTEP]\nrefine' ⟨-C ↑u⁻¹, C (↑u⁻¹ : R) * C n' * X, _⟩\n[GOAL]\ncase inr.intro\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * ↑derivative (X ^ n - ↑C ↑u) = 1\n[PROOFSTEP]\nrw [derivative_sub, derivative_C, sub_zero, derivative_pow X n, derivative_X, mul_one]\n[GOAL]\ncase inr.intro\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑C ↑n * X ^ (n - 1)) = 1\n[PROOFSTEP]\ncalc\n  -C ↑u⁻¹ * (X ^ n - C ↑u) + C ↑u⁻¹ * C n' * X * (↑n * X ^ (n - 1)) =\n      C (↑u⁻¹ * ↑u) - C ↑u⁻¹ * X ^ n + C ↑u⁻¹ * C (n' * ↑n) * (X * X ^ (n - 1)) :=\n    by\n    simp only [C.map_mul, C_eq_nat_cast]\n    ring\n  _ = 1 := by\n    simp only [Units.inv_mul, hn', C.map_one, mul_one, ← pow_succ, Nat.sub_add_cancel (show 1 ≤ n from hpos),\n      sub_add_cancel]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑n * X ^ (n - 1)) =\n    ↑C (↑u⁻¹ * ↑u) - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * ↑C (n' * ↑n) * (X * X ^ (n - 1))\n[PROOFSTEP]\nsimp only [C.map_mul, C_eq_nat_cast]\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ -↑C ↑u⁻¹ * (X ^ n - ↑C ↑u) + ↑C ↑u⁻¹ * ↑C n' * X * (↑n * X ^ (n - 1)) =\n    ↑C ↑u⁻¹ * ↑C ↑u - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * (↑C n' * ↑n) * (X * X ^ (n - 1))\n[PROOFSTEP]\nring\n[GOAL]\nR : Type u\ninst✝ : CommRing R\nn : ℕ\nu : Rˣ\nhn : IsUnit ↑n\n✝ : Nontrivial R\nhpos : n > 0\nn' : R\nhn' : n' * ↑n = 1\n⊢ ↑C (↑u⁻¹ * ↑u) - ↑C ↑u⁻¹ * X ^ n + ↑C ↑u⁻¹ * ↑C (n' * ↑n) * (X * X ^ (n - 1)) = 1\n[PROOFSTEP]\nsimp only [Units.inv_mul, hn', C.map_one, mul_one, ← pow_succ, Nat.sub_add_cancel (show 1 ≤ n from hpos),\n  sub_add_cancel]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\np : R[X]\nhsep : Separable p\nx : R\n⊢ rootMultiplicity x p ≤ 1\n[PROOFSTEP]\nby_cases hp : p = 0\n[GOAL]\ncase pos\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\np : R[X]\nhsep : Separable p\nx : R\nhp : p = 0\n⊢ rootMultiplicity x p ≤ 1\n[PROOFSTEP]\nsimp [hp]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\np : R[X]\nhsep : Separable p\nx : R\nhp : ¬p = 0\n⊢ rootMultiplicity x p ≤ 1\n[PROOFSTEP]\nrw [rootMultiplicity_eq_multiplicity, dif_neg hp, ← PartENat.coe_le_coe, PartENat.natCast_get, Nat.cast_one]\n[GOAL]\ncase neg\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : Nontrivial R\np : R[X]\nhsep : Separable p\nx : R\nhp : ¬p = 0\n⊢ multiplicity (X - ↑C x) p ≤ 1\n[PROOFSTEP]\nexact multiplicity_le_one_of_separable (not_isUnit_X_sub_C _) hsep\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhsep : Separable p\nx : R\n⊢ Multiset.count x (roots p) ≤ 1\n[PROOFSTEP]\nrw [count_roots p]\n[GOAL]\nR : Type u\ninst✝¹ : CommRing R\ninst✝ : IsDomain R\np : R[X]\nhsep : Separable p\nx : R\n⊢ rootMultiplicity x p ≤ 1\n[PROOFSTEP]\nexact rootMultiplicity_le_one_of_separable hsep x\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nh : ↑derivative f ≠ 0\ng : F[X]\nhg1 : g ∈ nonunits F[X]\n_hg2 : g ≠ 0\nx✝ : g ∣ f\nhg4 : g ∣ ↑derivative f\np : F[X]\nhg3 : f = g * p\nu : F[X]ˣ\nhu : ↑u = p\n⊢ f ∣ ↑derivative f\n[PROOFSTEP]\nconv_lhs => rw [hg3, ← hu]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nh : ↑derivative f ≠ 0\ng : F[X]\nhg1 : g ∈ nonunits F[X]\n_hg2 : g ≠ 0\nx✝ : g ∣ f\nhg4 : g ∣ ↑derivative f\np : F[X]\nhg3 : f = g * p\nu : F[X]ˣ\nhu : ↑u = p\n| f\n[PROOFSTEP]\nrw [hg3, ← hu]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nh : ↑derivative f ≠ 0\ng : F[X]\nhg1 : g ∈ nonunits F[X]\n_hg2 : g ≠ 0\nx✝ : g ∣ f\nhg4 : g ∣ ↑derivative f\np : F[X]\nhg3 : f = g * p\nu : F[X]ˣ\nhu : ↑u = p\n| f\n[PROOFSTEP]\nrw [hg3, ← hu]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nh : ↑derivative f ≠ 0\ng : F[X]\nhg1 : g ∈ nonunits F[X]\n_hg2 : g ≠ 0\nx✝ : g ∣ f\nhg4 : g ∣ ↑derivative f\np : F[X]\nhg3 : f = g * p\nu : F[X]ˣ\nhu : ↑u = p\n| f\n[PROOFSTEP]\nrw [hg3, ← hu]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nh : ↑derivative f ≠ 0\ng : F[X]\nhg1 : g ∈ nonunits F[X]\n_hg2 : g ≠ 0\nx✝ : g ∣ f\nhg4 : g ∣ ↑derivative f\np : F[X]\nhg3 : f = g * p\nu : F[X]ˣ\nhu : ↑u = p\n⊢ g * ↑u ∣ ↑derivative f\n[PROOFSTEP]\nrwa [Units.mul_right_dvd]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F →+* K\np : F[X]\n⊢ Separable (map f p) ↔ Separable p\n[PROOFSTEP]\nsimp_rw [separable_def, derivative_map, isCoprime_map]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nι : Type u_1\nf : ι → F\ns : Finset ι\nH : ∀ (x : ι), x ∈ s → ∀ (y : ι), y ∈ s → f x = f y → x = y\n⊢ Separable (∏ i in s, (X - ↑C (f i)))\n[PROOFSTEP]\nrw [← prod_attach]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nι : Type u_1\nf : ι → F\ns : Finset ι\nH : ∀ (x : ι), x ∈ s → ∀ (y : ι), y ∈ s → f x = f y → x = y\n⊢ Separable (∏ x in attach s, (X - ↑C (f ↑x)))\n[PROOFSTEP]\nexact\n  separable_prod'\n    (fun x _hx y _hy hxy =>\n      @pairwise_coprime_X_sub_C _ _ { x // x ∈ s } (fun x => f x) (fun x y hxy => Subtype.eq <| H x.1 x.2 y.1 y.2 hxy) _\n        _ hxy)\n    fun _ _ => separable_X_sub_C\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\nι : Type u_1\ninst✝ : Fintype ι\nf : ι → F\n⊢ (∀ (x : ι), x ∈ univ → ∀ (y : ι), y ∈ univ → f x = f y → x = y) ↔ Function.Injective f\n[PROOFSTEP]\nsimp_rw [mem_univ, true_imp_iff, Function.Injective]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F p) g = f\n[PROOFSTEP]\nrcases p.eq_zero_or_pos with (rfl | hp)\n[GOAL]\ncase inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nHF : CharP F 0\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F 0) g = f\n[PROOFSTEP]\nhaveI := CharP.charP_to_charZero F\n[GOAL]\ncase inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nHF : CharP F 0\nthis : CharZero F\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F 0) g = f\n[PROOFSTEP]\nhave := natDegree_eq_zero_of_derivative_eq_zero H\n[GOAL]\ncase inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nHF : CharP F 0\nthis✝ : CharZero F\nthis : natDegree f = 0\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F 0) g = f\n[PROOFSTEP]\nhave := (natDegree_pos_iff_degree_pos.mpr <| degree_pos_of_irreducible hf).ne'\n[GOAL]\ncase inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nHF : CharP F 0\nthis✝¹ : CharZero F\nthis✝ : natDegree f = 0\nthis : natDegree f ≠ 0\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F 0) g = f\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase inr\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nhp : p > 0\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F p) g = f\n[PROOFSTEP]\nhaveI := isLocalRingHom_expand F hp\n[GOAL]\ncase inr\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nhp : p > 0\nthis : IsLocalRingHom ↑(expand F p)\n⊢ Separable f ∨ ¬Separable f ∧ ∃ g, Irreducible g ∧ ↑(expand F p) g = f\n[PROOFSTEP]\nexact\n  Or.inr\n    ⟨by rw [separable_iff_derivative_ne_zero hf, Classical.not_not, H], contract p f,\n      of_irreducible_map (expand F p : F[X] →+* F[X]) (by rwa [← expand_contract p H hp.ne'] at hf ),\n      expand_contract p H hp.ne'⟩\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nhp : p > 0\nthis : IsLocalRingHom ↑(expand F p)\n⊢ ¬Separable f\n[PROOFSTEP]\nrw [separable_iff_derivative_ne_zero hf, Classical.not_not, H]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nH : ↑derivative f = 0\nhp : p > 0\nthis : IsLocalRingHom ↑(expand F p)\n⊢ Irreducible (↑↑(expand F p) (contract p f))\n[PROOFSTEP]\nrwa [← expand_contract p H hp.ne'] at hf \n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : p ≠ 0\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nreplace hp : p.Prime := (CharP.char_is_prime_or_zero F p).resolve_right hp\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : Nat.Prime p\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\ninduction' hn : f.natDegree using Nat.strong_induction_on with N ih generalizing f\n[GOAL]\ncase h\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nN : ℕ\nih : ∀ (m : ℕ), m < N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nf : F[X]\nhf : Irreducible f\nhn : natDegree f = N\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrcases separable_or p hf with (h | ⟨h1, g, hg, hgf⟩)\n[GOAL]\ncase h.inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nN : ℕ\nih : ∀ (m : ℕ), m < N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nf : F[X]\nhf : Irreducible f\nhn : natDegree f = N\nh : Separable f\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrefine' ⟨0, f, h, _⟩\n[GOAL]\ncase h.inl\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nN : ℕ\nih : ∀ (m : ℕ), m < N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nf : F[X]\nhf : Irreducible f\nhn : natDegree f = N\nh : Separable f\n⊢ ↑(expand F (p ^ 0)) f = f\n[PROOFSTEP]\nrw [pow_zero, expand_one]\n[GOAL]\ncase h.inr.intro.intro.intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nN : ℕ\nih : ∀ (m : ℕ), m < N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nf : F[X]\nhf : Irreducible f\nhn : natDegree f = N\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\ncases' N with N\n[GOAL]\ncase h.inr.intro.intro.intro.zero\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.zero\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrw [natDegree_eq_zero_iff_degree_le_zero, degree_le_zero_iff] at hn \n[GOAL]\ncase h.inr.intro.intro.intro.zero\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : f = ↑C (coeff f 0)\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrw [hn, separable_C, isUnit_iff_ne_zero, Classical.not_not] at h1 \n[GOAL]\ncase h.inr.intro.intro.intro.zero\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : coeff f 0 = 0\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : f = ↑C (coeff f 0)\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nhave hf0 : f ≠ 0 := hf.ne_zero\n[GOAL]\ncase h.inr.intro.intro.intro.zero\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : coeff f 0 = 0\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : f = ↑C (coeff f 0)\nhf0 : f ≠ 0\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrw [h1, C_0] at hn \n[GOAL]\ncase h.inr.intro.intro.intro.zero\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : coeff f 0 = 0\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nih :\n  ∀ (m : ℕ),\n    m < Nat.zero → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : f = 0\nhf0 : f ≠ 0\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nexact absurd hn hf0\n[GOAL]\ncase h.inr.intro.intro.intro.succ\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nhave hg1 : g.natDegree * p = N.succ := by rwa [← natDegree_expand, hgf]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\n⊢ natDegree g * p = Nat.succ N\n[PROOFSTEP]\nrwa [← natDegree_expand, hgf]\n[GOAL]\ncase h.inr.intro.intro.intro.succ\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nhave hg2 : g.natDegree ≠ 0 := by\n  intro this\n  rw [this, zero_mul] at hg1 \n  cases hg1\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\n⊢ natDegree g ≠ 0\n[PROOFSTEP]\nintro this\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\nthis : natDegree g = 0\n⊢ False\n[PROOFSTEP]\nrw [this, zero_mul] at hg1 \n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : 0 = Nat.succ N\nthis : natDegree g = 0\n⊢ False\n[PROOFSTEP]\ncases hg1\n[GOAL]\ncase h.inr.intro.intro.intro.succ\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\nhg2 : natDegree g ≠ 0\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nhave hg3 : g.natDegree < N.succ := by\n  rw [← mul_one g.natDegree, ← hg1]\n  exact Nat.mul_lt_mul_of_pos_left hp.one_lt hg2.bot_lt\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\nhg2 : natDegree g ≠ 0\n⊢ natDegree g < Nat.succ N\n[PROOFSTEP]\nrw [← mul_one g.natDegree, ← hg1]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\nhg2 : natDegree g ≠ 0\n⊢ natDegree g * 1 < natDegree g * p\n[PROOFSTEP]\nexact Nat.mul_lt_mul_of_pos_left hp.one_lt hg2.bot_lt\n[GOAL]\ncase h.inr.intro.intro.intro.succ\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\ng : F[X]\nhg : Irreducible g\nhgf : ↑(expand F p) g = f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nhg1 : natDegree g * p = Nat.succ N\nhg2 : natDegree g ≠ 0\nhg3 : natDegree g < Nat.succ N\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrcases ih _ hg3 hg rfl with ⟨n, g, hg4, rfl⟩\n[GOAL]\ncase h.inr.intro.intro.intro.succ.intro.intro.intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nn : ℕ\ng : F[X]\nhg4 : Separable g\nhg : Irreducible (↑(expand F (p ^ n)) g)\nhgf : ↑(expand F p) (↑(expand F (p ^ n)) g) = f\nhg1 : natDegree (↑(expand F (p ^ n)) g) * p = Nat.succ N\nhg2 : natDegree (↑(expand F (p ^ n)) g) ≠ 0\nhg3 : natDegree (↑(expand F (p ^ n)) g) < Nat.succ N\n⊢ ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\n[PROOFSTEP]\nrefine' ⟨n + 1, g, hg4, _⟩\n[GOAL]\ncase h.inr.intro.intro.intro.succ.intro.intro.intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf✝ : F[X]\nhf✝ : Irreducible f✝\nhp : Nat.Prime p\nx✝ : ℕ\nhn✝ : natDegree f✝ = x✝\nf : F[X]\nhf : Irreducible f\nh1 : ¬Separable f\nN : ℕ\nih :\n  ∀ (m : ℕ),\n    m < Nat.succ N → ∀ {f : F[X]}, Irreducible f → natDegree f = m → ∃ n g, Separable g ∧ ↑(expand F (p ^ n)) g = f\nhn : natDegree f = Nat.succ N\nn : ℕ\ng : F[X]\nhg4 : Separable g\nhg : Irreducible (↑(expand F (p ^ n)) g)\nhgf : ↑(expand F p) (↑(expand F (p ^ n)) g) = f\nhg1 : natDegree (↑(expand F (p ^ n)) g) * p = Nat.succ N\nhg2 : natDegree (↑(expand F (p ^ n)) g) ≠ 0\nhg3 : natDegree (↑(expand F (p ^ n)) g) < Nat.succ N\n⊢ ↑(expand F (p ^ (n + 1))) g = f\n[PROOFSTEP]\nrw [← hgf, expand_expand, pow_succ]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : Separable (↑(expand F (p ^ n)) f)\n⊢ IsUnit f ∨ n = 0\n[PROOFSTEP]\nrw [or_iff_not_imp_right]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : Separable (↑(expand F (p ^ n)) f)\n⊢ ¬n = 0 → IsUnit f\n[PROOFSTEP]\nrintro hn : n ≠ 0\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : Separable (↑(expand F (p ^ n)) f)\nhn : n ≠ 0\n⊢ IsUnit f\n[PROOFSTEP]\nhave hf2 : derivative (expand F (p ^ n) f) = 0 := by\n  rw [derivative_expand, Nat.cast_pow, CharP.cast_eq_zero, zero_pow hn.bot_lt, zero_mul, mul_zero]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : Separable (↑(expand F (p ^ n)) f)\nhn : n ≠ 0\n⊢ ↑derivative (↑(expand F (p ^ n)) f) = 0\n[PROOFSTEP]\nrw [derivative_expand, Nat.cast_pow, CharP.cast_eq_zero, zero_pow hn.bot_lt, zero_mul, mul_zero]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : Separable (↑(expand F (p ^ n)) f)\nhn : n ≠ 0\nhf2 : ↑derivative (↑(expand F (p ^ n)) f) = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrw [separable_def, hf2, isCoprime_zero_right, isUnit_iff] at hf \n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhf : ∃ r, IsUnit r ∧ ↑C r = ↑(expand F (p ^ n)) f\nhn : n ≠ 0\nhf2 : ↑derivative (↑(expand F (p ^ n)) f) = 0\n⊢ IsUnit f\n[PROOFSTEP]\nrcases hf with ⟨r, hr, hrf⟩\n[GOAL]\ncase intro.intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhn : n ≠ 0\nhf2 : ↑derivative (↑(expand F (p ^ n)) f) = 0\nr : F\nhr : IsUnit r\nhrf : ↑C r = ↑(expand F (p ^ n)) f\n⊢ IsUnit f\n[PROOFSTEP]\nrw [eq_comm, expand_eq_C (pow_pos hp _)] at hrf \n[GOAL]\ncase intro.intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nn : ℕ\nhp : 0 < p\nhn : n ≠ 0\nhf2 : ↑derivative (↑(expand F (p ^ n)) f) = 0\nr : F\nhr : IsUnit r\nhrf : f = ↑C r\n⊢ IsUnit f\n[PROOFSTEP]\nrwa [hrf, isUnit_C]\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ : ℕ\ng₁ : F[X]\nhg₁ : Separable g₁\nhgf₁ : ↑(expand F (p ^ n₁)) g₁ = f\nn₂ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nhgf₂ : ↑(expand F (p ^ n₂)) g₂ = f\n⊢ n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nrevert g₁ g₂\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\n⊢ ∀ (g₁ : F[X]),\n    Separable g₁ →\n      ↑(expand F (p ^ n₁)) g₁ = f → ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nclear! K\n[GOAL]\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\n⊢ ∀ (g₁ : F[X]),\n    Separable g₁ →\n      ↑(expand F (p ^ n₁)) g₁ = f → ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nwlog hn : n₁ ≤ n₂\n[GOAL]\ncase inr\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nthis :\n  ∀ {F : Type u} [inst : Field F] (p : ℕ) [HF : CharP F p] {f : F[X]},\n    Irreducible f →\n      0 < p →\n        ∀ (n₁ n₂ : ℕ),\n          n₁ ≤ n₂ →\n            ∀ (g₁ : F[X]),\n              Separable g₁ →\n                ↑(expand F (p ^ n₁)) g₁ = f →\n                  ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\nhn : ¬n₁ ≤ n₂\n⊢ ∀ (g₁ : F[X]),\n    Separable g₁ →\n      ↑(expand F (p ^ n₁)) g₁ = f → ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nintro g₁ hg₁ Hg₁ g₂ hg₂ Hg₂\n[GOAL]\ncase inr\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nthis :\n  ∀ {F : Type u} [inst : Field F] (p : ℕ) [HF : CharP F p] {f : F[X]},\n    Irreducible f →\n      0 < p →\n        ∀ (n₁ n₂ : ℕ),\n          n₁ ≤ n₂ →\n            ∀ (g₁ : F[X]),\n              Separable g₁ →\n                ↑(expand F (p ^ n₁)) g₁ = f →\n                  ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\nhn : ¬n₁ ≤ n₂\ng₁ : F[X]\nhg₁ : Separable g₁\nHg₁ : ↑(expand F (p ^ n₁)) g₁ = f\ng₂ : F[X]\nhg₂ : Separable g₂\nHg₂ : ↑(expand F (p ^ n₂)) g₂ = f\n⊢ n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nsimpa only [eq_comm] using this p hf hp n₂ n₁ (le_of_not_le hn) g₂ hg₂ Hg₂ g₁ hg₁ Hg₁\n[GOAL]\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nhn : n₁ ≤ n₂\n⊢ ∀ (g₁ : F[X]),\n    Separable g₁ →\n      ↑(expand F (p ^ n₁)) g₁ = f → ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nhave hf0 : f ≠ 0 := hf.ne_zero\n[GOAL]\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nhn : n₁ ≤ n₂\nhf0 : f ≠ 0\n⊢ ∀ (g₁ : F[X]),\n    Separable g₁ →\n      ↑(expand F (p ^ n₁)) g₁ = f → ∀ (g₂ : F[X]), Separable g₂ → ↑(expand F (p ^ n₂)) g₂ = f → n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nintros g₁ hg₁ hgf₁ g₂ hg₂ hgf₂\n[GOAL]\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nhn : n₁ ≤ n₂\nhf0 : f ≠ 0\ng₁ : F[X]\nhg₁ : Separable g₁\nhgf₁ : ↑(expand F (p ^ n₁)) g₁ = f\ng₂ : F[X]\nhg₂ : Separable g₂\nhgf₂ : ↑(expand F (p ^ n₂)) g₂ = f\n⊢ n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nrw [le_iff_exists_add] at hn \n[GOAL]\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ n₂ : ℕ\nhn : ∃ c, n₂ = n₁ + c\nhf0 : f ≠ 0\ng₁ : F[X]\nhg₁ : Separable g₁\nhgf₁ : ↑(expand F (p ^ n₁)) g₁ = f\ng₂ : F[X]\nhg₂ : Separable g₂\nhgf₂ : ↑(expand F (p ^ n₂)) g₂ = f\n⊢ n₁ = n₂ ∧ g₁ = g₂\n[PROOFSTEP]\nrcases hn with ⟨k, rfl⟩\n[GOAL]\ncase intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ : ℕ\nhf0 : f ≠ 0\ng₁ : F[X]\nhg₁ : Separable g₁\nhgf₁ : ↑(expand F (p ^ n₁)) g₁ = f\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhgf₂ : ↑(expand F (p ^ (n₁ + k))) g₂ = f\n⊢ n₁ = n₁ + k ∧ g₁ = g₂\n[PROOFSTEP]\nrw [← hgf₁, pow_add, expand_mul, expand_inj (pow_pos hp n₁)] at hgf₂ \n[GOAL]\ncase intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ : ℕ\nhf0 : f ≠ 0\ng₁ : F[X]\nhg₁ : Separable g₁\nhgf₁ : ↑(expand F (p ^ n₁)) g₁ = f\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhgf₂ : ↑(expand F (p ^ k)) g₂ = g₁\n⊢ n₁ = n₁ + k ∧ g₁ = g₂\n[PROOFSTEP]\nsubst hgf₂\n[GOAL]\ncase intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nf : F[X]\nhf : Irreducible f\nhp : 0 < p\nn₁ : ℕ\nhf0 : f ≠ 0\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhg₁ : Separable (↑(expand F (p ^ k)) g₂)\nhgf₁ : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂) = f\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) g₂ = g₂\n[PROOFSTEP]\nsubst hgf₁\n[GOAL]\ncase intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhg₁ : Separable (↑(expand F (p ^ k)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂) ≠ 0\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) g₂ = g₂\n[PROOFSTEP]\nrcases isUnit_or_eq_zero_of_separable_expand p k hp hg₁ with (h | rfl)\n[GOAL]\ncase intro.inl\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhg₁ : Separable (↑(expand F (p ^ k)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂) ≠ 0\nh : IsUnit g₂\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) g₂ = g₂\n[PROOFSTEP]\nrw [isUnit_iff] at h \n[GOAL]\ncase intro.inl\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nk : ℕ\nhg₁ : Separable (↑(expand F (p ^ k)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) g₂) ≠ 0\nh : ∃ r, IsUnit r ∧ ↑C r = g₂\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) g₂ = g₂\n[PROOFSTEP]\nrcases h with ⟨r, hr, rfl⟩\n[GOAL]\ncase intro.inl.intro.intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ k : ℕ\nr : F\nhr : IsUnit r\nhg₂ : Separable (↑C r)\nhg₁ : Separable (↑(expand F (p ^ k)) (↑C r))\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) (↑C r)))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) (↑C r)) ≠ 0\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) (↑C r) = ↑C r\n[PROOFSTEP]\nsimp_rw [expand_C] at hf \n[GOAL]\ncase intro.inl.intro.intro\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ k : ℕ\nr : F\nhr : IsUnit r\nhg₂ : Separable (↑C r)\nhg₁ : Separable (↑(expand F (p ^ k)) (↑C r))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ k)) (↑C r)) ≠ 0\nhf : Irreducible (↑C r)\n⊢ n₁ = n₁ + k ∧ ↑(expand F (p ^ k)) (↑C r) = ↑C r\n[PROOFSTEP]\nexact absurd (isUnit_C.2 hr) hf.1\n[GOAL]\ncase intro.inr\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nhg₁ : Separable (↑(expand F (p ^ 0)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂) ≠ 0\n⊢ n₁ = n₁ + 0 ∧ ↑(expand F (p ^ 0)) g₂ = g₂\n[PROOFSTEP]\nrw [add_zero, pow_zero, expand_one]\n[GOAL]\ncase intro.inr\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nhg₁ : Separable (↑(expand F (p ^ 0)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂) ≠ 0\n⊢ n₁ = n₁ ∧ g₂ = g₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase intro.inr.left\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nhg₁ : Separable (↑(expand F (p ^ 0)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂) ≠ 0\n⊢ n₁ = n₁\n[PROOFSTEP]\nrfl\n[GOAL]\ncase intro.inr.right\nF✝ : Type u\ninst✝¹ : Field F✝\np✝ : ℕ\nF : Type u\ninst✝ : Field F\np : ℕ\nHF : CharP F p\nhp : 0 < p\nn₁ : ℕ\ng₂ : F[X]\nhg₂ : Separable g₂\nhg₁ : Separable (↑(expand F (p ^ 0)) g₂)\nhf : Irreducible (↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂))\nhf0 : ↑(expand F (p ^ n₁)) (↑(expand F (p ^ 0)) g₂) ≠ 0\n⊢ g₂ = g₂\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nn : ℕ\n⊢ Separable (X ^ n - 1) ↔ ↑n ≠ 0\n[PROOFSTEP]\nrefine' ⟨_, fun h => separable_X_pow_sub_C_unit 1 (IsUnit.mk0 (↑n) h)⟩\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nn : ℕ\n⊢ Separable (X ^ n - 1) → ↑n ≠ 0\n[PROOFSTEP]\nrw [separable_def', derivative_sub, derivative_X_pow, derivative_one, sub_zero]\n  -- Suppose `(n : F) = 0`, then the derivative is `0`, so `X ^ n - 1` is a unit, contradiction.\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nn : ℕ\n⊢ (∃ a b, a * (X ^ n - 1) + b * (↑C ↑n * X ^ (n - 1)) = 1) → ↑n ≠ 0\n[PROOFSTEP]\nrintro (h : IsCoprime _ _) hn'\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nn : ℕ\nh : IsCoprime (X ^ n - 1) (↑C ↑n * X ^ (n - 1))\nhn' : ↑n = 0\n⊢ False\n[PROOFSTEP]\nrw [hn', C_0, zero_mul, isCoprime_zero_right] at h \n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\nn : ℕ\nh : IsUnit (X ^ n - 1)\nhn' : ↑n = 0\n⊢ False\n[PROOFSTEP]\nexact not_isUnit_X_pow_sub_one F n h\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : Algebra F K\np : F[X]\nhsep : Separable p\nhsplit : Splits (algebraMap F K) p\n⊢ Fintype.card ↑(rootSet p K) = natDegree p\n[PROOFSTEP]\nsimp_rw [rootSet_def, Finset.coe_sort_coe, Fintype.card_coe]\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : Algebra F K\np : F[X]\nhsep : Separable p\nhsplit : Splits (algebraMap F K) p\n⊢ card (Multiset.toFinset (roots (map (algebraMap F K) p))) = natDegree p\n[PROOFSTEP]\nrw [Multiset.toFinset_card_of_nodup, ← natDegree_eq_card_roots hsplit]\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : Algebra F K\np : F[X]\nhsep : Separable p\nhsplit : Splits (algebraMap F K) p\n⊢ Multiset.Nodup (roots (map (algebraMap F K) p))\n[PROOFSTEP]\nexact nodup_roots hsep.map\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\n⊢ h = ↑C (leadingCoeff h) * (X - ↑C x)\n[PROOFSTEP]\nhave h_ne_zero : h ≠ 0 := by\n  rintro rfl\n  exact not_separable_zero h_sep\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\n⊢ h ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh_sep : Separable 0\nh_root : eval x 0 = 0\nh_splits : Splits i 0\nh_roots : ∀ (y : K), y ∈ roots (map i 0) → y = ↑i x\n⊢ False\n[PROOFSTEP]\nexact not_separable_zero h_sep\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ h = ↑C (leadingCoeff h) * (X - ↑C x)\n[PROOFSTEP]\napply Polynomial.eq_X_sub_C_of_splits_of_single_root i h_splits\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ roots (map i h) = {↑i x}\n[PROOFSTEP]\napply Finset.mk.inj\n[GOAL]\ncase x\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ { val := roots (map i h), nodup := ?nodup } = { val := {↑i x}, nodup := ?nodup }\n[PROOFSTEP]\nchange _ = {i x}\n[GOAL]\ncase x\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ { val := roots (map i h), nodup := ?nodup } = {↑i x}\n[PROOFSTEP]\nrw [Finset.eq_singleton_iff_unique_mem]\n[GOAL]\ncase x\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ ↑i x ∈ { val := roots (map i h), nodup := ?nodup } ∧\n    ∀ (x_1 : K), x_1 ∈ { val := roots (map i h), nodup := ?nodup } → x_1 = ↑i x\ncase nodup\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ Multiset.Nodup (roots (map i h))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase x.left\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ ↑i x ∈ { val := roots (map i h), nodup := ?nodup }\n[PROOFSTEP]\napply Finset.mem_mk.mpr\n[GOAL]\ncase x.left\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ ↑i x ∈ roots (map i h)\n[PROOFSTEP]\nrw [mem_roots (show h.map i ≠ 0 from map_ne_zero h_ne_zero)]\n[GOAL]\ncase x.left\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ IsRoot (map i h) (↑i x)\n[PROOFSTEP]\nrw [IsRoot.def, ← eval₂_eq_eval_map, eval₂_hom, h_root]\n[GOAL]\ncase x.left\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ ↑i 0 = 0\n[PROOFSTEP]\nexact RingHom.map_zero i\n[GOAL]\ncase nodup\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ Multiset.Nodup (roots (map i h))\n[PROOFSTEP]\nexact nodup_roots (Separable.map h_sep)\n[GOAL]\ncase x.right\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni : F →+* K\nx : F\nh : F[X]\nh_sep : Separable h\nh_root : eval x h = 0\nh_splits : Splits i h\nh_roots : ∀ (y : K), y ∈ roots (map i h) → y = ↑i x\nh_ne_zero : h ≠ 0\n⊢ ∀ (x_1 : K), x_1 ∈ { val := roots (map i h), nodup := (_ : Multiset.Nodup (roots (map i h))) } → x_1 = ↑i x\n[PROOFSTEP]\nexact h_roots\n[GOAL]\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\n⊢ ∃ s, map i f = ↑C (↑i (leadingCoeff f)) * ∏ a in s, (X - ↑C a)\n[PROOFSTEP]\nobtain ⟨s, h⟩ := (splits_iff_exists_multiset _).1 sp\n[GOAL]\ncase intro\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ ∃ s, map i f = ↑C (↑i (leadingCoeff f)) * ∏ a in s, (X - ↑C a)\n[PROOFSTEP]\nuse s.toFinset\n[GOAL]\ncase h\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ map i f = ↑C (↑i (leadingCoeff f)) * ∏ a in Multiset.toFinset s, (X - ↑C a)\n[PROOFSTEP]\nrw [h, Finset.prod_eq_multiset_prod, ← Multiset.toFinset_eq]\n[GOAL]\ncase h\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Multiset.Nodup s\n[PROOFSTEP]\napply nodup_of_separable_prod\n[GOAL]\ncase h.hs\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Separable (Multiset.prod (Multiset.map (fun a => X - ↑C a) s))\n[PROOFSTEP]\napply Separable.of_mul_right\n[GOAL]\ncase h.hs.h\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Separable (?h.hs.f * Multiset.prod (Multiset.map (fun a => X - ↑C a) s))\ncase h.hs.f\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ K[X]\n[PROOFSTEP]\nrw [← h]\n[GOAL]\ncase h.hs.h\nF : Type u\ninst✝¹ : Field F\nK : Type v\ninst✝ : Field K\ni✝ i : F →+* K\nf : F[X]\nsep : Separable f\nsp : Splits i f\ns : Multiset K\nh : map i f = ↑C (↑i (leadingCoeff f)) * Multiset.prod (Multiset.map (fun a => X - ↑C a) s)\n⊢ Separable (map i f)\n[PROOFSTEP]\nexact sep.map\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\n⊢ Separable f\n[PROOFSTEP]\nrw [separable_iff_derivative_ne_zero hf, Ne, ← degree_eq_bot, degree_derivative_eq]\n[GOAL]\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\n⊢ ¬↑(natDegree f - 1) = ⊥\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\n⊢ 0 < natDegree f\n[PROOFSTEP]\nrw [pos_iff_ne_zero, Ne, natDegree_eq_zero_iff_degree_le_zero, degree_le_zero_iff]\n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\n⊢ ¬f = ↑C (coeff f 0)\n[PROOFSTEP]\nrefine' fun hf1 => hf.not_unit _\n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\nhf1 : f = ↑C (coeff f 0)\n⊢ IsUnit f\n[PROOFSTEP]\nrw [hf1, isUnit_C, isUnit_iff_ne_zero]\n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\nhf1 : f = ↑C (coeff f 0)\n⊢ coeff f 0 ≠ 0\n[PROOFSTEP]\nintro hf2\n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\nhf1 : f = ↑C (coeff f 0)\nhf2 : coeff f 0 = 0\n⊢ False\n[PROOFSTEP]\nrw [hf2, C_0] at hf1 \n[GOAL]\ncase hp\nF : Type u\ninst✝² : Field F\nK : Type v\ninst✝¹ : Field K\ninst✝ : CharZero F\nf : F[X]\nhf : Irreducible f\nhf1 : f = 0\nhf2 : coeff f 0 = 0\n⊢ False\n[PROOFSTEP]\nexact absurd hf1 hf.ne_zero\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nx : F\n⊢ Separable (minpoly F x)\n[PROOFSTEP]\nrw [minpoly.eq_X_sub_C']\n[GOAL]\nF : Type u_1\ninst✝ : Field F\nx : F\n⊢ Separable (X - ↑C x)\n[PROOFSTEP]\nexact separable_X_sub_C\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field E\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsSeparable F E\nx : K\n⊢ IsIntegral F x ∧ Separable (minpoly F x)\n[PROOFSTEP]\nrefine' (isSeparable_iff.1 h (algebraMap K E x)).imp isIntegral_tower_bot_of_isIntegral_field fun hs => _\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field E\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsSeparable F E\nx : K\nhs : Separable (minpoly F (↑(algebraMap K E) x))\n⊢ Separable (minpoly F x)\n[PROOFSTEP]\nobtain ⟨q, hq⟩ := minpoly.dvd F x ((aeval_algebraMap_eq_zero_iff _ _ _).mp (minpoly.aeval F ((algebraMap K E) x)))\n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field E\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsSeparable F E\nx : K\nhs : Separable (minpoly F (↑(algebraMap K E) x))\nq : F[X]\nhq : minpoly F (↑(algebraMap K E) x) = minpoly F x * q\n⊢ Separable (minpoly F x)\n[PROOFSTEP]\nrw [hq] at hs \n[GOAL]\ncase intro\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁶ : Field F\ninst✝⁵ : Field K\ninst✝⁴ : Field E\ninst✝³ : Algebra F K\ninst✝² : Algebra F E\ninst✝¹ : Algebra K E\ninst✝ : IsScalarTower F K E\nh : IsSeparable F E\nx : K\nq : F[X]\nhs : Separable (minpoly F x * q)\nhq : minpoly F (↑(algebraMap K E) x) = minpoly F x * q\n⊢ Separable (minpoly F x)\n[PROOFSTEP]\nexact hs.of_mul_left\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁹ : Field F\ninst✝⁸ : Field K\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F K\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K E\ninst✝³ : IsScalarTower F K E\nE' : Type u_4\ninst✝² : Field E'\ninst✝¹ : Algebra F E'\nf : E →ₐ[F] E'\ninst✝ : IsSeparable F E'\n⊢ IsSeparable F E\n[PROOFSTEP]\nletI : Algebra E E' := RingHom.toAlgebra f.toRingHom\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁹ : Field F\ninst✝⁸ : Field K\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F K\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K E\ninst✝³ : IsScalarTower F K E\nE' : Type u_4\ninst✝² : Field E'\ninst✝¹ : Algebra F E'\nf : E →ₐ[F] E'\ninst✝ : IsSeparable F E'\nthis : Algebra E E' := RingHom.toAlgebra ↑f\n⊢ IsSeparable F E\n[PROOFSTEP]\nhaveI : IsScalarTower F E E' := IsScalarTower.of_algebraMap_eq fun x => (f.commutes x).symm\n[GOAL]\nF : Type u_1\nK : Type u_2\nE : Type u_3\ninst✝⁹ : Field F\ninst✝⁸ : Field K\ninst✝⁷ : Field E\ninst✝⁶ : Algebra F K\ninst✝⁵ : Algebra F E\ninst✝⁴ : Algebra K E\ninst✝³ : IsScalarTower F K E\nE' : Type u_4\ninst✝² : Field E'\ninst✝¹ : Algebra F E'\nf : E →ₐ[F] E'\ninst✝ : IsSeparable F E'\nthis✝ : Algebra E E' := RingHom.toAlgebra ↑f\nthis : IsScalarTower F E E'\n⊢ IsSeparable F E\n[PROOFSTEP]\nexact isSeparable_tower_bot_of_isSeparable F E E'\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁵ : CommRing S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K L\npb : PowerBasis K S\nh_sep : Separable (minpoly K pb.gen)\nh_splits : Splits (algebraMap K L) (minpoly K pb.gen)\n⊢ Fintype.card (S →ₐ[K] L) = pb.dim\n[PROOFSTEP]\nlet s := ((minpoly K pb.gen).map (algebraMap K L)).roots.toFinset\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁵ : CommRing S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K L\npb : PowerBasis K S\nh_sep : Separable (minpoly K pb.gen)\nh_splits : Splits (algebraMap K L) (minpoly K pb.gen)\ns : Finset L := Multiset.toFinset (roots (Polynomial.map (algebraMap K L) (minpoly K pb.gen)))\n⊢ Fintype.card (S →ₐ[K] L) = pb.dim\n[PROOFSTEP]\nlet _ := (PowerBasis.AlgHom.fintype pb : Fintype (S →ₐ[K] L))\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁵ : CommRing S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K L\npb : PowerBasis K S\nh_sep : Separable (minpoly K pb.gen)\nh_splits : Splits (algebraMap K L) (minpoly K pb.gen)\ns : Finset L := Multiset.toFinset (roots (Polynomial.map (algebraMap K L) (minpoly K pb.gen)))\nx✝ : Fintype (S →ₐ[K] L) := PowerBasis.AlgHom.fintype pb\n⊢ Fintype.card (S →ₐ[K] L) = pb.dim\n[PROOFSTEP]\nrw [Fintype.card_congr pb.liftEquiv', Fintype.card_of_subtype s (fun x => Multiset.mem_toFinset), ←\n  pb.natDegree_minpoly, natDegree_eq_card_roots h_splits, Multiset.toFinset_card_of_nodup]\n[GOAL]\nR : Type u_1\nS : Type u_2\nT : Type u_3\ninst✝⁵ : CommRing S\nK : Type u_4\nL : Type u_5\nF : Type u_6\ninst✝⁴ : Field K\ninst✝³ : Field L\ninst✝² : Field F\ninst✝¹ : Algebra K S\ninst✝ : Algebra K L\npb : PowerBasis K S\nh_sep : Separable (minpoly K pb.gen)\nh_splits : Splits (algebraMap K L) (minpoly K pb.gen)\ns : Finset L := Multiset.toFinset (roots (Polynomial.map (algebraMap K L) (minpoly K pb.gen)))\nx✝ : Fintype (S →ₐ[K] L) := PowerBasis.AlgHom.fintype pb\n⊢ Multiset.Nodup (roots (Polynomial.map (algebraMap K L) (minpoly K pb.gen)))\n[PROOFSTEP]\nexact nodup_roots ((separable_map (algebraMap K L)).mpr h_sep)\n", "meta": {"mathlib_filename": "Mathlib.FieldTheory.Separable", "llama_tokens": 33055, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526514141571, "lm_q2_score": 0.4571367168274948, "lm_q1q2_score": 0.2605005701429106}}
{"text": "[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ (f.op ≫ (inv f).op).unop = (𝟙 (op Y)).unop\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ ((inv f).op ≫ f.op).unop = (𝟙 (op X)).unop\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsIso f.op\n⊢ (f ≫ (inv f.op).unop).op = (𝟙 X).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsIso f.op\n⊢ ((inv f.op).unop ≫ f).op = (𝟙 Y).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ IsIso f.unop ↔ IsIso f\n[PROOFSTEP]\nrw [← isIso_op_iff f.unop, Quiver.Hom.op_unop]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ (inv f).op = inv f.op\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst : Category.{v₁, u₁} C\nX Y : C\nf : X ⟶ Y\ninst_1 : IsIso f\n⊢ f.op ≫ (inv f).op = 𝟙 (op Y)\n[PROOFSTEP]\nrw [← op_comp, IsIso.inv_hom_id, op_id]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nX Y : Cᵒᵖ\nf : X ⟶ Y\ninst✝ : IsIso f\n⊢ (inv f).unop = inv f.unop\n[PROOFSTEP]\naesop_cat_nonterminal\n[GOAL]\ncase hom_inv_id\nC : Type u₁\ninst : Category.{v₁, u₁} C\nX Y : Cᵒᵖ\nf : X ⟶ Y\ninst_1 : IsIso f\n⊢ f.unop ≫ (inv f).unop = 𝟙 Y.unop\n[PROOFSTEP]\nrw [← unop_comp, IsIso.inv_hom_id, unop_id]\n[GOAL]\nC : Type u₁\ninst✝² : Category.{v₁, u₁} C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\nF : C ⥤ D\ninst✝ : Faithful F\nX✝ Y✝ : Cᵒᵖ\na₁✝ a₂✝ : X✝ ⟶ Y✝\nh : F.op.map a₁✝ = F.op.map a₂✝\n⊢ a₁✝.unop = a₂✝.unop\n[PROOFSTEP]\nsimpa using map_injective F (Quiver.Hom.op_inj h)\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF : Cᵒᵖ ⥤ D\n⊢ F.rightOp.leftOp = F\n[PROOFSTEP]\ncases F\n[GOAL]\ncase mk\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ntoPrefunctor✝ : Cᵒᵖ ⥤q D\nmap_id✝ : ∀ (X : Cᵒᵖ), toPrefunctor✝.map (𝟙 X) = 𝟙 (toPrefunctor✝.obj X)\nmap_comp✝ :\n  ∀ {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z), toPrefunctor✝.map (f ≫ g) = toPrefunctor✝.map f ≫ toPrefunctor✝.map g\n⊢ (mk toPrefunctor✝).rightOp.leftOp = mk toPrefunctor✝\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ⟶ G\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ (G.op.map f ≫ (fun X => (app α X.unop).op) Y).unop = ((fun X => (app α X.unop).op) X ≫ F.op.map f).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ⟶ G\nX Y : C\nf : X ⟶ Y\n⊢ ((Functor.unop G).map f ≫ (fun X => (app α (op X)).unop) Y).op =\n    ((fun X => (app α (op X)).unop) X ≫ (Functor.unop F).map f).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ⟶ G.op\nX Y : C\nf : X ⟶ Y\n⊢ (G.map f ≫ (fun X => (app α (op X)).unop) Y).op = ((fun X => (app α (op X)).unop) X ≫ F.map f).op\n[PROOFSTEP]\nsimpa only [Functor.op_map] using (α.naturality f.op).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : Functor.unop F ⟶ Functor.unop G\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ (G.map f ≫ (fun X => (app α X.unop).op) Y).unop = ((fun X => (app α X.unop).op) X ≫ F.map f).unop\n[PROOFSTEP]\nsimpa only [Functor.unop_map] using (α.naturality f.unop).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ Dᵒᵖ\nα : F ⟶ G\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ (G.leftOp.map f ≫ (fun X => (app α X.unop).unop) Y).op = ((fun X => (app α X.unop).unop) X ≫ F.leftOp.map f).op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : C ⥤ Dᵒᵖ\nα : F.leftOp ⟶ G.leftOp\nX Y : C\nf : X ⟶ Y\n⊢ (G.map f ≫ (fun X => (app α (op X)).op) Y).unop = ((fun X => (app α (op X)).op) X ≫ F.map f).unop\n[PROOFSTEP]\nsimpa only [Functor.leftOp_map] using (α.naturality f.op).symm\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : Cᵒᵖ ⥤ D\nα : F ⟶ G\nX Y : C\nf : X ⟶ Y\n⊢ (G.rightOp.map f ≫ (fun X => (app α (op X)).op) Y).unop = ((fun X => (app α (op X)).op) X ≫ F.rightOp.map f).unop\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G H : Cᵒᵖ ⥤ D\nα : F.rightOp ⟶ G.rightOp\nX Y : Cᵒᵖ\nf : X ⟶ Y\n⊢ (G.map f ≫ (fun X => (app α X.unop).unop) Y).op = ((fun X => (app α X.unop).unop) X ≫ F.map f).op\n[PROOFSTEP]\nsimpa only [Functor.rightOp_map] using (α.naturality f.unop).symm\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ : C\nX Y : Cᵒᵖ\nf : X ≅ Y\n⊢ f.hom.unop ≫ f.inv.unop = 𝟙 Y.unop\n[PROOFSTEP]\nsimp only [← unop_comp, f.inv_hom_id, unop_id]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ : C\nX Y : Cᵒᵖ\nf : X ≅ Y\n⊢ f.inv.unop ≫ f.hom.unop = 𝟙 X.unop\n[PROOFSTEP]\nsimp only [← unop_comp, f.hom_inv_id, unop_id]\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ : C\nX Y : Cᵒᵖ\nf : X ≅ Y\n⊢ Iso.op (unop f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ : C\nX Y : Cᵒᵖ\nf : X ≅ Y\n⊢ (Iso.op (unop f)).hom = f.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ X Y : C\nf : X ≅ Y\n⊢ unop (Iso.op f) = f\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nX✝ Y✝ X Y : C\nf : X ≅ Y\n⊢ (unop (Iso.op f)).hom = f.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\n⊢ NatTrans.op α.hom ≫ NatTrans.op α.inv = 𝟙 G.op\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ NatTrans.app (NatTrans.op α.hom ≫ NatTrans.op α.inv) x✝ = NatTrans.app (𝟙 G.op) 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\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (NatTrans.app α.hom x✝.unop).op ≫ (NatTrans.app α.inv x✝.unop).op = 𝟙 (op (G.obj x✝.unop))\n[PROOFSTEP]\nrw [← op_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (NatTrans.app α.inv x✝.unop ≫ NatTrans.app α.hom x✝.unop).op = 𝟙 (op (G.obj x✝.unop))\n[PROOFSTEP]\nrw [α.inv_hom_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (𝟙 (G.obj x✝.unop)).op = 𝟙 (op (G.obj x✝.unop))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\n⊢ NatTrans.op α.inv ≫ NatTrans.op α.hom = 𝟙 F.op\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ NatTrans.app (NatTrans.op α.inv ≫ NatTrans.op α.hom) x✝ = NatTrans.app (𝟙 F.op) 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\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (NatTrans.app α.inv x✝.unop).op ≫ (NatTrans.app α.hom x✝.unop).op = 𝟙 (op (F.obj x✝.unop))\n[PROOFSTEP]\nrw [← op_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (NatTrans.app α.hom x✝.unop ≫ NatTrans.app α.inv x✝.unop).op = 𝟙 (op (F.obj x✝.unop))\n[PROOFSTEP]\nrw [α.hom_inv_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F ≅ G\nx✝ : Cᵒᵖ\n⊢ (𝟙 (F.obj x✝.unop)).op = 𝟙 (op (F.obj x✝.unop))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\n⊢ NatTrans.removeOp α.hom ≫ NatTrans.removeOp α.inv = 𝟙 G\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ NatTrans.app (NatTrans.removeOp α.hom ≫ NatTrans.removeOp α.inv) x✝ = NatTrans.app (𝟙 G) 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\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (NatTrans.app α.hom (op x✝)).unop ≫ (NatTrans.app α.inv (op x✝)).unop = 𝟙 (G.obj x✝)\n[PROOFSTEP]\nrw [← unop_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (NatTrans.app α.inv (op x✝) ≫ NatTrans.app α.hom (op x✝)).unop = 𝟙 (G.obj x✝)\n[PROOFSTEP]\nrw [α.inv_hom_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (𝟙 (G.op.obj (op x✝))).unop = 𝟙 (G.obj x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\n⊢ NatTrans.removeOp α.inv ≫ NatTrans.removeOp α.hom = 𝟙 F\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ NatTrans.app (NatTrans.removeOp α.inv ≫ NatTrans.removeOp α.hom) x✝ = NatTrans.app (𝟙 F) 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\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (NatTrans.app α.inv (op x✝)).unop ≫ (NatTrans.app α.hom (op x✝)).unop = 𝟙 (F.obj x✝)\n[PROOFSTEP]\nrw [← unop_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (NatTrans.app α.hom (op x✝) ≫ NatTrans.app α.inv (op x✝)).unop = 𝟙 (F.obj x✝)\n[PROOFSTEP]\nrw [α.hom_inv_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : C ⥤ D\nα : F.op ≅ G.op\nx✝ : C\n⊢ (𝟙 (F.op.obj (op x✝))).unop = 𝟙 (F.obj x✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\n⊢ NatTrans.unop α.hom ≫ NatTrans.unop α.inv = 𝟙 (Functor.unop G)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ NatTrans.app (NatTrans.unop α.hom ≫ NatTrans.unop α.inv) x✝ = NatTrans.app (𝟙 (Functor.unop G)) 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\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (NatTrans.app α.hom (op x✝)).unop ≫ (NatTrans.app α.inv (op x✝)).unop = 𝟙 (G.obj (op x✝)).unop\n[PROOFSTEP]\nrw [← unop_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (NatTrans.app α.inv (op x✝) ≫ NatTrans.app α.hom (op x✝)).unop = 𝟙 (G.obj (op x✝)).unop\n[PROOFSTEP]\nrw [α.inv_hom_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (𝟙 (G.obj (op x✝))).unop = 𝟙 (G.obj (op x✝)).unop\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\n⊢ NatTrans.unop α.inv ≫ NatTrans.unop α.hom = 𝟙 (Functor.unop F)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ NatTrans.app (NatTrans.unop α.inv ≫ NatTrans.unop α.hom) x✝ = NatTrans.app (𝟙 (Functor.unop F)) 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\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (NatTrans.app α.inv (op x✝)).unop ≫ (NatTrans.app α.hom (op x✝)).unop = 𝟙 (F.obj (op x✝)).unop\n[PROOFSTEP]\nrw [← unop_comp]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (NatTrans.app α.hom (op x✝) ≫ NatTrans.app α.inv (op x✝)).unop = 𝟙 (F.obj (op x✝)).unop\n[PROOFSTEP]\nrw [α.hom_inv_id_app]\n[GOAL]\ncase w.h\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF✝ G✝ : C ⥤ D\nF G : Cᵒᵖ ⥤ Dᵒᵖ\nα : F ≅ G\nx✝ : C\n⊢ (𝟙 (F.obj (op x✝))).unop = 𝟙 (F.obj (op x✝)).unop\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : Cᵒᵖ\n⊢ e.functor.op.map (NatTrans.app (NatIso.op e.unitIso).symm.hom X) ≫\n      NatTrans.app (NatIso.op e.counitIso).symm.hom (e.functor.op.obj X) =\n    𝟙 (e.functor.op.obj X)\n[PROOFSTEP]\napply Quiver.Hom.unop_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : Cᵒᵖ\n⊢ (e.functor.op.map (NatTrans.app (NatIso.op e.unitIso).symm.hom X) ≫\n        NatTrans.app (NatIso.op e.counitIso).symm.hom (e.functor.op.obj X)).unop =\n    (𝟙 (e.functor.op.obj X)).unop\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : C ≌ D\nX : Cᵒᵖ\n⊢ NatTrans.app e.counitIso.inv (e.functor.obj X.unop) ≫ e.functor.map (NatTrans.app e.unitIso.inv X.unop) =\n    𝟙 (e.functor.obj X.unop)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : Cᵒᵖ ≌ Dᵒᵖ\nX : C\n⊢ (Functor.unop e.functor).map (NatTrans.app (NatIso.unop e.unitIso).symm.hom X) ≫\n      NatTrans.app (NatIso.unop e.counitIso).symm.hom ((Functor.unop e.functor).obj X) =\n    𝟙 ((Functor.unop e.functor).obj X)\n[PROOFSTEP]\napply Quiver.Hom.op_inj\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : Cᵒᵖ ≌ Dᵒᵖ\nX : C\n⊢ ((Functor.unop e.functor).map (NatTrans.app (NatIso.unop e.unitIso).symm.hom X) ≫\n        NatTrans.app (NatIso.unop e.counitIso).symm.hom ((Functor.unop e.functor).obj X)).op =\n    (𝟙 ((Functor.unop e.functor).obj X)).op\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\ne : Cᵒᵖ ≌ Dᵒᵖ\nX : C\n⊢ NatTrans.app e.counitIso.inv (e.functor.obj (Opposite.op X)) ≫\n      e.functor.map (NatTrans.app e.unitIso.inv (Opposite.op X)) =\n    𝟙 (e.functor.obj (Opposite.op X))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nA B : Cᵒᵖ\nx✝ : A ≅ B\n⊢ (fun g => Iso.op g) ((fun f => Iso.unop f) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nA B : Cᵒᵖ\nx✝ : A ≅ B\n⊢ ((fun g => Iso.op g) ((fun f => Iso.unop f) x✝)).hom = x✝.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nA B : Cᵒᵖ\nx✝ : B.unop ≅ A.unop\n⊢ (fun f => Iso.unop f) ((fun g => Iso.op g) x✝) = x✝\n[PROOFSTEP]\next\n[GOAL]\ncase w\nC : Type u₁\ninst✝ : Category.{v₁, u₁} C\nA B : Cᵒᵖ\nx✝ : B.unop ≅ A.unop\n⊢ ((fun f => Iso.unop f) ((fun g => Iso.op g) x✝)).hom = x✝.hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\n⊢ ∀ {X Y : (C ⥤ D)ᵒᵖ} (f : X ⟶ Y),\n    (𝟭 (C ⥤ D)ᵒᵖ).map f ≫ ((fun F => Iso.op (opUnopIso F.unop)) Y).hom =\n      ((fun F => Iso.op (opUnopIso F.unop)) X).hom ≫ (opHom C D ⋙ opInv C D).map f\n[PROOFSTEP]\nintro F G f\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (C ⥤ D)ᵒᵖ\nf : F ⟶ G\n⊢ (𝟭 (C ⥤ D)ᵒᵖ).map f ≫ ((fun F => Iso.op (opUnopIso F.unop)) G).hom =\n    ((fun F => Iso.op (opUnopIso F.unop)) F).hom ≫ (opHom C D ⋙ opInv C D).map f\n[PROOFSTEP]\ndsimp [opUnopIso]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (C ⥤ D)ᵒᵖ\nf : F ⟶ G\n⊢ f ≫ (NatIso.ofComponents fun X => Iso.refl (G.unop.obj X)).hom.op =\n    (NatIso.ofComponents fun X => Iso.refl (F.unop.obj X)).hom.op ≫ (NatTrans.mk fun X => NatTrans.app f.unop X).op\n[PROOFSTEP]\nrw [show f = f.unop.op by simp, ← op_comp, ← op_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (C ⥤ D)ᵒᵖ\nf : F ⟶ G\n⊢ f = f.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (C ⥤ D)ᵒᵖ\nf : F ⟶ G\n⊢ ((NatIso.ofComponents fun X => Iso.refl (G.unop.obj X)).hom ≫ f.unop).op =\n    ((NatTrans.mk fun X => NatTrans.app f.unop.op.unop X) ≫\n        (NatIso.ofComponents fun X => Iso.refl (F.unop.obj X)).hom).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (C ⥤ D)ᵒᵖ\nf : F ⟶ G\n⊢ (NatIso.ofComponents fun X => Iso.refl (G.unop.obj X)).hom ≫ f.unop =\n    (NatTrans.mk fun X => NatTrans.app f.unop.op.unop X) ≫ (NatIso.ofComponents fun X => Iso.refl (F.unop.obj X)).hom\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\n⊢ ∀ {X Y : (Cᵒᵖ ⥤ D)ᵒᵖ} (f : X ⟶ Y),\n    (𝟭 (Cᵒᵖ ⥤ D)ᵒᵖ).map f ≫ ((fun F => Iso.op (rightOpLeftOpIso F.unop)) Y).hom =\n      ((fun F => Iso.op (rightOpLeftOpIso F.unop)) X).hom ≫\n        (mk { obj := fun F => F.unop.rightOp, map := fun {X Y} η => NatTrans.rightOp η.unop } ⋙\n              mk { obj := fun F => op F.leftOp, map := fun {X Y} η => (NatTrans.leftOp η).op }).map\n          f\n[PROOFSTEP]\nintro F G η\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (Cᵒᵖ ⥤ D)ᵒᵖ\nη : F ⟶ G\n⊢ (𝟭 (Cᵒᵖ ⥤ D)ᵒᵖ).map η ≫ ((fun F => Iso.op (rightOpLeftOpIso F.unop)) G).hom =\n    ((fun F => Iso.op (rightOpLeftOpIso F.unop)) F).hom ≫\n      (mk { obj := fun F => F.unop.rightOp, map := fun {X Y} η => NatTrans.rightOp η.unop } ⋙\n            mk { obj := fun F => op F.leftOp, map := fun {X Y} η => (NatTrans.leftOp η).op }).map\n        η\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (Cᵒᵖ ⥤ D)ᵒᵖ\nη : F ⟶ G\n⊢ η ≫ (rightOpLeftOpIso G.unop).hom.op =\n    (rightOpLeftOpIso F.unop).hom.op ≫ (NatTrans.leftOp (NatTrans.rightOp η.unop)).op\n[PROOFSTEP]\nrw [show η = η.unop.op by simp, ← op_comp, ← op_comp]\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (Cᵒᵖ ⥤ D)ᵒᵖ\nη : F ⟶ G\n⊢ η = η.unop.op\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (Cᵒᵖ ⥤ D)ᵒᵖ\nη : F ⟶ G\n⊢ ((rightOpLeftOpIso G.unop).hom ≫ η.unop).op =\n    (NatTrans.leftOp (NatTrans.rightOp η.unop.op.unop) ≫ (rightOpLeftOpIso F.unop).hom).op\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nC : Type u₁\ninst✝¹ : Category.{v₁, u₁} C\nD : Type u₂\ninst✝ : Category.{v₂, u₂} D\nF G : (Cᵒᵖ ⥤ D)ᵒᵖ\nη : F ⟶ G\n⊢ (rightOpLeftOpIso G.unop).hom ≫ η.unop =\n    NatTrans.leftOp (NatTrans.rightOp η.unop.op.unop) ≫ (rightOpLeftOpIso F.unop).hom\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Opposites", "llama_tokens": 11231, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5544704796847396, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.25993056361716305}}
{"text": "[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\n⊢ Function.LeftInverse\n    (fun γ =>\n      {\n        val :=\n          sheafifyLift J\n            (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n            (_ : Presheaf.IsSheaf J Y.val) })\n    fun η =>\n    {\n      val :=\n        ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n          (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) }\n[PROOFSTEP]\nintro η\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nη : (composeAndSheafify J G).obj X ⟶ Y\n⊢ (fun γ =>\n        {\n          val :=\n            sheafifyLift J\n              (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n              (_ : Presheaf.IsSheaf J Y.val) })\n      ((fun η =>\n          {\n            val :=\n              ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n                (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) })\n        η) =\n    η\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nη : (composeAndSheafify J G).obj X ⟶ Y\n⊢ ((fun γ =>\n          {\n            val :=\n              sheafifyLift J\n                (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n                (_ : Presheaf.IsSheaf J Y.val) })\n        ((fun η =>\n            {\n              val :=\n                ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n                  (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) })\n          η)).val =\n    η.val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nη : (composeAndSheafify J G).obj X ⟶ Y\n⊢ sheafifyLift J\n      (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val).symm\n        (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val) (toSheafify J (X.val ⋙ G) ≫ η.val)))\n      (_ : Presheaf.IsSheaf J Y.val) =\n    η.val\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nη : (composeAndSheafify J G).obj X ⟶ Y\n⊢ η.val =\n    sheafifyLift J\n      (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val).symm\n        (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val) (toSheafify J (X.val ⋙ G) ≫ η.val)))\n      (_ : Presheaf.IsSheaf J Y.val)\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase h.a\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nη : (composeAndSheafify J G).obj X ⟶ Y\n⊢ toSheafify J (X.val ⋙ G) ≫ η.val =\n    ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val).symm\n      (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val) (toSheafify J (X.val ⋙ G) ≫ η.val))\n[PROOFSTEP]\nrw [Equiv.symm_apply_apply]\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\n⊢ Function.RightInverse\n    (fun γ =>\n      {\n        val :=\n          sheafifyLift J\n            (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n            (_ : Presheaf.IsSheaf J Y.val) })\n    fun η =>\n    {\n      val :=\n        ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n          (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) }\n[PROOFSTEP]\nintro γ\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nγ : X ⟶ (sheafCompose J F).obj Y\n⊢ (fun η =>\n        {\n          val :=\n            ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n              (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) })\n      ((fun γ =>\n          {\n            val :=\n              sheafifyLift J\n                (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n                (_ : Presheaf.IsSheaf J Y.val) })\n        γ) =\n    γ\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nγ : X ⟶ (sheafCompose J F).obj Y\n⊢ ((fun η =>\n          {\n            val :=\n              ↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val)\n                (toSheafify J (((whiskeringRight Cᵒᵖ E D).obj G).obj ((sheafToPresheaf J E).obj X)) ≫ η.val) })\n        ((fun γ =>\n            {\n              val :=\n                sheafifyLift J\n                  (↑(Adjunction.homEquiv A ((sheafToPresheaf J E).obj X) Y.val).symm ((sheafToPresheaf J E).map γ))\n                  (_ : Presheaf.IsSheaf J Y.val) })\n          γ)).val =\n    γ.val\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX : Sheaf J E\nY : Sheaf J D\nA : (whiskeringRight Cᵒᵖ E D).obj G ⊣ (whiskeringRight Cᵒᵖ D E).obj F := Adjunction.whiskerRight Cᵒᵖ adj\nγ : X ⟶ (sheafCompose J F).obj Y\n⊢ ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val)\n      (toSheafify J (X.val ⋙ G) ≫\n        sheafifyLift J (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X.val Y.val).symm γ.val)\n          (_ : Presheaf.IsSheaf J Y.val)) =\n    γ.val\n[PROOFSTEP]\nrw [J.toSheafify_sheafifyLift, Equiv.apply_symm_apply]\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ ↑(composeEquiv J adj X'✝ Y✝).symm (f ≫ g) = (composeAndSheafify J G).map f ≫ ↑(composeEquiv J adj X✝ Y✝).symm g\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ (↑(composeEquiv J adj X'✝ Y✝).symm (f ≫ g)).val =\n    ((composeAndSheafify J G).map f ≫ ↑(composeEquiv J adj X✝ Y✝).symm g).val\n[PROOFSTEP]\ndsimp [composeEquiv]\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ sheafifyLift J (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X'✝.val Y✝.val).symm (f.val ≫ g.val))\n      (_ : Presheaf.IsSheaf J Y✝.val) =\n    sheafifyMap J (whiskerRight f.val G) ≫\n      sheafifyLift J (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n        (_ : Presheaf.IsSheaf J Y✝.val)\n[PROOFSTEP]\nrw [sheafifyMap_sheafifyLift]\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ sheafifyLift J (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X'✝.val Y✝.val).symm (f.val ≫ g.val))\n      (_ : Presheaf.IsSheaf J Y✝.val) =\n    sheafifyLift J\n      (whiskerRight f.val G ≫ ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n      (_ : Presheaf.IsSheaf J Y✝.val)\n[PROOFSTEP]\nerw [Adjunction.homEquiv_naturality_left_symm]\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ sheafifyLift J\n      (((whiskeringRight Cᵒᵖ E D).obj G).map f.val ≫\n        ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n      (_ : Presheaf.IsSheaf J Y✝.val) =\n    sheafifyLift J\n      (whiskerRight f.val G ≫ ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n      (_ : Presheaf.IsSheaf J Y✝.val)\n[PROOFSTEP]\nrw [whiskeringRight_obj_map]\n[GOAL]\ncase h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX'✝ X✝ : Sheaf J E\nY✝ : Sheaf J D\nf : X'✝ ⟶ X✝\ng : X✝ ⟶ (sheafCompose J F).obj Y✝\n⊢ sheafifyLift J\n      (whiskerRight f.val G ≫ ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n      (_ : Presheaf.IsSheaf J Y✝.val) =\n    sheafifyLift J\n      (whiskerRight f.val G ≫ ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val).symm g.val)\n      (_ : Presheaf.IsSheaf J Y✝.val)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX✝ : Sheaf J E\nY✝ Y'✝ : Sheaf J D\nf : (composeAndSheafify J G).obj X✝ ⟶ Y✝\ng : Y✝ ⟶ Y'✝\n⊢ ↑(composeEquiv J adj X✝ Y'✝) (f ≫ g) = ↑(composeEquiv J adj X✝ Y✝) f ≫ (sheafCompose J F).map g\n[PROOFSTEP]\next\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX✝ : Sheaf J E\nY✝ Y'✝ : Sheaf J D\nf : (composeAndSheafify J G).obj X✝ ⟶ Y✝\ng : Y✝ ⟶ Y'✝\nx✝ : Cᵒᵖ\n⊢ NatTrans.app (↑(composeEquiv J adj X✝ Y'✝) (f ≫ g)).val x✝ =\n    NatTrans.app (↑(composeEquiv J adj X✝ Y✝) f ≫ (sheafCompose J F).map g).val x✝\n[PROOFSTEP]\ndsimp [composeEquiv]\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX✝ : Sheaf J E\nY✝ Y'✝ : Sheaf J D\nf : (composeAndSheafify J G).obj X✝ ⟶ Y✝\ng : Y✝ ⟶ Y'✝\nx✝ : Cᵒᵖ\n⊢ NatTrans.app\n      (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y'✝.val)\n        (toSheafify J (X✝.val ⋙ G) ≫ f.val ≫ g.val))\n      x✝ =\n    NatTrans.app\n        (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) X✝.val Y✝.val) (toSheafify J (X✝.val ⋙ G) ≫ f.val))\n        x✝ ≫\n      F.map (NatTrans.app g.val x✝)\n[PROOFSTEP]\nerw [Adjunction.homEquiv_unit, Adjunction.homEquiv_unit]\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX✝ : Sheaf J E\nY✝ Y'✝ : Sheaf J D\nf : (composeAndSheafify J G).obj X✝ ⟶ Y✝\ng : Y✝ ⟶ Y'✝\nx✝ : Cᵒᵖ\n⊢ NatTrans.app\n      (NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit X✝.val ≫\n        ((whiskeringRight Cᵒᵖ D E).obj F).map (toSheafify J (X✝.val ⋙ G) ≫ f.val ≫ g.val))\n      x✝ =\n    NatTrans.app\n        (NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit X✝.val ≫\n          ((whiskeringRight Cᵒᵖ D E).obj F).map (toSheafify J (X✝.val ⋙ G) ≫ f.val))\n        x✝ ≫\n      F.map (NatTrans.app g.val x✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.w.h\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nadj : G ⊣ F\nX✝ : Sheaf J E\nY✝ Y'✝ : Sheaf J D\nf : (composeAndSheafify J G).obj X✝ ⟶ Y✝\ng : Y✝ ⟶ Y'✝\nx✝ : Cᵒᵖ\n⊢ NatTrans.app (NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit X✝.val) x✝ ≫\n      F.map (NatTrans.app (toSheafify J (X✝.val ⋙ G)) x✝ ≫ NatTrans.app f.val x✝ ≫ NatTrans.app g.val x✝) =\n    (NatTrans.app (NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit X✝.val) x✝ ≫\n        F.map (NatTrans.app (toSheafify J (X✝.val ⋙ G)) x✝ ≫ NatTrans.app f.val x✝)) ≫\n      F.map (NatTrans.app g.val x✝)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nY : SheafOfTypes J\n⊢ (NatTrans.app (adjunctionToTypes J adj).unit Y).val =\n    NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit ((sheafOfTypesToPresheaf J).obj Y) ≫\n      whiskerRight\n        (toSheafify J (((whiskeringRight Cᵒᵖ (Type (max v u)) D).obj G).obj ((sheafOfTypesToPresheaf J).obj Y)))\n        (forget D)\n[PROOFSTEP]\ndsimp [adjunctionToTypes, Adjunction.comp]\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nY : SheafOfTypes J\n⊢ (NatTrans.app (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).unit Y).val ≫\n      (NatTrans.app (adjunction J adj).unit ((sheafEquivSheafOfTypes J).inverse.obj Y)).val ≫\n        𝟙 (sheafify J (Y.val ⋙ G) ⋙ forget D) =\n    NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit Y.val ≫ whiskerRight (toSheafify J (Y.val ⋙ G)) (forget D)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nY : SheafOfTypes J\n⊢ (NatTrans.app (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).unit Y).val ≫\n      ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) Y.val (sheafify J (Y.val ⋙ G)))\n        (toSheafify J (Y.val ⋙ G)) =\n    NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).unit Y.val ≫ whiskerRight (toSheafify J (Y.val ⋙ G)) (forget D)\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\n⊢ (NatTrans.app (adjunctionToTypes J adj).counit X).val =\n    sheafifyLift J\n      ((Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1)\n      (_ : Presheaf.IsSheaf J X.val)\n[PROOFSTEP]\napply J.sheafifyLift_unique\n[GOAL]\ncase a\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\n⊢ toSheafify J\n        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj\n          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫\n      (NatTrans.app (adjunctionToTypes J adj).counit X).val =\n    (Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1\n[PROOFSTEP]\ndsimp only [adjunctionToTypes, Adjunction.comp, NatTrans.comp_app, instCategorySheaf_comp_val, instCategorySheaf_id_val]\n[GOAL]\ncase a\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\n⊢ toSheafify J\n        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj\n          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫\n      (NatTrans.app\n            (Functor.associator (sheafCompose J (forget D)) (Equivalence.symm (sheafEquivSheafOfTypes J)).inverse\n                ((Equivalence.symm (sheafEquivSheafOfTypes J)).functor ⋙ composeAndSheafify J G)).hom\n            X).val ≫\n        (NatTrans.app\n              (whiskerLeft (sheafCompose J (forget D))\n                (whiskerRight (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).counit\n                  (composeAndSheafify J G)))\n              X).val ≫\n          (NatTrans.app (adjunction J adj).counit X).val =\n    (Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1\n[PROOFSTEP]\nrw [adjunction_counit_app_val]\n[GOAL]\ncase a\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\n⊢ toSheafify J\n        (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj\n          ((sheafToPresheaf J (Type (max u v))).obj ((sheafEquivSheafOfTypes J).inverse.obj ((sheafForget J).obj X)))) ≫\n      (NatTrans.app\n            (Functor.associator (sheafCompose J (forget D)) (Equivalence.symm (sheafEquivSheafOfTypes J)).inverse\n                ((Equivalence.symm (sheafEquivSheafOfTypes J)).functor ⋙ composeAndSheafify J G)).hom\n            X).val ≫\n        (NatTrans.app\n              (whiskerLeft (sheafCompose J (forget D))\n                (whiskerRight (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).counit\n                  (composeAndSheafify J G)))\n              X).val ≫\n          sheafifyLift J\n            (↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm\n              (𝟙 (X.val ⋙ forget D)))\n            (_ : Presheaf.IsSheaf J X.val) =\n    (Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1\n[PROOFSTEP]\nerw [Category.id_comp, J.sheafifyMap_sheafifyLift, J.toSheafify_sheafifyLift]\n[GOAL]\ncase a\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\n⊢ ((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).map\n        ((sheafToPresheaf J (Type (max u v))).map\n          (NatTrans.app (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).counit\n            ((sheafCompose J (forget D)).obj X))) ≫\n      ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm (𝟙 (X.val ⋙ forget D)) =\n    (Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1\n[PROOFSTEP]\next\n[GOAL]\ncase a.w.h.w\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\nx✝¹ : Cᵒᵖ\nx✝ :\n  (forget D).obj\n    ((((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj\n          ((sheafToPresheaf J (Type (max u v))).obj\n            (((Equivalence.symm (sheafEquivSheafOfTypes J)).inverse ⋙\n                  (Equivalence.symm (sheafEquivSheafOfTypes J)).functor).obj\n              ((sheafCompose J (forget D)).obj X)))).obj\n      x✝¹)\n⊢ ↑(NatTrans.app\n          (((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).map\n              ((sheafToPresheaf J (Type (max u v))).map\n                (NatTrans.app (Equivalence.toAdjunction (Equivalence.symm (sheafEquivSheafOfTypes J))).counit\n                  ((sheafCompose J (forget D)).obj X))) ≫\n            ↑(Adjunction.homEquiv (Adjunction.whiskerRight Cᵒᵖ adj) (X.val ⋙ forget D) X.val).symm\n              (𝟙 (X.val ⋙ forget D)))\n          x✝¹)\n      x✝ =\n    ↑(NatTrans.app\n          ((Functor.associator X.1 (forget D) G).hom ≫ NatTrans.app (Adjunction.whiskerRight Cᵒᵖ adj).counit X.1) x✝¹)\n      x✝\n[PROOFSTEP]\ndsimp [sheafEquivSheafOfTypes, Equivalence.symm, Equivalence.toAdjunction, NatIso.ofComponents, Adjunction.whiskerRight,\n  Adjunction.mkOfUnitCounit]\n[GOAL]\ncase a.w.h.w\nC : Type u\ninst✝⁹ : Category.{v, u} C\nJ : GrothendieckTopology C\nD : Type w₁\ninst✝⁸ : Category.{max v u, w₁} D\nE : Type w₂\ninst✝⁷ : Category.{max v u, w₂} E\nF : D ⥤ E\nG✝ : E ⥤ D\ninst✝⁶ : (X : C) → (S : Cover J X) → (P : Cᵒᵖ ⥤ D) → PreservesLimit (MulticospanIndex.multicospan (Cover.index S P)) F\ninst✝⁵ : ConcreteCategory D\ninst✝⁴ : PreservesLimits (forget D)\ninst✝³ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)\ninst✝² : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D\ninst✝¹ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)\ninst✝ : ReflectsIsomorphisms (forget D)\nG : Type (max v u) ⥤ D\nadj : G ⊣ forget D\nX : Sheaf J D\nx✝¹ : Cᵒᵖ\nx✝ :\n  (forget D).obj\n    ((((whiskeringRight Cᵒᵖ (Type (max u v)) D).obj G).obj\n          ((sheafToPresheaf J (Type (max u v))).obj\n            (((Equivalence.symm (sheafEquivSheafOfTypes J)).inverse ⋙\n                  (Equivalence.symm (sheafEquivSheafOfTypes J)).functor).obj\n              ((sheafCompose J (forget D)).obj X)))).obj\n      x✝¹)\n⊢ ↑(G.map (𝟙 ((forget D).obj (X.val.obj x✝¹))) ≫\n          G.map (𝟙 ((forget D).obj (X.val.obj x✝¹))) ≫\n            𝟙 (G.obj ((forget D).obj (X.val.obj x✝¹))) ≫ NatTrans.app adj.counit (X.val.obj x✝¹) ≫ 𝟙 (X.val.obj x✝¹))\n      x✝ =\n    ↑(𝟙 (G.obj ((forget D).obj (X.1.obj x✝¹))) ≫\n          𝟙 (G.obj ((forget D).obj (X.1.obj x✝¹))) ≫ NatTrans.app adj.counit (X.1.obj x✝¹) ≫ 𝟙 (X.val.obj x✝¹))\n      x✝\n[PROOFSTEP]\nsimp\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Sites.Adjunction", "llama_tokens": 18319, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.6619228758499942, "lm_q2_score": 0.39233683016710835, "lm_q1q2_score": 0.25969672292608315}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\n⊢ EventuallyConst f l ↔ ∃ x, Tendsto f l (pure x)\n[PROOFSTEP]\nsimp_rw [EventuallyConst, EventuallyEq, tendsto_pure]\n[GOAL]\nα : Type u_1\nβ : Sort ?u.805\nl : Filter α\nf : α → β\np : α → Prop\n⊢ EventuallyConst p l ↔ (p =ᶠ[l] fun x => False) ∨ p =ᶠ[l] fun x => True\n[PROOFSTEP]\nsimp only [EventuallyConst, Prop.exists_iff]\n[GOAL]\nα : Type u_1\nβ : Sort ?u.958\nl : Filter α\nf : α → β\np : α → Prop\n⊢ EventuallyConst p l ↔ (∀ᶠ (x : α) in l, p x) ∨ ∀ᶠ (x : α) in l, ¬p x\n[PROOFSTEP]\nsimp [eventuallyConst_pred', or_comm, EventuallyEq]\n[GOAL]\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : Nonempty β\n⊢ EventuallyConst f ⊥\n[PROOFSTEP]\nsimp [EventuallyConst, EventuallyEq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : Subsingleton α\ninst✝ : Nonempty β\n⊢ EventuallyConst f l\n[PROOFSTEP]\nrcases isEmpty_or_nonempty α with h | h\n[GOAL]\ncase inl\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : Subsingleton α\ninst✝ : Nonempty β\nh : IsEmpty α\n⊢ EventuallyConst f l\n[PROOFSTEP]\nsimp only [l.filter_eq_bot_of_isEmpty, EventuallyConst.bot]\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : Subsingleton α\ninst✝ : Nonempty β\nh : Nonempty α\n⊢ EventuallyConst f l\n[PROOFSTEP]\ninhabit α\n[GOAL]\ncase inr\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : Subsingleton α\ninst✝ : Nonempty β\nh : Nonempty α\ninhabited_h : Inhabited α\n⊢ EventuallyConst f l\n[PROOFSTEP]\nrefine ⟨f default, eventually_of_forall fun x ↦ congr_arg f <| Subsingleton.elim _ _⟩\n[GOAL]\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nh : EventuallyConst (mulIndicator s fun x => c) l\n⊢ EventuallyConst s l\n[PROOFSTEP]\nrw [eventuallyConst_set]\n[GOAL]\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nh : EventuallyConst (mulIndicator s fun x => c) l\n⊢ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, ¬x ∈ s\n[PROOFSTEP]\nrcases h with ⟨d, hd⟩\n[GOAL]\ncase intro\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nd : β\nhd : (mulIndicator s fun x => c) =ᶠ[l] fun x => d\n⊢ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, ¬x ∈ s\n[PROOFSTEP]\nrcases eq_or_ne d 1 with rfl | hd₁\n[GOAL]\ncase intro.inl\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nhd : (mulIndicator s fun x => c) =ᶠ[l] fun x => 1\n⊢ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, ¬x ∈ s\n[PROOFSTEP]\nrefine .inr <| hd.mono fun x hx ↦ ?_\n[GOAL]\ncase intro.inl\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nhd : (mulIndicator s fun x => c) =ᶠ[l] fun x => 1\nx : α\nhx : mulIndicator s (fun x => c) x = (fun x => 1) x\n⊢ ¬x ∈ s\n[PROOFSTEP]\nsimpa only [mulIndicator_apply_eq_one, hc] using hx\n[GOAL]\ncase intro.inr\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nd : β\nhd : (mulIndicator s fun x => c) =ᶠ[l] fun x => d\nhd₁ : d ≠ 1\n⊢ (∀ᶠ (x : α) in l, x ∈ s) ∨ ∀ᶠ (x : α) in l, ¬x ∈ s\n[PROOFSTEP]\nrefine .inl <| hd.mono fun x hx ↦ ?_\n[GOAL]\ncase intro.inr\nα : Type u_2\nβ : Type u_1\nl : Filter α\nf : α → β\ninst✝ : One β\ns : Set α\nc : β\nhc : c ≠ 1\nd : β\nhd : (mulIndicator s fun x => c) =ᶠ[l] fun x => d\nhd₁ : d ≠ 1\nx : α\nhx : mulIndicator s (fun x => c) x = (fun x => d) x\n⊢ x ∈ s\n[PROOFSTEP]\nsimpa [hc] using ne_of_eq_of_ne hx hd₁\n[GOAL]\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\n⊢ EventuallyConst f atTop ↔ ∃ i, ∀ (j : α), i ≤ j → f j = f i\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\n⊢ EventuallyConst f atTop → ∃ i, ∀ (j : α), i ≤ j → f j = f i\n[PROOFSTEP]\nrintro ⟨c, hc⟩\n[GOAL]\ncase mp.intro\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\nc : β\nhc : f =ᶠ[atTop] fun x => c\n⊢ ∃ i, ∀ (j : α), i ≤ j → f j = f i\n[PROOFSTEP]\nrcases eventually_atTop.1 hc with ⟨i, hi⟩\n[GOAL]\ncase mp.intro.intro\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\nc : β\nhc : f =ᶠ[atTop] fun x => c\ni : α\nhi : ∀ (b : α), b ≥ i → f b = (fun x => c) b\n⊢ ∃ i, ∀ (j : α), i ≤ j → f j = f i\n[PROOFSTEP]\nexact ⟨i, fun j hj ↦ (hi j hj).trans (hi i le_rfl).symm⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\n⊢ (∃ i, ∀ (j : α), i ≤ j → f j = f i) → EventuallyConst f atTop\n[PROOFSTEP]\nrintro ⟨i, hi⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nl : Filter α\nf : α → β\ninst✝¹ : SemilatticeSup α\ninst✝ : Nonempty α\ni : α\nhi : ∀ (j : α), i ≤ j → f j = f i\n⊢ EventuallyConst f atTop\n[PROOFSTEP]\nexact ⟨f i, eventually_atTop.2 ⟨i, hi⟩⟩\n[GOAL]\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\n⊢ EventuallyConst f atTop ↔ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\n[PROOFSTEP]\nrw [eventuallyConst_atTop]\n[GOAL]\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\n⊢ (∃ i, ∀ (j : ℕ), i ≤ j → f j = f i) ↔ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\n[PROOFSTEP]\nrefine exists_congr fun n ↦ ⟨fun h m hm ↦ ?_, fun h m hm ↦ ?_⟩\n[GOAL]\ncase refine_1\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (j : ℕ), n ≤ j → f j = f n\nm : ℕ\nhm : n ≤ m\n⊢ f (m + 1) = f m\n[PROOFSTEP]\nexact (h (m + 1) (hm.trans m.le_succ)).trans (h m hm).symm\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm : ℕ\nhm : n ≤ m\n⊢ f m = f n\n[PROOFSTEP]\ninduction m, hm using Nat.le_induction with\n| base => rfl\n| succ m hm ihm => exact (h m hm).trans ihm\n[GOAL]\ncase refine_2\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm : ℕ\nhm : n ≤ m\n⊢ f m = f n\n[PROOFSTEP]\ninduction m, hm using Nat.le_induction with\n| base => rfl\n| succ m hm ihm => exact (h m hm).trans ihm\n[GOAL]\ncase refine_2.base\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm : ℕ\n⊢ f n = f n\n[PROOFSTEP]\n\n| base => rfl\n[GOAL]\ncase refine_2.base\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm : ℕ\n⊢ f n = f n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase refine_2.succ\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm✝ m : ℕ\nhm : n ≤ m\nihm : f m = f n\n⊢ f (m + 1) = f n\n[PROOFSTEP]\n\n| succ m hm ihm => exact (h m hm).trans ihm\n[GOAL]\ncase refine_2.succ\nα : Type u_1\nβ : Sort ?u.10621\nl : Filter α\nf✝ : α → β\nf : ℕ → α\nn : ℕ\nh : ∀ (m : ℕ), n ≤ m → f (m + 1) = f m\nm✝ m : ℕ\nhm : n ≤ m\nihm : f m = f n\n⊢ f (m + 1) = f n\n[PROOFSTEP]\nexact (h m hm).trans ihm\n", "meta": {"mathlib_filename": "Mathlib.Order.Filter.EventuallyConst", "llama_tokens": 3678, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.531209388216861, "lm_q2_score": 0.4882833952958347, "lm_q1q2_score": 0.2593807236915521}}
{"text": "[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ Injective boxes\n[PROOFSTEP]\nrintro ⟨s₁, h₁, h₁'⟩ ⟨s₂, h₂, h₂'⟩ (rfl : s₁ = s₂)\n[GOAL]\ncase mk.mk\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\ns₁ : Finset (Box ι)\nh₁ : ∀ (J : Box ι), J ∈ s₁ → J ≤ I\nh₁' : Set.Pairwise (↑s₁) (Disjoint on Box.toSet)\nh₂ : ∀ (J : Box ι), J ∈ s₁ → J ≤ I\nh₂' : Set.Pairwise (↑s₁) (Disjoint on Box.toSet)\n⊢ { boxes := s₁, le_of_mem' := h₁, pairwiseDisjoint := h₁' } =\n    { boxes := s₁, le_of_mem' := h₂, pairwiseDisjoint := h₂' }\n[PROOFSTEP]\nrfl\n[GOAL]\nι : Type u_1\nI✝ J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I✝\nx : ι → ℝ\nI J : Box ι\nh : J ≤ I\n⊢ ∀ (J_1 : Box ι), J_1 ∈ {J} → J_1 ≤ I\n[PROOFSTEP]\nsimpa\n[GOAL]\nι : Type u_1\nI✝ J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I✝\nx : ι → ℝ\nI J : Box ι\nh : J ≤ I\n⊢ Set.Pairwise (↑{J}) (Disjoint on Box.toSet)\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ ∀ (a b : Prepartition I), a ≤ b → b ≤ a → a = b\n[PROOFSTEP]\nsuffices : ∀ {π₁ π₂ : Prepartition I}, π₁ ≤ π₂ → π₂ ≤ π₁ → π₁.boxes ⊆ π₂.boxes\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nthis : ∀ {π₁ π₂ : Prepartition I}, π₁ ≤ π₂ → π₂ ≤ π₁ → π₁.boxes ⊆ π₂.boxes\n⊢ ∀ (a b : Prepartition I), a ≤ b → b ≤ a → a = b\ncase this\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ ∀ {π₁ π₂ : Prepartition I}, π₁ ≤ π₂ → π₂ ≤ π₁ → π₁.boxes ⊆ π₂.boxes\n[PROOFSTEP]\nexact fun π₁ π₂ h₁ h₂ => injective_boxes (Subset.antisymm (this h₁ h₂) (this h₂ h₁))\n[GOAL]\ncase this\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ ∀ {π₁ π₂ : Prepartition I}, π₁ ≤ π₂ → π₂ ≤ π₁ → π₁.boxes ⊆ π₂.boxes\n[PROOFSTEP]\nintro π₁ π₂ h₁ h₂ J hJ\n[GOAL]\ncase this\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\n⊢ J ∈ π₂.boxes\n[PROOFSTEP]\nrcases h₁ hJ with ⟨J', hJ', hle⟩\n[GOAL]\ncase this.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\n⊢ J ∈ π₂.boxes\n[PROOFSTEP]\nrcases h₂ hJ' with ⟨J'', hJ'', hle'⟩\n[GOAL]\ncase this.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\nJ'' : Box ι\nhJ'' : J'' ∈ π₁\nhle' : J' ≤ J''\n⊢ J ∈ π₂.boxes\n[PROOFSTEP]\nobtain rfl : J = J''\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\nJ'' : Box ι\nhJ'' : J'' ∈ π₁\nhle' : J' ≤ J''\n⊢ J = J''\ncase this.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\nhJ'' : J ∈ π₁\nhle' : J' ≤ J\n⊢ J ∈ π₂.boxes\n[PROOFSTEP]\nexact π₁.eq_of_le hJ hJ'' (hle.trans hle')\n[GOAL]\ncase this.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\nhJ'' : J ∈ π₁\nhle' : J' ≤ J\n⊢ J ∈ π₂.boxes\n[PROOFSTEP]\nobtain rfl : J' = J\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ : Box ι\nhJ : J ∈ π₁.boxes\nJ' : Box ι\nhJ' : J' ∈ π₂\nhle : J ≤ J'\nhJ'' : J ∈ π₁\nhle' : J' ≤ J\n⊢ J' = J\ncase this.intro.intro.intro.intro\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ' : Box ι\nhJ' : J' ∈ π₂\nhJ : J' ∈ π₁.boxes\nhle : J' ≤ J'\nhJ'' : J' ∈ π₁\nhle' : J' ≤ J'\n⊢ J' ∈ π₂.boxes\n[PROOFSTEP]\nexact le_antisymm ‹_› ‹_›\n[GOAL]\ncase this.intro.intro.intro.intro\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπ₁ π₂ : Prepartition I\nh₁ : π₁ ≤ π₂\nh₂ : π₂ ≤ π₁\nJ' : Box ι\nhJ' : J' ∈ π₂\nhJ : J' ∈ π₁.boxes\nhle : J' ≤ J'\nhJ'' : J' ∈ π₁\nhle' : J' ≤ J'\n⊢ J' ∈ π₂.boxes\n[PROOFSTEP]\nassumption\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπ : Prepartition I\nJ : Box ι\nhJ : J ∈ π\n⊢ I ∈ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\n⊢ InjOn (fun J => {i | Box.lower J i = x i}) {J | J ∈ π ∧ x ∈ ↑Box.Icc J}\n[PROOFSTEP]\nrintro J₁ ⟨h₁, hx₁⟩ J₂ ⟨h₂, hx₂⟩ (H : {i | J₁.lower i = x i} = {i | J₂.lower i = x i})\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\nH : {i | Box.lower J₁ i = x i} = {i | Box.lower J₂ i = x i}\n⊢ J₁ = J₂\n[PROOFSTEP]\nsuffices ∀ i, (Ioc (J₁.lower i) (J₁.upper i) ∩ Ioc (J₂.lower i) (J₂.upper i)).Nonempty\n  by\n  choose y hy₁ hy₂ using this\n  exact π.eq_of_mem_of_mem h₁ h₂ hy₁ hy₂\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\nH : {i | Box.lower J₁ i = x i} = {i | Box.lower J₂ i = x i}\nthis : ∀ (i : ι), Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n⊢ J₁ = J₂\n[PROOFSTEP]\nchoose y hy₁ hy₂ using this\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\nH : {i | Box.lower J₁ i = x i} = {i | Box.lower J₂ i = x i}\ny : ι → ℝ\nhy₁ : ∀ (i : ι), y i ∈ Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i)\nhy₂ : ∀ (i : ι), y i ∈ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i)\n⊢ J₁ = J₂\n[PROOFSTEP]\nexact π.eq_of_mem_of_mem h₁ h₂ hy₁ hy₂\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\nH : {i | Box.lower J₁ i = x i} = {i | Box.lower J₂ i = x i}\n⊢ ∀ (i : ι), Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\nH : {i | Box.lower J₁ i = x i} = {i | Box.lower J₂ i = x i}\ni : ι\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nsimp only [Set.ext_iff, mem_setOf] at H \n[GOAL]\ncase intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\ncases' (hx₁.1 i).eq_or_lt with hi₁ hi₁\n[GOAL]\ncase intro.intro.inl\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nhave hi₂ : J₂.lower i = x i := (H _).1 hi₁\n[GOAL]\ncase intro.intro.inl\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nhave H₁ : x i < J₁.upper i := by simpa only [hi₁] using J₁.lower_lt_upper i\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\n⊢ x i < Box.upper J₁ i\n[PROOFSTEP]\nsimpa only [hi₁] using J₁.lower_lt_upper i\n[GOAL]\ncase intro.intro.inl\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\nH₁ : x i < Box.upper J₁ i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nhave H₂ : x i < J₂.upper i := by simpa only [hi₂] using J₂.lower_lt_upper i\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\nH₁ : x i < Box.upper J₁ i\n⊢ x i < Box.upper J₂ i\n[PROOFSTEP]\nsimpa only [hi₂] using J₂.lower_lt_upper i\n[GOAL]\ncase intro.intro.inl\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\nH₁ : x i < Box.upper J₁ i\nH₂ : x i < Box.upper J₂ i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nrw [Ioc_inter_Ioc, hi₁, hi₂, sup_idem, Set.nonempty_Ioc]\n[GOAL]\ncase intro.intro.inl\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i = x i\nhi₂ : Box.lower J₂ i = x i\nH₁ : x i < Box.upper J₁ i\nH₂ : x i < Box.upper J₂ i\n⊢ x i < Box.upper J₁ i ⊓ Box.upper J₂ i\n[PROOFSTEP]\nexact lt_min H₁ H₂\n[GOAL]\ncase intro.intro.inr\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i < x i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nhave hi₂ : J₂.lower i < x i := (hx₂.1 i).lt_of_ne (mt (H _).2 hi₁.ne)\n[GOAL]\ncase intro.intro.inr\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ x : ι → ℝ\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx₁ : x ∈ ↑Box.Icc J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ π\nhx₂ : x ∈ ↑Box.Icc J₂\ni : ι\nH : ∀ (x_1 : ι), Box.lower J₁ x_1 = x x_1 ↔ Box.lower J₂ x_1 = x x_1\nhi₁ : Box.lower J₁ i < x i\nhi₂ : Box.lower J₂ i < x i\n⊢ Set.Nonempty (Set.Ioc (Box.lower J₁ i) (Box.upper J₁ i) ∩ Set.Ioc (Box.lower J₂ i) (Box.upper J₂ i))\n[PROOFSTEP]\nexact ⟨x i, ⟨hi₁, hx₁.2 i⟩, ⟨hi₂, hx₂.2 i⟩⟩\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\ninst✝ : Fintype ι\nx : ι → ℝ\n⊢ card (filter (fun J => x ∈ ↑Box.Icc J) π.boxes) ≤ 2 ^ Fintype.card ι\n[PROOFSTEP]\nrw [← Fintype.card_set]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\ninst✝ : Fintype ι\nx : ι → ℝ\n⊢ card (filter (fun J => x ∈ ↑Box.Icc J) π.boxes) ≤ Fintype.card (Set ι)\n[PROOFSTEP]\nrefine' Finset.card_le_card_of_inj_on (fun J : Box ι => {i | J.lower i = x i}) (fun _ _ => Finset.mem_univ _) _\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\ninst✝ : Fintype ι\nx : ι → ℝ\n⊢ ∀ (a₁ : Box ι),\n    a₁ ∈ filter (fun J => x ∈ ↑Box.Icc J) π.boxes →\n      ∀ (a₂ : Box ι),\n        a₂ ∈ filter (fun J => x ∈ ↑Box.Icc J) π.boxes →\n          (fun J => {i | Box.lower J i = x i}) a₁ = (fun J => {i | Box.lower J i = x i}) a₂ → a₁ = a₂\n[PROOFSTEP]\nsimpa only [Finset.mem_filter] using π.injOn_setOf_mem_Icc_setOf_lower_eq x\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ x ∈ Prepartition.iUnion π ↔ ∃ J, J ∈ π ∧ x ∈ J\n[PROOFSTEP]\nconvert Set.mem_iUnion₂\n[GOAL]\ncase h.e'_2.h.e'_2.h.a\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nx✝ : Box ι\n⊢ x✝ ∈ π ∧ x ∈ x✝ ↔ ∃ j, x ∈ ↑x✝\n[PROOFSTEP]\nrw [Box.mem_coe, exists_prop]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nh : J ≤ I\n⊢ Prepartition.iUnion (single I J h) = ↑J\n[PROOFSTEP]\nsimp [iUnion_def]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ Prepartition.iUnion ⊤ = ↑I\n[PROOFSTEP]\nsimp [Prepartition.iUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ Prepartition.iUnion π₁ = ∅ ↔ π₁ = ⊥\n[PROOFSTEP]\nsimp [← injective_boxes.eq_iff, Finset.ext_iff, Prepartition.iUnion, imp_false]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ π₁ ≤ π₂ ↔\n    (∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J') ∧\n      Prepartition.iUnion π₁ ⊆ Prepartition.iUnion π₂\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ π₁ ≤ π₂ →\n    (∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J') ∧\n      Prepartition.iUnion π₁ ⊆ Prepartition.iUnion π₂\n[PROOFSTEP]\nrefine' fun H => ⟨fun J hJ J' hJ' Hne => _, iUnion_mono H⟩\n[GOAL]\ncase mp\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nH : π₁ ≤ π₂\nJ : Box ι\nhJ : J ∈ π₁\nJ' : Box ι\nhJ' : J' ∈ π₂\nHne : Set.Nonempty (↑J ∩ ↑J')\n⊢ J ≤ J'\n[PROOFSTEP]\nrcases H hJ with ⟨J'', hJ'', Hle⟩\n[GOAL]\ncase mp.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nH : π₁ ≤ π₂\nJ : Box ι\nhJ : J ∈ π₁\nJ' : Box ι\nhJ' : J' ∈ π₂\nHne : Set.Nonempty (↑J ∩ ↑J')\nJ'' : Box ι\nhJ'' : J'' ∈ π₂\nHle : J ≤ J''\n⊢ J ≤ J'\n[PROOFSTEP]\nrcases Hne with ⟨x, hx, hx'⟩\n[GOAL]\ncase mp.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nH : π₁ ≤ π₂\nJ : Box ι\nhJ : J ∈ π₁\nJ' : Box ι\nhJ' : J' ∈ π₂\nJ'' : Box ι\nhJ'' : J'' ∈ π₂\nHle : J ≤ J''\nx : ι → ℝ\nhx : x ∈ ↑J\nhx' : x ∈ ↑J'\n⊢ J ≤ J'\n[PROOFSTEP]\nrwa [π₂.eq_of_mem_of_mem hJ' hJ'' hx' (Hle hx)]\n[GOAL]\ncase mpr\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\n⊢ (∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J') ∧\n      Prepartition.iUnion π₁ ⊆ Prepartition.iUnion π₂ →\n    π₁ ≤ π₂\n[PROOFSTEP]\nrintro ⟨H, HU⟩ J hJ\n[GOAL]\ncase mpr.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nH : ∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J'\nHU : Prepartition.iUnion π₁ ⊆ Prepartition.iUnion π₂\nJ : Box ι\nhJ : J ∈ π₁\n⊢ ∃ I', I' ∈ π₂ ∧ J ≤ I'\n[PROOFSTEP]\nsimp only [Set.subset_def, mem_iUnion] at HU \n[GOAL]\ncase mpr.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nH : ∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J'\nJ : Box ι\nhJ : J ∈ π₁\nHU : ∀ (x : ι → ℝ), (∃ J, J ∈ π₁ ∧ x ∈ J) → ∃ J, J ∈ π₂ ∧ x ∈ J\n⊢ ∃ I', I' ∈ π₂ ∧ J ≤ I'\n[PROOFSTEP]\nrcases HU J.upper ⟨J, hJ, J.upper_mem⟩ with ⟨J₂, hJ₂, hx⟩\n[GOAL]\ncase mpr.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nH : ∀ (J : Box ι), J ∈ π₁ → ∀ (J' : Box ι), J' ∈ π₂ → Set.Nonempty (↑J ∩ ↑J') → J ≤ J'\nJ : Box ι\nhJ : J ∈ π₁\nHU : ∀ (x : ι → ℝ), (∃ J, J ∈ π₁ ∧ x ∈ J) → ∃ J, J ∈ π₂ ∧ x ∈ J\nJ₂ : Box ι\nhJ₂ : J₂ ∈ π₂\nhx : J.upper ∈ J₂\n⊢ ∃ I', I' ∈ π₂ ∧ J ≤ I'\n[PROOFSTEP]\nexact ⟨J₂, hJ₂, H _ hJ _ hJ₂ ⟨_, J.upper_mem, hx⟩⟩\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ : Box ι\nhJ : J ∈ Finset.biUnion π.boxes fun J => (πi J).boxes\n⊢ J ≤ I\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion, exists_prop, mem_boxes] at hJ \n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ : Box ι\nhJ : ∃ a, a ∈ π ∧ J ∈ πi a\n⊢ J ≤ I\n[PROOFSTEP]\nrcases hJ with ⟨J', hJ', hJ⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ J' : Box ι\nhJ' : J' ∈ π\nhJ : J ∈ πi J'\n⊢ J ≤ I\n[PROOFSTEP]\nexact ((πi J').le_of_mem hJ).trans (π.le_of_mem hJ')\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\n⊢ Set.Pairwise (↑(Finset.biUnion π.boxes fun J => (πi J).boxes)) (Disjoint on Box.toSet)\n[PROOFSTEP]\nsimp only [Set.Pairwise, Finset.mem_coe, Finset.mem_biUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\n⊢ ∀ ⦃x : Box ι⦄,\n    (∃ a, a ∈ π.boxes ∧ x ∈ (πi a).boxes) →\n      ∀ ⦃y : Box ι⦄, (∃ a, a ∈ π.boxes ∧ y ∈ (πi a).boxes) → x ≠ y → (Disjoint on Box.toSet) x y\n[PROOFSTEP]\nrintro J₁' ⟨J₁, hJ₁, hJ₁'⟩ J₂' ⟨J₂, hJ₂, hJ₂'⟩ Hne\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' J₂ : Box ι\nhJ₂ : J₂ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₂).boxes\nHne : J₁' ≠ J₂'\n⊢ (Disjoint on Box.toSet) J₁' J₂'\n[PROOFSTEP]\nrw [Function.onFun, Set.disjoint_left]\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' J₂ : Box ι\nhJ₂ : J₂ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₂).boxes\nHne : J₁' ≠ J₂'\n⊢ ∀ ⦃a : ι → ℝ⦄, a ∈ ↑J₁' → ¬a ∈ ↑J₂'\n[PROOFSTEP]\nrintro x hx₁ hx₂\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' J₂ : Box ι\nhJ₂ : J₂ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₂).boxes\nHne : J₁' ≠ J₂'\nx : ι → ℝ\nhx₁ : x ∈ ↑J₁'\nhx₂ : x ∈ ↑J₂'\n⊢ False\n[PROOFSTEP]\napply Hne\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' J₂ : Box ι\nhJ₂ : J₂ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₂).boxes\nHne : J₁' ≠ J₂'\nx : ι → ℝ\nhx₁ : x ∈ ↑J₁'\nhx₂ : x ∈ ↑J₂'\n⊢ J₁' = J₂'\n[PROOFSTEP]\nobtain rfl : J₁ = J₂\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' J₂ : Box ι\nhJ₂ : J₂ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₂).boxes\nHne : J₁' ≠ J₂'\nx : ι → ℝ\nhx₁ : x ∈ ↑J₁'\nhx₂ : x ∈ ↑J₂'\n⊢ J₁ = J₂\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' : Box ι\nHne : J₁' ≠ J₂'\nx : ι → ℝ\nhx₁ : x ∈ ↑J₁'\nhx₂ : x ∈ ↑J₂'\nhJ₂ : J₁ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₁).boxes\n⊢ J₁' = J₂'\n[PROOFSTEP]\nexact π.eq_of_mem_of_mem hJ₁ hJ₂ ((πi J₁).le_of_mem hJ₁' hx₁) ((πi J₂).le_of_mem hJ₂' hx₂)\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi : (J : Box ι) → Prepartition J\nJ₁' J₁ : Box ι\nhJ₁ : J₁ ∈ π.boxes\nhJ₁' : J₁' ∈ (πi J₁).boxes\nJ₂' : Box ι\nHne : J₁' ≠ J₂'\nx : ι → ℝ\nhx₁ : x ∈ ↑J₁'\nhx₂ : x ∈ ↑J₂'\nhJ₂ : J₁ ∈ π.boxes\nhJ₂' : J₂' ∈ (πi J₁).boxes\n⊢ J₁' = J₂'\n[PROOFSTEP]\nexact (πi J₁).eq_of_mem_of_mem hJ₁' hJ₂' hx₁ hx₂\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\n⊢ J ∈ biUnion π πi ↔ ∃ J', J' ∈ π ∧ J ∈ πi J'\n[PROOFSTEP]\nsimp [biUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\n⊢ (biUnion π fun x => ⊤) = π\n[PROOFSTEP]\next\n[GOAL]\ncase h\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nJ✝ : Box ι\n⊢ (J✝ ∈ biUnion π fun x => ⊤) ↔ J✝ ∈ π\n[PROOFSTEP]\nsimp\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : π₁ = π₂\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\n⊢ biUnion π₁ πi₁ = biUnion π₂ πi₂\n[PROOFSTEP]\nsubst π₂\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\n⊢ biUnion π₁ πi₁ = biUnion π₁ πi₂\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\nJ : Box ι\n⊢ J ∈ biUnion π₁ πi₁ ↔ J ∈ biUnion π₁ πi₂\n[PROOFSTEP]\nsimp only [mem_biUnion]\n[GOAL]\ncase h\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\nJ : Box ι\n⊢ (∃ J', J' ∈ π₁ ∧ J ∈ πi₁ J') ↔ ∃ J', J' ∈ π₁ ∧ J ∈ πi₂ J'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\nJ : Box ι\n⊢ (∃ J', J' ∈ π₁ ∧ J ∈ πi₁ J') → ∃ J', J' ∈ π₁ ∧ J ∈ πi₂ J'\n[PROOFSTEP]\nexact fun ⟨J', h₁, h₂⟩ => ⟨J', h₁, hi J' h₁ ▸ h₂⟩\n[GOAL]\ncase h.mpr\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhi : ∀ (J : Box ι), J ∈ π₁ → πi₁ J = πi₂ J\nJ : Box ι\n⊢ (∃ J', J' ∈ π₁ ∧ J ∈ πi₂ J') → ∃ J', J' ∈ π₁ ∧ J ∈ πi₁ J'\n[PROOFSTEP]\nexact fun ⟨J', h₁, h₂⟩ => ⟨J', h₁, hi J' h₁ ▸ h₂⟩\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\n⊢ Prepartition.iUnion (biUnion π πi) = ⋃ (J : Box ι) (_ : J ∈ π), Prepartition.iUnion (πi J)\n[PROOFSTEP]\nsimp [Prepartition.iUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ : (J : Box ι) → Prepartition J\nM : Type u_2\ninst✝ : AddCommMonoid M\nπ : Prepartition I\nπi : (J : Box ι) → Prepartition J\nf : Box ι → M\n⊢ ∑ J in Finset.biUnion π.boxes fun J => (πi J).boxes, f J = ∑ J in π.boxes, ∑ J' in (πi J).boxes, f J'\n[PROOFSTEP]\nrefine' Finset.sum_biUnion fun J₁ h₁ J₂ h₂ hne => Finset.disjoint_left.2 fun J' h₁' h₂' => _\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ : (J : Box ι) → Prepartition J\nM : Type u_2\ninst✝ : AddCommMonoid M\nπ : Prepartition I\nπi : (J : Box ι) → Prepartition J\nf : Box ι → M\nJ₁ : Box ι\nh₁ : J₁ ∈ ↑π.boxes\nJ₂ : Box ι\nh₂ : J₂ ∈ ↑π.boxes\nhne : J₁ ≠ J₂\nJ' : Box ι\nh₁' : J' ∈ (fun J => (πi J).boxes) J₁\nh₂' : J' ∈ (fun J => (πi J).boxes) J₂\n⊢ False\n[PROOFSTEP]\nexact hne (π.eq_of_le_of_le h₁ h₂ ((πi J₁).le_of_mem h₁') ((πi J₂).le_of_mem h₂'))\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\n⊢ biUnionIndex π πi J ∈ π\n[PROOFSTEP]\nrw [biUnionIndex, dif_pos hJ]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\n⊢ Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J') ∈ π\n[PROOFSTEP]\nexact (π.mem_biUnion.1 hJ).choose_spec.1\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nJ : Box ι\n⊢ biUnionIndex π πi J ≤ I\n[PROOFSTEP]\nby_cases hJ : J ∈ π.biUnion πi\n[GOAL]\ncase pos\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nJ : Box ι\nhJ : J ∈ biUnion π πi\n⊢ biUnionIndex π πi J ≤ I\n[PROOFSTEP]\nexact π.le_of_mem (π.biUnionIndex_mem hJ)\n[GOAL]\ncase neg\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nJ : Box ι\nhJ : ¬J ∈ biUnion π πi\n⊢ biUnionIndex π πi J ≤ I\n[PROOFSTEP]\nrw [biUnionIndex, dif_neg hJ]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\n⊢ J ∈ πi (biUnionIndex π πi J)\n[PROOFSTEP]\nconvert (π.mem_biUnion.1 hJ).choose_spec.2\n[GOAL]\ncase h.e'_2.h.e'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\n⊢ biUnionIndex π πi J = Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J')\n[PROOFSTEP]\nexact dif_pos hJ\n[GOAL]\ncase h.e'_3.e'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\ne_2✝ : Prepartition (biUnionIndex π πi J) = Prepartition (Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J'))\n⊢ biUnionIndex π πi J = Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J')\n[PROOFSTEP]\nexact dif_pos hJ\n[GOAL]\ncase h.e'_5.e'_1\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nhJ : J ∈ biUnion π πi\ne_2✝ : Prepartition (biUnionIndex π πi J) = Prepartition (Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J'))\n⊢ biUnionIndex π πi J = Exists.choose (_ : ∃ J', J' ∈ π ∧ J ∈ πi J')\n[PROOFSTEP]\nexact dif_pos hJ\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\n⊢ (biUnion π fun J => biUnion (πi J) (πi' J)) = biUnion (biUnion π πi) fun J => πi' (biUnionIndex π πi J) J\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ : Box ι\n⊢ (J ∈ biUnion π fun J => biUnion (πi J) (πi' J)) ↔ J ∈ biUnion (biUnion π πi) fun J => πi' (biUnionIndex π πi J) J\n[PROOFSTEP]\nsimp only [mem_biUnion, exists_prop]\n[GOAL]\ncase h\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ : Box ι\n⊢ (∃ J', J' ∈ π ∧ ∃ J'_1, J'_1 ∈ πi J' ∧ J ∈ πi' J' J'_1) ↔\n    ∃ J', (∃ J'_1, J'_1 ∈ π ∧ J' ∈ πi J'_1) ∧ J ∈ πi' (biUnionIndex π πi J') J'\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ : Box ι\n⊢ (∃ J', J' ∈ π ∧ ∃ J'_1, J'_1 ∈ πi J' ∧ J ∈ πi' J' J'_1) →\n    ∃ J', (∃ J'_1, J'_1 ∈ π ∧ J' ∈ πi J'_1) ∧ J ∈ πi' (biUnionIndex π πi J') J'\n[PROOFSTEP]\nrintro ⟨J₁, hJ₁, J₂, hJ₂, hJ⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ J₁ : Box ι\nhJ₁ : J₁ ∈ π\nJ₂ : Box ι\nhJ₂ : J₂ ∈ πi J₁\nhJ : J ∈ πi' J₁ J₂\n⊢ ∃ J', (∃ J'_1, J'_1 ∈ π ∧ J' ∈ πi J'_1) ∧ J ∈ πi' (biUnionIndex π πi J') J'\n[PROOFSTEP]\nrefine' ⟨J₂, ⟨J₁, hJ₁, hJ₂⟩, _⟩\n[GOAL]\ncase h.mp.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ J₁ : Box ι\nhJ₁ : J₁ ∈ π\nJ₂ : Box ι\nhJ₂ : J₂ ∈ πi J₁\nhJ : J ∈ πi' J₁ J₂\n⊢ J ∈ πi' (biUnionIndex π πi J₂) J₂\n[PROOFSTEP]\nrwa [π.biUnionIndex_of_mem hJ₁ hJ₂]\n[GOAL]\ncase h.mpr\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ : Box ι\n⊢ (∃ J', (∃ J'_1, J'_1 ∈ π ∧ J' ∈ πi J'_1) ∧ J ∈ πi' (biUnionIndex π πi J') J') →\n    ∃ J', J' ∈ π ∧ ∃ J'_1, J'_1 ∈ πi J' ∧ J ∈ πi' J' J'_1\n[PROOFSTEP]\nrintro ⟨J₁, ⟨J₂, hJ₂, hJ₁⟩, hJ⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ J₁ : Box ι\nhJ : J ∈ πi' (biUnionIndex π πi J₁) J₁\nJ₂ : Box ι\nhJ₂ : J₂ ∈ π\nhJ₁ : J₁ ∈ πi J₂\n⊢ ∃ J', J' ∈ π ∧ ∃ J'_1, J'_1 ∈ πi J' ∧ J ∈ πi' J' J'_1\n[PROOFSTEP]\nrefine' ⟨J₂, hJ₂, J₁, hJ₁, _⟩\n[GOAL]\ncase h.mpr.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπi' : Box ι → (J : Box ι) → Prepartition J\nJ J₁ : Box ι\nhJ : J ∈ πi' (biUnionIndex π πi J₁) J₁\nJ₂ : Box ι\nhJ₂ : J₂ ∈ π\nhJ₁ : J₁ ∈ πi J₂\n⊢ J ∈ πi' J₂ J₁\n[PROOFSTEP]\nrwa [π.biUnionIndex_of_mem hJ₂ hJ₁] at hJ \n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nJ : Box ι\nhJ : J ∈ ↑eraseNone boxes\n⊢ J ≤ I\n[PROOFSTEP]\nrw [mem_eraseNone] at hJ \n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nJ : Box ι\nhJ : some J ∈ boxes\n⊢ J ≤ I\n[PROOFSTEP]\nsimpa only [WithBot.some_eq_coe, WithBot.coe_le_coe] using le_of_mem _ hJ\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nJ₁ : Box ι\nh₁ : J₁ ∈ ↑(↑eraseNone boxes)\nJ₂ : Box ι\nh₂ : J₂ ∈ ↑(↑eraseNone boxes)\nhne : J₁ ≠ J₂\n⊢ (Disjoint on Box.toSet) J₁ J₂\n[PROOFSTEP]\nsimp only [mem_coe, mem_eraseNone] at h₁ h₂ \n[GOAL]\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nJ₁ J₂ : Box ι\nhne : J₁ ≠ J₂\nh₁ : some J₁ ∈ boxes\nh₂ : some J₂ ∈ boxes\n⊢ (Disjoint on Box.toSet) J₁ J₂\n[PROOFSTEP]\nexact Box.disjoint_coe.1 (pairwise_disjoint h₁ h₂ (mt Option.some_inj.1 hne))\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\n⊢ Prepartition.iUnion (ofWithBot boxes le_of_mem pairwise_disjoint) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J\n[PROOFSTEP]\nsuffices ⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J = ⋃ J ∈ boxes, (J : Set (ι → ℝ)) by simpa [ofWithBot, Prepartition.iUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nthis : ⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J\n⊢ Prepartition.iUnion (ofWithBot boxes le_of_mem pairwise_disjoint) = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J\n[PROOFSTEP]\nsimpa [ofWithBot, Prepartition.iUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\n⊢ ⋃ (J : Box ι) (_ : ↑J ∈ boxes), ↑J = ⋃ (J : WithBot (Box ι)) (_ : J ∈ boxes), ↑J\n[PROOFSTEP]\nsimp only [← Box.biUnion_coe_eq_coe, @iUnion_comm _ _ (Box ι), @iUnion_comm _ _ (@Eq _ _ _), iUnion_iUnion_eq_right]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≠ ⊥ → ∃ J', J' ∈ π ∧ J ≤ ↑J'\n⊢ ofWithBot boxes le_of_mem pairwise_disjoint ≤ π\n[PROOFSTEP]\nhave : ∀ J : Box ι, ↑J ∈ boxes → ∃ J' ∈ π, J ≤ J' := fun J hJ => by\n  simpa only [WithBot.coe_le_coe] using H J hJ WithBot.coe_ne_bot\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≠ ⊥ → ∃ J', J' ∈ π ∧ J ≤ ↑J'\nJ : Box ι\nhJ : ↑J ∈ boxes\n⊢ ∃ J', J' ∈ π ∧ J ≤ J'\n[PROOFSTEP]\nsimpa only [WithBot.coe_le_coe] using H J hJ WithBot.coe_ne_bot\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≠ ⊥ → ∃ J', J' ∈ π ∧ J ≤ ↑J'\nthis : ∀ (J : Box ι), ↑J ∈ boxes → ∃ J', J' ∈ π ∧ J ≤ J'\n⊢ ofWithBot boxes le_of_mem pairwise_disjoint ≤ π\n[PROOFSTEP]\nsimpa [ofWithBot, le_def]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : Box ι), J ∈ π → ∃ J', J' ∈ boxes ∧ ↑J ≤ J'\n⊢ π ≤ ofWithBot boxes le_of_mem pairwise_disjoint\n[PROOFSTEP]\nintro J hJ\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : Box ι), J ∈ π → ∃ J', J' ∈ boxes ∧ ↑J ≤ J'\nJ : Box ι\nhJ : J ∈ π\n⊢ ∃ I', I' ∈ ofWithBot boxes le_of_mem pairwise_disjoint ∧ J ≤ I'\n[PROOFSTEP]\nrcases H J hJ with ⟨J', J'mem, hle⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : Box ι), J ∈ π → ∃ J', J' ∈ boxes ∧ ↑J ≤ J'\nJ : Box ι\nhJ : J ∈ π\nJ' : WithBot (Box ι)\nJ'mem : J' ∈ boxes\nhle : ↑J ≤ J'\n⊢ ∃ I', I' ∈ ofWithBot boxes le_of_mem pairwise_disjoint ∧ J ≤ I'\n[PROOFSTEP]\nlift J' to Box ι using ne_bot_of_le_ne_bot WithBot.coe_ne_bot hle\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nboxes : Finset (WithBot (Box ι))\nle_of_mem : ∀ (J : WithBot (Box ι)), J ∈ boxes → J ≤ ↑I\npairwise_disjoint : Set.Pairwise (↑boxes) Disjoint\nH : ∀ (J : Box ι), J ∈ π → ∃ J', J' ∈ boxes ∧ ↑J ≤ J'\nJ : Box ι\nhJ : J ∈ π\nJ' : Box ι\nJ'mem : ↑J' ∈ boxes\nhle : ↑J ≤ ↑J'\n⊢ ∃ I', I' ∈ ofWithBot boxes le_of_mem pairwise_disjoint ∧ J ≤ I'\n[PROOFSTEP]\nexact ⟨J', mem_ofWithBot.2 J'mem, WithBot.coe_le_coe.1 hle⟩\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ : Box ι\nJ' : WithBot (Box ι)\nhJ' : J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π.boxes\n⊢ J' ≤ ↑J\n[PROOFSTEP]\nrcases Finset.mem_image.1 hJ' with ⟨J', -, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ J' : Box ι\nhJ' : ↑J ⊓ ↑J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π.boxes\n⊢ ↑J ⊓ ↑J' ≤ ↑J\n[PROOFSTEP]\nexact inf_le_left\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ : Box ι\n⊢ Set.Pairwise (↑(Finset.image (fun J' => ↑J ⊓ ↑J') π.boxes)) Disjoint\n[PROOFSTEP]\nsimp only [Set.Pairwise, onFun, Finset.mem_coe, Finset.mem_image]\n[GOAL]\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ : Box ι\n⊢ ∀ ⦃x : WithBot (Box ι)⦄,\n    (∃ a, a ∈ π.boxes ∧ ↑J ⊓ ↑a = x) → ∀ ⦃y : WithBot (Box ι)⦄, (∃ a, a ∈ π.boxes ∧ ↑J ⊓ ↑a = y) → x ≠ y → Disjoint x y\n[PROOFSTEP]\nrintro _ ⟨J₁, h₁, rfl⟩ _ ⟨J₂, h₂, rfl⟩ Hne\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ J₁ : Box ι\nh₁ : J₁ ∈ π.boxes\nJ₂ : Box ι\nh₂ : J₂ ∈ π.boxes\nHne : ↑J ⊓ ↑J₁ ≠ ↑J ⊓ ↑J₂\n⊢ Disjoint (↑J ⊓ ↑J₁) (↑J ⊓ ↑J₂)\n[PROOFSTEP]\nhave : J₁ ≠ J₂ := by\n  rintro rfl\n  exact Hne rfl\n[GOAL]\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ J₁ : Box ι\nh₁ : J₁ ∈ π.boxes\nJ₂ : Box ι\nh₂ : J₂ ∈ π.boxes\nHne : ↑J ⊓ ↑J₁ ≠ ↑J ⊓ ↑J₂\n⊢ J₁ ≠ J₂\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nι : Type u_1\nI J✝ J₁✝ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ J₁ : Box ι\nh₁ h₂ : J₁ ∈ π.boxes\nHne : ↑J ⊓ ↑J₁ ≠ ↑J ⊓ ↑J₁\n⊢ False\n[PROOFSTEP]\nexact Hne rfl\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nJ J₁ : Box ι\nh₁ : J₁ ∈ π.boxes\nJ₂ : Box ι\nh₂ : J₂ ∈ π.boxes\nHne : ↑J ⊓ ↑J₁ ≠ ↑J ⊓ ↑J₂\nthis : J₁ ≠ J₂\n⊢ Disjoint (↑J ⊓ ↑J₁) (↑J ⊓ ↑J₂)\n[PROOFSTEP]\nexact ((Box.disjoint_coe.2 <| π.disjoint_coe_of_mem h₁ h₂ this).inf_left' _).inf_right' _\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\n⊢ J₁ ∈ restrict π J ↔ ∃ J', J' ∈ π ∧ ↑J₁ = ↑J ⊓ ↑J'\n[PROOFSTEP]\nsimp [restrict, eq_comm]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\n⊢ J₁ ∈ restrict π J ↔ ∃ J', J' ∈ π ∧ ↑J₁ = ↑J ∩ ↑J'\n[PROOFSTEP]\nsimp only [mem_restrict, ← Box.withBotCoe_inj, Box.coe_inf, Box.coe_coe]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nHle : π₁ ≤ π₂\n⊢ restrict π₁ J ≤ restrict π₂ J\n[PROOFSTEP]\nrefine' ofWithBot_mono fun J₁ hJ₁ hne => _\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nHle : π₁ ≤ π₂\nJ₁ : WithBot (Box ι)\nhJ₁ : J₁ ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π₁.boxes\nhne : J₁ ≠ ⊥\n⊢ ∃ J', J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π₂.boxes ∧ J₁ ≤ J'\n[PROOFSTEP]\nrw [Finset.mem_image] at hJ₁ \n[GOAL]\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nHle : π₁ ≤ π₂\nJ₁ : WithBot (Box ι)\nhJ₁ : ∃ a, a ∈ π₁.boxes ∧ ↑J ⊓ ↑a = J₁\nhne : J₁ ≠ ⊥\n⊢ ∃ J', J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π₂.boxes ∧ J₁ ≤ J'\n[PROOFSTEP]\nrcases hJ₁ with ⟨J₁, hJ₁, rfl⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nHle : π₁ ≤ π₂\nJ₁ : Box ι\nhJ₁ : J₁ ∈ π₁.boxes\nhne : ↑J ⊓ ↑J₁ ≠ ⊥\n⊢ ∃ J', J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π₂.boxes ∧ ↑J ⊓ ↑J₁ ≤ J'\n[PROOFSTEP]\nrcases Hle hJ₁ with ⟨J₂, hJ₂, hle⟩\n[GOAL]\ncase intro.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂✝ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nHle : π₁ ≤ π₂\nJ₁ : Box ι\nhJ₁ : J₁ ∈ π₁.boxes\nhne : ↑J ⊓ ↑J₁ ≠ ⊥\nJ₂ : Box ι\nhJ₂ : J₂ ∈ π₂\nhle : J₁ ≤ J₂\n⊢ ∃ J', J' ∈ Finset.image (fun J' => ↑J ⊓ ↑J') π₂.boxes ∧ ↑J ⊓ ↑J₁ ≤ J'\n[PROOFSTEP]\nexact ⟨_, Finset.mem_image_of_mem _ hJ₂, inf_le_inf_left _ <| WithBot.coe_le_coe.2 hle⟩\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\n⊢ (restrict π J).boxes = π.boxes\n[PROOFSTEP]\nsimp only [restrict, ofWithBot, eraseNone_eq_biUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\n⊢ Finset.biUnion (Finset.image (fun J' => ↑J ⊓ ↑J') π.boxes) Option.toFinset = π.boxes\n[PROOFSTEP]\nrefine' Finset.image_biUnion.trans _\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\n⊢ (Finset.biUnion π.boxes fun a => Option.toFinset (↑J ⊓ ↑a)) = π.boxes\n[PROOFSTEP]\nrefine' (Finset.biUnion_congr rfl _).trans Finset.biUnion_singleton_eq_self\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\n⊢ ∀ (a : Box ι), a ∈ π.boxes → Option.toFinset (↑J ⊓ ↑a) = {a}\n[PROOFSTEP]\nintro J' hJ'\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\nJ' : Box ι\nhJ' : J' ∈ π.boxes\n⊢ Option.toFinset (↑J ⊓ ↑J') = {J'}\n[PROOFSTEP]\nrw [inf_of_le_right, ← WithBot.some_eq_coe, Option.toFinset_some]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\nh : I ≤ J\nJ' : Box ι\nhJ' : J' ∈ π.boxes\n⊢ ↑J' ≤ ↑J\n[PROOFSTEP]\nexact WithBot.coe_le_coe.2 ((π.le_of_mem hJ').trans h)\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\n⊢ Prepartition.iUnion (restrict π J) = ↑J ∩ Prepartition.iUnion π\n[PROOFSTEP]\nsimp [restrict, ← inter_iUnion, ← iUnion_def]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\n⊢ restrict (biUnion π πi) J = πi J\n[PROOFSTEP]\nrefine' (eq_of_boxes_subset_iUnion_superset (fun J₁ h₁ => _) _).symm\n[GOAL]\ncase refine'_1\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nJ₁ : Box ι\nh₁ : J₁ ∈ (πi J).boxes\n⊢ J₁ ∈ (restrict (biUnion π πi) J).boxes\n[PROOFSTEP]\nrefine' (mem_restrict _).2 ⟨J₁, π.mem_biUnion.2 ⟨J, hJ, h₁⟩, (inf_of_le_right _).symm⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nJ₁ : Box ι\nh₁ : J₁ ∈ (πi J).boxes\n⊢ ↑J₁ ≤ ↑J\n[PROOFSTEP]\nexact WithBot.coe_le_coe.2 (le_of_mem _ h₁)\n[GOAL]\ncase refine'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\n⊢ Prepartition.iUnion (restrict (biUnion π πi) J) ⊆ Prepartition.iUnion (πi J)\n[PROOFSTEP]\nsimp only [iUnion_restrict, iUnion_biUnion, Set.subset_def, Set.mem_inter_iff, Set.mem_iUnion]\n[GOAL]\ncase refine'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\n⊢ ∀ (x : ι → ℝ), (x ∈ ↑J ∧ ∃ i i_1, x ∈ Prepartition.iUnion (πi i)) → x ∈ Prepartition.iUnion (πi J)\n[PROOFSTEP]\nrintro x ⟨hxJ, J₁, h₁, hx⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nx : ι → ℝ\nhxJ : x ∈ ↑J\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx : x ∈ Prepartition.iUnion (πi J₁)\n⊢ x ∈ Prepartition.iUnion (πi J)\n[PROOFSTEP]\nobtain rfl : J = J₁\n[GOAL]\nι : Type u_1\nI J J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nx : ι → ℝ\nhxJ : x ∈ ↑J\nJ₁ : Box ι\nh₁ : J₁ ∈ π\nhx : x ∈ Prepartition.iUnion (πi J₁)\n⊢ J = J₁\ncase refine'_2.intro.intro.intro\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nx : ι → ℝ\nhxJ : x ∈ ↑J\nh₁ : J ∈ π\nhx : x ∈ Prepartition.iUnion (πi J)\n⊢ x ∈ Prepartition.iUnion (πi J)\n[PROOFSTEP]\nexact π.eq_of_mem_of_mem hJ h₁ hxJ (iUnion_subset _ hx)\n[GOAL]\ncase refine'_2.intro.intro.intro\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx✝ : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nhJ : J ∈ π\nx : ι → ℝ\nhxJ : x ∈ ↑J\nh₁ : J ∈ π\nhx : x ∈ Prepartition.iUnion (πi J)\n⊢ x ∈ Prepartition.iUnion (πi J)\n[PROOFSTEP]\nexact hx\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\n⊢ biUnion π πi ≤ π' ↔ ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\n⊢ biUnion π πi ≤ π' → ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\n[PROOFSTEP]\nintro H J hJ\n[GOAL]\ncase mpr\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\n⊢ (∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J) → biUnion π πi ≤ π'\n[PROOFSTEP]\nintro H J hJ\n[GOAL]\ncase mp\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : biUnion π πi ≤ π'\nJ : Box ι\nhJ : J ∈ π\n⊢ πi J ≤ restrict π' J\n[PROOFSTEP]\nrw [← π.restrict_biUnion πi hJ]\n[GOAL]\ncase mp\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : biUnion π πi ≤ π'\nJ : Box ι\nhJ : J ∈ π\n⊢ restrict (biUnion π πi) J ≤ restrict π' J\n[PROOFSTEP]\nexact restrict_mono H\n[GOAL]\ncase mpr\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\nJ : Box ι\nhJ : J ∈ biUnion π πi\n⊢ ∃ I', I' ∈ π' ∧ J ≤ I'\n[PROOFSTEP]\nrw [mem_biUnion] at hJ \n[GOAL]\ncase mpr\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\nJ : Box ι\nhJ : ∃ J', J' ∈ π ∧ J ∈ πi J'\n⊢ ∃ I', I' ∈ π' ∧ J ≤ I'\n[PROOFSTEP]\nrcases hJ with ⟨J₁, h₁, hJ⟩\n[GOAL]\ncase mpr.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\nJ J₁ : Box ι\nh₁ : J₁ ∈ π\nhJ : J ∈ πi J₁\n⊢ ∃ I', I' ∈ π' ∧ J ≤ I'\n[PROOFSTEP]\nrcases H J₁ h₁ hJ with ⟨J₂, h₂, Hle⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\nJ J₁ : Box ι\nh₁ : J₁ ∈ π\nhJ : J ∈ πi J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ restrict π' J₁\nHle : J ≤ J₂\n⊢ ∃ I', I' ∈ π' ∧ J ≤ I'\n[PROOFSTEP]\nrcases π'.mem_restrict.mp h₂ with ⟨J₃, h₃, H⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁✝ J₂✝ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH✝ : ∀ (J : Box ι), J ∈ π → πi J ≤ restrict π' J\nJ J₁ : Box ι\nh₁ : J₁ ∈ π\nhJ : J ∈ πi J₁\nJ₂ : Box ι\nh₂ : J₂ ∈ restrict π' J₁\nHle : J ≤ J₂\nJ₃ : Box ι\nh₃ : J₃ ∈ π'\nH : ↑J₂ = ↑J₁ ⊓ ↑J₃\n⊢ ∃ I', I' ∈ π' ∧ J ≤ I'\n[PROOFSTEP]\nexact ⟨J₃, h₃, Hle.trans <| WithBot.coe_le_coe.1 <| H.trans_le inf_le_right⟩\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\n⊢ π' ≤ biUnion π πi ↔ π' ≤ π ∧ ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J\n[PROOFSTEP]\nrefine' ⟨fun H => ⟨H.trans (π.biUnion_le πi), fun J hJ => _⟩, _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ biUnion π πi\nJ : Box ι\nhJ : J ∈ π\n⊢ restrict π' J ≤ πi J\n[PROOFSTEP]\nrw [← π.restrict_biUnion πi hJ]\n[GOAL]\ncase refine'_1\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ biUnion π πi\nJ : Box ι\nhJ : J ∈ π\n⊢ restrict π' J ≤ restrict (biUnion π πi) J\n[PROOFSTEP]\nexact restrict_mono H\n[GOAL]\ncase refine'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\n⊢ (π' ≤ π ∧ ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J) → π' ≤ biUnion π πi\n[PROOFSTEP]\nrintro ⟨H, Hi⟩ J' hJ'\n[GOAL]\ncase refine'_2.intro\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ π\nHi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J\nJ' : Box ι\nhJ' : J' ∈ π'\n⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'\n[PROOFSTEP]\nrcases H hJ' with ⟨J, hJ, hle⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ π\nHi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J\nJ' : Box ι\nhJ' : J' ∈ π'\nJ : Box ι\nhJ : J ∈ π\nhle : J' ≤ J\n⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'\n[PROOFSTEP]\nhave : J' ∈ π'.restrict J := π'.mem_restrict.2 ⟨J', hJ', (inf_of_le_right <| WithBot.coe_le_coe.2 hle).symm⟩\n[GOAL]\ncase refine'_2.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ π\nHi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J\nJ' : Box ι\nhJ' : J' ∈ π'\nJ : Box ι\nhJ : J ∈ π\nhle : J' ≤ J\nthis : J' ∈ restrict π' J\n⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'\n[PROOFSTEP]\nrcases Hi J hJ this with ⟨Ji, hJi, hlei⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J\nπ' : Prepartition I\nH : π' ≤ π\nHi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J\nJ' : Box ι\nhJ' : J' ∈ π'\nJ : Box ι\nhJ : J ∈ π\nhle : J' ≤ J\nthis : J' ∈ restrict π' J\nJi : Box ι\nhJi : Ji ∈ πi J\nhlei : J' ≤ Ji\n⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'\n[PROOFSTEP]\nexact ⟨Ji, π.mem_biUnion.2 ⟨J, hJ, hJi⟩, hlei⟩\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\n⊢ J ∈ π₁ ⊓ π₂ ↔ ∃ J₁, J₁ ∈ π₁ ∧ ∃ J₂, J₂ ∈ π₂ ∧ ↑J = ↑J₁ ⊓ ↑J₂\n[PROOFSTEP]\nsimp only [inf_def, mem_biUnion, mem_restrict]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\n⊢ Prepartition.iUnion (π₁ ⊓ π₂) = Prepartition.iUnion π₁ ∩ Prepartition.iUnion π₂\n[PROOFSTEP]\nsimp only [inf_def, iUnion_biUnion, iUnion_restrict, ← iUnion_inter, ← iUnion_def]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\np : Box ι → Prop\nhp : ∀ (J : Box ι), J ∈ π → p J\n⊢ filter π p = π\n[PROOFSTEP]\next J\n[GOAL]\ncase h\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\np : Box ι → Prop\nhp : ∀ (J : Box ι), J ∈ π → p J\nJ : Box ι\n⊢ J ∈ filter π p ↔ J ∈ π\n[PROOFSTEP]\nsimpa using hp J\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ Prepartition.iUnion (filter π fun J => ¬p J) = Prepartition.iUnion π \\ Prepartition.iUnion (filter π p)\n[PROOFSTEP]\nsimp only [Prepartition.iUnion]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ ⋃ (J : Box ι) (_ : J ∈ filter π fun J => ¬p J), ↑J =\n    (⋃ (J : Box ι) (_ : J ∈ π), ↑J) \\ ⋃ (J : Box ι) (_ : J ∈ filter π p), ↑J\n[PROOFSTEP]\nconvert (@Set.biUnion_diff_biUnion_eq _ (Box ι) π.boxes (π.filter p).boxes (↑) _).symm\n[GOAL]\ncase h.e'_2.h.e'_3.h.pq.a.a\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\nx✝ : Box ι\n⊢ (x✝ ∈ filter π fun J => ¬p J) ↔ x✝ ∈ ↑π.boxes \\ ↑(filter π p).boxes\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ PairwiseDisjoint (↑π.boxes ∪ ↑(filter π p).boxes) Box.toSet\n[PROOFSTEP]\nrw [Set.PairwiseDisjoint]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ Set.Pairwise (↑π.boxes ∪ ↑(filter π p).boxes) (Disjoint on Box.toSet)\n[PROOFSTEP]\nconvert π.pairwiseDisjoint\n[GOAL]\ncase h.e'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ ↑π.boxes ∪ ↑(filter π p).boxes = ↑π.boxes\n[PROOFSTEP]\nrw [Set.union_eq_left_iff_subset, filter_boxes, coe_filter]\n[GOAL]\ncase h.e'_2\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\np : Box ι → Prop\n⊢ {x | x ∈ π.boxes ∧ p x} ⊆ ↑π.boxes\n[PROOFSTEP]\nexact fun _ ⟨h, _⟩ => h\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nα : Type u_2\nM : Type u_3\ninst✝ : AddCommMonoid M\nπ : Prepartition I\nf : Box ι → α\ng : Box ι → M\n⊢ ∑ y in Finset.image f π.boxes, ∑ J in (filter π fun J => f J = y).boxes, g J = ∑ J in π.boxes, g J\n[PROOFSTEP]\nconvert sum_fiberwise_of_maps_to (fun _ => Finset.mem_image_of_mem f) g\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁✝ π₂✝ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ₁ π₂ : Prepartition I\nh : Disjoint (Prepartition.iUnion π₁) (Prepartition.iUnion π₂)\nthis : ∀ (J₁ : Box ι), J₁ ∈ π₁ → ∀ (J₂ : Box ι), J₂ ∈ π₂ → J₁ ≠ J₂ → Disjoint ↑J₁ ↑J₂\n⊢ Set.Pairwise (↑(π₁.boxes ∪ π₂.boxes)) (Disjoint on Box.toSet)\n[PROOFSTEP]\nsimpa [pairwise_union_of_symmetric (symmetric_disjoint.comap _), pairwiseDisjoint]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : Disjoint (Prepartition.iUnion π₁) (Prepartition.iUnion π₂)\n⊢ Prepartition.iUnion (disjUnion π₁ π₂ h) = Prepartition.iUnion π₁ ∪ Prepartition.iUnion π₂\n[PROOFSTEP]\nsimp [disjUnion, Prepartition.iUnion, iUnion_or, iUnion_union_distrib]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ✝ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nπ : Prepartition I\n⊢ IsPartition π ↔ Prepartition.iUnion π = ↑I\n[PROOFSTEP]\nsimp_rw [IsPartition, Set.Subset.antisymm_iff, π.iUnion_subset, true_and_iff, Set.subset_def, mem_iUnion, Box.mem_coe]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : J ≤ I\n⊢ IsPartition (single I J h) ↔ J = I\n[PROOFSTEP]\nsimp [isPartition_iff_iUnion_eq]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : IsPartition π\nhx : x ∈ I\n⊢ ∃! J x_1, x ∈ J\n[PROOFSTEP]\nrcases h x hx with ⟨J, h, hx⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nI J✝ J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh✝ : IsPartition π\nhx✝ : x ∈ I\nJ : Box ι\nh : J ∈ π\nhx : x ∈ J\n⊢ ∃! J x_1, x ∈ J\n[PROOFSTEP]\nexact ExistsUnique.intro₂ J h hx fun J' h' hx' => π.eq_of_mem_of_mem h' h hx' hx\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : IsPartition π\nhJ : J ≤ I\n⊢ Prepartition.iUnion (restrict π J) = ↑J\n[PROOFSTEP]\nsimp [h.iUnion_eq, hJ]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh₁ : IsPartition π₁\nh₂ : IsPartition π₂\n⊢ Prepartition.iUnion (π₁ ⊓ π₂) = ↑I\n[PROOFSTEP]\nsimp [h₁.iUnion_eq, h₂.iUnion_eq]\n[GOAL]\nι : Type u_1\nI J J₁ J₂ : Box ι\nπ π₁ π₂ : Prepartition I\nx : ι → ℝ\nπi πi₁ πi₂ : (J : Box ι) → Prepartition J\nh : Prepartition.iUnion π₂ = ↑I \\ Prepartition.iUnion π₁\n⊢ Prepartition.iUnion π₁ ∪ Prepartition.iUnion π₂ = ↑I\n[PROOFSTEP]\nsimp [h, π₁.iUnion_subset]\n", "meta": {"mathlib_filename": "Mathlib.Analysis.BoxIntegral.Partition.Basic", "llama_tokens": 32436, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5312093733737563, "lm_q2_score": 0.48828339529583464, "lm_q1q2_score": 0.2593807164439105}}
{"text": "[GOAL]\nn : ℕ\nc : { c // Composition.length c < n + 2 }\n⊢ (invImage (fun a => sizeOf a) instWellFoundedRelation).1 (Composition.length ↑c) (Nat.succ (Nat.succ n))\n[PROOFSTEP]\nexact c.2\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ leftInv p i 0 = 0\n[PROOFSTEP]\nrw [leftInv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ leftInv p i 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 F E)) ↑(ContinuousLinearEquiv.symm i)\n[PROOFSTEP]\nrw [leftInv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ leftInv (removeZero p) i = leftInv p i\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\n⊢ leftInv (removeZero p) i n = leftInv p i n\n[PROOFSTEP]\ninduction' n using Nat.strongRec' with n IH\n[GOAL]\ncase h.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < n → leftInv (removeZero p) i m = leftInv p i m\n⊢ leftInv (removeZero p) i n = leftInv p i n\n[PROOFSTEP]\nmatch n with\n| 0 =>\n  simp\n    -- if one replaces `simp` with `refl`, the proof times out in the kernel.\n| 1 =>\n  simp\n    -- TODO: why?\n| n + 2 =>\n  simp only [leftInv, neg_inj]\n  refine' Finset.sum_congr rfl fun c cuniv => _\n  rcases c with ⟨c, hc⟩\n  ext v\n  dsimp\n  simp [IH _ hc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < 0 → leftInv (removeZero p) i m = leftInv p i m\n⊢ leftInv (removeZero p) i 0 = leftInv p i 0\n[PROOFSTEP]\nsimp\n  -- if one replaces `simp` with `refl`, the proof times out in the kernel.\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < 1 → leftInv (removeZero p) i m = leftInv p i m\n⊢ leftInv (removeZero p) i 1 = leftInv p i 1\n[PROOFSTEP]\nsimp\n  -- TODO: why?\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\n⊢ leftInv (removeZero p) i (n + 2) = leftInv p i (n + 2)\n[PROOFSTEP]\nsimp only [leftInv, neg_inj]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\n⊢ ∑ c : { c // Composition.length c < n + 2 },\n      ContinuousMultilinearMap.compAlongComposition\n        (compContinuousLinearMap (removeZero p) ↑(ContinuousLinearEquiv.symm i)) (↑c)\n        (leftInv (removeZero p) i (Composition.length ↑c)) =\n    ∑ c : { c // Composition.length c < n + 2 },\n      ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i)) (↑c)\n        (leftInv p i (Composition.length ↑c))\n[PROOFSTEP]\nrefine' Finset.sum_congr rfl fun c cuniv => _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\nc : { c // Composition.length c < n + 2 }\ncuniv : c ∈ univ\n⊢ ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap (removeZero p) ↑(ContinuousLinearEquiv.symm i))\n      (↑c) (leftInv (removeZero p) i (Composition.length ↑c)) =\n    ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i)) (↑c)\n      (leftInv p i (Composition.length ↑c))\n[PROOFSTEP]\nrcases c with ⟨c, hc⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\nc : Composition (n + 2)\nhc : Composition.length c < n + 2\ncuniv : { val := c, property := hc } ∈ univ\n⊢ ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap (removeZero p) ↑(ContinuousLinearEquiv.symm i))\n      (↑{ val := c, property := hc }) (leftInv (removeZero p) i (Composition.length ↑{ val := c, property := hc })) =\n    ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i))\n      (↑{ val := c, property := hc }) (leftInv p i (Composition.length ↑{ val := c, property := hc }))\n[PROOFSTEP]\next v\n[GOAL]\ncase mk.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\nc : Composition (n + 2)\nhc : Composition.length c < n + 2\ncuniv : { val := c, property := hc } ∈ univ\nv : Fin (n + 2) → F\n⊢ ↑(ContinuousMultilinearMap.compAlongComposition\n          (compContinuousLinearMap (removeZero p) ↑(ContinuousLinearEquiv.symm i)) (↑{ val := c, property := hc })\n          (leftInv (removeZero p) i (Composition.length ↑{ val := c, property := hc })))\n      v =\n    ↑(ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i))\n          (↑{ val := c, property := hc }) (leftInv p i (Composition.length ↑{ val := c, property := hc })))\n      v\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → leftInv (removeZero p) i m = leftInv p i m\nc : Composition (n + 2)\nhc : Composition.length c < n + 2\ncuniv : { val := c, property := hc } ∈ univ\nv : Fin (n + 2) → F\n⊢ ↑(leftInv (removeZero p) i (Composition.length c))\n      (applyComposition (compContinuousLinearMap (removeZero p) ↑(ContinuousLinearEquiv.symm i)) c v) =\n    ↑(leftInv p i (Composition.length c))\n      (applyComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i)) c v)\n[PROOFSTEP]\nsimp [IH _ hc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ FormalMultilinearSeries.comp (leftInv p i) p = id 𝕜 E\n[PROOFSTEP]\next (n v)\n[GOAL]\ncase h.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn : ℕ\nv : Fin n → E\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p n) v = ↑(id 𝕜 E n) v\n[PROOFSTEP]\nmatch n with\n| 0 =>\n  simp only [leftInv_coeff_zero, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne.def, not_false_iff,\n    zero_ne_one, comp_coeff_zero']\n| 1 =>\n  simp only [leftInv_coeff_one, comp_coeff_one, h, id_apply_one, ContinuousLinearEquiv.coe_apply,\n    ContinuousLinearEquiv.symm_apply_apply, continuousMultilinearCurryFin1_symm_apply]\n|\nn +\n    2 =>\n  have A :\n    (Finset.univ : Finset (Composition (n + 2))) =\n      {c | Composition.length c < n + 2}.toFinset ∪ {Composition.ones (n + 2)} :=\n    by\n    refine' Subset.antisymm (fun c _ => _) (subset_univ _)\n    by_cases h : c.length < n + 2\n    · simp [h, Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n    · simp [Composition.eq_ones_iff_le_length.2 (not_lt.1 h)]\n  have B :\n    Disjoint ({c | Composition.length c < n + 2} : Set (Composition (n + 2))).toFinset {Composition.ones (n + 2)} := by\n    simp [Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n  have C :\n    ((p.leftInv i (Composition.ones (n + 2)).length) fun j : Fin (Composition.ones n.succ.succ).length =>\n        p 1 fun _ => v ((Fin.castLE (Composition.length_le _)) j)) =\n      p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j :=\n    by\n    apply FormalMultilinearSeries.congr _ (Composition.ones_length _) fun j hj1 hj2 => ?_\n    exact FormalMultilinearSeries.congr _ rfl fun k _ _ => by congr\n  have D :\n    (p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j) =\n      -∑ c : Composition (n + 2) in {c : Composition (n + 2) | c.length < n + 2}.toFinset,\n          (p.leftInv i c.length) (p.applyComposition c v) :=\n    by\n    simp only [leftInv, ContinuousMultilinearMap.neg_apply, neg_inj, ContinuousMultilinearMap.sum_apply]\n    convert\n      (sum_toFinset_eq_subtype (fun c : Composition (n + 2) => c.length < n + 2)\n            (fun c : Composition (n + 2) =>\n              (ContinuousMultilinearMap.compAlongComposition (p.compContinuousLinearMap (i.symm : F →L[𝕜] E)) c\n                  (p.leftInv i c.length))\n                fun j : Fin (n + 2) => p 1 fun _ : Fin 1 => v j)).symm.trans\n        _\n    simp only [compContinuousLinearMap_applyComposition, ContinuousMultilinearMap.compAlongComposition_apply]\n    congr\n    ext c\n    congr\n    ext k\n    simp [h, Function.comp]\n  simp [FormalMultilinearSeries.comp, show n + 2 ≠ 1 by norm_num, A, Finset.sum_union B, applyComposition_ones, C, D,\n    -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn : ℕ\nv : Fin 0 → E\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p 0) v = ↑(id 𝕜 E 0) v\n[PROOFSTEP]\nsimp only [leftInv_coeff_zero, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne.def, not_false_iff, zero_ne_one,\n  comp_coeff_zero']\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn : ℕ\nv : Fin 1 → E\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p 1) v = ↑(id 𝕜 E 1) v\n[PROOFSTEP]\nsimp only [leftInv_coeff_one, comp_coeff_one, h, id_apply_one, ContinuousLinearEquiv.coe_apply,\n  ContinuousLinearEquiv.symm_apply_apply, continuousMultilinearCurryFin1_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p (n + 2)) v = ↑(id 𝕜 E (n + 2)) v\n[PROOFSTEP]\nhave A :\n  (Finset.univ : Finset (Composition (n + 2))) =\n    {c | Composition.length c < n + 2}.toFinset ∪ {Composition.ones (n + 2)} :=\n  by\n  refine' Subset.antisymm (fun c _ => _) (subset_univ _)\n  by_cases h : c.length < n + 2\n  · simp [h, Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n  · simp [Composition.eq_ones_iff_le_length.2 (not_lt.1 h)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\n⊢ univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n[PROOFSTEP]\nrefine' Subset.antisymm (fun c _ => _) (subset_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nc : Composition (n + 2)\nx✝ : c ∈ univ\n⊢ c ∈ Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n[PROOFSTEP]\nby_cases h : c.length < n + 2\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh✝ : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nc : Composition (n + 2)\nx✝ : c ∈ univ\nh : Composition.length c < n + 2\n⊢ c ∈ Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n[PROOFSTEP]\nsimp [h, Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh✝ : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nc : Composition (n + 2)\nx✝ : c ∈ univ\nh : ¬Composition.length c < n + 2\n⊢ c ∈ Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n[PROOFSTEP]\nsimp [Composition.eq_ones_iff_le_length.2 (not_lt.1 h)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p (n + 2)) v = ↑(id 𝕜 E (n + 2)) v\n[PROOFSTEP]\nhave B :\n  Disjoint ({c | Composition.length c < n + 2} : Set (Composition (n + 2))).toFinset {Composition.ones (n + 2)} := by\n  simp [Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\n⊢ Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\n[PROOFSTEP]\nsimp [Set.mem_toFinset (s := {c | Composition.length c < n + 2})]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p (n + 2)) v = ↑(id 𝕜 E (n + 2)) v\n[PROOFSTEP]\nhave C :\n  ((p.leftInv i (Composition.ones (n + 2)).length) fun j : Fin (Composition.ones n.succ.succ).length =>\n      p 1 fun _ => v ((Fin.castLE (Composition.length_le _)) j)) =\n    p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j :=\n  by\n  apply FormalMultilinearSeries.congr _ (Composition.ones_length _) fun j hj1 hj2 => ?_\n  exact FormalMultilinearSeries.congr _ rfl fun k _ _ => by congr\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\n⊢ (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n[PROOFSTEP]\napply FormalMultilinearSeries.congr _ (Composition.ones_length _) fun j hj1 hj2 => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nj : ℕ\nhj1 : j < Composition.length (Composition.ones (n + 2))\nhj2 : j < n + 2\n⊢ (↑(p 1) fun x =>\n      v\n        (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2)\n          { val := j, isLt := hj1 })) =\n    ↑(p 1) fun x => v { val := j, isLt := hj2 }\n[PROOFSTEP]\nexact FormalMultilinearSeries.congr _ rfl fun k _ _ => by congr\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nj : ℕ\nhj1 : j < Composition.length (Composition.ones (n + 2))\nhj2 : j < n + 2\nk : ℕ\nx✝¹ x✝ : k < 1\n⊢ v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) { val := j, isLt := hj1 }) =\n    v { val := j, isLt := hj2 }\n[PROOFSTEP]\ncongr\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p (n + 2)) v = ↑(id 𝕜 E (n + 2)) v\n[PROOFSTEP]\nhave D :\n  (p.leftInv i (n + 2) fun j : Fin (n + 2) => p 1 fun _ => v j) =\n    -∑ c : Composition (n + 2) in {c : Composition (n + 2) | c.length < n + 2}.toFinset,\n        (p.leftInv i c.length) (p.applyComposition c v) :=\n  by\n  simp only [leftInv, ContinuousMultilinearMap.neg_apply, neg_inj, ContinuousMultilinearMap.sum_apply]\n  convert\n    (sum_toFinset_eq_subtype (fun c : Composition (n + 2) => c.length < n + 2)\n          (fun c : Composition (n + 2) =>\n            (ContinuousMultilinearMap.compAlongComposition (p.compContinuousLinearMap (i.symm : F →L[𝕜] E)) c\n                (p.leftInv i c.length))\n              fun j : Fin (n + 2) => p 1 fun _ : Fin 1 => v j)).symm.trans\n      _\n  simp only [compContinuousLinearMap_applyComposition, ContinuousMultilinearMap.compAlongComposition_apply]\n  congr\n  ext c\n  congr\n  ext k\n  simp [h, Function.comp]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ (↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j) =\n    -∑ c in Set.toFinset {c | Composition.length c < n + 2},\n        ↑(leftInv p i (Composition.length c)) (applyComposition p c v)\n[PROOFSTEP]\nsimp only [leftInv, ContinuousMultilinearMap.neg_apply, neg_inj, ContinuousMultilinearMap.sum_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ (∑ x : { c // Composition.length c < n + 2 },\n      ↑(ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i)) (↑x)\n            (leftInv p i (Composition.length ↑x)))\n        fun j => ↑(p 1) fun x => v j) =\n    ∑ x in Set.toFinset {c | Composition.length c < n + 2},\n      ↑(leftInv p i (Composition.length x)) (applyComposition p x v)\n[PROOFSTEP]\nconvert\n  (sum_toFinset_eq_subtype (fun c : Composition (n + 2) => c.length < n + 2)\n        (fun c : Composition (n + 2) =>\n          (ContinuousMultilinearMap.compAlongComposition (p.compContinuousLinearMap (i.symm : F →L[𝕜] E)) c\n              (p.leftInv i c.length))\n            fun j : Fin (n + 2) => p 1 fun _ : Fin 1 => v j)).symm.trans\n    _\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ (∑ a in Set.toFinset {x | Composition.length x < n + 2},\n      ↑(ContinuousMultilinearMap.compAlongComposition (compContinuousLinearMap p ↑(ContinuousLinearEquiv.symm i)) a\n            (leftInv p i (Composition.length a)))\n        fun j => ↑(p 1) fun x => v j) =\n    ∑ x in Set.toFinset {c | Composition.length c < n + 2},\n      ↑(leftInv p i (Composition.length x)) (applyComposition p x v)\n[PROOFSTEP]\nsimp only [compContinuousLinearMap_applyComposition, ContinuousMultilinearMap.compAlongComposition_apply]\n[GOAL]\ncase convert_2\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ ∑ x in Set.toFinset {x | Composition.length x < n + 2},\n      ↑(leftInv p i (Composition.length x))\n        (applyComposition p x (↑↑(ContinuousLinearEquiv.symm i) ∘ fun j => ↑(p 1) fun x => v j)) =\n    ∑ x in Set.toFinset {x | Composition.length x < n + 2},\n      ↑(leftInv p i (Composition.length x)) (applyComposition p x v)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase convert_2.e_f\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\n⊢ (fun x =>\n      ↑(leftInv p i (Composition.length x))\n        (applyComposition p x (↑↑(ContinuousLinearEquiv.symm i) ∘ fun j => ↑(p 1) fun x => v j))) =\n    fun x => ↑(leftInv p i (Composition.length x)) (applyComposition p x v)\n[PROOFSTEP]\next c\n[GOAL]\ncase convert_2.e_f.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\nc : Composition (n + 2)\n⊢ ↑(leftInv p i (Composition.length c))\n      (applyComposition p c (↑↑(ContinuousLinearEquiv.symm i) ∘ fun j => ↑(p 1) fun x => v j)) =\n    ↑(leftInv p i (Composition.length c)) (applyComposition p c v)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase convert_2.e_f.h.h.e_6.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\nc : Composition (n + 2)\n⊢ applyComposition p c (↑↑(ContinuousLinearEquiv.symm i) ∘ fun j => ↑(p 1) fun x => v j) = applyComposition p c v\n[PROOFSTEP]\next k\n[GOAL]\ncase convert_2.e_f.h.h.e_6.h.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\nc : Composition (n + 2)\nk : Fin (Composition.length c)\n⊢ applyComposition p c (↑↑(ContinuousLinearEquiv.symm i) ∘ fun j => ↑(p 1) fun x => v j) k = applyComposition p c v k\n[PROOFSTEP]\nsimp [h, Function.comp]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\nD :\n  (↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j) =\n    -∑ c in Set.toFinset {c | Composition.length c < n + 2},\n        ↑(leftInv p i (Composition.length c)) (applyComposition p c v)\n⊢ ↑(FormalMultilinearSeries.comp (leftInv p i) p (n + 2)) v = ↑(id 𝕜 E (n + 2)) v\n[PROOFSTEP]\nsimp [FormalMultilinearSeries.comp, show n + 2 ≠ 1 by norm_num, A, Finset.sum_union B, applyComposition_ones, C, D,\n  -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nn✝ n : ℕ\nv : Fin (n + 2) → E\nA : univ = Set.toFinset {c | Composition.length c < n + 2} ∪ {Composition.ones (n + 2)}\nB : Disjoint (Set.toFinset {c | Composition.length c < n + 2}) {Composition.ones (n + 2)}\nC :\n  (↑(leftInv p i (Composition.length (Composition.ones (n + 2)))) fun j =>\n      ↑(p 1) fun x => v (Fin.castLE (_ : Composition.length (Composition.ones (Nat.succ (Nat.succ n))) ≤ n + 2) j)) =\n    ↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j\nD :\n  (↑(leftInv p i (n + 2)) fun j => ↑(p 1) fun x => v j) =\n    -∑ c in Set.toFinset {c | Composition.length c < n + 2},\n        ↑(leftInv p i (Composition.length c)) (applyComposition p c v)\n⊢ n + 2 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ rightInv p i 0 = 0\n[PROOFSTEP]\nrw [rightInv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ rightInv p i 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 F E)) ↑(ContinuousLinearEquiv.symm i)\n[PROOFSTEP]\nrw [rightInv]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\n⊢ rightInv (removeZero p) i = rightInv p i\n[PROOFSTEP]\next1 n\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\n⊢ rightInv (removeZero p) i n = rightInv p i n\n[PROOFSTEP]\ninduction' n using Nat.strongRec' with n IH\n[GOAL]\ncase h.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < n → rightInv (removeZero p) i m = rightInv p i m\n⊢ rightInv (removeZero p) i n = rightInv p i n\n[PROOFSTEP]\nmatch n with\n| 0 => simp only [rightInv_coeff_zero]\n| 1 => simp only [rightInv_coeff_one]\n| n + 2 =>\n  simp only [rightInv, neg_inj]\n  rw [removeZero_comp_of_pos _ _ (add_pos_of_nonneg_of_pos n.zero_le zero_lt_two)]\n  congr (config := { closePost := false }) 2 with k\n  by_cases hk : k < n + 2 <;> simp [hk, IH]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < 0 → rightInv (removeZero p) i m = rightInv p i m\n⊢ rightInv (removeZero p) i 0 = rightInv p i 0\n[PROOFSTEP]\nsimp only [rightInv_coeff_zero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nIH : ∀ (m : ℕ), m < 1 → rightInv (removeZero p) i m = rightInv p i m\n⊢ rightInv (removeZero p) i 1 = rightInv p i 1\n[PROOFSTEP]\nsimp only [rightInv_coeff_one]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\n⊢ rightInv (removeZero p) i (n + 2) = rightInv p i (n + 2)\n[PROOFSTEP]\nsimp only [rightInv, neg_inj]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\n⊢ ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (FormalMultilinearSeries.comp (removeZero p) (fun k => if k < n + 2 then rightInv (removeZero p) i k else 0)\n        (n + 2)) =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2))\n[PROOFSTEP]\nrw [removeZero_comp_of_pos _ _ (add_pos_of_nonneg_of_pos n.zero_le zero_lt_two)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\n⊢ ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv (removeZero p) i k else 0) (n + 2)) =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2))\n[PROOFSTEP]\ncongr (config := { closePost := false }) 2 with k\n[GOAL]\ncase e_f.e_p.h.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\nk : ℕ\nx✝ : Fin k → F\n⊢ ↑(if k < n + 2 then rightInv (removeZero p) i k else 0) x✝ = ↑(if k < n + 2 then rightInv p i k else 0) x✝\n[PROOFSTEP]\nby_cases hk : k < n + 2\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\nk : ℕ\nx✝ : Fin k → F\nhk : k < n + 2\n⊢ ↑(if k < n + 2 then rightInv (removeZero p) i k else 0) x✝ = ↑(if k < n + 2 then rightInv p i k else 0) x✝\n[PROOFSTEP]\nsimp [hk, IH]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nIH : ∀ (m : ℕ), m < n + 2 → rightInv (removeZero p) i m = rightInv p i m\nk : ℕ\nx✝ : Fin k → F\nhk : ¬k < n + 2\n⊢ ↑(if k < n + 2 then rightInv (removeZero p) i k else 0) x✝ = ↑(if k < n + 2 then rightInv p i k else 0) x✝\n[PROOFSTEP]\nsimp [hk, IH]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\n⊢ ↑(FormalMultilinearSeries.comp p q n) v =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c}, ↑(p (Composition.length c)) (applyComposition q c v) +\n      ↑(p 1) fun x => ↑(q n) v\n[PROOFSTEP]\nhave A : (Finset.univ : Finset (Composition n)) = {c | 1 < Composition.length c}.toFinset ∪ {Composition.single n hn} :=\n  by\n  refine' Subset.antisymm (fun c _ => _) (subset_univ _)\n  by_cases h : 1 < c.length\n  · simp [h, Set.mem_toFinset (s := {c | 1 < Composition.length c})]\n  · have : c.length = 1 := by refine' (eq_iff_le_not_lt.2 ⟨_, h⟩).symm; exact c.length_pos_of_pos hn\n    rw [← Composition.eq_single_iff_length hn] at this \n    simp [this]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\n⊢ univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nrefine' Subset.antisymm (fun c _ => _) (subset_univ _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\n⊢ c ∈ Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nby_cases h : 1 < c.length\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : 1 < Composition.length c\n⊢ c ∈ Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nsimp [h, Set.mem_toFinset (s := {c | 1 < Composition.length c})]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : ¬1 < Composition.length c\n⊢ c ∈ Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nhave : c.length = 1 := by refine' (eq_iff_le_not_lt.2 ⟨_, h⟩).symm; exact c.length_pos_of_pos hn\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : ¬1 < Composition.length c\n⊢ Composition.length c = 1\n[PROOFSTEP]\nrefine' (eq_iff_le_not_lt.2 ⟨_, h⟩).symm\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : ¬1 < Composition.length c\n⊢ 1 ≤ Composition.length c\n[PROOFSTEP]\nexact c.length_pos_of_pos hn\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : ¬1 < Composition.length c\nthis : Composition.length c = 1\n⊢ c ∈ Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nrw [← Composition.eq_single_iff_length hn] at this \n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nc : Composition n\nx✝ : c ∈ univ\nh : ¬1 < Composition.length c\nthis : c = Composition.single n hn\n⊢ c ∈ Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n[PROOFSTEP]\nsimp [this]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n⊢ ↑(FormalMultilinearSeries.comp p q n) v =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c}, ↑(p (Composition.length c)) (applyComposition q c v) +\n      ↑(p 1) fun x => ↑(q n) v\n[PROOFSTEP]\nhave B : Disjoint ({c | 1 < Composition.length c} : Set (Composition n)).toFinset {Composition.single n hn} := by\n  simp [Set.mem_toFinset (s := {c | 1 < Composition.length c})]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\n⊢ Disjoint (Set.toFinset {c | 1 < Composition.length c}) {Composition.single n hn}\n[PROOFSTEP]\nsimp [Set.mem_toFinset (s := {c | 1 < Composition.length c})]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\nB : Disjoint (Set.toFinset {c | 1 < Composition.length c}) {Composition.single n hn}\n⊢ ↑(FormalMultilinearSeries.comp p q n) v =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c}, ↑(p (Composition.length c)) (applyComposition q c v) +\n      ↑(p 1) fun x => ↑(q n) v\n[PROOFSTEP]\nhave C :\n  p (Composition.single n hn).length (q.applyComposition (Composition.single n hn) v) = p 1 fun _ : Fin 1 => q n v :=\n  by\n  apply p.congr (Composition.single_length hn) fun j hj1 _ => ?_\n  simp [applyComposition_single]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\nB : Disjoint (Set.toFinset {c | 1 < Composition.length c}) {Composition.single n hn}\n⊢ ↑(p (Composition.length (Composition.single n hn))) (applyComposition q (Composition.single n hn) v) =\n    ↑(p 1) fun x => ↑(q n) v\n[PROOFSTEP]\napply p.congr (Composition.single_length hn) fun j hj1 _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\nB : Disjoint (Set.toFinset {c | 1 < Composition.length c}) {Composition.single n hn}\nj : ℕ\nhj1 : j < Composition.length (Composition.single n hn)\nx✝ : j < 1\n⊢ applyComposition q (Composition.single n hn) v { val := j, isLt := hj1 } = ↑(q n) v\n[PROOFSTEP]\nsimp [applyComposition_single]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 0 < n\np : FormalMultilinearSeries 𝕜 E F\nq : FormalMultilinearSeries 𝕜 F E\nv : Fin n → F\nA : univ = Set.toFinset {c | 1 < Composition.length c} ∪ {Composition.single n hn}\nB : Disjoint (Set.toFinset {c | 1 < Composition.length c}) {Composition.single n hn}\nC :\n  ↑(p (Composition.length (Composition.single n hn))) (applyComposition q (Composition.single n hn) v) =\n    ↑(p 1) fun x => ↑(q n) v\n⊢ ↑(FormalMultilinearSeries.comp p q n) v =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c}, ↑(p (Composition.length c)) (applyComposition q c v) +\n      ↑(p 1) fun x => ↑(q n) v\n[PROOFSTEP]\nsimp [FormalMultilinearSeries.comp, A, Finset.sum_union B, C, -Set.toFinset_setOf, -add_right_inj,\n  -Composition.single_length]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\n⊢ ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      ↑(p (Composition.length c)) (applyComposition (fun k => if k < n + 2 then rightInv p i k else 0) c v) =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      ↑(p (Composition.length c)) (applyComposition (rightInv p i) c v)\n[PROOFSTEP]\nhave N : 0 < n + 2 := by norm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\n⊢ 0 < n + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\n⊢ ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      ↑(p (Composition.length c)) (applyComposition (fun k => if k < n + 2 then rightInv p i k else 0) c v) =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      ↑(p (Composition.length c)) (applyComposition (rightInv p i) c v)\n[PROOFSTEP]\nrefine' sum_congr rfl fun c hc => p.congr rfl fun j hj1 hj2 => _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\nc : Composition (n + 2)\nhc : c ∈ Set.toFinset {c | 1 < Composition.length c}\nj : ℕ\nhj1 hj2 : j < Composition.length c\n⊢ applyComposition (fun k => if k < n + 2 then rightInv p i k else 0) c v { val := j, isLt := hj1 } =\n    applyComposition (rightInv p i) c v { val := j, isLt := hj2 }\n[PROOFSTEP]\nhave : ∀ k, c.blocksFun k < n + 2 :=\n  by\n  simp only [Set.mem_toFinset (s := {c : Composition (n + 2) | 1 < c.length}), Set.mem_setOf_eq] at hc \n  simp [← Composition.ne_single_iff N, Composition.eq_single_iff_length, ne_of_gt hc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\nc : Composition (n + 2)\nhc : c ∈ Set.toFinset {c | 1 < Composition.length c}\nj : ℕ\nhj1 hj2 : j < Composition.length c\n⊢ ∀ (k : Fin (Composition.length c)), Composition.blocksFun c k < n + 2\n[PROOFSTEP]\nsimp only [Set.mem_toFinset (s := {c : Composition (n + 2) | 1 < c.length}), Set.mem_setOf_eq] at hc \n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\nc : Composition (n + 2)\nj : ℕ\nhj1 hj2 : j < Composition.length c\nhc : 1 < Composition.length c\n⊢ ∀ (k : Fin (Composition.length c)), Composition.blocksFun c k < n + 2\n[PROOFSTEP]\nsimp [← Composition.ne_single_iff N, Composition.eq_single_iff_length, ne_of_gt hc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\nc : Composition (n + 2)\nhc : c ∈ Set.toFinset {c | 1 < Composition.length c}\nj : ℕ\nhj1 hj2 : j < Composition.length c\nthis : ∀ (k : Fin (Composition.length c)), Composition.blocksFun c k < n + 2\n⊢ applyComposition (fun k => if k < n + 2 then rightInv p i k else 0) c v { val := j, isLt := hj1 } =\n    applyComposition (rightInv p i) c v { val := j, isLt := hj2 }\n[PROOFSTEP]\nsimp [applyComposition, this]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ FormalMultilinearSeries.comp p (rightInv p i) = id 𝕜 F\n[PROOFSTEP]\next (n v)\n[GOAL]\ncase h.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn : ℕ\nv : Fin n → F\n⊢ ↑(FormalMultilinearSeries.comp p (rightInv p i) n) v = ↑(id 𝕜 F n) v\n[PROOFSTEP]\nmatch n with\n| 0 =>\n  simp only [h0, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne.def, not_false_iff, zero_ne_one,\n    comp_coeff_zero']\n| 1 =>\n  simp only [comp_coeff_one, h, rightInv_coeff_one, ContinuousLinearEquiv.apply_symm_apply, id_apply_one,\n    ContinuousLinearEquiv.coe_apply, continuousMultilinearCurryFin1_symm_apply]\n| n + 2 =>\n  have N : 0 < n + 2 := by norm_num\n  simp [comp_rightInv_aux1 N, h, rightInv, lt_irrefl n, show n + 2 ≠ 1 by norm_num, ← sub_eq_add_neg, sub_eq_zero,\n    comp_rightInv_aux2, -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn : ℕ\nv : Fin 0 → F\n⊢ ↑(FormalMultilinearSeries.comp p (rightInv p i) 0) v = ↑(id 𝕜 F 0) v\n[PROOFSTEP]\nsimp only [h0, ContinuousMultilinearMap.zero_apply, id_apply_ne_one, Ne.def, not_false_iff, zero_ne_one,\n  comp_coeff_zero']\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn : ℕ\nv : Fin 1 → F\n⊢ ↑(FormalMultilinearSeries.comp p (rightInv p i) 1) v = ↑(id 𝕜 F 1) v\n[PROOFSTEP]\nsimp only [comp_coeff_one, h, rightInv_coeff_one, ContinuousLinearEquiv.apply_symm_apply, id_apply_one,\n  ContinuousLinearEquiv.coe_apply, continuousMultilinearCurryFin1_symm_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn✝ n : ℕ\nv : Fin (n + 2) → F\n⊢ ↑(FormalMultilinearSeries.comp p (rightInv p i) (n + 2)) v = ↑(id 𝕜 F (n + 2)) v\n[PROOFSTEP]\nhave N : 0 < n + 2 := by norm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn✝ n : ℕ\nv : Fin (n + 2) → F\n⊢ 0 < n + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn✝ n : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\n⊢ ↑(FormalMultilinearSeries.comp p (rightInv p i) (n + 2)) v = ↑(id 𝕜 F (n + 2)) v\n[PROOFSTEP]\nsimp [comp_rightInv_aux1 N, h, rightInv, lt_irrefl n, show n + 2 ≠ 1 by norm_num, ← sub_eq_add_neg, sub_eq_zero,\n  comp_rightInv_aux2, -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\nn✝ n : ℕ\nv : Fin (n + 2) → F\nN : 0 < n + 2\n⊢ n + 2 ≠ 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nhn : 2 ≤ n\n⊢ rightInv p i n =\n    -ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n        (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)\n[PROOFSTEP]\nmatch n with\n| 0 => exact False.elim (zero_lt_two.not_le hn)\n| 1 => exact False.elim (one_lt_two.not_le hn)\n| n + 2 =>\n  simp only [rightInv, neg_inj]\n  congr (config := { closePost := false }) 1\n  ext v\n  have N : 0 < n + 2 := by norm_num\n  have : ((p 1) fun i : Fin 1 => 0) = 0 := ContinuousMultilinearMap.map_zero _\n  simp [comp_rightInv_aux1 N, lt_irrefl n, this, comp_rightInv_aux2, -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nhn : 2 ≤ 0\n⊢ rightInv p i 0 =\n    -ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n        (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)\n[PROOFSTEP]\nexact False.elim (zero_lt_two.not_le hn)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn : ℕ\nhn : 2 ≤ 1\n⊢ rightInv p i 1 =\n    -ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n        (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)\n[PROOFSTEP]\nexact False.elim (one_lt_two.not_le hn)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\n⊢ rightInv p i (n + 2) =\n    -ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n        (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)\n[PROOFSTEP]\nsimp only [rightInv, neg_inj]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\n⊢ ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2)) =\n    ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n      (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)\n[PROOFSTEP]\ncongr (config := { closePost := false }) 1\n[GOAL]\ncase e_f\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\n⊢ FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2) =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c\n[PROOFSTEP]\next v\n[GOAL]\ncase e_f.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\nv : Fin (n + 2) → F\n⊢ ↑(FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2)) v =\n    ↑(∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c) v\n[PROOFSTEP]\nhave N : 0 < n + 2 := by norm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\nv : Fin (n + 2) → F\n⊢ 0 < n + 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\ncase e_f.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\nv : Fin (n + 2) → F\nN : 0 < n + 2\n⊢ ↑(FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2)) v =\n    ↑(∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c) v\n[PROOFSTEP]\nhave : ((p 1) fun i : Fin 1 => 0) = 0 := ContinuousMultilinearMap.map_zero _\n[GOAL]\ncase e_f.H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nn✝ n : ℕ\nhn : 2 ≤ n + 2\nv : Fin (n + 2) → F\nN : 0 < n + 2\nthis : (↑(p 1) fun i => 0) = 0\n⊢ ↑(FormalMultilinearSeries.comp p (fun k => if k < n + 2 then rightInv p i k else 0) (n + 2)) v =\n    ↑(∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c) v\n[PROOFSTEP]\nsimp [comp_rightInv_aux1 N, lt_irrefl n, this, comp_rightInv_aux2, -Set.toFinset_setOf]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ leftInv p i = FormalMultilinearSeries.comp (leftInv p i) (id 𝕜 F)\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ FormalMultilinearSeries.comp (leftInv p i) (id 𝕜 F) =\n    FormalMultilinearSeries.comp (leftInv p i) (FormalMultilinearSeries.comp p (rightInv p i))\n[PROOFSTEP]\nrw [comp_rightInv p i h h0]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ FormalMultilinearSeries.comp (leftInv p i) (FormalMultilinearSeries.comp p (rightInv p i)) =\n    FormalMultilinearSeries.comp (FormalMultilinearSeries.comp (leftInv p i) p) (rightInv p i)\n[PROOFSTEP]\nrw [comp_assoc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ FormalMultilinearSeries.comp (FormalMultilinearSeries.comp (leftInv p i) p) (rightInv p i) =\n    FormalMultilinearSeries.comp (id 𝕜 E) (rightInv p i)\n[PROOFSTEP]\nrw [leftInv_comp p i h]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\nh0 : p 0 = 0\n⊢ FormalMultilinearSeries.comp (id 𝕜 E) (rightInv p i) = rightInv p i\n[PROOFSTEP]\nsimp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ leftInv p i = leftInv (removeZero p) i\n[PROOFSTEP]\nrw [leftInv_removeZero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ leftInv (removeZero p) i = rightInv (removeZero p) i\n[PROOFSTEP]\napply leftInv_eq_rightInv_aux\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ removeZero p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h0\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ removeZero p 0 = 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ p (0 + 1) = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n[PROOFSTEP]\nexact h\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nh : p 1 = ↑(LinearIsometryEquiv.symm (continuousMultilinearCurryFin1 𝕜 E F)) ↑i\n⊢ rightInv (removeZero p) i = rightInv p i\n[PROOFSTEP]\nrw [rightInv_removeZero]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ k in Ico 2 (n + 1),\n      a ^ k *\n        ∑ c in Set.toFinset {c | 1 < Composition.length c},\n          r ^ Composition.length c * ∏ j : Fin (Composition.length c), p (Composition.blocksFun c j) =\n    ∑ k in Ico 2 (n + 1),\n      ∑ c in Set.toFinset {c | 1 < Composition.length c},\n        ∏ j : Fin (Composition.length c), r * (a ^ Composition.blocksFun c j * p (Composition.blocksFun c j))\n[PROOFSTEP]\nsimp_rw [mul_sum]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ x in Ico 2 (n + 1),\n      ∑ x_1 in Set.toFinset {c | 1 < Composition.length c},\n        a ^ x * (r ^ Composition.length x_1 * ∏ j : Fin (Composition.length x_1), p (Composition.blocksFun x_1 j)) =\n    ∑ k in Ico 2 (n + 1),\n      ∑ c in Set.toFinset {c | 1 < Composition.length c},\n        ∏ j : Fin (Composition.length c), r * (a ^ Composition.blocksFun c j * p (Composition.blocksFun c j))\n[PROOFSTEP]\napply sum_congr rfl fun k _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nx✝ : k ∈ Ico 2 (n + 1)\n⊢ ∑ x in Set.toFinset {c | 1 < Composition.length c},\n      a ^ k * (r ^ Composition.length x * ∏ j : Fin (Composition.length x), p (Composition.blocksFun x j)) =\n    ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      ∏ j : Fin (Composition.length c), r * (a ^ Composition.blocksFun c j * p (Composition.blocksFun c j))\n[PROOFSTEP]\napply sum_congr rfl fun c _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nx✝¹ : k ∈ Ico 2 (n + 1)\nc : Composition k\nx✝ : c ∈ Set.toFinset {c | 1 < Composition.length c}\n⊢ a ^ k * (r ^ Composition.length c * ∏ j : Fin (Composition.length c), p (Composition.blocksFun c j)) =\n    ∏ j : Fin (Composition.length c), r * (a ^ Composition.blocksFun c j * p (Composition.blocksFun c j))\n[PROOFSTEP]\nrw [prod_mul_distrib, prod_mul_distrib, prod_pow_eq_pow_sum, Composition.sum_blocksFun, prod_const, card_fin]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nx✝¹ : k ∈ Ico 2 (n + 1)\nc : Composition k\nx✝ : c ∈ Set.toFinset {c | 1 < Composition.length c}\n⊢ a ^ k * (r ^ Composition.length c * ∏ j : Fin (Composition.length c), p (Composition.blocksFun c j)) =\n    r ^ Composition.length c * (a ^ k * ∏ x : Fin (Composition.length c), p (Composition.blocksFun c x))\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ k in Ico 2 (n + 1),\n      ∑ c in Set.toFinset {c | 1 < Composition.length c},\n        ∏ j : Fin (Composition.length c), r * (a ^ Composition.blocksFun c j * p (Composition.blocksFun c j)) ≤\n    ∑ d in compPartialSumTarget 2 (n + 1) n,\n      ∏ j : Fin (Composition.length d.snd), r * (a ^ Composition.blocksFun d.snd j * p (Composition.blocksFun d.snd j))\n[PROOFSTEP]\nrw [sum_sigma']\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ x in Finset.sigma (Ico 2 (n + 1)) fun k => Set.toFinset {c | 1 < Composition.length c},\n      ∏ j : Fin (Composition.length x.snd),\n        r * (a ^ Composition.blocksFun x.snd j * p (Composition.blocksFun x.snd j)) ≤\n    ∑ d in compPartialSumTarget 2 (n + 1) n,\n      ∏ j : Fin (Composition.length d.snd), r * (a ^ Composition.blocksFun d.snd j * p (Composition.blocksFun d.snd j))\n[PROOFSTEP]\nrefine'\n  sum_le_sum_of_subset_of_nonneg _ fun x _ _ =>\n    prod_nonneg fun j _ => mul_nonneg hr (mul_nonneg (pow_nonneg ha _) (hp _))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ (Finset.sigma (Ico 2 (n + 1)) fun k => Set.toFinset {c | 1 < Composition.length c}) ⊆ compPartialSumTarget 2 (n + 1) n\n[PROOFSTEP]\nrintro ⟨k, c⟩ hd\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : { fst := k, snd := c } ∈ Finset.sigma (Ico 2 (n + 1)) fun k => Set.toFinset {c | 1 < Composition.length c}\n⊢ { fst := k, snd := c } ∈ compPartialSumTarget 2 (n + 1) n\n[PROOFSTEP]\nsimp only [Set.mem_toFinset (s := {c | 1 < Composition.length c}), mem_Ico, mem_sigma, Set.mem_setOf_eq] at hd \n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\n⊢ { fst := k, snd := c } ∈ compPartialSumTarget 2 (n + 1) n\n[PROOFSTEP]\nsimp only [mem_compPartialSumTarget_iff]\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\n⊢ 2 ≤ Composition.length c ∧\n    Composition.length c < n + 1 ∧\n      ∀ (j : Fin (Composition.length { fst := k, snd := c }.snd)), Composition.blocksFun c j < n\n[PROOFSTEP]\nrefine' ⟨hd.2, c.length_le.trans_lt hd.1.2, fun j => _⟩\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\nj : Fin (Composition.length { fst := k, snd := c }.snd)\n⊢ Composition.blocksFun c j < n\n[PROOFSTEP]\nhave : c ≠ Composition.single k (zero_lt_two.trans_le hd.1.1) := by\n  simp [Composition.eq_single_iff_length, ne_of_gt hd.2]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\nj : Fin (Composition.length { fst := k, snd := c }.snd)\n⊢ c ≠ Composition.single k (_ : 0 < k)\n[PROOFSTEP]\nsimp [Composition.eq_single_iff_length, ne_of_gt hd.2]\n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\nj : Fin (Composition.length { fst := k, snd := c }.snd)\nthis : c ≠ Composition.single k (_ : 0 < k)\n⊢ Composition.blocksFun c j < n\n[PROOFSTEP]\nrw [Composition.ne_single_iff] at this \n[GOAL]\ncase mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nc : Composition k\nhd : (2 ≤ k ∧ k < n + 1) ∧ 1 < Composition.length c\nj : Fin (Composition.length { fst := k, snd := c }.snd)\nthis : ∀ (i : Fin (Composition.length c)), Composition.blocksFun c i < k\n⊢ Composition.blocksFun c j < n\n[PROOFSTEP]\nexact (this j).trans_le (Nat.lt_succ_iff.mp hd.1.2)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ d in compPartialSumTarget 2 (n + 1) n,\n      ∏ j : Fin (Composition.length d.snd),\n        r * (a ^ Composition.blocksFun d.snd j * p (Composition.blocksFun d.snd j)) =\n    ∑ e in compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ Sigma.snd e j * p (Sigma.snd e j))\n[PROOFSTEP]\nsymm\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ e in compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ Sigma.snd e j * p (Sigma.snd e j)) =\n    ∑ d in compPartialSumTarget 2 (n + 1) n,\n      ∏ j : Fin (Composition.length d.snd), r * (a ^ Composition.blocksFun d.snd j * p (Composition.blocksFun d.snd j))\n[PROOFSTEP]\napply compChangeOfVariables_sum\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∀ (e : (n : ℕ) × (Fin n → ℕ)) (he : e ∈ compPartialSumSource 2 (n + 1) n),\n    ∏ j : Fin e.fst, r * (a ^ Sigma.snd e j * p (Sigma.snd e j)) =\n      ∏ j : Fin (Composition.length (compChangeOfVariables 2 (n + 1) n e he).snd),\n        r *\n          (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n e he).snd j *\n            p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n e he).snd j))\n[PROOFSTEP]\nrintro ⟨k, blocks_fun⟩ H\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\n⊢ ∏ j : Fin { fst := k, snd := blocks_fun }.fst,\n      r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)) =\n    ∏ j : Fin (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd),\n      r *\n        (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j *\n          p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j))\n[PROOFSTEP]\nhave K : (compChangeOfVariables 2 (n + 1) n ⟨k, blocks_fun⟩ H).snd.length = k := by simp\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\n⊢ Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.mk\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ ∏ j : Fin { fst := k, snd := blocks_fun }.fst,\n      r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)) =\n    ∏ j : Fin (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd),\n      r *\n        (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j *\n          p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase h.mk.h.e_2.e_n\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ { fst := k, snd := blocks_fun }.fst =\n    Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n[PROOFSTEP]\ntry rw [K]\n[GOAL]\ncase h.mk.h.e_2.e_n\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ { fst := k, snd := blocks_fun }.fst =\n    Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n[PROOFSTEP]\nrw [K]\n[GOAL]\ncase h.mk.h.e_4.e_1\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ Fin { fst := k, snd := blocks_fun }.fst =\n    Fin (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd)\n[PROOFSTEP]\ntry rw [K]\n[GOAL]\ncase h.mk.h.e_4.e_1\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ Fin { fst := k, snd := blocks_fun }.fst =\n    Fin (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd)\n[PROOFSTEP]\nrw [K]\n[GOAL]\ncase h.mk.h.e_4.e_2\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ HEq (Fin.fintype { fst := k, snd := blocks_fun }.fst)\n    (Fin.fintype (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd))\n[PROOFSTEP]\ntry rw [K]\n[GOAL]\ncase h.mk.h.e_4.e_2\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ HEq (Fin.fintype { fst := k, snd := blocks_fun }.fst)\n    (Fin.fintype (Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd))\n[PROOFSTEP]\nrw [K]\n[GOAL]\ncase h.mk.h.e_5\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ HEq (fun j => r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)))\n    fun j =>\n    r *\n      (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j *\n        p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j))\n[PROOFSTEP]\ntry rw [K]\n[GOAL]\ncase h.mk.h.e_5\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ HEq (fun j => r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)))\n    fun j =>\n    r *\n      (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j *\n        p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j))\n[PROOFSTEP]\nrw [K]\n[GOAL]\ncase h.mk.h.e_5\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ HEq (fun j => r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)))\n    fun j =>\n    r *\n      (a ^ Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j *\n        p (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd j))\n[PROOFSTEP]\nrw [Fin.heq_fun_iff K.symm]\n[GOAL]\ncase h.mk.h.e_5\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\n⊢ ∀ (i : Fin k),\n    r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } i * p (Sigma.snd { fst := k, snd := blocks_fun } i)) =\n      r *\n        (a ^\n            Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n              { val := ↑i,\n                isLt :=\n                  (_ :\n                    ↑i <\n                      Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd) } *\n          p\n            (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n              { val := ↑i,\n                isLt :=\n                  (_ :\n                    ↑i <\n                      Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd) }))\n[PROOFSTEP]\nintro j\n[GOAL]\ncase h.mk.h.e_5\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nk : ℕ\nblocks_fun : Fin k → ℕ\nH : { fst := k, snd := blocks_fun } ∈ compPartialSumSource 2 (n + 1) n\nK : Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd = k\nj : Fin k\n⊢ r * (a ^ Sigma.snd { fst := k, snd := blocks_fun } j * p (Sigma.snd { fst := k, snd := blocks_fun } j)) =\n    r *\n      (a ^\n          Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n            { val := ↑j,\n              isLt :=\n                (_ :\n                  ↑j < Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd) } *\n        p\n          (Composition.blocksFun (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd\n            { val := ↑j,\n              isLt :=\n                (_ :\n                  ↑j < Composition.length (compChangeOfVariables 2 (n + 1) n { fst := k, snd := blocks_fun } H).snd) }))\n[PROOFSTEP]\nrw [compChangeOfVariables_blocksFun]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ e in compPartialSumSource 2 (n + 1) n, ∏ j : Fin e.fst, r * (a ^ Sigma.snd e j * p (Sigma.snd e j)) =\n    ∑ j in Ico 2 (n + 1), r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\nrw [compPartialSumSource, ←\n  sum_sigma' (Ico 2 (n + 1)) (fun k : ℕ => (Fintype.piFinset fun _ : Fin k => Ico 1 n : Finset (Fin k → ℕ)))\n    (fun n e => ∏ j : Fin n, r * (a ^ e j * p (e j)))]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\n⊢ ∑ a_1 in Ico 2 (n + 1), ∑ s in Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin a_1, r * (a ^ s j * p (s j)) =\n    ∑ j in Ico 2 (n + 1), r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\napply sum_congr rfl fun j _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nj : ℕ\nx✝ : j ∈ Ico 2 (n + 1)\n⊢ ∑ s in Fintype.piFinset fun x => Ico 1 n, ∏ j : Fin j, r * (a ^ s j * p (s j)) =\n    r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\nsimp only [← @MultilinearMap.mkPiAlgebra_apply ℝ (Fin j) _ ℝ]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nj : ℕ\nx✝ : j ∈ Ico 2 (n + 1)\n⊢ (∑ x in Fintype.piFinset fun x => Ico 1 n,\n      ↑(MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun j => r * (a ^ x j * p (x j))) =\n    r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\nsimp only [← MultilinearMap.map_sum_finset (MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun _ (m : ℕ) => r * (a ^ m * p m)]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nj : ℕ\nx✝ : j ∈ Ico 2 (n + 1)\n⊢ (↑(MultilinearMap.mkPiAlgebra ℝ (Fin j) ℝ) fun i => ∑ j in Ico 1 n, r * (a ^ j * p j)) =\n    r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\nsimp only [MultilinearMap.mkPiAlgebra_apply]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\np : ℕ → ℝ\nhp : ∀ (k : ℕ), 0 ≤ p k\nr a : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nj : ℕ\nx✝ : j ∈ Ico 2 (n + 1)\n⊢ ∏ i : Fin j, ∑ j in Ico 1 n, r * (a ^ j * p j) = r ^ j * (∑ k in Ico 1 n, a ^ k * p k) ^ j\n[PROOFSTEP]\nsimp [prod_const, ← mul_sum, mul_pow]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ ∑ k in Ico 1 (n + 1), a ^ k * ‖rightInv p i k‖ = a * I + ∑ k in Ico 2 (n + 1), a ^ k * ‖rightInv p i k‖\n[PROOFSTEP]\nsimp only [LinearIsometryEquiv.norm_map, pow_one, rightInv_coeff_one,\n  show Ico (1 : ℕ) 2 = {1} from Nat.Ico_succ_singleton 1, sum_singleton, ← sum_Ico_consecutive _ one_le_two hn]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ a * I + ∑ k in Ico 2 (n + 1), a ^ k * ‖rightInv p i k‖ =\n    a * I +\n      ∑ k in Ico 2 (n + 1),\n        a ^ k *\n          ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n              (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ ∑ k in Ico 2 (n + 1), a ^ k * ‖rightInv p i k‖ =\n    ∑ k in Ico 2 (n + 1),\n      a ^ k *\n        ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n            (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)‖\n[PROOFSTEP]\napply sum_congr rfl fun j hj => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\n⊢ a ^ j * ‖rightInv p i j‖ =\n    a ^ j *\n      ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n          (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)‖\n[PROOFSTEP]\nrw [rightInv_coeff _ _ _ (mem_Ico.1 hj).1, norm_neg]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ a * I +\n      ∑ k in Ico 2 (n + 1),\n        a ^ k *\n          ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n              (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)‖ ≤\n    a * ‖↑(ContinuousLinearEquiv.symm i)‖ +\n      ∑ k in Ico 2 (n + 1),\n        a ^ k *\n          (I *\n            ∑ c in Set.toFinset {c | 1 < Composition.length c},\n              C * r ^ Composition.length c *\n                ∏ j : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j)‖)\n[PROOFSTEP]\napply_rules [add_le_add, le_refl, sum_le_sum fun j hj => ?_, mul_le_mul_of_nonneg_left, pow_nonneg, ha]\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\n⊢ ‖ContinuousLinearMap.compContinuousMultilinearMap (↑(ContinuousLinearEquiv.symm i))\n        (∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c)‖ ≤\n    I *\n      ∑ c in Set.toFinset {c | 1 < Composition.length c},\n        C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply (ContinuousLinearMap.norm_compContinuousMultilinearMap_le _ _).trans\n[GOAL]\ncase h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\n⊢ ‖↑(ContinuousLinearEquiv.symm i)‖ *\n      ‖∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c‖ ≤\n    I *\n      ∑ c in Set.toFinset {c | 1 < Composition.length c},\n        C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_left _ (norm_nonneg _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\n⊢ ‖∑ c in Set.toFinset {c | 1 < Composition.length c}, compAlongComposition p (rightInv p i) c‖ ≤\n    ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply (norm_sum_le _ _).trans\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\n⊢ ∑ i_1 in Set.toFinset {c | 1 < Composition.length c}, ‖compAlongComposition p (rightInv p i) i_1‖ ≤\n    ∑ c in Set.toFinset {c | 1 < Composition.length c},\n      C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply sum_le_sum fun c _ => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\nc : Composition j\nx✝ : c ∈ Set.toFinset {c | 1 < Composition.length c}\n⊢ ‖compAlongComposition p (rightInv p i) c‖ ≤\n    C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply (compAlongComposition_norm _ _ _).trans\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\nc : Composition j\nx✝ : c ∈ Set.toFinset {c | 1 < Composition.length c}\n⊢ ‖p (Composition.length c)‖ * ∏ i_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c i_1)‖ ≤\n    C * r ^ Composition.length c * ∏ j_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j_1)‖\n[PROOFSTEP]\napply mul_le_mul_of_nonneg_right (hp _)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\nj : ℕ\nhj : j ∈ Ico 2 (n + 1)\nc : Composition j\nx✝ : c ∈ Set.toFinset {c | 1 < Composition.length c}\n⊢ 0 ≤ ∏ i_1 : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c i_1)‖\n[PROOFSTEP]\nexact prod_nonneg fun j _ => norm_nonneg _\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ a * ‖↑(ContinuousLinearEquiv.symm i)‖ +\n      ∑ k in Ico 2 (n + 1),\n        a ^ k *\n          (I *\n            ∑ c in Set.toFinset {c | 1 < Composition.length c},\n              C * r ^ Composition.length c *\n                ∏ j : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j)‖) =\n    I * a +\n      I * C *\n        ∑ k in Ico 2 (n + 1),\n          a ^ k *\n            ∑ c in Set.toFinset {c | 1 < Composition.length c},\n              r ^ Composition.length c * ∏ j : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j)‖\n[PROOFSTEP]\nsimp_rw [mul_assoc C, ← mul_sum, ← mul_assoc, mul_comm _ ‖(i.symm : F →L[𝕜] E)‖, mul_assoc, ← mul_sum, ← mul_assoc,\n  mul_comm _ C, mul_assoc, ← mul_sum]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ ‖↑(ContinuousLinearEquiv.symm i)‖ * a +\n      ‖↑(ContinuousLinearEquiv.symm i)‖ *\n        (C *\n          ∑ x in Ico 2 (n + 1),\n            a ^ x *\n              ∑ x_1 in Set.toFinset {c | 1 < Composition.length c},\n                r ^ Composition.length x_1 *\n                  ∏ x_2 : Fin (Composition.length x_1), ‖rightInv p i (Composition.blocksFun x_1 x_2)‖) =\n    ‖↑(ContinuousLinearEquiv.symm i)‖ * a +\n      C *\n        (‖↑(ContinuousLinearEquiv.symm i)‖ *\n          ∑ x in Ico 2 (n + 1),\n            a ^ x *\n              ∑ x_1 in Set.toFinset {c | 1 < Composition.length c},\n                r ^ Composition.length x_1 *\n                  ∏ x_2 : Fin (Composition.length x_1), ‖rightInv p i (Composition.blocksFun x_1 x_2)‖)\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ I * a +\n      I * C *\n        ∑ k in Ico 2 (n + 1),\n          a ^ k *\n            ∑ c in Set.toFinset {c | 1 < Composition.length c},\n              r ^ Composition.length c * ∏ j : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j)‖ ≤\n    I * a + I * C * ∑ k in Ico 2 (n + 1), (r * ∑ j in Ico 1 n, a ^ j * ‖rightInv p i j‖) ^ k\n[PROOFSTEP]\napply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, norm_nonneg, hC, mul_nonneg]\n[GOAL]\ncase h₂.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\n⊢ ∑ k in Ico 2 (n + 1),\n      a ^ k *\n        ∑ c in Set.toFinset {c | 1 < Composition.length c},\n          r ^ Composition.length c * ∏ j : Fin (Composition.length c), ‖rightInv p i (Composition.blocksFun c j)‖ ≤\n    ∑ k in Ico 2 (n + 1), (r * ∑ j in Ico 1 n, a ^ j * ‖rightInv p i j‖) ^ k\n[PROOFSTEP]\nsimp_rw [mul_pow]\n[GOAL]\ncase h₂.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\nn : ℕ\nhn : 2 ≤ n + 1\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nr a C : ℝ\nhr : 0 ≤ r\nha : 0 ≤ a\nhC : 0 ≤ C\nhp : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\ni_symm : F ≃L[𝕜] E\n⊢ ∑ x in Ico 2 (n + 1),\n      a ^ x *\n        ∑ x_1 in Set.toFinset {c | 1 < Composition.length c},\n          r ^ Composition.length x_1 *\n            ∏ x_2 : Fin (Composition.length x_1), ‖rightInv p i (Composition.blocksFun x_1 x_2)‖ ≤\n    ∑ x in Ico 2 (n + 1), r ^ x * (∑ x in Ico 1 n, a ^ x * ‖rightInv p i x‖) ^ x\n[PROOFSTEP]\napply radius_right_inv_pos_of_radius_pos_aux1 n (fun k => ‖p.rightInv i k‖) (fun k => norm_nonneg _) hr ha\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nobtain ⟨C, r, Cpos, rpos, ple⟩ : ∃ (C r : _) (_ : 0 < C) (_ : 0 < r), ∀ n : ℕ, ‖p n‖ ≤ C * r ^ n :=\n  le_mul_pow_of_radius_pos p hp\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nlet I :=\n  ‖(i.symm : F →L[𝕜] E)‖\n    -- choose `a` small enough to make sure that `∑_{k ≤ n} aᵏ Qₖ` will be controllable by\n      -- induction\n[GOAL]\ncase intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nobtain ⟨a, apos, ha1, ha2⟩ :\n  ∃ (a : _) (apos : 0 < a), 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2 :=\n  by\n  have : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0)) :=\n    tendsto_const_nhds.mul tendsto_id\n  have A : ∀ᶠ a in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1 := by apply (tendsto_order.1 this).2; simp [zero_lt_one]\n  have : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0)) := tendsto_const_nhds.mul tendsto_id\n  have B : ∀ᶠ a in 𝓝 0, r * (I + 1) * a < 1 / 2 := by apply (tendsto_order.1 this).2; simp [zero_lt_one]\n  have C : ∀ᶠ a in 𝓝[>] (0 : ℝ), (0 : ℝ) < a := by filter_upwards [self_mem_nhdsWithin] with _ ha using ha\n  rcases(C.and ((A.and B).filter_mono inf_le_left)).exists with ⟨a, ha⟩\n  exact\n    ⟨a, ha.1, ha.2.1.le, ha.2.2.le⟩\n      -- check by induction that the partial sums are suitably bounded, using the choice of `a` and the\n        -- inductive control from Lemma `radius_rightInv_pos_of_radius_pos_aux2`.\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\n⊢ ∃ a apos, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nhave : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0)) :=\n  tendsto_const_nhds.mul tendsto_id\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\n⊢ ∃ a apos, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nhave A : ∀ᶠ a in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1 := by apply (tendsto_order.1 this).2; simp [zero_lt_one]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\n⊢ ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\n[PROOFSTEP]\napply (tendsto_order.1 this).2\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\n⊢ 1 > 2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0\n[PROOFSTEP]\nsimp [zero_lt_one]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\n⊢ ∃ a apos, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nhave : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0)) := tendsto_const_nhds.mul tendsto_id\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\n⊢ ∃ a apos, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nhave B : ∀ᶠ a in 𝓝 0, r * (I + 1) * a < 1 / 2 := by apply (tendsto_order.1 this).2; simp [zero_lt_one]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\n⊢ ∀ᶠ (a : ℝ) in 𝓝 0, r * (I + 1) * a < 1 / 2\n[PROOFSTEP]\napply (tendsto_order.1 this).2\n[GOAL]\ncase a\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\n⊢ 1 / 2 > r * (I + 1) * 0\n[PROOFSTEP]\nsimp [zero_lt_one]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\nB : ∀ᶠ (a : ℝ) in 𝓝 0, r * (I + 1) * a < 1 / 2\n⊢ ∃ a apos, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nhave C : ∀ᶠ a in 𝓝[>] (0 : ℝ), (0 : ℝ) < a := by filter_upwards [self_mem_nhdsWithin] with _ ha using ha\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\nB : ∀ᶠ (a : ℝ) in 𝓝 0, r * (I + 1) * a < 1 / 2\n⊢ ∀ᶠ (a : ℝ) in 𝓝[Set.Ioi 0] 0, 0 < a\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with _ ha using ha\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC✝ r : ℝ\nCpos : 0 < C✝\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C✝ * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\nB : ∀ᶠ (a : ℝ) in 𝓝 0, r * (I + 1) * a < 1 / 2\nC : ∀ᶠ (a : ℝ) in 𝓝[Set.Ioi 0] 0, 0 < a\n⊢ ∃ a apos, 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nrcases(C.and ((A.and B).filter_mono inf_le_left)).exists with ⟨a, ha⟩\n[GOAL]\ncase intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC✝ r : ℝ\nCpos : 0 < C✝\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C✝ * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\nthis✝ : Tendsto (fun a => 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a) (𝓝 0) (𝓝 (2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * 0))\nA : ∀ᶠ (a : ℝ) in 𝓝 0, 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a < 1\nthis : Tendsto (fun a => r * (I + 1) * a) (𝓝 0) (𝓝 (r * (I + 1) * 0))\nB : ∀ᶠ (a : ℝ) in 𝓝 0, r * (I + 1) * a < 1 / 2\nC : ∀ᶠ (a : ℝ) in 𝓝[Set.Ioi 0] 0, 0 < a\na : ℝ\nha : 0 < a ∧ 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a < 1 ∧ r * (I + 1) * a < 1 / 2\n⊢ ∃ a apos, 2 * I * C✝ * r ^ 2 * (I + 1) ^ 2 * a ≤ 1 ∧ r * (I + 1) * a ≤ 1 / 2\n[PROOFSTEP]\nexact\n  ⟨a, ha.1, ha.2.1.le, ha.2.2.le⟩\n    -- check by induction that the partial sums are suitably bounded, using the choice of `a` and the\n      -- inductive control from Lemma `radius_rightInv_pos_of_radius_pos_aux2`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nlet S n := ∑ k in Ico 1 n, a ^ k * ‖p.rightInv i k‖\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nhave IRec : ∀ n, 1 ≤ n → S n ≤ (I + 1) * a := by\n  apply Nat.le_induction\n  · simp only\n    rw [Ico_eq_empty_of_le (le_refl 1), sum_empty]\n    exact mul_nonneg (add_nonneg (norm_nonneg _) zero_le_one) apos.le\n  · intro n one_le_n hn\n    have In : 2 ≤ n + 1 := by linarith only [one_le_n]\n    have Snonneg : 0 ≤ S n := sum_nonneg fun x _ => mul_nonneg (pow_nonneg apos.le _) (norm_nonneg _)\n    have rSn : r * S n ≤ 1 / 2 :=\n      calc\n        r * S n ≤ r * ((I + 1) * a) := mul_le_mul_of_nonneg_left hn rpos.le\n        _ ≤ 1 / 2 := by rwa [← mul_assoc]\n    calc\n      S (n + 1) ≤ I * a + I * C * ∑ k in Ico 2 (n + 1), (r * S n) ^ k :=\n        radius_rightInv_pos_of_radius_pos_aux2 In p i rpos.le apos.le Cpos.le ple\n      _ = I * a + I * C * (((r * S n) ^ 2 - (r * S n) ^ (n + 1)) / (1 - r * S n)) := by rw [geom_sum_Ico' _ In];\n        exact ne_of_lt (rSn.trans_lt (by norm_num))\n      _ ≤ I * a + I * C * ((r * S n) ^ 2 / (1 / 2)) :=\n        by\n        apply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le]\n        refine' div_le_div (sq_nonneg _) _ (by norm_num) (by linarith only [rSn])\n        simp only [sub_le_self_iff]\n        apply pow_nonneg (mul_nonneg rpos.le Snonneg)\n      _ = I * a + 2 * I * C * (r * S n) ^ 2 := by ring\n      _ ≤ I * a + 2 * I * C * (r * ((I + 1) * a)) ^ 2 := by\n        apply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le, zero_le_two,\n          pow_le_pow_of_le_left, rpos.le]\n      _ = (I + 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) * a := by ring\n      _ ≤ (I + 1) * a := by\n        apply_rules [mul_le_mul_of_nonneg_right, apos.le, add_le_add, le_refl]\n          -- conclude that all coefficients satisfy `aⁿ Qₙ ≤ (I + 1) a`.\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\n[PROOFSTEP]\napply Nat.le_induction\n[GOAL]\ncase base\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ S 1 ≤ (I + 1) * a\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase base\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ ∑ x in Ico 1 1, a ^ x * ‖rightInv p i x‖ ≤ (‖↑(ContinuousLinearEquiv.symm i)‖ + 1) * a\n[PROOFSTEP]\nrw [Ico_eq_empty_of_le (le_refl 1), sum_empty]\n[GOAL]\ncase base\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ 0 ≤ (‖↑(ContinuousLinearEquiv.symm i)‖ + 1) * a\n[PROOFSTEP]\nexact mul_nonneg (add_nonneg (norm_nonneg _) zero_le_one) apos.le\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\n⊢ ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a → S (n + 1) ≤ (I + 1) * a\n[PROOFSTEP]\nintro n one_le_n hn\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\n⊢ S (n + 1) ≤ (I + 1) * a\n[PROOFSTEP]\nhave In : 2 ≤ n + 1 := by linarith only [one_le_n]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\n⊢ 2 ≤ n + 1\n[PROOFSTEP]\nlinarith only [one_le_n]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\n⊢ S (n + 1) ≤ (I + 1) * a\n[PROOFSTEP]\nhave Snonneg : 0 ≤ S n := sum_nonneg fun x _ => mul_nonneg (pow_nonneg apos.le _) (norm_nonneg _)\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\n⊢ S (n + 1) ≤ (I + 1) * a\n[PROOFSTEP]\nhave rSn : r * S n ≤ 1 / 2 :=\n  calc\n    r * S n ≤ r * ((I + 1) * a) := mul_le_mul_of_nonneg_left hn rpos.le\n    _ ≤ 1 / 2 := by rwa [← mul_assoc]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\n⊢ r * ((I + 1) * a) ≤ 1 / 2\n[PROOFSTEP]\nrwa [← mul_assoc]\n[GOAL]\ncase succ\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ S (n + 1) ≤ (I + 1) * a\n[PROOFSTEP]\ncalc\n  S (n + 1) ≤ I * a + I * C * ∑ k in Ico 2 (n + 1), (r * S n) ^ k :=\n    radius_rightInv_pos_of_radius_pos_aux2 In p i rpos.le apos.le Cpos.le ple\n  _ = I * a + I * C * (((r * S n) ^ 2 - (r * S n) ^ (n + 1)) / (1 - r * S n)) := by rw [geom_sum_Ico' _ In];\n    exact ne_of_lt (rSn.trans_lt (by norm_num))\n  _ ≤ I * a + I * C * ((r * S n) ^ 2 / (1 / 2)) :=\n    by\n    apply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le]\n    refine' div_le_div (sq_nonneg _) _ (by norm_num) (by linarith only [rSn])\n    simp only [sub_le_self_iff]\n    apply pow_nonneg (mul_nonneg rpos.le Snonneg)\n  _ = I * a + 2 * I * C * (r * S n) ^ 2 := by ring\n  _ ≤ I * a + 2 * I * C * (r * ((I + 1) * a)) ^ 2 := by\n    apply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le, zero_le_two,\n      pow_le_pow_of_le_left, rpos.le]\n  _ = (I + 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) * a := by ring\n  _ ≤ (I + 1) * a := by\n    apply_rules [mul_le_mul_of_nonneg_right, apos.le, add_le_add, le_refl]\n      -- conclude that all coefficients satisfy `aⁿ Qₙ ≤ (I + 1) a`.\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ I * a + I * C * ∑ k in Ico 2 (n + 1), (r * S n) ^ k =\n    I * a + I * C * (((r * S n) ^ 2 - (r * S n) ^ (n + 1)) / (1 - r * S n))\n[PROOFSTEP]\nrw [geom_sum_Ico' _ In]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ r * S n ≠ 1\n[PROOFSTEP]\nexact ne_of_lt (rSn.trans_lt (by norm_num))\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ 1 / 2 < 1\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ I * a + I * C * (((r * S n) ^ 2 - (r * S n) ^ (n + 1)) / (1 - r * S n)) ≤ I * a + I * C * ((r * S n) ^ 2 / (1 / 2))\n[PROOFSTEP]\napply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le]\n[GOAL]\ncase h₂.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\ni_symm : F ≃L[𝕜] E\n⊢ ((r * S n) ^ 2 - (r * S n) ^ (n + 1)) / (1 - r * S n) ≤ (r * S n) ^ 2 / (1 / 2)\n[PROOFSTEP]\nrefine' div_le_div (sq_nonneg _) _ (by norm_num) (by linarith only [rSn])\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\ni_symm : F ≃L[𝕜] E\n⊢ 0 < 1 / 2\n[PROOFSTEP]\nnorm_num\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\ni_symm : F ≃L[𝕜] E\n⊢ 1 / 2 ≤ 1 - r * S n\n[PROOFSTEP]\nlinarith only [rSn]\n[GOAL]\ncase h₂.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\ni_symm : F ≃L[𝕜] E\n⊢ (r * S n) ^ 2 - (r * S n) ^ (n + 1) ≤ (r * S n) ^ 2\n[PROOFSTEP]\nsimp only [sub_le_self_iff]\n[GOAL]\ncase h₂.h\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\ni_symm : F ≃L[𝕜] E\n⊢ 0 ≤ (r * ∑ x in Ico 1 n, a ^ x * ‖rightInv p i x‖) ^ (n + 1)\n[PROOFSTEP]\napply pow_nonneg (mul_nonneg rpos.le Snonneg)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ I * a + I * C * ((r * S n) ^ 2 / (1 / 2)) = I * a + 2 * I * C * (r * S n) ^ 2\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ I * a + 2 * I * C * (r * S n) ^ 2 ≤ I * a + 2 * I * C * (r * ((I + 1) * a)) ^ 2\n[PROOFSTEP]\napply_rules [add_le_add, le_refl, mul_le_mul_of_nonneg_left, mul_nonneg, norm_nonneg, Cpos.le, zero_le_two,\n  pow_le_pow_of_le_left, rpos.le]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ I * a + 2 * I * C * (r * ((I + 1) * a)) ^ 2 = (I + 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) * a\n[PROOFSTEP]\nring\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nn : ℕ\none_le_n : 1 ≤ n\nhn : S n ≤ (I + 1) * a\nIn : 2 ≤ n + 1\nSnonneg : 0 ≤ S n\nrSn : r * S n ≤ 1 / 2\n⊢ (I + 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a) * a ≤ (I + 1) * a\n[PROOFSTEP]\napply_rules [mul_le_mul_of_nonneg_right, apos.le, add_le_add, le_refl]\n  -- conclude that all coefficients satisfy `aⁿ Qₙ ≤ (I + 1) a`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nlet a' : NNReal := ⟨a, apos.le⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\nsuffices H : (a' : ENNReal) ≤ (p.rightInv i).radius\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nH : ↑a' ≤ radius (rightInv p i)\n⊢ 0 < radius (rightInv p i)\n[PROOFSTEP]\napply lt_of_lt_of_le _ H\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nH : ↑a' ≤ radius (rightInv p i)\n⊢ 0 < ↑a'\n[PROOFSTEP]\nexact_mod_cast apos\n[GOAL]\ncase H\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\n⊢ ↑a' ≤ radius (rightInv p i)\n[PROOFSTEP]\napply le_radius_of_bound _ ((I + 1) * a) fun n => ?_\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\n⊢ ‖rightInv p i n‖ * ↑a' ^ n ≤ (I + 1) * a\n[PROOFSTEP]\nby_cases hn : n = 0\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ ‖rightInv p i n‖ * ↑a' ^ n ≤ (I + 1) * a\n[PROOFSTEP]\nhave : ‖p.rightInv i n‖ = ‖p.rightInv i 0‖ := by congr <;> try rw [hn]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ ‖rightInv p i n‖ = ‖rightInv p i 0‖\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_1.h.e_3\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => F) fun i => F\n[PROOFSTEP]\ntry rw [hn]\n[GOAL]\ncase h.e_1.h.e_3\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => F) fun i => F\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase h.e_1.h.e_6\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => AddCommGroup.toAddCommMonoid) fun i => AddCommGroup.toAddCommMonoid\n[PROOFSTEP]\ntry rw [hn]\n[GOAL]\ncase h.e_1.h.e_6\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => AddCommGroup.toAddCommMonoid) fun i => AddCommGroup.toAddCommMonoid\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase h.e_1.h.e_8\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => NormedSpace.toModule) fun i => NormedSpace.toModule\n[PROOFSTEP]\ntry rw [hn]\n[GOAL]\ncase h.e_1.h.e_8\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => NormedSpace.toModule) fun i => NormedSpace.toModule\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase h.e_1.h.e_10\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => UniformSpace.toTopologicalSpace) fun i => UniformSpace.toTopologicalSpace\n[PROOFSTEP]\ntry rw [hn]\n[GOAL]\ncase h.e_1.h.e_10\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\n⊢ HEq (fun i => UniformSpace.toTopologicalSpace) fun i => UniformSpace.toTopologicalSpace\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\nthis : ‖rightInv p i n‖ = ‖rightInv p i 0‖\n⊢ ‖rightInv p i n‖ * ↑a' ^ n ≤ (I + 1) * a\n[PROOFSTEP]\nsimp only [this, norm_zero, zero_mul, rightInv_coeff_zero]\n[GOAL]\ncase pos\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : n = 0\nthis : ‖rightInv p i n‖ = ‖rightInv p i 0‖\n⊢ 0 ≤ (‖↑(ContinuousLinearEquiv.symm i)‖ + 1) * a\n[PROOFSTEP]\napply_rules [mul_nonneg, add_nonneg, norm_nonneg, zero_le_one, apos.le]\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : ¬n = 0\n⊢ ‖rightInv p i n‖ * ↑a' ^ n ≤ (I + 1) * a\n[PROOFSTEP]\nhave one_le_n : 1 ≤ n := bot_lt_iff_ne_bot.2 hn\n[GOAL]\ncase neg\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : ¬n = 0\none_le_n : 1 ≤ n\n⊢ ‖rightInv p i n‖ * ↑a' ^ n ≤ (I + 1) * a\n[PROOFSTEP]\ncalc\n  ‖p.rightInv i n‖ * (a' : ℝ) ^ n = a ^ n * ‖p.rightInv i n‖ := mul_comm _ _\n  _ ≤ ∑ k in Ico 1 (n + 1), a ^ k * ‖p.rightInv i k‖ :=\n    (haveI : ∀ k ∈ Ico 1 (n + 1), 0 ≤ a ^ k * ‖p.rightInv i k‖ := fun k _ =>\n      mul_nonneg (pow_nonneg apos.le _) (norm_nonneg _)\n    single_le_sum this (by simp [one_le_n]))\n  _ ≤ (I + 1) * a := IRec (n + 1) (by norm_num)\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : ¬n = 0\none_le_n : 1 ≤ n\nthis : ∀ (k : ℕ), k ∈ Ico 1 (n + 1) → 0 ≤ a ^ k * ‖rightInv p i k‖\n⊢ n ∈ Ico 1 (n + 1)\n[PROOFSTEP]\nsimp [one_le_n]\n[GOAL]\n𝕜 : Type u_1\ninst✝⁴ : NontriviallyNormedField 𝕜\nE : Type u_2\ninst✝³ : NormedAddCommGroup E\ninst✝² : NormedSpace 𝕜 E\nF : Type u_3\ninst✝¹ : NormedAddCommGroup F\ninst✝ : NormedSpace 𝕜 F\np : FormalMultilinearSeries 𝕜 E F\ni : E ≃L[𝕜] F\nhp : 0 < radius p\nC r : ℝ\nCpos : 0 < C\nrpos : 0 < r\nple : ∀ (n : ℕ), ‖p n‖ ≤ C * r ^ n\nI : ℝ := ‖↑(ContinuousLinearEquiv.symm i)‖\na : ℝ\napos : 0 < a\nha1 : 2 * I * C * r ^ 2 * (I + 1) ^ 2 * a ≤ 1\nha2 : r * (I + 1) * a ≤ 1 / 2\nS : ℕ → ℝ := fun n => ∑ k in Ico 1 n, a ^ k * ‖rightInv p i k‖\nIRec : ∀ (n : ℕ), 1 ≤ n → S n ≤ (I + 1) * a\na' : NNReal := { val := a, property := (_ : 0 ≤ a) }\nn : ℕ\nhn : ¬n = 0\none_le_n : 1 ≤ n\n⊢ 1 ≤ n + 1\n[PROOFSTEP]\nnorm_num\n", "meta": {"mathlib_filename": "Mathlib.Analysis.Analytic.Inverse", "llama_tokens": 78202, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6076631698328916, "lm_q2_score": 0.42632159254749036, "lm_q1q2_score": 0.25905993029561447}}
{"text": "[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\n⊢ ↑⊤ ⊆ ↑(span K (range (restrict (LinearIndependent.extend hs (_ : s ⊆ univ)) id)))\n[PROOFSTEP]\nsimpa using hs.subset_span_extend (subset_univ s)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nhs : LinearIndependent K Subtype.val\n⊢ range ↑(extend hs) = LinearIndependent.extend hs (_ : s ⊆ univ)\n[PROOFSTEP]\nrw [coe_extend, Subtype.range_coe_subtype, setOf_mem_eq]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nx : ↑(ofVectorSpaceIndex K V)\n⊢ ↑(ofVectorSpace K V) x = ↑x\n[PROOFSTEP]\nunfold ofVectorSpace\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nx : ↑(ofVectorSpaceIndex K V)\n⊢ ↑(extend (_ : LinearIndependent K fun x => ↑x)) x = ↑x\n[PROOFSTEP]\nexact Basis.mk_apply _ _ _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ LinearIndependent K Subtype.val\n[PROOFSTEP]\nconvert (ofVectorSpace K V).linearIndependent\n[GOAL]\ncase h.e'_4\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\n⊢ Subtype.val = ↑(ofVectorSpace K V)\n[PROOFSTEP]\next x\n[GOAL]\ncase h.e'_4.h\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx✝ y z : V\nx : { x // x ∈ ofVectorSpaceIndex K V }\n⊢ ↑x = ↑(ofVectorSpace K V) x\n[PROOFSTEP]\nrw [ofVectorSpace_apply_self]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module K V\ninst✝² : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\ninst✝¹ : Fintype K\ninst✝ : Fintype V\n⊢ ∃ n, card V = card K ^ n\n[PROOFSTEP]\nclassical exact ⟨card (Basis.ofVectorSpaceIndex K V), Module.card_fintype (Basis.ofVectorSpace K V)⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁶ : DivisionRing K\ninst✝⁵ : AddCommGroup V\ninst✝⁴ : AddCommGroup V'\ninst✝³ : Module K V\ninst✝² : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\ninst✝¹ : Fintype K\ninst✝ : Fintype V\n⊢ ∃ n, card V = card K ^ n\n[PROOFSTEP]\nexact ⟨card (Basis.ofVectorSpaceIndex K V), Module.card_fintype (Basis.ofVectorSpace K V)⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\n⊢ IsAtom (span K {v})\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\n⊢ span K {v} ≠ ⊥\n[PROOFSTEP]\nrw [Submodule.ne_bot_iff]\n[GOAL]\ncase left\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\n⊢ ∃ x, x ∈ span K {v} ∧ x ≠ 0\n[PROOFSTEP]\nexact ⟨v, ⟨mem_span_singleton_self v, hv⟩⟩\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\n⊢ ∀ (b : Submodule K V), b < span K {v} → b = ⊥\n[PROOFSTEP]\nintro T hT\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\n⊢ T = ⊥\n[PROOFSTEP]\nby_contra h\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\nh : ¬T = ⊥\n⊢ False\n[PROOFSTEP]\napply hT.2\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\nh : ¬T = ⊥\n⊢ ↑(span K {v}) ⊆ ↑T\n[PROOFSTEP]\nchange span K { v } ≤ T\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\nh : ¬T = ⊥\n⊢ span K {v} ≤ T\n[PROOFSTEP]\nsimp_rw [span_singleton_le_iff_mem, ← Ne.def, Submodule.ne_bot_iff] at *\n[GOAL]\ncase right\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\nh : ∃ x, x ∈ T ∧ x ≠ 0\n⊢ v ∈ T\n[PROOFSTEP]\nrcases h with ⟨s, ⟨hs, hz⟩⟩\n[GOAL]\ncase right.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns✝ t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\ns : V\nhs : s ∈ T\nhz : s ≠ 0\n⊢ v ∈ T\n[PROOFSTEP]\nrcases mem_span_singleton.1 (hT.1 hs) with ⟨a, rfl⟩\n[GOAL]\ncase right.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\na : K\nhs : a • v ∈ T\nhz : a • v ≠ 0\n⊢ v ∈ T\n[PROOFSTEP]\nrcases eq_or_ne a 0 with rfl | h\n[GOAL]\ncase right.intro.intro.intro.inl\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\nhs : 0 • v ∈ T\nhz : 0 • v ≠ 0\n⊢ v ∈ T\n[PROOFSTEP]\nsimp only [zero_smul, ne_eq, not_true] at hz \n[GOAL]\ncase right.intro.intro.intro.inr\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\nT : Submodule K V\nhT : T < span K {v}\na : K\nhs : a • v ∈ T\nhz : a • v ≠ 0\nh : a ≠ 0\n⊢ v ∈ T\n[PROOFSTEP]\nrwa [T.smul_mem_iff h] at hs \n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\n⊢ IsAtom W ↔ ∃ v x, W = span K {v}\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => _⟩\n[GOAL]\ncase refine'_1\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nh : IsAtom W\n⊢ ∃ v x, W = span K {v}\n[PROOFSTEP]\ncases' h with hbot h\n[GOAL]\ncase refine'_1.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nh : ∀ (b : Submodule K V), b < W → b = ⊥\n⊢ ∃ v x, W = span K {v}\n[PROOFSTEP]\nrcases(Submodule.ne_bot_iff W).1 hbot with ⟨v, ⟨hW, hv⟩⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nh : ∀ (b : Submodule K V), b < W → b = ⊥\nv : V\nhW : v ∈ W\nhv : v ≠ 0\n⊢ ∃ v x, W = span K {v}\n[PROOFSTEP]\nrefine' ⟨v, ⟨hv, _⟩⟩\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nh : ∀ (b : Submodule K V), b < W → b = ⊥\nv : V\nhW : v ∈ W\nhv : v ≠ 0\n⊢ W = span K {v}\n[PROOFSTEP]\nby_contra heq\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nh : ∀ (b : Submodule K V), b < W → b = ⊥\nv : V\nhW : v ∈ W\nhv : v ≠ 0\nheq : ¬W = span K {v}\n⊢ False\n[PROOFSTEP]\nspecialize h (span K { v })\n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nv : V\nhW : v ∈ W\nhv : v ≠ 0\nheq : ¬W = span K {v}\nh : span K {v} < W → span K {v} = ⊥\n⊢ False\n[PROOFSTEP]\nrw [span_singleton_eq_bot, lt_iff_le_and_ne] at h \n[GOAL]\ncase refine'_1.intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nhbot : W ≠ ⊥\nv : V\nhW : v ∈ W\nhv : v ≠ 0\nheq : ¬W = span K {v}\nh : span K {v} ≤ W ∧ span K {v} ≠ W → v = 0\n⊢ False\n[PROOFSTEP]\nexact hv (h ⟨(span_singleton_le_iff_mem v W).2 hW, Ne.symm heq⟩)\n[GOAL]\ncase refine'_2\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nh : ∃ v x, W = span K {v}\n⊢ IsAtom W\n[PROOFSTEP]\nrcases h with ⟨v, ⟨hv, rfl⟩⟩\n[GOAL]\ncase refine'_2.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z v : V\nhv : v ≠ 0\n⊢ IsAtom (span K {v})\n[PROOFSTEP]\nexact nonzero_span_atom v hv\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\n⊢ ∃ s, W = sSup s ∧ ∀ (a : Submodule K V), a ∈ s → IsAtom a\n[PROOFSTEP]\nrefine ⟨_, submodule_eq_sSup_le_nonzero_spans W, ?_⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\n⊢ ∀ (a : Submodule K V), a ∈ {T | ∃ m x x, T = span K {m}} → IsAtom a\n[PROOFSTEP]\nrintro _ ⟨w, ⟨_, ⟨hw, rfl⟩⟩⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nW : Submodule K V\nw : V\nw✝ : w ∈ W\nhw : w ≠ 0\n⊢ IsAtom (span K {w})\n[PROOFSTEP]\nexact nonzero_span_atom w hw\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nlet B := Basis.ofVectorSpaceIndex K V\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nlet hB := Basis.ofVectorSpace K V\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nhave hB₀ : _ := hB.linearIndependent.to_subtype_range\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nhave : LinearIndependent K (fun x => x : f '' B → V') :=\n  by\n  have h₁ : LinearIndependent K ((↑) : ↥(f '' Set.range (Basis.ofVectorSpace K V)) → V') :=\n    @LinearIndependent.image_subtype _ _ _ _ _ _ _ _ _ f hB₀ (show Disjoint _ _ by simp [hf_inj])\n  rwa [Basis.range_ofVectorSpace K V] at h₁ \n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\n⊢ LinearIndependent K fun x => ↑x\n[PROOFSTEP]\nhave h₁ : LinearIndependent K ((↑) : ↥(f '' Set.range (Basis.ofVectorSpace K V)) → V') :=\n  @LinearIndependent.image_subtype _ _ _ _ _ _ _ _ _ f hB₀ (show Disjoint _ _ by simp [hf_inj])\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\n⊢ Disjoint (span K (Set.range ↑(Basis.ofVectorSpace K V))) (ker f)\n[PROOFSTEP]\nsimp [hf_inj]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nh₁ : LinearIndependent K Subtype.val\n⊢ LinearIndependent K fun x => ↑x\n[PROOFSTEP]\nrwa [Basis.range_ofVectorSpace K V] at h₁ \n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nlet C := this.extend (subset_univ _)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nhave BC := this.subset_extend (subset_univ _)\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : ↑f '' B ⊆ LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nlet hC := Basis.extend this\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : ↑f '' B ⊆ LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nhaveI Vinh : Inhabited V := ⟨0⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : ↑f '' B ⊆ LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\n⊢ ∃ g, comp g f = id\n[PROOFSTEP]\nrefine' ⟨(hC.constr ℕ : _ → _) (C.restrict (invFun f)), hB.ext fun b => _⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : ↑f '' B ⊆ LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\n⊢ ↑(comp (↑(Basis.constr hC ℕ) (Set.restrict C (invFun ↑f))) f) (↑hB b) = ↑id (↑hB b)\n[PROOFSTEP]\nrw [image_subset_iff] at BC \n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\n⊢ ↑(comp (↑(Basis.constr hC ℕ) (Set.restrict C (invFun ↑f))) f) (↑hB b) = ↑id (↑hB b)\n[PROOFSTEP]\nhave fb_eq : f b = hC ⟨f b, BC b.2⟩ := by\n  change f b = Basis.extend this _\n  simp_rw [Basis.extend_apply_self]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\n⊢ ↑f ↑b = ↑hC { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) }\n[PROOFSTEP]\nchange f b = Basis.extend this _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\n⊢ ↑f ↑b =\n    ↑(Basis.extend this)\n      { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) }\n[PROOFSTEP]\nsimp_rw [Basis.extend_apply_self]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\nfb_eq : ↑f ↑b = ↑hC { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) }\n⊢ ↑(comp (↑(Basis.constr hC ℕ) (Set.restrict C (invFun ↑f))) f) (↑hB b) = ↑id (↑hB b)\n[PROOFSTEP]\ndsimp []\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\nfb_eq : ↑f ↑b = ↑hC { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) }\n⊢ ↑(↑(Basis.constr (Basis.extend this) ℕ)\n          (Set.restrict (LinearIndependent.extend this (_ : ↑f '' Basis.ofVectorSpaceIndex K V ⊆ univ)) (invFun ↑f)))\n      (↑f (↑(Basis.ofVectorSpace K V) b)) =\n    ↑(Basis.ofVectorSpace K V) b\n[PROOFSTEP]\nrw [Basis.ofVectorSpace_apply_self, fb_eq, hC.constr_basis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_inj : ker f = ⊥\nB : Set V := Basis.ofVectorSpaceIndex K V\nhB : Basis (↑(Basis.ofVectorSpaceIndex K V)) K V := Basis.ofVectorSpace K V\nhB₀ : LinearIndependent K Subtype.val\nthis : LinearIndependent K fun x => ↑x\nC : Set V' := LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nBC : B ⊆ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)\nhC : Basis (↑(LinearIndependent.extend this (_ : ↑f '' B ⊆ univ))) K V' := Basis.extend this\nVinh : Inhabited V\nb : ↑(Basis.ofVectorSpaceIndex K V)\nfb_eq : ↑f ↑b = ↑hC { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) }\n⊢ Set.restrict (LinearIndependent.extend this (_ : ↑f '' Basis.ofVectorSpaceIndex K V ⊆ univ)) (invFun ↑f)\n      { val := ↑f ↑b, property := (_ : ↑b ∈ ↑f ⁻¹' LinearIndependent.extend this (_ : ↑f '' B ⊆ univ)) } =\n    ↑b\n[PROOFSTEP]\nexact leftInverse_invFun (LinearMap.ker_eq_bot.1 hf_inj) _\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\n⊢ ∃ g, comp f g = id\n[PROOFSTEP]\nlet C := Basis.ofVectorSpaceIndex K V'\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\nC : Set V' := Basis.ofVectorSpaceIndex K V'\n⊢ ∃ g, comp f g = id\n[PROOFSTEP]\nlet hC := Basis.ofVectorSpace K V'\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\nC : Set V' := Basis.ofVectorSpaceIndex K V'\nhC : Basis (↑(Basis.ofVectorSpaceIndex K V')) K V' := Basis.ofVectorSpace K V'\n⊢ ∃ g, comp f g = id\n[PROOFSTEP]\nhaveI : Inhabited V := ⟨0⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\nC : Set V' := Basis.ofVectorSpaceIndex K V'\nhC : Basis (↑(Basis.ofVectorSpaceIndex K V')) K V' := Basis.ofVectorSpace K V'\nthis : Inhabited V\n⊢ ∃ g, comp f g = id\n[PROOFSTEP]\nrefine' ⟨(hC.constr ℕ : _ → _) (C.restrict (invFun f)), hC.ext fun c => _⟩\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\nC : Set V' := Basis.ofVectorSpaceIndex K V'\nhC : Basis (↑(Basis.ofVectorSpaceIndex K V')) K V' := Basis.ofVectorSpace K V'\nthis : Inhabited V\nc : ↑(Basis.ofVectorSpaceIndex K V')\n⊢ ↑(comp f (↑(Basis.constr hC ℕ) (Set.restrict C (invFun ↑f)))) (↑hC c) = ↑id (↑hC c)\n[PROOFSTEP]\nrw [LinearMap.comp_apply, hC.constr_basis]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\nf : V →ₗ[K] V'\nhf_surj : range f = ⊤\nC : Set V' := Basis.ofVectorSpaceIndex K V'\nhC : Basis (↑(Basis.ofVectorSpaceIndex K V')) K V' := Basis.ofVectorSpace K V'\nthis : Inhabited V\nc : ↑(Basis.ofVectorSpaceIndex K V')\n⊢ ↑f (Set.restrict C (invFun ↑f) c) = ↑id (↑hC c)\n[PROOFSTEP]\nsimp [rightInverse_invFun (LinearMap.range_eq_top.1 hf_surj) c]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nf : { x // x ∈ p } →ₗ[K] V'\ng : V →ₗ[K] { x // x ∈ p }\nhg : comp g (Submodule.subtype p) = id\n⊢ comp (comp f g) (Submodule.subtype p) = f\n[PROOFSTEP]\nrw [LinearMap.comp_assoc, hg, f.comp_id]\n[GOAL]\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nhp : p < ⊤\n⊢ ∃ f, f ≠ 0 ∧ p ≤ ker f\n[PROOFSTEP]\nrcases SetLike.exists_of_lt hp with ⟨v, -, hpv⟩\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nhp : p < ⊤\nv : V\nhpv : ¬v ∈ p\n⊢ ∃ f, f ≠ 0 ∧ p ≤ ker f\n[PROOFSTEP]\nclear hp\n[GOAL]\ncase intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\n⊢ ∃ f, f ≠ 0 ∧ p ≤ ker f\n[PROOFSTEP]\nrcases(LinearPMap.supSpanSingleton ⟨p, 0⟩ v (1 : K) hpv).toFun.exists_extend with ⟨f, hf⟩\n[GOAL]\ncase intro.intro.intro\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nf : V →ₗ[K] K\nhf :\n  LinearMap.comp f (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\n⊢ ∃ f, f ≠ 0 ∧ p ≤ ker f\n[PROOFSTEP]\nrefine' ⟨f, _, _⟩\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nf : V →ₗ[K] K\nhf :\n  LinearMap.comp f (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\n⊢ f ≠ 0\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nhf :\n  LinearMap.comp 0 (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\n⊢ False\n[PROOFSTEP]\nrw [LinearMap.zero_comp] at hf \n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nhf : 0 = (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\n⊢ False\n[PROOFSTEP]\nhave := LinearPMap.supSpanSingleton_apply_mk ⟨p, 0⟩ v (1 : K) hpv 0 p.zero_mem 1\n[GOAL]\ncase intro.intro.intro.refine'_1\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nhf : 0 = (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\nthis :\n  ↑(LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv)\n      { val := 0 + 1 • v,\n        property :=\n          (_ :\n            0 + 1 • v ∈\n              { domain := p, toFun := 0 }.domain ⊔ (LinearPMap.mkSpanSingleton v 1 (_ : v = 0 → False)).domain) } =\n    ↑{ domain := p, toFun := 0 } { val := 0, property := (_ : 0 ∈ p) } + 1 • 1\n⊢ False\n[PROOFSTEP]\nsimpa using (LinearMap.congr_fun hf _).trans this\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nf : V →ₗ[K] K\nhf :\n  LinearMap.comp f (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\n⊢ p ≤ ker f\n[PROOFSTEP]\nrefine' fun x hx => mem_ker.2 _\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx✝ y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nf : V →ₗ[K] K\nhf :\n  LinearMap.comp f (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\nx : V\nhx : x ∈ p\n⊢ ↑f x = 0\n[PROOFSTEP]\nhave := LinearPMap.supSpanSingleton_apply_mk ⟨p, 0⟩ v (1 : K) hpv x hx 0\n[GOAL]\ncase intro.intro.intro.refine'_2\nι : Type u_1\nι' : Type u_2\nK : Type u_3\nV : Type u_4\nV' : Type u_5\ninst✝⁴ : DivisionRing K\ninst✝³ : AddCommGroup V\ninst✝² : AddCommGroup V'\ninst✝¹ : Module K V\ninst✝ : Module K V'\nv✝ : ι → V\ns t : Set V\nx✝ y z : V\np : Submodule K V\nv : V\nhpv : ¬v ∈ p\nf : V →ₗ[K] K\nhf :\n  LinearMap.comp f (Submodule.subtype (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).domain) =\n    (LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv).toFun\nx : V\nhx : x ∈ p\nthis :\n  ↑(LinearPMap.supSpanSingleton { domain := p, toFun := 0 } v 1 hpv)\n      { val := x + 0 • v,\n        property :=\n          (_ :\n            x + 0 • v ∈\n              { domain := p, toFun := 0 }.domain ⊔ (LinearPMap.mkSpanSingleton v 1 (_ : v = 0 → False)).domain) } =\n    ↑{ domain := p, toFun := 0 } { val := x, property := hx } + 0 • 1\n⊢ ↑f x = 0\n[PROOFSTEP]\nsimpa using (LinearMap.congr_fun hf _).trans this\n", "meta": {"mathlib_filename": "Mathlib.LinearAlgebra.Basis.VectorSpace", "llama_tokens": 17519, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5428632979641571, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.25871760111903436}}
{"text": "[GOAL]\nα : Type u_1\ns✝ t✝ s t : Finset α\n⊢ s ∈ powerset t ↔ s ⊆ t\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u_1\ns t✝ t : Finset α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\n⊢ { val := val✝, nodup := nodup✝ } ∈ powerset t ↔ { val := val✝, nodup := nodup✝ } ⊆ t\n[PROOFSTEP]\nsimp [powerset, mem_mk, mem_pmap, mk.injEq, mem_powerset, exists_prop, exists_eq_right, ← val_le_iff]\n[GOAL]\nα : Type u_1\ns✝ t s : Finset α\n⊢ ↑(powerset s) = toSet ⁻¹' 𝒫↑s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\ns✝ t s x✝ : Finset α\n⊢ x✝ ∈ ↑(powerset s) ↔ x✝ ∈ toSet ⁻¹' 𝒫↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ns t : Finset α\n⊢ powerset s = {∅} ↔ s = ∅\n[PROOFSTEP]\nrw [← powerset_empty, powerset_inj]\n[GOAL]\nα : Type u_1\ns✝ t✝ s t : Finset α\na : α\nht : t ∈ powerset s\nh : ¬a ∈ s\n⊢ ¬a ∈ t\n[PROOFSTEP]\napply mt _ h\n[GOAL]\nα : Type u_1\ns✝ t✝ s t : Finset α\na : α\nht : t ∈ powerset s\nh : ¬a ∈ s\n⊢ a ∈ t → a ∈ s\n[PROOFSTEP]\napply mem_powerset.1 ht\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\n⊢ powerset (insert a s) = powerset s ∪ image (insert a) (powerset s)\n[PROOFSTEP]\next t\n[GOAL]\ncase a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\n⊢ t ∈ powerset (insert a s) ↔ t ∈ powerset s ∪ image (insert a) (powerset s)\n[PROOFSTEP]\nsimp only [exists_prop, mem_powerset, mem_image, mem_union, subset_insert_iff]\n[GOAL]\ncase a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\n⊢ erase t a ⊆ s ↔ t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n[PROOFSTEP]\nby_cases h : a ∈ t\n[GOAL]\ncase pos\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\n⊢ erase t a ⊆ s ↔ t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase pos.mp\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\n⊢ erase t a ⊆ s → t ⊆ s ∨ ∃ a_2, a_2 ⊆ s ∧ insert a a_2 = t\n[PROOFSTEP]\nexact fun H => Or.inr ⟨_, H, insert_erase h⟩\n[GOAL]\ncase pos.mpr\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\n⊢ (t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t) → erase t a ⊆ s\n[PROOFSTEP]\nintro H\n[GOAL]\ncase pos.mpr\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\nH : t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n⊢ erase t a ⊆ s\n[PROOFSTEP]\ncases' H with H H\n[GOAL]\ncase pos.mpr.inl\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\nH : t ⊆ s\n⊢ erase t a ⊆ s\n[PROOFSTEP]\nexact Subset.trans (erase_subset a t) H\n[GOAL]\ncase pos.mpr.inr\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\nH : ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n⊢ erase t a ⊆ s\n[PROOFSTEP]\nrcases H with ⟨u, hu⟩\n[GOAL]\ncase pos.mpr.inr.intro\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\nu : Finset α\nhu : u ⊆ s ∧ insert a u = t\n⊢ erase t a ⊆ s\n[PROOFSTEP]\nrw [← hu.2]\n[GOAL]\ncase pos.mpr.inr.intro\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : a ∈ t\nu : Finset α\nhu : u ⊆ s ∧ insert a u = t\n⊢ erase (insert a u) a ⊆ s\n[PROOFSTEP]\nexact Subset.trans (erase_insert_subset a u) hu.1\n[GOAL]\ncase neg\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : ¬a ∈ t\n⊢ erase t a ⊆ s ↔ t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n[PROOFSTEP]\nhave : ¬∃ u : Finset α, u ⊆ s ∧ insert a u = t := by simp [Ne.symm (ne_insert_of_not_mem _ _ h)]\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : ¬a ∈ t\n⊢ ¬∃ u, u ⊆ s ∧ insert a u = t\n[PROOFSTEP]\nsimp [Ne.symm (ne_insert_of_not_mem _ _ h)]\n[GOAL]\ncase neg\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns : Finset α\na : α\nt : Finset α\nh : ¬a ∈ t\nthis : ¬∃ u, u ⊆ s ∧ insert a u = t\n⊢ erase t a ⊆ s ↔ t ⊆ s ∨ ∃ a_1, a_1 ⊆ s ∧ insert a a_1 = t\n[PROOFSTEP]\nsimp [Finset.erase_eq_of_not_mem h, this]\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ t ∈ ssubsets s ↔ t ⊂ s\n[PROOFSTEP]\nrw [ssubsets, mem_erase, mem_powerset, ssubset_iff_subset_ne, and_comm]\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\ns : Finset α\nh : Finset.Nonempty s\n⊢ ∅ ∈ ssubsets s\n[PROOFSTEP]\nrw [mem_ssubsets, ssubset_iff_subset_ne]\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\ns : Finset α\nh : Finset.Nonempty s\n⊢ ∅ ⊆ s ∧ ∅ ≠ s\n[PROOFSTEP]\nexact ⟨empty_subset s, h.ne_empty.symm⟩\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\nn : ℕ\ns t : Finset α\n⊢ s ∈ powersetLen n t ↔ s ⊆ t ∧ card s = n\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u_1\ns t✝ : Finset α\nn : ℕ\nt : Finset α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\n⊢ { val := val✝, nodup := nodup✝ } ∈ powersetLen n t ↔\n    { val := val✝, nodup := nodup✝ } ⊆ t ∧ card { val := val✝, nodup := nodup✝ } = n\n[PROOFSTEP]\nsimp [powersetLen, val_le_iff.symm]\n[GOAL]\nα : Type u_1\ns✝ t s : Finset α\n⊢ powersetLen 0 s = {∅}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ ∈ powersetLen 0 s ↔ a✝ ∈ {∅}\n[PROOFSTEP]\nrw [mem_powersetLen, mem_singleton, card_eq_zero]\n[GOAL]\ncase a\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ ⊆ s ∧ a✝ = ∅ ↔ a✝ = ∅\n[PROOFSTEP]\nrefine'\n  ⟨fun h => h.2, fun h => by\n    rw [h]\n    exact ⟨empty_subset s, rfl⟩⟩\n[GOAL]\nα : Type u_1\ns✝ t s a✝ : Finset α\nh : a✝ = ∅\n⊢ a✝ ⊆ s ∧ a✝ = ∅\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u_1\ns✝ t s a✝ : Finset α\nh : a✝ = ∅\n⊢ ∅ ⊆ s ∧ ∅ = ∅\n[PROOFSTEP]\nexact ⟨empty_subset s, rfl⟩\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\nn : ℕ\ns : Finset α\nh : card s < n\n⊢ card (powersetLen n s) = 0\n[PROOFSTEP]\nrw [card_powersetLen, Nat.choose_eq_zero_of_lt h]\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\nn : ℕ\ns : Finset α\n⊢ powersetLen n s = filter (fun x => card x = n) (powerset s)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ns✝ t : Finset α\nn : ℕ\ns a✝ : Finset α\n⊢ a✝ ∈ powersetLen n s ↔ a✝ ∈ filter (fun x => card x = n) (powerset s)\n[PROOFSTEP]\nsimp [mem_powersetLen]\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\n⊢ powersetLen (Nat.succ n) (insert x s) = powersetLen (Nat.succ n) s ∪ image (insert x) (powersetLen n s)\n[PROOFSTEP]\nrw [powersetLen_eq_filter, powerset_insert, filter_union, ← powersetLen_eq_filter]\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\n⊢ powersetLen (Nat.succ n) s ∪ filter (fun x => card x = Nat.succ n) (image (insert x) (powerset s)) =\n    powersetLen (Nat.succ n) s ∪ image (insert x) (powersetLen n s)\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\n⊢ filter (fun x => card x = Nat.succ n) (image (insert x) (powerset s)) = image (insert x) (powersetLen n s)\n[PROOFSTEP]\nrw [powersetLen_eq_filter, image_filter]\n[GOAL]\ncase e_a\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\n⊢ image (insert x) (filter ((fun x => card x = Nat.succ n) ∘ insert x) (powerset s)) =\n    image (insert x) (filter (fun x => card x = n) (powerset s))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a.e_s\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\n⊢ filter ((fun x => card x = Nat.succ n) ∘ insert x) (powerset s) = filter (fun x => card x = n) (powerset s)\n[PROOFSTEP]\next t\n[GOAL]\ncase e_a.e_s.a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\nt : Finset α\n⊢ t ∈ filter ((fun x => card x = Nat.succ n) ∘ insert x) (powerset s) ↔ t ∈ filter (fun x => card x = n) (powerset s)\n[PROOFSTEP]\nsimp only [mem_powerset, mem_filter, Function.comp_apply, and_congr_right_iff]\n[GOAL]\ncase e_a.e_s.a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\nt : Finset α\n⊢ t ⊆ s → (card (insert x t) = Nat.succ n ↔ card t = n)\n[PROOFSTEP]\nintro ht\n[GOAL]\ncase e_a.e_s.a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\nt : Finset α\nht : t ⊆ s\n⊢ card (insert x t) = Nat.succ n ↔ card t = n\n[PROOFSTEP]\nhave : x ∉ t := fun H => h (ht H)\n[GOAL]\ncase e_a.e_s.a\nα : Type u_1\ns✝ t✝ : Finset α\ninst✝ : DecidableEq α\nx : α\ns : Finset α\nh : ¬x ∈ s\nn : ℕ\nt : Finset α\nht : t ⊆ s\nthis : ¬x ∈ t\n⊢ card (insert x t) = Nat.succ n ↔ card t = n\n[PROOFSTEP]\nsimp [card_insert_of_not_mem this, Nat.succ_inj']\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\nn : ℕ\ns : Finset α\nh : n ≤ card s\n⊢ Finset.Nonempty (powersetLen n s)\n[PROOFSTEP]\nclassical\ninduction' s using Finset.induction_on with x s hx IH generalizing n\n· rw [card_empty, le_zero_iff] at h \n  rw [h, powersetLen_zero]\n  exact Finset.singleton_nonempty _\n· cases n\n  · simp\n  · rw [card_insert_of_not_mem hx, Nat.succ_le_succ_iff] at h \n    rw [powersetLen_succ_insert hx]\n    refine' Nonempty.mono _ ((IH h).image (insert x))\n    exact subset_union_right _ _\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\nn : ℕ\ns : Finset α\nh : n ≤ card s\n⊢ Finset.Nonempty (powersetLen n s)\n[PROOFSTEP]\ninduction' s using Finset.induction_on with x s hx IH generalizing n\n[GOAL]\ncase empty\nα : Type u_1\ns✝ t : Finset α\nn✝ : ℕ\ns : Finset α\nh✝ : n✝ ≤ card s\nn : ℕ\nh : n ≤ card ∅\n⊢ Finset.Nonempty (powersetLen n ∅)\n[PROOFSTEP]\nrw [card_empty, le_zero_iff] at h \n[GOAL]\ncase empty\nα : Type u_1\ns✝ t : Finset α\nn✝ : ℕ\ns : Finset α\nh✝ : n✝ ≤ card s\nn : ℕ\nh : n = 0\n⊢ Finset.Nonempty (powersetLen n ∅)\n[PROOFSTEP]\nrw [h, powersetLen_zero]\n[GOAL]\ncase empty\nα : Type u_1\ns✝ t : Finset α\nn✝ : ℕ\ns : Finset α\nh✝ : n✝ ≤ card s\nn : ℕ\nh : n = 0\n⊢ Finset.Nonempty {∅}\n[PROOFSTEP]\nexact Finset.singleton_nonempty _\n[GOAL]\ncase insert\nα : Type u_1\ns✝¹ t : Finset α\nn✝ : ℕ\ns✝ : Finset α\nh✝ : n✝ ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nn : ℕ\nh : n ≤ card (insert x s)\n⊢ Finset.Nonempty (powersetLen n (insert x s))\n[PROOFSTEP]\ncases n\n[GOAL]\ncase insert.zero\nα : Type u_1\ns✝¹ t : Finset α\nn : ℕ\ns✝ : Finset α\nh✝ : n ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nh : Nat.zero ≤ card (insert x s)\n⊢ Finset.Nonempty (powersetLen Nat.zero (insert x s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase insert.succ\nα : Type u_1\ns✝¹ t : Finset α\nn : ℕ\ns✝ : Finset α\nh✝ : n ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nn✝ : ℕ\nh : Nat.succ n✝ ≤ card (insert x s)\n⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) (insert x s))\n[PROOFSTEP]\nrw [card_insert_of_not_mem hx, Nat.succ_le_succ_iff] at h \n[GOAL]\ncase insert.succ\nα : Type u_1\ns✝¹ t : Finset α\nn : ℕ\ns✝ : Finset α\nh✝ : n ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nn✝ : ℕ\nh : n✝ ≤ card s\n⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) (insert x s))\n[PROOFSTEP]\nrw [powersetLen_succ_insert hx]\n[GOAL]\ncase insert.succ\nα : Type u_1\ns✝¹ t : Finset α\nn : ℕ\ns✝ : Finset α\nh✝ : n ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nn✝ : ℕ\nh : n✝ ≤ card s\n⊢ Finset.Nonempty (powersetLen (Nat.succ n✝) s ∪ image (insert x) (powersetLen n✝ s))\n[PROOFSTEP]\nrefine' Nonempty.mono _ ((IH h).image (insert x))\n[GOAL]\ncase insert.succ\nα : Type u_1\ns✝¹ t : Finset α\nn : ℕ\ns✝ : Finset α\nh✝ : n ≤ card s✝\nx : α\ns : Finset α\nhx : ¬x ∈ s\nIH : ∀ {n : ℕ}, n ≤ card s → Finset.Nonempty (powersetLen n s)\nn✝ : ℕ\nh : n✝ ≤ card s\n⊢ image (insert x) (powersetLen n✝ s) ⊆ powersetLen (Nat.succ n✝) s ∪ image (insert x) (powersetLen n✝ s)\n[PROOFSTEP]\nexact subset_union_right _ _\n[GOAL]\nα : Type u_1\ns✝ t s : Finset α\n⊢ powersetLen (card s) s = {s}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ ∈ powersetLen (card s) s ↔ a✝ ∈ {s}\n[PROOFSTEP]\nrw [mem_powersetLen, mem_singleton]\n[GOAL]\ncase a\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ ⊆ s ∧ card a✝ = card s ↔ a✝ = s\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ ⊆ s ∧ card a✝ = card s → a✝ = s\n[PROOFSTEP]\nexact fun ⟨hs, hc⟩ => eq_of_subset_of_card_le hs hc.ge\n[GOAL]\ncase a.mpr\nα : Type u_1\ns✝ t s a✝ : Finset α\n⊢ a✝ = s → a✝ ⊆ s ∧ card a✝ = card s\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase a.mpr\nα : Type u_1\ns t a✝ : Finset α\n⊢ a✝ ⊆ a✝ ∧ card a✝ = card a✝\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\ns✝ t s : Finset α\n⊢ powerset s =\n    disjiUnion (range (card s + 1)) (fun i => powersetLen i s)\n      (_ : Set.Pairwise ↑(range (card s + 1)) fun i j => _root_.Disjoint (powersetLen i s) (powersetLen j s))\n[PROOFSTEP]\nrefine' ext fun a => ⟨fun ha => _, fun ha => _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\ns✝ t s a : Finset α\nha : a ∈ powerset s\n⊢ a ∈\n    disjiUnion (range (card s + 1)) (fun i => powersetLen i s)\n      (_ : Set.Pairwise ↑(range (card s + 1)) fun i j => _root_.Disjoint (powersetLen i s) (powersetLen j s))\n[PROOFSTEP]\nrw [mem_disjiUnion]\n[GOAL]\ncase refine'_1\nα : Type u_1\ns✝ t s a : Finset α\nha : a ∈ powerset s\n⊢ ∃ a_1, a_1 ∈ range (card s + 1) ∧ a ∈ powersetLen a_1 s\n[PROOFSTEP]\nexact\n  ⟨a.card, mem_range.mpr (Nat.lt_succ_of_le (card_le_of_subset (mem_powerset.mp ha))),\n    mem_powersetLen.mpr ⟨mem_powerset.mp ha, rfl⟩⟩\n[GOAL]\ncase refine'_2\nα : Type u_1\ns✝ t s a : Finset α\nha :\n  a ∈\n    disjiUnion (range (card s + 1)) (fun i => powersetLen i s)\n      (_ : Set.Pairwise ↑(range (card s + 1)) fun i j => _root_.Disjoint (powersetLen i s) (powersetLen j s))\n⊢ a ∈ powerset s\n[PROOFSTEP]\nrcases mem_disjiUnion.mp ha with ⟨i, _hi, ha⟩\n[GOAL]\ncase refine'_2.intro.intro\nα : Type u_1\ns✝ t s a : Finset α\nha✝ :\n  a ∈\n    disjiUnion (range (card s + 1)) (fun i => powersetLen i s)\n      (_ : Set.Pairwise ↑(range (card s + 1)) fun i j => _root_.Disjoint (powersetLen i s) (powersetLen j s))\ni : ℕ\n_hi : i ∈ range (card s + 1)\nha : a ∈ powersetLen i s\n⊢ a ∈ powerset s\n[PROOFSTEP]\nexact mem_powerset.mpr (mem_powersetLen.mp ha).1\n[GOAL]\nα : Type u_1\ns✝ t : Finset α\ninst✝ : DecidableEq (Finset α)\ns : Finset α\n⊢ powerset s = Finset.biUnion (range (card s + 1)) fun i => powersetLen i s\n[PROOFSTEP]\nsimpa only [disjiUnion_eq_biUnion] using powerset_card_disjiUnion s\n[GOAL]\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\n⊢ sup (powersetLen (Nat.succ n) u) id = u\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\n⊢ sup (powersetLen (Nat.succ n) u) id ≤ u\n[PROOFSTEP]\nsimp_rw [Finset.sup_le_iff, mem_powersetLen]\n[GOAL]\ncase a\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\n⊢ ∀ (b : Finset α), b ⊆ u ∧ card b = Nat.succ n → id b ≤ u\n[PROOFSTEP]\nrintro x ⟨h, -⟩\n[GOAL]\ncase a.intro\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nx : Finset α\nh : x ⊆ u\n⊢ id x ≤ u\n[PROOFSTEP]\nexact h\n[GOAL]\ncase a\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\n⊢ u ≤ sup (powersetLen (Nat.succ n) u) id\n[PROOFSTEP]\nrw [sup_eq_biUnion, le_iff_subset, subset_iff]\n[GOAL]\ncase a\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\n⊢ ∀ ⦃x : α⦄, x ∈ u → x ∈ Finset.biUnion (powersetLen (Nat.succ n) u) id\n[PROOFSTEP]\ncases' (Nat.succ_le_of_lt hn).eq_or_lt with h' h'\n[GOAL]\ncase a.inl\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n = card u\n⊢ ∀ ⦃x : α⦄, x ∈ u → x ∈ Finset.biUnion (powersetLen (Nat.succ n) u) id\n[PROOFSTEP]\nsimp [h']\n[GOAL]\ncase a.inr\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\n⊢ ∀ ⦃x : α⦄, x ∈ u → x ∈ Finset.biUnion (powersetLen (Nat.succ n) u) id\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase a.inr\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\nx : α\nhx : x ∈ u\n⊢ x ∈ Finset.biUnion (powersetLen (Nat.succ n) u) id\n[PROOFSTEP]\nsimp only [mem_biUnion, exists_prop, id.def]\n[GOAL]\ncase a.inr\nα : Type u_1\ns t : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\nx : α\nhx : x ∈ u\n⊢ ∃ a, a ∈ powersetLen (Nat.succ n) u ∧ x ∈ a\n[PROOFSTEP]\nobtain ⟨t, ht⟩ : ∃ t, t ∈ powersetLen n (u.erase x) :=\n  powersetLen_nonempty (le_trans (Nat.le_pred_of_lt hn) pred_card_le_card_erase)\n[GOAL]\ncase a.inr.intro\nα : Type u_1\ns t✝ : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\nx : α\nhx : x ∈ u\nt : Finset α\nht : t ∈ powersetLen n (erase u x)\n⊢ ∃ a, a ∈ powersetLen (Nat.succ n) u ∧ x ∈ a\n[PROOFSTEP]\nrefine' ⟨insert x t, _, mem_insert_self _ _⟩\n[GOAL]\ncase a.inr.intro\nα : Type u_1\ns t✝ : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\nx : α\nhx : x ∈ u\nt : Finset α\nht : t ∈ powersetLen n (erase u x)\n⊢ insert x t ∈ powersetLen (Nat.succ n) u\n[PROOFSTEP]\nrw [← insert_erase hx, powersetLen_succ_insert (not_mem_erase _ _)]\n[GOAL]\ncase a.inr.intro\nα : Type u_1\ns t✝ : Finset α\ninst✝ : DecidableEq α\nu : Finset α\nn : ℕ\nhn : n < card u\nh' : Nat.succ n < card u\nx : α\nhx : x ∈ u\nt : Finset α\nht : t ∈ powersetLen n (erase u x)\n⊢ insert x t ∈ powersetLen (Nat.succ n) (erase u x) ∪ image (insert x) (powersetLen n (erase u x))\n[PROOFSTEP]\nexact mem_union_right _ (mem_image_of_mem _ ht)\n[GOAL]\nα : Type u_1\ns✝ t s : Finset α\ni : ℕ\n⊢ Multiset.map val (powersetLen i s).val = Multiset.powersetLen i s.val\n[PROOFSTEP]\nsimp [Finset.powersetLen, map_pmap, pmap_eq_map, map_id']\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\n⊢ t ∈ powersetLen n (map f s) ↔ t ∈ map (mapEmbedding f).toEmbedding (powersetLen n s)\n[PROOFSTEP]\nsimp only [card_map, mem_powersetLen, le_eq_subset, gt_iff_lt, mem_map, mapEmbedding_apply]\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\n⊢ t ⊆ map f s ∧ card t = n ↔ ∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\n⊢ t ⊆ map f s ∧ card t = n → ∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t\n[PROOFSTEP]\nclassical\nintro h\nhave : map f (filter (fun x => (f x ∈ t)) s) = t := by\n  ext x\n  simp only [mem_map, mem_filter, decide_eq_true_eq]\n  exact\n    ⟨fun ⟨_y, ⟨_hy₁, hy₂⟩, hy₃⟩ => hy₃ ▸ hy₂, fun hx =>\n      let ⟨y, hy⟩ := mem_map.1 (h.1 hx);\n      ⟨y, ⟨hy.1, hy.2 ▸ hx⟩, hy.2⟩⟩\nrefine' ⟨_, _, this⟩\nrw [← card_map f, this, h.2]; simp\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\n⊢ t ⊆ map f s ∧ card t = n → ∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\n⊢ ∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t\n[PROOFSTEP]\nhave : map f (filter (fun x => (f x ∈ t)) s) = t := by\n  ext x\n  simp only [mem_map, mem_filter, decide_eq_true_eq]\n  exact\n    ⟨fun ⟨_y, ⟨_hy₁, hy₂⟩, hy₃⟩ => hy₃ ▸ hy₂, fun hx =>\n      let ⟨y, hy⟩ := mem_map.1 (h.1 hx);\n      ⟨y, ⟨hy.1, hy.2 ▸ hx⟩, hy.2⟩⟩\n[GOAL]\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\n⊢ map f (filter (fun x => ↑f x ∈ t) s) = t\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\nx : β\n⊢ x ∈ map f (filter (fun x => ↑f x ∈ t) s) ↔ x ∈ t\n[PROOFSTEP]\nsimp only [mem_map, mem_filter, decide_eq_true_eq]\n[GOAL]\ncase a\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\nx : β\n⊢ (∃ a, (a ∈ s ∧ ↑f a ∈ t) ∧ ↑f a = x) ↔ x ∈ t\n[PROOFSTEP]\nexact\n  ⟨fun ⟨_y, ⟨_hy₁, hy₂⟩, hy₃⟩ => hy₃ ▸ hy₂, fun hx =>\n    let ⟨y, hy⟩ := mem_map.1 (h.1 hx);\n    ⟨y, ⟨hy.1, hy.2 ▸ hx⟩, hy.2⟩⟩\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\nthis : map f (filter (fun x => ↑f x ∈ t) s) = t\n⊢ ∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t\n[PROOFSTEP]\nrefine' ⟨_, _, this⟩\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\nthis : map f (filter (fun x => ↑f x ∈ t) s) = t\n⊢ filter (fun x => ↑f x ∈ t) s ⊆ s ∧ card (filter (fun x => ↑f x ∈ t) s) = n\n[PROOFSTEP]\nrw [← card_map f, this, h.2]\n[GOAL]\ncase mp\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\nh : t ⊆ map f s ∧ card t = n\nthis : map f (filter (fun x => ↑f x ∈ t) s) = t\n⊢ filter (fun x => ↑f x ∈ t) s ⊆ s ∧ n = n\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u_1\ns✝ t✝ : Finset α\nβ : Type u_2\nf : α ↪ β\nn : ℕ\ns : Finset α\nt : Finset β\n⊢ (∃ a, (a ⊆ s ∧ card a = n) ∧ ↑(mapEmbedding f).toEmbedding a = t) → t ⊆ map f s ∧ card t = n\n[PROOFSTEP]\nrintro ⟨a, ⟨has, rfl⟩, rfl⟩\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ns✝ t : Finset α\nβ : Type u_2\nf : α ↪ β\ns a : Finset α\nhas : a ⊆ s\n⊢ ↑(mapEmbedding f).toEmbedding a ⊆ map f s ∧ card (↑(mapEmbedding f).toEmbedding a) = card a\n[PROOFSTEP]\ndsimp [RelEmbedding.coe_toEmbedding]\n  --Porting note: Why is `rw` required here and not `simp`?\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ns✝ t : Finset α\nβ : Type u_2\nf : α ↪ β\ns a : Finset α\nhas : a ⊆ s\n⊢ ↑(mapEmbedding f) a ⊆ map f s ∧ card (↑(mapEmbedding f) a) = card a\n[PROOFSTEP]\nrw [mapEmbedding_apply]\n[GOAL]\ncase mpr.intro.intro.intro\nα : Type u_1\ns✝ t : Finset α\nβ : Type u_2\nf : α ↪ β\ns a : Finset α\nhas : a ⊆ s\n⊢ map f a ⊆ map f s ∧ card (map f a) = card a\n[PROOFSTEP]\nsimp [has]\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Powerset", "llama_tokens": 11425, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. YES", "lm_q1_score": 0.5078118642792044, "lm_q2_score": 0.5078118642792044, "lm_q1q2_score": 0.25787288950272114}}
{"text": "[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\n⊢ Linear k (FdRep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ AddCommGroup (CoeSort.coe V)\n[PROOFSTEP]\nchange AddCommGroup ((forget₂ (FdRep k G) (FGModuleCat k)).obj V).obj\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ AddCommGroup ↑((forget₂ (FdRep k G) (FGModuleCat k)).obj V).obj\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ Module k (CoeSort.coe V)\n[PROOFSTEP]\nchange Module k ((forget₂ (FdRep k G) (FGModuleCat k)).obj V).obj\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ Module k ↑((forget₂ (FdRep k G) (FGModuleCat k)).obj V).obj\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ FiniteDimensional k (CoeSort.coe V)\n[PROOFSTEP]\nchange FiniteDimensional k ((forget₂ (FdRep k G) (FGModuleCat k)).obj V)\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ FiniteDimensional k ↑((forget₂ (FdRep k G) (FGModuleCat k)).obj V)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\ng : G\n⊢ ↑(ρ W) g = ↑(LinearEquiv.conj (isoToLinearEquiv i)) (↑(ρ V) g)\n[PROOFSTEP]\nerw [FdRep.isoToLinearEquiv, ← FGModuleCat.Iso.conj_eq_conj, Iso.conj_apply]\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\ng : G\n⊢ ↑(ρ W) g =\n    ((Action.forget (FGModuleCat k) (MonCat.of G)).mapIso i).inv ≫\n      ↑(ρ V) g ≫ ((Action.forget (FGModuleCat k) (MonCat.of G)).mapIso i).hom\n[PROOFSTEP]\nrw [Iso.eq_inv_comp ((Action.forget (FGModuleCat k) (MonCat.of G)).mapIso i)]\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV W : FdRep k G\ni : V ≅ W\ng : G\n⊢ ((Action.forget (FGModuleCat k) (MonCat.of G)).mapIso i).hom ≫ ↑(ρ W) g =\n    ↑(ρ V) g ≫ ((Action.forget (FGModuleCat k) (MonCat.of G)).mapIso i).hom\n[PROOFSTEP]\nexact (i.hom.comm g).symm\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\n⊢ Rep.ρ ((forget₂ (FdRep k G) (Rep k G)).obj V) = ρ V\n[PROOFSTEP]\next g v\n[GOAL]\ncase h.h\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nV : FdRep k G\ng : G\nv : CoeSort.coe ((forget₂ (FdRep k G) (Rep k G)).obj V)\n⊢ ↑(↑(Rep.ρ ((forget₂ (FdRep k G) (Rep k G)).obj V)) g) v = ↑(↑(ρ V) g) v\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\n⊢ MonoidalCategory (FdRep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\n⊢ MonoidalPreadditive (FdRep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\n⊢ MonoidalLinear k (FdRep k G)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\n⊢ HasKernels (FdRep k G)\n[PROOFSTEP]\ninfer_instance\n  -- Verify that Schur's lemma applies out of the box.\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nX Y : FdRep k G\nx✝ : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y\n⊢ (fun f => Action.Hom.mk ((forget₂ (FGModuleCat k) (ModuleCat k)).map f.hom))\n      (AddHom.toFun\n        {\n            toAddHom :=\n              { toFun := fun f => Action.Hom.mk f.hom,\n                map_add' :=\n                  (_ :\n                    ∀ (x x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                      (fun f => Action.Hom.mk f.hom) (x + x_1) = (fun f => Action.Hom.mk f.hom) (x + x_1)) },\n            map_smul' :=\n              (_ :\n                ∀ (x : k) (x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                  AddHom.toFun\n                      { toFun := fun f => Action.Hom.mk f.hom,\n                        map_add' :=\n                          (_ :\n                            ∀ (x x_2 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                              (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                      (x • x_1) =\n                    AddHom.toFun\n                      { toFun := fun f => Action.Hom.mk f.hom,\n                        map_add' :=\n                          (_ :\n                            ∀ (x x_2 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                              (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                      (x • x_1)) }.toAddHom\n        x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.h\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nX Y : FdRep k G\nx✝¹ : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y\nx✝ : ↑((forget₂ (FdRep k G) (Rep k G)).obj X).V\n⊢ ↑((fun f => Action.Hom.mk ((forget₂ (FGModuleCat k) (ModuleCat k)).map f.hom))\n            (AddHom.toFun\n              {\n                  toAddHom :=\n                    { toFun := fun f => Action.Hom.mk f.hom,\n                      map_add' :=\n                        (_ :\n                          ∀ (x x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                            (fun f => Action.Hom.mk f.hom) (x + x_1) = (fun f => Action.Hom.mk f.hom) (x + x_1)) },\n                  map_smul' :=\n                    (_ :\n                      ∀ (x : k) (x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                        AddHom.toFun\n                            { toFun := fun f => Action.Hom.mk f.hom,\n                              map_add' :=\n                                (_ :\n                                  ∀\n                                    (x x_2 :\n                                      (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                                    (fun f => Action.Hom.mk f.hom) (x + x_2) =\n                                      (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                            (x • x_1) =\n                          AddHom.toFun\n                            { toFun := fun f => Action.Hom.mk f.hom,\n                              map_add' :=\n                                (_ :\n                                  ∀\n                                    (x x_2 :\n                                      (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                                    (fun f => Action.Hom.mk f.hom) (x + x_2) =\n                                      (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                            (x • x_1)) }.toAddHom\n              x✝¹)).hom\n      x✝ =\n    ↑x✝¹.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nX Y : FdRep k G\nx✝ : X ⟶ Y\n⊢ AddHom.toFun\n      {\n          toAddHom :=\n            { toFun := fun f => Action.Hom.mk f.hom,\n              map_add' :=\n                (_ :\n                  ∀ (x x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                    (fun f => Action.Hom.mk f.hom) (x + x_1) = (fun f => Action.Hom.mk f.hom) (x + x_1)) },\n          map_smul' :=\n            (_ :\n              ∀ (x : k) (x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                AddHom.toFun\n                    { toFun := fun f => Action.Hom.mk f.hom,\n                      map_add' :=\n                        (_ :\n                          ∀ (x x_2 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                            (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                    (x • x_1) =\n                  AddHom.toFun\n                    { toFun := fun f => Action.Hom.mk f.hom,\n                      map_add' :=\n                        (_ :\n                          ∀ (x x_2 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                            (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                    (x • x_1)) }.toAddHom\n      ((fun f => Action.Hom.mk ((forget₂ (FGModuleCat k) (ModuleCat k)).map f.hom)) x✝) =\n    x✝\n[PROOFSTEP]\next\n[GOAL]\ncase h.w\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Monoid G\nX Y : FdRep k G\nx✝¹ : X ⟶ Y\nx✝ : (forget (FGModuleCat k)).obj X.V\n⊢ ↑(AddHom.toFun\n            {\n                toAddHom :=\n                  { toFun := fun f => Action.Hom.mk f.hom,\n                    map_add' :=\n                      (_ :\n                        ∀ (x x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                          (fun f => Action.Hom.mk f.hom) (x + x_1) = (fun f => Action.Hom.mk f.hom) (x + x_1)) },\n                map_smul' :=\n                  (_ :\n                    ∀ (x : k) (x_1 : (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                      AddHom.toFun\n                          { toFun := fun f => Action.Hom.mk f.hom,\n                            map_add' :=\n                              (_ :\n                                ∀\n                                  (x x_2 :\n                                    (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                                  (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                          (x • x_1) =\n                        AddHom.toFun\n                          { toFun := fun f => Action.Hom.mk f.hom,\n                            map_add' :=\n                              (_ :\n                                ∀\n                                  (x x_2 :\n                                    (forget₂ (FdRep k G) (Rep k G)).obj X ⟶ (forget₂ (FdRep k G) (Rep k G)).obj Y),\n                                  (fun f => Action.Hom.mk f.hom) (x + x_2) = (fun f => Action.Hom.mk f.hom) (x + x_2)) }\n                          (x • x_1)) }.toAddHom\n            ((fun f => Action.Hom.mk ((forget₂ (FGModuleCat k) (ModuleCat k)).map f.hom)) x✝¹)).hom\n      x✝ =\n    ↑x✝¹.hom x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Group G\n⊢ RightRigidCategory (FdRep k G)\n[PROOFSTEP]\nchange RightRigidCategory (Action (FGModuleCat k) (GroupCat.of G))\n[GOAL]\nk G : Type u\ninst✝¹ : Field k\ninst✝ : Group G\n⊢ RightRigidCategory (Action (FGModuleCat k) ((forget₂ GroupCat MonCat).obj (GroupCat.of G)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nk G V : Type u\ninst✝⁴ : Field k\ninst✝³ : Group G\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : FiniteDimensional k V\nρV : Representation k G V\nW : FdRep k G\n⊢ of (dual ρV) ⊗ W ≅ of (linHom ρV (ρ W))\n[PROOFSTEP]\nrefine Action.mkIso (dualTensorIsoLinHomAux ρV W) ?_\n[GOAL]\nk G V : Type u\ninst✝⁴ : Field k\ninst✝³ : Group G\ninst✝² : AddCommGroup V\ninst✝¹ : Module k V\ninst✝ : FiniteDimensional k V\nρV : Representation k G V\nW : FdRep k G\n⊢ ∀ (g : ↑(MonCat.of G)),\n    ↑(of (dual ρV) ⊗ W).ρ g ≫ (dualTensorIsoLinHomAux ρV W).hom =\n      (dualTensorIsoLinHomAux ρV W).hom ≫ ↑(of (linHom ρV (ρ W))).ρ g\n[PROOFSTEP]\nconvert dualTensorHom_comm ρV W.ρ\n", "meta": {"mathlib_filename": "Mathlib.RepresentationTheory.FdRep", "llama_tokens": 4528, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6442251064863695, "lm_q2_score": 0.399811640739795, "lm_q1q2_score": 0.2575686968300846}}
{"text": "[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ id <$> x = x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ id <$> abs (repr x) = abs (repr x)\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ id <$> abs { fst := a, snd := f } = abs { fst := a, snd := f }\n[PROOFSTEP]\nrw [← abs_map]\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ abs (id <$> { fst := a, snd := f }) = abs { fst := a, snd := f }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα β γ : Type u\nf : α → β\ng : β → γ\nx : F α\n⊢ (g ∘ f) <$> x = g <$> f <$> x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα β γ : Type u\nf : α → β\ng : β → γ\nx : F α\n⊢ (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα β γ : Type u\nf✝ : α → β\ng : β → γ\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ (g ∘ f✝) <$> abs { fst := a, snd := f } = g <$> f✝ <$> abs { fst := a, snd := f }\n[PROOFSTEP]\nrw [← abs_map, ← abs_map, ← abs_map]\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα β γ : Type u\nf✝ : α → β\ng : β → γ\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ abs ((g ∘ f✝) <$> { fst := a, snd := f }) = abs (g <$> f✝ <$> { fst := a, snd := f })\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ Liftp p x ↔ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ Liftp p x → ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mp.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\ncases' h : repr y with a f\n[GOAL]\ncase mp.intro.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nuse a, fun i => (f i).val\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i => ↑(f i) } ∧ ∀ (i : PFunctor.B (P F) a), p ↑(f i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i => ↑(f i) }\n[PROOFSTEP]\nrw [← hy, ← abs_repr y, h, ← abs_map]\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs (Subtype.val <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => ↑(f i) }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∀ (i : PFunctor.B (P F) a), p ↑(f i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\ni : PFunctor.B (P F) a\n⊢ p ↑(f i)\n[PROOFSTEP]\napply (f i).property\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → Liftp p x\n[PROOFSTEP]\nrintro ⟨a, f, h₀, h₁⟩\n[GOAL]\ncase mpr.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ Liftp p x\n[PROOFSTEP]\nuse abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ Subtype.val <$> abs { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } } = x\n[PROOFSTEP]\nrw [← abs_map, h₀]\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : x = abs { fst := a, snd := f }\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ abs (Subtype.val <$> { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } }) =\n    abs { fst := a, snd := f }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ Liftp p x ↔ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ Liftp p x → ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)\n[PROOFSTEP]\nrintro ⟨y, hy⟩\n[GOAL]\ncase mp.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\n⊢ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)\n[PROOFSTEP]\ncases' h : repr y with a f\n[GOAL]\ncase mp.intro.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)\n[PROOFSTEP]\nuse⟨a, fun i => (f i).val⟩\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs { fst := a, snd := fun i => ↑(f i) } = x ∧\n    ∀ (i : PFunctor.B (P F) { fst := a, snd := fun i => ↑(f i) }.fst),\n      p (Sigma.snd { fst := a, snd := fun i => ↑(f i) } i)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs { fst := a, snd := fun i => ↑(f i) } = x ∧ ∀ (i : PFunctor.B (P F) a), p ↑(f i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs { fst := a, snd := fun i => ↑(f i) } = x\n[PROOFSTEP]\nrw [← hy, ← abs_repr y, h, ← abs_map]\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ abs { fst := a, snd := fun i => ↑(f i) } = abs (Subtype.val <$> { fst := a, snd := f })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\n⊢ ∀ (i : PFunctor.B (P F) a), p ↑(f i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\ny : F (Subtype p)\nhy : Subtype.val <$> y = x\na : (P F).A\nf : PFunctor.B (P F) a → Subtype p\nh : repr y = { fst := a, snd := f }\ni : PFunctor.B (P F) a\n⊢ p ↑(f i)\n[PROOFSTEP]\napply (f i).property\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\n⊢ (∃ u, abs u = x ∧ ∀ (i : PFunctor.B (P F) u.fst), p (Sigma.snd u i)) → Liftp p x\n[PROOFSTEP]\nrintro ⟨⟨a, f⟩, h₀, h₁⟩\n[GOAL]\ncase mpr.intro.mk.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : abs { fst := a, snd := f } = x\nh₁ : ∀ (i : PFunctor.B (P F) { fst := a, snd := f }.fst), p (Sigma.snd { fst := a, snd := f } i)\n⊢ Liftp p x\n[PROOFSTEP]\ndsimp at *\n[GOAL]\ncase mpr.intro.mk.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : abs { fst := a, snd := f } = x\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ Liftp p x\n[PROOFSTEP]\nuse abs ⟨a, fun i => ⟨f i, h₁ i⟩⟩\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : abs { fst := a, snd := f } = x\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ Subtype.val <$> abs { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } } = x\n[PROOFSTEP]\nrw [← abs_map, ← h₀]\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\np : α → Prop\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nh₀ : abs { fst := a, snd := f } = x\nh₁ : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ abs (Subtype.val <$> { fst := a, snd := fun i => { val := f i, property := (_ : p (f i)) } }) =\n    abs { fst := a, snd := f }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\n⊢ Liftr r x y ↔\n    ∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\n⊢ Liftr r x y →\n    ∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n[PROOFSTEP]\nrintro ⟨u, xeq, yeq⟩\n[GOAL]\ncase mp.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\n⊢ ∃ a f₀ f₁,\n    x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n[PROOFSTEP]\ncases' h : repr u with a f\n[GOAL]\ncase mp.intro.intro.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ ∃ a f₀ f₁,\n    x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n[PROOFSTEP]\nuse a, fun i => (f i).val.fst, fun i => (f i).val.snd\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i => (↑(f i)).fst } ∧\n    y = abs { fst := a, snd := fun i => (↑(f i)).snd } ∧ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ x = abs { fst := a, snd := fun i => (↑(f i)).fst }\n[PROOFSTEP]\nrw [← xeq, ← abs_repr u, h, ← abs_map]\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ abs ((fun t => (↑t).fst) <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => (↑(f i)).fst }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ y = abs { fst := a, snd := fun i => (↑(f i)).snd } ∧ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.right.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ y = abs { fst := a, snd := fun i => (↑(f i)).snd }\n[PROOFSTEP]\nrw [← yeq, ← abs_repr u, h, ← abs_map]\n[GOAL]\ncase h.right.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ abs ((fun t => (↑t).snd) <$> { fst := a, snd := f }) = abs { fst := a, snd := fun i => (↑(f i)).snd }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\n⊢ ∀ (i : PFunctor.B (P F) a), r (↑(f i)).fst (↑(f i)).snd\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h.right.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\nu : F { p // r p.fst p.snd }\nxeq : (fun t => (↑t).fst) <$> u = x\nyeq : (fun t => (↑t).snd) <$> u = y\na : (P F).A\nf : PFunctor.B (P F) a → { p // r p.fst p.snd }\nh : repr u = { fst := a, snd := f }\ni : PFunctor.B (P F) a\n⊢ r (↑(f i)).fst (↑(f i)).snd\n[PROOFSTEP]\nexact (f i).property\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\n⊢ (∃ a f₀ f₁,\n      x = abs { fst := a, snd := f₀ } ∧ y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)) →\n    Liftr r x y\n[PROOFSTEP]\nrintro ⟨a, f₀, f₁, xeq, yeq, h⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ Liftr r x y\n[PROOFSTEP]\nuse abs ⟨a, fun i => ⟨(f₀ i, f₁ i), h i⟩⟩\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ (fun t => (↑t).fst) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =\n      x ∧\n    (fun t => (↑t).snd) <$>\n        abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =\n      y\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ (fun t => (↑t).fst) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =\n    x\n[PROOFSTEP]\nrw [xeq, ← abs_map]\n[GOAL]\ncase h.left\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ abs\n      ((fun t => (↑t).fst) <$>\n        { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } }) =\n    abs { fst := a, snd := f₀ }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ (fun t => (↑t).snd) <$> abs { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } } =\n    y\n[PROOFSTEP]\nrw [yeq, ← abs_map]\n[GOAL]\ncase h.right\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nr : α → α → Prop\nx y : F α\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f₀ }\nyeq : y = abs { fst := a, snd := f₁ }\nh : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ abs\n      ((fun t => (↑t).snd) <$>\n        { fst := a, snd := fun i => { val := (f₀ i, f₁ i), property := (_ : r (f₀ i) (f₁ i)) } }) =\n    abs { fst := a, snd := f₁ }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : PFunctor.W (P F)\n⊢ recF g x = g (abs (recF g <$> PFunctor.W.dest x))\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\na✝ : (P F).A\nf✝ : PFunctor.B (P F) a✝ → WType (P F).B\n⊢ recF g (WType.mk a✝ f✝) = g (abs (recF g <$> PFunctor.W.dest (WType.mk a✝ f✝)))\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\n⊢ Wequiv x y → recF u x = recF u y\n[PROOFSTEP]\nintro h\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\nh : Wequiv x y\n⊢ recF u x = recF u y\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase ind\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ f'✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f✝ x) (f'✝ x)\na_ih✝ : ∀ (x : PFunctor.B (P F) a✝¹), recF u (f✝ x) = recF u (f'✝ x)\n⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a✝¹ f'✝)\ncase abs\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na'✝ : (P F).A\nf'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)\na✝ : abs { fst := a✝¹, snd := f✝ } = abs { fst := a'✝, snd := f'✝ }\n⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a'✝ f'✝)\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : recF u u✝ = recF u v✝\na_ih✝ : recF u v✝ = recF u w✝\n⊢ recF u u✝ = recF u w✝\n[PROOFSTEP]\ncase ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na : (P F).A\nf f' : PFunctor.B (P F) a → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)\nih : ∀ (x : PFunctor.B (P F) a), recF u (f x) = recF u (f' x)\n⊢ recF u (WType.mk a f) = recF u (WType.mk a f')\n[PROOFSTEP]\ncase ind a f f' _ ih => simp only [recF_eq', PFunctor.map_eq, Function.comp, ih]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na : (P F).A\nf f' : PFunctor.B (P F) a → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)\nih : ∀ (x : PFunctor.B (P F) a), recF u (f x) = recF u (f' x)\n⊢ recF u (WType.mk a f) = recF u (WType.mk a f')\n[PROOFSTEP]\nsimp only [recF_eq', PFunctor.map_eq, Function.comp, ih]\n[GOAL]\ncase abs\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na'✝ : (P F).A\nf'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)\na✝ : abs { fst := a✝¹, snd := f✝ } = abs { fst := a'✝, snd := f'✝ }\n⊢ recF u (WType.mk a✝¹ f✝) = recF u (WType.mk a'✝ f'✝)\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : recF u u✝ = recF u v✝\na_ih✝ : recF u v✝ = recF u w✝\n⊢ recF u u✝ = recF u w✝\n[PROOFSTEP]\ncase abs a f a' f' h => simp only [recF_eq', abs_map, h]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\na' : (P F).A\nf' : PFunctor.B (P F) a' → PFunctor.W (P F)\nh : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\n⊢ recF u (WType.mk a f) = recF u (WType.mk a' f')\n[PROOFSTEP]\ncase abs a f a' f' h => simp only [recF_eq', abs_map, h]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y : PFunctor.W (P F)\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\na' : (P F).A\nf' : PFunctor.B (P F) a' → PFunctor.W (P F)\nh : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\n⊢ recF u (WType.mk a f) = recF u (WType.mk a' f')\n[PROOFSTEP]\nsimp only [recF_eq', abs_map, h]\n[GOAL]\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : recF u u✝ = recF u v✝\na_ih✝ : recF u v✝ = recF u w✝\n⊢ recF u u✝ = recF u w✝\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx✝ y✝ x y z : PFunctor.W (P F)\na✝¹ : Wequiv x y\na✝ : Wequiv y z\nih₁ : recF u x = recF u y\nih₂ : recF u y = recF u z\n⊢ recF u x = recF u z\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ => exact Eq.trans ih₁ ih₂\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nu : F α → α\nx✝ y✝ x y z : PFunctor.W (P F)\na✝¹ : Wequiv x y\na✝ : Wequiv y z\nih₁ : recF u x = recF u y\nih₂ : recF u y = recF u z\n⊢ recF u x = recF u z\n[PROOFSTEP]\nexact Eq.trans ih₁ ih₂\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\nh : Qpf.abs (PFunctor.W.dest x) = Qpf.abs (PFunctor.W.dest y)\n⊢ Wequiv x y\n[PROOFSTEP]\ncases x\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\ny : PFunctor.W (P F)\na✝ : (P F).A\nf✝ : PFunctor.B (P F) a✝ → WType (P F).B\nh : Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝)) = Qpf.abs (PFunctor.W.dest y)\n⊢ Wequiv (WType.mk a✝ f✝) y\n[PROOFSTEP]\ncases y\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na✝¹ : (P F).A\nf✝¹ : PFunctor.B (P F) a✝¹ → WType (P F).B\na✝ : (P F).A\nf✝ : PFunctor.B (P F) a✝ → WType (P F).B\nh : Qpf.abs (PFunctor.W.dest (WType.mk a✝¹ f✝¹)) = Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝))\n⊢ Wequiv (WType.mk a✝¹ f✝¹) (WType.mk a✝ f✝)\n[PROOFSTEP]\napply Wequiv.abs\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na✝¹ : (P F).A\nf✝¹ : PFunctor.B (P F) a✝¹ → WType (P F).B\na✝ : (P F).A\nf✝ : PFunctor.B (P F) a✝ → WType (P F).B\nh : Qpf.abs (PFunctor.W.dest (WType.mk a✝¹ f✝¹)) = Qpf.abs (PFunctor.W.dest (WType.mk a✝ f✝))\n⊢ Qpf.abs { fst := a✝¹, snd := f✝¹ } = Qpf.abs { fst := a✝, snd := f✝ }\n[PROOFSTEP]\napply h\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : PFunctor.W (P F)\n⊢ Wequiv x x\n[PROOFSTEP]\ncases' x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\n⊢ Wequiv (WType.mk a f) (WType.mk a f)\n[PROOFSTEP]\nexact Wequiv.abs a f a f rfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\n⊢ Wequiv x y → Wequiv y x\n[PROOFSTEP]\nintro h\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\nh : Wequiv x y\n⊢ Wequiv y x\n[PROOFSTEP]\ninduction h\n[GOAL]\ncase ind\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ f'✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f✝ x) (f'✝ x)\na_ih✝ : ∀ (x : PFunctor.B (P F) a✝¹), Wequiv (f'✝ x) (f✝ x)\n⊢ Wequiv (WType.mk a✝¹ f'✝) (WType.mk a✝¹ f✝)\ncase abs\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na'✝ : (P F).A\nf'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)\na✝ : Qpf.abs { fst := a✝¹, snd := f✝ } = Qpf.abs { fst := a'✝, snd := f'✝ }\n⊢ Wequiv (WType.mk a'✝ f'✝) (WType.mk a✝¹ f✝)\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : Wequiv v✝ u✝\na_ih✝ : Wequiv w✝ v✝\n⊢ Wequiv w✝ u✝\n[PROOFSTEP]\ncase ind a f f' _ ih => exact Wequiv.ind _ _ _ ih\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na : (P F).A\nf f' : PFunctor.B (P F) a → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)\nih : ∀ (x : PFunctor.B (P F) a), Wequiv (f' x) (f x)\n⊢ Wequiv (WType.mk a f') (WType.mk a f)\n[PROOFSTEP]\ncase ind a f f' _ ih => exact Wequiv.ind _ _ _ ih\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na : (P F).A\nf f' : PFunctor.B (P F) a → PFunctor.W (P F)\na✝ : ∀ (x : PFunctor.B (P F) a), Wequiv (f x) (f' x)\nih : ∀ (x : PFunctor.B (P F) a), Wequiv (f' x) (f x)\n⊢ Wequiv (WType.mk a f') (WType.mk a f)\n[PROOFSTEP]\nexact Wequiv.ind _ _ _ ih\n[GOAL]\ncase abs\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na✝¹ : (P F).A\nf✝ : PFunctor.B (P F) a✝¹ → PFunctor.W (P F)\na'✝ : (P F).A\nf'✝ : PFunctor.B (P F) a'✝ → PFunctor.W (P F)\na✝ : Qpf.abs { fst := a✝¹, snd := f✝ } = Qpf.abs { fst := a'✝, snd := f'✝ }\n⊢ Wequiv (WType.mk a'✝ f'✝) (WType.mk a✝¹ f✝)\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : Wequiv v✝ u✝\na_ih✝ : Wequiv w✝ v✝\n⊢ Wequiv w✝ u✝\n[PROOFSTEP]\ncase abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\na' : (P F).A\nf' : PFunctor.B (P F) a' → PFunctor.W (P F)\nh : Qpf.abs { fst := a, snd := f } = Qpf.abs { fst := a', snd := f' }\n⊢ Wequiv (WType.mk a' f') (WType.mk a f)\n[PROOFSTEP]\ncase abs a f a' f' h => exact Wequiv.abs _ _ _ _ h.symm\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.W (P F)\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\na' : (P F).A\nf' : PFunctor.B (P F) a' → PFunctor.W (P F)\nh : Qpf.abs { fst := a, snd := f } = Qpf.abs { fst := a', snd := f' }\n⊢ Wequiv (WType.mk a' f') (WType.mk a f)\n[PROOFSTEP]\nexact Wequiv.abs _ _ _ _ h.symm\n[GOAL]\ncase trans\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y u✝ v✝ w✝ : PFunctor.W (P F)\na✝¹ : Wequiv u✝ v✝\na✝ : Wequiv v✝ w✝\na_ih✝¹ : Wequiv v✝ u✝\na_ih✝ : Wequiv w✝ v✝\n⊢ Wequiv w✝ u✝\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ y✝ x y z : PFunctor.W (P F)\na✝¹ : Wequiv x y\na✝ : Wequiv y z\nih₁ : Wequiv y x\nih₂ : Wequiv z y\n⊢ Wequiv z x\n[PROOFSTEP]\ncase trans x y z _ _ ih₁ ih₂ => exact Qpf.Wequiv.trans _ _ _ ih₂ ih₁\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ y✝ x y z : PFunctor.W (P F)\na✝¹ : Wequiv x y\na✝ : Wequiv y z\nih₁ : Wequiv y x\nih₂ : Wequiv z y\n⊢ Wequiv z x\n[PROOFSTEP]\nexact Qpf.Wequiv.trans _ _ _ ih₂ ih₁\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : PFunctor.W (P F)\n⊢ Wequiv (Wrepr x) x\n[PROOFSTEP]\ninduction' x with a f ih\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ Wequiv (Wrepr (WType.mk a f)) (WType.mk a f)\n[PROOFSTEP]\napply Wequiv.trans\n[GOAL]\ncase mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ Wequiv (Wrepr (WType.mk a f)) ?mk.v\n[PROOFSTEP]\nchange Wequiv (Wrepr ⟨a, f⟩) (PFunctor.W.mk (Wrepr <$> ⟨a, f⟩))\n[GOAL]\ncase mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ Wequiv (Wrepr (WType.mk a f)) (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f }))\n[PROOFSTEP]\napply Wequiv.abs'\n[GOAL]\ncase mk.a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ abs (PFunctor.W.dest (Wrepr (WType.mk a f))) =\n    abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))\n[PROOFSTEP]\nhave : Wrepr ⟨a, f⟩ = PFunctor.W.mk (repr (abs (Wrepr <$> ⟨a, f⟩))) := rfl\n[GOAL]\ncase mk.a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\nthis : Wrepr (WType.mk a f) = PFunctor.W.mk (repr (abs (Wrepr <$> { fst := a, snd := f })))\n⊢ abs (PFunctor.W.dest (Wrepr (WType.mk a f))) =\n    abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))\n[PROOFSTEP]\nrw [this, PFunctor.W.dest_mk, abs_repr]\n[GOAL]\ncase mk.a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\nthis : Wrepr (WType.mk a f) = PFunctor.W.mk (repr (abs (Wrepr <$> { fst := a, snd := f })))\n⊢ abs (Wrepr <$> { fst := a, snd := f }) = abs (PFunctor.W.dest (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })))\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ Wequiv (PFunctor.W.mk (Wrepr <$> { fst := a, snd := f })) (WType.mk a f)\n[PROOFSTEP]\napply Wequiv.ind\n[GOAL]\ncase mk.a.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), Wequiv (Wrepr (f a)) (f a)\n⊢ ∀ (x : PFunctor.B (P F) a), Wequiv ((Wrepr ∘ f) x) (f x)\n[PROOFSTEP]\nexact ih\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\n⊢ rec g (mk x) = g (rec g <$> x)\n[PROOFSTEP]\nhave : recF g ∘ fixToW = Fix.rec g := by\n  apply funext\n  apply Quotient.ind\n  intro x\n  apply recF_eq_of_Wequiv\n  rw [fixToW]\n  apply Wrepr_equiv\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\n⊢ recF g ∘ fixToW = rec g\n[PROOFSTEP]\napply funext\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\n⊢ ∀ (x : Fix F), (recF g ∘ fixToW) x = rec g x\n[PROOFSTEP]\napply Quotient.ind\n[GOAL]\ncase h.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\n⊢ ∀ (a : PFunctor.W (P F)), (recF g ∘ fixToW) (Quotient.mk Wsetoid a) = rec g (Quotient.mk Wsetoid a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx✝ : F (Fix F)\nx : PFunctor.W (P F)\n⊢ (recF g ∘ fixToW) (Quotient.mk Wsetoid x) = rec g (Quotient.mk Wsetoid x)\n[PROOFSTEP]\napply recF_eq_of_Wequiv\n[GOAL]\ncase h.a.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx✝ : F (Fix F)\nx : PFunctor.W (P F)\n⊢ Wequiv (fixToW (Quotient.mk Wsetoid x)) x\n[PROOFSTEP]\nrw [fixToW]\n[GOAL]\ncase h.a.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx✝ : F (Fix F)\nx : PFunctor.W (P F)\n⊢ Wequiv\n    (Quotient.lift Wrepr\n      (_ :\n        ∀ (x y : PFunctor.W (P F)),\n          Wequiv x y → recF (fun x => PFunctor.W.mk (repr x)) x = recF (fun x => PFunctor.W.mk (repr x)) y)\n      (Quotient.mk Wsetoid x))\n    x\n[PROOFSTEP]\napply Wrepr_equiv\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n⊢ rec g (mk x) = g (rec g <$> x)\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [Fix.rec, Fix.mk]\n  dsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n| rec g (mk x) = g (rec g <$> x)\n[PROOFSTEP]\n  lhs\n  rw [Fix.rec, Fix.mk]\n  dsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n| rec g (mk x) = g (rec g <$> x)\n[PROOFSTEP]\n  lhs\n  rw [Fix.rec, Fix.mk]\n  dsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n| rec g (mk x) = g (rec g <$> x)\n[PROOFSTEP]\nlhs\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n| rec g (mk x)\n[PROOFSTEP]\nrw [Fix.rec, Fix.mk]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n| Quot.lift (recF g) (_ : ∀ (x y : PFunctor.W (P F)), Wequiv x y → recF g x = recF g y)\n    (Quot.mk Setoid.r (PFunctor.W.mk (fixToW <$> repr x)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\n⊢ recF g (PFunctor.W.mk (fixToW <$> repr x)) = g (rec g <$> x)\n[PROOFSTEP]\ncases' h : repr x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nx : F (Fix F)\nthis : recF g ∘ fixToW = rec g\na : (P F).A\nf : PFunctor.B (P F) a → Fix F\nh : repr x = { fst := a, snd := f }\n⊢ recF g (PFunctor.W.mk (fixToW <$> { fst := a, snd := f })) = g (rec g <$> x)\n[PROOFSTEP]\nrw [PFunctor.map_eq, recF_eq, ← PFunctor.map_eq, PFunctor.W.dest_mk, ← PFunctor.comp_map, abs_map, ← h, abs_repr, this]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (WType.mk a f)\n[PROOFSTEP]\nhave : Fix.mk (abs ⟨a, fun x => ⟦f x⟧⟩) = ⟦Wrepr ⟨a, f⟩⟧ :=\n  by\n  apply Quot.sound; apply Wequiv.abs'\n  rw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]\n  conv =>\n    rhs\n    simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n⊢ Setoid.r (PFunctor.W.mk (fixToW <$> repr (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })))\n    (Wrepr (WType.mk a f))\n[PROOFSTEP]\napply Wequiv.abs'\n[GOAL]\ncase a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n⊢ abs\n      (PFunctor.W.dest\n        (PFunctor.W.mk (fixToW <$> repr (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })))) =\n    abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\nrw [PFunctor.W.dest_mk, abs_map, abs_repr, ← abs_map, PFunctor.map_eq]\n[GOAL]\ncase a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n⊢ abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\nconv =>\n  rhs\n  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\n  rhs\n  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\n  rhs\n  simp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n| abs { fst := a, snd := fixToW ∘ fun x => Quotient.mk Wsetoid (f x) } = abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\nrhs\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\n| abs (PFunctor.W.dest (Wrepr (WType.mk a f)))\n[PROOFSTEP]\nsimp only [Wrepr, recF_eq, PFunctor.W.dest_mk, abs_repr, Function.comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\nthis : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))\n⊢ mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (WType.mk a f)\n[PROOFSTEP]\nrw [this]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\nthis : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))\n⊢ Quotient.mk Wsetoid (Wrepr (WType.mk a f)) = Quotient.mk Wsetoid (WType.mk a f)\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\na : (P F).A\nf : PFunctor.B (P F) a → PFunctor.W (P F)\nthis : mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }) = Quotient.mk Wsetoid (Wrepr (WType.mk a f))\n⊢ Setoid.r (Wrepr (WType.mk a f)) (WType.mk a f)\n[PROOFSTEP]\napply Wrepr_equiv\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\n⊢ ∀ (x : Fix F), g₁ x = g₂ x\n[PROOFSTEP]\napply Quot.ind\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\n⊢ ∀ (a : PFunctor.W (P F)), g₁ (Quot.mk Setoid.r a) = g₂ (Quot.mk Setoid.r a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\nx : PFunctor.W (P F)\n⊢ g₁ (Quot.mk Setoid.r x) = g₂ (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction' x with a f ih\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\n⊢ g₁ (Quot.mk Setoid.r (WType.mk a f)) = g₂ (Quot.mk Setoid.r (WType.mk a f))\n[PROOFSTEP]\nchange g₁ ⟦⟨a, f⟩⟧ = g₂ ⟦⟨a, f⟩⟧\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\n⊢ g₁ (Quotient.mk Wsetoid (WType.mk a f)) = g₂ (Quotient.mk Wsetoid (WType.mk a f))\n[PROOFSTEP]\nrw [← Fix.ind_aux a f]\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\n⊢ g₁ (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })) =\n    g₂ (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }))\n[PROOFSTEP]\napply h\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\n⊢ g₁ <$> abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) } =\n    g₂ <$> abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }\n[PROOFSTEP]\nrw [← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\n⊢ abs { fst := a, snd := g₁ ∘ fun x => Quotient.mk Wsetoid (f x) } =\n    abs { fst := a, snd := g₂ ∘ fun x => Quotient.mk Wsetoid (f x) }\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase mk.mk.a.e_a.e_snd.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng₁ g₂ : Fix F → α\nh : ∀ (x : F (Fix F)), g₁ <$> x = g₂ <$> x → g₁ (mk x) = g₂ (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), g₁ (Quot.mk Setoid.r (f a)) = g₂ (Quot.mk Setoid.r (f a))\nx : PFunctor.B (P F) a\n⊢ (g₁ ∘ fun x => Quotient.mk Wsetoid (f x)) x = (g₂ ∘ fun x => Quotient.mk Wsetoid (f x)) x\n[PROOFSTEP]\napply ih\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nh : Fix F → α\nhyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)\n⊢ rec g = h\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nh : Fix F → α\nhyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)\nx : Fix F\n⊢ rec g x = h x\n[PROOFSTEP]\napply Fix.ind_rec\n[GOAL]\ncase h.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nh : Fix F → α\nhyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)\nx : Fix F\n⊢ ∀ (x : F (Fix F)), rec g <$> x = (fun x => h x) <$> x → rec g (mk x) = h (mk x)\n[PROOFSTEP]\nintro x hyp'\n[GOAL]\ncase h.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : F α → α\nh : Fix F → α\nhyp : ∀ (x : F (Fix F)), h (mk x) = g (h <$> x)\nx✝ : Fix F\nx : F (Fix F)\nhyp' : rec g <$> x = (fun x => h x) <$> x\n⊢ rec g (mk x) = h (mk x)\n[PROOFSTEP]\nrw [hyp, ← hyp', Fix.rec_eq]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : Fix F\n⊢ mk (dest x) = x\n[PROOFSTEP]\nchange (Fix.mk ∘ Fix.dest) x = id x\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : Fix F\n⊢ (mk ∘ dest) x = id x\n[PROOFSTEP]\napply Fix.ind_rec (mk ∘ dest) id\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : Fix F\n⊢ ∀ (x : F (Fix F)), (mk ∘ dest) <$> x = id <$> x → (mk ∘ dest) (mk x) = id (mk x)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ : Fix F\nx : F (Fix F)\n⊢ (mk ∘ dest) <$> x = id <$> x → (mk ∘ dest) (mk x) = id (mk x)\n[PROOFSTEP]\nrw [Function.comp_apply, id_eq, Fix.dest, Fix.rec_eq, id_map, comp_map]\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ : Fix F\nx : F (Fix F)\n⊢ mk <$> rec (Functor.map mk) <$> x = x → mk (mk <$> rec (Functor.map mk) <$> x) = mk x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ : Fix F\nx : F (Fix F)\nh : mk <$> rec (Functor.map mk) <$> x = x\n⊢ mk (mk <$> rec (Functor.map mk) <$> x) = mk x\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n⊢ dest (mk x) = x\n[PROOFSTEP]\nunfold Fix.dest\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n⊢ rec (Functor.map mk) (mk x) = x\n[PROOFSTEP]\nrw [Fix.rec_eq, ← Fix.dest, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n⊢ (mk ∘ dest) <$> x = x\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← id_map x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n| (mk ∘ dest) <$> x = x\n[PROOFSTEP]\n  rhs\n  rw [← id_map x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n| (mk ∘ dest) <$> x = x\n[PROOFSTEP]\n  rhs\n  rw [← id_map x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n| (mk ∘ dest) <$> x = x\n[PROOFSTEP]\nrhs\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n| x\n[PROOFSTEP]\nrw [← id_map x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx : F (Fix F)\n⊢ (mk ∘ dest) <$> x = id <$> x\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ : F (Fix F)\nx : Fix F\n⊢ (mk ∘ dest) x = id x\n[PROOFSTEP]\napply Fix.mk_dest\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\n⊢ ∀ (x : Fix F), p x\n[PROOFSTEP]\napply Quot.ind\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\n⊢ ∀ (a : PFunctor.W (P F)), p (Quot.mk Setoid.r a)\n[PROOFSTEP]\nintro x\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\nx : PFunctor.W (P F)\n⊢ p (Quot.mk Setoid.r x)\n[PROOFSTEP]\ninduction' x with a f ih\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ p (Quot.mk Setoid.r (WType.mk a f))\n[PROOFSTEP]\nchange p ⟦⟨a, f⟩⟧\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ p (Quotient.mk Wsetoid (WType.mk a f))\n[PROOFSTEP]\nrw [← Fix.ind_aux a f]\n[GOAL]\ncase mk.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ p (mk (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) }))\n[PROOFSTEP]\napply h\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ Liftp p (abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) })\n[PROOFSTEP]\nrw [liftp_iff]\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ ∃ a_1 f_1,\n    abs { fst := a, snd := fun x => Quotient.mk Wsetoid (f x) } = abs { fst := a_1, snd := f_1 } ∧\n      ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)\n[PROOFSTEP]\nrefine' ⟨_, _, rfl, _⟩\n[GOAL]\ncase mk.mk.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\np : Fix F → Prop\nh : ∀ (x : F (Fix F)), Liftp p x → p (mk x)\na : (P F).A\nf : PFunctor.B (P F) a → WType (P F).B\nih : ∀ (a : PFunctor.B (P F) a), p (Quot.mk Setoid.r (f a))\n⊢ ∀ (i : PFunctor.B (P F) a), p (Quotient.mk Wsetoid (f i))\n[PROOFSTEP]\nconvert ih\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n⊢ PFunctor.M.dest (corecF g x) = corecF g <$> repr (g x)\n[PROOFSTEP]\nrw [corecF, PFunctor.M.dest_corec]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ ∀ (a b : PFunctor.M (P F)),\n    Mcongr a b →\n      (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) a = (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) b\n[PROOFSTEP]\nrintro x y ⟨r, pr, rxy⟩\n[GOAL]\ncase intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\n⊢ (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) x = (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\n⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest x) = Quot.mk Mcongr <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\nhave : ∀ x y, r x y → Mcongr x y := by\n  intro x y h\n  exact ⟨r, pr, h⟩\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\n⊢ ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n[PROOFSTEP]\nintro x y h\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx✝ y✝ : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x✝ y✝\nx y : PFunctor.M (P F)\nh : r x y\n⊢ Mcongr x y\n[PROOFSTEP]\nexact ⟨r, pr, h⟩\n[GOAL]\ncase intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest x) = Quot.mk Mcongr <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\nrw [← Quot.factor_mk_eq _ _ this]\n[GOAL]\ncase intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n⊢ (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =\n    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =\n    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\n  lhs\n  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =\n    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\n  lhs\n  rw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x) =\n    (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest y)\n[PROOFSTEP]\nlhs\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nx y : PFunctor.M (P F)\nr : PFunctor.M (P F) → PFunctor.M (P F) → Prop\npr : IsPrecongr r\nrxy : r x y\nthis : ∀ (x y : PFunctor.M (P F)), r x y → Mcongr x y\n| (Quot.factor (fun x y => r x y) (fun x y => Mcongr x y) this ∘ Quot.mk fun x y => r x y) <$> abs (PFunctor.M.dest x)\n[PROOFSTEP]\nrw [comp_map, ← abs_map, pr rxy, abs_map, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n⊢ dest (corec g x) = corec g <$> g x\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [Cofix.dest, Cofix.corec];\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n| dest (corec g x) = corec g <$> g x\n[PROOFSTEP]\n  lhs\n  rw [Cofix.dest, Cofix.corec];\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n| dest (corec g x) = corec g <$> g x\n[PROOFSTEP]\n  lhs\n  rw [Cofix.dest, Cofix.corec];\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n| dest (corec g x) = corec g <$> g x\n[PROOFSTEP]\nlhs\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n| dest (corec g x)\n[PROOFSTEP]\nrw [Cofix.dest, Cofix.corec]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n⊢ Quot.lift (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x))\n      (_ :\n        ∀ (x y : PFunctor.M (P F)),\n          Mcongr x y →\n            (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) x =\n              (fun x => Quot.mk Mcongr <$> abs (PFunctor.M.dest x)) y)\n      (Quot.mk Mcongr (corecF g x)) =\n    corec g <$> g x\n[PROOFSTEP]\ndsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n⊢ Quot.mk Mcongr <$> abs (PFunctor.M.dest (corecF g x)) = corec g <$> g x\n[PROOFSTEP]\nrw [corecF_eq, abs_map, abs_repr, ← comp_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\ng : α → F α\nx : α\n⊢ (Quot.mk Mcongr ∘ corecF g) <$> g x = corec g <$> g x\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\n⊢ ∀ (x y : Cofix F), r x y → x = y\n[PROOFSTEP]\nintro x\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx : Cofix F\n⊢ ∀ (y : Cofix F), r x y → x = y\n[PROOFSTEP]\napply Quot.inductionOn (motive := _) x\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx : Cofix F\n⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y\n[PROOFSTEP]\nclear x\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\n⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y\n[PROOFSTEP]\nintro x y\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx : PFunctor.M (P F)\ny : Cofix F\n⊢ r (Quot.mk Mcongr x) y → Quot.mk Mcongr x = y\n[PROOFSTEP]\napply Quot.inductionOn (motive := _) y\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx : PFunctor.M (P F)\ny : Cofix F\n⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a\n[PROOFSTEP]\nclear y\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx : PFunctor.M (P F)\n⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a\n[PROOFSTEP]\nintro y rxy\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\n⊢ Quot.mk Mcongr x = Quot.mk Mcongr y\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\n⊢ Mcongr x y\n[PROOFSTEP]\nlet r' x y := r (Quot.mk _ x) (Quot.mk _ y)\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\n⊢ Mcongr x y\n[PROOFSTEP]\nhave : IsPrecongr r' := by\n  intro a b r'ab\n  have h₀ :\n    Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) =\n      Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=\n    h _ _ r'ab\n  have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v :=\n    by\n    intro u v cuv\n    apply Quot.sound\n    simp only\n    rw [Quot.sound cuv]\n    apply h'\n  let f : Quot r → Quot r' :=\n    Quot.lift (Quot.lift (Quot.mk r') h₁)\n      (by\n        intro c; apply Quot.inductionOn (motive := _) c; clear c\n        intro c d; apply Quot.inductionOn (motive := _) d; clear d\n        intro d rcd; apply Quot.sound; apply rcd)\n  have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl\n  rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map, h₀]\n  rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\n⊢ IsPrecongr r'\n[PROOFSTEP]\nintro a b r'ab\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\n⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)\n[PROOFSTEP]\nhave h₀ :\n  Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=\n  h _ _ r'ab\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\n⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)\n[PROOFSTEP]\nhave h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v :=\n  by\n  intro u v cuv\n  apply Quot.sound\n  simp only\n  rw [Quot.sound cuv]\n  apply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\n⊢ ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\n[PROOFSTEP]\nintro u v cuv\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nu v : PFunctor.M (P F)\ncuv : Mcongr u v\n⊢ Quot.mk r' u = Quot.mk r' v\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nu v : PFunctor.M (P F)\ncuv : Mcongr u v\n⊢ r' u v\n[PROOFSTEP]\nsimp only\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nu v : PFunctor.M (P F)\ncuv : Mcongr u v\n⊢ r (Quot.mk Mcongr u) (Quot.mk Mcongr v)\n[PROOFSTEP]\nrw [Quot.sound cuv]\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nu v : PFunctor.M (P F)\ncuv : Mcongr u v\n⊢ r (Quot.mk Mcongr v) (Quot.mk Mcongr v)\n[PROOFSTEP]\napply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\n⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)\n[PROOFSTEP]\nlet f : Quot r → Quot r' :=\n  Quot.lift (Quot.lift (Quot.mk r') h₁)\n    (by\n      intro c; apply Quot.inductionOn (motive := _) c; clear c\n      intro c d; apply Quot.inductionOn (motive := _) d; clear d\n      intro d rcd; apply Quot.sound; apply rcd)\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\n⊢ ∀ (a b : Cofix F), r a b → Quot.lift (Quot.mk r') h₁ a = Quot.lift (Quot.mk r') h₁ b\n[PROOFSTEP]\nintro c\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc : Cofix F\n⊢ ∀ (b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b\n[PROOFSTEP]\napply Quot.inductionOn (motive := _) c\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc : Cofix F\n⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),\n    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b\n[PROOFSTEP]\nclear c\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\n⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),\n    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b\n[PROOFSTEP]\nintro c d\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc : PFunctor.M (P F)\nd : Cofix F\n⊢ r (Quot.mk Mcongr c) d → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ d\n[PROOFSTEP]\napply Quot.inductionOn (motive := _) d\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc : PFunctor.M (P F)\nd : Cofix F\n⊢ ∀ (a : PFunctor.M (P F)),\n    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →\n      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)\n[PROOFSTEP]\nclear d\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc : PFunctor.M (P F)\n⊢ ∀ (a : PFunctor.M (P F)),\n    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →\n      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)\n[PROOFSTEP]\nintro d rcd\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc d : PFunctor.M (P F)\nrcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)\n⊢ Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr d)\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nc d : PFunctor.M (P F)\nrcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)\n⊢ r' c d\n[PROOFSTEP]\napply rcd\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nf : Quot r → Quot r' :=\n  Quot.lift (Quot.lift (Quot.mk r') h₁)\n    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)\n⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)\n[PROOFSTEP]\nhave : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nf : Quot r → Quot r' :=\n  Quot.lift (Quot.lift (Quot.mk r') h₁)\n    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)\nthis : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'\n⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)\n[PROOFSTEP]\nrw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map, h₀]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\na b : PFunctor.M (P F)\nr'ab : r' a b\nh₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)\nh₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v\nf : Quot r → Quot r' :=\n  Quot.lift (Quot.lift (Quot.mk r') h₁)\n    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)\nthis : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'\n⊢ f <$> Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) =\n    abs ((f ∘ Quot.mk r ∘ Quot.mk Mcongr) <$> PFunctor.M.dest b)\n[PROOFSTEP]\nrw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh' : ∀ (x : Cofix F), r x x\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nx y : PFunctor.M (P F)\nrxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nr' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)\nthis : IsPrecongr r'\n⊢ Mcongr x y\n[PROOFSTEP]\nrefine' ⟨r', this, rxy⟩\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\n⊢ ∀ (x y : Cofix F), r x y → x = y\n[PROOFSTEP]\nlet r' (x y) := x = y ∨ r x y\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\n⊢ ∀ (x y : Cofix F), r x y → x = y\n[PROOFSTEP]\nintro x y rxy\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx y : Cofix F\nrxy : r x y\n⊢ x = y\n[PROOFSTEP]\napply Cofix.bisim_aux r'\n[GOAL]\ncase h'\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx y : Cofix F\nrxy : r x y\n⊢ ∀ (x : Cofix F), r' x x\n[PROOFSTEP]\nintro x\n[GOAL]\ncase h'\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y : Cofix F\nrxy : r x✝ y\nx : Cofix F\n⊢ r' x x\n[PROOFSTEP]\nleft\n[GOAL]\ncase h'.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y : Cofix F\nrxy : r x✝ y\nx : Cofix F\n⊢ x = x\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx y : Cofix F\nrxy : r x y\n⊢ ∀ (x y : Cofix F), r' x y → Quot.mk r' <$> dest x = Quot.mk r' <$> dest y\n[PROOFSTEP]\nintro x y r'xy\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r' x y\n⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y\n[PROOFSTEP]\ncases' r'xy with r'xy r'xy\n[GOAL]\ncase h.inl\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : x = y\n⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y\n[PROOFSTEP]\nrw [r'xy]\n[GOAL]\ncase h.inr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r x y\n⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y\n[PROOFSTEP]\nhave : ∀ x y, r x y → r' x y := fun x y h => Or.inr h\n[GOAL]\ncase h.inr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r x y\nthis : ∀ (x y : Cofix F), r x y → r' x y\n⊢ Quot.mk r' <$> dest x = Quot.mk r' <$> dest y\n[PROOFSTEP]\nrw [← Quot.factor_mk_eq _ _ this]\n[GOAL]\ncase h.inr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r x y\nthis : ∀ (x y : Cofix F), r x y → r' x y\n⊢ (Quot.factor (fun x y => r x y) (fun x y => r' x y) this ∘ Quot.mk fun x y => r x y) <$> dest x =\n    (Quot.factor (fun x y => r x y) (fun x y => r' x y) this ∘ Quot.mk fun x y => r x y) <$> dest y\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.inr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r x y\nthis : ∀ (x y : Cofix F), r x y → r' x y\n⊢ (Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this ∘ Quot.mk fun x y => r x y) <$> dest x =\n    (Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this ∘ Quot.mk fun x y => r x y) <$> dest y\n[PROOFSTEP]\nrw [@comp_map _ _ q _ _ _ (Quot.mk r), @comp_map _ _ q _ _ _ (Quot.mk r)]\n[GOAL]\ncase h.inr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx✝ y✝ : Cofix F\nrxy : r x✝ y✝\nx y : Cofix F\nr'xy : r x y\nthis : ∀ (x y : Cofix F), r x y → r' x y\n⊢ Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this <$> Quot.mk r <$> dest x =\n    Quot.factor (fun x y => r x y) (fun x y => x = y ∨ r x y) this <$> Quot.mk r <$> dest y\n[PROOFSTEP]\nrw [h _ _ r'xy]\n[GOAL]\ncase a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx y : Cofix F\nrxy : r x y\n⊢ r' x y\n[PROOFSTEP]\nright\n[GOAL]\ncase a.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y\nr' : Cofix F → Cofix F → Prop := fun x y => x = y ∨ r x y\nx y : Cofix F\nrxy : r x y\n⊢ r x y\n[PROOFSTEP]\nexact rxy\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\n⊢ ∀ (x y : Cofix F), r x y → x = y\n[PROOFSTEP]\napply Cofix.bisim_rel\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\n⊢ ∀ (x y : Cofix F), r x y → (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y\n[PROOFSTEP]\nintro x y rxy\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\nx y : Cofix F\nrxy : r x y\n⊢ (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y\n[PROOFSTEP]\nrcases(liftr_iff r _ _).mp (h x y rxy) with ⟨a, f₀, f₁, dxeq, dyeq, h'⟩\n[GOAL]\ncase h.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\nx y : Cofix F\nrxy : r x y\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → Cofix F\ndxeq : dest x = abs { fst := a, snd := f₀ }\ndyeq : dest y = abs { fst := a, snd := f₁ }\nh' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ (Quot.mk fun x y => r x y) <$> dest x = (Quot.mk fun x y => r x y) <$> dest y\n[PROOFSTEP]\nrw [dxeq, dyeq, ← abs_map, ← abs_map, PFunctor.map_eq, PFunctor.map_eq]\n[GOAL]\ncase h.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\nx y : Cofix F\nrxy : r x y\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → Cofix F\ndxeq : dest x = abs { fst := a, snd := f₀ }\ndyeq : dest y = abs { fst := a, snd := f₁ }\nh' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\n⊢ abs { fst := a, snd := (Quot.mk fun x y => r x y) ∘ f₀ } = abs { fst := a, snd := (Quot.mk fun x y => r x y) ∘ f₁ }\n[PROOFSTEP]\ncongr 2 with i\n[GOAL]\ncase h.intro.intro.intro.intro.intro.e_a.e_snd.h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\nx y : Cofix F\nrxy : r x y\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → Cofix F\ndxeq : dest x = abs { fst := a, snd := f₀ }\ndyeq : dest y = abs { fst := a, snd := f₁ }\nh' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\ni : PFunctor.B (P F) a\n⊢ ((Quot.mk fun x y => r x y) ∘ f₀) i = ((Quot.mk fun x y => r x y) ∘ f₁) i\n[PROOFSTEP]\napply Quot.sound\n[GOAL]\ncase h.intro.intro.intro.intro.intro.e_a.e_snd.h.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nr : Cofix F → Cofix F → Prop\nh : ∀ (x y : Cofix F), r x y → Liftr r (dest x) (dest y)\nx y : Cofix F\nrxy : r x y\na : (P F).A\nf₀ f₁ : PFunctor.B (P F) a → Cofix F\ndxeq : dest x = abs { fst := a, snd := f₀ }\ndyeq : dest y = abs { fst := a, snd := f₁ }\nh' : ∀ (i : PFunctor.B (P F) a), r (f₀ i) (f₁ i)\ni : PFunctor.B (P F) a\n⊢ r (f₀ i) (f₁ i)\n[PROOFSTEP]\napply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u_1\nQ : α → Prop\nu v : α → Cofix F\nh :\n  ∀ (x : α),\n    Q x →\n      ∃ a f f',\n        dest (u x) = abs { fst := a, snd := f } ∧\n          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'\nx✝¹ : α\nQx : Q x✝¹\nR : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'\nx y : Cofix F\nx✝ : R x y\nx' : α\nQx' : Q x'\nxeq : x = u x'\nyeq : y = v x'\n⊢ Liftr R (dest x) (dest y)\n[PROOFSTEP]\nrcases h x' Qx' with ⟨a, f, f', ux'eq, vx'eq, h'⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u_1\nQ : α → Prop\nu v : α → Cofix F\nh :\n  ∀ (x : α),\n    Q x →\n      ∃ a f f',\n        dest (u x) = abs { fst := a, snd := f } ∧\n          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'\nx✝¹ : α\nQx : Q x✝¹\nR : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'\nx y : Cofix F\nx✝ : R x y\nx' : α\nQx' : Q x'\nxeq : x = u x'\nyeq : y = v x'\na : (P F).A\nf f' : PFunctor.B (P F) a → Cofix F\nux'eq : dest (u x') = abs { fst := a, snd := f }\nvx'eq : dest (v x') = abs { fst := a, snd := f' }\nh' : ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'\n⊢ Liftr R (dest x) (dest y)\n[PROOFSTEP]\nrw [liftr_iff]\n[GOAL]\ncase intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u_1\nQ : α → Prop\nu v : α → Cofix F\nh :\n  ∀ (x : α),\n    Q x →\n      ∃ a f f',\n        dest (u x) = abs { fst := a, snd := f } ∧\n          dest (v x) = abs { fst := a, snd := f' } ∧ ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'\nx✝¹ : α\nQx : Q x✝¹\nR : Cofix F → Cofix F → Prop := fun w z => ∃ x', Q x' ∧ w = u x' ∧ z = v x'\nx y : Cofix F\nx✝ : R x y\nx' : α\nQx' : Q x'\nxeq : x = u x'\nyeq : y = v x'\na : (P F).A\nf f' : PFunctor.B (P F) a → Cofix F\nux'eq : dest (u x') = abs { fst := a, snd := f }\nvx'eq : dest (v x') = abs { fst := a, snd := f' }\nh' : ∀ (i : PFunctor.B (P F) a), ∃ x', Q x' ∧ f i = u x' ∧ f' i = v x'\n⊢ ∃ a f₀ f₁,\n    dest x = abs { fst := a, snd := f₀ } ∧\n      dest y = abs { fst := a, snd := f₁ } ∧ ∀ (i : PFunctor.B (P F) a), R (f₀ i) (f₁ i)\n[PROOFSTEP]\nrefine' ⟨a, f, f', xeq.symm ▸ ux'eq, yeq.symm ▸ vx'eq, h'⟩\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α → Functor.Comp F₂ F₁ α\n[PROOFSTEP]\ndsimp [Functor.Comp]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α → F₂ (F₁ α)\n[PROOFSTEP]\nintro p\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\np : PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α\n⊢ F₂ (F₁ α)\n[PROOFSTEP]\nexact abs ⟨p.1.1, fun x => abs ⟨p.1.2 x, fun y => p.2 ⟨x, y⟩⟩⟩\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ Functor.Comp F₂ F₁ α → PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α\n[PROOFSTEP]\ndsimp [Functor.Comp]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ F₂ (F₁ α) → PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α\n[PROOFSTEP]\nintro y\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\ny : F₂ (F₁ α)\n⊢ PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α\n[PROOFSTEP]\nrefine' ⟨⟨(repr y).1, fun u => (repr ((repr y).2 u)).1⟩, _⟩\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\ny : F₂ (F₁ α)\n⊢ PFunctor.B (PFunctor.comp (P F₂) (P F₁)) { fst := (repr y).fst, snd := fun u => (repr (Sigma.snd (repr y) u)).fst } →\n    α\n[PROOFSTEP]\ndsimp [PFunctor.comp]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\ny : F₂ (F₁ α)\n⊢ (u : PFunctor.B (P F₂) (repr y).fst) × PFunctor.B (P F₁) (repr (Sigma.snd (repr y) u)).fst → α\n[PROOFSTEP]\nintro x\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\ny : F₂ (F₁ α)\nx : (u : PFunctor.B (P F₂) (repr y).fst) × PFunctor.B (P F₁) (repr (Sigma.snd (repr y) u)).fst\n⊢ α\n[PROOFSTEP]\nexact (repr ((repr y).2 x.1)).snd x.2\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ ∀ (x : Functor.Comp F₂ F₁ α),\n    (fun {α} =>\n          id fun p =>\n            abs\n              { fst := p.fst.fst,\n                snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })\n        ((fun {α} =>\n            id fun y =>\n              { fst := { fst := (repr y).fst, snd := fun u => (repr (Sigma.snd (repr y) u)).fst },\n                snd := id fun x => Sigma.snd (repr (Sigma.snd (repr y) x.fst)) x.snd })\n          x) =\n      x\n[PROOFSTEP]\ndsimp [Functor.Comp]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\n⊢ ∀ (x : F₂ (F₁ α)),\n    abs\n        { fst := (repr x).fst,\n          snd := fun x_1 =>\n            abs\n              { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n                snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n      x\n[PROOFSTEP]\nintro x\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n⊢ abs\n      { fst := (repr x).fst,\n        snd := fun x_1 =>\n          abs\n            { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n    x\n[PROOFSTEP]\nconv =>\n  rhs\n  rw [← abs_repr x]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n| abs\n      { fst := (repr x).fst,\n        snd := fun x_1 =>\n          abs\n            { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n    x\n[PROOFSTEP]\n  rhs\n  rw [← abs_repr x]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n| abs\n      { fst := (repr x).fst,\n        snd := fun x_1 =>\n          abs\n            { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n    x\n[PROOFSTEP]\n  rhs\n  rw [← abs_repr x]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n| abs\n      { fst := (repr x).fst,\n        snd := fun x_1 =>\n          abs\n            { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n    x\n[PROOFSTEP]\nrhs\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n| x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\n⊢ abs\n      { fst := (repr x).fst,\n        snd := fun x_1 =>\n          abs\n            { fst := (repr (Sigma.snd (repr x) x_1)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd (repr x) x_1)) y } } =\n    abs (repr x)\n[PROOFSTEP]\ncases' h : repr x with a f\n[GOAL]\ncase mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\na : (P F₂).A\nf : PFunctor.B (P F₂) a → F₁ α\nh : repr x = { fst := a, snd := f }\n⊢ abs\n      { fst := { fst := a, snd := f }.fst,\n        snd := fun x =>\n          abs\n            { fst := (repr (Sigma.snd { fst := a, snd := f } x)).fst,\n              snd := fun y => Sigma.snd (repr (Sigma.snd { fst := a, snd := f } x)) y } } =\n    abs { fst := a, snd := f }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx : F₂ (F₁ α)\na : (P F₂).A\nf : PFunctor.B (P F₂) a → F₁ α\nh : repr x = { fst := a, snd := f }\n⊢ abs { fst := a, snd := fun x => abs { fst := (repr (f x)).fst, snd := fun y => Sigma.snd (repr (f x)) y } } =\n    abs { fst := a, snd := f }\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase mk.e_a.e_snd.h\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx✝ : F₂ (F₁ α)\na : (P F₂).A\nf : PFunctor.B (P F₂) a → F₁ α\nh : repr x✝ = { fst := a, snd := f }\nx : PFunctor.B (P F₂) a\n⊢ abs { fst := (repr (f x)).fst, snd := fun y => Sigma.snd (repr (f x)) y } = f x\n[PROOFSTEP]\ncases' h' : repr (f x) with b g\n[GOAL]\ncase mk.e_a.e_snd.h.mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx✝ : F₂ (F₁ α)\na : (P F₂).A\nf : PFunctor.B (P F₂) a → F₁ α\nh : repr x✝ = { fst := a, snd := f }\nx : PFunctor.B (P F₂) a\nb : (P F₁).A\ng : PFunctor.B (P F₁) b → α\nh' : repr (f x) = { fst := b, snd := g }\n⊢ abs { fst := { fst := b, snd := g }.fst, snd := fun y => Sigma.snd { fst := b, snd := g } y } = f x\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.e_a.e_snd.h.mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα : Type u\nx✝ : F₂ (F₁ α)\na : (P F₂).A\nf : PFunctor.B (P F₂) a → F₁ α\nh : repr x✝ = { fst := a, snd := f }\nx : PFunctor.B (P F₂) a\nb : (P F₁).A\ng : PFunctor.B (P F₁) b → α\nh' : repr (f x) = { fst := b, snd := g }\n⊢ abs { fst := b, snd := fun y => g y } = f x\n[PROOFSTEP]\nrw [← h', abs_repr]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\n⊢ ∀ (p : PFunctor.Obj (PFunctor.comp (P F₂) (P F₁)) α),\n    (fun {α} =>\n          id fun p =>\n            abs\n              { fst := p.fst.fst,\n                snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })\n        (f <$> p) =\n      f <$>\n        (fun {α} =>\n            id fun p =>\n              abs\n                { fst := p.fst.fst,\n                  snd := fun x =>\n                    abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } })\n          p\n[PROOFSTEP]\ndsimp [Functor.Comp, PFunctor.comp]\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\n⊢ ∀\n    (p :\n      PFunctor.Obj\n        { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n          B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n        α),\n    abs\n        { fst := (f <$> p).fst.fst,\n          snd := fun x =>\n            abs { fst := Sigma.snd (f <$> p).fst x, snd := fun y => Sigma.snd (f <$> p) { fst := x, snd := y } } } =\n      f <$>\n        abs\n          { fst := p.fst.fst,\n            snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } }\n[PROOFSTEP]\nintro p\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\np :\n  PFunctor.Obj\n    { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n    α\n⊢ abs\n      { fst := (f <$> p).fst.fst,\n        snd := fun x =>\n          abs { fst := Sigma.snd (f <$> p).fst x, snd := fun y => Sigma.snd (f <$> p) { fst := x, snd := y } } } =\n    f <$>\n      abs\n        { fst := p.fst.fst,\n          snd := fun x => abs { fst := Sigma.snd p.fst x, snd := fun y => Sigma.snd p { fst := x, snd := y } } }\n[PROOFSTEP]\ncases' p with a g\n[GOAL]\ncase mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\na :\n  { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }.A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      a →\n    α\n⊢ abs\n      { fst := (f <$> { fst := a, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := a, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := a, snd := g }) { fst := x, snd := y } } } =\n    f <$>\n      abs\n        { fst := { fst := a, snd := g }.fst.fst,\n          snd := fun x =>\n            abs\n              { fst := Sigma.snd { fst := a, snd := g }.fst x,\n                snd := fun y => Sigma.snd { fst := a, snd := g } { fst := x, snd := y } } }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\na :\n  { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n      B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }.A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      a →\n    α\n⊢ abs\n      { fst := (f <$> { fst := a, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := a, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := a, snd := g }) { fst := x, snd := y } } } =\n    f <$> abs { fst := a.fst, snd := fun x => abs { fst := Sigma.snd a x, snd := fun y => g { fst := x, snd := y } } }\n[PROOFSTEP]\ncases' a with b h\n[GOAL]\ncase mk.mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } } =\n    f <$>\n      abs\n        { fst := { fst := b, snd := h }.fst,\n          snd := fun x => abs { fst := Sigma.snd { fst := b, snd := h } x, snd := fun y => g { fst := x, snd := y } } }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } } =\n    f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }\n[PROOFSTEP]\nsymm\n[GOAL]\ncase mk.mk\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =\n    abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\ntrans\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } = ?m.45227\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ ?m.45227 =\n    abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ F₂ (F₁ β)\n[PROOFSTEP]\nsymm\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ ?a = f <$> abs { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ ?a =\n    abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\napply abs_map\n[GOAL]\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ abs\n      ((fun x x_1 => x <$> x_1) f <$>\n        { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } }) =\n    abs\n      { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n        snd := fun x =>\n          abs\n            { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n              snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ (fun x x_1 => x <$> x_1) f <$>\n      { fst := b, snd := fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =\n    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n      snd := fun x =>\n        abs\n          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\nrw [PFunctor.map_eq]\n[GOAL]\ncase e_a\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ { fst := b,\n      snd := (fun x x_1 => x <$> x_1) f ∘ fun x => abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =\n    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n      snd := fun x =>\n        abs\n          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\ndsimp [Function.comp]\n[GOAL]\ncase e_a\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ { fst := b, snd := fun x => f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } } } =\n    { fst := (f <$> { fst := { fst := b, snd := h }, snd := g }).fst.fst,\n      snd := fun x =>\n        abs\n          { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n            snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } } }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a.e_snd\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\n⊢ (fun x => f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } }) = fun x =>\n    abs\n      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }\n[PROOFSTEP]\next x\n[GOAL]\ncase e_a.e_snd.h\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\nx : PFunctor.B (P F₂) b\n⊢ f <$> abs { fst := h x, snd := fun y => g { fst := x, snd := y } } =\n    abs\n      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }\n[PROOFSTEP]\nrw [← abs_map]\n[GOAL]\ncase e_a.e_snd.h\nF₂ : Type u → Type u\ninst✝¹ : Functor F₂\nq₂ : Qpf F₂\nF₁ : Type u → Type u\ninst✝ : Functor F₁\nq₁ : Qpf F₁\nα β : Type u\nf : α → β\nb : (P F₂).A\nh : PFunctor.B (P F₂) b → (P F₁).A\ng :\n  PFunctor.B\n      { A := (a₂ : (P F₂).A) × (PFunctor.B (P F₂) a₂ → (P F₁).A),\n        B := fun a₂a₁ => (u : PFunctor.B (P F₂) a₂a₁.fst) × PFunctor.B (P F₁) (Sigma.snd a₂a₁ u) }\n      { fst := b, snd := h } →\n    α\nx : PFunctor.B (P F₂) b\n⊢ abs (f <$> { fst := h x, snd := fun y => g { fst := x, snd := y } }) =\n    abs\n      { fst := Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }).fst x,\n        snd := fun y => Sigma.snd (f <$> { fst := { fst := b, snd := h }, snd := g }) { fst := x, snd := y } }\n[PROOFSTEP]\nrfl\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Functor F\nq : Qpf F\nG : Type u → Type u\ninst✝ : Functor G\nFG_abs : {α : Type u} → F α → G α\nFG_repr : {α : Type u} → G α → F α\nFG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x\nα : Type u\nx : G α\n⊢ (fun {α} p => FG_abs (abs p)) ((fun {α} x => repr (FG_repr x)) x) = x\n[PROOFSTEP]\nsimp only\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Functor F\nq : Qpf F\nG : Type u → Type u\ninst✝ : Functor G\nFG_abs : {α : Type u} → F α → G α\nFG_repr : {α : Type u} → G α → F α\nFG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x\nα : Type u\nx : G α\n⊢ FG_abs (abs (repr (FG_repr x))) = x\n[PROOFSTEP]\nrw [abs_repr, FG_abs_repr]\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Functor F\nq : Qpf F\nG : Type u → Type u\ninst✝ : Functor G\nFG_abs : {α : Type u} → F α → G α\nFG_repr : {α : Type u} → G α → F α\nFG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x\nα β : Type u\nf : α → β\nx : PFunctor.Obj (P F) α\n⊢ (fun {α} p => FG_abs (abs p)) (f <$> x) = f <$> (fun {α} p => FG_abs (abs p)) x\n[PROOFSTEP]\nsimp only\n[GOAL]\nF : Type u → Type u\ninst✝¹ : Functor F\nq : Qpf F\nG : Type u → Type u\ninst✝ : Functor G\nFG_abs : {α : Type u} → F α → G α\nFG_repr : {α : Type u} → G α → F α\nFG_abs_repr : ∀ {α : Type u} (x : G α), FG_abs (FG_repr x) = x\nFG_abs_map : ∀ {α β : Type u} (f : α → β) (x : F α), FG_abs (f <$> x) = f <$> FG_abs x\nα β : Type u\nf : α → β\nx : PFunctor.Obj (P F) α\n⊢ FG_abs (abs (f <$> x)) = f <$> FG_abs (abs x)\n[PROOFSTEP]\nrw [abs_map, FG_abs_map]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\n⊢ u ∈ supp x ↔ ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\n[PROOFSTEP]\nrw [supp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\n⊢ u ∈ {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y} ↔\n    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\n[PROOFSTEP]\ndsimp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\n⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) ↔\n    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\n⊢ (∀ ⦃p : α → Prop⦄, Liftp p x → p u) →\n    ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\n[PROOFSTEP]\nintro h a f haf\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ ⦃p : α → Prop⦄, Liftp p x → p u\na : (P F).A\nf : PFunctor.B (P F) a → α\nhaf : abs { fst := a, snd := f } = x\n⊢ u ∈ f '' univ\n[PROOFSTEP]\nhave : Liftp (fun u => u ∈ f '' univ) x := by\n  rw [liftp_iff]\n  refine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ ⦃p : α → Prop⦄, Liftp p x → p u\na : (P F).A\nf : PFunctor.B (P F) a → α\nhaf : abs { fst := a, snd := f } = x\n⊢ Liftp (fun u => u ∈ f '' univ) x\n[PROOFSTEP]\nrw [liftp_iff]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ ⦃p : α → Prop⦄, Liftp p x → p u\na : (P F).A\nf : PFunctor.B (P F) a → α\nhaf : abs { fst := a, snd := f } = x\n⊢ ∃ a_1 f_1, x = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), f_1 i ∈ f '' univ\n[PROOFSTEP]\nrefine' ⟨a, f, haf.symm, fun i => mem_image_of_mem _ (mem_univ _)⟩\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ ⦃p : α → Prop⦄, Liftp p x → p u\na : (P F).A\nf : PFunctor.B (P F) a → α\nhaf : abs { fst := a, snd := f } = x\nthis : Liftp (fun u => u ∈ f '' univ) x\n⊢ u ∈ f '' univ\n[PROOFSTEP]\nexact h this\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\n⊢ (∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ) →\n    ∀ ⦃p : α → Prop⦄, Liftp p x → p u\n[PROOFSTEP]\nintro h p\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\np : α → Prop\n⊢ Liftp p x → p u\n[PROOFSTEP]\nrw [liftp_iff]\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\np : α → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → p u\n[PROOFSTEP]\nrintro ⟨a, f, xeq, h'⟩\n[GOAL]\ncase mpr.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), p (f i)\n⊢ p u\n[PROOFSTEP]\nrcases h a f xeq.symm with ⟨i, _, hi⟩\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), p (f i)\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhi : f i = u\n⊢ p u\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase mpr.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nu : α\nh : ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), p (f i)\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhi : f i = u\n⊢ p (f i)\n[PROOFSTEP]\napply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ supp x = {u | ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nx✝ : α\n⊢ x✝ ∈ supp x ↔ x✝ ∈ {u | ∀ (a : (P F).A) (f : PFunctor.B (P F) a → α), abs { fst := a, snd := f } = x → u ∈ f '' univ}\n[PROOFSTEP]\napply mem_supp\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u) ↔\n    ∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ (∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u) →\n    ∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nhave : Liftp (supp x) x := by rw [h]; intro u; exact id\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n⊢ Liftp (supp x) x\n[PROOFSTEP]\nrw [h]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n⊢ ∀ (u : α), u ∈ supp x → supp x u\n[PROOFSTEP]\nintro u\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nu : α\n⊢ u ∈ supp x → supp x u\n[PROOFSTEP]\nexact id\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nrw [liftp_iff] at this \n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis✝ : Liftp (supp x) x\nthis : ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), supp x (f i)\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nrcases this with ⟨a, f, xeq, h'⟩\n[GOAL]\ncase mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\n⊢ ∃ a f,\n    abs { fst := a, snd := f } = x ∧\n      ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nrefine' ⟨a, f, xeq.symm, _⟩\n[GOAL]\ncase mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\n⊢ ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nintro a' f' h''\n[GOAL]\ncase mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nh'' : abs { fst := a', snd := f' } = x\n⊢ f '' univ ⊆ f' '' univ\n[PROOFSTEP]\nrintro u ⟨i, _, hfi⟩\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nh'' : abs { fst := a', snd := f' } = x\nu : α\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhfi : f i = u\n⊢ u ∈ f' '' univ\n[PROOFSTEP]\nhave : u ∈ supp x := by rw [← hfi]; apply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nh'' : abs { fst := a', snd := f' } = x\nu : α\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhfi : f i = u\n⊢ u ∈ supp x\n[PROOFSTEP]\nrw [← hfi]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nh'' : abs { fst := a', snd := f' } = x\nu : α\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhfi : f i = u\n⊢ f i ∈ supp x\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\nh : ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\nthis✝ : Liftp (supp x) x\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : x = abs { fst := a, snd := f }\nh' : ∀ (i : PFunctor.B (P F) a), supp x (f i)\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nh'' : abs { fst := a', snd := f' } = x\nu : α\ni : PFunctor.B (P F) a\nleft✝ : i ∈ univ\nhfi : f i = u\nthis : u ∈ supp x\n⊢ u ∈ f' '' univ\n[PROOFSTEP]\nexact (mem_supp x u).mp this _ _ h''\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\n⊢ (∃ a f,\n      abs { fst := a, snd := f } = x ∧\n        ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ) →\n    ∀ (p : α → Prop), Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n[PROOFSTEP]\nrintro ⟨a, f, xeq, h⟩ p\n[GOAL]\ncase mpr.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\n⊢ Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n[PROOFSTEP]\nrw [liftp_iff]\n[GOAL]\ncase mpr.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) ↔ ∀ (u : α), u ∈ supp x → p u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mpr.intro.intro.intro.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\n⊢ (∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) → ∀ (u : α), u ∈ supp x → p u\n[PROOFSTEP]\nrintro ⟨a', f', xeq', h'⟩ u usuppx\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\nusuppx : u ∈ supp x\n⊢ p u\n[PROOFSTEP]\nrcases(mem_supp x u).mp usuppx a' f' xeq'.symm with ⟨i, _, f'ieq⟩\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\nusuppx : u ∈ supp x\ni : PFunctor.B (P F) a'\nleft✝ : i ∈ univ\nf'ieq : f' i = u\n⊢ p u\n[PROOFSTEP]\nrw [← f'ieq]\n[GOAL]\ncase mpr.intro.intro.intro.mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nxeq' : x = abs { fst := a', snd := f' }\nh' : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\nusuppx : u ∈ supp x\ni : PFunctor.B (P F) a'\nleft✝ : i ∈ univ\nf'ieq : f' i = u\n⊢ p (f' i)\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\n⊢ (∀ (u : α), u ∈ supp x → p u) → ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\n⊢ ∃ a f, x = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nrefine' ⟨a, f, xeq.symm, _⟩\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\n⊢ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nintro i\n[GOAL]\ncase mpr.intro.intro.intro.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\ni : PFunctor.B (P F) a\n⊢ p (f i)\n[PROOFSTEP]\napply h'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\ni : PFunctor.B (P F) a\n⊢ f i ∈ supp x\n[PROOFSTEP]\nrw [mem_supp]\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\ni : PFunctor.B (P F) a\n⊢ ∀ (a : (P F).A) (f_1 : PFunctor.B (P F) a → α), abs { fst := a, snd := f_1 } = x → f i ∈ f_1 '' univ\n[PROOFSTEP]\nintro a' f' xeq'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\ni : PFunctor.B (P F) a\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nxeq' : abs { fst := a', snd := f' } = x\n⊢ f i ∈ f' '' univ\n[PROOFSTEP]\napply h a' f' xeq'\n[GOAL]\ncase mpr.intro.intro.intro.mpr.a.a\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nα : Type u\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\nxeq : abs { fst := a, snd := f } = x\nh : ∀ (a' : (P F).A) (f' : PFunctor.B (P F) a' → α), abs { fst := a', snd := f' } = x → f '' univ ⊆ f' '' univ\np : α → Prop\nh' : ∀ (u : α), u ∈ supp x → p u\ni : PFunctor.B (P F) a\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nxeq' : abs { fst := a', snd := f' } = x\n⊢ f i ∈ f '' univ\n[PROOFSTEP]\napply mem_image_of_mem _ (mem_univ _)\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (abs { fst := a, snd := f }) = f '' univ\n[PROOFSTEP]\next u\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\n⊢ u ∈ supp (abs { fst := a, snd := f }) ↔ u ∈ f '' univ\n[PROOFSTEP]\nrw [mem_supp]\n[GOAL]\ncase h\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\n⊢ (∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),\n      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ) ↔\n    u ∈ f '' univ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\n⊢ (∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),\n      abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ) →\n    u ∈ f '' univ\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase h.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\nh' :\n  ∀ (a_1 : (P F).A) (f_1 : PFunctor.B (P F) a_1 → α),\n    abs { fst := a_1, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ\n⊢ u ∈ f '' univ\n[PROOFSTEP]\napply h' _ _ rfl\n[GOAL]\ncase h.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\n⊢ u ∈ f '' univ →\n    ∀ (a_2 : (P F).A) (f_1 : PFunctor.B (P F) a_2 → α),\n      abs { fst := a_2, snd := f_1 } = abs { fst := a, snd := f } → u ∈ f_1 '' univ\n[PROOFSTEP]\nintro h' a' f' e\n[GOAL]\ncase h.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\nh' : u ∈ f '' univ\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\ne : abs { fst := a', snd := f' } = abs { fst := a, snd := f }\n⊢ u ∈ f' '' univ\n[PROOFSTEP]\nrw [← h _ _ _ _ e.symm]\n[GOAL]\ncase h.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\nu : α\nh' : u ∈ f '' univ\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\ne : abs { fst := a', snd := f' } = abs { fst := a, snd := f }\n⊢ u ∈ f '' univ\n[PROOFSTEP]\napply h'\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\n⊢ Liftp p x ↔ ∀ (u : α), u ∈ supp x → p u\n[PROOFSTEP]\nrw [liftp_iff, ← abs_repr x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\n⊢ (∃ a f, abs (repr x) = abs { fst := a, snd := f } ∧ ∀ (i : PFunctor.B (P F) a), p (f i)) ↔\n    ∀ (u : α), u ∈ supp (abs (repr x)) → p u\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ (∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)) ↔\n    ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mk.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ (∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)) →\n    ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u\n[PROOFSTEP]\nrintro ⟨a', f', abseq, hf⟩ u\n[GOAL]\ncase mk.mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\n⊢ u ∈ supp (abs { fst := a, snd := f }) → p u\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h, h _ _ _ _ abseq]\n[GOAL]\ncase mk.mp.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\n⊢ u ∈ f' '' univ → p u\n[PROOFSTEP]\nrintro ⟨i, _, hi⟩\n[GOAL]\ncase mk.mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\ni : PFunctor.B (P F) a'\nleft✝ : i ∈ univ\nhi : f' i = u\n⊢ p u\n[PROOFSTEP]\nrw [← hi]\n[GOAL]\ncase mk.mp.intro.intro.intro.intro.intro\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\na' : (P F).A\nf' : PFunctor.B (P F) a' → α\nabseq : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\nhf : ∀ (i : PFunctor.B (P F) a'), p (f' i)\nu : α\ni : PFunctor.B (P F) a'\nleft✝ : i ∈ univ\nhi : f' i = u\n⊢ p (f' i)\n[PROOFSTEP]\napply hf\n[GOAL]\ncase mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ (∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u) →\n    ∃ a_2 f_1, abs { fst := a, snd := f } = abs { fst := a_2, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_2), p (f_1 i)\n[PROOFSTEP]\nintro h'\n[GOAL]\ncase mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u\n⊢ ∃ a_1 f_1, abs { fst := a, snd := f } = abs { fst := a_1, snd := f_1 } ∧ ∀ (i : PFunctor.B (P F) a_1), p (f_1 i)\n[PROOFSTEP]\nrefine' ⟨a, f, rfl, fun i => h' _ _⟩\n[GOAL]\ncase mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u\ni : PFunctor.B (P F) a\n⊢ f i ∈ supp (abs { fst := a, snd := f })\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h]\n[GOAL]\ncase mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\nx : F α\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : ∀ (u : α), u ∈ supp (abs { fst := a, snd := f }) → p u\ni : PFunctor.B (P F) a\n⊢ f i ∈ f '' univ\n[PROOFSTEP]\nexact ⟨i, mem_univ i, rfl⟩\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα β : Type u\ng : α → β\nx : F α\n⊢ supp (g <$> x) = g '' supp x\n[PROOFSTEP]\nrw [← abs_repr x]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα β : Type u\ng : α → β\nx : F α\n⊢ supp (g <$> abs (repr x)) = g '' supp (abs (repr x))\n[PROOFSTEP]\ncases' repr x with a f\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα β : Type u\ng : α → β\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (g <$> abs { fst := a, snd := f }) = g '' supp (abs { fst := a, snd := f })\n[PROOFSTEP]\nrw [← abs_map, PFunctor.map_eq]\n[GOAL]\ncase mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα β : Type u\ng : α → β\nx : F α\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (abs { fst := a, snd := g ∘ f }) = g '' supp (abs { fst := a, snd := f })\n[PROOFSTEP]\nrw [supp_eq_of_isUniform h, supp_eq_of_isUniform h, image_comp]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ SuppPreservation ↔ IsUniform\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ SuppPreservation → IsUniform\n[PROOFSTEP]\nintro h α a a' f f' h'\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : SuppPreservation\nα : Type u\na a' : (P F).A\nf : PFunctor.B (P F) a → α\nf' : PFunctor.B (P F) a' → α\nh' : abs { fst := a, snd := f } = abs { fst := a', snd := f' }\n⊢ f '' univ = f' '' univ\n[PROOFSTEP]\nrw [← PFunctor.supp_eq, ← PFunctor.supp_eq, ← h, h', h]\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ IsUniform → SuppPreservation\n[PROOFSTEP]\nrintro h α ⟨a, f⟩\n[GOAL]\ncase mpr.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : IsUniform\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\nrwa [supp_eq_of_isUniform, PFunctor.supp_eq]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ SuppPreservation ↔ LiftpPreservation\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ SuppPreservation → LiftpPreservation\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ LiftpPreservation → SuppPreservation\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : SuppPreservation\n⊢ LiftpPreservation\n[PROOFSTEP]\nrintro α p ⟨a, f⟩\n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : SuppPreservation\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }\n[PROOFSTEP]\nhave h' := h\n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : SuppPreservation\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : SuppPreservation\n⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }\n[PROOFSTEP]\nrw [suppPreservation_iff_uniform] at h' \n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : SuppPreservation\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }\n[PROOFSTEP]\ndsimp only [SuppPreservation, supp] at h \n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ Liftp p (abs { fst := a, snd := f }) ↔ Liftp p { fst := a, snd := f }\n[PROOFSTEP]\nrw [liftp_iff_of_isUniform h', supp_eq_of_isUniform h', PFunctor.liftp_iff']\n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ (∀ (u : α), u ∈ f '' univ → p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nsimp only [image_univ, mem_range, exists_imp]\n[GOAL]\ncase mp.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) ↔ ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp.mk.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ (∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u) → ∀ (i : PFunctor.B (P F) a), p (f i)\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\n⊢ (∀ (i : PFunctor.B (P F) a), p (f i)) → ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u\n[PROOFSTEP]\nintros\n[GOAL]\ncase mp.mk.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\na✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u\ni✝ : PFunctor.B (P F) a\n⊢ p (f i✝)\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase mp.mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\na✝¹ : ∀ (i : PFunctor.B (P F) a), p (f i)\nu✝ : α\nx✝ : PFunctor.B (P F) a\na✝ : f x✝ = u✝\n⊢ p u✝\n[PROOFSTEP]\nsubst_vars\n[GOAL]\ncase mp.mk.mp\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\na✝ : ∀ (u : α) (x : PFunctor.B (P F) a), f x = u → p u\ni✝ : PFunctor.B (P F) a\n⊢ p (f i✝)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase mp.mk.mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh :\n  ∀ ⦃α : Type u⦄ (x : PFunctor.Obj (P F) α),\n    {y | ∀ ⦃p : α → Prop⦄, Liftp p (abs x) → p y} = {y | ∀ ⦃p : α → Prop⦄, Liftp p x → p y}\nα : Type u\np : α → Prop\na : (P F).A\nf : PFunctor.B (P F) a → α\nh' : IsUniform\na✝ : ∀ (i : PFunctor.B (P F) a), p (f i)\nx✝ : PFunctor.B (P F) a\n⊢ p (f x✝)\n[PROOFSTEP]\nsolve_by_elim\n[GOAL]\ncase mpr\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : LiftpPreservation\n⊢ SuppPreservation\n[PROOFSTEP]\nrintro α ⟨a, f⟩\n[GOAL]\ncase mpr.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : LiftpPreservation\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\nsimp only [LiftpPreservation] at h \n[GOAL]\ncase mpr.mk\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\nh : ∀ ⦃α : Type u⦄ (p : α → Prop) (x : PFunctor.Obj (P F) α), Liftp p (abs x) ↔ Liftp p x\nα : Type u\na : (P F).A\nf : PFunctor.B (P F) a → α\n⊢ supp (abs { fst := a, snd := f }) = supp { fst := a, snd := f }\n[PROOFSTEP]\nsimp only [supp, h]\n[GOAL]\nF : Type u → Type u\ninst✝ : Functor F\nq : Qpf F\n⊢ LiftpPreservation ↔ IsUniform\n[PROOFSTEP]\nrw [← suppPreservation_iff_liftpPreservation, suppPreservation_iff_uniform]\n", "meta": {"mathlib_filename": "Mathlib.Data.QPF.Univariate.Basic", "llama_tokens": 74022, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5312093733737562, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.25730724104350405}}
{"text": "[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.725, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nj : ℕ\n⊢ ¬ComplexShape.Rel c 0 j\n[PROOFSTEP]\nintro hj\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.725, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nj : ℕ\nhj : ComplexShape.Rel c 0 j\n⊢ False\n[PROOFSTEP]\ndsimp at hj \n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.725, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nj : ℕ\nhj : j + 1 = 0\n⊢ False\n[PROOFSTEP]\napply Nat.not_succ_le_zero j\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.725, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nj : ℕ\nhj : j + 1 = 0\n⊢ Nat.succ j ≤ 0\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one, hj]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.35594, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\n⊢ X.obj (op [n + 1]) = HomologicalComplex.X K[X] m\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n m : ℕ\nhnq : n < q\nhnm : ComplexShape.Rel c m n\n⊢ hσ' q n m hnm = 0\n[PROOFSTEP]\nsimp only [hσ', hσ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n m : ℕ\nhnq : n < q\nhnm : ComplexShape.Rel c m n\n⊢ (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =\n    0\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n m : ℕ\nhnq : n < q\nhnm : ComplexShape.Rel c m n\n⊢ 0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) = 0\n[PROOFSTEP]\nexact zero_comp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.71579, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\n⊢ X.obj (op [n + 1]) = HomologicalComplex.X K[X] m\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\n⊢ hσ' q n m hnm =\n    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))\n[PROOFSTEP]\nsimp only [hσ', hσ]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\n⊢ (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =\n    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\nh✝ : n < q\n⊢ 0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =\n    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\nh✝ : n < q\n⊢ False\n[PROOFSTEP]\nlinarith\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\nh✝ : ¬n < q\n⊢ ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =\n    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))\n[PROOFSTEP]\nhave h' := tsub_eq_of_eq_add ha\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a m : ℕ\nha : n = a + q\nhnm : ComplexShape.Rel c m n\nh✝ : ¬n < q\nh' : n - q = a\n⊢ ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])) =\n    ((-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }) ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m]))\n[PROOFSTEP]\ncongr\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq n a : ℕ\nha : n = a + q\n⊢ hσ' q n (n + 1) (_ : n + 1 = n + 1) = (-1) ^ a • σ X { val := a, isLt := (_ : a < Nat.succ n) }\n[PROOFSTEP]\nrw [hσ'_eq ha rfl, eqToHom_refl, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\n⊢ HomologicalComplex.Hom.f (Hσ q) 0 = 0\n[PROOFSTEP]\nunfold Hσ\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) 0 = 0\n[PROOFSTEP]\nrw [nullHomotopicMap'_f_of_not_rel_left (c_mk 1 0 rfl) cs_down_0_not_rel_left]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\n⊢ hσ' q 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0\n[PROOFSTEP]\nrcases q with (_ | q)\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ hσ' Nat.zero 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0\n[PROOFSTEP]\nrw [hσ'_eq (show 0 = 0 + 0 by rfl) (c_mk 1 0 rfl)]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ 0 = 0 + 0\n[PROOFSTEP]\nrfl\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ (((-1) ^ 0 • σ X { val := 0, isLt := (_ : 0 < Nat.succ 0) }) ≫ eqToHom (_ : X.obj (op [0 + 1]) = X.obj (op [1]))) ≫\n      HomologicalComplex.d K[X] 1 0 =\n    0\n[PROOFSTEP]\nsimp only [pow_zero, Fin.mk_zero, one_zsmul, eqToHom_refl, Category.comp_id]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ σ X 0 ≫ HomologicalComplex.d K[X] 1 0 = 0\n[PROOFSTEP]\nerw [ChainComplex.of_d]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ σ X 0 ≫ AlternatingFaceMapComplex.objD X 0 = 0\n[PROOFSTEP]\nrw [AlternatingFaceMapComplex.objD, Fin.sum_univ_two, Fin.val_zero, Fin.val_one, pow_zero, pow_one, one_smul, neg_smul,\n  one_smul, comp_add, comp_neg, add_neg_eq_zero]\n[GOAL]\ncase zero\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\n⊢ σ X 0 ≫ δ X 0 = σ X 0 ≫ δ X 1\n[PROOFSTEP]\nerw [δ_comp_σ_self, δ_comp_σ_succ]\n[GOAL]\ncase succ\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\n⊢ hσ' (Nat.succ q) 0 1 (_ : ComplexShape.Rel c 1 0) ≫ HomologicalComplex.d K[X] 1 0 = 0\n[PROOFSTEP]\nrw [hσ'_eq_zero (Nat.succ_pos q) (c_mk 1 0 rfl), zero_comp]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\nX Y : SimplicialObject C\nf : X ⟶ Y\n⊢ NatTrans.app f (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ NatTrans.app f (op [m])\n[PROOFSTEP]\nhave h : n + 1 = m := hnm\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\nX Y : SimplicialObject C\nf : X ⟶ Y\nh : n + 1 = m\n⊢ NatTrans.app f (op [n]) ≫ hσ' q n m hnm = hσ' q n m hnm ≫ NatTrans.app f (op [m])\n[PROOFSTEP]\nsubst h\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\n⊢ NatTrans.app f (op [n]) ≫ hσ' q n (n + 1) hnm = hσ' q n (n + 1) hnm ≫ NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nsimp only [hσ', eqToHom_refl, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\n⊢ NatTrans.app f (op [n]) ≫ hσ q n = hσ q n ≫ NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nunfold hσ\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\n⊢ (NatTrans.app f (op [n]) ≫\n      if n < q then 0 else (-1) ^ (n - q) • σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) }) =\n    (if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\nh✝ : n < q\n⊢ NatTrans.app f (op [n]) ≫ 0 = 0 ≫ NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nrw [zero_comp, comp_zero]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\nh✝ : ¬n < q\n⊢ NatTrans.app f (op [n]) ≫ ((-1) ^ (n - q) • σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) }) =\n    ((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫ NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nsimp only [zsmul_comp, comp_zsmul]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\nh✝ : ¬n < q\n⊢ (-1) ^ (n - q) • NatTrans.app f (op [n]) ≫ σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) } =\n    (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) } ≫ NatTrans.app f (op [n + 1])\n[PROOFSTEP]\nerw [f.naturality]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : Preadditive C\nX✝ : SimplicialObject C\nq n : ℕ\nX Y : SimplicialObject C\nf : X ⟶ Y\nhnm : ComplexShape.Rel c (n + 1) n\nh✝ : ¬n < q\n⊢ (-1) ^ (n - q) • NatTrans.app f (op [n]) ≫ σ Y { val := n - q, isLt := (_ : n - q < Nat.succ n) } =\n    (-1) ^ (n - q) •\n      NatTrans.app f (op [n]) ≫ Y.map (SimplexCategory.σ { val := n - q, isLt := (_ : n - q < Nat.succ n) }).op\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.259122, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nx✝¹ x✝ : SimplicialObject C\nf : x✝¹ ⟶ x✝\n⊢ (alternatingFaceMapComplex C).map f ≫ (fun X => Hσ q) x✝ = (fun X => Hσ q) x✝¹ ≫ (alternatingFaceMapComplex C).map f\n[PROOFSTEP]\nunfold Hσ\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.259122, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nx✝¹ x✝ : SimplicialObject C\nf : x✝¹ ⟶ x✝\n⊢ (alternatingFaceMapComplex C).map f ≫ (fun X => nullHomotopicMap' (hσ' q)) x✝ =\n    (fun X => nullHomotopicMap' (hσ' q)) x✝¹ ≫ (alternatingFaceMapComplex C).map f\n[PROOFSTEP]\nrw [nullHomotopicMap'_comp, comp_nullHomotopicMap']\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.259122, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nx✝¹ x✝ : SimplicialObject C\nf : x✝¹ ⟶ x✝\n⊢ (nullHomotopicMap' fun i j hij => HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) i ≫ hσ' q i j hij) =\n    nullHomotopicMap' fun i j hij => hσ' q i j hij ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) j\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_h\nC : Type u_1\ninst✝¹ : Category.{?u.259122, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nx✝¹ x✝ : SimplicialObject C\nf : x✝¹ ⟶ x✝\n⊢ (fun i j hij => HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) i ≫ hσ' q i j hij) = fun i j hij =>\n    hσ' q i j hij ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) j\n[PROOFSTEP]\next n m hnm\n[GOAL]\ncase e_h.h.h.h\nC : Type u_1\ninst✝¹ : Category.{?u.259122, u_1} C\ninst✝ : Preadditive C\nX : SimplicialObject C\nq : ℕ\nx✝¹ x✝ : SimplicialObject C\nf : x✝¹ ⟶ x✝\nn m : ℕ\nhnm : ComplexShape.Rel (ComplexShape.down ℕ) m n\n⊢ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) n ≫ hσ' q n m hnm =\n    hσ' q n m hnm ≫ HomologicalComplex.Hom.f ((alternatingFaceMapComplex C).map f) m\n[PROOFSTEP]\nsimp only [alternatingFaceMapComplex_map_f, hσ'_naturality]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\n⊢ hσ' q n m hnm = G.map (hσ' q n m hnm)\n[PROOFSTEP]\nunfold hσ' hσ\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\n⊢ (if n < q then 0\n      else (-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =\n    G.map\n      ((if n < q then 0 else (-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n        eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\nh✝ : n < q\n⊢ 0 ≫ eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =\n    G.map (0 ≫ eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))\n[PROOFSTEP]\nsimp only [Functor.map_zero, zero_comp]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\nh✝ : ¬n < q\n⊢ ((-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =\n    G.map\n      (((-1) ^ (n - q) • σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n        eqToHom (_ : X.obj (op [n + 1]) = X.obj (op [m])))\n[PROOFSTEP]\nsimp only [eqToHom_map, Functor.map_comp, Functor.map_zsmul]\n[GOAL]\ncase neg\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n m : ℕ\nhnm : ComplexShape.Rel c m n\nh✝ : ¬n < q\n⊢ ((-1) ^ (n - q) • σ (((whiskering C D).obj G).obj X) { val := n - q, isLt := (_ : n - q < Nat.succ n) }) ≫\n      eqToHom (_ : (((whiskering C D).obj G).obj X).obj (op [n + 1]) = (((whiskering C D).obj G).obj X).obj (op [m])) =\n    ((-1) ^ (n - q) • G.map (σ X { val := n - q, isLt := (_ : n - q < Nat.succ n) })) ≫\n      eqToHom (_ : G.obj (X.obj (op [n + 1])) = G.obj (HomologicalComplex.X K[X] m))\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\n⊢ HomologicalComplex.Hom.f (Hσ q) n = G.map (HomologicalComplex.Hom.f (Hσ q) n)\n[PROOFSTEP]\nunfold Hσ\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =\n    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)\n[PROOFSTEP]\nhave eq := HomologicalComplex.congr_hom (map_nullHomotopicMap' G (@hσ' _ _ _ X q)) n\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\neq :\n  HomologicalComplex.Hom.f ((Functor.mapHomologicalComplex G c).map (nullHomotopicMap' (hσ' q))) n =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => G.map (hσ' q i j hij)) n\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =\n    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)\n[PROOFSTEP]\nsimp only [Functor.mapHomologicalComplex_map_f, ← map_hσ'] at eq \n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\neq :\n  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =\n    G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n)\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\neq :\n  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n\n[PROOFSTEP]\nlet h := (Functor.congr_obj (map_alternatingFaceMapComplex G) X).symm\n[GOAL]\nC : Type u_1\ninst✝⁴ : Category.{u_4, u_1} C\ninst✝³ : Preadditive C\nX✝ : SimplicialObject C\nD : Type u_2\ninst✝² : Category.{u_3, u_2} D\ninst✝¹ : Preadditive D\nG : C ⥤ D\ninst✝ : Functor.Additive G\nX : SimplicialObject C\nq n : ℕ\neq :\n  G.map (HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n) =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n\nh : ((whiskering C D).obj G ⋙ alternatingFaceMapComplex D).obj X =\n  (alternatingFaceMapComplex C ⋙ Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj X :=\n  Eq.symm (Functor.congr_obj (map_alternatingFaceMapComplex G) X)\n⊢ HomologicalComplex.Hom.f (nullHomotopicMap' (hσ' q)) n =\n    HomologicalComplex.Hom.f (nullHomotopicMap' fun i j hij => hσ' q i j hij) n\n[PROOFSTEP]\ncongr\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.Homotopies", "llama_tokens": 9332, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5389832206876841, "lm_q2_score": 0.47657965106367595, "lm_q1q2_score": 0.25686843524451275}}
{"text": "[GOAL]\nX : Scheme\ninst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace\nU : Opens ↑↑X.toPresheafedSpace\nh : Nonempty { x // x ∈ U }\n⊢ Set.Nonempty (⊤ ∩ ↑U)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\n⊢ Field ↑(Scheme.functionField X)\n[PROOFSTEP]\napply fieldOfIsUnitOrEqZero\n[GOAL]\ncase h\nX : Scheme\ninst✝ : IsIntegral X\n⊢ ∀ (a : ↑(Scheme.functionField X)), IsUnit a ∨ a = 0\n[PROOFSTEP]\nintro a\n[GOAL]\ncase h\nX : Scheme\ninst✝ : IsIntegral X\na : ↑(Scheme.functionField X)\n⊢ IsUnit a ∨ a = 0\n[PROOFSTEP]\nobtain ⟨U, m, s, rfl⟩ := TopCat.Presheaf.germ_exist _ _ a\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\n⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s) ∨\n    ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s = 0\n[PROOFSTEP]\nrw [or_iff_not_imp_right, ← (X.presheaf.germ ⟨_, m⟩).map_zero]\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\n⊢ ¬↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s =\n        ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) 0 →\n    IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)\n[PROOFSTEP]\nintro ha\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha :\n  ¬↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s =\n      ↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) 0\n⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)\n[PROOFSTEP]\nreplace ha := ne_of_apply_ne _ ha\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)\n[PROOFSTEP]\nhave hs : genericPoint X.carrier ∈ RingedSpace.basicOpen _ s :=\n  by\n  rw [← SetLike.mem_coe, (genericPoint_spec X.carrier).mem_open_set_iff, Set.top_eq_univ, Set.univ_inter,\n    Set.nonempty_iff_ne_empty, Ne.def, ← Opens.coe_bot, ← SetLike.ext'_iff]\n  erw [basicOpen_eq_bot_iff]\n  exacts [ha, (RingedSpace.basicOpen _ _).isOpen]\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s\n[PROOFSTEP]\nrw [← SetLike.mem_coe, (genericPoint_spec X.carrier).mem_open_set_iff, Set.top_eq_univ, Set.univ_inter,\n  Set.nonempty_iff_ne_empty, Ne.def, ← Opens.coe_bot, ← SetLike.ext'_iff]\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ ¬RingedSpace.basicOpen X.toSheafedSpace s = ⊥\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ IsOpen ↑(RingedSpace.basicOpen X.toSheafedSpace s)\n[PROOFSTEP]\nerw [basicOpen_eq_bot_iff]\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ ¬s = 0\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\n⊢ IsOpen ↑(RingedSpace.basicOpen X.toSheafedSpace s)\n[PROOFSTEP]\nexacts [ha, (RingedSpace.basicOpen _ _).isOpen]\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\nhs : genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s\n⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)\n[PROOFSTEP]\nhave := (X.presheaf.germ ⟨_, hs⟩).isUnit_map (RingedSpace.isUnit_res_basicOpen _ s)\n[GOAL]\ncase h.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nm : genericPoint ↑↑X.toPresheafedSpace ∈ U\ns : (forget CommRingCat).obj (X.presheaf.obj (op U))\nha : s ≠ 0\nhs : genericPoint ↑↑X.toPresheafedSpace ∈ RingedSpace.basicOpen X.toSheafedSpace s\nthis :\n  IsUnit\n    (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := hs })\n      (↑(X.presheaf.map (homOfLE (_ : RingedSpace.basicOpen X.toSheafedSpace s ≤ U)).op) s))\n⊢ IsUnit (↑(Presheaf.germ X.presheaf { val := genericPoint ↑↑X.toPresheafedSpace, property := m }) s)\n[PROOFSTEP]\nrwa [TopCat.Presheaf.germ_res_apply] at this \n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\n⊢ Function.Injective ↑(Presheaf.germ X.presheaf x)\n[PROOFSTEP]\nrw [injective_iff_map_eq_zero]\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\n⊢ ∀ (a : (forget CommRingCat).obj (X.presheaf.obj (op U))), ↑(Presheaf.germ X.presheaf x) a = 0 → a = 0\n[PROOFSTEP]\nintro y hy\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ny : (forget CommRingCat).obj (X.presheaf.obj (op U))\nhy : ↑(Presheaf.germ X.presheaf x) y = 0\n⊢ y = 0\n[PROOFSTEP]\nrw [← (X.presheaf.germ x).map_zero] at hy \n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ny : (forget CommRingCat).obj (X.presheaf.obj (op U))\nhy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0\n⊢ y = 0\n[PROOFSTEP]\nobtain ⟨W, hW, iU, iV, e⟩ := X.presheaf.germ_eq _ x.prop x.prop _ _ hy\n[GOAL]\ncase intro.intro.intro.intro\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ny : (forget CommRingCat).obj (X.presheaf.obj (op U))\nhy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0\nW : Opens ↑↑X.toPresheafedSpace\nhW : ↑x ∈ W\niU iV : W ⟶ U\ne : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iV.op) 0\n⊢ y = 0\n[PROOFSTEP]\ncases show iU = iV from Subsingleton.elim _ _\n[GOAL]\ncase intro.intro.intro.intro.refl\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ny : (forget CommRingCat).obj (X.presheaf.obj (op U))\nhy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0\nW : Opens ↑↑X.toPresheafedSpace\nhW : ↑x ∈ W\niU : W ⟶ U\ne : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iU.op) 0\n⊢ y = 0\n[PROOFSTEP]\nhaveI : Nonempty W := ⟨⟨_, hW⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.refl\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ny : (forget CommRingCat).obj (X.presheaf.obj (op U))\nhy : ↑(Presheaf.germ X.presheaf x) y = ↑(Presheaf.germ X.presheaf x) 0\nW : Opens ↑↑X.toPresheafedSpace\nhW : ↑x ∈ W\niU : W ⟶ U\ne : ↑(X.presheaf.map iU.op) y = ↑(X.presheaf.map iU.op) 0\nthis : Nonempty { x // x ∈ W }\n⊢ y = 0\n[PROOFSTEP]\nexact map_injective_of_isIntegral X iU e\n[GOAL]\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\n⊢ ↑f.val.base (genericPoint ↑↑X.toPresheafedSpace) = genericPoint ↑↑Y.toPresheafedSpace\n[PROOFSTEP]\napply ((genericPoint_spec Y).eq _).symm\n[GOAL]\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\n⊢ IsGenericPoint (↑f.val.base (genericPoint ↑↑X.toPresheafedSpace)) ⊤\n[PROOFSTEP]\nconvert (genericPoint_spec X.carrier).image (show Continuous f.1.base from ContinuousMap.continuous_toFun _)\n[GOAL]\ncase h.e'_4.h\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ ⊤ = closure (↑f.val.base '' ⊤)\n[PROOFSTEP]\nsymm\n[GOAL]\ncase h.e'_4.h\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ closure (↑f.val.base '' ⊤) = ⊤\n[PROOFSTEP]\nrw [eq_top_iff, Set.top_eq_univ, Set.top_eq_univ]\n[GOAL]\ncase h.e'_4.h\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ Set.univ ≤ closure (↑f.val.base '' Set.univ)\n[PROOFSTEP]\nconvert subset_closure_inter_of_isPreirreducible_of_isOpen _ H.base_open.open_range _\n[GOAL]\ncase h.e'_2.h.e'_3\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ ↑f.val.base '' Set.univ = Set.univ ∩ Set.range ↑f.val.base\ncase h.e'_4.h.convert_2\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ IsPreirreducible Set.univ\ncase h.e'_4.h.convert_3\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)\n[PROOFSTEP]\nrw [Set.univ_inter, Set.image_univ]\n[GOAL]\ncase h.e'_4.h.convert_2\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ IsPreirreducible Set.univ\ncase h.e'_4.h.convert_3\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)\n[PROOFSTEP]\napply PreirreducibleSpace.isPreirreducible_univ (α := Y.carrier)\n[GOAL]\ncase h.e'_4.h.convert_3\nX✝ : Scheme\nX Y : Scheme\nf : X ⟶ Y\nH : IsOpenImmersion f\nhX : IrreducibleSpace ↑↑X.toPresheafedSpace\ninst✝ : IrreducibleSpace ↑↑Y.toPresheafedSpace\ne_1✝ : ↑↑Y.toPresheafedSpace = (forget TopCat).obj ↑Y.toPresheafedSpace\n⊢ Set.Nonempty (Set.univ ∩ Set.range ↑f.val.base)\n[PROOFSTEP]\nexact ⟨_, trivial, Set.mem_range_self hX.2.some⟩\n[GOAL]\nX : Scheme\ninst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\n⊢ Algebra ↑(Presheaf.stalk X.presheaf x) ↑(Scheme.functionField X)\n[PROOFSTEP]\napply RingHom.toAlgebra\n[GOAL]\ncase i\nX : Scheme\ninst✝ : IrreducibleSpace ↑↑X.toPresheafedSpace\nx : ↑↑X.toPresheafedSpace\n⊢ ↑(Presheaf.stalk X.presheaf x) →+* ↑(Scheme.functionField X)\n[PROOFSTEP]\nexact X.presheaf.stalkSpecializes ((genericPoint_spec X.carrier).specializes trivial)\n[GOAL]\nX : Scheme\ninst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ninst✝ : Nonempty { x // x ∈ U }\n⊢ IsScalarTower ↑(X.presheaf.obj (op U)) ↑(Presheaf.stalk X.presheaf ↑x) ↑(Scheme.functionField X)\n[PROOFSTEP]\napply IsScalarTower.of_algebraMap_eq'\n[GOAL]\ncase h\nX : Scheme\ninst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ninst✝ : Nonempty { x // x ∈ U }\n⊢ algebraMap ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X) =\n    RingHom.comp (algebraMap ↑(Presheaf.stalk X.presheaf ↑x) ↑(Scheme.functionField X))\n      (algebraMap ↑(X.presheaf.obj (op U)) ↑(Presheaf.stalk X.presheaf ↑x))\n[PROOFSTEP]\nsimp_rw [RingHom.algebraMap_toAlgebra]\n[GOAL]\ncase h\nX : Scheme\ninst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ninst✝ : Nonempty { x // x ∈ U }\n⊢ Scheme.germToFunctionField X U =\n    RingHom.comp (Presheaf.stalkSpecializes X.presheaf (_ : genericPoint ↑↑X.toPresheafedSpace ⤳ ↑x))\n      (Presheaf.germ X.presheaf x)\n[PROOFSTEP]\nchange _ = X.presheaf.germ x ≫ _\n[GOAL]\ncase h\nX : Scheme\ninst✝¹ : IrreducibleSpace ↑↑X.toPresheafedSpace\nU : Opens ↑↑X.toPresheafedSpace\nx : { x // x ∈ U }\ninst✝ : Nonempty { x // x ∈ U }\n⊢ Scheme.germToFunctionField X U =\n    Presheaf.germ X.presheaf x ≫ Presheaf.stalkSpecializes X.presheaf (_ : genericPoint ↑↑X.toPresheafedSpace ⤳ ↑x)\n[PROOFSTEP]\nrw [X.presheaf.germ_stalkSpecializes]\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ ↑R →+* ↑(Scheme.functionField (Scheme.Spec.obj (op R)))\n[PROOFSTEP]\nchange CommRingCat.of R ⟶ _\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ CommRingCat.of ↑R ⟶ Scheme.functionField (Scheme.Spec.obj (op R))\n[PROOFSTEP]\napply StructureSheaf.toStalk\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace = { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }\n[PROOFSTEP]\napply (genericPoint_spec (Scheme.Spec.obj <| op R).carrier).eq\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ IsGenericPoint { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) } ⊤\n[PROOFSTEP]\nrw [isGenericPoint_def]\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ closure {{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }} = ⊤\n[PROOFSTEP]\nrw [← PrimeSpectrum.zeroLocus_vanishingIdeal_eq_closure, PrimeSpectrum.vanishingIdeal_singleton]\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ PrimeSpectrum.zeroLocus ↑{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal = ⊤\n[PROOFSTEP]\nrw [Set.top_eq_univ, ← PrimeSpectrum.zeroLocus_singleton_zero]\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ PrimeSpectrum.zeroLocus ↑{ asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal = PrimeSpectrum.zeroLocus {0}\n[PROOFSTEP]\nrfl\n[GOAL]\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ IsFractionRing ↑R ↑(Scheme.functionField (Scheme.Spec.obj (op R)))\n[PROOFSTEP]\nconvert StructureSheaf.IsLocalization.to_stalk R (genericPoint _)\n[GOAL]\ncase a\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ IsFractionRing ↑R ↑(Scheme.functionField (Scheme.Spec.obj (op R))) ↔\n    IsLocalization.AtPrime\n      (↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))\n          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace)))\n      (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal\n[PROOFSTEP]\ndelta IsFractionRing IsLocalization.AtPrime\n[GOAL]\ncase a\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ IsLocalization (nonZeroDivisors ↑R) ↑(Scheme.functionField (Scheme.Spec.obj (op R))) ↔\n    IsLocalization (Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal)\n      ↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))\n          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace))\n[PROOFSTEP]\napply Eq.to_iff\n[GOAL]\ncase a.a\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ IsLocalization (nonZeroDivisors ↑R) ↑(Scheme.functionField (Scheme.Spec.obj (op R))) =\n    IsLocalization (Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal)\n      ↑(Presheaf.stalk (Sheaf.presheaf (Spec.structureSheaf ↑R))\n          (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase a.a.e_M\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ nonZeroDivisors ↑R = Ideal.primeCompl (genericPoint ↑↑(Scheme.Spec.obj (op R)).toPresheafedSpace).asIdeal\n[PROOFSTEP]\nrw [genericPoint_eq_bot_of_affine]\n[GOAL]\ncase a.a.e_M\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\n⊢ nonZeroDivisors ↑R = Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal\n[PROOFSTEP]\next\n[GOAL]\ncase a.a.e_M.h\nX : Scheme\nR : CommRingCat\ninst✝ : IsDomain ↑R\nx✝ : ↑R\n⊢ x✝ ∈ nonZeroDivisors ↑R ↔ x✝ ∈ Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal\n[PROOFSTEP]\nexact mem_nonZeroDivisors_iff_ne_zero\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\n⊢ Set.Nonempty (⊤ ∩ ↑U)\n[PROOFSTEP]\nsimpa using h\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\n⊢ primeIdealOf hU\n      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ primeIdealOf hU\n      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n[PROOFSTEP]\nhave e : U.openEmbedding.isOpenMap.functor.obj ⊤ = U := by ext1; exact Set.image_univ.trans Subtype.range_coe\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ ↑((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤) = ↑U\n[PROOFSTEP]\nexact Set.image_univ.trans Subtype.range_coe\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n⊢ primeIdealOf hU\n      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n[PROOFSTEP]\ndelta IsAffineOpen.primeIdealOf\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n⊢ ↑(Scheme.Spec.map\n              (X.presheaf.map\n                  (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.base\n      (↑(Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom.val.base\n        { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) }) =\n    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n[PROOFSTEP]\nerw [← Scheme.comp_val_base_apply]\n[GOAL]\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\n⊢ ↑((Scheme.isoSpec (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))).hom ≫\n              Scheme.Spec.map\n                (X.presheaf.map\n                    (eqToHom (_ : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U)).op).op).val.base\n      { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    genericPoint ↑↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace\n[PROOFSTEP]\nconvert\n  genericPoint_eq_of_isOpenImmersion\n    ((X.restrict U.openEmbedding).isoSpec.hom ≫ Scheme.Spec.map (X.presheaf.map (eqToHom e).op).op)\n      -- Porting note: this was `ext1`\n[GOAL]\ncase h.e'_2.h.h.e'_6\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\ne_1✝ :\n  PrimeSpectrum ↑(X.presheaf.obj (op U)) =\n    (fun x => (forget TopCat).obj ↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)\n      (genericPoint\n        ↑↑(Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n⊢ { val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    genericPoint\n      ↑↑(Scheme.restrict X\n                  (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n[PROOFSTEP]\napply Subtype.ext\n[GOAL]\ncase h.e'_2.h.h.e'_6.a\nX✝ : Scheme\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nh : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\ne : (IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤ = U\ne_1✝ :\n  PrimeSpectrum ↑(X.presheaf.obj (op U)) =\n    (fun x => (forget TopCat).obj ↑(Scheme.Spec.obj (op (X.presheaf.obj (op U)))).toPresheafedSpace)\n      (genericPoint\n        ↑↑(Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n⊢ ↑{ val := genericPoint ↑↑X.toPresheafedSpace, property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) } =\n    ↑(genericPoint\n        ↑↑(Scheme.restrict X\n                    (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace)\n[PROOFSTEP]\nexact (genericPoint_eq_of_isOpenImmersion (X.ofRestrict U.openEmbedding)).symm\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\n⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)\n[PROOFSTEP]\nhaveI : IsAffine _ := hU\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)\n[PROOFSTEP]\nhaveI : Nonempty (X.restrict U.openEmbedding).carrier := hU'\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)\n[PROOFSTEP]\nhaveI : IsIntegral (X.restrict U.openEmbedding) :=\n  @isIntegralOfIsAffineIsDomain _ _ _ (by dsimp; rw [Opens.openEmbedding_obj_top]; infer_instance)\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ IsDomain\n    ↑((Scheme.restrict X\n                    (_ :\n                      OpenEmbedding\n                        ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace.presheaf.obj\n        (op ⊤))\n[PROOFSTEP]\ndsimp\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ IsDomain ↑(X.presheaf.obj (op ((IsOpenMap.functor (_ : IsOpenMap ↑(Opens.inclusion U))).obj ⊤)))\n[PROOFSTEP]\nrw [Opens.openEmbedding_obj_top]\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\n⊢ IsDomain ↑(X.presheaf.obj (op U))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis✝ :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nthis : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ IsFractionRing ↑(X.presheaf.obj (op U)) ↑(Scheme.functionField X)\n[PROOFSTEP]\ndelta IsFractionRing Scheme.functionField\n[GOAL]\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis✝ :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nthis : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ IsLocalization (nonZeroDivisors ↑(X.presheaf.obj (op U)))\n    ↑(Presheaf.stalk X.presheaf (genericPoint ↑↑X.toPresheafedSpace))\n[PROOFSTEP]\nconvert hU.isLocalization_stalk ⟨genericPoint X.carrier, _⟩ using 1\n[GOAL]\ncase h.e'_3.h\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis✝ :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nthis : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ nonZeroDivisors ↑(X.presheaf.obj (op U)) =\n    Ideal.primeCompl\n      (IsAffineOpen.primeIdealOf hU\n          { val := genericPoint ↑↑X.toPresheafedSpace,\n            property := (_ : genericPoint ↑↑X.toPresheafedSpace ∈ ↑U) }).asIdeal\n[PROOFSTEP]\nrw [hU.primeIdealOf_genericPoint, genericPoint_eq_bot_of_affine]\n[GOAL]\ncase h.e'_3.h\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis✝ :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nthis : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\n⊢ nonZeroDivisors ↑(X.presheaf.obj (op U)) = Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_3.h.h\nX : Scheme\ninst✝ : IsIntegral X\nU : Opens ↑↑X.toPresheafedSpace\nhU : IsAffineOpen U\nhU' : Nonempty { x // x ∈ U }\nthis✝¹ : IsAffine (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nthis✝ :\n  Nonempty\n    ↑↑(Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U))).toLocallyRingedSpace.toSheafedSpace.toPresheafedSpace\nthis : IsIntegral (Scheme.restrict X (_ : OpenEmbedding ↑(Opens.inclusion U)))\nx✝ : ↑(X.presheaf.obj (op U))\n⊢ x✝ ∈ nonZeroDivisors ↑(X.presheaf.obj (op U)) ↔\n    x✝ ∈ Ideal.primeCompl { asIdeal := 0, IsPrime := (_ : Ideal.IsPrime ⊥) }.asIdeal\n[PROOFSTEP]\nexact mem_nonZeroDivisors_iff_ne_zero\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicGeometry.FunctionField", "llama_tokens": 12759, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6297746074044134, "lm_q2_score": 0.40733340004593027, "lm_q1q2_score": 0.2565282320966306}}
{"text": "[GOAL]\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid A\ninst✝³ : Algebra A S\ninst✝² : IsLocalization M S\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : A\ns : { x // x ∈ M }\nhr : ↑(aeval (mk' S r s)) p = 0\n⊢ ↑(aeval (↑(algebraMap A S) r)) (scaleRoots p ↑s) = 0\n[PROOFSTEP]\nconvert scaleRoots_eval₂_eq_zero (algebraMap A S) hr\n[GOAL]\ncase h.e'_2.h.e\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid A\ninst✝³ : Algebra A S\ninst✝² : IsLocalization M S\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : A\ns : { x // x ∈ M }\nhr : ↑(aeval (mk' S r s)) p = 0\n⊢ ↑(aeval (↑(algebraMap A S) r)) = eval₂ (algebraMap A S) (↑(algebraMap A S) ↑s * mk' S r s)\n[PROOFSTEP]\nfunext\n[GOAL]\ncase h.e'_2.h.e.h\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁷ : CommRing A\ninst✝⁶ : Field K\ninst✝⁵ : CommRing R\ninst✝⁴ : CommRing S\nM : Submonoid A\ninst✝³ : Algebra A S\ninst✝² : IsLocalization M S\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : A\ns : { x // x ∈ M }\nhr : ↑(aeval (mk' S r s)) p = 0\nx✝ : A[X]\n⊢ ↑(aeval (↑(algebraMap A S) r)) x✝ = eval₂ (algebraMap A S) (↑(algebraMap A S) ↑s * mk' S r s) x✝\n[PROOFSTEP]\nrw [aeval_def, mk'_spec' _ r s]\n[GOAL]\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid A\ninst✝⁵ : Algebra A S\ninst✝⁴ : IsLocalization M S\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ninst✝¹ : IsDomain A\ninst✝ : UniqueFactorizationMonoid A\np : A[X]\nx : K\nhr : ↑(aeval x) p = 0\n⊢ IsRoot (scaleRoots p ↑(den A x)) (num A x)\n[PROOFSTEP]\napply isRoot_of_eval₂_map_eq_zero (IsFractionRing.injective A K)\n[GOAL]\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid A\ninst✝⁵ : Algebra A S\ninst✝⁴ : IsLocalization M S\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ninst✝¹ : IsDomain A\ninst✝ : UniqueFactorizationMonoid A\np : A[X]\nx : K\nhr : ↑(aeval x) p = 0\n⊢ eval₂ (algebraMap A K) (↑(algebraMap A K) (num A x)) (scaleRoots p ↑(den A x)) = 0\n[PROOFSTEP]\nrefine' scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero _\n[GOAL]\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid A\ninst✝⁵ : Algebra A S\ninst✝⁴ : IsLocalization M S\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ninst✝¹ : IsDomain A\ninst✝ : UniqueFactorizationMonoid A\np : A[X]\nx : K\nhr : ↑(aeval x) p = 0\n⊢ ↑(aeval (mk' K (num A x) (den A x))) p = 0\n[PROOFSTEP]\nrw [mk'_num_den]\n[GOAL]\nA : Type u_1\nK : Type u_2\nR : Type u_3\nS : Type u_4\ninst✝⁹ : CommRing A\ninst✝⁸ : Field K\ninst✝⁷ : CommRing R\ninst✝⁶ : CommRing S\nM : Submonoid A\ninst✝⁵ : Algebra A S\ninst✝⁴ : IsLocalization M S\ninst✝³ : Algebra A K\ninst✝² : IsFractionRing A K\ninst✝¹ : IsDomain A\ninst✝ : UniqueFactorizationMonoid A\np : A[X]\nx : K\nhr : ↑(aeval x) p = 0\n⊢ ↑(aeval x) p = 0\n[PROOFSTEP]\nexact hr\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nsuffices num A r ∣ (scaleRoots p (den A r)).coeff 0\n  by\n  simp only [coeff_scaleRoots, tsub_zero] at this \n  haveI inst := Classical.propDecidable\n  by_cases hr : num A r = 0\n  · obtain ⟨u, hu⟩ := (isUnit_den_of_num_eq_zero hr).pow p.natDegree\n    rw [← hu] at this \n    exact Units.dvd_mul_right.mp this\n  · refine' dvd_of_dvd_mul_left_of_no_prime_factors hr _ this\n    intro q dvd_num dvd_denom_pow hq\n    apply hq.not_unit\n    exact num_den_reduced A r dvd_num (hq.dvd_of_dvd_pow dvd_denom_pow)\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : num A r ∣ coeff (scaleRoots p ↑(den A r)) 0\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nsimp only [coeff_scaleRoots, tsub_zero] at this \n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nhaveI inst := Classical.propDecidable\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nby_cases hr : num A r = 0\n[GOAL]\ncase pos\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : num A r = 0\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nobtain ⟨u, hu⟩ := (isUnit_den_of_num_eq_zero hr).pow p.natDegree\n[GOAL]\ncase pos.intro\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : num A r = 0\nu : Aˣ\nhu : ↑u = ↑(den A r) ^ natDegree p\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nrw [← hu] at this \n[GOAL]\ncase pos.intro\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\ninst : (a : Prop) → Decidable a\nhr : num A r = 0\nu : Aˣ\nthis : num A r ∣ coeff p 0 * ↑u\nhu : ↑u = ↑(den A r) ^ natDegree p\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nexact Units.dvd_mul_right.mp this\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : ¬num A r = 0\n⊢ num A r ∣ coeff p 0\n[PROOFSTEP]\nrefine' dvd_of_dvd_mul_left_of_no_prime_factors hr _ this\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : ¬num A r = 0\n⊢ ∀ {d : A}, d ∣ num A r → d ∣ ↑(den A r) ^ natDegree p → ¬Prime d\n[PROOFSTEP]\nintro q dvd_num dvd_denom_pow hq\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : ¬num A r = 0\nq : A\ndvd_num : q ∣ num A r\ndvd_denom_pow : q ∣ ↑(den A r) ^ natDegree p\nhq : Prime q\n⊢ False\n[PROOFSTEP]\napply hq.not_unit\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr✝ : ↑(aeval r) p = 0\nthis : num A r ∣ coeff p 0 * ↑(den A r) ^ natDegree p\ninst : (a : Prop) → Decidable a\nhr : ¬num A r = 0\nq : A\ndvd_num : q ∣ num A r\ndvd_denom_pow : q ∣ ↑(den A r) ^ natDegree p\nhq : Prime q\n⊢ IsUnit q\n[PROOFSTEP]\nexact num_den_reduced A r dvd_num (hq.dvd_of_dvd_pow dvd_denom_pow)\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ num A r ∣ coeff (scaleRoots p ↑(den A r)) 0\n[PROOFSTEP]\nconvert dvd_term_of_isRoot_of_dvd_terms 0 (num_isRoot_scaleRoots_of_aeval_eq_zero hr) _\n[GOAL]\ncase h.e'_4\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ coeff (scaleRoots p ↑(den A r)) 0 = coeff (scaleRoots p ↑(den A r)) 0 * num A r ^ 0\n[PROOFSTEP]\nrw [pow_zero, mul_one]\n[GOAL]\ncase convert_2\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ ∀ (j : ℕ), j ≠ 0 → num A r ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nintro j hj\n[GOAL]\ncase convert_2\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ 0\n⊢ num A r ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\napply dvd_mul_of_dvd_right\n[GOAL]\ncase convert_2.h\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ 0\n⊢ num A r ∣ num A r ^ j\n[PROOFSTEP]\nconvert pow_dvd_pow (num A r) (Nat.succ_le_of_lt (bot_lt_iff_ne_bot.mpr hj))\n[GOAL]\ncase h.e'_3\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ 0\n⊢ num A r = num A r ^ Nat.succ ⊥\n[PROOFSTEP]\nexact (pow_one _).symm\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ ↑(den A r) ∣ leadingCoeff p\n[PROOFSTEP]\nsuffices (den A r : A) ∣ p.leadingCoeff * num A r ^ p.natDegree\n  by\n  refine' dvd_of_dvd_mul_left_of_no_prime_factors (mem_nonZeroDivisors_iff_ne_zero.mp (den A r).2) _ this\n  intro q dvd_den dvd_num_pow hq\n  apply hq.not_unit\n  exact num_den_reduced A r (hq.dvd_of_dvd_pow dvd_num_pow) dvd_den\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p\n⊢ ↑(den A r) ∣ leadingCoeff p\n[PROOFSTEP]\nrefine' dvd_of_dvd_mul_left_of_no_prime_factors (mem_nonZeroDivisors_iff_ne_zero.mp (den A r).2) _ this\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p\n⊢ ∀ {d : A}, d ∣ ↑(den A r) → d ∣ num A r ^ natDegree p → ¬Prime d\n[PROOFSTEP]\nintro q dvd_den dvd_num_pow hq\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p\nq : A\ndvd_den : q ∣ ↑(den A r)\ndvd_num_pow : q ∣ num A r ^ natDegree p\nhq : Prime q\n⊢ False\n[PROOFSTEP]\napply hq.not_unit\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nthis : ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p\nq : A\ndvd_den : q ∣ ↑(den A r)\ndvd_num_pow : q ∣ num A r ^ natDegree p\nhq : Prime q\n⊢ IsUnit q\n[PROOFSTEP]\nexact num_den_reduced A r (hq.dvd_of_dvd_pow dvd_num_pow) dvd_den\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ ↑(den A r) ∣ leadingCoeff p * num A r ^ natDegree p\n[PROOFSTEP]\nrw [← coeff_scaleRoots_natDegree]\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ ↑(den A r) ∣ coeff (scaleRoots p ?s) (natDegree p) * num A r ^ natDegree p\ncase s\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ A\n[PROOFSTEP]\napply dvd_term_of_isRoot_of_dvd_terms _ (num_isRoot_scaleRoots_of_aeval_eq_zero hr)\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\n⊢ ∀ (j : ℕ), j ≠ natDegree p → ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nintro j hj\n[GOAL]\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\n⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nby_cases h : j < p.natDegree\n[GOAL]\ncase pos\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : j < natDegree p\n⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nrw [coeff_scaleRoots]\n[GOAL]\ncase pos\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : j < natDegree p\n⊢ ↑(den A r) ∣ coeff p j * ↑(den A r) ^ (natDegree p - j) * num A r ^ j\n[PROOFSTEP]\nrefine' (dvd_mul_of_dvd_right _ _).mul_right _\n[GOAL]\ncase pos\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : j < natDegree p\n⊢ ↑(den A r) ∣ ↑(den A r) ^ (natDegree p - j)\n[PROOFSTEP]\nconvert pow_dvd_pow (den A r : A) (Nat.succ_le_iff.mpr (lt_tsub_iff_left.mpr _))\n[GOAL]\ncase h.e'_3\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : j < natDegree p\n⊢ ↑(den A r) = ↑(den A r) ^ Nat.succ ?pos.convert_1✝\n[PROOFSTEP]\nexact (pow_one _).symm\n[GOAL]\ncase pos.convert_4\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : j < natDegree p\n⊢ j + 0 < natDegree p\n[PROOFSTEP]\nsimpa using h\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree p\nh : ¬j < natDegree p\n⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nrw [← natDegree_scaleRoots p (den A r)] at *\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree (scaleRoots p ↑(den A r))\nh : ¬j < natDegree (scaleRoots p ↑(den A r))\n⊢ ↑(den A r) ∣ coeff (scaleRoots p ↑(den A r)) j * num A r ^ j\n[PROOFSTEP]\nrw [coeff_eq_zero_of_natDegree_lt (lt_of_le_of_ne (le_of_not_gt h) hj.symm), zero_mul]\n[GOAL]\ncase neg\nA : Type u_1\nK : Type u_2\ninst✝⁵ : CommRing A\ninst✝⁴ : IsDomain A\ninst✝³ : UniqueFactorizationMonoid A\ninst✝² : Field K\ninst✝¹ : Algebra A K\ninst✝ : IsFractionRing A K\np : A[X]\nr : K\nhr : ↑(aeval r) p = 0\nj : ℕ\nhj : j ≠ natDegree (scaleRoots p ↑(den A r))\nh : ¬j < natDegree (scaleRoots p ↑(den A r))\n⊢ ↑(den A r) ∣ 0\n[PROOFSTEP]\nexact dvd_zero _\n", "meta": {"mathlib_filename": "Mathlib.RingTheory.Polynomial.RationalRoot", "llama_tokens": 8855, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5467381519846138, "lm_q2_score": 0.46879062662624377, "lm_q1q2_score": 0.2563057208693416}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsAntisymm α r\na b : α\n⊢ a = b → r a b ∧ r b a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsRefl α r\ninst✝ : IsAntisymm α r\na : α\n⊢ r a a ∧ r a a\n[PROOFSTEP]\nexact ⟨refl _, refl _⟩\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns : β → β → Prop\nr : α → α → Prop\ninst✝ : IsTrichotomous α r\na b : α\n⊢ Function.swap r a b ∨ a = b ∨ Function.swap r b a\n[PROOFSTEP]\nsimpa [Function.swap, or_comm, or_left_comm] using trichotomous_of r a b\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns : β → β → Prop\nr : α → α → Prop\ninst✝¹ : IsIrrefl α r\ninst✝ : Subsingleton α\n⊢ ∀ (a b : α), r a b = EmptyRelation a b\n[PROOFSTEP]\nsimpa using not_rel_of_subsingleton r\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\n⊢ ¬r b a → r b c → r a c\n[PROOFSTEP]\nintro h₁ h₂\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : ¬r b a\nh₂ : r b c\n⊢ r a c\n[PROOFSTEP]\nrcases trichotomous_of r a b with (h₃ | rfl | h₃)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : ¬r b a\nh₂ : r b c\nh₃ : r a b\n⊢ r a c\ncase inr.inl\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na c : α\nh₁ : ¬r a a\nh₂ : r a c\n⊢ r a c\ncase inr.inr\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : ¬r b a\nh₂ : r b c\nh₃ : r b a\n⊢ r a c\n[PROOFSTEP]\nexacts [_root_.trans h₃ h₂, h₂, absurd h₃ h₁]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\n⊢ r a b → ¬r c b → r a c\n[PROOFSTEP]\nintro h₁ h₂\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : r a b\nh₂ : ¬r c b\n⊢ r a c\n[PROOFSTEP]\nrcases trichotomous_of r b c with (h₃ | rfl | h₃)\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : r a b\nh₂ : ¬r c b\nh₃ : r b c\n⊢ r a c\ncase inr.inl\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b : α\nh₁ : r a b\nh₂ : ¬r b b\n⊢ r a b\ncase inr.inr\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsTrans α r\ninst✝ : IsTrichotomous α r\na b c : α\nh₁ : r a b\nh₂ : ¬r c b\nh₃ : r c b\n⊢ r a c\n[PROOFSTEP]\nexacts [_root_.trans h₁ h₃, h₁, absurd h₃ h₂]\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns : β → β → Prop\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\nx y : α\nh : x < y\ne : y = x\n⊢ False\n[PROOFSTEP]\nrw [e] at h \n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns : β → β → Prop\nr : α → α → Prop\ninst✝ : IsStrictOrder α r\nx y : α\nh : x < x\ne : y = x\n⊢ False\n[PROOFSTEP]\nexact irrefl _ h\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns : β → β → Prop\nr : α → α → Prop\ninst✝ : IsOrderConnected α r\na b c : α\nh₁ : ¬r a b\nh₂ : ¬r b c\n⊢ ¬(r a b ∨ r b c)\n[PROOFSTEP]\nsimp [h₁, h₂]\n[GOAL]\nα✝ : Type u\nβ : Type v\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nα : Type ?u.14854\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ IsTrichotomous α r\n[PROOFSTEP]\ninfer_instance\n  -- see Note [lower instance priority]\n[GOAL]\nα✝ : Type u\nβ : Type v\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nα : Type ?u.14937\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ IsTrans α r\n[PROOFSTEP]\ninfer_instance\n  -- see Note [lower instance priority]\n[GOAL]\nα✝ : Type u\nβ : Type v\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nα : Type ?u.15023\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ IsIrrefl α r\n[PROOFSTEP]\ninfer_instance\n  -- see Note [lower instance priority]\n[GOAL]\nα✝ : Type u\nβ : Type v\nr✝ : α✝ → α✝ → Prop\ns : β → β → Prop\nα : Type ?u.15135\nr : α → α → Prop\ninst✝ : IsWellOrder α r\n⊢ IsAsymm α r\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\na b c : α × β\nh₁ : Prod.Lex r s a b\nh₂ : Prod.Lex r s b c\n⊢ Prod.Lex r s a c\n[PROOFSTEP]\ncases' h₁ with a₁ a₂ b₁ b₂ ab a₁ b₁ b₂ ab\n[GOAL]\ncase left\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : α × β\na₁ : α\na₂ : β\nb₁ : α\nb₂ : β\nab : r a₁ b₁\nh₂ : Prod.Lex r s (b₁, b₂) c\n⊢ Prod.Lex r s (a₁, a₂) c\n[PROOFSTEP]\ncases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc\n[GOAL]\ncase right\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\nc : α × β\na₁ : α\nb₁ b₂ : β\nab : s b₁ b₂\nh₂ : Prod.Lex r s (a₁, b₂) c\n⊢ Prod.Lex r s (a₁, b₁) c\n[PROOFSTEP]\ncases' h₂ with _ _ c₁ c₂ bc _ _ c₂ bc\n[GOAL]\ncase left.left\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\na₁ : α\na₂ : β\nb₁ : α\nb₂ : β\nab : r a₁ b₁\nc₁ : α\nc₂ : β\nbc : r b₁ c₁\n⊢ Prod.Lex r s (a₁, a₂) (c₁, c₂)\ncase left.right\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\na₁ : α\na₂ : β\nb₁ : α\nb₂ : β\nab : r a₁ b₁\nc₂ : β\nbc : s b₂ c₂\n⊢ Prod.Lex r s (a₁, a₂) (b₁, c₂)\ncase right.left\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\na₁ : α\nb₁ b₂ : β\nab : s b₁ b₂\nc₁ : α\nc₂ : β\nbc : r a₁ c₁\n⊢ Prod.Lex r s (a₁, b₁) (c₁, c₂)\ncase right.right\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝¹ : IsWellOrder α r\ninst✝ : IsWellOrder β s\na₁ : α\nb₁ b₂ : β\nab : s b₁ b₂\nc₂ : β\nbc : s b₂ c₂\n⊢ Prod.Lex r s (a₁, b₁) (a₁, c₂)\n[PROOFSTEP]\nexacts [.left _ _ (_root_.trans ab bc), .left _ _ ab, .left _ _ bc, .right _ (_root_.trans ab bc)]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nrefine @Subrelation.wf (α × β) (Prod.Lex (· < ·) (· < ·)) (· < ·) ?_ IsWellFounded.wf\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\n⊢ Subrelation (fun x x_1 => x < x_1) (Prod.Lex (fun x x_1 => x < x_1) fun x x_1 => x < x_1)\n[PROOFSTEP]\nrintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩ w\n[GOAL]\ncase mk.mk\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nw : (a₁, b₁) < (a₂, b₂)\n⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)\n[PROOFSTEP]\nsimp only [Prod.mk_lt_mk] at w \n[GOAL]\ncase mk.mk\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nw : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂\n⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)\n[PROOFSTEP]\nrcases eq_or_ne a₁ a₂ with rfl | ha\n[GOAL]\ncase mk.mk.inl\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ b₂ : β\nw : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂\n⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₁, b₂)\n[PROOFSTEP]\nright\n[GOAL]\ncase mk.mk.inl.h\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ b₂ : β\nw : a₁ < a₁ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₁ ∧ b₁ < b₂\n⊢ b₁ < b₂\n[PROOFSTEP]\nsimpa using w\n[GOAL]\ncase mk.mk.inr\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nw : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂\nha : a₁ ≠ a₂\n⊢ Prod.Lex (fun x x_1 => x < x_1) (fun x x_1 => x < x_1) (a₁, b₁) (a₂, b₂)\n[PROOFSTEP]\nleft\n[GOAL]\ncase mk.mk.inr.h\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nw : a₁ < a₂ ∧ b₁ ≤ b₂ ∨ a₁ ≤ a₂ ∧ b₁ < b₂\nha : a₁ ≠ a₂\n⊢ a₁ < a₂\n[PROOFSTEP]\nrcases w with ⟨a_lt, _⟩ | ⟨a_le, _⟩\n[GOAL]\ncase mk.mk.inr.h.inl.intro\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nha : a₁ ≠ a₂\na_lt : a₁ < a₂\nright✝ : b₁ ≤ b₂\n⊢ a₁ < a₂\n[PROOFSTEP]\nassumption\n[GOAL]\ncase mk.mk.inr.h.inr.intro\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝³ : PartialOrder α\ninst✝² : WellFoundedLT α\ninst✝¹ : Preorder β\ninst✝ : WellFoundedLT β\na₁ : α\nb₁ : β\na₂ : α\nb₂ : β\nha : a₁ ≠ a₂\na_le : a₁ ≤ a₂\nright✝ : b₁ < b₂\n⊢ a₁ < a₂\n[PROOFSTEP]\nexact Ne.lt_of_le ha a_le\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nr : α → α → Prop\ns : Set α\n⊢ ¬Bounded r s ↔ Unbounded r s\n[PROOFSTEP]\nsimp only [Bounded, Unbounded, not_forall, not_exists, exists_prop, not_and, not_not]\n[GOAL]\nα : Type u\nβ : Type v\nr✝ : α → α → Prop\ns✝ : β → β → Prop\nr : α → α → Prop\ns : Set α\n⊢ ¬Unbounded r s ↔ Bounded r s\n[PROOFSTEP]\nrw [not_iff_comm, not_bounded_iff]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : HasSubset α\na b c : α\nhab : a = b\nhbc : b ⊆ c\n⊢ a ⊆ c\n[PROOFSTEP]\nrwa [hab]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : HasSubset α\na b c : α\nhab : a ⊆ b\nhbc : b = c\n⊢ a ⊆ c\n[PROOFSTEP]\nrwa [← hbc]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : HasSSubset α\na b c : α\nhab : a = b\nhbc : b ⊂ c\n⊢ a ⊂ c\n[PROOFSTEP]\nrwa [hab]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : HasSSubset α\na b c : α\nhab : a ⊂ b\nhbc : b = c\n⊢ a ⊂ c\n[PROOFSTEP]\nrwa [← hbc]\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : LinearOrder α\n⊢ IsOrderConnected α fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : LinearOrder α\n⊢ IsIncompTrans α fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u\nβ : Type v\nr : α → α → Prop\ns : β → β → Prop\ninst✝ : LinearOrder α\n⊢ IsStrictWeakOrder α fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.Order.RelClasses", "llama_tokens": 5644, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.665410558746814, "lm_q2_score": 0.3849121444839335, "lm_q1q2_score": 0.2561246051294886}}
{"text": "[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\n⊢ torsionOf R M 0 = ⊤\n[PROOFSTEP]\nsimp [torsionOf]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\n⊢ torsionOf R M m = ⊤ ↔ m = 0\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun h => by simp [h]⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\nh : m = 0\n⊢ torsionOf R M m = ⊤\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\nh : torsionOf R M m = ⊤\n⊢ m = 0\n[PROOFSTEP]\nrw [← one_smul R m, ← mem_torsionOf_iff m (1 : R), h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Semiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\nm : M\nh : torsionOf R M m = ⊤\n⊢ 1 ∈ ⊤\n[PROOFSTEP]\nexact Submodule.mem_top\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroSMulDivisors R M\nm : M\n⊢ torsionOf R M m = ⊥ ↔ m ≠ 0\n[PROOFSTEP]\nrefine' ⟨fun h contra => _, fun h => (Submodule.eq_bot_iff _).mpr fun r hr => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroSMulDivisors R M\nm : M\nh : torsionOf R M m = ⊥\ncontra : m = 0\n⊢ False\n[PROOFSTEP]\nrw [contra, torsionOf_zero] at h \n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroSMulDivisors R M\nm : M\nh : ⊤ = ⊥\ncontra : m = 0\n⊢ False\n[PROOFSTEP]\nexact bot_ne_top.symm h\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroSMulDivisors R M\nm : M\nh : m ≠ 0\nr : R\nhr : r ∈ torsionOf R M m\n⊢ r = 0\n[PROOFSTEP]\nrw [mem_torsionOf_iff, smul_eq_zero] at hr \n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝⁴ : Semiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : Nontrivial R\ninst✝ : NoZeroSMulDivisors R M\nm : M\nh : m ≠ 0\nr : R\nhr : r = 0 ∨ m = 0\n⊢ r = 0\n[PROOFSTEP]\ntauto\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhv : CompleteLattice.Independent fun i => Submodule.span R {v i}\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\n⊢ LinearIndependent R v\n[PROOFSTEP]\nrefine' linearIndependent_iff_not_smul_mem_span.mpr fun i r hi => _\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nhv : CompleteLattice.Independent fun i => Submodule.span R {v i}\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\n⊢ r = 0\n[PROOFSTEP]\nreplace hv := CompleteLattice.independent_def.mp hv i\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Disjoint (Submodule.span R {v i}) (⨆ (j : ι) (_ : j ≠ i), Submodule.span R {v j})\n⊢ r = 0\n[PROOFSTEP]\nsimp only [iSup_subtype', ← Submodule.span_range_eq_iSup, disjoint_iff] at hv \n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\n⊢ r = 0\n[PROOFSTEP]\nhave : r • v i ∈ ⊥ := by\n  rw [← hv, Submodule.mem_inf]\n  refine' ⟨Submodule.mem_span_singleton.mpr ⟨r, rfl⟩, _⟩\n  convert hi\n  ext\n  simp\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\n⊢ r • v i ∈ ⊥\n[PROOFSTEP]\nrw [← hv, Submodule.mem_inf]\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\n⊢ r • v i ∈ Submodule.span R {v i} ∧ r • v i ∈ Submodule.span R (Set.range fun i_1 => v ↑i_1)\n[PROOFSTEP]\nrefine' ⟨Submodule.mem_span_singleton.mpr ⟨r, rfl⟩, _⟩\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\n⊢ r • v i ∈ Submodule.span R (Set.range fun i_1 => v ↑i_1)\n[PROOFSTEP]\nconvert hi\n[GOAL]\ncase h.e'_5.h.e'_6\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\n⊢ (Set.range fun i_1 => v ↑i_1) = v '' (Set.univ \\ {i})\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h.e'_6.h\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\nx✝ : M\n⊢ (x✝ ∈ Set.range fun i_1 => v ↑i_1) ↔ x✝ ∈ v '' (Set.univ \\ {i})\n[PROOFSTEP]\nsimp\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\nthis : r • v i ∈ ⊥\n⊢ r = 0\n[PROOFSTEP]\nrw [← Submodule.mem_bot R, ← h_ne_zero i]\n[GOAL]\nR✝ : Type u_1\nM✝ : Type u_2\ninst✝⁵ : Semiring R✝\ninst✝⁴ : AddCommMonoid M✝\ninst✝³ : Module R✝ M✝\nι : Type u_3\nR : Type u_4\nM : Type u_5\nv : ι → M\ninst✝² : Ring R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nh_ne_zero : ∀ (i : ι), torsionOf R M (v i) = ⊥\ni : ι\nr : R\nhi : r • v i ∈ Submodule.span R (v '' (Set.univ \\ {i}))\nhv : Submodule.span R {v i} ⊓ Submodule.span R (Set.range fun i_1 => v ↑i_1) = ⊥\nthis : r • v i ∈ ⊥\n⊢ r ∈ torsionOf R M (v i)\n[PROOFSTEP]\nsimpa using this\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nS : Type w\ninst✝¹ : CommMonoid S\ninst✝ : DistribMulAction S M\n⊢ ∀ {a b : M}, a ∈ {x | ∃ a, a • x = 0} → b ∈ {x | ∃ a, a • x = 0} → a + b ∈ {x | ∃ a, a • x = 0}\n[PROOFSTEP]\nintro x y ⟨a, hx⟩ ⟨b, hy⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nS : Type w\ninst✝¹ : CommMonoid S\ninst✝ : DistribMulAction S M\nx y : M\na : S\nhx : a • x = 0\nb : S\nhy : b • y = 0\n⊢ x + y ∈ {x | ∃ a, a • x = 0}\n[PROOFSTEP]\nuse b * a\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\nS : Type w\ninst✝¹ : CommMonoid S\ninst✝ : DistribMulAction S M\nx y : M\na : S\nhx : a • x = 0\nb : S\nhy : b • y = 0\n⊢ (b * a) • (x + y) = 0\n[PROOFSTEP]\nrw [smul_add, mul_smul, mul_comm, mul_smul, hx, hy, smul_zero, smul_zero, add_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type w\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\nsrc✝ : AddSubmonoid M := torsion'AddSubMonoid M S\na : R\nx : M\nx✝ : x ∈ { toAddSubsemigroup := src✝.toAddSubsemigroup, zero_mem' := (_ : 0 ∈ src✝.carrier) }.toAddSubsemigroup.carrier\nb : S\nh : b • x = 0\n⊢ b • a • x = 0\n[PROOFSTEP]\nrw [smul_comm, h, smul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\n⊢ x ∈ torsionBySet R M s ↔ ∀ (a : ↑s), ↑a • x = 0\n[PROOFSTEP]\nrefine' ⟨fun h ⟨a, ha⟩ => mem_sInf.mp h _ (Set.mem_image_of_mem _ ha), fun h => mem_sInf.mpr _⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nh : ∀ (a : ↑s), ↑a • x = 0\n⊢ ∀ (p : Submodule R M), p ∈ torsionBy R M '' s → x ∈ p\n[PROOFSTEP]\nrintro _ ⟨a, ha, rfl⟩\n[GOAL]\ncase intro.intro\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ : R\nx : M\nh : ∀ (a : ↑s), ↑a • x = 0\na : R\nha : a ∈ s\n⊢ x ∈ torsionBy R M a\n[PROOFSTEP]\nexact h ⟨a, ha⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ torsionBySet R M {a} = torsionBy R M a\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\n⊢ x ∈ torsionBySet R M {a} ↔ x ∈ torsionBy R M a\n[PROOFSTEP]\nsimp only [mem_torsionBySet_iff, SetCoe.forall, Subtype.coe_mk, Set.mem_singleton_iff, forall_eq, mem_torsionBy_iff]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ torsionBySet R M s = torsionBySet R M ↑(Ideal.span s)\n[PROOFSTEP]\nrefine le_antisymm (fun x hx => ?_) (torsionBySet_le_torsionBySet_of_subset subset_span)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nhx : x ∈ torsionBySet R M s\n⊢ x ∈ torsionBySet R M ↑(Ideal.span s)\n[PROOFSTEP]\nrw [mem_torsionBySet_iff] at hx ⊢\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nhx : ∀ (a : ↑s), ↑a • x = 0\n⊢ ∀ (a : ↑↑(Ideal.span s)), ↑a • x = 0\n[PROOFSTEP]\nsuffices Ideal.span s ≤ Ideal.torsionOf R M x by\n  rintro ⟨a, ha⟩\n  exact this ha\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nhx : ∀ (a : ↑s), ↑a • x = 0\nthis : Ideal.span s ≤ Ideal.torsionOf R M x\n⊢ ∀ (a : ↑↑(Ideal.span s)), ↑a • x = 0\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ : R\nx : M\nhx : ∀ (a : ↑s), ↑a • x = 0\nthis : Ideal.span s ≤ Ideal.torsionOf R M x\na : R\nha : a ∈ ↑(Ideal.span s)\n⊢ ↑{ val := a, property := ha } • x = 0\n[PROOFSTEP]\nexact this ha\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nhx : ∀ (a : ↑s), ↑a • x = 0\n⊢ Ideal.span s ≤ Ideal.torsionOf R M x\n[PROOFSTEP]\nrw [Ideal.span_le]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx : M\nhx : ∀ (a : ↑s), ↑a • x = 0\n⊢ s ⊆ ↑(Ideal.torsionOf R M x)\n[PROOFSTEP]\nexact fun a ha => hx ⟨a, ha⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ a b : R\ndvd : a ∣ b\n⊢ torsionBy R M a ≤ torsionBy R M b\n[PROOFSTEP]\nrw [← torsionBySet_span_singleton_eq, ← torsionBySet_singleton_eq]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ a b : R\ndvd : a ∣ b\n⊢ torsionBySet R M ↑(span R {a}) ≤ torsionBySet R M {b}\n[PROOFSTEP]\napply torsionBySet_le_torsionBySet_of_subset\n[GOAL]\ncase st\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ a b : R\ndvd : a ∣ b\n⊢ {b} ⊆ ↑(span R {a})\n[PROOFSTEP]\nrintro c (rfl : c = b)\n[GOAL]\ncase st\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na✝ a c : R\ndvd : a ∣ c\n⊢ c ∈ ↑(span R {a})\n[PROOFSTEP]\nexact Ideal.mem_span_singleton.mpr dvd\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx✝ : M\nh : x✝ ∈ torsionBy R M 1\n⊢ x✝ ∈ ⊥\n[PROOFSTEP]\nrw [mem_torsionBy_iff, one_smul] at h \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nx✝ : M\nh : x✝ = 0\n⊢ x✝ ∈ ⊥\n[PROOFSTEP]\nexact h\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ torsionBySet R M Set.univ = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff, ← torsionBy_one, ← torsionBySet_singleton_eq]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ torsionBySet R M Set.univ ≤ torsionBySet R M {1}\n[PROOFSTEP]\nexact torsionBySet_le_torsionBySet_of_subset fun _ _ => trivial\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ IsTorsionBySet R M {a} ↔ IsTorsionBy R M a\n[PROOFSTEP]\nrefine' ⟨fun h x => @h _ ⟨_, Set.mem_singleton _⟩, fun h x => _⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nh : IsTorsionBy R M a\nx : M\n⊢ ∀ ⦃a_1 : ↑{a}⦄, ↑a_1 • x = 0\n[PROOFSTEP]\nrintro ⟨b, rfl : b = a⟩\n[GOAL]\ncase mk\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\nx : M\nb : R\nh : IsTorsionBy R M b\n⊢ ↑{ val := b, property := (_ : b = b) } • x = 0\n[PROOFSTEP]\nexact @h _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nh : torsionBySet R M s = ⊤\nx : M\n⊢ ∀ ⦃a : ↑s⦄, ↑a • x = 0\n[PROOFSTEP]\nrw [← mem_torsionBySet_iff, h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\nh : torsionBySet R M s = ⊤\nx : M\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ IsTorsionBy R M a ↔ torsionBy R M a = ⊤\n[PROOFSTEP]\nrw [← torsionBySet_singleton_eq, ← isTorsionBySet_singleton_iff, isTorsionBySet_iff_torsionBySet_eq_top]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommSemiring R\ninst✝¹ : AddCommMonoid M\ninst✝ : Module R M\ns : Set R\na : R\n⊢ IsTorsionBySet R M s ↔ IsTorsionBySet R M ↑(Ideal.span s)\n[PROOFSTEP]\nrw [isTorsionBySet_iff_torsionBySet_eq_top, isTorsionBySet_iff_torsionBySet_eq_top, torsionBySet_eq_torsionBySet_span]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i) = torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\ncases' S.eq_empty_or_nonempty with h h\n[GOAL]\ncase inl\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : S = ∅\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i) = torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\nsimp only [h]\n  -- Porting note: converts were not cooperating\n[GOAL]\ncase inl\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : S = ∅\n⊢ ⨆ (i : ι) (_ : i ∈ ∅), torsionBySet R M ↑(p i) = torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ ∅), p i)\n[PROOFSTEP]\nconvert iSup_emptyset (f := fun i => torsionBySet R M (p i))\n[GOAL]\ncase h.e'_2.h.e'_4.h.pq.a.a\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : S = ∅\nx✝ : ι\n⊢ x✝ ∈ ∅ ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h.e'_3\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : S = ∅\n⊢ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ ∅), p i) = ⊥\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i) = torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase inr.a\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i) ≤ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\napply iSup_le _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\n⊢ ∀ (i : ι), ⨆ (_ : i ∈ S), torsionBySet R M ↑(p i) ≤ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\nintro i\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\ni : ι\n⊢ ⨆ (_ : i ∈ S), torsionBySet R M ↑(p i) ≤ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\napply iSup_le _\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\ni : ι\n⊢ i ∈ S → torsionBySet R M ↑(p i) ≤ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\nintro is\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\ni : ι\nis : i ∈ S\n⊢ torsionBySet R M ↑(p i) ≤ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n[PROOFSTEP]\napply torsionBySet_le_torsionBySet_of_subset\n[GOAL]\ncase st\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\ni : ι\nis : i ∈ S\n⊢ ↑(⨅ (i : ι) (_ : i ∈ S), p i) ⊆ ↑(p i)\n[PROOFSTEP]\nexact (iInf_le (fun i => ⨅ _ : i ∈ S, p i) i).trans (iInf_le _ is)\n[GOAL]\ncase inr.a\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\n⊢ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i) ≤ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i)\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase inr.a\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : x ∈ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n⊢ x ∈ ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(p i)\n[PROOFSTEP]\nrw [mem_iSup_finset_iff_exists_sum]\n[GOAL]\ncase inr.a\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : x ∈ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n⊢ ∃ μ, ∑ i in S, ↑(μ i) = x\n[PROOFSTEP]\nobtain ⟨μ, hμ⟩ :=\n  (mem_iSup_finset_iff_exists_sum _ _).mp\n    ((Ideal.eq_top_iff_one _).mp <| (Ideal.iSup_iInf_eq_top_iff_pairwise h _).mpr hp)\n[GOAL]\ncase inr.a.intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : x ∈ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\n⊢ ∃ μ, ∑ i in S, ↑(μ i) = x\n[PROOFSTEP]\nrefine' ⟨fun i => ⟨(μ i : R) • x, _⟩, _⟩\n[GOAL]\ncase inr.a.intro.refine'_1\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : x ∈ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\n⊢ ↑(μ i) • x ∈ torsionBySet R M ↑(p i)\n[PROOFSTEP]\nrw [mem_torsionBySet_iff] at hx ⊢\n[GOAL]\ncase inr.a.intro.refine'_1\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\n⊢ ∀ (a : ↑↑(p i)), ↑a • ↑(μ i) • x = 0\n[PROOFSTEP]\nrintro ⟨a, ha⟩\n[GOAL]\ncase inr.a.intro.refine'_1.mk\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\n⊢ ↑{ val := a, property := ha } • ↑(μ i) • x = 0\n[PROOFSTEP]\nrw [smul_smul]\n[GOAL]\ncase inr.a.intro.refine'_1.mk\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\n⊢ (↑{ val := a, property := ha } * ↑(μ i)) • x = 0\n[PROOFSTEP]\nsuffices : a * μ i ∈ ⨅ i ∈ S, p i\n[GOAL]\ncase inr.a.intro.refine'_1.mk\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nthis : a * ↑(μ i) ∈ ⨅ (i : ι) (_ : i ∈ S), p i\n⊢ (↑{ val := a, property := ha } * ↑(μ i)) • x = 0\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\n⊢ a * ↑(μ i) ∈ ⨅ (i : ι) (_ : i ∈ S), p i\n[PROOFSTEP]\nexact hx ⟨_, this⟩\n[GOAL]\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\n⊢ a * ↑(μ i) ∈ ⨅ (i : ι) (_ : i ∈ S), p i\n[PROOFSTEP]\nrw [mem_iInf]\n[GOAL]\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\n⊢ ∀ (i_1 : ι), a * ↑(μ i) ∈ ⨅ (_ : i_1 ∈ S), p i_1\n[PROOFSTEP]\nintro j\n[GOAL]\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\n⊢ a * ↑(μ i) ∈ ⨅ (_ : j ∈ S), p j\n[PROOFSTEP]\nrw [mem_iInf]\n[GOAL]\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\n⊢ j ∈ S → a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nintro hj\n[GOAL]\ncase this\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\n⊢ a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nby_cases ij : j = i\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\nij : j = i\n⊢ a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nrw [ij]\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\nij : j = i\n⊢ a * ↑(μ i) ∈ p i\n[PROOFSTEP]\nexact Ideal.mul_mem_right _ _ ha\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\nij : ¬j = i\n⊢ a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nhave := coe_mem (μ i)\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\nij : ¬j = i\nthis : ↑(μ i) ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j\n⊢ a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nsimp only [mem_iInf] at this \n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na✝ : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : ∀ (a : ↑↑(⨅ (i : ι) (_ : i ∈ S), p i)), ↑a • x = 0\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\ni : ι\na : R\nha : a ∈ ↑(p i)\nj : ι\nhj : j ∈ S\nij : ¬j = i\nthis : ∀ (i_1 : ι), i_1 ∈ S → i_1 ≠ i → ↑(μ i) ∈ p i_1\n⊢ a * ↑(μ i) ∈ p j\n[PROOFSTEP]\nexact Ideal.mul_mem_left _ _ (this j hj ij)\n[GOAL]\ncase inr.a.intro.refine'_2\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nh : Finset.Nonempty S\nx : M\nhx : x ∈ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\nμ : (i : ι) → { x // x ∈ ⨅ (j : ι) (_ : j ∈ S) (_ : j ≠ i), p j }\nhμ : ∑ i in S, ↑(μ i) = 1\n⊢ ∑ i in S, ↑((fun i => { val := ↑(μ i) • x, property := (_ : ↑(μ i) • x ∈ torsionBySet R M ↑(p i)) }) i) = x\n[PROOFSTEP]\nrw [← Finset.sum_smul, hμ, one_smul]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\n⊢ Disjoint ((fun i => torsionBySet R M ↑(p i)) i) (Finset.sup T fun i => torsionBySet R M ↑(p i))\n[PROOFSTEP]\nrw [disjoint_iff, Finset.sup_eq_iSup,\n  iSup_torsionBySet_ideal_eq_torsionBySet_iInf fun i hi j hj ij => hp (hT hi) (hT hj) ij]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\n⊢ (fun i => torsionBySet R M ↑(p i)) i ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i) = ⊥\n[PROOFSTEP]\nhave := GaloisConnection.u_inf (b₁ := OrderDual.toDual (p i)) (b₂ := OrderDual.toDual (⨅ i ∈ T, p i)) (torsion_gc R M)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(↑OrderDual.ofDual (↑OrderDual.toDual (p i) ⊓ ↑OrderDual.toDual (⨅ (i : ι) (_ : i ∈ T), p i))) =\n    torsionBySet R M ↑(↑OrderDual.ofDual (↑OrderDual.toDual (p i))) ⊓\n      torsionBySet R M ↑(↑OrderDual.ofDual (↑OrderDual.toDual (⨅ (i : ι) (_ : i ∈ T), p i)))\n⊢ (fun i => torsionBySet R M ↑(p i)) i ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i) = ⊥\n[PROOFSTEP]\ndsimp at this ⊢\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(p i ⊔ ⨅ (i : ι) (_ : i ∈ T), p i) =\n    torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i)\n⊢ torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i) = ⊥\n[PROOFSTEP]\nrw [← this, Ideal.sup_iInf_eq_top, top_coe, torsionBySet_univ]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(p i ⊔ ⨅ (i : ι) (_ : i ∈ T), p i) =\n    torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i)\n⊢ ∀ (i_1 : ι), i_1 ∈ T → p i ⊔ p i_1 = ⊤\n[PROOFSTEP]\nintro j hj\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(p i ⊔ ⨅ (i : ι) (_ : i ∈ T), p i) =\n    torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i)\nj : ι\nhj : j ∈ T\n⊢ p i ⊔ p j = ⊤\n[PROOFSTEP]\napply hp hi (hT hj)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(p i ⊔ ⨅ (i : ι) (_ : i ∈ T), p i) =\n    torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i)\nj : ι\nhj : j ∈ T\n⊢ i ≠ j\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\ninst✝ : DecidableEq ι\nT : Finset ι\nhT : T ⊆ S\ni : ι\nhi : i ∈ S\nhiT : ¬i ∈ T\nthis :\n  torsionBySet R M ↑(p i ⊔ ⨅ (i : ι) (_ : i ∈ T), p i) =\n    torsionBySet R M ↑(p i) ⊓ torsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ T), p i)\nhj : i ∈ T\n⊢ False\n[PROOFSTEP]\nexact hiT hj\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBy R M (q i) = torsionBy R M (∏ i in S, q i)\n[PROOFSTEP]\nrw [← torsionBySet_span_singleton_eq, Ideal.submodule_span_eq, ← Ideal.finset_inf_span_singleton _ _ hq,\n  Finset.inf_eq_iInf, ← iSup_torsionBySet_ideal_eq_torsionBySet_iInf]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ ⨆ (i : ι) (_ : i ∈ S), torsionBy R M (q i) = ⨆ (i : ι) (_ : i ∈ S), torsionBySet R M ↑(Ideal.span {q i})\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ (fun i => ⨆ (_ : i ∈ S), torsionBy R M (q i)) = fun i => ⨆ (_ : i ∈ S), torsionBySet R M ↑(Ideal.span {q i})\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\next : 1\n[GOAL]\ncase e_s.h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\nx✝ : ι\n⊢ ⨆ (_ : x✝ ∈ S), torsionBy R M (q x✝) = ⨆ (_ : x✝ ∈ S), torsionBySet R M ↑(Ideal.span {q x✝})\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_s.h.e_s\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\nx✝ : ι\n⊢ (fun h => torsionBy R M (q x✝)) = fun h => torsionBySet R M ↑(Ideal.span {q x✝})\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\next : 1\n[GOAL]\ncase e_s.h.e_s.h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\nx✝¹ : ι\nx✝ : x✝¹ ∈ S\n⊢ torsionBy R M (q x✝¹) = torsionBySet R M ↑(Ideal.span {q x✝¹})\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\nexact (torsionBySet_span_singleton_eq _).symm\n[GOAL]\ncase hp\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Set.Pairwise ↑S fun i j => Ideal.span {q i} ⊔ Ideal.span {q j} = ⊤\n[PROOFSTEP]\nexact fun i hi j hj ij => (Ideal.sup_eq_top_iff_isCoprime _ _).mpr (hq hi hj ij)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\n⊢ Finset.SupIndep S fun i => torsionBy R M (q i)\n[PROOFSTEP]\nconvert\n  supIndep_torsionBySet_ideal (M := M) fun i hi j hj ij => (Ideal.sup_eq_top_iff_isCoprime (q i) _).mpr <| hq hi hj ij\n[GOAL]\ncase h.e'_6.h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ns : Set R\na : R\nι : Type u_3\np : ι → Ideal R\nS : Finset ι\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\ninst✝ : DecidableEq ι\nx✝ : ι\n⊢ torsionBy R M (q x✝) = torsionBySet R M ↑(Ideal.span {q x✝})\n[PROOFSTEP]\nexact (torsionBySet_span_singleton_eq (R := R) (M := M) _).symm\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nι : Type u_3\ninst✝ : DecidableEq ι\nS : Finset ι\np : ι → Ideal R\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nhM : Module.IsTorsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n⊢ ⨆ (i : { x // x ∈ S }), torsionBySet R M ↑(p ↑i) = ⊤\n[PROOFSTEP]\napply (iSup_subtype'' ↑S fun i => torsionBySet R M <| p i).trans\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nι : Type u_3\ninst✝ : DecidableEq ι\nS : Finset ι\np : ι → Ideal R\nhp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤\nhM : Module.IsTorsionBySet R M ↑(⨅ (i : ι) (_ : i ∈ S), p i)\n⊢ ⨆ (t : ι) (_ : t ∈ ↑S), torsionBySet R M ↑(p t) = ⊤\n[PROOFSTEP]\napply (iSup_torsionBySet_ideal_eq_torsionBySet_iInf hp).trans <| (Module.isTorsionBySet_iff_torsionBySet_eq_top _).mp hM\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nι : Type u_3\ninst✝ : DecidableEq ι\nS : Finset ι\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\nhM : Module.IsTorsionBy R M (∏ i in S, q i)\n⊢ DirectSum.IsInternal fun i => torsionBy R M (q ↑i)\n[PROOFSTEP]\nrw [← Module.isTorsionBySet_span_singleton_iff, Ideal.submodule_span_eq, ← Ideal.finset_inf_span_singleton _ _ hq,\n  Finset.inf_eq_iInf] at hM \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nι : Type u_3\ninst✝ : DecidableEq ι\nS : Finset ι\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\nhM : Module.IsTorsionBySet R M ↑(⨅ (a : ι) (_ : a ∈ S), Ideal.span {q a})\n⊢ DirectSum.IsInternal fun i => torsionBy R M (q ↑i)\n[PROOFSTEP]\nconvert torsionBySet_isInternal (fun i hi j hj ij => (Ideal.sup_eq_top_iff_isCoprime (q i) _).mpr <| hq hi hj ij) hM\n[GOAL]\ncase h.e'_8.h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommRing R\ninst✝² : AddCommGroup M\ninst✝¹ : Module R M\nι : Type u_3\ninst✝ : DecidableEq ι\nS : Finset ι\nq : ι → R\nhq : Set.Pairwise (↑S) (IsCoprime on q)\nhM : Module.IsTorsionBySet R M ↑(⨅ (a : ι) (_ : a ∈ S), Ideal.span {q a})\nx✝ : { x // x ∈ S }\n⊢ torsionBy R M (q ↑x✝) = torsionBySet R M ↑(Ideal.span {q ↑x✝})\n[PROOFSTEP]\nexact (torsionBySet_span_singleton_eq _ (R := R) (M := M)).symm\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nb : R ⧸ I\nx : M\nb₁ b₂ : R\nh : Setoid.r b₁ b₂\n⊢ b₁ • x = b₂ • x\n[PROOFSTEP]\nhave : (-b₁ + b₂) • x = 0 := @hM x ⟨_, QuotientAddGroup.leftRel_apply.mp h⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nb : R ⧸ I\nx : M\nb₁ b₂ : R\nh : Setoid.r b₁ b₂\nthis : (-b₁ + b₂) • x = 0\n⊢ b₁ • x = b₂ • x\n[PROOFSTEP]\nrw [add_smul, neg_smul, neg_add_eq_zero] at this \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nb : R ⧸ I\nx : M\nb₁ b₂ : R\nh : Setoid.r b₁ b₂\nthis : b₁ • x = b₂ • x\n⊢ b₁ • x = b₂ • x\n[PROOFSTEP]\nexact this\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nx : M ⧸ I • ⊤\nr : ↑↑I\n⊢ ↑r • x = 0\n[PROOFSTEP]\ninduction x using Quotient.inductionOn\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nr : ↑↑I\na✝ : M\n⊢ ↑r • Quotient.mk (Submodule.quotientRel (I • ⊤)) a✝ = 0\n[PROOFSTEP]\nrefine' (Submodule.Quotient.mk_eq_zero _).mpr (Submodule.smul_mem_smul r.prop _)\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nI : Ideal R\nhM : IsTorsionBySet R M ↑I\nr : ↑↑I\na✝ : M\n⊢ a✝ ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\ns : S\nx : { x // x ∈ torsion' R M S }\n⊢ s • ↑x ∈ torsion' R M S\n[PROOFSTEP]\nobtain ⟨x, a, h⟩ := x\n[GOAL]\ncase mk.intro\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\ns : S\nx : M\na : S\nh : a • x = 0\n⊢ s • ↑{ val := x, property := (_ : ∃ a, a • x = 0) } ∈ torsion' R M S\n[PROOFSTEP]\nuse a\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\ns : S\nx : M\na : S\nh : a • x = 0\n⊢ a • s • ↑{ val := x, property := (_ : ∃ a, a • x = 0) } = 0\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\ns : S\nx : M\na : S\nh : a • x = 0\n⊢ a • s • x = 0\n[PROOFSTEP]\nrw [smul_comm, h, smul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\nh : torsion' R M S = ⊤\nx : M\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nrw [← @mem_torsion'_iff R, h]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁵ : CommSemiring R\ninst✝⁴ : AddCommMonoid M\ninst✝³ : Module R M\nS : Type u_3\ninst✝² : CommMonoid S\ninst✝¹ : DistribMulAction S M\ninst✝ : SMulCommClass S R M\nh : torsion' R M S = ⊤\nx : M\n⊢ x ∈ ⊤\n[PROOFSTEP]\ntrivial\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\n⊢ ↑(annihilator ⊤) ∩ ↑R⁰ ≠ ∅\n[PROOFSTEP]\nobtain ⟨S, hS⟩ := ‹Module.Finite R M›.out\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\nS : Finset M\nhS : span R ↑S = ⊤\n⊢ ↑(annihilator ⊤) ∩ ↑R⁰ ≠ ∅\n[PROOFSTEP]\nrefine' Set.Nonempty.ne_empty ⟨_, _, (∏ x in S, (@hM x).choose : R⁰).prop⟩\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\nS : Finset M\nhS : span R ↑S = ⊤\n⊢ ↑(∏ x in S, Exists.choose (_ : ∃ a, a • x = 0)) ∈ ↑(annihilator ⊤)\n[PROOFSTEP]\nrw [Submonoid.coe_finset_prod, SetLike.mem_coe, ← hS, mem_annihilator_span]\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\nS : Finset M\nhS : span R ↑S = ⊤\n⊢ ∀ (n : ↑↑S), (∏ i in S, ↑(Exists.choose (_ : ∃ a, a • i = 0))) • ↑n = 0\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\nS : Finset M\nhS : span R ↑S = ⊤\nn : ↑↑S\n⊢ (∏ i in S, ↑(Exists.choose (_ : ∃ a, a • i = 0))) • ↑n = 0\n[PROOFSTEP]\nletI := Classical.decEq M\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : Module.Finite R M\nhM : Module.IsTorsion R M\nS : Finset M\nhS : span R ↑S = ⊤\nn : ↑↑S\nthis : DecidableEq M := Classical.decEq M\n⊢ (∏ i in S, ↑(Exists.choose (_ : ∃ a, a • i = 0))) • ↑n = 0\n[PROOFSTEP]\nrw [← Finset.prod_erase_mul _ _ n.prop, mul_smul, ← Submonoid.smul_def, (@hM n).choose_spec, smul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\n⊢ ↑(torsion R M) = {x | annihilator (span R {x}) ≠ ⊥}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nx : M\n⊢ x ∈ ↑(torsion R M) ↔ x ∈ {x | annihilator (span R {x}) ≠ ⊥}\n[PROOFSTEP]\nsimp_rw [Submodule.ne_bot_iff, mem_annihilator, mem_span_singleton]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nx : M\n⊢ x ∈ ↑(torsion R M) ↔ x ∈ {x | ∃ x_1, (∀ (n : M), (∃ a, a • x = n) → x_1 • n = 0) ∧ x_1 ≠ 0}\n[PROOFSTEP]\nexact\n  ⟨fun ⟨a, hax⟩ =>\n    ⟨a, fun _ ⟨b, hb⟩ => by rw [← hb, smul_comm, ← Submonoid.smul_def, hax, smul_zero], nonZeroDivisors.coe_ne_zero _⟩,\n    fun ⟨a, hax, ha⟩ => ⟨⟨_, mem_nonZeroDivisors_of_ne_zero ha⟩, hax x ⟨1, one_smul _ _⟩⟩⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nx : M\nx✝² : x ∈ ↑(torsion R M)\na : { x // x ∈ R⁰ }\nhax : a • x = 0\nx✝¹ : M\nx✝ : ∃ a, a • x = x✝¹\nb : R\nhb : b • x = x✝¹\n⊢ ↑a • x✝¹ = 0\n[PROOFSTEP]\nrw [← hb, smul_comm, ← Submonoid.smul_def, hax, smul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\n⊢ NoZeroSMulDivisors R M ↔ torsion R M = ⊥\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\n⊢ NoZeroSMulDivisors R M → torsion R M = ⊥\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\n⊢ torsion R M = ⊥ → NoZeroSMulDivisors R M\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : NoZeroSMulDivisors R M\n⊢ torsion R M = ⊥\n[PROOFSTEP]\nhaveI : NoZeroSMulDivisors R M := h\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\n⊢ torsion R M = ⊥\n[PROOFSTEP]\nrw [eq_bot_iff]\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\n⊢ torsion R M ≤ ⊥\n[PROOFSTEP]\nrintro x ⟨a, hax⟩\n[GOAL]\ncase mp.intro\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\nx : M\na : { x // x ∈ R⁰ }\nhax : a • x = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nchange (a : R) • x = 0 at hax \n[GOAL]\ncase mp.intro\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\nx : M\na : { x // x ∈ R⁰ }\nhax : ↑a • x = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\ncases' eq_zero_or_eq_zero_of_smul_eq_zero hax with h0 h0\n[GOAL]\ncase mp.intro.inl\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\nx : M\na : { x // x ∈ R⁰ }\nhax : ↑a • x = 0\nh0 : ↑a = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase mp.intro.inl.h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\nx : M\na : { x // x ∈ R⁰ }\nhax : ↑a • x = 0\nh0 : ↑a = 0\n⊢ False\n[PROOFSTEP]\nexact nonZeroDivisors.coe_ne_zero a h0\n[GOAL]\ncase mp.intro.inr\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh this : NoZeroSMulDivisors R M\nx : M\na : { x // x ∈ R⁰ }\nhax : ↑a • x = 0\nh0 : x = 0\n⊢ x ∈ ⊥\n[PROOFSTEP]\nexact h0\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\n⊢ NoZeroSMulDivisors R M\n[PROOFSTEP]\nexact\n  {\n    eq_zero_or_eq_zero_of_smul_eq_zero := fun {a} {x} hax =>\n      by\n      by_cases ha : a = 0\n      · left\n        exact ha\n      · right\n        rw [← mem_bot R, ← h]\n        exact ⟨⟨a, mem_nonZeroDivisors_of_ne_zero ha⟩, hax⟩ }\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\n⊢ a = 0 ∨ x = 0\n[PROOFSTEP]\nby_cases ha : a = 0\n[GOAL]\ncase pos\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\nha : a = 0\n⊢ a = 0 ∨ x = 0\n[PROOFSTEP]\nleft\n[GOAL]\ncase pos.h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\nha : a = 0\n⊢ a = 0\n[PROOFSTEP]\nexact ha\n[GOAL]\ncase neg\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\nha : ¬a = 0\n⊢ a = 0 ∨ x = 0\n[PROOFSTEP]\nright\n[GOAL]\ncase neg.h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\nha : ¬a = 0\n⊢ x = 0\n[PROOFSTEP]\nrw [← mem_bot R, ← h]\n[GOAL]\ncase neg.h\nR : Type u_1\nM : Type u_2\ninst✝⁴ : CommSemiring R\ninst✝³ : AddCommMonoid M\ninst✝² : Module R M\ninst✝¹ : NoZeroDivisors R\ninst✝ : Nontrivial R\nh : torsion R M = ⊥\na : R\nx : M\nhax : a • x = 0\nha : ¬a = 0\n⊢ x ∈ torsion R M\n[PROOFSTEP]\nexact ⟨⟨a, mem_nonZeroDivisors_of_ne_zero ha⟩, hax⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nz : M ⧸ torsion R M\nx : M\nx✝ : Quotient.mk'' x ∈ torsion R (M ⧸ torsion R M)\na : { x // x ∈ R⁰ }\nhax : a • Quotient.mk'' x = 0\n⊢ Quotient.mk'' x ∈ ⊥\n[PROOFSTEP]\nrw [Quotient.mk''_eq_mk, ← Quotient.mk_smul, Quotient.mk_eq_zero] at hax \n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nz : M ⧸ torsion R M\nx : M\nx✝ : Quotient.mk'' x ∈ torsion R (M ⧸ torsion R M)\na : { x // x ∈ R⁰ }\nhax : a • x ∈ torsion R M\n⊢ Quotient.mk'' x ∈ ⊥\n[PROOFSTEP]\nrw [mem_bot, Quotient.mk''_eq_mk, Quotient.mk_eq_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nz : M ⧸ torsion R M\nx : M\nx✝ : Quotient.mk'' x ∈ torsion R (M ⧸ torsion R M)\na : { x // x ∈ R⁰ }\nhax : a • x ∈ torsion R M\n⊢ x ∈ torsion R M\n[PROOFSTEP]\ncases' hax with b h\n[GOAL]\ncase intro\nR : Type u_1\nM : Type u_2\ninst✝² : CommRing R\ninst✝¹ : AddCommGroup M\ninst✝ : Module R M\nz : M ⧸ torsion R M\nx : M\nx✝ : Quotient.mk'' x ∈ torsion R (M ⧸ torsion R M)\na b : { x // x ∈ R⁰ }\nh : b • a • x = 0\n⊢ x ∈ torsion R M\n[PROOFSTEP]\nexact ⟨b * a, (mul_smul _ _ _).trans h⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\n⊢ IsTorsion' M { x // x ∈ Submonoid.powers p } ↔ ∀ (x : M), ∃ n, p ^ n • x = 0\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\n⊢ IsTorsion' M { x // x ∈ Submonoid.powers p } → ∀ (x : M), ∃ n, p ^ n • x = 0\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : IsTorsion' M { x // x ∈ Submonoid.powers p }\nx : M\n⊢ ∃ n, p ^ n • x = 0\n[PROOFSTEP]\nlet ⟨⟨a, ⟨n, hn⟩⟩, hx⟩ := @h x\n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : IsTorsion' M { x // x ∈ Submonoid.powers p }\nx : M\na : R\nn : ℕ\nhn : (fun x x_1 => x ^ x_1) p n = a\nhx : { val := a, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) p y = a) } • x = 0\n⊢ ∃ n, p ^ n • x = 0\n[PROOFSTEP]\ndsimp at hn \n[GOAL]\ncase mp\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : IsTorsion' M { x // x ∈ Submonoid.powers p }\nx : M\na : R\nn : ℕ\nhn : p ^ n = a\nhx : { val := a, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) p y = a) } • x = 0\n⊢ ∃ n, p ^ n • x = 0\n[PROOFSTEP]\nuse n\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : IsTorsion' M { x // x ∈ Submonoid.powers p }\nx : M\na : R\nn : ℕ\nhn : p ^ n = a\nhx : { val := a, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) p y = a) } • x = 0\n⊢ p ^ n • x = 0\n[PROOFSTEP]\nrw [hn]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : IsTorsion' M { x // x ∈ Submonoid.powers p }\nx : M\na : R\nn : ℕ\nhn : p ^ n = a\nhx : { val := a, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) p y = a) } • x = 0\n⊢ a • x = 0\n[PROOFSTEP]\napply hx\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\n⊢ (∀ (x : M), ∃ n, p ^ n • x = 0) → IsTorsion' M { x // x ∈ Submonoid.powers p }\n[PROOFSTEP]\nintro h x\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : ∀ (x : M), ∃ n, p ^ n • x = 0\nx : M\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nlet ⟨n, hn⟩ := h x\n[GOAL]\ncase mpr\nR : Type u_1\nM : Type u_2\ninst✝² : Monoid R\ninst✝¹ : AddCommMonoid M\ninst✝ : DistribMulAction R M\np : R\nh : ∀ (x : M), ∃ n, p ^ n • x = 0\nx : M\nn : ℕ\nhn : p ^ n • x = 0\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nexact ⟨⟨_, ⟨n, rfl⟩⟩, hn⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\n⊢ ∃ j, IsTorsionBy R M (p ^ pOrder hM (s j))\n[PROOFSTEP]\nlet oj := List.argmax (fun i => pOrder hM <| s i) (List.finRange d)\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\n⊢ ∃ j, IsTorsionBy R M (p ^ pOrder hM (s j))\n[PROOFSTEP]\nhave hoj : oj.isSome :=\n  Option.ne_none_iff_isSome.mp fun eq_none => hd <| List.finRange_eq_nil.mp <| List.argmax_eq_none.mp eq_none\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\n⊢ ∃ j, IsTorsionBy R M (p ^ pOrder hM (s j))\n[PROOFSTEP]\nuse Option.get _ hoj\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\n⊢ IsTorsionBy R M (p ^ pOrder hM (s (Option.get oj hoj)))\n[PROOFSTEP]\nrw [isTorsionBy_iff_torsionBy_eq_top, eq_top_iff, ← hs, Submodule.span_le, Set.range_subset_iff]\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\n⊢ ∀ (y : Fin d), s y ∈ ↑(torsionBy R M (p ^ pOrder hM (s (Option.get oj hoj))))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\ni : Fin d\n⊢ s i ∈ ↑(torsionBy R M (p ^ pOrder hM (s (Option.get oj hoj))))\n[PROOFSTEP]\nchange (p ^ pOrder hM (s (Option.get oj hoj))) • s i = 0\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\ni : Fin d\n⊢ p ^ pOrder hM (s (Option.get oj hoj)) • s i = 0\n[PROOFSTEP]\nhave : pOrder hM (s i) ≤ pOrder hM (s <| Option.get _ hoj) :=\n  List.le_of_mem_argmax (List.mem_finRange i) (Option.get_mem hoj)\n[GOAL]\ncase h\nR : Type u_1\nM : Type u_2\ninst✝³ : CommSemiring R\ninst✝² : AddCommMonoid M\ninst✝¹ : Module R M\ninst✝ : (x : M) → Decidable (x = 0)\np : R\nhM : IsTorsion' M { x // x ∈ Submonoid.powers p }\nd : ℕ\nhd : d ≠ 0\ns : Fin d → M\nhs : span R (Set.range s) = ⊤\noj : Option (Fin d) := List.argmax (fun i => pOrder hM (s i)) (List.finRange d)\nhoj : Option.isSome oj = true\ni : Fin d\nthis : pOrder hM (s i) ≤ pOrder hM (s (Option.get oj hoj))\n⊢ p ^ pOrder hM (s (Option.get oj hoj)) • s i = 0\n[PROOFSTEP]\nrw [← Nat.sub_add_cancel this, pow_add, mul_smul, pow_pOrder_smul, smul_zero]\n[GOAL]\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\n⊢ torsionBy R (R ⧸ Submodule.span R {a * b}) a = Submodule.span R {↑(mk (Submodule.span R {a * b})) b}\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R ⧸ Submodule.span R {a * b}\n⊢ x ∈ torsionBy R (R ⧸ Submodule.span R {a * b}) a ↔ x ∈ Submodule.span R {↑(mk (Submodule.span R {a * b})) b}\n[PROOFSTEP]\nrw [mem_torsionBy_iff, Submodule.mem_span_singleton]\n[GOAL]\ncase h\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R ⧸ Submodule.span R {a * b}\n⊢ a • x = 0 ↔ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = x\n[PROOFSTEP]\nobtain ⟨x, rfl⟩ := mk_surjective x\n[GOAL]\ncase h.intro\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\n⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0 ↔\n    ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase h.intro.mp\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\n⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0 →\n    ∃ a_2, a_2 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.intro.mpr\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\n⊢ (∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x) →\n    a • ↑(mk (Submodule.span R {a * b})) x = 0\n[PROOFSTEP]\nintro h\n[GOAL]\ncase h.intro.mp\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\nh : a • ↑(mk (Submodule.span R {a * b})) x = 0\n⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nrw [← mk_eq_mk, ← Quotient.mk_smul, Quotient.mk_eq_zero, Submodule.mem_span_singleton] at h \n[GOAL]\ncase h.intro.mp\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\nh : ∃ a_1, a_1 • (a * b) = a • x\n⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nobtain ⟨c, h⟩ := h\n[GOAL]\ncase h.intro.mp.intro\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx c : R\nh : c • (a * b) = a • x\n⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nrw [smul_eq_mul, smul_eq_mul, mul_comm, mul_assoc, mul_cancel_left_mem_nonZeroDivisors ha, mul_comm] at h \n[GOAL]\ncase h.intro.mp.intro\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx c : R\nh : c * b = x\n⊢ ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nuse c\n[GOAL]\ncase h\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx c : R\nh : c * b = x\n⊢ c • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n[PROOFSTEP]\nrw [← h, ← mk_eq_mk, ← Quotient.mk_smul, smul_eq_mul, mk_eq_mk]\n[GOAL]\ncase h.intro.mpr\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx : R\nh : ∃ a_1, a_1 • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0\n[PROOFSTEP]\nobtain ⟨c, h⟩ := h\n[GOAL]\ncase h.intro.mpr.intro\nR✝ : Type u_1\nM : Type u_2\nR : Type w\ninst✝ : CommRing R\na b : R\nha : a ∈ R⁰\nx c : R\nh : c • ↑(mk (Submodule.span R {a * b})) b = ↑(mk (Submodule.span R {a * b})) x\n⊢ a • ↑(mk (Submodule.span R {a * b})) x = 0\n[PROOFSTEP]\nrw [← h, smul_comm, ← mk_eq_mk, ← Quotient.mk_smul, (Quotient.mk_eq_zero _).mpr <| mem_span_singleton_self _, smul_zero]\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\n⊢ IsTorsion M ↔ Module.IsTorsion ℕ M\n[PROOFSTEP]\nrefine' ⟨fun h x => _, fun h x => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\nh : IsTorsion M\nx : M\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nobtain ⟨n, h0, hn⟩ := (isOfFinAddOrder_iff_nsmul_eq_zero x).mp (h x)\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\nh : IsTorsion M\nx : M\nn : ℕ\nh0 : 0 < n\nhn : n • x = 0\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nexact ⟨⟨n, mem_nonZeroDivisors_of_ne_zero <| ne_of_gt h0⟩, hn⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\nh : Module.IsTorsion ℕ M\nx : M\n⊢ IsOfFinAddOrder x\n[PROOFSTEP]\nrw [isOfFinAddOrder_iff_nsmul_eq_zero]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\nh : Module.IsTorsion ℕ M\nx : M\n⊢ ∃ n, 0 < n ∧ n • x = 0\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := @h x\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommMonoid M\nh : Module.IsTorsion ℕ M\nx : M\nn : { x // x ∈ ℕ⁰ }\nhn : n • x = 0\n⊢ ∃ n, 0 < n ∧ n • x = 0\n[PROOFSTEP]\nrefine' ⟨n, Nat.pos_of_ne_zero (nonZeroDivisors.coe_ne_zero _), hn⟩\n[GOAL]\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\n⊢ IsTorsion M ↔ Module.IsTorsion ℤ M\n[PROOFSTEP]\nrefine' ⟨fun h x => _, fun h x => _⟩\n[GOAL]\ncase refine'_1\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\nh : IsTorsion M\nx : M\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nobtain ⟨n, h0, hn⟩ := (isOfFinAddOrder_iff_nsmul_eq_zero x).mp (h x)\n[GOAL]\ncase refine'_1.intro.intro\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\nh : IsTorsion M\nx : M\nn : ℕ\nh0 : 0 < n\nhn : n • x = 0\n⊢ ∃ a, a • x = 0\n[PROOFSTEP]\nexact ⟨⟨n, mem_nonZeroDivisors_of_ne_zero <| ne_of_gt <| Int.coe_nat_pos.mpr h0⟩, (coe_nat_zsmul _ _).trans hn⟩\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\nh : Module.IsTorsion ℤ M\nx : M\n⊢ IsOfFinAddOrder x\n[PROOFSTEP]\nrw [isOfFinAddOrder_iff_nsmul_eq_zero]\n[GOAL]\ncase refine'_2\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\nh : Module.IsTorsion ℤ M\nx : M\n⊢ ∃ n, 0 < n ∧ n • x = 0\n[PROOFSTEP]\nobtain ⟨n, hn⟩ := @h x\n[GOAL]\ncase refine'_2.intro\nR : Type u_1\nM : Type u_2\ninst✝ : AddCommGroup M\nh : Module.IsTorsion ℤ M\nx : M\nn : { x // x ∈ ℤ⁰ }\nhn : n • x = 0\n⊢ ∃ n, 0 < n ∧ n • x = 0\n[PROOFSTEP]\nexact exists_nsmul_eq_zero_of_zsmul_eq_zero (nonZeroDivisors.coe_ne_zero n) hn\n", "meta": {"mathlib_filename": "Mathlib.Algebra.Module.Torsion", "llama_tokens": 37402, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5698526660244838, "lm_q2_score": 0.4493926344647597, "lm_q1q2_score": 0.2560875908415096}}
{"text": "[GOAL]\nα β : NonemptyFinLinOrdCat\ne : ↑α ≃o ↑β\n⊢ ↑e ≫ ↑(OrderIso.symm e) = 𝟙 α\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : NonemptyFinLinOrdCat\ne : ↑α ≃o ↑β\nx : (forget NonemptyFinLinOrdCat).obj α\n⊢ ↑(↑e ≫ ↑(OrderIso.symm e)) x = ↑(𝟙 α) x\n[PROOFSTEP]\nexact e.symm_apply_apply x\n[GOAL]\nα β : NonemptyFinLinOrdCat\ne : ↑α ≃o ↑β\n⊢ ↑(OrderIso.symm e) ≫ ↑e = 𝟙 β\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nα β : NonemptyFinLinOrdCat\ne : ↑α ≃o ↑β\nx : (forget NonemptyFinLinOrdCat).obj β\n⊢ ↑(↑(OrderIso.symm e) ≫ ↑e) x = ↑(𝟙 β) x\n[PROOFSTEP]\nexact e.apply_symm_apply x\n[GOAL]\nA B : NonemptyFinLinOrdCat\nx✝¹ x✝ : A ⟶ B\nh :\n  (fun f =>\n        ↑(let_fun this := f;\n          this))\n      x✝¹ =\n    (fun f =>\n        ↑(let_fun this := f;\n          this))\n      x✝\n⊢ x✝¹ = x✝\n[PROOFSTEP]\next x\n[GOAL]\ncase w\nA B : NonemptyFinLinOrdCat\nx✝¹ x✝ : A ⟶ B\nh :\n  (fun f =>\n        ↑(let_fun this := f;\n          this))\n      x✝¹ =\n    (fun f =>\n        ↑(let_fun this := f;\n          this))\n      x✝\nx : (forget NonemptyFinLinOrdCat).obj A\n⊢ ↑x✝¹ x = ↑x✝ x\n[PROOFSTEP]\nexact congr_fun h x\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\n⊢ Mono f ↔ Function.Injective ↑f\n[PROOFSTEP]\nrefine' ⟨_, ConcreteCategory.mono_of_injective f⟩\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\n⊢ Mono f → Function.Injective ↑f\n[PROOFSTEP]\nintro\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\n⊢ Function.Injective ↑f\n[PROOFSTEP]\nintro a₁ a₂ h\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\n⊢ a₁ = a₂\n[PROOFSTEP]\nlet X := NonemptyFinLinOrdCat.of (ULift (Fin 1))\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\n⊢ a₁ = a₂\n[PROOFSTEP]\nlet g₁ : X ⟶ A := ⟨fun _ => a₁, fun _ _ _ => by rfl⟩\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\nx✝² x✝¹ : ↑X\nx✝ : x✝² ≤ x✝¹\n⊢ (fun x => a₁) x✝² ≤ (fun x => a₁) x✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\n⊢ a₁ = a₂\n[PROOFSTEP]\nlet g₂ : X ⟶ A := ⟨fun _ => a₂, fun _ _ _ => by rfl⟩\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\nx✝² x✝¹ : ↑X\nx✝ : x✝² ≤ x✝¹\n⊢ (fun x => a₂) x✝² ≤ (fun x => a₂) x✝¹\n[PROOFSTEP]\nrfl\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\n⊢ a₁ = a₂\n[PROOFSTEP]\nchange g₁ (ULift.up (0 : Fin 1)) = g₂ (ULift.up (0 : Fin 1))\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\n⊢ ↑g₁ { down := 0 } = ↑g₂ { down := 0 }\n[PROOFSTEP]\nhave eq : g₁ ≫ f = g₂ ≫ f := by\n  ext\n  exact h\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\n⊢ g₁ ≫ f = g₂ ≫ f\n[PROOFSTEP]\next\n[GOAL]\ncase w\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\nx✝ : (forget NonemptyFinLinOrdCat).obj X\n⊢ ↑(g₁ ≫ f) x✝ = ↑(g₂ ≫ f) x✝\n[PROOFSTEP]\nexact h\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\neq : g₁ ≫ f = g₂ ≫ f\n⊢ ↑g₁ { down := 0 } = ↑g₂ { down := 0 }\n[PROOFSTEP]\nrw [cancel_mono] at eq \n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Mono f\na₁ a₂ : ↑A\nh : ↑f a₁ = ↑f a₂\nX : NonemptyFinLinOrdCat := of (ULift (Fin 1))\ng₁ : X ⟶ A := { toFun := fun x => a₁, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₁) x ≤ (fun x => a₁) x) }\ng₂ : X ⟶ A := { toFun := fun x => a₂, monotone' := (_ : ∀ (x x_1 : ↑X), x ≤ x_1 → (fun x => a₂) x ≤ (fun x => a₂) x) }\neq : g₁ = g₂\n⊢ ↑g₁ { down := 0 } = ↑g₂ { down := 0 }\n[PROOFSTEP]\nrw [eq]\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\n⊢ Epi f ↔ Function.Surjective ↑f\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\n⊢ Epi f → Function.Surjective ↑f\n[PROOFSTEP]\nintro\n[GOAL]\ncase mp\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\n⊢ Function.Surjective ↑f\n[PROOFSTEP]\ndsimp only [Function.Surjective]\n[GOAL]\ncase mp\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\n⊢ ∀ (b : ↑B), ∃ a, ↑f a = b\n[PROOFSTEP]\nby_contra' hf'\n[GOAL]\ncase mp\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nhf' : ∃ b, ∀ (a : ↑A), ↑f a ≠ b\n⊢ False\n[PROOFSTEP]\nrcases hf' with ⟨m, hm⟩\n[GOAL]\ncase mp.intro\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\n⊢ False\n[PROOFSTEP]\nlet Y := NonemptyFinLinOrdCat.of (ULift (Fin 2))\n[GOAL]\ncase mp.intro\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\n⊢ False\n[PROOFSTEP]\nlet p₁ : B ⟶ Y :=\n  ⟨fun b => if b < m then ULift.up 0 else ULift.up 1, fun x₁ x₂ h =>\n    by\n    simp only\n    split_ifs with h₁ h₂ h₂\n    any_goals apply Fin.zero_le\n    · exfalso\n      exact h₁ (lt_of_le_of_lt h h₂)\n    · rfl⟩\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\n⊢ (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n    (fun b => if b < m then { down := 0 } else { down := 1 }) x₂\n[PROOFSTEP]\nsimp only\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\n⊢ (if x₁ < m then { down := 0 } else { down := 1 }) ≤ if x₂ < m then { down := 0 } else { down := 1 }\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ < m\nh₂ : x₂ < m\n⊢ { down := 0 } ≤ { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ < m\nh₂ : ¬x₂ < m\n⊢ { down := 0 } ≤ { down := 1 }\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : x₂ < m\n⊢ { down := 1 } ≤ { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : ¬x₂ < m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\nany_goals apply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ < m\nh₂ : x₂ < m\n⊢ { down := 0 } ≤ { down := 0 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ < m\nh₂ : ¬x₂ < m\n⊢ { down := 0 } ≤ { down := 1 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : x₂ < m\n⊢ { down := 1 } ≤ { down := 0 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : ¬x₂ < m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : x₂ < m\n⊢ { down := 1 } ≤ { down := 0 }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : x₂ < m\n⊢ False\n[PROOFSTEP]\nexact h₁ (lt_of_le_of_lt h h₂)\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ < m\nh₂ : ¬x₂ < m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.intro\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\n⊢ False\n[PROOFSTEP]\nlet p₂ : B ⟶ Y :=\n  ⟨fun b => if b ≤ m then ULift.up 0 else ULift.up 1, fun x₁ x₂ h =>\n    by\n    simp only\n    split_ifs with h₁ h₂ h₂\n    any_goals apply Fin.zero_le\n    · exfalso\n      exact h₁ (h.trans h₂)\n    · rfl⟩\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\n⊢ (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n    (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂\n[PROOFSTEP]\nsimp only\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\n⊢ (if x₁ ≤ m then { down := 0 } else { down := 1 }) ≤ if x₂ ≤ m then { down := 0 } else { down := 1 }\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ { down := 0 } ≤ { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ ≤ m\nh₂ : ¬x₂ ≤ m\n⊢ { down := 0 } ≤ { down := 1 }\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : ¬x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\nany_goals apply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ { down := 0 } ≤ { down := 0 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : x₁ ≤ m\nh₂ : ¬x₂ ≤ m\n⊢ { down := 0 } ≤ { down := 1 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 0 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : ¬x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\napply Fin.zero_le\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 0 }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : x₂ ≤ m\n⊢ False\n[PROOFSTEP]\nexact h₁ (h.trans h₂)\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\nx₁ x₂ : ↑B\nh : x₁ ≤ x₂\nh₁ : ¬x₁ ≤ m\nh₂ : ¬x₂ ≤ m\n⊢ { down := 1 } ≤ { down := 1 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mp.intro\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\n⊢ False\n[PROOFSTEP]\nhave h : p₁ m = p₂ m := by\n  congr\n  rw [← cancel_epi f]\n  ext a\n  simp only [coe_of, comp_apply]\n  change ite _ _ _ = ite _ _ _\n  split_ifs with h₁ h₂ h₂\n  any_goals rfl\n  · exfalso\n    exact h₂ (le_of_lt h₁)\n  · exfalso\n    exact hm a (eq_of_le_of_not_lt h₂ h₁)\n[GOAL]\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\n⊢ ↑p₁ m = ↑p₂ m\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_a\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\n⊢ p₁ = p₂\n[PROOFSTEP]\nrw [← cancel_epi f]\n[GOAL]\ncase e_a\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\n⊢ f ≫ p₁ = f ≫ p₂\n[PROOFSTEP]\next a\n[GOAL]\ncase e_a.w\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\n⊢ ↑(f ≫ p₁) a = ↑(f ≫ p₂) a\n[PROOFSTEP]\nsimp only [coe_of, comp_apply]\n[GOAL]\ncase e_a.w\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\n⊢ ↑{ toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n          monotone' :=\n            (_ :\n              ∀ (x₁ x₂ : ↑B),\n                x₁ ≤ x₂ →\n                  (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n                    (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\n      (↑f a) =\n    ↑{ toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n          monotone' :=\n            (_ :\n              ∀ (x₁ x₂ : ↑B),\n                x₁ ≤ x₂ →\n                  (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n                    (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\n      (↑f a)\n[PROOFSTEP]\nchange ite _ _ _ = ite _ _ _\n[GOAL]\ncase e_a.w\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\n⊢ (if ↑f a < m then { down := 0 } else { down := 1 }) = if ↑f a ≤ m then { down := 0 } else { down := 1 }\n[PROOFSTEP]\nsplit_ifs with h₁ h₂ h₂\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ↑f a ≤ m\n⊢ { down := 0 } = { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ { down := 0 } = { down := 1 }\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ↑f a ≤ m\n⊢ { down := 1 } = { down := 0 }\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ { down := 1 } = { down := 1 }\n[PROOFSTEP]\nany_goals rfl\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ↑f a ≤ m\n⊢ { down := 0 } = { down := 0 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ { down := 0 } = { down := 1 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ↑f a ≤ m\n⊢ { down := 1 } = { down := 0 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ { down := 1 } = { down := 1 }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ { down := 0 } = { down := 1 }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase neg.h\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ↑f a < m\nh₂ : ¬↑f a ≤ m\n⊢ False\n[PROOFSTEP]\nexact h₂ (le_of_lt h₁)\n[GOAL]\ncase pos\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ↑f a ≤ m\n⊢ { down := 1 } = { down := 0 }\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase pos.h\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\na : (forget NonemptyFinLinOrdCat).obj A\nh₁ : ¬↑f a < m\nh₂ : ↑f a ≤ m\n⊢ False\n[PROOFSTEP]\nexact hm a (eq_of_le_of_not_lt h₂ h₁)\n[GOAL]\ncase mp.intro\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\na✝ : Epi f\nm : ↑B\nhm : ∀ (a : ↑A), ↑f a ≠ m\nY : NonemptyFinLinOrdCat := of (ULift (Fin 2))\np₁ : B ⟶ Y :=\n  { toFun := fun b => if b < m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b < m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b < m then { down := 0 } else { down := 1 }) x₂) }\np₂ : B ⟶ Y :=\n  { toFun := fun b => if b ≤ m then { down := 0 } else { down := 1 },\n    monotone' :=\n      (_ :\n        ∀ (x₁ x₂ : ↑B),\n          x₁ ≤ x₂ →\n            (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₁ ≤\n              (fun b => if b ≤ m then { down := 0 } else { down := 1 }) x₂) }\nh : ↑p₁ m = ↑p₂ m\n⊢ False\n[PROOFSTEP]\nsimp [FunLike.coe] at h \n[GOAL]\ncase mpr\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\n⊢ Function.Surjective ↑f → Epi f\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nA B : NonemptyFinLinOrdCat\nf : A ⟶ B\nh : Function.Surjective ↑f\n⊢ Epi f\n[PROOFSTEP]\nexact ConcreteCategory.epi_of_surjective f h\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\n⊢ IsSplitEpi f\n[PROOFSTEP]\nhave H : ∀ y : Y, Nonempty (f ⁻¹' { y }) := by\n  rw [epi_iff_surjective] at hf \n  intro y\n  exact Nonempty.intro ⟨(hf y).choose, (hf y).choose_spec⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\n⊢ ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\n[PROOFSTEP]\nrw [epi_iff_surjective] at hf \n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Function.Surjective ↑f\n⊢ ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\n[PROOFSTEP]\nintro y\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Function.Surjective ↑f\ny : ↑Y\n⊢ Nonempty ↑(↑f ⁻¹' {y})\n[PROOFSTEP]\nexact Nonempty.intro ⟨(hf y).choose, (hf y).choose_spec⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\n⊢ IsSplitEpi f\n[PROOFSTEP]\nlet φ : Y → X := fun y => (H y).some.1\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\n⊢ IsSplitEpi f\n[PROOFSTEP]\nhave hφ : ∀ y : Y, f (φ y) = y := fun y => (H y).some.2\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\n⊢ IsSplitEpi f\n[PROOFSTEP]\nrefine' IsSplitEpi.mk' ⟨⟨φ, _⟩, _⟩\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\n⊢ Monotone φ\ncase refine'_2\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\n⊢ { toFun := φ, monotone' := ?refine'_1 } ≫ f = 𝟙 Y\n[PROOFSTEP]\nswap\n[GOAL]\ncase refine'_2\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\n⊢ { toFun := φ, monotone' := ?refine'_1 } ≫ f = 𝟙 Y\n[PROOFSTEP]\next b\n[GOAL]\ncase refine'_2.w\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\nb : (forget NonemptyFinLinOrdCat).obj Y\n⊢ ↑({ toFun := φ, monotone' := ?refine'_1 } ≫ f) b = ↑(𝟙 Y) b\n[PROOFSTEP]\napply hφ\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\n⊢ Monotone φ\n[PROOFSTEP]\nintro a b\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\n⊢ a ≤ b → φ a ≤ φ b\n[PROOFSTEP]\ncontrapose\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\n⊢ ¬φ a ≤ φ b → ¬a ≤ b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ¬φ a ≤ φ b\n⊢ ¬a ≤ b\n[PROOFSTEP]\nsimp only [not_le] at h ⊢\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {a})))\n⊢ b < a\n[PROOFSTEP]\nsuffices b ≤ a by\n  apply lt_of_le_of_ne this\n  rintro rfl\n  exfalso\n  simp at h \n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {a})))\nthis : b ≤ a\n⊢ b < a\n[PROOFSTEP]\napply lt_of_le_of_ne this\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {a})))\nthis : b ≤ a\n⊢ b ≠ a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\nb : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b})))\nthis : b ≤ b\n⊢ False\n[PROOFSTEP]\nexfalso\n[GOAL]\ncase h\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\nb : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b})))\nthis : b ≤ b\n⊢ False\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {a})))\n⊢ b ≤ a\n[PROOFSTEP]\nhave H : f (φ b) ≤ f (φ a) := f.monotone (le_of_lt h)\n[GOAL]\ncase refine'_1\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nhf : Epi f\nH✝ : ∀ (y : ↑Y), Nonempty ↑(↑f ⁻¹' {y})\nφ : ↑Y → ↑X := fun y => ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {y})))\nhφ : ∀ (y : ↑Y), ↑f (φ y) = y\na b : ↑Y\nh : ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {b}))) < ↑(Nonempty.some (_ : Nonempty ↑(↑f ⁻¹' {a})))\nH : ↑f (φ b) ≤ ↑f (φ a)\n⊢ b ≤ a\n[PROOFSTEP]\nsimpa only [hφ] using H\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nletI : NonemptyFinLinOrd (Set.image f ⊤) := ⟨by infer_instance⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\n⊢ Nonempty ↑(↑f '' ⊤)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nlet I := NonemptyFinLinOrdCat.of (Set.image f ⊤)\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nlet e : X ⟶ I := ⟨fun x => ⟨f x, ⟨x, by tauto⟩⟩, fun x₁ x₂ h => f.monotone h⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\nx : ↑X\n⊢ x ∈ ⊤ ∧ ↑f x = ↑f x\n[PROOFSTEP]\ntauto\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nlet m : I ⟶ Y := ⟨fun y => y.1, by tauto⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\n⊢ Monotone fun y => ↑y\n[PROOFSTEP]\ntauto\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nhaveI : Epi e := by\n  rw [epi_iff_surjective]\n  rintro ⟨_, y, h, rfl⟩\n  exact ⟨y, rfl⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\n⊢ Epi e\n[PROOFSTEP]\nrw [epi_iff_surjective]\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\n⊢ Function.Surjective ↑e\n[PROOFSTEP]\nrintro ⟨_, y, h, rfl⟩\n[GOAL]\ncase mk.intro.intro\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\ny : ↑X\nh : y ∈ ⊤\n⊢ ∃ a, ↑e a = { val := ↑f y, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f y) }\n[PROOFSTEP]\nexact ⟨y, rfl⟩\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis✝ : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\nthis : Epi e\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nhaveI : StrongEpi e := strongEpi_of_epi e\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis✝¹ : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\nthis✝ : Epi e\nthis : StrongEpi e\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nhaveI : Mono m := ConcreteCategory.mono_of_injective _ (fun x y h => Subtype.ext h)\n[GOAL]\nX Y : NonemptyFinLinOrdCat\nf : X ⟶ Y\nthis✝² : NonemptyFinLinOrd ↑(↑f '' ⊤) := NonemptyFinLinOrd.mk\nI : NonemptyFinLinOrdCat := of ↑(↑f '' ⊤)\ne : X ⟶ I :=\n  { toFun := fun x => { val := ↑f x, property := (_ : ∃ a, a ∈ ⊤ ∧ ↑f a = ↑f x) },\n    monotone' := (_ : ∀ (x₁ x₂ : ↑X), x₁ ≤ x₂ → ↑f x₁ ≤ ↑f x₂) }\nm : I ⟶ Y := { toFun := fun y => ↑y, monotone' := (_ : ∀ ⦃a b : ↑I⦄, a ≤ b → a ≤ b) }\nthis✝¹ : Epi e\nthis✝ : StrongEpi e\nthis : Mono m\n⊢ Nonempty (StrongEpiMonoFactorisation f)\n[PROOFSTEP]\nexact ⟨⟨I, m, e, rfl⟩⟩\n", "meta": {"mathlib_filename": "Mathlib.Order.Category.NonemptyFinLinOrdCat", "llama_tokens": 23409, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5926665855647394, "lm_q2_score": 0.4301473485858429, "lm_q1q2_score": 0.2549339603760972}}
{"text": "[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA A₁ A₂ : IndexSet Δ\nh₁ : A₁.fst = A₂.fst\n⊢ A₁.fst.unop = A₂.fst.unop\n[PROOFSTEP]\nrw [h₁]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA A₁ A₂ : IndexSet Δ\nh₁ : A₁.fst = A₂.fst\nh₂ : e A₁ ≫ eqToHom (_ : A₁.fst.unop = A₂.fst.unop) = e A₂\n⊢ A₁ = A₂\n[PROOFSTEP]\nrcases A₁ with ⟨Δ₁, ⟨α₁, hα₁⟩⟩\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA A₂ : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : Δ.unop ⟶ Δ₁.unop\nhα₁ : Epi α₁\nh₁ : { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst = A₂.fst\nh₂ :\n  e { fst := Δ₁, snd := { val := α₁, property := hα₁ } } ≫\n      eqToHom (_ : { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst.unop = A₂.fst.unop) =\n    e A₂\n⊢ { fst := Δ₁, snd := { val := α₁, property := hα₁ } } = A₂\n[PROOFSTEP]\nrcases A₂ with ⟨Δ₂, ⟨α₂, hα₂⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : Δ.unop ⟶ Δ₁.unop\nhα₁ : Epi α₁\nΔ₂ : SimplexCategoryᵒᵖ\nα₂ : Δ.unop ⟶ Δ₂.unop\nhα₂ : Epi α₂\nh₁ : { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst = { fst := Δ₂, snd := { val := α₂, property := hα₂ } }.fst\nh₂ :\n  e { fst := Δ₁, snd := { val := α₁, property := hα₁ } } ≫\n      eqToHom\n        (_ :\n          { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst.unop =\n            { fst := Δ₂, snd := { val := α₂, property := hα₂ } }.fst.unop) =\n    e { fst := Δ₂, snd := { val := α₂, property := hα₂ } }\n⊢ { fst := Δ₁, snd := { val := α₁, property := hα₁ } } = { fst := Δ₂, snd := { val := α₂, property := hα₂ } }\n[PROOFSTEP]\nsimp only at h₁ \n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : Δ.unop ⟶ Δ₁.unop\nhα₁ : Epi α₁\nΔ₂ : SimplexCategoryᵒᵖ\nα₂ : Δ.unop ⟶ Δ₂.unop\nhα₂ : Epi α₂\nh₁ : Δ₁ = Δ₂\nh₂ :\n  e { fst := Δ₁, snd := { val := α₁, property := hα₁ } } ≫\n      eqToHom\n        (_ :\n          { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst.unop =\n            { fst := Δ₂, snd := { val := α₂, property := hα₂ } }.fst.unop) =\n    e { fst := Δ₂, snd := { val := α₂, property := hα₂ } }\n⊢ { fst := Δ₁, snd := { val := α₁, property := hα₁ } } = { fst := Δ₂, snd := { val := α₂, property := hα₂ } }\n[PROOFSTEP]\nsubst h₁\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : Δ.unop ⟶ Δ₁.unop\nhα₁ : Epi α₁\nα₂ : Δ.unop ⟶ Δ₁.unop\nhα₂ : Epi α₂\nh₂ :\n  e { fst := Δ₁, snd := { val := α₁, property := hα₁ } } ≫\n      eqToHom\n        (_ :\n          { fst := Δ₁, snd := { val := α₁, property := hα₁ } }.fst.unop =\n            { fst := Δ₁, snd := { val := α₂, property := hα₂ } }.fst.unop) =\n    e { fst := Δ₁, snd := { val := α₂, property := hα₂ } }\n⊢ { fst := Δ₁, snd := { val := α₁, property := hα₁ } } = { fst := Δ₁, snd := { val := α₂, property := hα₂ } }\n[PROOFSTEP]\nsimp only [eqToHom_refl, comp_id, IndexSet.e] at h₂ \n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.913, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : Δ.unop ⟶ Δ₁.unop\nhα₁ : Epi α₁\nα₂ : Δ.unop ⟶ Δ₁.unop\nhα₂ : Epi α₂\nh₂ : α₁ = α₂\n⊢ { fst := Δ₁, snd := { val := α₁, property := hα₁ } } = { fst := Δ₁, snd := { val := α₂, property := hα₂ } }\n[PROOFSTEP]\nsimp only [h₂]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ Function.Injective fun A =>\n    { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n      snd := ↑(Hom.toOrderHom (e A)) }\n[PROOFSTEP]\nrintro ⟨Δ₁, α₁⟩ ⟨Δ₂, α₂⟩ h₁\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁ : SimplexCategoryᵒᵖ\nα₁ : { α // Epi α }\nΔ₂ : SimplexCategoryᵒᵖ\nα₂ : { α // Epi α }\nh₁ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂ }\n⊢ { fst := Δ₁, snd := α₁ } = { fst := Δ₂, snd := α₂ }\n[PROOFSTEP]\ninduction' Δ₁ using Opposite.rec with Δ₁\n[GOAL]\ncase mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂ : SimplexCategoryᵒᵖ\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂ }\n⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := Δ₂, snd := α₂ }\n[PROOFSTEP]\ninduction' Δ₂ using Opposite.rec with Δ₂\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂✝ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₂ : SimplexCategory\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\nh₁ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\n⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₂ }, snd := α₂ }\n[PROOFSTEP]\nsimp only [unop_op, Sigma.mk.inj_iff, Fin.mk.injEq] at h₁ \n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂✝ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₂ : SimplexCategory\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₂ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))\n⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₂ }, snd := α₂ }\n[PROOFSTEP]\nhave h₂ : Δ₁ = Δ₂ := by\n  ext1\n  simpa only [Fin.mk_eq_mk] using h₁.1\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂✝ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₂ : SimplexCategory\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₂ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))\n⊢ Δ₁ = Δ₂\n[PROOFSTEP]\next1\n[GOAL]\ncase a\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂✝ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₂ : SimplexCategory\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₂ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))\n⊢ len Δ₁ = len Δ₂\n[PROOFSTEP]\nsimpa only [Fin.mk_eq_mk] using h₁.1\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂✝ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂✝, snd := α₂✝ }\nΔ₂ : SimplexCategory\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₂ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₂ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₂ }, snd := α₂ }))\nh₂ : Δ₁ = Δ₂\n⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₂ }, snd := α₂ }\n[PROOFSTEP]\nsubst h₂\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₁ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))\n⊢ { fst := { unop := Δ₁ }, snd := α₁ } = { fst := { unop := Δ₁ }, snd := α₂ }\n[PROOFSTEP]\nrefine' ext _ _ rfl _\n[GOAL]\ncase mk.mk.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₁ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))\n⊢ e { fst := { unop := Δ₁ }, snd := α₁ } ≫\n      eqToHom (_ : { fst := { unop := Δ₁ }, snd := α₁ }.fst.unop = { fst := { unop := Δ₁ }, snd := α₂ }.fst.unop) =\n    e { fst := { unop := Δ₁ }, snd := α₂ }\n[PROOFSTEP]\next : 2\n[GOAL]\ncase mk.mk.mk.mk.a.h\nC : Type u_1\ninst✝ : Category.{?u.1648, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nΔ₁✝ : SimplexCategoryᵒᵖ\nα₁✝ : { α // Epi α }\nΔ₂ : SimplexCategoryᵒᵖ\nα₂✝ : { α // Epi α }\nh₁✝² :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nΔ₁ : SimplexCategory\nα₁ : { α // Epi α }\nh₁✝¹ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₁ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₂, snd := α₂✝ }\nα₂ : { α // Epi α }\nh₁✝ :\n  (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := Δ₁✝, snd := α₁✝ } =\n    (fun A =>\n        { fst := { val := len A.fst.unop, isLt := (_ : len A.fst.unop < Nat.succ (len Δ.unop)) },\n          snd := ↑(Hom.toOrderHom (e A)) })\n      { fst := { unop := Δ₁ }, snd := α₂ }\nh₁ :\n  len Δ₁ = len Δ₁ ∧\n    HEq ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₁ }))\n      ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))\n⊢ ↑(Hom.toOrderHom\n        (e { fst := { unop := Δ₁ }, snd := α₁ } ≫\n          eqToHom\n            (_ : { fst := { unop := Δ₁ }, snd := α₁ }.fst.unop = { fst := { unop := Δ₁ }, snd := α₂ }.fst.unop))) =\n    ↑(Hom.toOrderHom (e { fst := { unop := Δ₁ }, snd := α₂ }))\n[PROOFSTEP]\nexact eq_of_heq h₁.2\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.3923, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ Epi (𝟙 Δ.unop)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A ↔ A.fst = Δ\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A → A.fst = Δ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : EqId A\n⊢ A.fst = Δ\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : A = id Δ\n⊢ A.fst = Δ\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : A = id Δ\n⊢ (id Δ).fst = Δ\n[PROOFSTEP]\nrfl\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ A.fst = Δ → EqId A\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : A.fst = Δ\n⊢ EqId A\n[PROOFSTEP]\nrcases A with ⟨_, ⟨f, hf⟩⟩\n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ fst✝ : SimplexCategoryᵒᵖ\nf : Δ.unop ⟶ fst✝.unop\nhf : Epi f\nh : { fst := fst✝, snd := { val := f, property := hf } }.fst = Δ\n⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }\n[PROOFSTEP]\nsimp only at h \n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nΔ fst✝ : SimplexCategoryᵒᵖ\nf : Δ.unop ⟶ fst✝.unop\nhf : Epi f\nh : fst✝ = Δ\n⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nfst✝ : SimplexCategoryᵒᵖ\nf : fst✝.unop ⟶ fst✝.unop\nhf : Epi f\n⊢ EqId { fst := fst✝, snd := { val := f, property := hf } }\n[PROOFSTEP]\nrefine' ext _ _ rfl _\n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nfst✝ : SimplexCategoryᵒᵖ\nf : fst✝.unop ⟶ fst✝.unop\nhf : Epi f\n⊢ e { fst := fst✝, snd := { val := f, property := hf } } ≫\n      eqToHom (_ : { fst := fst✝, snd := { val := f, property := hf } }.fst.unop = (id fst✝).fst.unop) =\n    e (id fst✝)\n[PROOFSTEP]\nhaveI := hf\n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nfst✝ : SimplexCategoryᵒᵖ\nf : fst✝.unop ⟶ fst✝.unop\nhf this : Epi f\n⊢ e { fst := fst✝, snd := { val := f, property := hf } } ≫\n      eqToHom (_ : { fst := fst✝, snd := { val := f, property := hf } }.fst.unop = (id fst✝).fst.unop) =\n    e (id fst✝)\n[PROOFSTEP]\nsimp only [eqToHom_refl, comp_id]\n[GOAL]\ncase mpr.mk.mk\nC : Type u_1\ninst✝ : Category.{?u.4321, u_1} C\nfst✝ : SimplexCategoryᵒᵖ\nf : fst✝.unop ⟶ fst✝.unop\nhf this : Epi f\n⊢ e { fst := fst✝, snd := { val := f, property := hf } } = e (id fst✝)\n[PROOFSTEP]\nexact eq_id_of_epi f\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A ↔ len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nrw [eqId_iff_eq]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ A.fst = Δ ↔ len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ A.fst = Δ → len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : A.fst = Δ\n⊢ len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ len A.fst.unop = len Δ.unop → A.fst = Δ\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : len A.fst.unop = len Δ.unop\n⊢ A.fst = Δ\n[PROOFSTEP]\nrw [← unop_inj_iff]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : len A.fst.unop = len Δ.unop\n⊢ A.fst.unop = Δ.unop\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.a\nC : Type u_1\ninst✝ : Category.{?u.4752, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : len A.fst.unop = len Δ.unop\n⊢ len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nexact h\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4880, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A ↔ len Δ.unop ≤ len A.fst.unop\n[PROOFSTEP]\nrw [eqId_iff_len_eq]\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.4880, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ len A.fst.unop = len Δ.unop ↔ len Δ.unop ≤ len A.fst.unop\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4880, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ len A.fst.unop = len Δ.unop → len Δ.unop ≤ len A.fst.unop\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.4880, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : len A.fst.unop = len Δ.unop\n⊢ len Δ.unop ≤ len A.fst.unop\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.4880, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ len Δ.unop ≤ len A.fst.unop → len A.fst.unop = len Δ.unop\n[PROOFSTEP]\nexact le_antisymm (len_le_of_epi (inferInstance : Epi A.e))\n[GOAL]\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A ↔ Mono (e A)\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ EqId A → Mono (e A)\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : EqId A\n⊢ Mono (e A)\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : A = id Δ\n⊢ Mono (e A)\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\n⊢ Mono (e (id Δ))\n[PROOFSTEP]\ndsimp only [id, e]\n[GOAL]\ncase mp\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\n⊢ Mono (𝟙 Δ.unop)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ Mono (e A) → EqId A\n[PROOFSTEP]\nintro h\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : Mono (e A)\n⊢ EqId A\n[PROOFSTEP]\nrw [eqId_iff_len_le]\n[GOAL]\ncase mpr\nC : Type u_1\ninst✝ : Category.{?u.5425, u_1} C\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\nh : Mono (e A)\n⊢ len Δ.unop ≤ len A.fst.unop\n[PROOFSTEP]\nexact len_le_of_mono h\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιSummand s A = ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op\n[PROOFSTEP]\ndsimp only [ιSummand, Iso.hom]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιCoprod s.N A ≫ (iso s Δ).hom = ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op\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 Y : SimplicialObject C\ns : Splitting X\nn : ℕ\n⊢ ιSummand s (IndexSet.id (op [n])) = ι s n\n[PROOFSTEP]\nerw [ιSummand_eq, X.map_id, comp_id]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nn : ℕ\n⊢ ι s (len (IndexSet.id (op [n])).fst.unop) = ι s n\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf : X ⟶ Y\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιSummand s A ≫ NatTrans.app f Δ = φ s f (len A.fst.unop) ≫ Y.map (IndexSet.e A).op\n[PROOFSTEP]\nsimp only [ιSummand_eq_assoc, φ, assoc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf : X ⟶ Y\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op ≫ NatTrans.app f Δ =\n    ι s (len A.fst.unop) ≫ NatTrans.app f (op [len A.fst.unop]) ≫ Y.map (IndexSet.e A).op\n[PROOFSTEP]\nerw [NatTrans.naturality]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nf g : X.obj Δ ⟶ Z\nh : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g\n⊢ f = g\n[PROOFSTEP]\nrw [← cancel_epi (s.iso Δ).hom]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nf g : X.obj Δ ⟶ Z\nh : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g\n⊢ (iso s Δ).hom ≫ f = (iso s Δ).hom ≫ g\n[PROOFSTEP]\next A\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nf g : X.obj Δ ⟶ Z\nh : ∀ (A : IndexSet Δ), ιSummand s A ≫ f = ιSummand s A ≫ g\nA : IndexSet Δ\n⊢ Sigma.ι (summand s.N Δ) A ≫ (iso s Δ).hom ≫ f = Sigma.ι (summand s.N Δ) A ≫ (iso s Δ).hom ≫ g\n[PROOFSTEP]\nsimpa only [ιSummand_eq, iso_hom, map, colimit.ι_desc_assoc, Cofan.mk_ι_app] using h A\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\n⊢ f = g\n[PROOFSTEP]\next Δ\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ : SimplexCategoryᵒᵖ\n⊢ NatTrans.app f Δ = NatTrans.app g Δ\n[PROOFSTEP]\napply s.hom_ext'\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ : SimplexCategoryᵒᵖ\n⊢ ∀ (A : IndexSet Δ), ιSummand s A ≫ NatTrans.app f Δ = ιSummand s A ≫ NatTrans.app g Δ\n[PROOFSTEP]\nintro A\n[GOAL]\ncase h.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ : SimplexCategoryᵒᵖ\nA : IndexSet Δ\n⊢ ιSummand s A ≫ NatTrans.app f Δ = ιSummand s A ≫ NatTrans.app g Δ\n[PROOFSTEP]\ninduction' Δ using Opposite.rec with Δ\n[GOAL]\ncase h.h.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ✝ : SimplexCategoryᵒᵖ\nA✝ : IndexSet Δ✝\nΔ : SimplexCategory\nA : IndexSet { unop := Δ }\n⊢ ιSummand s A ≫ NatTrans.app f { unop := Δ } = ιSummand s A ≫ NatTrans.app g { unop := Δ }\n[PROOFSTEP]\ninduction' Δ using SimplexCategory.rec with n\n[GOAL]\ncase h.h.mk.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ✝ : SimplexCategoryᵒᵖ\nA✝¹ : IndexSet Δ✝\nΔ : SimplexCategory\nA✝ : IndexSet { unop := Δ }\nn : ℕ\nA : IndexSet { unop := [n] }\n⊢ ιSummand s A ≫ NatTrans.app f { unop := [n] } = ιSummand s A ≫ NatTrans.app g { unop := [n] }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.h.mk.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nf g : X ⟶ Y\nh : ∀ (n : ℕ), φ s f n = φ s g n\nΔ✝ : SimplexCategoryᵒᵖ\nA✝¹ : IndexSet Δ✝\nΔ : SimplexCategory\nA✝ : IndexSet { unop := Δ }\nn : ℕ\nA : IndexSet { unop := [n] }\n⊢ ιSummand s A ≫ NatTrans.app f { unop := [n] } = ιSummand s A ≫ NatTrans.app g { unop := [n] }\n[PROOFSTEP]\nsimp only [s.ιSummand_comp_app, h]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nF : (A : IndexSet Δ) → N s (len A.fst.unop) ⟶ Z\nA : IndexSet Δ\n⊢ ιSummand s A ≫ desc s Δ F = F A\n[PROOFSTEP]\ndsimp only [ιSummand, desc]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nF : (A : IndexSet Δ) → N s (len A.fst.unop) ⟶ Z\nA : IndexSet Δ\n⊢ (ιCoprod s.N A ≫ (iso s Δ).hom) ≫ (iso s Δ).inv ≫ Sigma.desc F = F A\n[PROOFSTEP]\nsimp only [assoc, Iso.hom_inv_id_assoc, ιCoprod]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nZ : C\nΔ : SimplexCategoryᵒᵖ\nF : (A : IndexSet Δ) → N s (len A.fst.unop) ⟶ Z\nA : IndexSet Δ\n⊢ Sigma.ι (summand s.N Δ) A ≫ Sigma.desc F = F A\n[PROOFSTEP]\nerw [colimit.ι_desc, Cofan.mk_ι_app]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.147648, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\ne : X ≅ Y\nΔ : SimplexCategoryᵒᵖ\n⊢ IsIso (map Y (fun n => ι s n ≫ NatTrans.app e.hom (op [n])) Δ)\n[PROOFSTEP]\nconvert (inferInstance : IsIso ((s.iso Δ).hom ≫ e.hom.app Δ))\n[GOAL]\ncase h.e'_5\nC : Type u_1\ninst✝¹ : Category.{?u.147648, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\ne : X ≅ Y\nΔ : SimplexCategoryᵒᵖ\n⊢ map Y (fun n => ι s n ≫ NatTrans.app e.hom (op [n])) Δ = (iso s Δ).hom ≫ NatTrans.app e.hom Δ\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_5.h\nC : Type u_1\ninst✝¹ : Category.{?u.147648, u_1} C\ninst✝ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\ne : X ≅ Y\nΔ : SimplexCategoryᵒᵖ\nb✝ : IndexSet Δ\n⊢ Sigma.ι (summand (fun n => N s n) Δ) b✝ ≫ map Y (fun n => ι s n ≫ NatTrans.app e.hom (op [n])) Δ =\n    Sigma.ι (summand (fun n => N s n) Δ) b✝ ≫ (iso s Δ).hom ≫ NatTrans.app e.hom Δ\n[PROOFSTEP]\nsimp [map]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ₁ Δ₂ : SimplexCategoryᵒᵖ\nA : IndexSet Δ₁\np : Δ₁ ⟶ Δ₂\ninst✝ : Epi p.unop\n⊢ ιSummand s A ≫ X.map p = ιSummand s (IndexSet.epiComp A p)\n[PROOFSTEP]\ndsimp [ιSummand]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ₁ Δ₂ : SimplexCategoryᵒᵖ\nA : IndexSet Δ₁\np : Δ₁ ⟶ Δ₂\ninst✝ : Epi p.unop\n⊢ (Sigma.ι (fun A => N s (len A.fst.unop)) A ≫ Sigma.desc fun A => ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op) ≫\n      X.map p =\n    Sigma.ι (fun A => N s (len A.fst.unop)) (IndexSet.epiComp A p) ≫\n      Sigma.desc fun A => ι s (len A.fst.unop) ≫ X.map (IndexSet.e A).op\n[PROOFSTEP]\nerw [colimit.ι_desc, colimit.ι_desc, Cofan.mk_ι_app, Cofan.mk_ι_app]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ₁ Δ₂ : SimplexCategoryᵒᵖ\nA : IndexSet Δ₁\np : Δ₁ ⟶ Δ₂\ninst✝ : Epi p.unop\n⊢ (ι s (len { as := A }.as.fst.unop) ≫ X.map (IndexSet.e { as := A }.as).op) ≫ X.map p =\n    ι s (len { as := IndexSet.epiComp A p }.as.fst.unop) ≫ X.map (IndexSet.e { as := IndexSet.epiComp A p }.as).op\n[PROOFSTEP]\ndsimp only [IndexSet.epiComp, IndexSet.e]\n[GOAL]\nC : Type u_1\ninst✝² : Category.{u_2, u_1} C\ninst✝¹ : HasFiniteCoproducts C\nX Y : SimplicialObject C\ns : Splitting X\nΔ₁ Δ₂ : SimplexCategoryᵒᵖ\nA : IndexSet Δ₁\np : Δ₁ ⟶ Δ₂\ninst✝ : Epi p.unop\n⊢ (ι s (len A.fst.unop) ≫ X.map (↑A.snd).op) ≫ X.map p = ι s (len A.fst.unop) ≫ X.map (p.unop ≫ ↑A.snd).op\n[PROOFSTEP]\nrw [op_comp, X.map_comp, assoc, Quiver.Hom.op_unop]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ₁ Φ₂ : Hom S₁ S₂\nh : ∀ (n : ℕ), f Φ₁ n = f Φ₂ n\n⊢ Φ₁ = Φ₂\n[PROOFSTEP]\nrcases Φ₁ with ⟨F₁, f₁, c₁⟩\n[GOAL]\ncase mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ₂ : Hom S₁ S₂\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f Φ₂ n\n⊢ mk F₁ f₁ = Φ₂\n[PROOFSTEP]\nrcases Φ₂ with ⟨F₂, f₂, c₂⟩\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nf₂ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₂ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₂) n\n⊢ mk F₁ f₁ = mk F₂ f₂\n[PROOFSTEP]\nhave h' : f₁ = f₂ := by\n  ext\n  apply h\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nf₂ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₂ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₂) n\n⊢ f₁ = f₂\n[PROOFSTEP]\next\n[GOAL]\ncase h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nf₂ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₂ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₂) n\nx✝ : ℕ\n⊢ f₁ x✝ = f₂ x✝\n[PROOFSTEP]\napply h\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nf₂ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₂ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₂) n\nh' : f₁ = f₂\n⊢ mk F₁ f₁ = mk F₂ f₂\n[PROOFSTEP]\nsubst h'\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₁) n\n⊢ mk F₁ f₁ = mk F₂ f₁\n[PROOFSTEP]\nsimp only [mk.injEq, and_true]\n[GOAL]\ncase mk.mk\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₁) n\n⊢ F₁ = F₂\n[PROOFSTEP]\napply S₁.s.hom_ext\n[GOAL]\ncase mk.mk.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₁) n\n⊢ ∀ (n : ℕ), Splitting.φ S₁.s F₁ n = Splitting.φ S₁.s F₂ n\n[PROOFSTEP]\nintro n\n[GOAL]\ncase mk.mk.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₁) n\nn : ℕ\n⊢ Splitting.φ S₁.s F₁ n = Splitting.φ S₁.s F₂ n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk.h\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nF₁ : S₁.X ⟶ S₂.X\nf₁ : (n : ℕ) → Splitting.N S₁.s n ⟶ Splitting.N S₂.s n\nc₁ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nF₂ : S₁.X ⟶ S₂.X\nc₂ : ∀ (n : ℕ), Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n]) = f₁ n ≫ Splitting.ι S₂.s n\nh : ∀ (n : ℕ), f (mk F₁ f₁) n = f (mk F₂ f₁) n\nn : ℕ\n⊢ Splitting.ι S₁.s n ≫ NatTrans.app F₁ (op [n]) = Splitting.ι S₁.s n ≫ NatTrans.app F₂ (op [n])\n[PROOFSTEP]\nrw [c₁, c₂]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.183784, u_1} C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ Z✝ : Split C\nΦ₁₂ : X✝ ⟶ Y✝\nΦ₂₃ : Y✝ ⟶ Z✝\nn : ℕ\n⊢ Splitting.ι X✝.s n ≫ NatTrans.app (Φ₁₂.F ≫ Φ₂₃.F) (op [n]) =\n    (fun n => Split.Hom.f Φ₁₂ n ≫ Split.Hom.f Φ₂₃ n) n ≫ Splitting.ι Z✝.s n\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{?u.183784, u_1} C\ninst✝ : HasFiniteCoproducts C\nX✝ Y✝ Z✝ : Split C\nΦ₁₂ : X✝ ⟶ Y✝\nΦ₂₃ : Y✝ ⟶ Z✝\nn : ℕ\n⊢ Splitting.ι X✝.s n ≫ NatTrans.app Φ₁₂.F (op [n]) ≫ NatTrans.app Φ₂₃.F (op [n]) =\n    (Split.Hom.f Φ₁₂ n ≫ Split.Hom.f Φ₂₃ n) ≫ Splitting.ι Z✝.s n\n[PROOFSTEP]\nsimp only [assoc, Split.Hom.comm_assoc, Split.Hom.comm]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ₁ Φ₂ : S₁ ⟶ S₂\nh : Φ₁ = Φ₂\n⊢ Φ₁.f = Φ₂.f\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ₁ Φ₂ : S₁ ⟶ S₂\nh : Φ₁ = Φ₂\nn : ℕ\n⊢ Hom.f Φ₁ n = Hom.f Φ₂ n\n[PROOFSTEP]\nrw [h]\n[GOAL]\nC : Type u_1\ninst✝¹ : Category.{u_2, u_1} C\ninst✝ : HasFiniteCoproducts C\nS₁ S₂ : Split C\nΦ : S₁ ⟶ S₂\nΔ : SimplexCategoryᵒᵖ\nA : Splitting.IndexSet Δ\n⊢ Splitting.ιSummand S₁.s A ≫ NatTrans.app Φ.F Δ = Hom.f Φ (len A.fst.unop) ≫ Splitting.ιSummand S₂.s A\n[PROOFSTEP]\nerw [S₁.s.ιSummand_eq, S₂.s.ιSummand_eq, assoc, Φ.F.naturality, ← Φ.comm_assoc]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.SplitSimplicialObject", "llama_tokens": 22154, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.661922862511608, "lm_q2_score": 0.3849121444839335, "lm_q1q2_score": 0.2547821484922869}}
{"text": "[GOAL]\nα✝ : Sort u\nβ✝ : Sort v\nf : α✝ ≃ β✝\nα : Sort u_1\nβ : Type u_2\np : β → Prop\ne : α ≃ Subtype p\nx : β\nhs : x ∈ setOf p\n⊢ ↑(asEmbedding e) (↑e.symm { val := x, property := hs }) = x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type ?u.1349\nβ : Type ?u.1350\nf : Option α ↪ β\n⊢ ∀ (x : Option α),\n    ↑((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n            ((fun f =>\n                { fst := Embedding.trans coeWithTop f,\n                  snd :=\n                    { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n              f))\n        x =\n      ↑f x\n[PROOFSTEP]\nrintro (_ | _)\n[GOAL]\ncase none\nα : Type ?u.1349\nβ : Type ?u.1350\nf : Option α ↪ β\n⊢ ↑((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n          ((fun f =>\n              { fst := Embedding.trans coeWithTop f,\n                snd :=\n                  { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n            f))\n      none =\n    ↑f none\n[PROOFSTEP]\nsimp [Option.coe_def]\n[GOAL]\ncase some\nα : Type ?u.1349\nβ : Type ?u.1350\nf : Option α ↪ β\nval✝ : α\n⊢ ↑((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n          ((fun f =>\n              { fst := Embedding.trans coeWithTop f,\n                snd :=\n                  { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n            f))\n      (some val✝) =\n    ↑f (some val✝)\n[PROOFSTEP]\nsimp [Option.coe_def]\n[GOAL]\ncase some\nα : Type ?u.1349\nβ : Type ?u.1350\nf : Option α ↪ β\nval✝ : α\n⊢ ↑val✝ = some val✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.1349\nβ : Type ?u.1350\nx✝ : (f : α ↪ β) × ↑(Set.range ↑f)ᶜ\nf : α ↪ β\ny : β\nhy : y ∈ (Set.range ↑f)ᶜ\n⊢ (fun f =>\n        { fst := Embedding.trans coeWithTop f,\n          snd := { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n      ((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n        { fst := f, snd := { val := y, property := hy } }) =\n    { fst := f, snd := { val := y, property := hy } }\n[PROOFSTEP]\next\n[GOAL]\ncase a.h\nα : Type ?u.1349\nβ : Type ?u.1350\nx✝¹ : (f : α ↪ β) × ↑(Set.range ↑f)ᶜ\nf : α ↪ β\ny : β\nhy : y ∈ (Set.range ↑f)ᶜ\nx✝ : α\n⊢ ↑((fun f =>\n              { fst := Embedding.trans coeWithTop f,\n                snd :=\n                  { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n            ((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n              { fst := f, snd := { val := y, property := hy } })).fst\n      x✝ =\n    ↑{ fst := f, snd := { val := y, property := hy } }.fst x✝\n[PROOFSTEP]\nsimp [Option.coe_def]\n[GOAL]\ncase a\nα : Type ?u.1349\nβ : Type ?u.1350\nx✝ : (f : α ↪ β) × ↑(Set.range ↑f)ᶜ\nf : α ↪ β\ny : β\nhy : y ∈ (Set.range ↑f)ᶜ\n⊢ ↑((fun f =>\n            { fst := Embedding.trans coeWithTop f,\n              snd :=\n                { val := ↑f none, property := (_ : ↑f none ∈ Set.range ↑(Embedding.trans coeWithTop f) → False) } })\n          ((fun f => optionElim f.fst ↑f.snd (_ : ↑f.snd ∈ (Set.range ↑f.fst)ᶜ))\n            { fst := f, snd := { val := y, property := hy } })).snd =\n    ↑{ fst := f, snd := { val := y, property := hy } }.snd\n[PROOFSTEP]\nsimp [Option.coe_def]\n[GOAL]\ncase a.h\nα : Type ?u.1349\nβ : Type ?u.1350\nx✝¹ : (f : α ↪ β) × ↑(Set.range ↑f)ᶜ\nf : α ↪ β\ny : β\nhy : y ∈ (Set.range ↑f)ᶜ\nx✝ : α\n⊢ ↑(optionElim f y\n          (_ :\n            ↑{ fst := f, snd := { val := y, property := hy } }.snd ∈\n              (Set.range ↑{ fst := f, snd := { val := y, property := hy } }.fst)ᶜ))\n      ↑x✝ =\n    ↑f x✝\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type ?u.4882\ns t : Set α\nh✝ : s ⊆ t\nx✝¹ x✝ : ↑s\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nh :\n  (fun x => { val := ↑x, property := (_ : ↑x ∈ t) }) { val := x, property := hx } =\n    (fun x => { val := ↑x, property := (_ : ↑x ∈ t) }) { val := y, property := hy }\n⊢ { val := x, property := hx } = { val := y, property := hy }\n[PROOFSTEP]\ncongr\n[GOAL]\ncase e_val\nα : Type ?u.4882\ns t : Set α\nh✝ : s ⊆ t\nx✝¹ x✝ : ↑s\nx : α\nhx : x ∈ s\ny : α\nhy : y ∈ s\nh :\n  (fun x => { val := ↑x, property := (_ : ↑x ∈ t) }) { val := x, property := hx } =\n    (fun x => { val := ↑x, property := (_ : ↑x ∈ t) }) { val := y, property := hy }\n⊢ x = y\n[PROOFSTEP]\ninjection h\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x ∨ q x }\n⊢ Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)))\n      (↑(subtypeOrLeftEmbedding p q) x) =\n    x\n[PROOFSTEP]\nby_cases hx : p x\n[GOAL]\ncase pos\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x ∨ q x }\nhx : p ↑x\n⊢ Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)))\n      (↑(subtypeOrLeftEmbedding p q) x) =\n    x\n[PROOFSTEP]\nrw [subtypeOrLeftEmbedding_apply_left _ hx]\n[GOAL]\ncase pos\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x ∨ q x }\nhx : p ↑x\n⊢ Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)))\n      (Sum.inl { val := ↑x, property := hx }) =\n    x\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\ncase neg\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x ∨ q x }\nhx : ¬p ↑x\n⊢ Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)))\n      (↑(subtypeOrLeftEmbedding p q) x) =\n    x\n[PROOFSTEP]\nrw [subtypeOrLeftEmbedding_apply_right _ hx]\n[GOAL]\ncase neg\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x ∨ q x }\nhx : ¬p ↑x\n⊢ Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)))\n      (Sum.inr { val := ↑x, property := (_ : q ↑x) }) =\n    x\n[PROOFSTEP]\nsimp [Subtype.ext_iff]\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x } ⊕ { x // q x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) x) =\n    x\n[PROOFSTEP]\ncases x with\n| inl x =>\n  simp only [Sum.elim_inl]\n  rw [subtypeOrLeftEmbedding_apply_left]\n  · simp\n  · simpa using x.prop\n| inr x =>\n  simp only [Sum.elim_inr]\n  rw [subtypeOrLeftEmbedding_apply_right]\n  · simp\n  · suffices ¬p x by simpa\n    intro hp\n    simpa using h.le_bot x ⟨hp, x.prop⟩\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x } ⊕ { x // q x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) x) =\n    x\n[PROOFSTEP]\ncases x with\n| inl x =>\n  simp only [Sum.elim_inl]\n  rw [subtypeOrLeftEmbedding_apply_left]\n  · simp\n  · simpa using x.prop\n| inr x =>\n  simp only [Sum.elim_inr]\n  rw [subtypeOrLeftEmbedding_apply_right]\n  · simp\n  · suffices ¬p x by simpa\n    intro hp\n    simpa using h.le_bot x ⟨hp, x.prop⟩\n[GOAL]\ncase inl\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) (Sum.inl x)) =\n    Sum.inl x\n[PROOFSTEP]\n\n| inl x =>\n  simp only [Sum.elim_inl]\n  rw [subtypeOrLeftEmbedding_apply_left]\n  · simp\n  · simpa using x.prop\n[GOAL]\ncase inl\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) (Sum.inl x)) =\n    Sum.inl x\n[PROOFSTEP]\nsimp only [Sum.elim_inl]\n[GOAL]\ncase inl\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)) x) =\n    Sum.inl x\n[PROOFSTEP]\nrw [subtypeOrLeftEmbedding_apply_left]\n[GOAL]\ncase inl\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x }\n⊢ Sum.inl\n      { val := ↑(↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)) x),\n        property := ?inl.hx } =\n    Sum.inl x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inl.hx\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // p x }\n⊢ p ↑(↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)) x)\n[PROOFSTEP]\nsimpa using x.prop\n[GOAL]\ncase inr\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) (Sum.inr x)) =\n    Sum.inr x\n[PROOFSTEP]\n\n| inr x =>\n  simp only [Sum.elim_inr]\n  rw [subtypeOrLeftEmbedding_apply_right]\n  · simp\n  · suffices ¬p x by simpa\n    intro hp\n    simpa using h.le_bot x ⟨hp, x.prop⟩\n[GOAL]\ncase inr\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (Sum.elim (↑(Subtype.impEmbedding (fun x => p x) (fun x => p x ∨ q x) (_ : ∀ (x : α), p x → p x ∨ q x)))\n        (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x))) (Sum.inr x)) =\n    Sum.inr x\n[PROOFSTEP]\nsimp only [Sum.elim_inr]\n[GOAL]\ncase inr\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ ↑(subtypeOrLeftEmbedding p q)\n      (↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)) x) =\n    Sum.inr x\n[PROOFSTEP]\nrw [subtypeOrLeftEmbedding_apply_right]\n[GOAL]\ncase inr\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ Sum.inr\n      { val := ↑(↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)) x),\n        property :=\n          (_ : q ↑(↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)) x)) } =\n    Sum.inr x\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr.hx\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ ¬p ↑(↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)) x)\n[PROOFSTEP]\nsuffices ¬p x by simpa\n[GOAL]\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\nthis : ¬p ↑x\n⊢ ¬p ↑(↑(Subtype.impEmbedding (fun x => q x) (fun x => p x ∨ q x) (_ : ∀ (x : α), q x → p x ∨ q x)) x)\n[PROOFSTEP]\nsimpa\n[GOAL]\ncase inr.hx\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\n⊢ ¬p ↑x\n[PROOFSTEP]\nintro hp\n[GOAL]\ncase inr.hx\nα : Type u_1\np q : α → Prop\ninst✝ : DecidablePred p\nh : Disjoint p q\nx : { x // q x }\nhp : p ↑x\n⊢ False\n[PROOFSTEP]\nsimpa using h.le_bot x ⟨hp, x.prop⟩\n", "meta": {"mathlib_filename": "Mathlib.Logic.Embedding.Set", "llama_tokens": 5856, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5389832354982647, "lm_q2_score": 0.4726834766204328, "lm_q1q2_score": 0.2547684695954492}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Multiset α\nnodup✝¹ : Nodup s\nt : Multiset α\nnodup✝ : Nodup t\nh : { val := s, nodup := nodup✝¹ }.val = { val := t, nodup := nodup✝ }.val\n⊢ { val := s, nodup := nodup✝¹ } = { val := t, nodup := nodup✝ }\n[PROOFSTEP]\ncases h\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Multiset α\nnodup✝¹ nodup✝ : Nodup s\n⊢ { val := s, nodup := nodup✝¹ } = { val := s, nodup := nodup✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsRefl (Finset α) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsTrans (Finset α) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsAntisymm (Finset α) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsIrrefl (Finset α) fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsTrans (Finset α) fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ IsAsymm (Finset α) fun x x_1 => x < x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\n⊢ ¬s ⊆ t ↔ ∃ x, x ∈ s ∧ ¬x ∈ t\n[PROOFSTEP]\nsimp only [← coe_subset, Set.not_subset, mem_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t s₁ s₂ : Finset α\n⊢ ↑s₁ ⊂ ↑s₂ ↔ s₁ ⊆ s₂ ∧ ¬s₂ ⊆ s₁\n[PROOFSTEP]\nsimp only [Set.ssubset_def, Finset.coe_subset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\nl : List α\n⊢ ¬∃ a, a ∈ Quotient.mk (List.isSetoid α) []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\nl✝ : List α\na : α\nl : List α\n⊢ a ∈ Quotient.mk (List.isSetoid α) (a :: l)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\n⊢ ¬a ∈ ∅\n[PROOFSTEP]\nsimp only [mem_def, empty_val, not_mem_zero, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s : Finset α\n⊢ s = ∅ → ∀ (x : α), ¬x ∈ s\n[PROOFSTEP]\nrintro rfl x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\nx : α\n⊢ ¬x ∈ ∅\n[PROOFSTEP]\napply not_mem_empty\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\n⊢ ∀ (x : α), x ∈ ↑∅ ↔ x ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s : Finset α\n⊢ ↑s = ∅ ↔ s = ∅\n[PROOFSTEP]\nrw [← coe_empty, coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s : Finset α\n⊢ IsEmpty { x // x ∈ s } ↔ s = ∅\n[PROOFSTEP]\nsimpa using @Set.isEmpty_coe_sort α s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b a : α\ns : Finset α\n⊢ s.val = {a} ↔ s = {a}\n[PROOFSTEP]\nrw [← val_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b a : α\ns : Finset α\n⊢ s.val = {a} ↔ s.val = {a}.val\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na✝ b a : α\n⊢ ↑{a} = {a}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na✝ b a x✝ : α\n⊢ x✝ ∈ ↑{a} ↔ x✝ ∈ {a}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ ↑s = {a} ↔ s = {a}\n[PROOFSTEP]\nrw [← coe_singleton, coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s = {a} ↔ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s = {a} → a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nintro t\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ (a ∈ s ∧ ∀ (x : α), x ∈ s → x = a) → s = {a}\n[PROOFSTEP]\nintro t\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nt : s = {a}\n⊢ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nrw [t]\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nt : s = {a}\n⊢ a ∈ {a} ∧ ∀ (x : α), x ∈ {a} → x = a\n[PROOFSTEP]\nexact ⟨Finset.mem_singleton_self _, fun _ => Finset.mem_singleton.1⟩\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nt : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\n⊢ s = {a}\n[PROOFSTEP]\next\n[GOAL]\ncase mpr.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝¹ b : α\ns : Finset α\na : α\nt : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\na✝ : α\n⊢ a✝ ∈ s ↔ a✝ ∈ {a}\n[PROOFSTEP]\nrw [Finset.mem_singleton]\n[GOAL]\ncase mpr.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝¹ b : α\ns : Finset α\na : α\nt : a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\na✝ : α\n⊢ a✝ ∈ s ↔ a✝ = a\n[PROOFSTEP]\nexact ⟨t.right _, fun r => r.symm ▸ t.left⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s = {a} ↔ Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s = {a} → Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na✝ b a : α\n⊢ Finset.Nonempty {a} ∧ ∀ (x : α), x ∈ {a} → x = a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ (Finset.Nonempty s ∧ ∀ (x : α), x ∈ s → x = a) → s = {a}\n[PROOFSTEP]\nrintro ⟨hne, h_uniq⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nhne : Finset.Nonempty s\nh_uniq : ∀ (x : α), x ∈ s → x = a\n⊢ s = {a}\n[PROOFSTEP]\nrw [eq_singleton_iff_unique_mem]\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nhne : Finset.Nonempty s\nh_uniq : ∀ (x : α), x ∈ s → x = a\n⊢ a ∈ s ∧ ∀ (x : α), x ∈ s → x = a\n[PROOFSTEP]\nrefine' ⟨_, h_uniq⟩\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nhne : Finset.Nonempty s\nh_uniq : ∀ (x : α), x ∈ s → x = a\n⊢ a ∈ s\n[PROOFSTEP]\nrw [← h_uniq hne.choose hne.choose_spec]\n[GOAL]\ncase mpr.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\nhne : Finset.Nonempty s\nh_uniq : ∀ (x : α), x ∈ s → x = a\n⊢ Exists.choose hne ∈ s\n[PROOFSTEP]\nexact hne.choose_spec\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na b : α\ninst✝ : Unique α\ns : Finset α\n⊢ Finset.Nonempty s ↔ s = {default}\n[PROOFSTEP]\nsimp [eq_singleton_iff_nonempty_unique_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na b : α\ns : Finset α\n⊢ (∃ a, s = {a}) ↔ ∃! a, a ∈ s\n[PROOFSTEP]\nsimp only [eq_singleton_iff_unique_mem, ExistsUnique]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Set α\na : α\n⊢ ↑{a} ⊆ s ↔ a ∈ s\n[PROOFSTEP]\nrw [coe_singleton, Set.singleton_subset_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s ⊆ {a} ↔ s = ∅ ∨ s = {a}\n[PROOFSTEP]\nrw [← coe_subset, coe_singleton, Set.subset_singleton_iff_eq, coe_eq_empty, coe_eq_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na b : α\n⊢ {a} ⊆ {b} ↔ a = b\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ s ⊂ {a} ↔ s = ∅\n[PROOFSTEP]\nrw [← coe_ssubset, coe_singleton, Set.ssubset_singleton_iff, coe_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na b : α\nha : a ∈ s\n⊢ s = {a} ∨ Set.Nontrivial ↑s\n[PROOFSTEP]\nrw [← coe_eq_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na b : α\nha : a ∈ s\n⊢ ↑s = {a} ∨ Set.Nontrivial ↑s\n[PROOFSTEP]\nexact Set.eq_singleton_or_nontrivial ha\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\nh : ¬a ∈ s\np : α → Prop\n⊢ (∀ (x : α), x ∈ cons a s h → p x) ↔ p a ∧ ∀ (x : α), x ∈ s → p x\n[PROOFSTEP]\nsimp only [mem_cons, or_imp, forall_and, forall_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\nm : Multiset α\nhm : Nodup m\n⊢ Finset.Nonempty { val := m, nodup := hm } ↔ m ≠ 0\n[PROOFSTEP]\ninduction m using Multiset.induction_on\n[GOAL]\ncase empty\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\nhm : Nodup 0\n⊢ Finset.Nonempty { val := 0, nodup := hm } ↔ 0 ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b a✝¹ : α\ns✝ : Multiset α\na✝ : ∀ {hm : Nodup s✝}, Finset.Nonempty { val := s✝, nodup := hm } ↔ s✝ ≠ 0\nhm : Nodup (a✝¹ ::ₘ s✝)\n⊢ Finset.Nonempty { val := a✝¹ ::ₘ s✝, nodup := hm } ↔ a✝¹ ::ₘ s✝ ≠ 0\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Finset α\na✝ b a : α\ns : Finset α\nh : ¬a ∈ s\n⊢ ↑(cons a s h) = insert a ↑s\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ t : Finset α\na✝ b a : α\ns : Finset α\nh : ¬a ∈ s\nx✝ : α\n⊢ x✝ ∈ ↑(cons a s h) ↔ x✝ ∈ insert a ↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\nhs : ¬a ∈ s\nht : ¬a ∈ t\n⊢ cons a s hs ⊆ cons a t ht ↔ s ⊆ t\n[PROOFSTEP]\nrwa [← coe_subset, coe_cons, coe_cons, Set.insert_subset_insert_iff, coe_subset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\n⊢ s ⊂ t ↔ ∃ a h, cons a s h ⊆ t\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨a, ha, h⟩ => ssubset_of_ssubset_of_subset (ssubset_cons _) h⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na b : α\nh : s ⊂ t\n⊢ ∃ a h, cons a s h ⊆ t\n[PROOFSTEP]\nobtain ⟨a, hs, ht⟩ := not_subset.1 h.2\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns t : Finset α\na✝ b : α\nh : s ⊂ t\na : α\nhs : a ∈ t\nht : ¬a ∈ s\n⊢ ∃ a h, cons a s h ⊆ t\n[PROOFSTEP]\nexact ⟨a, ht, cons_subset.2 ⟨hs, h.subset⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b : α\n⊢ _root_.Disjoint s t ↔ ∀ ⦃a : α⦄, a ∈ t → ¬a ∈ s\n[PROOFSTEP]\nrw [_root_.disjoint_comm, disjoint_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b : α\n⊢ _root_.Disjoint s t ↔ ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ t → a ≠ b\n[PROOFSTEP]\nsimp only [disjoint_left, imp_not_comm, forall_eq']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b x✝ : α\n⊢ ¬(x✝ ∈ s → ¬x✝ ∈ t) ↔ x✝ ∈ s ∧ x✝ ∈ t\n[PROOFSTEP]\nrw [not_imp, not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b : α\n⊢ _root_.Disjoint {a} s ↔ ¬a ∈ s\n[PROOFSTEP]\nsimp only [disjoint_left, mem_singleton, forall_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b : α\n⊢ _root_.Disjoint {a} {b} ↔ a ≠ b\n[PROOFSTEP]\nrw [disjoint_singleton_left, mem_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nf : α → β\ns t u : Finset α\na b : α\n⊢ _root_.Disjoint ↑s ↑t ↔ _root_.Disjoint s t\n[PROOFSTEP]\nsimp only [Finset.disjoint_left, Set.disjoint_left, mem_coe]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\ns t : Finset α\nh : _root_.Disjoint s t\na : α\n⊢ a ∈ disjUnion s t h ↔ a ∈ s ∨ a ∈ t\n[PROOFSTEP]\nrcases s with ⟨⟨s⟩⟩\n[GOAL]\ncase mk.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\nt : Finset α\na : α\nval✝ : Multiset α\ns : List α\nnodup✝ : Nodup (Quot.mk Setoid.r s)\nh : _root_.Disjoint { val := Quot.mk Setoid.r s, nodup := nodup✝ } t\n⊢ a ∈ disjUnion { val := Quot.mk Setoid.r s, nodup := nodup✝ } t h ↔\n    a ∈ { val := Quot.mk Setoid.r s, nodup := nodup✝ } ∨ a ∈ t\n[PROOFSTEP]\nrcases t with ⟨⟨t⟩⟩\n[GOAL]\ncase mk.mk.mk.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u_4\na : α\nval✝¹ : Multiset α\ns : List α\nnodup✝¹ : Nodup (Quot.mk Setoid.r s)\nval✝ : Multiset α\nt : List α\nnodup✝ : Nodup (Quot.mk Setoid.r t)\nh : _root_.Disjoint { val := Quot.mk Setoid.r s, nodup := nodup✝¹ } { val := Quot.mk Setoid.r t, nodup := nodup✝ }\n⊢ a ∈ disjUnion { val := Quot.mk Setoid.r s, nodup := nodup✝¹ } { val := Quot.mk Setoid.r t, nodup := nodup✝ } h ↔\n    a ∈ { val := Quot.mk Setoid.r s, nodup := nodup✝¹ } ∨ a ∈ { val := Quot.mk Setoid.r t, nodup := nodup✝ }\n[PROOFSTEP]\napply List.mem_append\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\nh : _root_.Disjoint s {a}\n⊢ disjUnion s {a} h = cons a s (_ : ¬a ∈ s)\n[PROOFSTEP]\nrw [disjUnion_comm, singleton_disjUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\n⊢ (insert a s).val = dedup (a ::ₘ s.val)\n[PROOFSTEP]\nrw [dedup_cons, dedup_eq_self]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\n⊢ (insert a s).val = ndinsert a s.val\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nh : ¬a ∈ s\n⊢ (insert a s).val = a ::ₘ s.val\n[PROOFSTEP]\nrw [insert_val, ndinsert_of_not_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝¹ b a✝ : α\ns : Finset α\nh : ¬a✝ ∈ s\na : α\n⊢ a ∈ cons a✝ s h ↔ a ∈ insert a✝ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nx : α\n⊢ x ∈ ↑(insert a s) ↔ x ∈ insert a ↑s\n[PROOFSTEP]\nsimp only [mem_coe, mem_insert, Set.mem_insert_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b : α\ns : Finset α\nx y : α\n⊢ x ∈ insert y s ↔ x ∈ insert y ↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝ b a : α\n⊢ insert a ∅ = {a}\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝¹ b a a✝ : α\n⊢ a✝ ∈ insert a ∅ ↔ a✝ ∈ {a}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nx : α\n⊢ x ∈ insert a (insert b s) ↔ x ∈ insert b (insert a s)\n[PROOFSTEP]\nsimp only [mem_insert, or_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝ b✝ a b : α\n⊢ ↑{a, b} = {a, b}\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝ b✝ a b x✝ : α\n⊢ x✝ ∈ ↑{a, b} ↔ x✝ ∈ {a, b}\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ : α\ns : Finset α\na b : α\n⊢ ↑s = {a, b} ↔ s = {a, b}\n[PROOFSTEP]\nrw [← coe_pair, coe_inj]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nx : α\n⊢ x ∈ insert a (insert a s) ↔ x ∈ insert a s\n[PROOFSTEP]\nsimp only [mem_insert, ← or_assoc, or_self_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\nh : ¬a ∈ s\n⊢ s ≠ insert a t\n[PROOFSTEP]\ncontrapose! h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\nh : s = insert a t\n⊢ a ∈ s\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ insert a s ⊆ t ↔ a ∈ t ∧ s ⊆ t\n[PROOFSTEP]\nsimp only [subset_iff, mem_insert, forall_eq, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ s ⊂ t ↔ ∃ a x, insert a s ⊆ t\n[PROOFSTEP]\nexact_mod_cast @Set.ssubset_iff_insert α s t\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\ns : Multiset α\nnd : Nodup s\n⊢ p { val := s, nodup := nd }\n[PROOFSTEP]\ninduction s using Multiset.induction with\n| empty => exact empty\n| @cons a s IH =>\n  cases' nodup_cons.1 nd with m nd'\n  rw [← (eq_of_veq _ : Finset.cons a ⟨s, _⟩ m = ⟨a ::ₘ s, nd⟩)]\n  · exact cons m (IH nd')\n  · rw [cons_val]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\ns : Multiset α\nnd : Nodup s\n⊢ p { val := s, nodup := nd }\n[PROOFSTEP]\ninduction s using Multiset.induction with\n| empty => exact empty\n| @cons a s IH =>\n  cases' nodup_cons.1 nd with m nd'\n  rw [← (eq_of_veq _ : Finset.cons a ⟨s, _⟩ m = ⟨a ::ₘ s, nd⟩)]\n  · exact cons m (IH nd')\n  · rw [cons_val]\n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns t u v : Finset α✝\na b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\nnd : Nodup 0\n⊢ p { val := 0, nodup := nd }\n[PROOFSTEP]\n\n| empty => exact empty\n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns t u v : Finset α✝\na b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\nnd : Nodup 0\n⊢ p { val := 0, nodup := nd }\n[PROOFSTEP]\nexact empty\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\na : α\ns : Multiset α\nIH : ∀ (nd : Nodup s), p { val := s, nodup := nd }\nnd : Nodup (a ::ₘ s)\n⊢ p { val := a ::ₘ s, nodup := nd }\n[PROOFSTEP]\n\n| @cons a s IH =>\n  cases' nodup_cons.1 nd with m nd'\n  rw [← (eq_of_veq _ : Finset.cons a ⟨s, _⟩ m = ⟨a ::ₘ s, nd⟩)]\n  · exact cons m (IH nd')\n  · rw [cons_val]\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\na : α\ns : Multiset α\nIH : ∀ (nd : Nodup s), p { val := s, nodup := nd }\nnd : Nodup (a ::ₘ s)\n⊢ p { val := a ::ₘ s, nodup := nd }\n[PROOFSTEP]\ncases' nodup_cons.1 nd with m nd'\n[GOAL]\ncase cons.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\na : α\ns : Multiset α\nIH : ∀ (nd : Nodup s), p { val := s, nodup := nd }\nnd : Nodup (a ::ₘ s)\nm : ¬a ∈ s\nnd' : Nodup s\n⊢ p { val := a ::ₘ s, nodup := nd }\n[PROOFSTEP]\nrw [← (eq_of_veq _ : Finset.cons a ⟨s, _⟩ m = ⟨a ::ₘ s, nd⟩)]\n[GOAL]\ncase cons.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\na : α\ns : Multiset α\nIH : ∀ (nd : Nodup s), p { val := s, nodup := nd }\nnd : Nodup (a ::ₘ s)\nm : ¬a ∈ s\nnd' : Nodup s\n⊢ p (Finset.cons a { val := s, nodup := ?m.116533 } m)\n[PROOFSTEP]\nexact cons m (IH nd')\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : Finset α → Prop\nempty : p ∅\ncons : ∀ ⦃a : α⦄ {s : Finset α} (h : ¬a ∈ s), p s → p (Finset.cons a s h)\na : α\ns : Multiset α\nIH : ∀ (nd : Nodup s), p { val := s, nodup := nd }\nnd : Nodup (a ::ₘ s)\nm : ¬a ∈ s\nnd' : Nodup s\n⊢ (Finset.cons a { val := s, nodup := nd' } m).val = { val := a ::ₘ s, nodup := nd }.val\n[PROOFSTEP]\nrw [cons_val]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na b : α✝\nα : Type u_4\np : (s : Finset α) → Finset.Nonempty s → Prop\nh₀ : ∀ (a : α), p {a} (_ : Finset.Nonempty {a})\nh₁ :\n  ∀ ⦃a : α⦄ (s : Finset α) (h : ¬a ∈ s) (hs : Finset.Nonempty s),\n    p s hs → p (cons a s h) (_ : Finset.Nonempty (cons a s h))\ns : Finset α\nhs : Finset.Nonempty s\n⊢ p s hs\n[PROOFSTEP]\ninduction' s using Finset.cons_induction with a t ha h\n[GOAL]\ncase empty\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na b : α✝\nα : Type u_4\np : (s : Finset α) → Finset.Nonempty s → Prop\nh₀ : ∀ (a : α), p {a} (_ : Finset.Nonempty {a})\nh₁ :\n  ∀ ⦃a : α⦄ (s : Finset α) (h : ¬a ∈ s) (hs : Finset.Nonempty s),\n    p s hs → p (cons a s h) (_ : Finset.Nonempty (cons a s h))\ns : Finset α\nhs✝ : Finset.Nonempty s\nhs : Finset.Nonempty ∅\n⊢ p ∅ hs\n[PROOFSTEP]\nexact (not_nonempty_empty hs).elim\n[GOAL]\ncase cons\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t✝ u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : (s : Finset α) → Finset.Nonempty s → Prop\nh₀ : ∀ (a : α), p {a} (_ : Finset.Nonempty {a})\nh₁ :\n  ∀ ⦃a : α⦄ (s : Finset α) (h : ¬a ∈ s) (hs : Finset.Nonempty s),\n    p s hs → p (cons a s h) (_ : Finset.Nonempty (cons a s h))\ns : Finset α\nhs✝ : Finset.Nonempty s\na : α\nt : Finset α\nha : ¬a ∈ t\nh : ∀ (hs : Finset.Nonempty t), p t hs\nhs : Finset.Nonempty (cons a t ha)\n⊢ p (cons a t ha) hs\n[PROOFSTEP]\nobtain rfl | ht := t.eq_empty_or_nonempty\n[GOAL]\ncase cons.inl\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : (s : Finset α) → Finset.Nonempty s → Prop\nh₀ : ∀ (a : α), p {a} (_ : Finset.Nonempty {a})\nh₁ :\n  ∀ ⦃a : α⦄ (s : Finset α) (h : ¬a ∈ s) (hs : Finset.Nonempty s),\n    p s hs → p (cons a s h) (_ : Finset.Nonempty (cons a s h))\ns : Finset α\nhs✝ : Finset.Nonempty s\na : α\nha : ¬a ∈ ∅\nh : ∀ (hs : Finset.Nonempty ∅), p ∅ hs\nhs : Finset.Nonempty (cons a ∅ ha)\n⊢ p (cons a ∅ ha) hs\n[PROOFSTEP]\nexact h₀ a\n[GOAL]\ncase cons.inr\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ t✝ u v : Finset α✝\na✝ b : α✝\nα : Type u_4\np : (s : Finset α) → Finset.Nonempty s → Prop\nh₀ : ∀ (a : α), p {a} (_ : Finset.Nonempty {a})\nh₁ :\n  ∀ ⦃a : α⦄ (s : Finset α) (h : ¬a ∈ s) (hs : Finset.Nonempty s),\n    p s hs → p (cons a s h) (_ : Finset.Nonempty (cons a s h))\ns : Finset α\nhs✝ : Finset.Nonempty s\na : α\nt : Finset α\nha : ¬a ∈ t\nh : ∀ (hs : Finset.Nonempty t), p t hs\nhs : Finset.Nonempty (cons a t ha)\nht : Finset.Nonempty t\n⊢ p (cons a t ha) hs\n[PROOFSTEP]\nexact h₁ t ha ht (h ht)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\n⊢ { i // i ∈ insert x t } ≃ Option { i // i ∈ t }\n[PROOFSTEP]\nrefine'\n  { toFun := fun y => if h : ↑y = x then none else some ⟨y, (mem_insert.mp y.2).resolve_left h⟩\n    invFun := fun y => (y.elim ⟨x, mem_insert_self _ _⟩) fun z => ⟨z, mem_insert_of_mem z.2⟩ .. }\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\n⊢ LeftInverse\n    (fun y =>\n      Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n        { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n    fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) }\n[PROOFSTEP]\nintro y\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\ny : { i // i ∈ insert x t }\n⊢ (fun y =>\n        Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n          { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n      ((fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) }) y) =\n    y\n[PROOFSTEP]\nby_cases h : ↑y = x\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh✝ : ¬x ∈ t\ny : { i // i ∈ insert x t }\nh : ↑y = x\n⊢ (fun y =>\n        Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n          { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n      ((fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) }) y) =\n    y\n[PROOFSTEP]\nsimp only [Subtype.ext_iff, h, Option.elim, dif_pos, Subtype.coe_mk]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh✝ : ¬x ∈ t\ny : { i // i ∈ insert x t }\nh : ¬↑y = x\n⊢ (fun y =>\n        Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n          { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n      ((fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) }) y) =\n    y\n[PROOFSTEP]\nsimp only [h, Option.elim, dif_neg, not_false_iff, Subtype.coe_eta, Subtype.coe_mk]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\n⊢ Function.RightInverse\n    (fun y =>\n      Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n        { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n    fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) }\n[PROOFSTEP]\nrintro (_ | y)\n[GOAL]\ncase refine'_2.none\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\n⊢ (fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) })\n      ((fun y =>\n          Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n            { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n        none) =\n    none\n[PROOFSTEP]\nsimp only [Option.elim, dif_pos]\n[GOAL]\ncase refine'_2.some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\ny : { i // i ∈ t }\n⊢ (fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) })\n      ((fun y =>\n          Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n            { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n        (some y)) =\n    some y\n[PROOFSTEP]\nhave : ↑y ≠ x := by\n  rintro ⟨⟩\n  exact h y.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\ny : { i // i ∈ t }\n⊢ ↑y ≠ x\n[PROOFSTEP]\nrintro ⟨⟩\n[GOAL]\ncase refl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\ny : { i // i ∈ t }\nh : ¬↑y ∈ t\n⊢ False\n[PROOFSTEP]\nexact h y.2\n[GOAL]\ncase refine'_2.some\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nt : Finset α\nx : α\nh : ¬x ∈ t\ny : { i // i ∈ t }\nthis : ↑y ≠ x\n⊢ (fun y => if h : ↑y = x then none else some { val := ↑y, property := (_ : ↑y ∈ t) })\n      ((fun y =>\n          Option.elim y { val := x, property := (_ : x ∈ insert x t) } fun z =>\n            { val := ↑z, property := (_ : ↑z ∈ insert x t) })\n        (some y)) =\n    some y\n[PROOFSTEP]\nsimp only [this, Option.elim, Subtype.eta, dif_neg, not_false_iff, Subtype.coe_mk]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ _root_.Disjoint (insert a s) t ↔ ¬a ∈ t ∧ _root_.Disjoint s t\n[PROOFSTEP]\nsimp only [disjoint_left, mem_insert, or_imp, forall_and, forall_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ _root_.Disjoint (insert a t) s ↔ ¬a ∈ s ∧ _root_.Disjoint s t\n[PROOFSTEP]\nrw [disjoint_insert_left, _root_.disjoint_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b : α\ns t : Finset α\nh : _root_.Disjoint s t\na : α\n⊢ a ∈ disjUnion s t h ↔ a ∈ s ∪ t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\n⊢ ¬a ∈ s ∪ t ↔ ¬a ∈ s ∧ ¬a ∈ t\n[PROOFSTEP]\nrw [mem_union, not_or]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u✝ v : Finset α\na b : α\ns t u : Finset α\nx✝ : α\n⊢ x✝ ∈ s ∪ (t ∪ u) ↔ x✝ ∈ t ∪ (s ∪ u)\n[PROOFSTEP]\nsimp only [mem_union, or_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u✝ v : Finset α\na b : α\ns t u : Finset α\nx : α\n⊢ x ∈ s ∪ t ∪ u ↔ x ∈ s ∪ u ∪ t\n[PROOFSTEP]\nsimp only [mem_union, or_assoc, @or_comm (x ∈ t)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\ns : Finset α\nx : α\n⊢ x ∈ s ∨ x ∈ ∅ ↔ x ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\ns : Finset α\nx : α\n⊢ x ∈ ∅ ∨ x ∈ s ↔ x ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ insert a s ∪ t = insert a (s ∪ t)\n[PROOFSTEP]\nsimp only [insert_eq, union_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ s ∪ insert a t = insert a (s ∪ t)\n[PROOFSTEP]\nsimp only [insert_eq, union_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ insert a (s ∪ t) = insert a s ∪ insert a t\n[PROOFSTEP]\nsimp only [insert_union, union_insert, insert_idem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ s = s ∪ t ↔ t ⊆ s\n[PROOFSTEP]\nrw [← union_eq_left_iff_subset, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ s = t ∪ s ↔ t ⊆ s\n[PROOFSTEP]\nrw [← union_eq_right_iff_subset, eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\n⊢ _root_.Disjoint (s ∪ t) u ↔ _root_.Disjoint s u ∧ _root_.Disjoint t u\n[PROOFSTEP]\nsimp only [disjoint_left, mem_union, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\n⊢ _root_.Disjoint s (t ∪ u) ↔ _root_.Disjoint s t ∧ _root_.Disjoint s u\n[PROOFSTEP]\nsimp only [disjoint_right, mem_union, or_imp, forall_and]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\n⊢ ∀ (a b : Finset α), P a b\n[PROOFSTEP]\nintro a b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na b : Finset α\n⊢ P a b\n[PROOFSTEP]\nrefine' Finset.induction_on b empty_right fun x s _xs hi => symm _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na b : Finset α\nx : α\ns : Finset α\n_xs : ¬x ∈ s\nhi : P a s\n⊢ P (insert x s) a\n[PROOFSTEP]\nrw [Finset.insert_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na b : Finset α\nx : α\ns : Finset α\n_xs : ¬x ∈ s\nhi : P a s\n⊢ P ({x} ∪ s) a\n[PROOFSTEP]\napply union_of _ (symm hi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na b : Finset α\nx : α\ns : Finset α\n_xs : ¬x ∈ s\nhi : P a s\n⊢ P {x} a\n[PROOFSTEP]\nrefine' Finset.induction_on a empty_right fun a t _ta hi => symm _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝¹ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na✝ b : Finset α\nx : α\ns : Finset α\n_xs : ¬x ∈ s\nhi✝ : P a✝ s\na : α\nt : Finset α\n_ta : ¬a ∈ t\nhi : P {x} t\n⊢ P (insert a t) {x}\n[PROOFSTEP]\nrw [Finset.insert_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝¹ b✝ : α\nP : Finset α → Finset α → Prop\nsymm : ∀ {a b : Finset α}, P a b → P b a\nempty_right : ∀ {a : Finset α}, P a ∅\nsingletons : ∀ {a b : α}, P {a} {b}\nunion_of : ∀ {a b c : Finset α}, P a c → P b c → P (a ∪ b) c\na✝ b : Finset α\nx : α\ns : Finset α\n_xs : ¬x ∈ s\nhi✝ : P a✝ s\na : α\nt : Finset α\n_ta : ¬a ∈ t\nhi : P {x} t\n⊢ P ({a} ∪ t) {x}\n[PROOFSTEP]\nexact union_of singletons (symm hi)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nhs : ↑s ⊆ ⋃ (i : ι), f i\n⊢ ∃ i, ↑s ⊆ f i\n[PROOFSTEP]\nclassical\nrevert hs\nrefine' s.induction_on _ _\n· refine' fun _ => ⟨hn.some, _⟩\n  simp only [coe_empty, Set.empty_subset]\n· intro b t _hbt htc hbtc\n  obtain ⟨i : ι, hti : (t : Set α) ⊆ f i⟩ := htc (Set.Subset.trans (t.subset_insert b) hbtc)\n  obtain ⟨j, hbj⟩ : ∃ j, b ∈ f j := by simpa [Set.mem_iUnion₂] using hbtc (t.mem_insert_self b)\n  rcases h j i with ⟨k, hk, hk'⟩\n  use k\n  rw [coe_insert, Set.insert_subset_iff]\n  exact ⟨hk hbj, _root_.trans hti hk'⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nhs : ↑s ⊆ ⋃ (i : ι), f i\n⊢ ∃ i, ↑s ⊆ f i\n[PROOFSTEP]\nrevert hs\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\n⊢ ↑s ⊆ ⋃ (i : ι), f i → ∃ i, ↑s ⊆ f i\n[PROOFSTEP]\nrefine' s.induction_on _ _\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\n⊢ ↑∅ ⊆ ⋃ (i : ι), f i → ∃ i, ↑∅ ⊆ f i\n[PROOFSTEP]\nrefine' fun _ => ⟨hn.some, _⟩\n[GOAL]\ncase refine'_1\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nx✝ : ↑∅ ⊆ ⋃ (i : ι), f i\n⊢ ↑∅ ⊆ f (Nonempty.some hn)\n[PROOFSTEP]\nsimp only [coe_empty, Set.empty_subset]\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\n⊢ ∀ ⦃a : α⦄ {s : Finset α},\n    ¬a ∈ s → (↑s ⊆ ⋃ (i : ι), f i → ∃ i, ↑s ⊆ f i) → ↑(insert a s) ⊆ ⋃ (i : ι), f i → ∃ i, ↑(insert a s) ⊆ f i\n[PROOFSTEP]\nintro b t _hbt htc hbtc\n[GOAL]\ncase refine'_2\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\n⊢ ∃ i, ↑(insert b t) ⊆ f i\n[PROOFSTEP]\nobtain ⟨i : ι, hti : (t : Set α) ⊆ f i⟩ := htc (Set.Subset.trans (t.subset_insert b) hbtc)\n[GOAL]\ncase refine'_2.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\n⊢ ∃ i, ↑(insert b t) ⊆ f i\n[PROOFSTEP]\nobtain ⟨j, hbj⟩ : ∃ j, b ∈ f j := by simpa [Set.mem_iUnion₂] using hbtc (t.mem_insert_self b)\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\n⊢ ∃ j, b ∈ f j\n[PROOFSTEP]\nsimpa [Set.mem_iUnion₂] using hbtc (t.mem_insert_self b)\n[GOAL]\ncase refine'_2.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\nj : ι\nhbj : b ∈ f j\n⊢ ∃ i, ↑(insert b t) ⊆ f i\n[PROOFSTEP]\nrcases h j i with ⟨k, hk, hk'⟩\n[GOAL]\ncase refine'_2.intro.intro.intro.intro\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\nj : ι\nhbj : b ∈ f j\nk : ι\nhk : f j ⊆ f k\nhk' : f i ⊆ f k\n⊢ ∃ i, ↑(insert b t) ⊆ f i\n[PROOFSTEP]\nuse k\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\nj : ι\nhbj : b ∈ f j\nk : ι\nhk : f j ⊆ f k\nhk' : f i ⊆ f k\n⊢ ↑(insert b t) ⊆ f k\n[PROOFSTEP]\nrw [coe_insert, Set.insert_subset_iff]\n[GOAL]\ncase h\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α✝\na b✝ : α✝\nα : Type u_4\nι : Type u_5\nhn : Nonempty ι\nf : ι → Set α\nh : Directed (fun x x_1 => x ⊆ x_1) f\ns : Finset α\nb : α\nt : Finset α\n_hbt : ¬b ∈ t\nhtc : ↑t ⊆ ⋃ (i : ι), f i → ∃ i, ↑t ⊆ f i\nhbtc : ↑(insert b t) ⊆ ⋃ (i : ι), f i\ni : ι\nhti : ↑t ⊆ f i\nj : ι\nhbj : b ∈ f j\nk : ι\nhk : f j ⊆ f k\nhk' : f i ⊆ f k\n⊢ b ∈ f k ∧ ↑t ⊆ f k\n[PROOFSTEP]\nexact ⟨hk hbj, _root_.trans hti hk'⟩\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nf : ι → Set α\nc : Set ι\nhn : Set.Nonempty c\nhc : DirectedOn (fun i j => f i ⊆ f j) c\ns : Finset α\nhs : ↑s ⊆ ⋃ (i : ι) (_ : i ∈ c), f i\n⊢ ∃ i, i ∈ c ∧ ↑s ⊆ f i\n[PROOFSTEP]\nrw [Set.biUnion_eq_iUnion] at hs \n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nf : ι → Set α\nc : Set ι\nhn : Set.Nonempty c\nhc : DirectedOn (fun i j => f i ⊆ f j) c\ns : Finset α\nhs : ↑s ⊆ ⋃ (x : ↑c), f ↑x\n⊢ ∃ i, i ∈ c ∧ ↑s ⊆ f i\n[PROOFSTEP]\nhaveI := hn.coe_sort\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nf : ι → Set α\nc : Set ι\nhn : Set.Nonempty c\nhc : DirectedOn (fun i j => f i ⊆ f j) c\ns : Finset α\nhs : ↑s ⊆ ⋃ (x : ↑c), f ↑x\nthis : Nonempty ↑c\n⊢ ∃ i, i ∈ c ∧ ↑s ⊆ f i\n[PROOFSTEP]\nobtain ⟨⟨i, hic⟩, hi⟩ := (directed_comp.2 hc.directed_val).exists_mem_subset_of_finset_subset_biUnion hs\n[GOAL]\ncase intro.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α✝\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α✝\na b : α✝\nα : Type u_4\nι : Type u_5\nf : ι → Set α\nc : Set ι\nhn : Set.Nonempty c\nhc : DirectedOn (fun i j => f i ⊆ f j) c\ns : Finset α\nhs : ↑s ⊆ ⋃ (x : ↑c), f ↑x\nthis : Nonempty ↑c\ni : ι\nhic : i ∈ c\nhi : ↑s ⊆ ((fun j => f j) ∘ Subtype.val) { val := i, property := hic }\n⊢ ∃ i, i ∈ c ∧ ↑s ⊆ f i\n[PROOFSTEP]\nexact ⟨i, hic, hi⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u✝ v : Finset α\na b : α\ns₁ s₂ u : Finset α\n⊢ s₁ ⊆ s₂ → s₁ ⊆ u → s₁ ⊆ s₂ ∩ u\n[PROOFSTEP]\nsimp (config := { contextual := true }) [subset_iff, mem_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ (s ∪ t) ∩ s = s\n[PROOFSTEP]\nrw [← coe_inj, coe_inter, coe_union, Set.union_inter_cancel_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ (s ∪ t) ∩ t = t\n[PROOFSTEP]\nrw [← coe_inj, coe_inter, coe_union, Set.union_inter_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ : Finset α\nx✝ : α\n⊢ x✝ ∈ s₁ ∩ s₂ ↔ x✝ ∈ s₂ ∩ s₁\n[PROOFSTEP]\nsimp only [mem_inter, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ s₃ : Finset α\nx✝ : α\n⊢ x✝ ∈ s₁ ∩ s₂ ∩ s₃ ↔ x✝ ∈ s₁ ∩ (s₂ ∩ s₃)\n[PROOFSTEP]\nsimp only [mem_inter, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ s₃ : Finset α\nx✝ : α\n⊢ x✝ ∈ s₁ ∩ (s₂ ∩ s₃) ↔ x✝ ∈ s₂ ∩ (s₁ ∩ s₃)\n[PROOFSTEP]\nsimp only [mem_inter, and_left_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ s₃ : Finset α\nx✝ : α\n⊢ x✝ ∈ s₁ ∩ s₂ ∩ s₃ ↔ x✝ ∈ s₁ ∩ s₃ ∩ s₂\n[PROOFSTEP]\nsimp only [mem_inter, and_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\ns : Finset α\nx✝ : α\n⊢ x✝ ∈ s ∧ x✝ ∈ ∅ ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\ns : Finset α\nx✝ : α\n⊢ x✝ ∈ ∅ ∧ x✝ ∈ s ↔ x✝ ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ s ∩ (t ∪ s) = s\n[PROOFSTEP]\nrw [inter_comm, union_inter_cancel_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : a ∈ s₂\nx : α\n⊢ x ∈ insert a s₁ ∩ s₂ ↔ x ∈ insert a (s₁ ∩ s₂)\n[PROOFSTEP]\nhave : x = a ∨ x ∈ s₂ ↔ x ∈ s₂ := or_iff_right_of_imp <| by rintro rfl; exact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : a ∈ s₂\nx : α\n⊢ x = a → x ∈ s₂\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ : Finset α\nx : α\nh : x ∈ s₂\n⊢ x ∈ s₂\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : a ∈ s₂\nx : α\nthis : x = a ∨ x ∈ s₂ ↔ x ∈ s₂\n⊢ x ∈ insert a s₁ ∩ s₂ ↔ x ∈ insert a (s₁ ∩ s₂)\n[PROOFSTEP]\nsimp only [mem_inter, mem_insert, or_and_left, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : a ∈ s₁\n⊢ s₁ ∩ insert a s₂ = insert a (s₁ ∩ s₂)\n[PROOFSTEP]\nrw [inter_comm, insert_inter_of_mem h, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : ¬a ∈ s₂\nx : α\n⊢ x ∈ insert a s₁ ∩ s₂ ↔ x ∈ s₁ ∩ s₂\n[PROOFSTEP]\nhave : ¬(x = a ∧ x ∈ s₂) := by rintro ⟨rfl, H⟩; exact h H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : ¬a ∈ s₂\nx : α\n⊢ ¬(x = a ∧ x ∈ s₂)\n[PROOFSTEP]\nrintro ⟨rfl, H⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na b : α\ns₁ s₂ : Finset α\nx : α\nH : x ∈ s₂\nh : ¬x ∈ s₂\n⊢ False\n[PROOFSTEP]\nexact h H\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : ¬a ∈ s₂\nx : α\nthis : ¬(x = a ∧ x ∈ s₂)\n⊢ x ∈ insert a s₁ ∩ s₂ ↔ x ∈ s₁ ∩ s₂\n[PROOFSTEP]\nsimp only [mem_inter, mem_insert, or_and_right, this, false_or_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁✝ s₂✝ t t₁ t₂ u v : Finset α\na✝ b : α\ns₁ s₂ : Finset α\na : α\nh : ¬a ∈ s₁\n⊢ s₁ ∩ insert a s₂ = s₁ ∩ s₂\n[PROOFSTEP]\nrw [inter_comm, insert_inter_of_not_mem h, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b a : α\ns : Finset α\nH : a ∈ s\n⊢ insert a ∅ ∩ s = insert a ∅\n[PROOFSTEP]\nrw [insert_inter_of_mem H, empty_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b a : α\ns : Finset α\nH : ¬a ∈ s\n⊢ ∀ (x : α), ¬x ∈ {a} ∩ s\n[PROOFSTEP]\nsimp only [mem_inter, mem_singleton]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b a : α\ns : Finset α\nH : ¬a ∈ s\n⊢ ∀ (x : α), ¬(x = a ∧ x ∈ s)\n[PROOFSTEP]\nrintro x ⟨rfl, h⟩\n[GOAL]\ncase intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\ns : Finset α\nx : α\nh : x ∈ s\nH : ¬x ∈ s\n⊢ False\n[PROOFSTEP]\nexact H h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b a : α\ns : Finset α\nh : a ∈ s\n⊢ s ∩ {a} = {a}\n[PROOFSTEP]\nrw [inter_comm, singleton_inter_of_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b a : α\ns : Finset α\nh : ¬a ∈ s\n⊢ s ∩ {a} = ∅\n[PROOFSTEP]\nrw [inter_comm, singleton_inter_of_not_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\nx y s t : Finset α\nh : x ⊆ y\nh' : s ⊆ t\n⊢ x ∩ s ⊆ y ∩ t\n[PROOFSTEP]\nintro a a_in\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b : α\nx y s t : Finset α\nh : x ⊆ y\nh' : s ⊆ t\na : α\na_in : a ∈ x ∩ s\n⊢ a ∈ y ∩ t\n[PROOFSTEP]\nrw [Finset.mem_inter] at a_in ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na✝ b : α\nx y s t : Finset α\nh : x ⊆ y\nh' : s ⊆ t\na : α\na_in : a ∈ x ∧ a ∈ s\n⊢ a ∈ y ∧ a ∈ t\n[PROOFSTEP]\nexact ⟨h a_in.1, h' a_in.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na✝ b✝ : α\na b c : Finset α\n⊢ (a ⊔ b) ⊓ (a ⊔ c) ≤ a ⊔ b ⊓ c\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [sup_eq_union, inf_eq_inter, le_eq_subset, subset_iff, mem_inter,\n  mem_union, and_imp, or_imp, true_or_iff, imp_true_iff, true_and_iff, or_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns s₁ s₂ t t₁ t₂ u v : Finset α\na b : α\n⊢ (∃ a, a ∈ s ∧ a ∈ t) ↔ Finset.Nonempty (s ∩ t)\n[PROOFSTEP]\nsimp [Finset.Nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ _root_.Disjoint s t ∨ Finset.Nonempty (s ∩ t)\n[PROOFSTEP]\nrw [← not_disjoint_iff_nonempty_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ s₁ s₂ t✝ t₁ t₂ u v : Finset α\na b : α\ns t : Finset α\n⊢ _root_.Disjoint s t ∨ ¬_root_.Disjoint s t\n[PROOFSTEP]\nexact em _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ IsDirected (Finset α) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nclassical infer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\n⊢ IsDirected (Finset α) fun x x_1 => x ≤ x_1\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝ b a : α\n⊢ erase {a} a = ∅\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na✝ b a x : α\n⊢ x ∈ erase {a} a ↔ x ∈ ∅\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ a ≠ b → a ∈ s → a ∈ erase s b\n[PROOFSTEP]\nsimp only [mem_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ a ≠ b → a ∈ s → a ≠ b ∧ a ∈ s\n[PROOFSTEP]\nexact And.intro\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nhs : b ∈ s\nhsa : ¬b ∈ erase s a\n⊢ b = a\n[PROOFSTEP]\nrw [mem_erase, not_and] at hsa \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nhs : b ∈ s\nhsa : b ≠ a → ¬b ∈ s\n⊢ b = a\n[PROOFSTEP]\nexact not_imp_not.mp hsa hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b : α\ns : Finset α\na x : α\n⊢ x ∈ erase (insert a s) a ↔ x ∈ erase s a\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [mem_erase, mem_insert, and_congr_right_iff, false_or_iff, iff_self_iff,\n  imp_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nh : ¬a ∈ s\n⊢ erase (insert a s) a = s\n[PROOFSTEP]\nrw [erase_insert_eq_erase, erase_eq_of_not_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nh : a ≠ b\nx : α\n⊢ x ∈ erase (insert a s) b ↔ x ∈ insert a (erase s b)\n[PROOFSTEP]\nhave : x ≠ b ∧ x = a ↔ x = a := and_iff_right_of_imp fun hx => hx.symm ▸ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nh : a ≠ b\nx : α\nthis : x ≠ b ∧ x = a ↔ x = a\n⊢ x ∈ erase (insert a s) b ↔ x ∈ insert a (erase s b)\n[PROOFSTEP]\nsimp only [mem_erase, mem_insert, and_or_left, this]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nha : ¬a ∈ s\nhb : a ≠ b\n⊢ erase (cons a s ha) b = cons a (erase s b) (_ : a ∈ erase s b → False)\n[PROOFSTEP]\nsimp only [cons_eq_insert, erase_insert_of_ne hb]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nh : a ∈ s\nx : α\n⊢ x ∈ insert a (erase s a) ↔ x ∈ s\n[PROOFSTEP]\nsimp only [mem_insert, mem_erase, or_and_left, dec_em, true_and_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nh : a ∈ s\nx : α\n⊢ x = a ∨ x ∈ s ↔ x ∈ s\n[PROOFSTEP]\napply or_iff_right_of_imp\n[GOAL]\ncase ha\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nh : a ∈ s\nx : α\n⊢ x = a → x ∈ s\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase ha\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b : α\ns : Finset α\nx : α\nh : x ∈ s\n⊢ x ∈ s\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\nx✝ : α\n⊢ x✝ ≠ a ∧ x✝ ∈ s ↔ x✝ ∈ ↑s \\ {a}\n[PROOFSTEP]\nrw [and_comm, Set.mem_diff, Set.mem_singleton_iff, mem_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\n⊢ s ⊂ t ↔ ∃ a, a ∈ t ∧ s ⊆ erase t a\n[PROOFSTEP]\nrefine' ⟨fun h => _, fun ⟨a, ha, h⟩ => ssubset_of_subset_of_ssubset h <| erase_ssubset ha⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\nh : s ⊂ t\n⊢ ∃ a, a ∈ t ∧ s ⊆ erase t a\n[PROOFSTEP]\nobtain ⟨a, ht, hs⟩ := not_subset.1 h.2\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\nh : s ⊂ t\na : α\nht : a ∈ t\nhs : ¬a ∈ s\n⊢ ∃ a, a ∈ t ∧ s ⊆ erase t a\n[PROOFSTEP]\nexact ⟨a, ht, subset_erase.2 ⟨h.1, hs⟩⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b : α\ns : Finset α\na : α\nh : ¬a ∈ s\n⊢ erase (cons a s h) a = s\n[PROOFSTEP]\nrw [cons_eq_insert, erase_insert_eq_erase, erase_eq_of_not_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\n⊢ erase (erase s a) a = erase s a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\n⊢ erase (erase s a) b = erase (erase s b) a\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nx : α\n⊢ x ∈ erase (erase s a) b ↔ x ∈ erase (erase s b) a\n[PROOFSTEP]\nsimp only [mem_erase, ← and_assoc]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b✝ a b : α\ns : Finset α\nx : α\n⊢ (x ≠ b ∧ x ≠ a) ∧ x ∈ s ↔ (x ≠ a ∧ x ≠ b) ∧ x ∈ s\n[PROOFSTEP]\nrw [@and_comm (x ≠ a)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ s ⊆ insert a t ↔ erase s a ⊆ t\n[PROOFSTEP]\nsimp only [subset_iff, or_iff_not_imp_left, mem_erase, mem_insert, and_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ (∀ ⦃x : α⦄, x ∈ s → ¬x = a → x ∈ t) ↔ ∀ ⦃x : α⦄, x ≠ a → x ∈ s → x ∈ t\n[PROOFSTEP]\nexact forall_congr' fun x => forall_swap\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nh : ¬a ∈ s\n⊢ s ⊆ insert a t ↔ s ⊆ t\n[PROOFSTEP]\nrw [subset_insert_iff, erase_eq_of_not_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nh : a ∈ t\n⊢ erase s a ⊆ t ↔ s ⊆ t\n[PROOFSTEP]\nrw [← subset_insert_iff, insert_eq_of_mem h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b x y : α\ns : Finset α\nhx : x ∈ s\n⊢ erase s x = erase s y ↔ x = y\n[PROOFSTEP]\nrefine ⟨fun h => eq_of_mem_of_not_mem_erase hx ?_, congr_arg _⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b x y : α\ns : Finset α\nhx : x ∈ s\nh : erase s x = erase s y\n⊢ ¬x ∈ erase s y\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b x y : α\ns : Finset α\nhx : x ∈ s\nh : erase s x = erase s y\n⊢ ¬x ∈ erase s x\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b a : α\ns : Finset α\nhs : s ∈ {s | a ∈ s}\nt : Finset α\nht : t ∈ {s | a ∈ s}\nh : erase s a = (fun s => erase s a) t\n⊢ s = t\n[PROOFSTEP]\nrw [← insert_erase hs, ← insert_erase ht, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\ns₁ s₂ : Finset α\n⊢ ∀ (x : α), ¬x ∈ s₁ ∩ (s₂ \\ s₁)\n[PROOFSTEP]\nsimp only [mem_inter, mem_sdiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\ns₁ s₂ : Finset α\n⊢ ∀ (x : α), ¬(x ∈ s₁ ∧ x ∈ s₂ ∧ ¬x ∈ s₁)\n[PROOFSTEP]\nrintro x ⟨h, _, hn⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\ns₁ s₂ : Finset α\nx : α\nh : x ∈ s₁\nleft✝ : x ∈ s₂\nhn : ¬x ∈ s₁\n⊢ False\n[PROOFSTEP]\nexact hn h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nx y : Finset α\n⊢ x ⊓ y ⊔ x \\ y = x\n[PROOFSTEP]\nsimp only [ext_iff, mem_union, mem_sdiff, inf_eq_inter, sup_eq_union, mem_inter, ← and_or_left, em, and_true,\n  implies_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nx y : Finset α\n⊢ x ⊓ y ⊓ x \\ y = ⊥\n[PROOFSTEP]\nsimp only [ext_iff, inter_sdiff_self, inter_empty, inter_assoc, false_iff_iff, inf_eq_inter, not_mem_empty,\n  bot_eq_empty, not_false_iff, implies_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nh : a ∈ t\n⊢ ¬a ∈ s \\ t\n[PROOFSTEP]\nsimp only [mem_sdiff, h, not_true, not_false_iff, and_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nh : ¬a ∈ s\n⊢ ¬a ∈ s \\ t\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u✝ v : Finset α\na b : α\ns t u : Finset α\n⊢ s ∩ (t \\ u) = (s ∩ t) \\ u\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u✝ v : Finset α\na b : α\ns t u : Finset α\nx : α\n⊢ x ∈ s ∩ (t \\ u) ↔ x ∈ (s ∩ t) \\ u\n[PROOFSTEP]\nsimp [and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ s ∪ t \\ s = t ∪ s \\ t\n[PROOFSTEP]\nsimp [union_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\nx : α\nh : ¬x ∈ t\n⊢ insert x s \\ t = insert x (s \\ t)\n[PROOFSTEP]\nrw [← coe_inj, coe_insert, coe_sdiff, coe_sdiff, coe_insert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\nx : α\nh : ¬x ∈ t\n⊢ insert x ↑s \\ ↑t = insert x (↑s \\ ↑t)\n[PROOFSTEP]\nexact Set.insert_diff_of_not_mem _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b : α\ns : Finset α\nx : α\nh : x ∈ t\n⊢ insert x s \\ t = s \\ t\n[PROOFSTEP]\nrw [← coe_inj, coe_sdiff, coe_sdiff, coe_insert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b : α\ns : Finset α\nx : α\nh : x ∈ t\n⊢ insert x ↑s \\ ↑t = ↑s \\ ↑t\n[PROOFSTEP]\nexact Set.insert_diff_of_mem _ h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b x : α\nh : ¬x ∈ s\nt : Finset α\n⊢ s \\ insert x t = s \\ t\n[PROOFSTEP]\nrefine' Subset.antisymm (sdiff_subset_sdiff (Subset.refl _) (subset_insert _ _)) fun y hy => _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b x : α\nh : ¬x ∈ s\nt : Finset α\ny : α\nhy : y ∈ s \\ t\n⊢ y ∈ s \\ insert x t\n[PROOFSTEP]\nsimp only [mem_sdiff, mem_insert, not_or] at hy ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b x : α\nh : ¬x ∈ s\nt : Finset α\ny : α\nhy : y ∈ s ∧ ¬y ∈ t\n⊢ y ∈ s ∧ ¬y = x ∧ ¬y ∈ t\n[PROOFSTEP]\nexact ⟨hy.1, fun hxy => h <| hxy ▸ hy.1, hy.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b a : α\ns : Finset α\n⊢ s \\ {a} = erase s a\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝¹ b a : α\ns : Finset α\na✝ : α\n⊢ a✝ ∈ s \\ {a} ↔ a✝ ∈ erase s a\n[PROOFSTEP]\nrw [mem_erase, mem_sdiff, mem_singleton, and_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\n⊢ _root_.Disjoint (erase s a) t ↔ _root_.Disjoint s (erase t a)\n[PROOFSTEP]\nsimp_rw [erase_eq, disjoint_sdiff_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : ¬a ∈ t\nhst : _root_.Disjoint (erase s a) t\n⊢ _root_.Disjoint s t\n[PROOFSTEP]\nrw [← erase_insert ha, ← disjoint_erase_comm, disjoint_insert_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : ¬a ∈ t\nhst : _root_.Disjoint (erase s a) t\n⊢ ¬a ∈ erase s a ∧ _root_.Disjoint (erase s a) t\n[PROOFSTEP]\nexact ⟨not_mem_erase _ _, hst⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : ¬a ∈ s\nhst : _root_.Disjoint s (erase t a)\n⊢ _root_.Disjoint s t\n[PROOFSTEP]\nrw [← erase_insert ha, disjoint_erase_comm, disjoint_insert_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : ¬a ∈ s\nhst : _root_.Disjoint s (erase t a)\n⊢ ¬a ∈ erase t a ∧ _root_.Disjoint s (erase t a)\n[PROOFSTEP]\nexact ⟨not_mem_erase _ _, hst⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ s ∩ erase t a = erase (s ∩ t) a\n[PROOFSTEP]\nsimp only [erase_eq, inter_sdiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b a : α\ns t : Finset α\n⊢ erase s a ∩ t = erase (s ∩ t) a\n[PROOFSTEP]\nsimpa only [inter_comm t] using inter_erase a t s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ erase s a \\ t = erase (s \\ t) a\n[PROOFSTEP]\nsimp_rw [erase_eq, sdiff_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ insert a s ∪ t = s ∪ insert a t\n[PROOFSTEP]\nrw [insert_union, union_insert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ erase s a ∩ t = s ∩ erase t a\n[PROOFSTEP]\nrw [erase_inter, inter_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ erase (s ∪ t) a = erase s a ∪ erase t a\n[PROOFSTEP]\nsimp_rw [erase_eq, union_sdiff_distrib]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ insert a (s ∩ t) = insert a s ∩ insert a t\n[PROOFSTEP]\nsimp_rw [insert_eq, union_distrib_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na✝ b : α\ns t : Finset α\na : α\n⊢ erase (s \\ t) a = erase s a \\ erase t a\n[PROOFSTEP]\nsimp_rw [erase_eq, sdiff_sdiff, sup_sdiff_eq_sup le_rfl, sup_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na b : α\nha : a ∈ t\ns : Finset α\n⊢ erase s a ∪ t = s ∪ t\n[PROOFSTEP]\nrw [← insert_erase (mem_union_right s ha), erase_union_distrib, ← union_insert, insert_erase ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t✝ u v : Finset α\na b : α\nha : a ∈ s\nt : Finset α\n⊢ s ∪ erase t a = s ∪ t\n[PROOFSTEP]\nrw [← insert_erase (mem_union_left t ha), erase_union_distrib, ← insert_union, insert_erase ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : ¬a ∈ s\n⊢ _root_.Disjoint {a} s\n[PROOFSTEP]\nsimp [ha]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nhts : t ⊆ s\nha : a ∈ t\n⊢ s \\ t ∪ erase t a = erase s a\n[PROOFSTEP]\nsimp_rw [erase_eq, sdiff_union_sdiff_cancel hts (singleton_subset_iff.2 ha)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\nx : α\n⊢ s \\ insert x t = erase (s \\ t) x\n[PROOFSTEP]\nsimp_rw [← sdiff_singleton_eq_erase, insert_eq, sdiff_sdiff_left', sdiff_union_distrib, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ u v : Finset α\na b : α\ns t : Finset α\nx : α\nhxs : x ∈ s\nhxt : ¬x ∈ t\n⊢ insert x (s \\ insert x t) = s \\ t\n[PROOFSTEP]\nrw [sdiff_insert, insert_erase (mem_sdiff.mpr ⟨hxs, hxt⟩)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nh : a ∈ s\n⊢ s \\ erase t a = insert a (s \\ t)\n[PROOFSTEP]\nrw [← sdiff_singleton_eq_erase, sdiff_sdiff_eq_sdiff_union (singleton_subset_iff.2 h), insert_eq, union_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t u v : Finset α\na b : α\nha : a ∈ s\n⊢ s \\ erase s a = {a}\n[PROOFSTEP]\nrw [sdiff_erase ha, sdiff_self, insert_emptyc_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t u v : Finset α\na✝ b : α\ns : Finset α\na : α\n⊢ erase s a = ∅ ↔ s = ∅ ∨ s = {a}\n[PROOFSTEP]\nrw [← sdiff_singleton_eq_erase, sdiff_eq_empty_iff_subset, subset_singleton_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Finset α\na b : α\n⊢ a ∈ s ∆ t ↔ a ∈ s ∧ ¬a ∈ t ∨ a ∈ t ∧ ¬a ∈ s\n[PROOFSTEP]\nsimp_rw [symmDiff, sup_eq_union, mem_union, mem_sdiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Finset α\na b x : α\n⊢ x ∈ ↑(s ∆ t) ↔ x ∈ ↑s ∆ ↑t\n[PROOFSTEP]\nsimp [mem_symmDiff, Set.mem_symmDiff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SizeOf α\nx : α\ns : Finset α\nhx : x ∈ s\n⊢ sizeOf x < sizeOf s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SizeOf α\nx : α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\nhx : x ∈ { val := val✝, nodup := nodup✝ }\n⊢ sizeOf x < sizeOf { val := val✝, nodup := nodup✝ }\n[PROOFSTEP]\ndsimp [SizeOf.sizeOf, SizeOf.sizeOf, Multiset.sizeOf]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SizeOf α\nx : α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\nhx : x ∈ { val := val✝, nodup := nodup✝ }\n⊢ sizeOf x < 1 + Quot.liftOn val✝ (fun m => List._sizeOf_1 m) (_ : ∀ (x x_1 : List α), x ~ x_1 → sizeOf x = sizeOf x_1)\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SizeOf α\nx : α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\nhx : x ∈ { val := val✝, nodup := nodup✝ }\n⊢ sizeOf x < Quot.liftOn val✝ (fun m => List._sizeOf_1 m) (_ : ∀ (x x_1 : List α), x ~ x_1 → sizeOf x = sizeOf x_1) + 1\n[PROOFSTEP]\nrefine' lt_trans _ (Nat.lt_succ_self _)\n[GOAL]\ncase mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : SizeOf α\nx : α\nval✝ : Multiset α\nnodup✝ : Nodup val✝\nhx : x ∈ { val := val✝, nodup := nodup✝ }\n⊢ sizeOf x < Quot.liftOn val✝ (fun m => List._sizeOf_1 m) (_ : ∀ (x x_1 : List α), x ~ x_1 → sizeOf x = sizeOf x_1)\n[PROOFSTEP]\nexact Multiset.sizeOf_lt_sizeOf_of_mem hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\n⊢ Finset.Nonempty (attach s) ↔ Finset.Nonempty s\n[PROOFSTEP]\nsimp [Finset.Nonempty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\n⊢ attach s = ∅ ↔ s = ∅\n[PROOFSTEP]\nsimp [eq_empty_iff_forall_not_mem]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\n⊢ piecewise (insert j s) f g j = f j\n[PROOFSTEP]\nsimp [piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (i : α) → Decidable (i ∈ ∅)\n⊢ piecewise ∅ f g = g\n[PROOFSTEP]\next i\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (i : α) → Decidable (i ∈ ∅)\ni : α\n⊢ piecewise ∅ f g i = g i\n[PROOFSTEP]\nsimp [piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : (j : α) → Decidable (j ∈ ↑s)\n⊢ Set.piecewise (↑s) f g = piecewise s f g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : (j : α) → Decidable (j ∈ ↑s)\nx✝ : α\n⊢ Set.piecewise (↑s) f g x✝ = piecewise s f g x✝\n[PROOFSTEP]\ncongr\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (j : α) → Decidable (j ∈ s)\ni : α\nhi : i ∈ s\n⊢ piecewise s f g i = f i\n[PROOFSTEP]\nsimp [piecewise, hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (j : α) → Decidable (j ∈ s)\ni : α\nhi : ¬i ∈ s\n⊢ piecewise s f g i = g i\n[PROOFSTEP]\nsimp [piecewise, hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\ni j : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\nh : i ≠ j\n⊢ piecewise (insert j s) f g i = piecewise s f g i\n[PROOFSTEP]\nsimp [piecewise, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\n⊢ piecewise (insert j s) f g = update (piecewise s f g) j (f j)\n[PROOFSTEP]\nclassical simp only [← piecewise_coe, coe_insert, ← Set.piecewise_insert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\n⊢ piecewise (insert j s) f g = update (piecewise s f g) j (f j)\n[PROOFSTEP]\nsimp only [← piecewise_coe, coe_insert, ← Set.piecewise_insert]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\n⊢ Set.piecewise (↑(insert j s)) f g = Set.piecewise (insert j ↑s) f g\n[PROOFSTEP]\next\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\nx✝ : α\n⊢ Set.piecewise (↑(insert j s)) f g x✝ = Set.piecewise (insert j ↑s) f g x✝\n[PROOFSTEP]\ncongr\n[GOAL]\ncase h.e_s\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝² : (j : α) → Decidable (j ∈ s)\ninst✝¹ : DecidableEq α\nj : α\ninst✝ : (i : α) → Decidable (i ∈ insert j s)\nx✝ : α\n⊢ ↑(insert j s) = insert j ↑s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (j : α) → Decidable (j ∈ s)\ni : α\np : δ i → Prop\nhf : p (f i)\nhg : p (g i)\n⊢ p (piecewise s f g i)\n[PROOFSTEP]\nby_cases hi : i ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (j : α) → Decidable (j ∈ s)\ni : α\np : δ i → Prop\nhf : p (f i)\nhg : p (g i)\nhi : i ∈ s\n⊢ p (piecewise s f g i)\n[PROOFSTEP]\nsimpa [hi]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝ : (j : α) → Decidable (j ∈ s)\ni : α\np : δ i → Prop\nhf : p (f i)\nhg : p (g i)\nhi : ¬i ∈ s\n⊢ p (piecewise s f g i)\n[PROOFSTEP]\nsimpa [hi]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\nt : Set α\nt' : (i : α) → Set (δ i)\nf g : (i : α) → δ i\nhf : f ∈ Set.pi t t'\nhg : g ∈ Set.pi t t'\n⊢ piecewise s f g ∈ Set.pi t t'\n[PROOFSTEP]\nclassical\nrw [← piecewise_coe]\nexact Set.piecewise_mem_pi (↑s) hf hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\nt : Set α\nt' : (i : α) → Set (δ i)\nf g : (i : α) → δ i\nhf : f ∈ Set.pi t t'\nhg : g ∈ Set.pi t t'\n⊢ piecewise s f g ∈ Set.pi t t'\n[PROOFSTEP]\nrw [← piecewise_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\nt : Set α\nt' : (i : α) → Set (δ i)\nf g : (i : α) → δ i\nhf : f ∈ Set.pi t t'\nhg : g ∈ Set.pi t t'\n⊢ Set.piecewise (↑s) f g ∈ Set.pi t t'\n[PROOFSTEP]\nexact Set.piecewise_mem_pi (↑s) hf hg\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\n⊢ piecewise {i} f g = update g i (f i)\n[PROOFSTEP]\nrw [← insert_emptyc_eq, piecewise_insert, piecewise_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nv : δ i\n⊢ update (piecewise s f g) i v = piecewise s (update f i v) (update g i v)\n[PROOFSTEP]\next j\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nv : δ i\nj : α\n⊢ update (piecewise s f g) i v j = piecewise s (update f i v) (update g i v) j\n[PROOFSTEP]\nrcases em (j = i) with (rfl | hj)\n[GOAL]\ncase h.inl\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\nj : α\nv : δ j\n⊢ update (piecewise s f g) j v j = piecewise s (update f j v) (update g j v) j\n[PROOFSTEP]\nby_cases hs : j ∈ s\n[GOAL]\ncase h.inr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nv : δ i\nj : α\nhj : ¬j = i\n⊢ update (piecewise s f g) i v j = piecewise s (update f i v) (update g i v) j\n[PROOFSTEP]\nby_cases hs : j ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\nj : α\nv : δ j\nhs : j ∈ s\n⊢ update (piecewise s f g) j v j = piecewise s (update f j v) (update g j v) j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\nj : α\nv : δ j\nhs : ¬j ∈ s\n⊢ update (piecewise s f g) j v j = piecewise s (update f j v) (update g j v) j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nv : δ i\nj : α\nhj : ¬j = i\nhs : j ∈ s\n⊢ update (piecewise s f g) i v j = piecewise s (update f i v) (update g i v) j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nv : δ i\nj : α\nhj : ¬j = i\nhs : ¬j ∈ s\n⊢ update (piecewise s f g) i v j = piecewise s (update f i v) (update g i v) j\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : i ∈ s\nv : δ i\n⊢ update (piecewise s f g) i v = piecewise s (update f i v) g\n[PROOFSTEP]\nrw [update_piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : i ∈ s\nv : δ i\n⊢ piecewise s (update f i v) (update g i v) = piecewise s (update f i v) g\n[PROOFSTEP]\nrefine' s.piecewise_congr (fun _ _ => rfl) fun j hj => update_noteq _ _ _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : i ∈ s\nv : δ i\nj : α\nhj : ¬j ∈ s\n⊢ j ≠ i\n[PROOFSTEP]\nexact fun h => hj (h.symm ▸ hi)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : ¬i ∈ s\nv : δ i\n⊢ update (piecewise s f g) i v = piecewise s f (update g i v)\n[PROOFSTEP]\nrw [update_piecewise]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : ¬i ∈ s\nv : δ i\n⊢ piecewise s (update f i v) (update g i v) = piecewise s f (update g i v)\n[PROOFSTEP]\nrefine' s.piecewise_congr (fun j hj => update_noteq _ _ _) fun _ _ => rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ : α → Sort u_4\ns : Finset α\nf g : (i : α) → δ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\ninst✝ : DecidableEq α\ni : α\nhi : ¬i ∈ s\nv : δ i\nj : α\nhj : j ∈ s\n⊢ j ≠ i\n[PROOFSTEP]\nexact fun h => hi (h ▸ hj)\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\ninst✝ : (i : α) → Preorder (δ i)\nf g f' g' : (i : α) → δ i\nHf : ∀ (x : α), x ∈ s → f x ≤ f' x\nHg : ∀ (x : α), ¬x ∈ s → g x ≤ g' x\nx : α\n⊢ piecewise s f g x ≤ piecewise s f' g' x\n[PROOFSTEP]\nby_cases hx : x ∈ s\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\ninst✝ : (i : α) → Preorder (δ i)\nf g f' g' : (i : α) → δ i\nHf : ∀ (x : α), x ∈ s → f x ≤ f' x\nHg : ∀ (x : α), ¬x ∈ s → g x ≤ g' x\nx : α\nhx : x ∈ s\n⊢ piecewise s f g x ≤ piecewise s f' g' x\n[PROOFSTEP]\nsimp [hx, *]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nδ✝ : α → Sort u_4\ns : Finset α\nf✝ g✝ : (i : α) → δ✝ i\ninst✝¹ : (j : α) → Decidable (j ∈ s)\nδ : α → Type u_5\ninst✝ : (i : α) → Preorder (δ i)\nf g f' g' : (i : α) → δ i\nHf : ∀ (x : α), x ∈ s → f x ≤ f' x\nHg : ∀ (x : α), ¬x ∈ s → g x ≤ g' x\nx : α\nhx : ¬x ∈ s\n⊢ piecewise s f g x ≤ piecewise s f' g' x\n[PROOFSTEP]\nsimp [hx, *]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ Decidable (s ⊂ t)\n[PROOFSTEP]\nrw [ssubset_iff_subset_ne]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ Decidable (s ⊆ t ∧ s ≠ t)\n[PROOFSTEP]\nhave h₁ : Decidable (s ⊆ t) := decidableSubsetFinset\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\ninst✝ : DecidableEq α\ns t : Finset α\nh₁ : Decidable (s ⊆ t)\n⊢ Decidable (s ⊆ t ∧ s ≠ t)\n[PROOFSTEP]\nhave h₂ : Decidable (s ≠ t) := instDecidableNot\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ : Finset α\ninst✝ : DecidableEq α\ns t : Finset α\nh₁ : Decidable (s ⊆ t)\nh₂ : Decidable (s ≠ t)\n⊢ Decidable (s ⊆ t ∧ s ≠ t)\n[PROOFSTEP]\nexact instDecidableAnd\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\np : α → Prop\n_hp : (a : α) → Decidable (p a)\n⊢ (∃ a x, p a) ↔ ∃ a, a ∈ s ∧ p a\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\na : α\n⊢ a ∈ filter q (filter p s) ↔ a ∈ filter (fun a => p a ∧ q a) s\n[PROOFSTEP]\nsimp only [mem_filter, and_assoc, Bool.decide_and, Bool.decide_coe, Bool.and_eq_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\n⊢ filter (fun x => True) s = s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\na✝ : α\n⊢ a✝ ∈ filter (fun x => True) s ↔ a✝ ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\na : α\n⊢ a ∈ filter (fun x => False) s ↔ a ∈ ∅\n[PROOFSTEP]\nsimp [mem_filter, and_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\n⊢ filter p s = s ↔ ∀ (x : α), x ∈ s → p x\n[PROOFSTEP]\nsimp [Finset.ext_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\nh : ∀ (x : α), x ∈ s → ¬p x\n⊢ ∀ (x : α), ¬x ∈ filter p s\n[PROOFSTEP]\nsimpa only [eq_empty_iff_forall_not_mem, mem_filter, not_and] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\n⊢ filter p s = ∅ ↔ ∀ (x : α), x ∈ s → ¬p x\n[PROOFSTEP]\nrefine' ⟨_, filter_false_of_mem⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\n⊢ filter p s = ∅ → ∀ (x : α), x ∈ s → ¬p x\n[PROOFSTEP]\nintro hs\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\nhs : filter p s = ∅\n⊢ ∀ (x : α), x ∈ s → ¬p x\n[PROOFSTEP]\ninjection hs with hs'\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\nhs' : Multiset.filter p s.val = 0\n⊢ ∀ (x : α), x ∈ s → ¬p x\n[PROOFSTEP]\nrwa [filter_eq_nil] at hs' \n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\ns : Finset α\n⊢ Finset.Nonempty (filter p s) ↔ ∃ a, a ∈ s ∧ p a\n[PROOFSTEP]\nsimp [nonempty_iff_ne_empty, Ne.def, filter_eq_empty_iff, not_not, not_forall]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\n⊢ filter p {a} = if p a then {a} else ∅\n[PROOFSTEP]\nclassical\next x\nsimp\nsplit_ifs with h <;> by_cases h' : x = a <;> simp [h, h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\n⊢ filter p {a} = if p a then {a} else ∅\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\n⊢ x ∈ filter p {a} ↔ x ∈ if p a then {a} else ∅\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\n⊢ x = a ∧ p x ↔ x ∈ if p a then {a} else ∅\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : p a\n⊢ x = a ∧ p x ↔ x ∈ {a}\n[PROOFSTEP]\nby_cases h' : x = a\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : ¬p a\n⊢ x = a ∧ p x ↔ x ∈ ∅\n[PROOFSTEP]\nby_cases h' : x = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : p a\nh' : x = a\n⊢ x = a ∧ p x ↔ x ∈ {a}\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : p a\nh' : ¬x = a\n⊢ x = a ∧ p x ↔ x ∈ {a}\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : ¬p a\nh' : x = a\n⊢ x = a ∧ p x ↔ x ∈ ∅\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na x : α\nh : ¬p a\nh' : ¬x = a\n⊢ x = a ∧ p x ↔ x ∈ ∅\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\n⊢ _root_.Disjoint (filter p s) (filter q s) ↔ ∀ (x : α), x ∈ s → p x → ¬q x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\n⊢ _root_.Disjoint (filter p s) (filter q s) → ∀ (x : α), x ∈ s → p x → ¬q x\n[PROOFSTEP]\nsimp (config := { contextual := true }) [disjoint_left]\n[GOAL]\ncase mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\n⊢ (∀ (x : α), x ∈ s → p x → ¬q x) → _root_.Disjoint (filter p s) (filter q s)\n[PROOFSTEP]\nsimp (config := { contextual := true }) [disjoint_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns t : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nh : _root_.Disjoint p q\n⊢ _root_.Disjoint (filter p s) (filter q t)\n[PROOFSTEP]\nsimp_rw [disjoint_left, mem_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns t : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nh : _root_.Disjoint p q\n⊢ ∀ ⦃a : α⦄, a ∈ s ∧ p a → ¬(a ∈ t ∧ q a)\n[PROOFSTEP]\nrintro a ⟨_, hp⟩ ⟨_, hq⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns t : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nh : _root_.Disjoint p q\na : α\nleft✝¹ : a ∈ s\nhp : p a\nleft✝ : a ∈ t\nhq : q a\n⊢ False\n[PROOFSTEP]\nrw [Pi.disjoint_iff] at h \n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np✝ q✝ : α → Prop\ninst✝³ : DecidablePred p✝\ninst✝² : DecidablePred q✝\ns t : Finset α\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\nh : ∀ (i : α), _root_.Disjoint (p i) (q i)\na : α\nleft✝¹ : a ∈ s\nhp : p a\nleft✝ : a ∈ t\nhq : q a\n⊢ False\n[PROOFSTEP]\nsimpa [hp, hq] using h a\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\n⊢ _root_.Disjoint (if p a then {a} else ∅) (filter p s)\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\nh✝ : p a\n⊢ _root_.Disjoint {a} (filter p s)\n[PROOFSTEP]\nrw [disjoint_singleton_left]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\nh✝ : p a\n⊢ ¬a ∈ filter p s\n[PROOFSTEP]\nexact mem_filter.not.mpr <| mt And.left ha\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\nh✝ : ¬p a\n⊢ _root_.Disjoint ∅ (filter p s)\n[PROOFSTEP]\nexact disjoint_empty_left _\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\n⊢ filter p (cons a s ha) =\n    disjUnion (if p a then {a} else ∅) (filter p s) (_ : _root_.Disjoint (if p a then {a} else ∅) (filter p s))\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\nh : p a\n⊢ filter p (cons a s ha) = disjUnion {a} (filter p s) (_ : _root_.Disjoint {a} (filter p s))\n[PROOFSTEP]\nrw [filter_cons_of_pos _ _ _ ha h, singleton_disjUnion]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝¹ : DecidablePred p\ninst✝ : DecidablePred q\na : α\ns : Finset α\nha : ¬a ∈ s\nh : ¬p a\n⊢ filter p (cons a s ha) = disjUnion ∅ (filter p s) (_ : _root_.Disjoint ∅ (filter p s))\n[PROOFSTEP]\nrw [filter_cons_of_neg _ _ _ ha h, empty_disjUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns₁ s₂ : Finset α\nx✝ : α\n⊢ x✝ ∈ filter p (s₁ ∪ s₂) ↔ x✝ ∈ filter p s₁ ∪ filter p s₂\n[PROOFSTEP]\nsimp only [mem_filter, mem_union, or_and_right]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nx : α\n⊢ x ∈ filter p s ∪ filter q s ↔ x ∈ filter (fun x => p x ∨ q x) s\n[PROOFSTEP]\nsimp [mem_filter, mem_union, ← and_or_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ns t : Finset α\ninst✝ : (i : α) → Decidable (i ∈ t)\ni : α\n⊢ i ∈ filter (fun i => i ∈ t) s ↔ i ∈ s ∩ t\n[PROOFSTEP]\nsimp [mem_filter, mem_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ filter p (s ∩ t) = filter p s ∩ filter p t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\na✝ : α\n⊢ a✝ ∈ filter p (s ∩ t) ↔ a✝ ∈ filter p s ∩ filter p t\n[PROOFSTEP]\nsimp [mem_filter, mem_inter, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ filter p s ∩ t = filter p (s ∩ t)\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\na✝ : α\n⊢ a✝ ∈ filter p s ∩ t ↔ a✝ ∈ filter p (s ∩ t)\n[PROOFSTEP]\nsimp only [mem_inter, mem_filter, and_right_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ s ∩ filter p t = filter p (s ∩ t)\n[PROOFSTEP]\nrw [inter_comm, filter_inter, inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ filter p (insert a s) = if p a then insert a (filter p s) else filter p s\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\n⊢ x ∈ filter p (insert a s) ↔ x ∈ if p a then insert a (filter p s) else filter p s\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : p a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ insert a (filter p s)\n[PROOFSTEP]\nby_cases h' : x = a\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : ¬p a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ filter p s\n[PROOFSTEP]\nby_cases h' : x = a\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : p a\nh' : x = a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ insert a (filter p s)\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : p a\nh' : ¬x = a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ insert a (filter p s)\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : ¬p a\nh' : x = a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ filter p s\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\nh : ¬p a\nh' : ¬x = a\n⊢ x ∈ filter p (insert a s) ↔ x ∈ filter p s\n[PROOFSTEP]\nsimp [h, h']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\n⊢ filter p (erase s a) = erase (filter p s) a\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\na : α\ns : Finset α\nx : α\n⊢ x ∈ filter p (erase s a) ↔ x ∈ erase (filter p s) a\n[PROOFSTEP]\nsimp only [and_assoc, mem_filter, iff_self_iff, mem_erase]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nx✝ : α\n⊢ x✝ ∈ filter (fun a => p a ∨ q a) s ↔ x✝ ∈ filter p s ∪ filter q s\n[PROOFSTEP]\nsimp [mem_filter, mem_union, and_or_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nx✝ : α\n⊢ x✝ ∈ filter (fun a => p a ∧ q a) s ↔ x✝ ∈ filter p s ∩ filter q s\n[PROOFSTEP]\nsimp [mem_filter, mem_inter, and_comm, and_left_comm, and_self_iff, and_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\na : α\n⊢ a ∈ filter (fun a => ¬p a) s ↔ a ∈ s \\ filter p s\n[PROOFSTEP]\nsimp only [Bool.decide_coe, Bool.not_eq_true', mem_filter, and_comm, mem_sdiff, not_and_or, Bool.not_eq_true,\n  and_or_left, and_not_self, or_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns₁ s₂ : Finset α\nx✝ : α\n⊢ x✝ ∈ s₁ \\ s₂ ↔ x✝ ∈ filter (fun x => ¬x ∈ s₂) s₁\n[PROOFSTEP]\nsimp [mem_sdiff, mem_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns₁ s₂ : Finset α\n⊢ s₁ \\ s₂ = s₁ ↔ s₁ ∩ s₂ ⊆ ∅\n[PROOFSTEP]\nsimp [Subset.antisymm_iff, disjoint_iff_inter_eq_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\n⊢ ∃ s₁ s₂, s₁ ∪ s₂ = s ∧ ↑s₁ ⊆ t₁ ∧ ↑s₂ ⊆ t₂ \\ t₁\n[PROOFSTEP]\nclassical\nrefine' ⟨s.filter (· ∈ t₁), s.filter (· ∉ t₁), _, _, _⟩\n· simp [filter_union_right, em]\n· intro x\n  simp\n· intro x\n  simp\n  intro hx hx₂\n  refine' ⟨Or.resolve_left (h hx) hx₂, hx₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\n⊢ ∃ s₁ s₂, s₁ ∪ s₂ = s ∧ ↑s₁ ⊆ t₁ ∧ ↑s₂ ⊆ t₂ \\ t₁\n[PROOFSTEP]\nrefine' ⟨s.filter (· ∈ t₁), s.filter (· ∉ t₁), _, _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\n⊢ filter (fun x => x ∈ t₁) s ∪ filter (fun x => ¬x ∈ t₁) s = s\n[PROOFSTEP]\nsimp [filter_union_right, em]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\n⊢ ↑(filter (fun x => x ∈ t₁) s) ⊆ t₁\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\nx : α\n⊢ x ∈ ↑(filter (fun x => x ∈ t₁) s) → x ∈ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\n⊢ ↑(filter (fun x => ¬x ∈ t₁) s) ⊆ t₂ \\ t₁\n[PROOFSTEP]\nintro x\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\nx : α\n⊢ x ∈ ↑(filter (fun x => ¬x ∈ t₁) s) → x ∈ t₂ \\ t₁\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\nx : α\n⊢ x ∈ s → ¬x ∈ t₁ → x ∈ t₂ ∧ ¬x ∈ t₁\n[PROOFSTEP]\nintro hx hx₂\n[GOAL]\ncase refine'_3\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns : Finset α\nt₁ t₂ : Set α\nh : ↑s ⊆ t₁ ∪ t₂\nx : α\nhx : x ∈ s\nhx₂ : ¬x ∈ t₁\n⊢ x ∈ t₂ ∧ ¬x ∈ t₁\n[PROOFSTEP]\nrefine' ⟨Or.resolve_left (h hx) hx₂, hx₂⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\n⊢ filter (Eq b) s = if b ∈ s then {b} else ∅\n[PROOFSTEP]\nsplit_ifs with h\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : b ∈ s\n⊢ filter (Eq b) s = {b}\n[PROOFSTEP]\next\n[GOAL]\ncase pos.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : b ∈ s\na✝ : β\n⊢ a✝ ∈ filter (Eq b) s ↔ a✝ ∈ {b}\n[PROOFSTEP]\nsimp only [mem_filter, mem_singleton, decide_eq_true_eq]\n[GOAL]\ncase pos.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : b ∈ s\na✝ : β\n⊢ a✝ ∈ s ∧ b = a✝ ↔ a✝ = b\n[PROOFSTEP]\nrefine ⟨fun h => h.2.symm, ?_⟩\n[GOAL]\ncase pos.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : b ∈ s\na✝ : β\n⊢ a✝ = b → a✝ ∈ s ∧ b = a✝\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase pos.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\na✝ : β\nh : a✝ ∈ s\n⊢ a✝ ∈ s ∧ a✝ = a✝\n[PROOFSTEP]\nexact ⟨h, rfl⟩\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : ¬b ∈ s\n⊢ filter (Eq b) s = ∅\n[PROOFSTEP]\next\n[GOAL]\ncase neg.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : ¬b ∈ s\na✝ : β\n⊢ a✝ ∈ filter (Eq b) s ↔ a✝ ∈ ∅\n[PROOFSTEP]\nsimp only [mem_filter, not_and, iff_false_iff, not_mem_empty, decide_eq_true_eq]\n[GOAL]\ncase neg.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : ¬b ∈ s\na✝ : β\n⊢ a✝ ∈ s → ¬b = a✝\n[PROOFSTEP]\nrintro m rfl\n[GOAL]\ncase neg.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\nh : ¬b ∈ s\nm : b ∈ s\n⊢ False\n[PROOFSTEP]\nexact h m\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb x✝¹ : β\nx✝ : x✝¹ ∈ s\n⊢ x✝¹ = b ↔ b = x✝¹\n[PROOFSTEP]\nsimp_rw [@eq_comm _ b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb : β\n⊢ filter (fun a => b ≠ a) s = erase s b\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb a✝ : β\n⊢ a✝ ∈ filter (fun a => b ≠ a) s ↔ a✝ ∈ erase s b\n[PROOFSTEP]\nsimp only [mem_filter, mem_erase, Ne.def, decide_not, Bool.not_eq_true', decide_eq_false_iff_not]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb a✝ : β\n⊢ a✝ ∈ s ∧ ¬b = a✝ ↔ ¬a✝ = b ∧ a✝ ∈ s\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝³ : DecidablePred p\ninst✝² : DecidablePred q\ninst✝¹ : DecidableEq α\ninst✝ : DecidableEq β\ns : Finset β\nb x✝¹ : β\nx✝ : x✝¹ ∈ s\n⊢ x✝¹ ≠ b ↔ b ≠ x✝¹\n[PROOFSTEP]\nsimp_rw [@ne_comm _ b]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np q : α → Prop\ninst✝² : DecidablePred p\ninst✝¹ : DecidablePred q\ninst✝ : DecidableEq α\ns t : Finset α\n⊢ filter p s ∩ filter (fun a => ¬p a) t = ∅\n[PROOFSTEP]\nsimpa using (disjoint_filter_filter_neg s t p).eq_bot\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn m l : ℕ\n⊢ range n = ∅ ↔ n = 0\n[PROOFSTEP]\nrw [← not_nonempty_iff_eq_empty, nonempty_range_iff, not_not]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn✝ m✝ l n m : ℕ\n⊢ filter (fun x => x = m) (range n) = if m < n then {m} else ∅\n[PROOFSTEP]\nconvert filter_eq (range n) m using 2\n[GOAL]\ncase h.e'_2.h.e'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn✝ m✝ l n m : ℕ\n⊢ (fun x => x = m) = Eq m\n[PROOFSTEP]\next\n[GOAL]\ncase h.e'_2.h.e'_2.h.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn✝ m✝ l n m x✝ : ℕ\n⊢ x✝ = m ↔ m = x✝\n[PROOFSTEP]\nrw [eq_comm]\n[GOAL]\ncase h.e'_3.h₁.a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nn✝ m✝ l n m : ℕ\n⊢ m < n ↔ m ∈ range n\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\np : α → Prop\n⊢ (∃ x, x ∈ ∅ ∧ p x) ↔ False\n[PROOFSTEP]\nsimp only [not_mem_empty, false_and_iff, exists_false]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\ns : Finset α\np : α → Prop\n⊢ (∃ x, x ∈ insert a s ∧ p x) ↔ p a ∨ ∃ x, x ∈ s ∧ p x\n[PROOFSTEP]\nsimp only [mem_insert, or_and_right, exists_or, exists_eq_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\na : α\ns : Finset α\np : α → Prop\n⊢ (∀ (x : α), x ∈ insert a s → p x) ↔ p a ∧ ∀ (x : α), x ∈ s → p x\n[PROOFSTEP]\nsimp only [mem_insert, or_imp, forall_and, forall_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nk j : ℕ\n⊢ ¬j + k ∈ range k\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nk : ℕ\nj : { n // ¬n ∈ range k }\n⊢ (fun j => { val := j + k, property := (_ : ¬j + k ∈ range k) }) ((fun i => ↑i - k) j) = j\n[PROOFSTEP]\nrw [Subtype.ext_iff_val]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nk : ℕ\nj : { n // ¬n ∈ range k }\n⊢ ↑((fun j => { val := j + k, property := (_ : ¬j + k ∈ range k) }) ((fun i => ↑i - k) j)) = ↑j\n[PROOFSTEP]\napply tsub_add_cancel_of_le\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nk : ℕ\nj : { n // ¬n ∈ range k }\n⊢ k ≤ ↑j\n[PROOFSTEP]\nsimpa using j.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\nk j : ℕ\n⊢ ¬j + k ∈ range k\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t l l' : Multiset α\nhl : Nodup l\nhl' : Nodup l'\nh : toFinset l = toFinset l'\n⊢ l = l'\n[PROOFSTEP]\nsimpa [← toFinset_eq hl, ← toFinset_eq hl'] using h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\na : α\n⊢ toFinset {a} = {a}\n[PROOFSTEP]\nrw [← cons_zero, toFinset_cons, toFinset_zero, IsLawfulSingleton.insert_emptyc_eq]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ s t : Multiset α\n⊢ ∀ (a : α), a ∈ toFinset (s + t) ↔ a ∈ toFinset s ∪ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t s : Multiset α\nh : 0 ≠ 0\n⊢ toFinset (0 • s) = toFinset s\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t s : Multiset α\nn : ℕ\nx✝ : n + 1 ≠ 0\n⊢ toFinset ((n + 1) • s) = toFinset s\n[PROOFSTEP]\nby_cases h : n = 0\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t s : Multiset α\nn : ℕ\nx✝ : n + 1 ≠ 0\nh : n = 0\n⊢ toFinset ((n + 1) • s) = toFinset s\n[PROOFSTEP]\nrw [h, zero_add, one_nsmul]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t s : Multiset α\nn : ℕ\nx✝ : n + 1 ≠ 0\nh : ¬n = 0\n⊢ toFinset ((n + 1) • s) = toFinset s\n[PROOFSTEP]\nrw [add_nsmul, toFinset_add, one_nsmul, toFinset_nsmul s n h, Finset.union_idempotent]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ s t : Multiset α\n⊢ ∀ (a : α), a ∈ toFinset (s ∩ t) ↔ a ∈ toFinset s ∩ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ s t : Multiset α\n⊢ toFinset (s ∪ t) = toFinset s ∪ toFinset t\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns✝ t✝ s t : Multiset α\na✝ : α\n⊢ a✝ ∈ toFinset (s ∪ t) ↔ a✝ ∈ toFinset s ∪ toFinset t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ Finset.Nonempty (toFinset s) ↔ s ≠ 0\n[PROOFSTEP]\nsimp only [toFinset_eq_empty, Ne.def, Finset.nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ toFinset s ⊆ toFinset t ↔ s ⊆ t\n[PROOFSTEP]\nsimp only [Finset.subset_iff, Multiset.subset_iff, Multiset.mem_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ toFinset s ⊂ toFinset t ↔ s ⊂ t\n[PROOFSTEP]\nsimp_rw [Finset.ssubset_def, toFinset_subset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ s ⊆ t ∧ ¬t ⊆ s ↔ s ⊂ t\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t m : Multiset α\n⊢ toFinset (dedup m) = toFinset m\n[PROOFSTEP]\nsimp_rw [toFinset, dedup_idempotent]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq α\ns t : Multiset α\ninst✝ : DecidableEq β\nm : Multiset α\nf : α → Multiset β\n⊢ toFinset (bind (dedup m) f) = toFinset (bind m f)\n[PROOFSTEP]\nsimp_rw [toFinset, dedup_bind_dedup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ IsWellFounded (Multiset β) fun x x_1 => x ⊂ x_1\n[PROOFSTEP]\nclassical exact Subrelation.isWellFounded (InvImage _ toFinset) toFinset_ssubset.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns t : Multiset α\n⊢ IsWellFounded (Multiset β) fun x x_1 => x ⊂ x_1\n[PROOFSTEP]\nexact Subrelation.isWellFounded (InvImage _ toFinset) toFinset_ssubset.2\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\n⊢ toFinset s.val = s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\na✝ : α\n⊢ a✝ ∈ toFinset s.val ↔ a✝ ∈ s\n[PROOFSTEP]\nrw [Multiset.mem_toFinset, ← mem_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nn : Nodup l\n⊢ Multiset.Nodup ↑l\n[PROOFSTEP]\nrwa [Multiset.coe_nodup]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ (toFinset (a :: l)).val = (insert a (toFinset l)).val\n[PROOFSTEP]\nby_cases h : a ∈ l\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nh : a ∈ l\n⊢ (toFinset (a :: l)).val = (insert a (toFinset l)).val\n[PROOFSTEP]\nsimp [Finset.insert_val', Multiset.dedup_cons, h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nh : ¬a ∈ l\n⊢ (toFinset (a :: l)).val = (insert a (toFinset l)).val\n[PROOFSTEP]\nsimp [Finset.insert_val', Multiset.dedup_cons, h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ Set.SurjOn toFinset {l | Nodup l} Set.univ\n[PROOFSTEP]\nrintro ⟨⟨l⟩, hl⟩ _\n[GOAL]\ncase mk.mk\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l' : List α\na : α\nval✝ : Multiset α\nl : List α\nhl : Multiset.Nodup (Quot.mk Setoid.r l)\na✝ : { val := Quot.mk Setoid.r l, nodup := hl } ∈ Set.univ\n⊢ { val := Quot.mk Setoid.r l, nodup := hl } ∈ toFinset '' {l | Nodup l}\n[PROOFSTEP]\nexact ⟨l, hl, (toFinset_eq hl).symm⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ toFinset l = toFinset l' ↔ dedup l ~ dedup l'\n[PROOFSTEP]\nsimp [Finset.ext_iff, perm_ext (nodup_dedup _) (nodup_dedup _)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na✝ : α\na b : List α\n⊢ toFinset a = toFinset b ↔ ∀ (x : α), x ∈ a ↔ x ∈ b\n[PROOFSTEP]\nsimp only [Finset.ext_iff, mem_toFinset]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nhl : Nodup l\nhl' : Nodup l'\nh : toFinset l = toFinset l'\n⊢ l ~ l'\n[PROOFSTEP]\nrw [← Multiset.coe_eq_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nhl : Nodup l\nhl' : Nodup l'\nh : toFinset l = toFinset l'\n⊢ ↑l = ↑l'\n[PROOFSTEP]\nexact Multiset.Nodup.toFinset_inj hl hl' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ toFinset (l ++ l') = toFinset l ∪ toFinset l'\n[PROOFSTEP]\ninduction' l with hd tl hl\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ toFinset ([] ++ l') = toFinset [] ∪ toFinset l'\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na hd : α\ntl : List α\nhl : toFinset (tl ++ l') = toFinset tl ∪ toFinset l'\n⊢ toFinset (hd :: tl ++ l') = toFinset (hd :: tl) ∪ toFinset l'\n[PROOFSTEP]\nsimp [hl]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nn : ℕ\nhn : n ≠ 0\n⊢ toFinset (replicate n a) = {a}\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\nn : ℕ\nhn : n ≠ 0\nx : α\n⊢ x ∈ toFinset (replicate n a) ↔ x ∈ {a}\n[PROOFSTEP]\nsimp [hn, List.mem_replicate]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l'✝ : List α\na : α\nl l' : List α\n⊢ toFinset (l ∪ l') = toFinset l ∪ toFinset l'\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l'✝ : List α\na : α\nl l' : List α\na✝ : α\n⊢ a✝ ∈ toFinset (l ∪ l') ↔ a✝ ∈ toFinset l ∪ toFinset l'\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l'✝ : List α\na : α\nl l' : List α\n⊢ toFinset (l ∩ l') = toFinset l ∩ toFinset l'\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l'✝ : List α\na : α\nl l' : List α\na✝ : α\n⊢ a✝ ∈ toFinset (l ∩ l') ↔ a✝ ∈ toFinset l ∩ toFinset l'\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l' : List α\na : α\nl : List α\n⊢ toFinset l = ∅ ↔ l = []\n[PROOFSTEP]\ncases l\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na : α\n⊢ toFinset [] = ∅ ↔ [] = []\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl l' : List α\na head✝ : α\ntail✝ : List α\n⊢ toFinset (head✝ :: tail✝) = ∅ ↔ head✝ :: tail✝ = []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nl✝ l' : List α\na : α\nl : List α\n⊢ Finset.Nonempty (toFinset l) ↔ l ≠ []\n[PROOFSTEP]\nsimp [Finset.nonempty_iff_ne_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\n⊢ List.Nodup (toList s)\n[PROOFSTEP]\nrw [toList, ← Multiset.coe_nodup, Multiset.coe_toList]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\n⊢ Nodup s.val\n[PROOFSTEP]\nexact s.nodup\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\n⊢ List.toFinset (toList s) = s\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\ns : Finset α\na✝ : α\n⊢ a✝ ∈ List.toFinset (toList s) ↔ a✝ ∈ s\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\ns : Finset α\n⊢ toList s = [a] ↔ s = {a}\n[PROOFSTEP]\nrw [toList, Multiset.toList_eq_singleton_iff, val_eq_singleton_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\ns : Finset α\nh : ¬a ∈ s\n⊢ List.Nodup (a :: toList s)\n[PROOFSTEP]\nsimp [h, nodup_toList s]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\na : α\ns : Finset α\nh : ¬a ∈ s\nx : α\n⊢ x ∈ toList (cons a s h) ↔ x ∈ a :: toList s\n[PROOFSTEP]\nsimp only [List.mem_cons, Finset.mem_toList, Finset.mem_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns s₁ s₂ : Finset α\nt✝ t₁ t₂ t : α → Finset β\n⊢ Set.PairwiseDisjoint (↑∅) t\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nb : β\nh : Set.PairwiseDisjoint (↑s) t\n⊢ b ∈ disjiUnion s t h ↔ ∃ a, a ∈ s ∧ b ∈ t a\n[PROOFSTEP]\nsimp only [mem_def, disjiUnion_val, mem_bind, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nh : Set.PairwiseDisjoint (↑s) t\n⊢ ↑(disjiUnion s t h) = ⋃ (x : α) (_ : x ∈ ↑s), ↑(t x)\n[PROOFSTEP]\nsimp [Set.ext_iff, mem_disjiUnion, Set.mem_iUnion, iff_self_iff, mem_coe, imp_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\nh1 : Set.PairwiseDisjoint (↑s) f\nh2 : Set.PairwiseDisjoint (↑(disjiUnion s f h1)) g\na : { x // x ∈ s }\nx✝¹ : a ∈ ↑(attach s)\nb : { x // x ∈ s }\nx✝ : b ∈ ↑(attach s)\nhab : a ≠ b\nx : γ\nhxa :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      a\nhxb :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      b\n⊢ False\n[PROOFSTEP]\nobtain ⟨xa, hfa, hga⟩ := mem_disjiUnion.mp hxa\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\nh1 : Set.PairwiseDisjoint (↑s) f\nh2 : Set.PairwiseDisjoint (↑(disjiUnion s f h1)) g\na : { x // x ∈ s }\nx✝¹ : a ∈ ↑(attach s)\nb : { x // x ∈ s }\nx✝ : b ∈ ↑(attach s)\nhab : a ≠ b\nx : γ\nhxa :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      a\nhxb :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      b\nxa : β\nhfa : xa ∈ f ↑a\nhga : x ∈ g xa\n⊢ False\n[PROOFSTEP]\nobtain ⟨xb, hfb, hgb⟩ := mem_disjiUnion.mp hxb\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\nh1 : Set.PairwiseDisjoint (↑s) f\nh2 : Set.PairwiseDisjoint (↑(disjiUnion s f h1)) g\na : { x // x ∈ s }\nx✝¹ : a ∈ ↑(attach s)\nb : { x // x ∈ s }\nx✝ : b ∈ ↑(attach s)\nhab : a ≠ b\nx : γ\nhxa :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      a\nhxb :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      b\nxa : β\nhfa : xa ∈ f ↑a\nhga : x ∈ g xa\nxb : β\nhfb : xb ∈ f ↑b\nhgb : x ∈ g xb\n⊢ False\n[PROOFSTEP]\nrefine' disjoint_left.mp (h2 (mem_disjiUnion.mpr ⟨_, a.prop, hfa⟩) (mem_disjiUnion.mpr ⟨_, b.prop, hfb⟩) _) hga hgb\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\nh1 : Set.PairwiseDisjoint (↑s) f\nh2 : Set.PairwiseDisjoint (↑(disjiUnion s f h1)) g\na : { x // x ∈ s }\nx✝¹ : a ∈ ↑(attach s)\nb : { x // x ∈ s }\nx✝ : b ∈ ↑(attach s)\nhab : a ≠ b\nx : γ\nhxa :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      a\nhxb :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      b\nxa : β\nhfa : xa ∈ f ↑a\nhga : x ∈ g xa\nxb : β\nhfb : xb ∈ f ↑b\nhgb : x ∈ g xb\n⊢ xa ≠ xb\n[PROOFSTEP]\nrintro rfl\n[GOAL]\ncase intro.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\nh1 : Set.PairwiseDisjoint (↑s) f\nh2 : Set.PairwiseDisjoint (↑(disjiUnion s f h1)) g\na : { x // x ∈ s }\nx✝¹ : a ∈ ↑(attach s)\nb : { x // x ∈ s }\nx✝ : b ∈ ↑(attach s)\nhab : a ≠ b\nx : γ\nhxa :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      a\nhxb :\n  x ∈\n    (fun a =>\n        disjiUnion (f ↑a) g (_ : ∀ (b : β), b ∈ ↑(f ↑a) → ∀ (c : β), c ∈ ↑(f ↑a) → b ≠ c → (_root_.Disjoint on g) b c))\n      b\nxa : β\nhfa : xa ∈ f ↑a\nhga : x ∈ g xa\nhfb : xa ∈ f ↑b\nhgb : x ∈ g xa\n⊢ False\n[PROOFSTEP]\nexact disjoint_left.mp (h1 a.prop b.prop <| Subtype.coe_injective.ne hab) hfa hfb\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nh : ∀ (x : α), x ∈ s → f x ∈ t\nx' : β\nhx : x' ∈ ↑t\ny' : β\nhy : y' ∈ ↑t\nhne : x' ≠ y'\n⊢ (_root_.Disjoint on fun a => filter (fun c => f c = a) s) x' y'\n[PROOFSTEP]\nsimp_rw [disjoint_left, mem_filter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nh : ∀ (x : α), x ∈ s → f x ∈ t\nx' : β\nhx : x' ∈ ↑t\ny' : β\nhy : y' ∈ ↑t\nhne : x' ≠ y'\n⊢ ∀ ⦃a : α⦄, a ∈ s ∧ f a = x' → ¬(a ∈ s ∧ f a = y')\n[PROOFSTEP]\nrintro i ⟨_, rfl⟩ ⟨_, rfl⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nh : ∀ (x : α), x ∈ s → f x ∈ t\ni : α\nleft✝¹ : i ∈ s\nhx : f i ∈ ↑t\nleft✝ : i ∈ s\nhy : f i ∈ ↑t\nhne : f i ≠ f i\n⊢ False\n[PROOFSTEP]\nexact hne rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq β\ns : Finset α\nt : Finset β\nf : α → β\nh : ∀ (x : α), x ∈ s → f x ∈ t\nb : α\n⊢ b ∈\n      disjiUnion t (fun a => filter (fun c => f c = a) s)\n        (_ :\n          ∀ (x' : β),\n            x' ∈ ↑t → ∀ (y' : β), y' ∈ ↑t → x' ≠ y' → (_root_.Disjoint on fun a => filter (fun c => f c = a) s) x' y') ↔\n    b ∈ s\n[PROOFSTEP]\nsimpa using h b\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nb : β\n⊢ b ∈ Finset.biUnion s t ↔ ∃ a, a ∈ s ∧ b ∈ t a\n[PROOFSTEP]\nsimp only [mem_def, biUnion_val, mem_dedup, mem_bind, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\n⊢ ↑(Finset.biUnion s t) = ⋃ (x : α) (_ : x ∈ ↑s), ↑(t x)\n[PROOFSTEP]\nsimp [Set.ext_iff, mem_biUnion, Set.mem_iUnion, iff_self_iff, mem_coe, imp_true_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq α\na : α\nx : β\n⊢ x ∈ Finset.biUnion (insert a s) t ↔ x ∈ t a ∪ Finset.biUnion s t\n[PROOFSTEP]\nsimp only [mem_biUnion, exists_prop, mem_union, mem_insert, or_and_right, exists_or, exists_eq_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nhs : s₁ = s₂\nht : ∀ (a : α), a ∈ s₁ → t₁ a = t₂ a\nx : β\n⊢ x ∈ Finset.biUnion s₁ t₁ ↔ x ∈ Finset.biUnion s₂ t₂\n[PROOFSTEP]\nsimp_rw [mem_biUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nhs : s₁ = s₂\nht : ∀ (a : α), a ∈ s₁ → t₁ a = t₂ a\nx : β\n⊢ (∃ a, a ∈ s₁ ∧ x ∈ t₁ a) ↔ ∃ a, a ∈ s₂ ∧ x ∈ t₂ a\n[PROOFSTEP]\napply exists_congr\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nhs : s₁ = s₂\nht : ∀ (a : α), a ∈ s₁ → t₁ a = t₂ a\nx : β\n⊢ ∀ (a : α), a ∈ s₁ ∧ x ∈ t₁ a ↔ a ∈ s₂ ∧ x ∈ t₂ a\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [hs, and_congr_right_iff, ht, implies_true]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns' : Finset β\n⊢ Finset.biUnion s t ⊆ s' ↔ ∀ (x : α), x ∈ s → t x ⊆ s'\n[PROOFSTEP]\nsimp only [subset_iff, mem_biUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns' : Finset β\n⊢ (∀ ⦃x : β⦄, (∃ a, a ∈ s ∧ x ∈ t a) → x ∈ s') ↔ ∀ (x : α), x ∈ s → ∀ ⦃x_1 : β⦄, x_1 ∈ t x → x_1 ∈ s'\n[PROOFSTEP]\nexact ⟨fun H a ha b hb => H ⟨a, ha, hb⟩, fun H b ⟨a, ha, hb⟩ => H a ha hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\na : α\n⊢ Finset.biUnion {a} t = t a\n[PROOFSTEP]\nclassical rw [← insert_emptyc_eq, biUnion_insert, biUnion_empty, union_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\na : α\n⊢ Finset.biUnion {a} t = t a\n[PROOFSTEP]\nrw [← insert_emptyc_eq, biUnion_insert, biUnion_empty, union_empty]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\n⊢ Finset.biUnion s f ∩ t = Finset.biUnion s fun x => f x ∩ t\n[PROOFSTEP]\next x\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\nx : β\n⊢ x ∈ Finset.biUnion s f ∩ t ↔ x ∈ Finset.biUnion s fun x => f x ∩ t\n[PROOFSTEP]\nsimp only [mem_biUnion, mem_inter]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\nx : β\n⊢ (∃ a, a ∈ s ∧ x ∈ f a) ∧ x ∈ t ↔ ∃ a, a ∈ s ∧ x ∈ f a ∧ x ∈ t\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\nt : Finset β\ns : Finset α\nf : α → Finset β\n⊢ t ∩ Finset.biUnion s f = Finset.biUnion s fun x => t ∩ f x\n[PROOFSTEP]\nrw [inter_comm, biUnion_inter]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\nt : Finset β\ns : Finset α\nf : α → Finset β\n⊢ (Finset.biUnion s fun x => f x ∩ t) = Finset.biUnion s fun x => t ∩ f x\n[PROOFSTEP]\nsimp [inter_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq γ\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\n⊢ Finset.biUnion (Finset.biUnion s f) g = Finset.biUnion s fun a => Finset.biUnion (f a) g\n[PROOFSTEP]\next\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq γ\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\na✝ : γ\n⊢ a✝ ∈ Finset.biUnion (Finset.biUnion s f) g ↔ a✝ ∈ Finset.biUnion s fun a => Finset.biUnion (f a) g\n[PROOFSTEP]\nsimp only [Finset.mem_biUnion, exists_prop]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq γ\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\na✝ : γ\n⊢ (∃ a, (∃ a_1, a_1 ∈ s ∧ a ∈ f a_1) ∧ a✝ ∈ g a) ↔ ∃ a, a ∈ s ∧ ∃ a_1, a_1 ∈ f a ∧ a✝ ∈ g a_1\n[PROOFSTEP]\nsimp_rw [← exists_and_right, ← exists_and_left, and_assoc]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq γ\ns : Finset α\nf : α → Finset β\ng : β → Finset γ\na✝ : γ\n⊢ (∃ a x, x ∈ s ∧ a ∈ f x ∧ a✝ ∈ g a) ↔ ∃ a x, a ∈ s ∧ x ∈ f a ∧ a✝ ∈ g x\n[PROOFSTEP]\nrw [exists_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq α\ns : Multiset α\nt : α → Multiset β\nx : β\n⊢ x ∈ toFinset (Multiset.bind s t) ↔ x ∈ Finset.biUnion (toFinset s) fun a => toFinset (t a)\n[PROOFSTEP]\nsimp only [Multiset.mem_toFinset, mem_biUnion, Multiset.mem_bind, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nh : ∀ (a : α), a ∈ s → t₁ a ⊆ t₂ a\n⊢ Finset.biUnion s t₁ ⊆ Finset.biUnion s t₂\n[PROOFSTEP]\nhave : ∀ b a, a ∈ s → b ∈ t₁ a → ∃ a : α, a ∈ s ∧ b ∈ t₂ a := fun b a ha hb => ⟨a, ha, Finset.mem_of_subset (h a ha) hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\nh : ∀ (a : α), a ∈ s → t₁ a ⊆ t₂ a\nthis : ∀ (b : β) (a : α), a ∈ s → b ∈ t₁ a → ∃ a, a ∈ s ∧ b ∈ t₂ a\n⊢ Finset.biUnion s t₁ ⊆ Finset.biUnion s t₂\n[PROOFSTEP]\nsimpa only [subset_iff, mem_biUnion, exists_imp, and_imp, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt✝ t₁ t₂ t : α → Finset β\nh : s₁ ⊆ s₂\n⊢ Finset.biUnion s₁ t ⊆ Finset.biUnion s₂ t\n[PROOFSTEP]\nintro x\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt✝ t₁ t₂ t : α → Finset β\nh : s₁ ⊆ s₂\nx : β\n⊢ x ∈ Finset.biUnion s₁ t → x ∈ Finset.biUnion s₂ t\n[PROOFSTEP]\nsimp only [and_imp, mem_biUnion, exists_prop]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt✝ t₁ t₂ t : α → Finset β\nh : s₁ ⊆ s₂\nx : β\n⊢ (∃ a, a ∈ s₁ ∧ x ∈ t a) → ∃ a, a ∈ s₂ ∧ x ∈ t a\n[PROOFSTEP]\nexact Exists.imp fun a ha => ⟨h ha.1, ha.2⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ninst✝ : DecidableEq α\nx : α\n⊢ x ∈ Finset.biUnion s singleton ↔ x ∈ s\n[PROOFSTEP]\nsimp only [mem_biUnion, mem_singleton, exists_prop, exists_eq_right']\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\n⊢ filter p (Finset.biUnion s f) = Finset.biUnion s fun a => filter p (f a)\n[PROOFSTEP]\next b\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\n⊢ b ∈ filter p (Finset.biUnion s f) ↔ b ∈ Finset.biUnion s fun a => filter p (f a)\n[PROOFSTEP]\nsimp only [mem_biUnion, exists_prop, mem_filter]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\n⊢ (∃ a, a ∈ s ∧ b ∈ f a) ∧ p b ↔ ∃ a, a ∈ s ∧ b ∈ f a ∧ p b\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase a.mp\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\n⊢ (∃ a, a ∈ s ∧ b ∈ f a) ∧ p b → ∃ a, a ∈ s ∧ b ∈ f a ∧ p b\n[PROOFSTEP]\nrintro ⟨⟨a, ha, hba⟩, hb⟩\n[GOAL]\ncase a.mp.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\nhb : p b\na : α\nha : a ∈ s\nhba : b ∈ f a\n⊢ ∃ a, a ∈ s ∧ b ∈ f a ∧ p b\n[PROOFSTEP]\nexact ⟨a, ha, hba, hb⟩\n[GOAL]\ncase a.mpr\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\n⊢ (∃ a, a ∈ s ∧ b ∈ f a ∧ p b) → (∃ a, a ∈ s ∧ b ∈ f a) ∧ p b\n[PROOFSTEP]\nrintro ⟨a, ha, hba, hb⟩\n[GOAL]\ncase a.mpr.intro.intro.intro\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\np : β → Prop\ninst✝ : DecidablePred p\nb : β\na : α\nha : a ∈ s\nhba : b ∈ f a\nhb : p b\n⊢ (∃ a, a ∈ s ∧ b ∈ f a) ∧ p b\n[PROOFSTEP]\nexact ⟨⟨a, ha, hba⟩, hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝¹ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ninst✝ : DecidableEq α\ns : Finset α\nt : Finset β\nf : α → β\nh : ∀ (x : α), x ∈ s → f x ∈ t\n⊢ (Finset.biUnion t fun a => filter (fun c => f c = a) s) = s\n[PROOFSTEP]\nsimpa only [disjiUnion_eq_biUnion] using disjiUnion_filter_eq_of_maps_to h\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ f : α → Finset β\ns : Finset α\nb : β\n⊢ erase (Finset.biUnion s f) b = Finset.biUnion s fun x => erase (f x) b\n[PROOFSTEP]\next a\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ f : α → Finset β\ns : Finset α\nb a : β\n⊢ a ∈ erase (Finset.biUnion s f) b ↔ a ∈ Finset.biUnion s fun x => erase (f x) b\n[PROOFSTEP]\nsimp [Finset.mem_biUnion, iff_self_iff, exists_and_left, Finset.mem_erase]\n[GOAL]\ncase a\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt t₁ t₂ f : α → Finset β\ns : Finset α\nb a : β\n⊢ (¬a = b ∧ ∃ a_1, a_1 ∈ s ∧ a ∈ f a_1) ↔ ∃ a_1, a_1 ∈ s ∧ ¬a = b ∧ a ∈ f a_1\n[PROOFSTEP]\ntauto\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\n⊢ Finset.Nonempty (Finset.biUnion s t) ↔ ∃ x, x ∈ s ∧ Finset.Nonempty (t x)\n[PROOFSTEP]\nsimp only [Finset.Nonempty, mem_biUnion]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\n⊢ (∃ x a, a ∈ s ∧ x ∈ t a) ↔ ∃ x, x ∈ s ∧ ∃ x_1, x_1 ∈ t x\n[PROOFSTEP]\nrw [exists_swap]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns s₁ s₂ : Finset α\nt t₁ t₂ : α → Finset β\n⊢ (∃ y x, y ∈ s ∧ x ∈ t y) ↔ ∃ x, x ∈ s ∧ ∃ x_1, x_1 ∈ t x\n[PROOFSTEP]\nsimp [exists_and_left]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\n⊢ _root_.Disjoint (Finset.biUnion s f) t ↔ ∀ (i : α), i ∈ s → _root_.Disjoint (f i) t\n[PROOFSTEP]\nclassical\nrefine' s.induction _ _\n· simp only [forall_mem_empty_iff, biUnion_empty, disjoint_empty_left]\n· intro i s his ih\n  simp only [disjoint_union_left, biUnion_insert, his, forall_mem_insert, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\n⊢ _root_.Disjoint (Finset.biUnion s f) t ↔ ∀ (i : α), i ∈ s → _root_.Disjoint (f i) t\n[PROOFSTEP]\nrefine' s.induction _ _\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\n⊢ _root_.Disjoint (Finset.biUnion ∅ f) t ↔ ∀ (i : α), i ∈ ∅ → _root_.Disjoint (f i) t\n[PROOFSTEP]\nsimp only [forall_mem_empty_iff, biUnion_empty, disjoint_empty_left]\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset α\nf : α → Finset β\nt : Finset β\n⊢ ∀ ⦃a : α⦄ {s : Finset α},\n    ¬a ∈ s →\n      (_root_.Disjoint (Finset.biUnion s f) t ↔ ∀ (i : α), i ∈ s → _root_.Disjoint (f i) t) →\n        (_root_.Disjoint (Finset.biUnion (insert a s) f) t ↔ ∀ (i : α), i ∈ insert a s → _root_.Disjoint (f i) t)\n[PROOFSTEP]\nintro i s his ih\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝¹ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns✝ : Finset α\nf : α → Finset β\nt : Finset β\ni : α\ns : Finset α\nhis : ¬i ∈ s\nih : _root_.Disjoint (Finset.biUnion s f) t ↔ ∀ (i : α), i ∈ s → _root_.Disjoint (f i) t\n⊢ _root_.Disjoint (Finset.biUnion (insert i s) f) t ↔ ∀ (i_1 : α), i_1 ∈ insert i s → _root_.Disjoint (f i_1) t\n[PROOFSTEP]\nsimp only [disjoint_union_left, biUnion_insert, his, forall_mem_insert, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq β\ns✝ s₁ s₂ : Finset α\nt✝ t₁ t₂ : α → Finset β\ns : Finset β\nt : Finset α\nf : α → Finset β\n⊢ _root_.Disjoint s (Finset.biUnion t f) ↔ ∀ (i : α), i ∈ t → _root_.Disjoint s (f i)\n[PROOFSTEP]\nsimpa only [_root_.disjoint_comm] using disjoint_biUnion_left t f s\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\nha : ¬a ∈ s\nr : β → β → Prop\nf : α → β\n⊢ _root_.Pairwise (r on fun a_1 => f ↑a_1) ↔\n    _root_.Pairwise (r on fun a => f ↑a) ∧ ∀ (b : α), b ∈ s → r (f a) (f b) ∧ r (f b) (f a)\n[PROOFSTEP]\nsimp only [pairwise_subtype_iff_pairwise_finset', Finset.coe_cons, Set.pairwise_insert, Finset.mem_coe,\n  and_congr_right_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\nha : ¬a ∈ s\nr : β → β → Prop\nf : α → β\n⊢ Set.Pairwise (↑s) (r on f) →\n    ((∀ (b : α), b ∈ s → a ≠ b → (r on f) a b ∧ (r on f) b a) ↔ ∀ (b : α), b ∈ s → r (f a) (f b) ∧ r (f b) (f a))\n[PROOFSTEP]\nexact fun _ =>\n  ⟨fun h b hb =>\n    h b hb <| by\n      rintro rfl\n      contradiction,\n    fun h b hb _ => h b hb⟩\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\nha : ¬a ∈ s\nr : β → β → Prop\nf : α → β\nx✝ : Set.Pairwise (↑s) (r on f)\nh : ∀ (b : α), b ∈ s → a ≠ b → (r on f) a b ∧ (r on f) b a\nb : α\nhb : b ∈ s\n⊢ a ≠ b\n[PROOFSTEP]\nrintro rfl\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ns : Finset α\na : α\nha : ¬a ∈ s\nr : β → β → Prop\nf : α → β\nx✝ : Set.Pairwise (↑s) (r on f)\nh : ∀ (b : α), b ∈ s → a ≠ b → (r on f) a b ∧ (r on f) b a\nhb : a ∈ s\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\n⊢ Option.elim' default val ((fun x => if h : x = default then none else some { val := x, property := h }) x) = x\n[PROOFSTEP]\ndsimp only\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\n⊢ Option.elim' default val (if h : x = default then none else some { val := x, property := h }) = x\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh✝ : x = default\n⊢ Option.elim' default val none = x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh✝ : ¬x = default\n⊢ Option.elim' default val (some { val := x, property := h✝ }) = x\n[PROOFSTEP]\nsimp [*]\n[GOAL]\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\n⊢ Function.RightInverse (Option.elim' default val) fun x =>\n    if h : x = default then none else some { val := x, property := h }\n[PROOFSTEP]\nrintro (_ | ⟨x, h⟩)\n[GOAL]\ncase none\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\n⊢ (fun x => if h : x = default then none else some { val := x, property := h }) (Option.elim' default val none) = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh : x ≠ default\n⊢ (fun x => if h : x = default then none else some { val := x, property := h })\n      (Option.elim' default val (some { val := x, property := h })) =\n    some { val := x, property := h }\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase some.mk\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh : x ≠ default\n⊢ (if h : Option.elim' default val (some { val := x, property := h }) = default then none\n    else some { val := Option.elim' default val (some { val := x, property := h }), property := h }) =\n    some { val := x, property := h }\n[PROOFSTEP]\nsplit_ifs with hi\n[GOAL]\ncase pos\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh : x ≠ default\nhi : Option.elim' default val (some { val := x, property := h }) = default\n⊢ False\n[PROOFSTEP]\nsimp [h] at hi \n[GOAL]\ncase neg\nα✝ : Type u_1\nβ : Type u_2\nγ : Type u_3\nα : Type u\ninst✝¹ : Inhabited α\ninst✝ : DecidableEq α\nx : α\nh : x ≠ default\nhi : ¬Option.elim' default val (some { val := x, property := h }) = default\n⊢ some { val := Option.elim' default val (some { val := x, property := h }), property := hi } =\n    some { val := x, property := h }\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\n⊢ _root_.Disjoint (toFinset m1) (toFinset m2) ↔ Disjoint m1 m2\n[PROOFSTEP]\nrw [Finset.disjoint_iff_ne]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\n⊢ (∀ (a : α), a ∈ toFinset m1 → ∀ (b : α), b ∈ toFinset m2 → a ≠ b) ↔ Disjoint m1 m2\n[PROOFSTEP]\nrefine' ⟨fun h a ha1 ha2 => _, _⟩\n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\nh : ∀ (a : α), a ∈ toFinset m1 → ∀ (b : α), b ∈ toFinset m2 → a ≠ b\na : α\nha1 : a ∈ m1\nha2 : a ∈ m2\n⊢ False\n[PROOFSTEP]\nrw [← Multiset.mem_toFinset] at ha1 ha2 \n[GOAL]\ncase refine'_1\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\nh : ∀ (a : α), a ∈ toFinset m1 → ∀ (b : α), b ∈ toFinset m2 → a ≠ b\na : α\nha1✝ : a ∈ m1\nha1 : a ∈ toFinset m1\nha2✝ : a ∈ m2\nha2 : a ∈ toFinset m2\n⊢ False\n[PROOFSTEP]\nexact h _ ha1 _ ha2 rfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\n⊢ Disjoint m1 m2 → ∀ (a : α), a ∈ toFinset m1 → ∀ (b : α), b ∈ toFinset m2 → a ≠ b\n[PROOFSTEP]\nrintro h a ha b hb rfl\n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\nh : Disjoint m1 m2\na : α\nha : a ∈ toFinset m1\nhb : a ∈ toFinset m2\n⊢ False\n[PROOFSTEP]\nrw [Multiset.mem_toFinset] at ha hb \n[GOAL]\ncase refine'_2\nα : Type u_1\nβ : Type u_2\nγ : Type u_3\ninst✝ : DecidableEq α\nm1 m2 : Multiset α\nh : Disjoint m1 m2\na : α\nha : a ∈ m1\nhb : a ∈ m2\n⊢ False\n[PROOFSTEP]\nexact h ha hb\n", "meta": {"mathlib_filename": "Mathlib.Data.Finset.Basic", "llama_tokens": 72804, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5234203638047913, "lm_q2_score": 0.48438008427698437, "lm_q1q2_score": 0.2535343999320546}}
{"text": "[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nh : sel s = none\n⊢ enumerate sel s 0 = none\n[PROOFSTEP]\nsimp [h, enumerate]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nh : sel s = none\nn : ℕ\n⊢ enumerate sel s (n + 1) = none\n[PROOFSTEP]\nsimp [h, enumerate]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nh : sel s = none\nn : ℕ\n⊢ (do\n      let a ← none\n      enumerate sel (s \\ {a}) n) =\n    none\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn m : ℕ\nh : enumerate sel s (n + 1) = none\nhm : n + 1 ≤ m\n⊢ enumerate sel s m = none\n[PROOFSTEP]\ncases hs : sel s\n[GOAL]\ncase none\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn m : ℕ\nh : enumerate sel s (n + 1) = none\nhm : n + 1 ≤ m\nhs : sel s = none\n⊢ enumerate sel s m = none\n[PROOFSTEP]\nexact enumerate_eq_none_of_sel sel hs\n[GOAL]\ncase some\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn m : ℕ\nh : enumerate sel s (n + 1) = none\nhm : n + 1 ≤ m\nval✝ : α\nhs : sel s = some val✝\n⊢ enumerate sel s m = none\n[PROOFSTEP]\ncases m\n[GOAL]\ncase some.zero\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nhm : n + 1 ≤ Nat.zero\n⊢ enumerate sel s Nat.zero = none\ncase some.succ\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nn✝ : ℕ\nhm : n + 1 ≤ Nat.succ n✝\n⊢ enumerate sel s (Nat.succ n✝) = none\n[PROOFSTEP]\ncase zero => contradiction\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nhm : n + 1 ≤ Nat.zero\n⊢ enumerate sel s Nat.zero = none\n[PROOFSTEP]\ncase zero => contradiction\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nhm : n + 1 ≤ Nat.zero\n⊢ enumerate sel s Nat.zero = none\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase some.succ\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nn✝ : ℕ\nhm : n + 1 ≤ Nat.succ n✝\n⊢ enumerate sel s (Nat.succ n✝) = none\n[PROOFSTEP]\ncase succ m' =>\n  simp [hs, enumerate] at h ⊢\n  have hm : n ≤ m' := Nat.le_of_succ_le_succ hm\n  exact enumerate_eq_none h hm\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nm' : ℕ\nhm : n + 1 ≤ Nat.succ m'\n⊢ enumerate sel s (Nat.succ m') = none\n[PROOFSTEP]\ncase succ m' =>\n  simp [hs, enumerate] at h ⊢\n  have hm : n ≤ m' := Nat.le_of_succ_le_succ hm\n  exact enumerate_eq_none h hm\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nh : enumerate sel s (n + 1) = none\nval✝ : α\nhs : sel s = some val✝\nm' : ℕ\nhm : n + 1 ≤ Nat.succ m'\n⊢ enumerate sel s (Nat.succ m') = none\n[PROOFSTEP]\nsimp [hs, enumerate] at h ⊢\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nval✝ : α\nhs : sel s = some val✝\nm' : ℕ\nhm : n + 1 ≤ Nat.succ m'\nh :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) n) =\n    none\n⊢ (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) m') =\n    none\n[PROOFSTEP]\nhave hm : n ≤ m' := Nat.le_of_succ_le_succ hm\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\ns : Set α\nn : ℕ\nval✝ : α\nhs : sel s = some val✝\nm' : ℕ\nhm✝ : n + 1 ≤ Nat.succ m'\nh :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) n) =\n    none\nhm : n ≤ m'\n⊢ (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) m') =\n    none\n[PROOFSTEP]\nexact enumerate_eq_none h hm\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na : α\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\ncases h : sel s\n[GOAL]\ncase none\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na : α\nh : sel s = none\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\ncase some\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na val✝ : α\nh : sel s = some val✝\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\ncase none => simp [enumerate_eq_none_of_sel, h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na : α\nh : sel s = none\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\ncase none => simp [enumerate_eq_none_of_sel, h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na : α\nh : sel s = none\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\nsimp [enumerate_eq_none_of_sel, h]\n[GOAL]\ncase some\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na val✝ : α\nh : sel s = some val✝\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\ncase some a' =>\n  simp [enumerate, h]\n  exact fun h' : enumerate sel (s \\ { a' }) n = some a ↦\n    have : a ∈ s \\ { a' } := enumerate_mem h_sel h'\n    this.left\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na a' : α\nh : sel s = some a'\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\ncase some a' =>\n  simp [enumerate, h]\n  exact fun h' : enumerate sel (s \\ { a' }) n = some a ↦\n    have : a ∈ s \\ { a' } := enumerate_mem h_sel h'\n    this.left\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na a' : α\nh : sel s = some a'\n⊢ enumerate sel s (n + 1) = some a → a ∈ s\n[PROOFSTEP]\nsimp [enumerate, h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nn : ℕ\na a' : α\nh : sel s = some a'\n⊢ (do\n        let a ← some a'\n        enumerate sel (s \\ {a}) n) =\n      some a →\n    a ∈ s\n[PROOFSTEP]\nexact fun h' : enumerate sel (s \\ { a' }) n = some a ↦\n  have : a ∈ s \\ { a' } := enumerate_mem h_sel h'\n  this.left\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\n⊢ n₁ = n₂\n[PROOFSTEP]\nrcases le_total n₁ n₂ with (hn | hn)\n[GOAL]\ncase inl\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₁ ≤ n₂\n⊢ n₁ = n₂\ncase inr\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₂ ≤ n₁\n⊢ n₁ = n₂\n[PROOFSTEP]\non_goal 2 => swap_var n₁ ↔ n₂, h₁ ↔ h₂\n[GOAL]\ncase inl\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₁ ≤ n₂\n⊢ n₁ = n₂\ncase inr\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₂ ≤ n₁\n⊢ n₁ = n₂\n[PROOFSTEP]\non_goal 2 => swap_var n₁ ↔ n₂, h₁ ↔ h₂\n[GOAL]\ncase inr\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₂ ≤ n₁\n⊢ n₁ = n₂\n[PROOFSTEP]\nswap_var n₁ ↔ n₂, h₁ ↔ h₂\n[GOAL]\ncase inl\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₁ ≤ n₂\n⊢ n₁ = n₂\ncase inr\nα : Type u_1\nsel : Set α → Option α\nn₂ n₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₂ : enumerate sel s n₂ = some a\nh₁ : enumerate sel s n₁ = some a\nhn : n₁ ≤ n₂\n⊢ n₂ = n₁\n[PROOFSTEP]\nall_goals\n  rcases Nat.le.dest hn with ⟨m, rfl⟩\n  clear hn\n  induction n₁ generalizing s\n  case zero =>\n    cases m\n    case zero => rfl\n    case succ\n      m =>\n      have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n        exact h₂\n      have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n      simp_all [Set.mem_diff_singleton]\n  case succ k ih =>\n    cases h : sel s\n    case none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n    case some\n      _ =>\n      simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n        Nat.succ.injEq]\n      exact ih h₁ h₂\n[GOAL]\ncase inl\nα : Type u_1\nsel : Set α → Option α\nn₁ n₂ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nh₂ : enumerate sel s n₂ = some a\nhn : n₁ ≤ n₂\n⊢ n₁ = n₂\n[PROOFSTEP]\nrcases Nat.le.dest hn with ⟨m, rfl⟩\n[GOAL]\ncase inl.intro\nα : Type u_1\nsel : Set α → Option α\nn₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nm : ℕ\nh₂ : enumerate sel s (n₁ + m) = some a\nhn : n₁ ≤ n₁ + m\n⊢ n₁ = n₁ + m\n[PROOFSTEP]\nclear hn\n[GOAL]\ncase inl.intro\nα : Type u_1\nsel : Set α → Option α\nn₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nm : ℕ\nh₂ : enumerate sel s (n₁ + m) = some a\n⊢ n₁ = n₁ + m\n[PROOFSTEP]\ninduction n₁ generalizing s\n[GOAL]\ncase inl.intro.zero\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero = Nat.zero + m\ncase inl.intro.succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm n✝ : ℕ\nn_ih✝ : ∀ {s : Set α}, enumerate sel s n✝ = some a → enumerate sel s (n✝ + m) = some a → n✝ = n✝ + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ n✝) = some a\nh₂ : enumerate sel s (Nat.succ n✝ + m) = some a\n⊢ Nat.succ n✝ = Nat.succ n✝ + m\n[PROOFSTEP]\ncase zero =>\n  cases m\n  case zero => rfl\n  case succ\n    m =>\n    have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n      exact h₂\n    have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n    simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero = Nat.zero + m\n[PROOFSTEP]\ncase zero =>\n  cases m\n  case zero => rfl\n  case succ\n    m =>\n    have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n      exact h₂\n    have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n    simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero = Nat.zero + m\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero = Nat.zero + Nat.zero\ncase succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nn✝ : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ n✝) = some a\n⊢ Nat.zero = Nat.zero + Nat.succ n✝\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero = Nat.zero + Nat.zero\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero = Nat.zero + Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nn✝ : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ n✝) = some a\n⊢ Nat.zero = Nat.zero + Nat.succ n✝\n[PROOFSTEP]\ncase succ\n  m =>\n  have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n    exact h₂\n  have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n  simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ Nat.zero = Nat.zero + Nat.succ m\n[PROOFSTEP]\ncase succ\n  m =>\n  have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n    exact h₂\n  have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n  simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ Nat.zero = Nat.zero + Nat.succ m\n[PROOFSTEP]\nhave h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n  exact h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ enumerate sel (s \\ {a}) m = some a\n[PROOFSTEP]\nsimp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nm : ℕ\nh₁ : sel s = some a\nh₂ :\n  (do\n      let a ← some a\n      enumerate sel (s \\ {a}) m) =\n    some a\n⊢ enumerate sel (s \\ {a}) m = some a\n[PROOFSTEP]\nexact h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\nh' : enumerate sel (s \\ {a}) m = some a\n⊢ Nat.zero = Nat.zero + Nat.succ m\n[PROOFSTEP]\nhave : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\nh' : enumerate sel (s \\ {a}) m = some a\nthis : a ∈ s \\ {a}\n⊢ Nat.zero = Nat.zero + Nat.succ m\n[PROOFSTEP]\nsimp_all [Set.mem_diff_singleton]\n[GOAL]\ncase inl.intro.succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm n✝ : ℕ\nn_ih✝ : ∀ {s : Set α}, enumerate sel s n✝ = some a → enumerate sel s (n✝ + m) = some a → n✝ = n✝ + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ n✝) = some a\nh₂ : enumerate sel s (Nat.succ n✝ + m) = some a\n⊢ Nat.succ n✝ = Nat.succ n✝ + m\n[PROOFSTEP]\ncase succ k ih =>\n  cases h : sel s\n  case none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n  case some\n    _ =>\n    simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n      Nat.succ.injEq]\n    exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncase succ k ih =>\n  cases h : sel s\n  case none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n  case some\n    _ =>\n    simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n      Nat.succ.injEq]\n    exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncases h : sel s\n[GOAL]\ncase none\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k = Nat.succ k + m\ncase some\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncase none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncase none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\nsimp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\ncase some\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncase some\n  _ =>\n  simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n    Nat.succ.injEq]\n  exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\ncase some\n  _ =>\n  simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n    Nat.succ.injEq]\n  exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k = k + m\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k = Nat.succ k + m\n[PROOFSTEP]\nsimp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2, Nat.succ.injEq]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\ns : Set α\nval✝ : α\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (m + k) = some a → m = 0\nh₁ :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) k) =\n    some a\nh₂ :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) (m + k)) =\n    some a\nh : sel s = some val✝\n⊢ m = 0\n[PROOFSTEP]\nexact ih h₁ h₂\n[GOAL]\ncase inr\nα : Type u_1\nsel : Set α → Option α\nn₂ n₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₂ : enumerate sel s n₂ = some a\nh₁ : enumerate sel s n₁ = some a\nhn : n₁ ≤ n₂\n⊢ n₂ = n₁\n[PROOFSTEP]\nrcases Nat.le.dest hn with ⟨m, rfl⟩\n[GOAL]\ncase inr.intro\nα : Type u_1\nsel : Set α → Option α\nn₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nm : ℕ\nh₂ : enumerate sel s (n₁ + m) = some a\nhn : n₁ ≤ n₁ + m\n⊢ n₁ + m = n₁\n[PROOFSTEP]\nclear hn\n[GOAL]\ncase inr.intro\nα : Type u_1\nsel : Set α → Option α\nn₁ : ℕ\na : α\ns : Set α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nh₁ : enumerate sel s n₁ = some a\nm : ℕ\nh₂ : enumerate sel s (n₁ + m) = some a\n⊢ n₁ + m = n₁\n[PROOFSTEP]\ninduction n₁ generalizing s\n[GOAL]\ncase inr.intro.zero\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero + m = Nat.zero\ncase inr.intro.succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm n✝ : ℕ\nn_ih✝ : ∀ {s : Set α}, enumerate sel s n✝ = some a → enumerate sel s (n✝ + m) = some a → n✝ + m = n✝\ns : Set α\nh₁ : enumerate sel s (Nat.succ n✝) = some a\nh₂ : enumerate sel s (Nat.succ n✝ + m) = some a\n⊢ Nat.succ n✝ + m = Nat.succ n✝\n[PROOFSTEP]\ncase zero =>\n  cases m\n  case zero => rfl\n  case succ\n    m =>\n    have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n      exact h₂\n    have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n    simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero + m = Nat.zero\n[PROOFSTEP]\ncase zero =>\n  cases m\n  case zero => rfl\n  case succ\n    m =>\n    have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n      exact h₂\n    have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n    simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm : ℕ\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + m) = some a\n⊢ Nat.zero + m = Nat.zero\n[PROOFSTEP]\ncases m\n[GOAL]\ncase zero\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero + Nat.zero = Nat.zero\ncase succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nn✝ : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ n✝) = some a\n⊢ Nat.zero + Nat.succ n✝ = Nat.zero\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero + Nat.zero = Nat.zero\n[PROOFSTEP]\ncase zero => rfl\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nh₂ : enumerate sel s (Nat.zero + Nat.zero) = some a\n⊢ Nat.zero + Nat.zero = Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\ncase succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nn✝ : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ n✝) = some a\n⊢ Nat.zero + Nat.succ n✝ = Nat.zero\n[PROOFSTEP]\ncase succ\n  m =>\n  have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n    exact h₂\n  have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n  simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ Nat.zero + Nat.succ m = Nat.zero\n[PROOFSTEP]\ncase succ\n  m =>\n  have h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n    exact h₂\n  have : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n  simp_all [Set.mem_diff_singleton]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ Nat.zero + Nat.succ m = Nat.zero\n[PROOFSTEP]\nhave h' : enumerate sel (s \\ { a }) m = some a := by simp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add];\n  exact h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\n⊢ enumerate sel (s \\ {a}) m = some a\n[PROOFSTEP]\nsimp_all only [enumerate, Nat.zero_eq, Nat.add_eq, zero_add]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nm : ℕ\nh₁ : sel s = some a\nh₂ :\n  (do\n      let a ← some a\n      enumerate sel (s \\ {a}) m) =\n    some a\n⊢ enumerate sel (s \\ {a}) m = some a\n[PROOFSTEP]\nexact h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\nh' : enumerate sel (s \\ {a}) m = some a\n⊢ Nat.zero + Nat.succ m = Nat.zero\n[PROOFSTEP]\nhave : a ∈ s \\ { a } := enumerate_mem sel h_sel h'\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\ns : Set α\nh₁ : enumerate sel s Nat.zero = some a\nm : ℕ\nh₂ : enumerate sel s (Nat.zero + Nat.succ m) = some a\nh' : enumerate sel (s \\ {a}) m = some a\nthis : a ∈ s \\ {a}\n⊢ Nat.zero + Nat.succ m = Nat.zero\n[PROOFSTEP]\nsimp_all [Set.mem_diff_singleton]\n[GOAL]\ncase inr.intro.succ\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm n✝ : ℕ\nn_ih✝ : ∀ {s : Set α}, enumerate sel s n✝ = some a → enumerate sel s (n✝ + m) = some a → n✝ + m = n✝\ns : Set α\nh₁ : enumerate sel s (Nat.succ n✝) = some a\nh₂ : enumerate sel s (Nat.succ n✝ + m) = some a\n⊢ Nat.succ n✝ + m = Nat.succ n✝\n[PROOFSTEP]\ncase succ k ih =>\n  cases h : sel s\n  case none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n  case some\n    _ =>\n    simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n      Nat.succ.injEq]\n    exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncase succ k ih =>\n  cases h : sel s\n  case none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n  case some\n    _ =>\n    simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n      Nat.succ.injEq]\n    exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncases h : sel s\n[GOAL]\ncase none\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k + m = Nat.succ k\ncase some\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncase none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncase none => simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nh : sel s = none\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\nsimp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h]\n[GOAL]\ncase some\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncase some\n  _ =>\n  simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n    Nat.succ.injEq]\n  exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\ncase some\n  _ =>\n  simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2,\n    Nat.succ.injEq]\n  exact ih h₁ h₂\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (k + m) = some a → k + m = k\ns : Set α\nh₁ : enumerate sel s (Nat.succ k) = some a\nh₂ : enumerate sel s (Nat.succ k + m) = some a\nval✝ : α\nh : sel s = some val✝\n⊢ Nat.succ k + m = Nat.succ k\n[PROOFSTEP]\nsimp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq, Nat.add_succ, enumerate._eq_2, Nat.succ.injEq]\n[GOAL]\nα : Type u_1\nsel : Set α → Option α\na : α\nh_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s\nm k : ℕ\ns : Set α\nval✝ : α\nih : ∀ {s : Set α}, enumerate sel s k = some a → enumerate sel s (m + k) = some a → m + k = k\nh₁ :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) k) =\n    some a\nh₂ :\n  (do\n      let a ← some val✝\n      enumerate sel (s \\ {a}) (m + k)) =\n    some a\nh : sel s = some val✝\n⊢ m + k = k\n[PROOFSTEP]\nexact ih h₁ h₂\n", "meta": {"mathlib_filename": "Mathlib.Data.Set.Enumerate", "llama_tokens": 14573, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.588889130767832, "lm_q2_score": 0.43014734858584286, "lm_q1q2_score": 0.2533090982108046}}
{"text": "[GOAL]\nP : PartENat → Prop\n⊢ ∀ (a : PartENat), P ⊤ → (∀ (n : ℕ), P ↑n) → P a\n[PROOFSTEP]\nexact PartENat.casesOn'\n[GOAL]\nx : PartENat\n⊢ x + ⊤ = ⊤\n[PROOFSTEP]\nrw [add_comm, top_add]\n[GOAL]\nx : PartENat\nh : x.Dom\n⊢ ↑(Part.get x h) = x\n[PROOFSTEP]\nexact Part.ext' (iff_of_true trivial h) fun _ _ => rfl\n[GOAL]\nx : ℕ\nh : (↑x).Dom\n⊢ Part.get (↑x) h = x\n[PROOFSTEP]\nrw [← natCast_inj, natCast_get]\n[GOAL]\nx : ℕ\ny : PartENat\nh : (↑x + y).Dom\n⊢ Part.get (↑x + y) h = x + Part.get y (_ : y.Dom)\n[PROOFSTEP]\nrfl\n[GOAL]\na : PartENat\nha : a.Dom\nb : ℕ\n⊢ Part.get a ha = b ↔ a = ↑b\n[PROOFSTEP]\nrw [get_eq_iff_eq_some]\n[GOAL]\na : PartENat\nha : a.Dom\nb : ℕ\n⊢ a = ↑b ↔ a = ↑b\n[PROOFSTEP]\nrfl\n[GOAL]\nx : PartENat\ny : ℕ\nh : x ≤ ↑y\n⊢ x.Dom\n[PROOFSTEP]\nexact dom_of_le_some h\n[GOAL]\nx y : PartENat\ninst✝¹ : Decidable x.Dom\ninst✝ : Decidable y.Dom\nhx : x.Dom\n⊢ ?m.35650 x y hx ↔ x ≤ y\n[PROOFSTEP]\nrw [le_def]\n[GOAL]\nx y : PartENat\n⊢ x < y ↔ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nrw [lt_iff_le_not_le, le_def, le_def, not_exists]\n[GOAL]\nx y : PartENat\n⊢ ((∃ h, ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy) ∧\n      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy) ↔\n    ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx y : PartENat\n⊢ ((∃ h, ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy) ∧\n      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy) →\n    ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nrintro ⟨⟨hyx, H⟩, h⟩\n[GOAL]\ncase mp.intro.intro\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nby_cases hx : x.Dom\n[GOAL]\ncase pos\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : x.Dom\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nuse hx\n[GOAL]\ncase h\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : x.Dom\n⊢ ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nintro hy\n[GOAL]\ncase h\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : x.Dom\nhy : y.Dom\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\nspecialize H hy\n[GOAL]\ncase h\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nhx : x.Dom\nhy : y.Dom\nH : Part.get x (_ : x.Dom) ≤ Part.get y hy\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\nspecialize h fun _ => hy\n[GOAL]\ncase h\nx y : PartENat\nhyx : y.Dom → x.Dom\nhx : x.Dom\nhy : y.Dom\nH : Part.get x (_ : x.Dom) ≤ Part.get y hy\nh : ¬∀ (hy_1 : x.Dom), Part.get y hy ≤ Part.get x hy_1\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\nrw [not_forall] at h \n[GOAL]\ncase h\nx y : PartENat\nhyx : y.Dom → x.Dom\nhx : x.Dom\nhy : y.Dom\nH : Part.get x (_ : x.Dom) ≤ Part.get y hy\nh : ∃ x_1, ¬Part.get y hy ≤ Part.get x x_1\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\ncases' h with hx' h\n[GOAL]\ncase h.intro\nx y : PartENat\nhyx : y.Dom → x.Dom\nhx : x.Dom\nhy : y.Dom\nH : Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx' : x.Dom\nh : ¬Part.get y hy ≤ Part.get x hx'\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\nrw [not_le] at h \n[GOAL]\ncase h.intro\nx y : PartENat\nhyx : y.Dom → x.Dom\nhx : x.Dom\nhy : y.Dom\nH : Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx' : x.Dom\nh : Part.get x hx' < Part.get y hy\n⊢ Part.get x hx < Part.get y hy\n[PROOFSTEP]\nexact h\n[GOAL]\ncase neg\nx y : PartENat\nh : ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : ¬x.Dom\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nspecialize h fun hx' => (hx hx').elim\n[GOAL]\ncase neg\nx y : PartENat\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : ¬x.Dom\nh : ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nrw [not_forall] at h \n[GOAL]\ncase neg\nx y : PartENat\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : ¬x.Dom\nh : ∃ x_1, ¬Part.get y (_ : y.Dom) ≤ Part.get x x_1\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\ncases' h with hx' h\n[GOAL]\ncase neg.intro\nx y : PartENat\nhyx : y.Dom → x.Dom\nH : ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy\nhx : ¬x.Dom\nhx' : x.Dom\nh : ¬Part.get y (_ : y.Dom) ≤ Part.get x hx'\n⊢ ∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n[PROOFSTEP]\nexact (hx hx').elim\n[GOAL]\ncase mpr\nx y : PartENat\n⊢ (∃ hx, ∀ (hy : y.Dom), Part.get x hx < Part.get y hy) →\n    (∃ h, ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy) ∧\n      ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\n[PROOFSTEP]\nrintro ⟨hx, H⟩\n[GOAL]\ncase mpr.intro\nx y : PartENat\nhx : x.Dom\nH : ∀ (hy : y.Dom), Part.get x hx < Part.get y hy\n⊢ (∃ h, ∀ (hy : y.Dom), Part.get x (_ : x.Dom) ≤ Part.get y hy) ∧\n    ∀ (x_1 : x.Dom → y.Dom), ¬∀ (hy : x.Dom), Part.get y (_ : y.Dom) ≤ Part.get x hy\n[PROOFSTEP]\nexact ⟨⟨fun _ => hx, fun hy => (H hy).le⟩, fun hxy h => not_lt_of_le (h _) (H _)⟩\n[GOAL]\nx y : ℕ\n⊢ ↑x ≤ ↑y ↔ x ≤ y\n[PROOFSTEP]\nexact ⟨fun ⟨_, h⟩ => h trivial, fun h => ⟨fun _ => trivial, fun _ => h⟩⟩\n[GOAL]\nx y : ℕ\n⊢ ↑x < ↑y ↔ x < y\n[PROOFSTEP]\nrw [lt_iff_le_not_le, lt_iff_le_not_le, coe_le_coe, coe_le_coe]\n[GOAL]\nx y : PartENat\nhx : x.Dom\nhy : y.Dom\n⊢ Part.get x hx ≤ Part.get y hy ↔ x ≤ y\n[PROOFSTEP]\nconv =>\n  lhs\n  rw [← coe_le_coe, natCast_get, natCast_get]\n[GOAL]\nx y : PartENat\nhx : x.Dom\nhy : y.Dom\n| Part.get x hx ≤ Part.get y hy ↔ x ≤ y\n[PROOFSTEP]\n  lhs\n  rw [← coe_le_coe, natCast_get, natCast_get]\n[GOAL]\nx y : PartENat\nhx : x.Dom\nhy : y.Dom\n| Part.get x hx ≤ Part.get y hy ↔ x ≤ y\n[PROOFSTEP]\n  lhs\n  rw [← coe_le_coe, natCast_get, natCast_get]\n[GOAL]\nx y : PartENat\nhx : x.Dom\nhy : y.Dom\n| Part.get x hx ≤ Part.get y hy ↔ x ≤ y\n[PROOFSTEP]\nlhs\n[GOAL]\nx y : PartENat\nhx : x.Dom\nhy : y.Dom\n| Part.get x hx ≤ Part.get y hy\n[PROOFSTEP]\nrw [← coe_le_coe, natCast_get, natCast_get]\n[GOAL]\nx : PartENat\nn : ℕ\n⊢ x ≤ ↑n ↔ ∃ h, Part.get x h ≤ n\n[PROOFSTEP]\nshow (∃ h : True → x.Dom, _) ↔ ∃ h : x.Dom, x.get h ≤ n\n[GOAL]\nx : PartENat\nn : ℕ\n⊢ (∃ h, ∀ (hy : (↑n).Dom), Part.get x (_ : x.Dom) ≤ Part.get (↑n) hy) ↔ ∃ h, Part.get x h ≤ n\n[PROOFSTEP]\nsimp only [forall_prop_of_true, dom_natCast, get_natCast']\n[GOAL]\nx : PartENat\nn : ℕ\n⊢ x < ↑n ↔ ∃ h, Part.get x h < n\n[PROOFSTEP]\nsimp only [lt_def, forall_prop_of_true, get_natCast', dom_natCast]\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ ↑n ≤ x ↔ ∀ (h : x.Dom), n ≤ Part.get x h\n[PROOFSTEP]\nrw [← some_eq_natCast]\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ ↑n ≤ x ↔ ∀ (h : x.Dom), n ≤ Part.get x h\n[PROOFSTEP]\nsimp only [le_def, exists_prop_of_true, dom_some, forall_true_iff]\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ (∀ (hy : x.Dom), Part.get ↑n (_ : (↑n).Dom) ≤ Part.get x hy) ↔ ∀ (h : x.Dom), n ≤ Part.get x h\n[PROOFSTEP]\nrfl\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ ↑n < x ↔ ∀ (h : x.Dom), n < Part.get x h\n[PROOFSTEP]\nrw [← some_eq_natCast]\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ ↑n < x ↔ ∀ (h : x.Dom), n < Part.get x h\n[PROOFSTEP]\nsimp only [lt_def, exists_prop_of_true, dom_some, forall_true_iff]\n[GOAL]\nn : ℕ\nx : PartENat\n⊢ (∀ (hy : x.Dom), Part.get ↑n (_ : (↑n).Dom) < Part.get x hy) ↔ ∀ (h : x.Dom), n < Part.get x h\n[PROOFSTEP]\nrfl\n[GOAL]\n⊢ ¬1 = 0\n[PROOFSTEP]\ndecide\n[GOAL]\nx : ℕ\nh : ↑x = ⊤\n⊢ ¬(↑x).Dom = ⊤.Dom\n[PROOFSTEP]\nsimp only [dom_natCast]\n[GOAL]\nx : ℕ\nh : ↑x = ⊤\n⊢ ¬True = ⊤.Dom\n[PROOFSTEP]\nexact true_ne_false\n[GOAL]\nx : PartENat\n⊢ x ≠ ⊤ ↔ ∃ n, x = ↑n\n[PROOFSTEP]\nsimpa only [← some_eq_natCast] using Part.ne_none_iff\n[GOAL]\nx : PartENat\n⊢ x ≠ ⊤ ↔ x.Dom\n[PROOFSTEP]\nclassical exact not_iff_comm.1 Part.eq_none_iff'.symm\n[GOAL]\nx : PartENat\n⊢ x ≠ ⊤ ↔ x.Dom\n[PROOFSTEP]\nexact not_iff_comm.1 Part.eq_none_iff'.symm\n[GOAL]\nx : PartENat\n⊢ x = ⊤ ↔ ∀ (n : ℕ), ↑n < x\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase mp\nx : PartENat\n⊢ x = ⊤ → ∀ (n : ℕ), ↑n < x\n[PROOFSTEP]\nrintro rfl n\n[GOAL]\ncase mp\nn : ℕ\n⊢ ↑n < ⊤\n[PROOFSTEP]\nexact natCast_lt_top _\n[GOAL]\ncase mpr\nx : PartENat\n⊢ (∀ (n : ℕ), ↑n < x) → x = ⊤\n[PROOFSTEP]\ncontrapose!\n[GOAL]\ncase mpr\nx : PartENat\n⊢ x ≠ ⊤ → ∃ n, ¬↑n < x\n[PROOFSTEP]\nrw [ne_top_iff]\n[GOAL]\ncase mpr\nx : PartENat\n⊢ (∃ n, x = ↑n) → ∃ n, ¬↑n < x\n[PROOFSTEP]\nrintro ⟨n, rfl⟩\n[GOAL]\ncase mpr.intro\nn : ℕ\n⊢ ∃ n_1, ¬↑n_1 < ↑n\n[PROOFSTEP]\nexact ⟨n, irrefl _⟩\n[GOAL]\nx : PartENat\n⊢ 0 < ⊤ ↔ 1 ≤ ⊤\n[PROOFSTEP]\nsimp only [iff_true_iff, le_top, natCast_lt_top, ← @Nat.cast_zero PartENat]\n[GOAL]\nx : PartENat\nn : ℕ\n⊢ 0 < ↑n ↔ 1 ≤ ↑n\n[PROOFSTEP]\nrw [← Nat.cast_zero, ← Nat.cast_one, PartENat.coe_lt_coe, PartENat.coe_le_coe]\n[GOAL]\nx : PartENat\nn : ℕ\n⊢ 0 < n ↔ 1 ≤ n\n[PROOFSTEP]\nrfl\n[GOAL]\nsrc✝ : PartialOrder PartENat := partialOrder\na b : PartENat\n⊢ max a b = if a ≤ b then b else a\n[PROOFSTEP]\nchange (fun a b => a ⊔ b) a b = _\n[GOAL]\nsrc✝ : PartialOrder PartENat := partialOrder\na b : PartENat\n⊢ (fun a b => a ⊔ b) a b = if a ≤ b then b else a\n[PROOFSTEP]\nrw [@sup_eq_maxDefault PartENat _ (id _) _]\n[GOAL]\nsrc✝ : PartialOrder PartENat := partialOrder\na b : PartENat\n⊢ maxDefault a b = if a ≤ b then b else a\nsrc✝ : PartialOrder PartENat := partialOrder a b : PartENat ⊢ DecidableRel fun x x_1 => x ≤ x_1\n[PROOFSTEP]\nrfl\n[GOAL]\nsrc✝¹ : LinearOrder PartENat := linearOrder\nsrc✝ : AddCommMonoid PartENat := addCommMonoid\na b : PartENat\nx✝ : a ≤ b\nc : PartENat\nh₁ : b.Dom → a.Dom\nh₂ : ∀ (hy : b.Dom), Part.get a (_ : a.Dom) ≤ Part.get b hy\n⊢ ⊤ + a ≤ ⊤ + b\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝¹ : LinearOrder PartENat := linearOrder\nsrc✝ : AddCommMonoid PartENat := addCommMonoid\na b : PartENat\nx✝ : a ≤ b\nc✝ : PartENat\nh₁ : b.Dom → a.Dom\nh₂ : ∀ (hy : b.Dom), Part.get a (_ : a.Dom) ≤ Part.get b hy\nc : ℕ\nh : (↑c + b).Dom\n⊢ Part.get (↑c + a) (_ : (↑c).Dom ∧ a.Dom) ≤ Part.get (↑c + b) h\n[PROOFSTEP]\nsimpa only [coe_add_get] using add_le_add_left (h₂ _) c\n[GOAL]\nsrc✝² : SemilatticeSup PartENat := semilatticeSup\nsrc✝¹ : OrderBot PartENat := orderBot\nsrc✝ : OrderedAddCommMonoid PartENat := orderedAddCommMonoid\na✝ b✝ : PartENat\nb a : ℕ\nh : ↑a ≤ ↑b\n⊢ ↑b = ↑a + ↑(b - a)\n[PROOFSTEP]\nrw [← Nat.cast_add, natCast_inj, add_comm, tsub_add_cancel_of_le (coe_le_coe.1 h)]\n[GOAL]\nx y : PartENat\nn : ℕ\nh : x + y = ↑n\n⊢ x = ↑(n - Part.get y (_ : y.Dom))\n[PROOFSTEP]\nlift x to ℕ using dom_of_le_natCast ((le_add_right le_rfl).trans_eq h)\n[GOAL]\ncase intro\ny : PartENat\nn x : ℕ\nh : ↑x + y = ↑n\n⊢ ↑x = ↑(n - Part.get y (_ : y.Dom))\n[PROOFSTEP]\nlift y to ℕ using dom_of_le_natCast ((le_add_left le_rfl).trans_eq h)\n[GOAL]\ncase intro.intro\nn x y : ℕ\nh : ↑x + ↑y = ↑n\n⊢ ↑x = ↑(n - Part.get ↑y (_ : (↑y).Dom))\n[PROOFSTEP]\nrw [← Nat.cast_add, natCast_inj] at h \n[GOAL]\ncase intro.intro\nn x y : ℕ\nh✝ : ↑x + ↑y = ↑n\nh : x + y = n\n⊢ ↑x = ↑(n - Part.get ↑y (_ : (↑y).Dom))\n[PROOFSTEP]\nrw [get_natCast, natCast_inj, eq_tsub_of_add_eq h]\n[GOAL]\nx y z : PartENat\nh : x < y\nhz : z ≠ ⊤\n⊢ x + z < y + z\n[PROOFSTEP]\nrcases ne_top_iff.mp (ne_top_of_lt h) with ⟨m, rfl⟩\n[GOAL]\ncase intro\ny z : PartENat\nhz : z ≠ ⊤\nm : ℕ\nh : ↑m < y\n⊢ ↑m + z < y + z\n[PROOFSTEP]\nrcases ne_top_iff.mp hz with ⟨k, rfl⟩\n[GOAL]\ncase intro.intro\ny : PartENat\nm : ℕ\nh : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\n⊢ ↑m + ↑k < y + ↑k\n[PROOFSTEP]\ninduction' y using PartENat.casesOn with n\n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nh : ↑m < ⊤\n⊢ ↑m + ↑k < ⊤ + ↑k\n[PROOFSTEP]\nrw [top_add]\n  -- Porting note: was apply_mod_cast natCast_lt_top\n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nh : ↑m < ⊤\n⊢ ↑m + ↑k < ⊤\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nh : ↑m < ⊤\n⊢ ↑(m + k) < ⊤\n[PROOFSTEP]\napply natCast_lt_top\n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nn : ℕ\nh : ↑m < ↑n\n⊢ ↑m + ↑k < ↑n + ↑k\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nn : ℕ\nh : m < n\n⊢ ↑m + ↑k < ↑n + ↑k\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.intro.a\ny : PartENat\nm : ℕ\nh✝ : ↑m < y\nk : ℕ\nhz : ↑k ≠ ⊤\nn : ℕ\nh : m < n\n⊢ m + k < n + k\n[PROOFSTEP]\napply add_lt_add_right h\n[GOAL]\nx y z : PartENat\nhz : z ≠ ⊤\n⊢ z + x < z + y ↔ x < y\n[PROOFSTEP]\nrw [add_comm z, add_comm z, PartENat.add_lt_add_iff_right hz]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n⊢ x < x + y ↔ 0 < y\n[PROOFSTEP]\nconv_rhs => rw [← PartENat.add_lt_add_iff_left hx]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n| 0 < y\n[PROOFSTEP]\nrw [← PartENat.add_lt_add_iff_left hx]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n| 0 < y\n[PROOFSTEP]\nrw [← PartENat.add_lt_add_iff_left hx]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n| 0 < y\n[PROOFSTEP]\nrw [← PartENat.add_lt_add_iff_left hx]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n⊢ x < x + y ↔ x + 0 < x + y\n[PROOFSTEP]\nrw [add_zero]\n[GOAL]\nx : PartENat\nhx : x ≠ ⊤\n⊢ x < x + 1\n[PROOFSTEP]\nrw [PartENat.lt_add_iff_pos_right hx]\n[GOAL]\nx : PartENat\nhx : x ≠ ⊤\n⊢ 0 < 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\nx y : PartENat\nh : x < y + 1\n⊢ x ≤ y\n[PROOFSTEP]\ninduction' y using PartENat.casesOn with n\n[GOAL]\ncase a\nx y : PartENat\nh✝ : x < y + 1\nh : x < ⊤ + 1\n⊢ x ≤ ⊤\n[PROOFSTEP]\napply le_top\n[GOAL]\ncase a\nx y : PartENat\nh✝ : x < y + 1\nn : ℕ\nh : x < ↑n + 1\n⊢ x ≤ ↑n\n[PROOFSTEP]\nrcases ne_top_iff.mp (ne_top_of_lt h) with\n  ⟨m, rfl⟩\n    -- Porting note: was `apply_mod_cast Nat.le_of_lt_succ; apply_mod_cast h`\n[GOAL]\ncase a.intro\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y + 1\nh : ↑m < ↑n + 1\n⊢ ↑m ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase a.intro\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y + 1\nh : ↑m < ↑n + 1\n⊢ m ≤ n\n[PROOFSTEP]\napply Nat.le_of_lt_succ\n[GOAL]\ncase a.intro.a\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y + 1\nh : ↑m < ↑n + 1\n⊢ m < Nat.succ n\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\nx y : PartENat\nh : x < y\n⊢ x + 1 ≤ y\n[PROOFSTEP]\ninduction' y using PartENat.casesOn with n\n[GOAL]\ncase a\nx y : PartENat\nh✝ : x < y\nh : x < ⊤\n⊢ x + 1 ≤ ⊤\n[PROOFSTEP]\napply le_top\n[GOAL]\ncase a\nx y : PartENat\nh✝ : x < y\nn : ℕ\nh : x < ↑n\n⊢ x + 1 ≤ ↑n\n[PROOFSTEP]\nrcases ne_top_iff.mp (ne_top_of_lt h) with\n  ⟨m, rfl⟩\n    -- Porting note: was `apply_mod_cast Nat.succ_le_of_lt; apply_mod_cast h`\n[GOAL]\ncase a.intro\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y\nh : ↑m < ↑n\n⊢ ↑m + 1 ≤ ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase a.intro\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y\nh : ↑m < ↑n\n⊢ m + 1 ≤ n\n[PROOFSTEP]\napply Nat.succ_le_of_lt\n[GOAL]\ncase a.intro.h\ny : PartENat\nn m : ℕ\nh✝ : ↑m < y\nh : ↑m < ↑n\n⊢ m < n\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n⊢ x + 1 ≤ y ↔ x < y\n[PROOFSTEP]\nrefine ⟨fun h => ?_, add_one_le_of_lt⟩\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\nh : x + 1 ≤ y\n⊢ x < y\n[PROOFSTEP]\nrcases ne_top_iff.mp hx with ⟨m, rfl⟩\n[GOAL]\ncase intro\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh : ↑m + 1 ≤ y\n⊢ ↑m < y\n[PROOFSTEP]\ninduction' y using PartENat.casesOn with n\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m + 1 ≤ y\nh : ↑m + 1 ≤ ⊤\n⊢ ↑m < ⊤\n[PROOFSTEP]\napply natCast_lt_top\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m + 1 ≤ y\nn : ℕ\nh : ↑m + 1 ≤ ↑n\n⊢ ↑m < ↑n\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m + 1 ≤ y\nn : ℕ\nh : ↑m + 1 ≤ ↑n\n⊢ m < n\n[PROOFSTEP]\napply Nat.lt_of_succ_le\n[GOAL]\ncase intro.a.h\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m + 1 ≤ y\nn : ℕ\nh : ↑m + 1 ≤ ↑n\n⊢ Nat.succ m ≤ n\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\nn : ℕ\ne : PartENat\n⊢ ↑(Nat.succ n) ≤ e ↔ ↑n < e\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one n, Nat.cast_add, Nat.cast_one, add_one_le_iff_lt (natCast_ne_top n)]\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\n⊢ x < y + 1 ↔ x ≤ y\n[PROOFSTEP]\nrefine ⟨le_of_lt_add_one, fun h => ?_⟩\n[GOAL]\nx y : PartENat\nhx : x ≠ ⊤\nh : x ≤ y\n⊢ x < y + 1\n[PROOFSTEP]\nrcases ne_top_iff.mp hx with ⟨m, rfl⟩\n[GOAL]\ncase intro\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh : ↑m ≤ y\n⊢ ↑m < y + 1\n[PROOFSTEP]\ninduction' y using PartENat.casesOn with n\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m ≤ y\nh : ↑m ≤ ⊤\n⊢ ↑m < ⊤ + 1\n[PROOFSTEP]\nrw [top_add]\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m ≤ y\nh : ↑m ≤ ⊤\n⊢ ↑m < ⊤\n[PROOFSTEP]\napply natCast_lt_top\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m ≤ y\nn : ℕ\nh : ↑m ≤ ↑n\n⊢ ↑m < ↑n + 1\n[PROOFSTEP]\nnorm_cast\n[GOAL]\ncase intro.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m ≤ y\nn : ℕ\nh : ↑m ≤ ↑n\n⊢ m < n + 1\n[PROOFSTEP]\napply Nat.lt_succ_of_le\n[GOAL]\ncase intro.a.a\ny : PartENat\nm : ℕ\nhx : ↑m ≠ ⊤\nh✝ : ↑m ≤ y\nn : ℕ\nh : ↑m ≤ ↑n\n⊢ m ≤ n\n[PROOFSTEP]\nnorm_cast at h \n[GOAL]\nx : PartENat\nn : ℕ\nhx : x ≠ ⊤\n⊢ x < ↑(Nat.succ n) ↔ x ≤ ↑n\n[PROOFSTEP]\nrw [Nat.succ_eq_add_one n, Nat.cast_add, Nat.cast_one, lt_add_one_iff_lt hx]\n[GOAL]\na b : PartENat\n⊢ a + b = ⊤ ↔ a = ⊤ ∨ b = ⊤\n[PROOFSTEP]\nrefine PartENat.casesOn a ?_ ?_\n[GOAL]\ncase refine_1\na b : PartENat\n⊢ ⊤ + b = ⊤ ↔ ⊤ = ⊤ ∨ b = ⊤\n[PROOFSTEP]\nrefine PartENat.casesOn b ?_ ?_\n[GOAL]\ncase refine_2\na b : PartENat\n⊢ ∀ (n : ℕ), ↑n + b = ⊤ ↔ ↑n = ⊤ ∨ b = ⊤\n[PROOFSTEP]\nrefine PartENat.casesOn b ?_ ?_\n[GOAL]\ncase refine_1.refine_1\na b : PartENat\n⊢ ⊤ + ⊤ = ⊤ ↔ ⊤ = ⊤ ∨ ⊤ = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_1.refine_2\na b : PartENat\n⊢ ∀ (n : ℕ), ⊤ + ↑n = ⊤ ↔ ⊤ = ⊤ ∨ ↑n = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2.refine_1\na b : PartENat\n⊢ ∀ (n : ℕ), ↑n + ⊤ = ⊤ ↔ ↑n = ⊤ ∨ ⊤ = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2.refine_2\na b : PartENat\n⊢ ∀ (n n_1 : ℕ), ↑n_1 + ↑n = ⊤ ↔ ↑n_1 = ⊤ ∨ ↑n = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine_2.refine_2\na b : PartENat\n⊢ ∀ (n n_1 : ℕ), ¬↑n_1 + ↑n = ⊤\n[PROOFSTEP]\nsimp only [← Nat.cast_add, PartENat.natCast_ne_top, forall_const]\n[GOAL]\na b c : PartENat\nhc : c ≠ ⊤\n⊢ a + c = b + c ↔ a = b\n[PROOFSTEP]\nrcases ne_top_iff.1 hc with ⟨c, rfl⟩\n[GOAL]\ncase intro\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ a + ↑c = b + ↑c ↔ a = b\n[PROOFSTEP]\nrefine PartENat.casesOn a ?_ ?_\n[GOAL]\ncase intro.refine_1\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ⊤ + ↑c = b + ↑c ↔ ⊤ = b\n[PROOFSTEP]\nrefine PartENat.casesOn b ?_ ?_\n[GOAL]\ncase intro.refine_2\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ∀ (n : ℕ), ↑n + ↑c = b + ↑c ↔ ↑n = b\n[PROOFSTEP]\nrefine PartENat.casesOn b ?_ ?_\n[GOAL]\ncase intro.refine_1.refine_1\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ⊤ + ↑c = ⊤ + ↑c ↔ ⊤ = ⊤\n[PROOFSTEP]\nsimp [add_eq_top_iff, natCast_ne_top, @eq_comm _ (⊤ : PartENat)]\n[GOAL]\ncase intro.refine_1.refine_2\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ∀ (n : ℕ), ⊤ + ↑c = ↑n + ↑c ↔ ⊤ = ↑n\n[PROOFSTEP]\nsimp [add_eq_top_iff, natCast_ne_top, @eq_comm _ (⊤ : PartENat)]\n[GOAL]\ncase intro.refine_2.refine_1\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ∀ (n : ℕ), ↑n + ↑c = ⊤ + ↑c ↔ ↑n = ⊤\n[PROOFSTEP]\nsimp [add_eq_top_iff, natCast_ne_top, @eq_comm _ (⊤ : PartENat)]\n[GOAL]\ncase intro.refine_2.refine_2\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ∀ (n n_1 : ℕ), ↑n_1 + ↑c = ↑n + ↑c ↔ ↑n_1 = ↑n\n[PROOFSTEP]\nsimp [add_eq_top_iff, natCast_ne_top, @eq_comm _ (⊤ : PartENat)]\n[GOAL]\ncase intro.refine_2.refine_2\na b : PartENat\nc : ℕ\nhc : ↑c ≠ ⊤\n⊢ ∀ (n n_1 : ℕ), ↑n_1 + ↑c = ↑n + ↑c ↔ n_1 = n\n[PROOFSTEP]\nsimp only [← Nat.cast_add, add_left_cancel_iff, PartENat.natCast_inj, add_comm, forall_const]\n[GOAL]\na b c : PartENat\nha : a ≠ ⊤\n⊢ a + b = a + c ↔ b = c\n[PROOFSTEP]\nrw [add_comm a, add_comm a, PartENat.add_right_cancel_iff ha]\n[GOAL]\nh : Decidable ⊤.Dom\n⊢ toWithTop ⊤ = ⊤\n[PROOFSTEP]\nconvert toWithTop_top\n[GOAL]\nh : Decidable 0.Dom\n⊢ toWithTop 0 = 0\n[PROOFSTEP]\nconvert toWithTop_zero\n[GOAL]\nn : ℕ\nx✝ : Decidable (↑n).Dom\n⊢ toWithTop ↑n = ↑n\n[PROOFSTEP]\nsimp only [← toWithTop_some]\n[GOAL]\nn : ℕ\nx✝ : Decidable (↑n).Dom\n⊢ toWithTop ↑n = toWithTop ↑n\n[PROOFSTEP]\ncongr\n[GOAL]\nn : ℕ\nh : Decidable (↑n).Dom\n⊢ toWithTop ↑n = ↑n\n[PROOFSTEP]\nrw [toWithTop_natCast n]\n[GOAL]\nx y : PartENat\nhx : Decidable x.Dom\nhy : Decidable y.Dom\n⊢ toWithTop x ≤ toWithTop y ↔ x ≤ y\n[PROOFSTEP]\ninduction y using PartENat.casesOn generalizing hy\n[GOAL]\ncase a\nx : PartENat\nhx : Decidable x.Dom\nhy : Decidable ⊤.Dom\n⊢ toWithTop x ≤ toWithTop ⊤ ↔ x ≤ ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nx : PartENat\nhx : Decidable x.Dom\nn✝ : ℕ\nhy : Decidable (↑n✝).Dom\n⊢ toWithTop x ≤ toWithTop ↑n✝ ↔ x ≤ ↑n✝\n[PROOFSTEP]\ninduction x using PartENat.casesOn generalizing hx\n[GOAL]\ncase a.a\nn✝ : ℕ\nhy : Decidable (↑n✝).Dom\nhx : Decidable ⊤.Dom\n⊢ toWithTop ⊤ ≤ toWithTop ↑n✝ ↔ ⊤ ≤ ↑n✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a.a\nn✝¹ : ℕ\nhy : Decidable (↑n✝¹).Dom\nn✝ : ℕ\nhx : Decidable (↑n✝).Dom\n⊢ toWithTop ↑n✝ ≤ toWithTop ↑n✝¹ ↔ ↑n✝ ≤ ↑n✝¹\n[PROOFSTEP]\nsimp\n  -- Porting note: this takes too long.\n[GOAL]\n⊢ ↑Option.none = ⊤\n[PROOFSTEP]\nrfl\n  -- Porting note : new\n[GOAL]\nn : ℕ\n⊢ ↑(Option.some n) = ↑n\n[PROOFSTEP]\nrfl\n  -- Porting note : new\n[GOAL]\nn : ℕ∞\nx✝ : Decidable (↑n).Dom\n⊢ toWithTop ↑n = n\n[PROOFSTEP]\ninduction n with\n| none => simp\n| some n =>\n  simp only [toWithTop_natCast', ofENat_some]\n  rfl\n[GOAL]\nn : ℕ∞\nx✝ : Decidable (↑n).Dom\n⊢ toWithTop ↑n = n\n[PROOFSTEP]\ninduction n with\n| none => simp\n| some n =>\n  simp only [toWithTop_natCast', ofENat_some]\n  rfl\n[GOAL]\ncase none\nx✝ : Decidable (↑Option.none).Dom\n⊢ toWithTop ↑Option.none = Option.none\n[PROOFSTEP]\n\n| none => simp\n[GOAL]\ncase none\nx✝ : Decidable (↑Option.none).Dom\n⊢ toWithTop ↑Option.none = Option.none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nn : ℕ\nx✝ : Decidable (↑(Option.some n)).Dom\n⊢ toWithTop ↑(Option.some n) = Option.some n\n[PROOFSTEP]\n\n| some n =>\n  simp only [toWithTop_natCast', ofENat_some]\n  rfl\n[GOAL]\ncase some\nn : ℕ\nx✝ : Decidable (↑(Option.some n)).Dom\n⊢ toWithTop ↑(Option.some n) = Option.some n\n[PROOFSTEP]\nsimp only [toWithTop_natCast', ofENat_some]\n[GOAL]\ncase some\nn : ℕ\nx✝ : Decidable (↑(Option.some n)).Dom\n⊢ ↑n = Option.some n\n[PROOFSTEP]\nrfl\n[GOAL]\nx y : PartENat\n⊢ toWithTop (x + y) = toWithTop x + toWithTop y\n[PROOFSTEP]\nrefine PartENat.casesOn y ?_ ?_\n[GOAL]\ncase refine_1\nx y : PartENat\n⊢ toWithTop (x + ⊤) = toWithTop x + toWithTop ⊤\n[PROOFSTEP]\nrefine\n  PartENat.casesOn x ?_\n    ?_\n      --Porting note: was `simp [← Nat.cast_add, ← ENat.coe_add]`\n[GOAL]\ncase refine_2\nx y : PartENat\n⊢ ∀ (n : ℕ), toWithTop (x + ↑n) = toWithTop x + toWithTop ↑n\n[PROOFSTEP]\nrefine\n  PartENat.casesOn x ?_\n    ?_\n      --Porting note: was `simp [← Nat.cast_add, ← ENat.coe_add]`\n[GOAL]\ncase refine_1.refine_1\nx y : PartENat\n⊢ toWithTop (⊤ + ⊤) = toWithTop ⊤ + toWithTop ⊤\n[PROOFSTEP]\nsimp only [add_top, toWithTop_top', _root_.add_top]\n[GOAL]\ncase refine_1.refine_2\nx y : PartENat\n⊢ ∀ (n : ℕ), toWithTop (↑n + ⊤) = toWithTop ↑n + toWithTop ⊤\n[PROOFSTEP]\nsimp only [add_top, toWithTop_top', toWithTop_natCast', _root_.add_top, forall_const]\n[GOAL]\ncase refine_2.refine_1\nx y : PartENat\n⊢ ∀ (n : ℕ), toWithTop (⊤ + ↑n) = toWithTop ⊤ + toWithTop ↑n\n[PROOFSTEP]\nsimp only [top_add, toWithTop_top', toWithTop_natCast', _root_.top_add, forall_const]\n[GOAL]\ncase refine_2.refine_2\nx y : PartENat\n⊢ ∀ (n n_1 : ℕ), toWithTop (↑n + ↑n_1) = toWithTop ↑n + toWithTop ↑n_1\n[PROOFSTEP]\nsimp_rw [toWithTop_natCast', ← Nat.cast_add, toWithTop_natCast', forall_const]\n[GOAL]\nx : PartENat\n⊢ (fun x => ↑x) ((fun x => toWithTop x) x) = x\n[PROOFSTEP]\ninduction x using PartENat.casesOn\n[GOAL]\ncase a\n⊢ (fun x => ↑x) ((fun x => toWithTop x) ⊤) = ⊤\n[PROOFSTEP]\nintros\n[GOAL]\ncase a\nn✝ : ℕ\n⊢ (fun x => ↑x) ((fun x => toWithTop x) ↑n✝) = ↑n✝\n[PROOFSTEP]\nintros\n[GOAL]\ncase a\n⊢ (fun x => ↑x) ((fun x => toWithTop x) ⊤) = ⊤\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\nn✝ : ℕ\n⊢ (fun x => ↑x) ((fun x => toWithTop x) ↑n✝) = ↑n✝\n[PROOFSTEP]\nsimp\n[GOAL]\ncase a\n⊢ ↑⊤ = ⊤\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nn✝ : ℕ\n⊢ ↑↑n✝ = ↑n✝\n[PROOFSTEP]\nrfl\n[GOAL]\nx : ℕ∞\n⊢ (fun x => toWithTop x) ((fun x => ↑x) x) = x\n[PROOFSTEP]\nsimp [toWithTop_ofENat]\n[GOAL]\n⊢ ↑withTopEquiv 0 = 0\n[PROOFSTEP]\nsimpa only [Nat.cast_zero] using withTopEquiv_natCast 0\n[GOAL]\nx y : ℕ∞\n⊢ ↑withTopEquiv.symm x ≤ ↑withTopEquiv.symm y ↔ x ≤ y\n[PROOFSTEP]\nrw [← withTopEquiv_le]\n[GOAL]\nx y : ℕ∞\n⊢ ↑withTopEquiv (↑withTopEquiv.symm x) ≤ ↑withTopEquiv (↑withTopEquiv.symm y) ↔ x ≤ y\n[PROOFSTEP]\nsimp\n[GOAL]\nx y : ℕ∞\n⊢ ↑withTopEquiv.symm x < ↑withTopEquiv.symm y ↔ x < y\n[PROOFSTEP]\nrw [← withTopEquiv_lt]\n[GOAL]\nx y : ℕ∞\n⊢ ↑withTopEquiv (↑withTopEquiv.symm x) < ↑withTopEquiv (↑withTopEquiv.symm y) ↔ x < y\n[PROOFSTEP]\nsimp\n[GOAL]\nsrc✝ : PartENat ≃ ℕ∞ := withTopEquiv\nx y : PartENat\n⊢ Equiv.toFun\n      { toFun := src✝.toFun, invFun := src✝.invFun, 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 := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        x +\n      Equiv.toFun\n        { toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),\n          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }\n        y\n[PROOFSTEP]\nsimp only [withTopEquiv]\n[GOAL]\nsrc✝ : PartENat ≃ ℕ∞ := withTopEquiv\nx y : PartENat\n⊢ toWithTop (x + y) = toWithTop x + toWithTop y\n[PROOFSTEP]\nexact toWithTop_add\n[GOAL]\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nclassical\nchange WellFounded fun a b : PartENat => a < b\nsimp_rw [← withTopEquiv_lt]\nexact InvImage.wf _ (WithTop.wellFounded_lt Nat.lt_wfRel.wf)\n[GOAL]\n⊢ WellFounded fun x x_1 => x < x_1\n[PROOFSTEP]\nchange WellFounded fun a b : PartENat => a < b\n[GOAL]\n⊢ WellFounded fun a b => a < b\n[PROOFSTEP]\nsimp_rw [← withTopEquiv_lt]\n[GOAL]\n⊢ WellFounded fun a b => ↑withTopEquiv a < ↑withTopEquiv b\n[PROOFSTEP]\nexact InvImage.wf _ (WithTop.wellFounded_lt Nat.lt_wfRel.wf)\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\n⊢ ↑n < find P\n[PROOFSTEP]\nrw [coe_lt_iff]\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\n⊢ ∀ (h : (find P).Dom), n < Part.get (find P) h\n[PROOFSTEP]\nintro h₁\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\nh₁ : (find P).Dom\n⊢ n < Part.get (find P) h₁\n[PROOFSTEP]\nrw [find_get]\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\nh₁ : (find P).Dom\n⊢ n < Nat.find h₁\n[PROOFSTEP]\nhave h₂ := @Nat.find_spec P _ h₁\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\nh₁ : (find P).Dom\nh₂ : P (Nat.find h₁)\n⊢ n < Nat.find h₁\n[PROOFSTEP]\nrevert h₂\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\nh₁ : (find P).Dom\n⊢ P (Nat.find h₁) → n < Nat.find h₁\n[PROOFSTEP]\ncontrapose!\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (m : ℕ), m ≤ n → ¬P m\nh₁ : (find P).Dom\n⊢ Nat.find h₁ ≤ n → ¬P (Nat.find h₁)\n[PROOFSTEP]\nexact h _\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\n⊢ ↑n < find P ↔ ∀ (m : ℕ), m ≤ n → ¬P m\n[PROOFSTEP]\nrefine' ⟨_, lt_find P n⟩\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\n⊢ ↑n < find P → ∀ (m : ℕ), m ≤ n → ¬P m\n[PROOFSTEP]\nintro h m hm\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ↑n < find P\nm : ℕ\nhm : m ≤ n\n⊢ ¬P m\n[PROOFSTEP]\nby_cases H : (find P).Dom\n[GOAL]\ncase pos\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ↑n < find P\nm : ℕ\nhm : m ≤ n\nH : (find P).Dom\n⊢ ¬P m\n[PROOFSTEP]\napply Nat.find_min H\n[GOAL]\ncase pos\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ↑n < find P\nm : ℕ\nhm : m ≤ n\nH : (find P).Dom\n⊢ m < Nat.find H\n[PROOFSTEP]\nrw [coe_lt_iff] at h \n[GOAL]\ncase pos\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ∀ (h : (find P).Dom), n < Part.get (find P) h\nm : ℕ\nhm : m ≤ n\nH : (find P).Dom\n⊢ m < Nat.find H\n[PROOFSTEP]\nspecialize h H\n[GOAL]\ncase pos\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn m : ℕ\nhm : m ≤ n\nH : (find P).Dom\nh : n < Part.get (find P) H\n⊢ m < Nat.find H\n[PROOFSTEP]\nexact lt_of_le_of_lt hm h\n[GOAL]\ncase neg\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : ↑n < find P\nm : ℕ\nhm : m ≤ n\nH : ¬(find P).Dom\n⊢ ¬P m\n[PROOFSTEP]\nexact not_exists.mp H m\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : P n\n⊢ find P ≤ ↑n\n[PROOFSTEP]\nrw [le_coe_iff]\n[GOAL]\nP : ℕ → Prop\ninst✝ : DecidablePred P\nn : ℕ\nh : P n\n⊢ ∃ h, Part.get (find P) h ≤ n\n[PROOFSTEP]\nrefine' ⟨⟨_, h⟩, @Nat.find_min' P _ _ _ h⟩\n", "meta": {"mathlib_filename": "Mathlib.Data.Nat.PartENat", "llama_tokens": 15332, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO\n\n", "lm_q1_score": 0.5583269796369905, "lm_q2_score": 0.4532618480153861, "lm_q1q2_score": 0.25306831858711115}}
{"text": "[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\n⊢ Compatibility.τ₀ =\n    Compatibility.τ₁\n      (eqToIso (_ : (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁))\n      (eqToIso\n        (_ :\n          (toKaroubiEquivalence (ChainComplex C ℕ)).functor ⋙ Preadditive.DoldKan.equivalence.inverse =\n            Γ ⋙ (toKaroubiEquivalence (SimplicialObject C)).functor))\n      N₁Γ₀\n[PROOFSTEP]\next K : 3\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app Compatibility.τ₀.hom K =\n    NatTrans.app\n      (Compatibility.τ₁\n          (eqToIso\n            (_ : (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁))\n          (eqToIso\n            (_ :\n              (toKaroubiEquivalence (ChainComplex C ℕ)).functor ⋙ Preadditive.DoldKan.equivalence.inverse =\n                Γ ⋙ (toKaroubiEquivalence (SimplicialObject C)).functor))\n          N₁Γ₀).hom\n      K\n[PROOFSTEP]\nsimp only [Compatibility.τ₀_hom_app, Compatibility.τ₁_hom_app, eqToIso.hom]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app Preadditive.DoldKan.equivalence.counitIso.hom ((toKaroubiEquivalence (ChainComplex C ℕ)).functor.obj K) =\n    Preadditive.DoldKan.equivalence.functor.map\n        (NatTrans.app\n          (eqToHom\n            (_ :\n              (toKaroubiEquivalence (ChainComplex C ℕ)).functor ⋙ Preadditive.DoldKan.equivalence.inverse =\n                Γ ⋙ (toKaroubiEquivalence (SimplicialObject C)).functor))\n          K) ≫\n      NatTrans.app\n          (eqToHom\n            (_ : (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁))\n          (Γ.obj K) ≫\n        NatTrans.app N₁Γ₀.hom K\n[PROOFSTEP]\nrefine' (N₂Γ₂_compatible_with_N₁Γ₀ K).trans _\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nK : ChainComplex C ℕ\n⊢ NatTrans.app N₂Γ₂ToKaroubiIso.hom K ≫ NatTrans.app N₁Γ₀.hom K =\n    Preadditive.DoldKan.equivalence.functor.map\n        (NatTrans.app\n          (eqToHom\n            (_ :\n              (toKaroubiEquivalence (ChainComplex C ℕ)).functor ⋙ Preadditive.DoldKan.equivalence.inverse =\n                Γ ⋙ (toKaroubiEquivalence (SimplicialObject C)).functor))\n          K) ≫\n      NatTrans.app\n          (eqToHom\n            (_ : (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁))\n          (Γ.obj K) ≫\n        NatTrans.app N₁Γ₀.hom K\n[PROOFSTEP]\nsimp only [N₂Γ₂ToKaroubiIso_hom, eqToHom_map, eqToHom_app, eqToHom_trans_assoc]\n[GOAL]\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\n⊢ Compatibility.υ\n      (eqToIso\n        (_ : (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁)) =\n    Γ₂N₁\n[PROOFSTEP]\next1\n[GOAL]\ncase w\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\n⊢ (Compatibility.υ\n        (eqToIso\n          (_ :\n            (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor = N₁))).hom =\n    Γ₂N₁.hom\n[PROOFSTEP]\nrw [← cancel_epi Γ₂N₁.inv, Iso.inv_hom_id]\n[GOAL]\ncase w\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\n⊢ Γ₂N₁.inv ≫\n      (Compatibility.υ\n          (eqToIso\n            (_ :\n              (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                N₁))).hom =\n    𝟙 (N₁ ⋙ Γ₂)\n[PROOFSTEP]\next X : 2\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app\n      (Γ₂N₁.inv ≫\n        (Compatibility.υ\n            (eqToIso\n              (_ :\n                (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                  N₁))).hom)\n      X =\n    NatTrans.app (𝟙 (N₁ ⋙ Γ₂)) X\n[PROOFSTEP]\nrw [NatTrans.comp_app]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app Γ₂N₁.inv X ≫\n      NatTrans.app\n        (Compatibility.υ\n            (eqToIso\n              (_ :\n                (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                  N₁))).hom\n        X =\n    NatTrans.app (𝟙 (N₁ ⋙ Γ₂)) X\n[PROOFSTEP]\nerw [compatibility_Γ₂N₁_Γ₂N₂_natTrans X]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ ((compatibility_Γ₂N₁_Γ₂N₂.app X).inv ≫ NatTrans.app Γ₂N₂.natTrans ((toKaroubi (SimplicialObject C)).obj X)) ≫\n      NatTrans.app\n        (Compatibility.υ\n            (eqToIso\n              (_ :\n                (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                  N₁))).hom\n        X =\n    NatTrans.app (𝟙 (N₁ ⋙ Γ₂)) X\n[PROOFSTEP]\nrw [Compatibility.υ_hom_app, Preadditive.DoldKan.equivalence_unitIso, Iso.app_inv, assoc]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      NatTrans.app Γ₂N₂.natTrans ((toKaroubi (SimplicialObject C)).obj X) ≫\n        NatTrans.app Γ₂N₂.hom ((toKaroubiEquivalence (SimplicialObject C)).functor.obj X) ≫\n          Preadditive.DoldKan.equivalence.inverse.map\n            (NatTrans.app\n              (eqToIso\n                  (_ :\n                    (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                      N₁)).hom\n              X) =\n    NatTrans.app (𝟙 (N₁ ⋙ Γ₂)) X\n[PROOFSTEP]\nerw [← NatTrans.comp_app_assoc, IsIso.hom_inv_id]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      NatTrans.app (𝟙 (N₂ ⋙ Γ₂)) ((toKaroubi (SimplicialObject C)).obj X) ≫\n        Preadditive.DoldKan.equivalence.inverse.map\n          (NatTrans.app\n            (eqToIso\n                (_ :\n                  (toKaroubiEquivalence (SimplicialObject C)).functor ⋙ Preadditive.DoldKan.equivalence.functor =\n                    N₁)).hom\n            X) =\n    NatTrans.app (𝟙 (N₁ ⋙ Γ₂)) X\n[PROOFSTEP]\nrw [NatTrans.id_app, id_comp, NatTrans.id_app, eqToIso.hom, eqToHom_app, eqToHom_map]\n[GOAL]\ncase w.w.h\nC : Type u_1\ninst✝³ : Category.{u_2, u_1} C\ninst✝² : Preadditive C\ninst✝¹ : IsIdempotentComplete C\ninst✝ : HasFiniteCoproducts C\nX : SimplicialObject C\n⊢ NatTrans.app compatibility_Γ₂N₁_Γ₂N₂.inv X ≫\n      eqToHom\n        (_ :\n          Preadditive.DoldKan.equivalence.inverse.obj\n              (Preadditive.DoldKan.equivalence.functor.obj\n                ((toKaroubiEquivalence (SimplicialObject C)).functor.obj X)) =\n            Preadditive.DoldKan.equivalence.inverse.obj (N₁.obj X)) =\n    𝟙 ((N₁ ⋙ Γ₂).obj X)\n[PROOFSTEP]\nrw [compatibility_Γ₂N₁_Γ₂N₂_inv_app, eqToHom_trans, eqToHom_refl]\n", "meta": {"mathlib_filename": "Mathlib.AlgebraicTopology.DoldKan.EquivalencePseudoabelian", "llama_tokens": 3418, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5774953651858118, "lm_q2_score": 0.4378234991142019, "lm_q1q2_score": 0.25284104150788594}}
{"text": "[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\nh : L ⊣ F\nA : C\ninst✝² : PreservesLimitsOfShape (Discrete WalkingPair) L\ninst✝¹ : Full F\ninst✝ : Faithful F\nB : D\n⊢ IsIso (NatTrans.app (frobeniusMorphism F h A) B)\n[PROOFSTEP]\ndsimp [frobeniusMorphism]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\nh : L ⊣ F\nA : C\ninst✝² : PreservesLimitsOfShape (Discrete WalkingPair) L\ninst✝¹ : Full F\ninst✝ : Faithful F\nB : D\n⊢ IsIso (prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)))\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\n⊢ prod.map (𝟙 (F.obj A)) (NatTrans.app (expComparison F A) B) ≫ NatTrans.app (exp.ev (F.obj A)) (F.obj B) =\n    inv (prodComparison F A (A ⟹ B)) ≫ F.map (NatTrans.app (exp.ev A) B)\n[PROOFSTEP]\nconvert transferNatTrans_counit _ _ (prodComparisonNatIso F A).inv B using 2\n[GOAL]\ncase h.e'_3.h.h.e'_6.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\ne_1✝ :\n  (F.obj A ⨯ (exp A ⋙ F).obj B ⟶ (𝟭 D).obj (F.obj B)) =\n    ((prod.functor.obj (F.obj A)).obj ((exp A ⋙ F).obj B) ⟶ (𝟭 D).obj (F.obj B))\ne_3✝ : (F.obj A ⨯ F.obj (A ⟹ B)) = (F ⋙ prod.functor.obj (F.obj A)).obj (A ⟹ B)\ne_4✝ : F.obj (A ⨯ A ⟹ B) = (prod.functor.obj A ⋙ F).obj (A ⟹ B)\n⊢ inv (prodComparison F A (A ⟹ B)) = NatTrans.app (prodComparisonNatIso F A).inv (A ⟹ B)\n[PROOFSTEP]\napply IsIso.inv_eq_of_hom_inv_id\n[GOAL]\ncase h.e'_3.h.h.e'_6.h.hom_inv_id\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\ne_1✝ :\n  (F.obj A ⨯ (exp A ⋙ F).obj B ⟶ (𝟭 D).obj (F.obj B)) =\n    ((prod.functor.obj (F.obj A)).obj ((exp A ⋙ F).obj B) ⟶ (𝟭 D).obj (F.obj B))\ne_3✝ : (F.obj A ⨯ F.obj (A ⟹ B)) = (F ⋙ prod.functor.obj (F.obj A)).obj (A ⟹ B)\ne_4✝ : F.obj (A ⨯ A ⟹ B) = (prod.functor.obj A ⋙ F).obj (A ⟹ B)\n⊢ prodComparison F A (A ⟹ B) ≫ NatTrans.app (prodComparisonNatIso F A).inv (A ⟹ B) = 𝟙 (F.obj (A ⨯ A ⟹ B))\n[PROOFSTEP]\nsimp only [Limits.prodComparisonNatIso_inv, asIso_inv, NatIso.isIso_inv_app, IsIso.hom_inv_id]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\n⊢ F.map (NatTrans.app (exp.coev A) B) ≫ NatTrans.app (expComparison F A) (A ⨯ B) =\n    NatTrans.app (exp.coev (F.obj A)) (F.obj B) ≫ (exp (F.obj A)).map (inv (prodComparison F A B))\n[PROOFSTEP]\nconvert unit_transferNatTrans _ _ (prodComparisonNatIso F A).inv B using 3\n[GOAL]\ncase h.e'_3.h.h.e'_7.h.h.e'_8.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\ne_1✝ :\n  (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj (A ⨯ B)) =\n    (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj ((prod.functor.obj A).obj B))\ne_4✝ :\n  (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj B) =\n    (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_5✝ : (F.obj A ⟹ F.obj (A ⨯ B)) = (F.obj A ⟹ (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B))\ne_6✝ : (prod.functor.obj (F.obj A)).obj (F.obj B) = (prod.functor.obj (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_7✝ : F.obj (A ⨯ B) = (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B)\n⊢ inv (prodComparison F A B) = NatTrans.app (prodComparisonNatIso F A).inv ((𝟭 C).obj B)\n[PROOFSTEP]\napply IsIso.inv_eq_of_hom_inv_id\n[GOAL]\ncase h.e'_3.h.h.e'_7.h.h.e'_8.h.hom_inv_id\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\ne_1✝ :\n  (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj (A ⨯ B)) =\n    (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj ((prod.functor.obj A).obj B))\ne_4✝ :\n  (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj B) =\n    (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_5✝ : (F.obj A ⟹ F.obj (A ⨯ B)) = (F.obj A ⟹ (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B))\ne_6✝ : (prod.functor.obj (F.obj A)).obj (F.obj B) = (prod.functor.obj (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_7✝ : F.obj (A ⨯ B) = (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B)\n⊢ prodComparison F A B ≫ NatTrans.app (prodComparisonNatIso F A).inv ((𝟭 C).obj B) = 𝟙 (F.obj (A ⨯ B))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase h.e'_3.h.h.e'_7.h.h.e'_8.h.hom_inv_id\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\ne_1✝ :\n  (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj (A ⨯ B)) =\n    (F.obj ((𝟭 C).obj B) ⟶ (F ⋙ exp (F.obj A)).obj ((prod.functor.obj A).obj B))\ne_4✝ :\n  (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj B) =\n    (prod.functor.obj (F.obj A) ⋙ exp (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_5✝ : (F.obj A ⟹ F.obj (A ⨯ B)) = (F.obj A ⟹ (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B))\ne_6✝ : (prod.functor.obj (F.obj A)).obj (F.obj B) = (prod.functor.obj (F.obj A)).obj (F.obj ((𝟭 C).obj B))\ne_7✝ : F.obj (A ⨯ B) = (prod.functor.obj A ⋙ F).obj ((𝟭 C).obj B)\n⊢ prodComparison F A B ≫ NatTrans.app (inv (NatTrans.mk fun B => prodComparison F A B)) B = 𝟙 (F.obj (A ⨯ B))\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA B : C\n⊢ CartesianClosed.uncurry (NatTrans.app (expComparison F A) B) =\n    inv (prodComparison F A (A ⟹ B)) ≫ F.map (NatTrans.app (exp.ev A) B)\n[PROOFSTEP]\nrw [uncurry_eq, expComparison_ev]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA A' : C\nf : A' ⟶ A\n⊢ expComparison F A ≫ whiskerLeft F (pre (F.map f)) = whiskerRight (pre f) F ≫ expComparison F A'\n[PROOFSTEP]\next B\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA A' : C\nf : A' ⟶ A\nB : C\n⊢ NatTrans.app (expComparison F A ≫ whiskerLeft F (pre (F.map f))) B =\n    NatTrans.app (whiskerRight (pre f) F ≫ expComparison F A') B\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✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA A' : C\nf : A' ⟶ A\nB : C\n⊢ NatTrans.app (expComparison F A) B ≫ NatTrans.app (pre (F.map f)) (F.obj B) =\n    F.map (NatTrans.app (pre f) B) ≫ NatTrans.app (expComparison F A') B\n[PROOFSTEP]\napply uncurry_injective\n[GOAL]\ncase w.h.a\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nA A' : C\nf : A' ⟶ A\nB : C\n⊢ CartesianClosed.uncurry (NatTrans.app (expComparison F A) B ≫ NatTrans.app (pre (F.map f)) (F.obj B)) =\n    CartesianClosed.uncurry (F.map (NatTrans.app (pre f) B) ≫ NatTrans.app (expComparison F A') B)\n[PROOFSTEP]\nrw [uncurry_natural_left, uncurry_natural_left, uncurry_expComparison, uncurry_pre, prod.map_swap_assoc, ← F.map_id,\n  expComparison_ev, ← F.map_id, ← prodComparison_inv_natural_assoc, ← prodComparison_inv_natural_assoc, ← F.map_comp, ←\n  F.map_comp, prod_map_pre_app_comp_ev]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\n⊢ ↑(transferNatTransSelf (Adjunction.comp h (exp.adjunction A)) (Adjunction.comp (exp.adjunction (F.obj A)) h))\n      (frobeniusMorphism F h A) =\n    expComparison F A\n[PROOFSTEP]\nrw [← Equiv.eq_symm_apply]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\n⊢ frobeniusMorphism F h A =\n    ↑(transferNatTransSelf (Adjunction.comp h (exp.adjunction A)) (Adjunction.comp (exp.adjunction (F.obj A)) h)).symm\n      (expComparison F A)\n[PROOFSTEP]\next B : 2\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ NatTrans.app (frobeniusMorphism F h A) B =\n    NatTrans.app\n      (↑(transferNatTransSelf (Adjunction.comp h (exp.adjunction A))\n              (Adjunction.comp (exp.adjunction (F.obj A)) h)).symm\n        (expComparison F A))\n      B\n[PROOFSTEP]\ndsimp [frobeniusMorphism, transferNatTransSelf, transferNatTrans, Adjunction.comp]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    𝟙 (L.obj (F.obj A ⨯ B)) ≫\n      (L.map\n            (prod.map (𝟙 (F.obj A))\n              ((NatTrans.app h.unit B ≫\n                  F.map (NatTrans.app (exp.adjunction A).unit (L.obj B)) ≫ 𝟙 (F.obj (A ⟹ A ⨯ L.obj B))) ≫\n                𝟙 (F.obj (A ⟹ A ⨯ L.obj B)) ≫\n                  NatTrans.app (expComparison F A) (A ⨯ L.obj B) ≫ 𝟙 (F.obj A ⟹ F.obj (A ⨯ L.obj B)))) ≫\n          𝟙 (L.obj (F.obj A ⨯ F.obj A ⟹ F.obj (A ⨯ L.obj B))) ≫\n            L.map (NatTrans.app (exp.adjunction (F.obj A)).counit (F.obj (A ⨯ L.obj B))) ≫\n              NatTrans.app h.counit (A ⨯ L.obj B)) ≫\n        𝟙 (A ⨯ L.obj B)\n[PROOFSTEP]\nsimp only [id_comp, comp_id]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map\n        (prod.map (𝟙 (F.obj A))\n          ((NatTrans.app h.unit B ≫ F.map (NatTrans.app (exp.adjunction A).unit (L.obj B))) ≫\n            NatTrans.app (expComparison F A) (A ⨯ L.obj B))) ≫\n      L.map (NatTrans.app (exp.adjunction (F.obj A)).counit (F.obj (A ⨯ L.obj B))) ≫ NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\nrw [← L.map_comp_assoc, prod.map_id_comp, assoc]\n  -- Porting note: need to use `erw` here.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map\n        (prod.map (𝟙 (F.obj A)) (NatTrans.app h.unit B ≫ F.map (NatTrans.app (exp.adjunction A).unit (L.obj B))) ≫\n          prod.map (𝟙 (F.obj A)) (NatTrans.app (expComparison F A) (A ⨯ L.obj B)) ≫\n            NatTrans.app (exp.adjunction (F.obj A)).counit (F.obj (A ⨯ L.obj B))) ≫\n      NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\nerw [expComparison_ev]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map\n        (prod.map (𝟙 (F.obj A)) (NatTrans.app h.unit B ≫ F.map (NatTrans.app (exp.adjunction A).unit (L.obj B))) ≫\n          inv (prodComparison F A (A ⟹ A ⨯ L.obj B)) ≫ F.map (NatTrans.app (exp.ev A) (A ⨯ L.obj B))) ≫\n      NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\nrw [prod.map_id_comp, assoc, ← F.map_id, ← prodComparison_inv_natural_assoc, ← F.map_comp]\n  -- Porting note: need to use `erw` here.\n    -- https://github.com/leanprover-community/mathlib4/issues/5164\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map\n        (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫\n          inv (prodComparison F A (L.obj B)) ≫\n            F.map\n              (prod.map (𝟙 A) (NatTrans.app (exp.adjunction A).unit (L.obj B)) ≫\n                NatTrans.app (exp.ev A) (A ⨯ L.obj B))) ≫\n      NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\nerw [exp.ev_coev]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map\n        (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫\n          inv (prodComparison F A (L.obj B)) ≫ F.map (𝟙 (A ⨯ L.obj B))) ≫\n      NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\nrw [F.map_id (A ⨯ L.obj B), comp_id]\n[GOAL]\ncase w.h\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) =\n    L.map (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫ inv (prodComparison F A (L.obj B))) ≫\n      NatTrans.app h.counit (A ⨯ L.obj B)\n[PROOFSTEP]\next\n[GOAL]\ncase w.h.h₁\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ (prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B))) ≫ prod.fst =\n    (L.map (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫ inv (prodComparison F A (L.obj B))) ≫\n        NatTrans.app h.counit (A ⨯ L.obj B)) ≫\n      prod.fst\n[PROOFSTEP]\nrw [assoc, assoc, ← h.counit_naturality, ← L.map_comp_assoc, assoc, inv_prodComparison_map_fst]\n[GOAL]\ncase w.h.h₁\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) ≫ prod.fst =\n    L.map (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫ prod.fst) ≫ NatTrans.app h.counit A\n[PROOFSTEP]\nsimp\n[GOAL]\ncase w.h.h₂\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ (prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B))) ≫ prod.snd =\n    (L.map (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫ inv (prodComparison F A (L.obj B))) ≫\n        NatTrans.app h.counit (A ⨯ L.obj B)) ≫\n      prod.snd\n[PROOFSTEP]\nrw [assoc, assoc, ← h.counit_naturality, ← L.map_comp_assoc, assoc, inv_prodComparison_map_snd]\n[GOAL]\ncase w.h.h₂\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\nB : D\n⊢ prodComparison L (F.obj A) B ≫ prod.map (NatTrans.app h.counit A) (𝟙 (L.obj B)) ≫ prod.snd =\n    L.map (prod.map (F.map (𝟙 A)) (NatTrans.app h.unit B) ≫ prod.snd) ≫ NatTrans.app h.counit (L.obj B)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\ni : IsIso (expComparison F A)\n⊢ IsIso (frobeniusMorphism F h A)\n[PROOFSTEP]\nrw [← frobeniusMorphism_mate F h] at i \n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\ni :\n  IsIso\n    (↑(transferNatTransSelf (Adjunction.comp h (exp.adjunction A)) (Adjunction.comp (exp.adjunction (F.obj A)) h))\n      (frobeniusMorphism F h A))\n⊢ IsIso (frobeniusMorphism F h A)\n[PROOFSTEP]\nexact @transferNatTransSelf_of_iso _ _ _ _ _ _ _ _ _ _ _ i\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\ni : IsIso (frobeniusMorphism F h A)\n⊢ IsIso (expComparison F A)\n[PROOFSTEP]\nrw [← frobeniusMorphism_mate F h]\n[GOAL]\nC : Type u\ninst✝⁶ : Category.{v, u} C\nD : Type u'\ninst✝⁵ : Category.{v, u'} D\ninst✝⁴ : HasFiniteProducts C\ninst✝³ : HasFiniteProducts D\nF : C ⥤ D\nL : D ⥤ C\ninst✝² : CartesianClosed C\ninst✝¹ : CartesianClosed D\ninst✝ : PreservesLimitsOfShape (Discrete WalkingPair) F\nh : L ⊣ F\nA : C\ni : IsIso (frobeniusMorphism F h A)\n⊢ IsIso\n    (↑(transferNatTransSelf (Adjunction.comp h (exp.adjunction A)) (Adjunction.comp (exp.adjunction (F.obj A)) h))\n      (frobeniusMorphism F h A))\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Closed.Functor", "llama_tokens": 10181, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5428632979641571, "lm_q2_score": 0.4649015713733885, "lm_q1q2_score": 0.25237800026447665}}
{"text": "[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\nn : ℕ\na : α\nh : Stream'.cons none (↑c) n = some a\n⊢ Stream'.cons none (↑c) (n + 1) = some a\n[PROOFSTEP]\ncases' n with n\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\na : α\nh : Stream'.cons none (↑c) Nat.zero = some a\n⊢ Stream'.cons none (↑c) (Nat.zero + 1) = some a\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\na : α\nn : ℕ\nh : Stream'.cons none (↑c) (Nat.succ n) = some a\n⊢ Stream'.cons none (↑c) (Nat.succ n + 1) = some a\n[PROOFSTEP]\nexact c.2 h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\n⊢ destruct s = Sum.inl a → s = pure a\n[PROOFSTEP]\ndsimp [destruct]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\n⊢ (match ↑s 0 with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inl a →\n    s = pure a\n[PROOFSTEP]\ninduction' f0 : s.1 0 with _\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\n⊢ (match none with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inl a →\n    s = pure a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\n⊢ (match some val✝ with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inl a →\n    s = pure a\n[PROOFSTEP]\nintro h\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\nh :\n  (match none with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\n⊢ s = pure a\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh :\n  (match some val✝ with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\n⊢ s = pure a\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase some.a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh :\n  (match some val✝ with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\n⊢ ↑s = ↑(pure a)\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase some.a.h\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh :\n  (match some val✝ with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\nn : ℕ\n⊢ ↑s n = ↑(pure a) n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase some.a.h.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh :\n  (match some val✝ with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\n⊢ ↑s Nat.zero = ↑(pure a) Nat.zero\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase some.a.h.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh' : val✝ = a\n⊢ ↑s Nat.zero = ↑(pure a) Nat.zero\n[PROOFSTEP]\nrwa [h'] at f0 \n[GOAL]\ncase some.a.h.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nval✝ : α\nf0 : ↑s 0 = some val✝\nh :\n  (match some val✝ with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inl a\nn : ℕ\nIH : ↑s n = ↑(pure a) n\n⊢ ↑s (Nat.succ n) = ↑(pure a) (Nat.succ n)\n[PROOFSTEP]\nexact s.2 IH\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\n⊢ destruct s = Sum.inr s' → s = think s'\n[PROOFSTEP]\ndsimp [destruct]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\n⊢ (match ↑s 0 with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inr s' →\n    s = think s'\n[PROOFSTEP]\ninduction' f0 : s.1 0 with a'\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\n⊢ (match none with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inr s' →\n    s = think s'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\na' : α\nf0 : ↑s 0 = some a'\n⊢ (match some a' with\n      | none => Sum.inr (tail s)\n      | some a => Sum.inl a) =\n      Sum.inr s' →\n    s = think s'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\nh :\n  (match none with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inr s'\n⊢ s = think s'\n[PROOFSTEP]\ninjection h with h'\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\nh' : tail s = s'\n⊢ s = think s'\n[PROOFSTEP]\nrw [← h']\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\nf0 : ↑s 0 = none\nh' : tail s = s'\n⊢ s = think (tail s)\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase none.mk\nα : Type u\nβ : Type v\nγ : Type w\ns' : Computation α\nx✝ : Option α\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nf0✝ : ↑{ val := f, property := al } 0 = x✝\nf0 : ↑{ val := f, property := al } 0 = none\nh' : tail { val := f, property := al } = s'\n⊢ { val := f, property := al } = think (tail { val := f, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase none.mk.a\nα : Type u\nβ : Type v\nγ : Type w\ns' : Computation α\nx✝ : Option α\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nf0✝ : ↑{ val := f, property := al } 0 = x✝\nf0 : ↑{ val := f, property := al } 0 = none\nh' : tail { val := f, property := al } = s'\n⊢ ↑{ val := f, property := al } = ↑(think (tail { val := f, property := al }))\n[PROOFSTEP]\ndsimp [think, tail]\n[GOAL]\ncase none.mk.a\nα : Type u\nβ : Type v\nγ : Type w\ns' : Computation α\nx✝ : Option α\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nf0✝ : ↑{ val := f, property := al } 0 = x✝\nf0 : ↑{ val := f, property := al } 0 = none\nh' : tail { val := f, property := al } = s'\n⊢ f = Stream'.cons none (Stream'.tail f)\n[PROOFSTEP]\nrw [← f0]\n[GOAL]\ncase none.mk.a\nα : Type u\nβ : Type v\nγ : Type w\ns' : Computation α\nx✝ : Option α\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nf0✝ : ↑{ val := f, property := al } 0 = x✝\nf0 : ↑{ val := f, property := al } 0 = none\nh' : tail { val := f, property := al } = s'\n⊢ f = Stream'.cons (↑{ val := f, property := al } 0) (Stream'.tail f)\n[PROOFSTEP]\nexact (Stream'.eta f).symm\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\ns s' : Computation α\nx✝ : Option α\nf0✝ : ↑s 0 = x✝\na' : α\nf0 : ↑s 0 = some a'\nh :\n  (match some a' with\n    | none => Sum.inr (tail s)\n    | some a => Sum.inl a) =\n    Sum.inr s'\n⊢ s = think s'\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\n⊢ tail (think s) = s\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ tail (think { val := f, property := al }) = { val := f, property := al }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase mk.a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ ↑(tail (think { val := f, property := al })) = ↑{ val := f, property := al }\n[PROOFSTEP]\ndsimp [tail, think]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\ns : Computation α\nh1 : (a : α) → C (pure a)\nh2 : (s : Computation α) → C (think s)\nv : α\nH : destruct s = Sum.inl v\n⊢ C s\n[PROOFSTEP]\nrw [destruct_eq_pure H]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\ns : Computation α\nh1 : (a : α) → C (pure a)\nh2 : (s : Computation α) → C (think s)\nv : α\nH : destruct s = Sum.inl v\n⊢ C (pure v)\n[PROOFSTEP]\napply h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\ns : Computation α\nh1 : (a : α) → C (pure a)\nh2 : (s : Computation α) → C (think s)\nv : Computation α\na : Stream' (Option α)\ns' : ∀ ⦃n : ℕ⦄ ⦃a_1 : α⦄, a n = some a_1 → a (n + 1) = some a_1\nH : destruct s = Sum.inr { val := a, property := s' }\n⊢ C s\n[PROOFSTEP]\nrw [destruct_eq_think H]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\ns : Computation α\nh1 : (a : α) → C (pure a)\nh2 : (s : Computation α) → C (think s)\nv : Computation α\na : Stream' (Option α)\ns' : ∀ ⦃n : ℕ⦄ ⦃a_1 : α⦄, a n = some a_1 → a (n + 1) = some a_1\nH : destruct s = Sum.inr { val := a, property := s' }\n⊢ C (think { val := a, property := s' })\n[PROOFSTEP]\napply h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ Computation α\n[PROOFSTEP]\nrefine' ⟨Stream'.corec' (Corec.f f) (Sum.inr b), fun n a' h => _⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\nh : Stream'.corec' (Corec.f f) (Sum.inr b) n = some a'\n⊢ Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a'\n[PROOFSTEP]\nrw [Stream'.corec'_eq]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\nh : Stream'.corec' (Corec.f f) (Sum.inr b) n = some a'\n⊢ Stream'.cons (Corec.f f (Sum.inr b)).fst (Stream'.corec' (Corec.f f) (Corec.f f (Sum.inr b)).snd) (n + 1) = some a'\n[PROOFSTEP]\nchange Stream'.corec' (Corec.f f) (Corec.f f (Sum.inr b)).2 n = some a'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\nh : Stream'.corec' (Corec.f f) (Sum.inr b) n = some a'\n⊢ Stream'.corec' (Corec.f f) (Corec.f f (Sum.inr b)).snd n = some a'\n[PROOFSTEP]\nrevert h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\n⊢ Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n    Stream'.corec' (Corec.f f) (Corec.f f (Sum.inr b)).snd n = some a'\n[PROOFSTEP]\ngeneralize Sum.inr b = o\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\no : α ⊕ β\n⊢ Stream'.corec' (Corec.f f) o n = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd n = some a'\n[PROOFSTEP]\nrevert o\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nn : ℕ\na' : α\n⊢ ∀ (o : α ⊕ β), Stream'.corec' (Corec.f f) o n = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd n = some a'\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\n⊢ ∀ (o : α ⊕ β),\n    Stream'.corec' (Corec.f f) o Nat.zero = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd Nat.zero = some a'\n[PROOFSTEP]\nintro o\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\nn : ℕ\nIH : ∀ (o : α ⊕ β), Stream'.corec' (Corec.f f) o n = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd n = some a'\n⊢ ∀ (o : α ⊕ β),\n    Stream'.corec' (Corec.f f) o (Nat.succ n) = some a' →\n      Stream'.corec' (Corec.f f) (Corec.f f o).snd (Nat.succ n) = some a'\n[PROOFSTEP]\nintro o\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\no : α ⊕ β\n⊢ Stream'.corec' (Corec.f f) o Nat.zero = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd Nat.zero = some a'\n[PROOFSTEP]\nchange (Corec.f f o).1 = some a' → (Corec.f f (Corec.f f o).2).1 = some a'\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\no : α ⊕ β\n⊢ (Corec.f f o).fst = some a' → (Corec.f f (Corec.f f o).snd).fst = some a'\n[PROOFSTEP]\ncases' o with _ b\n[GOAL]\ncase zero.inl\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' val✝ : α\n⊢ (Corec.f f (Sum.inl val✝)).fst = some a' → (Corec.f f (Corec.f f (Sum.inl val✝)).snd).fst = some a'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.inr\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb✝ : β\na' : α\nb : β\n⊢ (Corec.f f (Sum.inr b)).fst = some a' → (Corec.f f (Corec.f f (Sum.inr b)).snd).fst = some a'\n[PROOFSTEP]\nintro h\n[GOAL]\ncase zero.inl\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' val✝ : α\nh : (Corec.f f (Sum.inl val✝)).fst = some a'\n⊢ (Corec.f f (Corec.f f (Sum.inl val✝)).snd).fst = some a'\n[PROOFSTEP]\nexact h\n[GOAL]\ncase zero.inr\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb✝ : β\na' : α\nb : β\nh : (Corec.f f (Sum.inr b)).fst = some a'\n⊢ (Corec.f f (Corec.f f (Sum.inr b)).snd).fst = some a'\n[PROOFSTEP]\nunfold Corec.f at *\n[GOAL]\ncase zero.inr\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb✝ : β\na' : α\nb : β\nh :\n  (match Sum.inr b with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).fst =\n    some a'\n⊢ (match\n        (match Sum.inr b with\n          | Sum.inl a => (some a, Sum.inl a)\n          | Sum.inr b =>\n            (match f b with\n              | Sum.inl a => some a\n              | Sum.inr val => none,\n              f b)).snd with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).fst =\n    some a'\n[PROOFSTEP]\nsplit\n[GOAL]\ncase zero.inr.h_1\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb✝ : β\na' : α\nb : β\nh :\n  (match Sum.inr b with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).fst =\n    some a'\nx✝ : α ⊕ β\na✝ : α\nheq✝ :\n  (match Sum.inr b with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).snd =\n    Sum.inl a✝\n⊢ (some a✝, Sum.inl a✝).fst = some a'\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase zero.inr.h_2\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb✝ : β\na' : α\nb : β\nh :\n  (match Sum.inr b with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).fst =\n    some a'\nx✝ : α ⊕ β\nval✝ : β\nheq✝ :\n  (match Sum.inr b with\n      | Sum.inl a => (some a, Sum.inl a)\n      | Sum.inr b =>\n        (match f b with\n          | Sum.inl a => some a\n          | Sum.inr val => none,\n          f b)).snd =\n    Sum.inr val✝\n⊢ (match f val✝ with\n        | Sum.inl a => some a\n        | Sum.inr val => none,\n        f val✝).fst =\n    some a'\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\nn : ℕ\nIH : ∀ (o : α ⊕ β), Stream'.corec' (Corec.f f) o n = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd n = some a'\no : α ⊕ β\n⊢ Stream'.corec' (Corec.f f) o (Nat.succ n) = some a' →\n    Stream'.corec' (Corec.f f) (Corec.f f o).snd (Nat.succ n) = some a'\n[PROOFSTEP]\nrw [Stream'.corec'_eq (Corec.f f) (Corec.f f o).2, Stream'.corec'_eq (Corec.f f) o]\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\na' : α\nn : ℕ\nIH : ∀ (o : α ⊕ β), Stream'.corec' (Corec.f f) o n = some a' → Stream'.corec' (Corec.f f) (Corec.f f o).snd n = some a'\no : α ⊕ β\n⊢ Stream'.cons (Corec.f f o).fst (Stream'.corec' (Corec.f f) (Corec.f f o).snd) (Nat.succ n) = some a' →\n    Stream'.cons (Corec.f f (Corec.f f o).snd).fst (Stream'.corec' (Corec.f f) (Corec.f f (Corec.f f o).snd).snd)\n        (Nat.succ n) =\n      some a'\n[PROOFSTEP]\nexact IH (Corec.f f o).2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ destruct (corec f b) = rmap (corec f) (f b)\n[PROOFSTEP]\ndsimp [corec, destruct]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ (match Stream'.corec' (Corec.f f) (Sum.inr b) 0 with\n    | none =>\n      Sum.inr\n        (tail\n          { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n            property :=\n              (_ :\n                ∀ (n : ℕ) (a' : α),\n                  Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                    Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') })\n    | some a => Sum.inl a) =\n    match f b with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }\n[PROOFSTEP]\nrw [show Stream'.corec' (Corec.f f) (Sum.inr b) 0 = Sum.rec Option.some (λ _ => none) (f b)\n    by\n    dsimp [Corec.f, Stream'.corec', Stream'.corec, Stream'.map, Stream'.nth, Stream'.iterate]\n    match (f b) with\n    | Sum.inl x => rfl\n    | Sum.inr x => rfl]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ Stream'.corec' (Corec.f f) (Sum.inr b) 0 = Sum.rec some (fun x => none) (f b)\n[PROOFSTEP]\ndsimp [Corec.f, Stream'.corec', Stream'.corec, Stream'.map, Stream'.nth, Stream'.iterate]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ (match f b with\n    | Sum.inl a => some a\n    | Sum.inr val => none) =\n    Sum.rec some (fun x => none) (f b)\n[PROOFSTEP]\nmatch (f b) with\n| Sum.inl x => rfl\n| Sum.inr x => rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx : α\n⊢ (match Sum.inl x with\n    | Sum.inl a => some a\n    | Sum.inr val => none) =\n    Sum.rec some (fun x => none) (Sum.inl x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb x : β\n⊢ (match Sum.inr x with\n    | Sum.inl a => some a\n    | Sum.inr val => none) =\n    Sum.rec some (fun x => none) (Sum.inr x)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\n⊢ (match Sum.rec some (fun x => none) (f b) with\n    | none =>\n      Sum.inr\n        (tail\n          { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n            property :=\n              (_ :\n                ∀ (n : ℕ) (a' : α),\n                  Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                    Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') })\n    | some a => Sum.inl a) =\n    match f b with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }\n[PROOFSTEP]\ninduction' h : f b with a b'\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\na : α\nh : f b = Sum.inl a\n⊢ (match Sum.rec some (fun x => none) (Sum.inl a) with\n    | none =>\n      Sum.inr\n        (tail\n          { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n            property :=\n              (_ :\n                ∀ (n : ℕ) (a' : α),\n                  Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                    Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') })\n    | some a => Sum.inl a) =\n    match Sum.inl a with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }\n[PROOFSTEP]\nrfl\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ (match Sum.rec some (fun x => none) (Sum.inr b') with\n    | none =>\n      Sum.inr\n        (tail\n          { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n            property :=\n              (_ :\n                ∀ (n : ℕ) (a' : α),\n                  Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                    Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') })\n    | some a => Sum.inl a) =\n    match Sum.inr b' with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        { val := Stream'.corec' (Corec.f f) (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }\n[PROOFSTEP]\ndsimp [Corec.f, destruct]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ Sum.inr\n      (tail\n        {\n          val :=\n            Stream'.corec'\n              (fun x =>\n                match x with\n                | Sum.inl a => (some a, Sum.inl a)\n                | Sum.inr b =>\n                  (match f b with\n                    | Sum.inl a => some a\n                    | Sum.inr val => none,\n                    f b))\n              (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }) =\n    Sum.inr\n      {\n        val :=\n          Stream'.corec'\n            (fun x =>\n              match x with\n              | Sum.inl a => (some a, Sum.inl a)\n              | Sum.inr b =>\n                (match f b with\n                  | Sum.inl a => some a\n                  | Sum.inr val => none,\n                  f b))\n            (Sum.inr b'),\n        property :=\n          (_ :\n            ∀ (n : ℕ) (a' : α),\n              Stream'.corec' (Corec.f f) (Sum.inr b') n = some a' →\n                Stream'.corec' (Corec.f f) (Sum.inr b') (n + 1) = some a') }\n[PROOFSTEP]\napply congr_arg\n[GOAL]\ncase inr.h\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ tail\n      {\n        val :=\n          Stream'.corec'\n            (fun x =>\n              match x with\n              | Sum.inl a => (some a, Sum.inl a)\n              | Sum.inr b =>\n                (match f b with\n                  | Sum.inl a => some a\n                  | Sum.inr val => none,\n                  f b))\n            (Sum.inr b),\n        property :=\n          (_ :\n            ∀ (n : ℕ) (a' : α),\n              Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') } =\n    {\n      val :=\n        Stream'.corec'\n          (fun x =>\n            match x with\n            | Sum.inl a => (some a, Sum.inl a)\n            | Sum.inr b =>\n              (match f b with\n                | Sum.inl a => some a\n                | Sum.inr val => none,\n                f b))\n          (Sum.inr b'),\n      property :=\n        (_ :\n          ∀ (n : ℕ) (a' : α),\n            Stream'.corec' (Corec.f f) (Sum.inr b') n = some a' →\n              Stream'.corec' (Corec.f f) (Sum.inr b') (n + 1) = some a') }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase inr.h.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ ↑(tail\n        {\n          val :=\n            Stream'.corec'\n              (fun x =>\n                match x with\n                | Sum.inl a => (some a, Sum.inl a)\n                | Sum.inr b =>\n                  (match f b with\n                    | Sum.inl a => some a\n                    | Sum.inr val => none,\n                    f b))\n              (Sum.inr b),\n          property :=\n            (_ :\n              ∀ (n : ℕ) (a' : α),\n                Stream'.corec' (Corec.f f) (Sum.inr b) n = some a' →\n                  Stream'.corec' (Corec.f f) (Sum.inr b) (n + 1) = some a') }) =\n    ↑{\n        val :=\n          Stream'.corec'\n            (fun x =>\n              match x with\n              | Sum.inl a => (some a, Sum.inl a)\n              | Sum.inr b =>\n                (match f b with\n                  | Sum.inl a => some a\n                  | Sum.inr val => none,\n                  f b))\n            (Sum.inr b'),\n        property :=\n          (_ :\n            ∀ (n : ℕ) (a' : α),\n              Stream'.corec' (Corec.f f) (Sum.inr b') n = some a' →\n                Stream'.corec' (Corec.f f) (Sum.inr b') (n + 1) = some a') }\n[PROOFSTEP]\ndsimp [corec, tail]\n[GOAL]\ncase inr.h.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ Stream'.tail\n      (Stream'.corec'\n        (fun x =>\n          match x with\n          | Sum.inl a => (some a, Sum.inl a)\n          | Sum.inr b =>\n            (match f b with\n              | Sum.inl a => some a\n              | Sum.inr val => none,\n              f b))\n        (Sum.inr b)) =\n    Stream'.corec'\n      (fun x =>\n        match x with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b))\n      (Sum.inr b')\n[PROOFSTEP]\nrw [Stream'.corec'_eq, Stream'.tail_cons]\n[GOAL]\ncase inr.h.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ Stream'.corec'\n      (fun x =>\n        match x with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b))\n      (match Sum.inr b with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b)).snd =\n    Stream'.corec'\n      (fun x =>\n        match x with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b))\n      (Sum.inr b')\n[PROOFSTEP]\ndsimp [Corec.f]\n[GOAL]\ncase inr.h.a\nα : Type u\nβ : Type v\nγ : Type w\nf : β → α ⊕ β\nb : β\nx✝ : α ⊕ β\nh✝ : f b = x✝\nb' : β\nh : f b = Sum.inr b'\n⊢ Stream'.corec'\n      (fun x =>\n        match x with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b))\n      (f b) =\n    Stream'.corec'\n      (fun x =>\n        match x with\n        | Sum.inl a => (some a, Sum.inl a)\n        | Sum.inr b =>\n          (match f b with\n            | Sum.inl a => some a\n            | Sum.inr val => none,\n            f b))\n      (Sum.inr b')\n[PROOFSTEP]\nrw [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ s₁ = s₂\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ↑s₁ = ↑s₂\n[PROOFSTEP]\napply Stream'.eq_of_bisim fun x y => ∃ s s' : Computation α, s.1 = x ∧ s'.1 = y ∧ R s s'\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ Stream'.IsBisimulation fun x y => ∃ s s', ↑s = x ∧ ↑s' = y ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\ndsimp [Stream'.IsBisimulation]\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ∀ ⦃s₁ s₂ : Stream' (Option α)⦄,\n    (∃ s s', ↑s = s₁ ∧ ↑s' = s₂ ∧ R s s') →\n      Stream'.head s₁ = Stream'.head s₂ ∧ ∃ s s', ↑s = Stream'.tail s₁ ∧ ↑s' = Stream'.tail s₂ ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nintro t₁ t₂ e\n[GOAL]\ncase a.bisim\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\n⊢ Stream'.head t₁ = Stream'.head t₂ ∧ ∃ s s', ↑s = Stream'.tail t₁ ∧ ↑s' = Stream'.tail t₂ ∧ R s s'\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nexact\n  match t₁, t₂, e with\n  | _, _, ⟨s, s', rfl, rfl, r⟩ =>\n    by\n    suffices head s = head s' ∧ R (tail s) (tail s') from\n      And.imp id (fun r => ⟨tail s, tail s', by cases s; rfl, by cases s'; rfl, r⟩) this\n    have h := bisim r; revert r h\n    apply recOn s _ _ <;> intro r' <;> apply recOn s' _ _ <;> intro a' r h\n    · constructor <;> dsimp at h \n      · rw [h]\n      · rw [h] at r \n        rw [tail_pure, tail_pure, h]\n        assumption\n    · rw [destruct_pure, destruct_think] at h \n      exact False.elim h\n    · rw [destruct_pure, destruct_think] at h \n      exact False.elim h\n    · simp at h \n      simp [*]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr : R s s'\n⊢ Stream'.head ↑s = Stream'.head ↑s' ∧ ∃ s_1 s'_1, ↑s_1 = Stream'.tail ↑s ∧ ↑s'_1 = Stream'.tail ↑s' ∧ R s_1 s'_1\n[PROOFSTEP]\nsuffices head s = head s' ∧ R (tail s) (tail s') from\n  And.imp id (fun r => ⟨tail s, tail s', by cases s; rfl, by cases s'; rfl, r⟩) this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr✝ : R s s'\nthis : head s = head s' ∧ R (tail s) (tail s')\nr : R (tail s) (tail s')\n⊢ ↑(tail s) = Stream'.tail ↑s\n[PROOFSTEP]\ncases s\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns' : Computation α\nval✝ : Stream' (Option α)\nproperty✝ : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, val✝ n = some a → val✝ (n + 1) = some a\nr✝ : R { val := val✝, property := property✝ } s'\nthis : head { val := val✝, property := property✝ } = head s' ∧ R (tail { val := val✝, property := property✝ }) (tail s')\nr : R (tail { val := val✝, property := property✝ }) (tail s')\n⊢ ↑(tail { val := val✝, property := property✝ }) = Stream'.tail ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr✝ : R s s'\nthis : head s = head s' ∧ R (tail s) (tail s')\nr : R (tail s) (tail s')\n⊢ ↑(tail s') = Stream'.tail ↑s'\n[PROOFSTEP]\ncases s'\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝¹ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns : Computation α\nval✝ : Stream' (Option α)\nproperty✝ : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, val✝ n = some a → val✝ (n + 1) = some a\nr✝ : R s { val := val✝, property := property✝ }\nthis : head s = head { val := val✝, property := property✝ } ∧ R (tail s) (tail { val := val✝, property := property✝ })\nr : R (tail s) (tail { val := val✝, property := property✝ })\n⊢ ↑(tail { val := val✝, property := property✝ }) = Stream'.tail ↑{ val := val✝, property := property✝ }\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr : R s s'\n⊢ head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\nhave h := bisim r\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr : R s s'\nh : BisimO R (destruct s) (destruct s')\n⊢ head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\nrevert r h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\n⊢ R s s' → BisimO R (destruct s) (destruct s') → head s = head s' ∧ R (tail s) (tail s')\n[PROOFSTEP]\napply recOn s _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\n⊢ ∀ (a : α),\n    R (pure a) s' → BisimO R (destruct (pure a)) (destruct s') → head (pure a) = head s' ∧ R (tail (pure a)) (tail s')\n[PROOFSTEP]\nintro r'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\n⊢ ∀ (s : Computation α),\n    R (think s) s' →\n      BisimO R (destruct (think s)) (destruct s') → head (think s) = head s' ∧ R (tail (think s)) (tail s')\n[PROOFSTEP]\nintro r'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' : α\n⊢ R (pure r') s' → BisimO R (destruct (pure r')) (destruct s') → head (pure r') = head s' ∧ R (tail (pure r')) (tail s')\n[PROOFSTEP]\napply recOn s' _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' : Computation α\n⊢ R (think r') s' →\n    BisimO R (destruct (think r')) (destruct s') → head (think r') = head s' ∧ R (tail (think r')) (tail s')\n[PROOFSTEP]\napply recOn s' _ _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' : α\n⊢ ∀ (a : α),\n    R (pure r') (pure a) →\n      BisimO R (destruct (pure r')) (destruct (pure a)) →\n        head (pure r') = head (pure a) ∧ R (tail (pure r')) (tail (pure a))\n[PROOFSTEP]\nintro a' r h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' : α\n⊢ ∀ (s : Computation α),\n    R (pure r') (think s) →\n      BisimO R (destruct (pure r')) (destruct (think s)) →\n        head (pure r') = head (think s) ∧ R (tail (pure r')) (tail (think s))\n[PROOFSTEP]\nintro a' r h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' : Computation α\n⊢ ∀ (a : α),\n    R (think r') (pure a) →\n      BisimO R (destruct (think r')) (destruct (pure a)) →\n        head (think r') = head (pure a) ∧ R (tail (think r')) (tail (pure a))\n[PROOFSTEP]\nintro a' r h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' : Computation α\n⊢ ∀ (s : Computation α),\n    R (think r') (think s) →\n      BisimO R (destruct (think r')) (destruct (think s)) →\n        head (think r') = head (think s) ∧ R (tail (think r')) (tail (think s))\n[PROOFSTEP]\nintro a' r h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure r') (pure a')\nh : BisimO R (destruct (pure r')) (destruct (pure a'))\n⊢ head (pure r') = head (pure a') ∧ R (tail (pure r')) (tail (pure a'))\n[PROOFSTEP]\nconstructor\n[GOAL]\ncase left\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure r') (pure a')\nh : BisimO R (destruct (pure r')) (destruct (pure a'))\n⊢ head (pure r') = head (pure a')\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase right\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure r') (pure a')\nh : BisimO R (destruct (pure r')) (destruct (pure a'))\n⊢ R (tail (pure r')) (tail (pure a'))\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase left\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure r') (pure a')\nh : r' = a'\n⊢ head (pure r') = head (pure a')\n[PROOFSTEP]\nrw [h]\n[GOAL]\ncase right\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure r') (pure a')\nh : r' = a'\n⊢ R (tail (pure r')) (tail (pure a'))\n[PROOFSTEP]\nrw [h] at r \n[GOAL]\ncase right\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure a') (pure a')\nh : r' = a'\n⊢ R (tail (pure r')) (tail (pure a'))\n[PROOFSTEP]\nrw [tail_pure, tail_pure, h]\n[GOAL]\ncase right\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' a' : α\nr : R (pure a') (pure a')\nh : r' = a'\n⊢ R (pure a') (pure a')\n[PROOFSTEP]\nassumption\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' : α\na' : Computation α\nr : R (pure r') (think a')\nh : BisimO R (destruct (pure r')) (destruct (think a'))\n⊢ head (pure r') = head (think a') ∧ R (tail (pure r')) (tail (think a'))\n[PROOFSTEP]\nrw [destruct_pure, destruct_think] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' : Computation α\nr' : α\na' : Computation α\nr : R (pure r') (think a')\nh : BisimO R (Sum.inl r') (Sum.inr a')\n⊢ head (pure r') = head (think a') ∧ R (tail (pure r')) (tail (think a'))\n[PROOFSTEP]\nexact False.elim h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' : Computation α\na' : α\nr : R (think r') (pure a')\nh : BisimO R (destruct (think r')) (destruct (pure a'))\n⊢ head (think r') = head (pure a') ∧ R (tail (think r')) (tail (pure a'))\n[PROOFSTEP]\nrw [destruct_pure, destruct_think] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' : Computation α\na' : α\nr : R (think r') (pure a')\nh : BisimO R (Sum.inr r') (Sum.inl a')\n⊢ head (think r') = head (pure a') ∧ R (tail (think r')) (tail (pure a'))\n[PROOFSTEP]\nexact False.elim h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' a' : Computation α\nr : R (think r') (think a')\nh : BisimO R (destruct (think r')) (destruct (think a'))\n⊢ head (think r') = head (think a') ∧ R (tail (think r')) (tail (think a'))\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr✝ : R s₁ s₂\nt₁ t₂ : Stream' (Option α)\ne : ∃ s s', ↑s = t₁ ∧ ↑s' = t₂ ∧ R s s'\ns s' r' a' : Computation α\nr : R (think r') (think a')\nh : R r' a'\n⊢ head (think r') = head (think a') ∧ R (tail (think r')) (tail (think a'))\n[PROOFSTEP]\nsimp [*]\n[GOAL]\ncase a.a\nα : Type u\nβ : Type v\nγ : Type w\nR : Computation α → Computation α → Prop\nbisim : IsBisimulation R\ns₁ s₂ : Computation α\nr : R s₁ s₂\n⊢ ∃ s s', ↑s = ↑s₁ ∧ ↑s' = ↑s₂ ∧ R s s'\n[PROOFSTEP]\nexact ⟨s₁, s₂, rfl, rfl, r⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nm n : ℕ\nh : m ≤ n\n⊢ ↑s m = some a → ↑s n = some a\n[PROOFSTEP]\ncases' s with f al\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\na : α\nm n : ℕ\nh : m ≤ n\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } n = some a\n[PROOFSTEP]\ninduction' h with n _ IH\n[GOAL]\ncase mk.refl\nα : Type u\nβ : Type v\nγ : Type w\na : α\nm n : ℕ\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } m = some a\ncase mk.step\nα : Type u\nβ : Type v\nγ : Type w\na : α\nm n✝ : ℕ\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nn : ℕ\na✝ : Nat.le m n\nIH : ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } n = some a\n⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } (Nat.succ n) = some a\n[PROOFSTEP]\nexacts [id, fun h2 => al (IH h2)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na b : α\nm : ℕ\nha : (fun b => some a = b) (Stream'.nth (↑s) m)\nn : ℕ\nhb : (fun b_1 => some b = b_1) (Stream'.nth (↑s) n)\n⊢ a = b\n[PROOFSTEP]\ninjection (le_stable s (le_max_left m n) ha.symm).symm.trans (le_stable s (le_max_right m n) hb.symm)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nx✝ : Terminates s\na : α\nn : ℕ\nh : (fun b => some a = b) (Stream'.nth (↑s) n)\n⊢ Option.isSome (↑s n) = true\n[PROOFSTEP]\ndsimp [Stream'.nth] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nx✝ : Terminates s\na : α\nn : ℕ\nh : some a = ↑s n\n⊢ Option.isSome (↑s n) = true\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nx✝ : Terminates s\na : α\nn : ℕ\nh : some a = ↑s n\n⊢ Option.isSome (some a) = true\n[PROOFSTEP]\nexact rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : (fun b => some a = b) (Stream'.nth (↑(think s)) n)\n⊢ a ∈ s\n[PROOFSTEP]\ncases' n with n'\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nh : some a = Stream'.nth (↑(think s)) Nat.zero\n⊢ a ∈ s\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn' : ℕ\nh : some a = Stream'.nth (↑(think s)) (Nat.succ n')\n⊢ a ∈ s\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn' : ℕ\nh : some a = Stream'.nth (↑(think s)) (Nat.succ n')\n⊢ a ∈ s\n[PROOFSTEP]\nexact ⟨n', h⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nx✝ : a ∈ empty α\nn : ℕ\nh : (fun b => some a = b) (Stream'.nth (↑(empty α)) n)\n⊢ False\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\n⊢ s = empty α\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\n⊢ ↑s = ↑(empty α)\n[PROOFSTEP]\nfunext n\n[GOAL]\ncase a.h\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\nn : ℕ\n⊢ ↑s n = ↑(empty α) n\n[PROOFSTEP]\ninduction' h : s.val n with _\n[GOAL]\ncase a.h.none\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\nn : ℕ\nx✝ : Option α\nh✝ : ↑s n = x✝\nh : ↑s n = none\n⊢ none = ↑(empty α) n\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.some\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\nn : ℕ\nx✝ : Option α\nh✝ : ↑s n = x✝\nval✝ : α\nh : ↑s n = some val✝\n⊢ some val✝ = ↑(empty α) n\n[PROOFSTEP]\nrefine' absurd _ H\n[GOAL]\ncase a.h.some\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nH : ¬Terminates s\nn : ℕ\nx✝ : Option α\nh✝ : ↑s n = x✝\nval✝ : α\nh : ↑s n = some val✝\n⊢ Terminates s\n[PROOFSTEP]\nexact ⟨⟨_, _, h.symm⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\na : α\n⊢ get s = a → a ∈ s\n[PROOFSTEP]\nintro h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh✝ : Terminates s\na : α\nh : get s = a\n⊢ a ∈ s\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh✝ : Terminates s\na : α\nh : get s = a\n⊢ get s ∈ s\n[PROOFSTEP]\napply get_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\na : α\np : s ~> a\n⊢ a ∈ s\n[PROOFSTEP]\ncases' h with h\n[GOAL]\ncase mk\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\np : s ~> a\nh : ∃ a, a ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\ncases' h with a' h\n[GOAL]\ncase mk.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\np : s ~> a\na' : α\nh : a' ∈ s\n⊢ a ∈ s\n[PROOFSTEP]\nrw [p h]\n[GOAL]\ncase mk.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\np : s ~> a\na' : α\nh : a' ∈ s\n⊢ a' ∈ s\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nT : Terminates s\na : α\nh : a ∈ s\n⊢ Results s a (length s)\n[PROOFSTEP]\nrw [← get_eq_of_mem _ h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nT : Terminates s\na : α\nh : a ∈ s\n⊢ Results s (get s) (length s)\n[PROOFSTEP]\napply results_of_terminates\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na b : α\nm n : ℕ\nh1 : Results s a m\nh2 : Results s b n\n⊢ m = n\n[PROOFSTEP]\nhaveI := h1.terminates\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na b : α\nm n : ℕ\nh1 : Results s a m\nh2 : Results s b n\nthis : Terminates s\n⊢ m = n\n[PROOFSTEP]\nhaveI := h2.terminates\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na b : α\nm n : ℕ\nh1 : Results s a m\nh2 : Results s b n\nthis✝ this : Terminates s\n⊢ m = n\n[PROOFSTEP]\nrw [← h1.length, h2.length]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\n⊢ length (think s) = length s + 1\n[PROOFSTEP]\napply le_antisymm\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\n⊢ length (think s) ≤ length s + 1\n[PROOFSTEP]\nexact Nat.find_min' _ (Nat.find_spec ((terminates_def _).1 h))\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\n⊢ length s + 1 ≤ length (think s)\n[PROOFSTEP]\nhave : (Option.isSome ((think s).val (length (think s))) : Prop) :=\n  Nat.find_spec ((terminates_def _).1 s.think_terminates)\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nthis : Option.isSome (↑(think s) (length (think s))) = true\n⊢ length s + 1 ≤ length (think s)\n[PROOFSTEP]\nrevert this\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\n⊢ Option.isSome (↑(think s) (length (think s))) = true → length s + 1 ≤ length (think s)\n[PROOFSTEP]\ncases' length (think s) with n\n[GOAL]\ncase a.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\n⊢ Option.isSome (↑(think s) Nat.zero) = true → length s + 1 ≤ Nat.zero\n[PROOFSTEP]\nintro this\n[GOAL]\ncase a.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nn : ℕ\n⊢ Option.isSome (↑(think s) (Nat.succ n)) = true → length s + 1 ≤ Nat.succ n\n[PROOFSTEP]\nintro this\n[GOAL]\ncase a.zero\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nthis : Option.isSome (↑(think s) Nat.zero) = true\n⊢ length s + 1 ≤ Nat.zero\n[PROOFSTEP]\nsimp [think, Stream'.cons] at this \n[GOAL]\ncase a.succ\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nn : ℕ\nthis : Option.isSome (↑(think s) (Nat.succ n)) = true\n⊢ length s + 1 ≤ Nat.succ n\n[PROOFSTEP]\napply Nat.succ_le_succ\n[GOAL]\ncase a.succ.a\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nn : ℕ\nthis : Option.isSome (↑(think s) (Nat.succ n)) = true\n⊢ length s ≤ n\n[PROOFSTEP]\napply Nat.find_min'\n[GOAL]\ncase a.succ.a.h\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nh : Terminates s\nn : ℕ\nthis : Option.isSome (↑(think s) (Nat.succ n)) = true\n⊢ Option.isSome (↑s n) = true\n[PROOFSTEP]\napply this\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results s a n\nthis : Terminates s\n⊢ length (think s) = n + 1\n[PROOFSTEP]\nrw [length_think, h.length]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a n\n⊢ ∃ m, Results s a m ∧ n = m + 1\n[PROOFSTEP]\nhaveI := of_think_terminates h.terminates\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a n\nthis : Terminates s\n⊢ ∃ m, Results s a m ∧ n = m + 1\n[PROOFSTEP]\nhave := results_of_terminates' _ (of_think_mem h.mem)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a n\nthis✝ : Terminates s\nthis : Results s a (length s)\n⊢ ∃ m, Results s a m ∧ n = m + 1\n[PROOFSTEP]\nexact ⟨_, this, Results.len_unique h (results_think this)⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a (n + 1)\n⊢ Results s a n\n[PROOFSTEP]\nlet ⟨n', r, e⟩ := of_results_think h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a (n + 1)\nn' : ℕ\nr : Results s a n'\ne : n + 1 = n' + 1\n⊢ Results s a n\n[PROOFSTEP]\ninjection e with h'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a (n + 1)\nn' : ℕ\nr : Results s a n'\nh' : Nat.add n 0 = Nat.add n' 0\n⊢ Results s a n\n[PROOFSTEP]\nrw [Nat.add, Nat.add] at h' \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results (think s) a (n + 1)\nn' : ℕ\nr : Results s a n'\nh' : n = n'\n⊢ Results s a n\n[PROOFSTEP]\nrwa [h']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\n⊢ Results (thinkN (pure a) n) a n\n[PROOFSTEP]\nhave := results_thinkN n (results_pure a)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\nthis : Results (thinkN (pure a) n) a (0 + n)\n⊢ Results (thinkN (pure a) n) a n\n[PROOFSTEP]\nrwa [Nat.zero_add] at this \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\na : α\nn : ℕ\nh : Results s a n\n⊢ s = thinkN (pure a) n\n[PROOFSTEP]\nrevert s\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\n⊢ ∀ {s : Computation α}, Results s a n → s = thinkN (pure a) n\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\na : α\n⊢ ∀ {s : Computation α}, Results s a Nat.zero → s = thinkN (pure a) Nat.zero\n[PROOFSTEP]\nintro s\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a n → s = thinkN (pure a) n\n⊢ ∀ {s : Computation α}, Results s a (Nat.succ n) → s = thinkN (pure a) (Nat.succ n)\n[PROOFSTEP]\nintro s\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Computation α\n⊢ Results s a Nat.zero → s = thinkN (pure a) Nat.zero\n[PROOFSTEP]\napply recOn s (fun a' => _) fun s => _\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a n → s = thinkN (pure a) n\ns : Computation α\n⊢ Results s a (Nat.succ n) → s = thinkN (pure a) (Nat.succ n)\n[PROOFSTEP]\napply recOn s (fun a' => _) fun s => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Computation α\n⊢ ∀ (a' : α), Results (pure a') a Nat.zero → pure a' = thinkN (pure a) Nat.zero\n[PROOFSTEP]\nintro a h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\ns : Computation α\n⊢ ∀ (s : Computation α), Results (think s) a Nat.zero → think s = thinkN (pure a) Nat.zero\n[PROOFSTEP]\nintro a h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a n → s = thinkN (pure a) n\ns : Computation α\n⊢ ∀ (a' : α), Results (pure a') a (Nat.succ n) → pure a' = thinkN (pure a) (Nat.succ n)\n[PROOFSTEP]\nintro a h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a n → s = thinkN (pure a) n\ns : Computation α\n⊢ ∀ (s : Computation α), Results (think s) a (Nat.succ n) → think s = thinkN (pure a) (Nat.succ n)\n[PROOFSTEP]\nintro a h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns : Computation α\na : α\nh : Results (pure a) a✝ Nat.zero\n⊢ pure a = thinkN (pure a✝) Nat.zero\n[PROOFSTEP]\nrw [← eq_of_pure_mem h.mem]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns : Computation α\na : α\nh : Results (pure a) a✝ Nat.zero\n⊢ pure a✝ = thinkN (pure a✝) Nat.zero\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns a : Computation α\nh : Results (think a) a✝ Nat.zero\n⊢ think a = thinkN (pure a✝) Nat.zero\n[PROOFSTEP]\ncases' of_results_think h with n h\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns a : Computation α\nh✝ : Results (think a) a✝ Nat.zero\nn : ℕ\nh : Results a a✝ n ∧ Nat.zero = n + 1\n⊢ think a = thinkN (pure a✝) Nat.zero\n[PROOFSTEP]\ncases h\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\ns a : Computation α\nh : Results (think a) a✝ Nat.zero\nn : ℕ\nleft✝ : Results a a✝ n\nright✝ : Nat.zero = n + 1\n⊢ think a = thinkN (pure a✝) Nat.zero\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a✝ n → s = thinkN (pure a✝) n\ns : Computation α\na : α\nh : Results (pure a) a✝ (Nat.succ n)\n⊢ pure a = thinkN (pure a✝) (Nat.succ n)\n[PROOFSTEP]\nhave := h.len_unique (results_pure _)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a✝ n → s = thinkN (pure a✝) n\ns : Computation α\na : α\nh : Results (pure a) a✝ (Nat.succ n)\nthis : Nat.succ n = 0\n⊢ pure a = thinkN (pure a✝) (Nat.succ n)\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a✝ n → s = thinkN (pure a✝) n\ns a : Computation α\nh : Results (think a) a✝ (Nat.succ n)\n⊢ think a = thinkN (pure a✝) (Nat.succ n)\n[PROOFSTEP]\nrw [IH (results_think_iff.1 h)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na✝ : α\nn : ℕ\nIH : ∀ {s : Computation α}, Results s a✝ n → s = thinkN (pure a✝) n\ns a : Computation α\nh : Results (think a) a✝ (Nat.succ n)\n⊢ think (thinkN (pure a✝) n) = thinkN (pure a✝) (Nat.succ n)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\n⊢ C s\n[PROOFSTEP]\nhaveI T := terminates_of_mem M\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\nT : Terminates s\n⊢ C s\n[PROOFSTEP]\nrw [eq_thinkN' s, get_eq_of_mem s M]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\nT : Terminates s\n⊢ C (thinkN (pure a) (length s))\n[PROOFSTEP]\ngeneralize length s = n\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\nT : Terminates s\nn : ℕ\n⊢ C (thinkN (pure a) n)\n[PROOFSTEP]\ninduction' n with n IH\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\nT : Terminates s\n⊢ C (thinkN (pure a) Nat.zero)\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\nC : Computation α → Sort v\na : α\ns : Computation α\nM : a ∈ s\nh1 : C (pure a)\nh2 : (s : Computation α) → C s → C (think s)\nT : Terminates s\nn : ℕ\nIH : C (thinkN (pure a) n)\n⊢ C (thinkN (pure a) (Nat.succ n))\n[PROOFSTEP]\nexacts [h1, h2 _ IH]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\n⊢ Stream'.map (fun o => Option.casesOn o none (some ∘ f)) s n = some b →\n    Stream'.map (fun o => Option.casesOn o none (some ∘ f)) s (n + 1) = some b\n[PROOFSTEP]\ndsimp [Stream'.map, Stream'.nth]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\n⊢ Option.rec none (fun val => some (f val)) (s n) = some b →\n    Option.rec none (fun val => some (f val)) (s (n + 1)) = some b\n[PROOFSTEP]\ninduction' e : s n with a\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\nx✝ : Option α\ne✝ : s n = x✝\ne : s n = none\n⊢ Option.rec none (fun val => some (f val)) none = some b →\n    Option.rec none (fun val => some (f val)) (s (n + 1)) = some b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\nx✝ : Option α\ne✝ : s n = x✝\na : α\ne : s n = some a\n⊢ Option.rec none (fun val => some (f val)) (some a) = some b →\n    Option.rec none (fun val => some (f val)) (s (n + 1)) = some b\n[PROOFSTEP]\nintro h\n[GOAL]\ncase none\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\nx✝ : Option α\ne✝ : s n = x✝\ne : s n = none\nh : Option.rec none (fun val => some (f val)) none = some b\n⊢ Option.rec none (fun val => some (f val)) (s (n + 1)) = some b\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\nx✝ : Option α\ne✝ : s n = x✝\na : α\ne : s n = some a\nh : Option.rec none (fun val => some (f val)) (some a) = some b\n⊢ Option.rec none (fun val => some (f val)) (s (n + 1)) = some b\n[PROOFSTEP]\nrw [al e]\n[GOAL]\ncase some\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nn : ℕ\nb : β\nx✝ : Option α\ne✝ : s n = x✝\na : α\ne : s n = some a\nh : Option.rec none (fun val => some (f val)) (some a) = some b\n⊢ Option.rec none (fun val => some (f val)) (some a) = some b\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ map f (think { val := s, property := al }) = think (map f { val := s, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ ↑(map f (think { val := s, property := al })) = ↑(think (map f { val := s, property := al }))\n[PROOFSTEP]\ndsimp [think, map]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ Stream'.map (fun o => Option.rec none (fun val => some (f val)) o) (Stream'.cons none s) =\n    Stream'.cons none (Stream'.map (fun o => Option.rec none (fun val => some (f val)) o) s)\n[PROOFSTEP]\nrw [Stream'.map_cons]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ destruct (map f s) = lmap f (rmap (map f) (destruct s))\n[PROOFSTEP]\napply s.recOn\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ ∀ (a : α), destruct (map f (pure a)) = lmap f (rmap (map f) (destruct (pure a)))\n[PROOFSTEP]\nintro\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ ∀ (s : Computation α), destruct (map f (think s)) = lmap f (rmap (map f) (destruct (think s)))\n[PROOFSTEP]\nintro\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\na✝ : α\n⊢ destruct (map f (pure a✝)) = lmap f (rmap (map f) (destruct (pure a✝)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns s✝ : Computation α\n⊢ destruct (map f (think s✝)) = lmap f (rmap (map f) (destruct (think s✝)))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ map id { val := f, property := al } = { val := f, property := al }\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ ↑(map id { val := f, property := al }) = ↑{ val := f, property := al }\n[PROOFSTEP]\nsimp [map, Function.comp]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f\n[PROOFSTEP]\nhave e : @Option.rec α (fun _ => Option α) none some = id := by ext ⟨⟩ <;> rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\n⊢ Option.rec none some = id\n[PROOFSTEP]\next ⟨⟩\n[GOAL]\ncase h.none.a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\na✝ : α\n⊢ a✝ ∈ Option.rec none some none ↔ a✝ ∈ id none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase h.some.a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\nval✝ a✝ : α\n⊢ a✝ ∈ Option.rec none some (some val✝) ↔ a✝ ∈ id (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\ne : Option.rec none some = id\n⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f\n[PROOFSTEP]\nhave h : ((fun x : Option α => x) = id) := by rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\ne : Option.rec none some = id\n⊢ (fun x => x) = id\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a\ne : Option.rec none some = id\nh : (fun x => x) = id\n⊢ Stream'.map (fun o => Option.rec none (fun val => some val) o) f = f\n[PROOFSTEP]\nsimp [e, h, Stream'.map_id]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ map (g ∘ f) { val := s, property := al } = map g (map f { val := s, property := al })\n[PROOFSTEP]\napply Subtype.eq\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ ↑(map (g ∘ f) { val := s, property := al }) = ↑(map g (map f { val := s, property := al }))\n[PROOFSTEP]\ndsimp [map]\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ Stream'.map (fun o => Option.rec none (fun val => some (g (f val))) o) s =\n    Stream'.map\n      ((fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o) s\n[PROOFSTEP]\napply congr_arg fun f : _ → Option γ => Stream'.map f s\n[GOAL]\ncase a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\n⊢ (fun o => Option.rec none (fun val => some (g (f val))) o) =\n    (fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o\n[PROOFSTEP]\next ⟨⟩\n[GOAL]\ncase a.h.none.a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\na✝ : γ\n⊢ a✝ ∈ Option.rec none (fun val => some (g (f val))) none ↔\n    a✝ ∈\n      ((fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o)\n        none\n[PROOFSTEP]\nrfl\n[GOAL]\ncase a.h.some.a\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ng : β → γ\ns : Stream' (Option α)\nal : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, s n = some a → s (n + 1) = some a\nval✝ : α\na✝ : γ\n⊢ a✝ ∈ Option.rec none (fun val => some (g (f val))) (some val✝) ↔\n    a✝ ∈\n      ((fun o => Option.rec none (fun val => some (g val)) o) ∘ fun o => Option.rec none (fun val => some (f val)) o)\n        (some val✝)\n[PROOFSTEP]\nrfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\n⊢ bind (pure a) f = f a\n[PROOFSTEP]\napply eq_of_bisim fun c₁ c₂ => c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\n⊢ IsBisimulation fun c₁ c₂ => c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\n[PROOFSTEP]\nintro c₁ c₂ h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\n⊢ BisimO (fun c₁ c₂ => c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)) (destruct c₁) (destruct c₂)\n[PROOFSTEP]\nexact\n  match c₁, c₂, h with\n  | _, _, Or.inl ⟨rfl, rfl⟩ => by\n    simp [bind, Bind.f]\n    cases' destruct (f a) with b cb <;> simp [Bind.g]\n  | _, c, Or.inr rfl => by\n    simp [Bind.f]\n    cases' destruct c with b cb <;> simp [Bind.g]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\n⊢ BisimO (fun c₁ c₂ => c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂))\n    (destruct (bind (pure a) f)) (destruct (f a))\n[PROOFSTEP]\nsimp [bind, Bind.f]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\n⊢ match\n    match Bind.g (destruct (f a)) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    destruct (f a) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s =\n          corec\n            (fun x =>\n              match x with\n              | Sum.inl ca =>\n                match destruct ca with\n                | Sum.inl a => Bind.g (destruct (f a))\n                | Sum.inr ca' => Sum.inr (Sum.inl ca')\n              | Sum.inr cb => Bind.g (destruct cb))\n            (Sum.inl (pure a)) ∧\n        s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\ncases' destruct (f a) with b cb\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\nb : β\n⊢ match\n    match Bind.g (Sum.inl b) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    Sum.inl b with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s =\n          corec\n            (fun x =>\n              match x with\n              | Sum.inl ca =>\n                match destruct ca with\n                | Sum.inl a => Bind.g (destruct (f a))\n                | Sum.inr ca' => Sum.inr (Sum.inl ca')\n              | Sum.inr cb => Bind.g (destruct cb))\n            (Sum.inl (pure a)) ∧\n        s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [Bind.g]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\ncb : Computation β\n⊢ match\n    match Bind.g (Sum.inr cb) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    Sum.inr cb with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s =\n          corec\n            (fun x =>\n              match x with\n              | Sum.inl ca =>\n                match destruct ca with\n                | Sum.inl a => Bind.g (destruct (f a))\n                | Sum.inr ca' => Sum.inr (Sum.inl ca')\n              | Sum.inr cb => Bind.g (destruct cb))\n            (Sum.inl (pure a)) ∧\n        s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [Bind.g]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\nc : Computation β\n⊢ BisimO (fun c₁ c₂ => c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂))\n    (destruct (corec (Bind.f f) (Sum.inr c))) (destruct c)\n[PROOFSTEP]\nsimp [Bind.f]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\nc : Computation β\n⊢ match\n    match Bind.g (destruct c) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    destruct c with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s = bind (pure a) f ∧ s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\ncases' destruct c with b cb\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\nc : Computation β\nb : β\n⊢ match\n    match Bind.g (Sum.inl b) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    Sum.inl b with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s = bind (pure a) f ∧ s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [Bind.g]\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\nc₁ c₂ : Computation β\nh : c₁ = bind (pure a) f ∧ c₂ = f a ∨ c₁ = corec (Bind.f f) (Sum.inr c₂)\nc cb : Computation β\n⊢ match\n    match Bind.g (Sum.inr cb) with\n    | Sum.inl a => Sum.inl a\n    | Sum.inr b =>\n      Sum.inr\n        (corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          b),\n    Sum.inr cb with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' =>\n    s = bind (pure a) f ∧ s' = f a ∨\n      s =\n        corec\n          (fun x =>\n            match x with\n            | Sum.inl ca =>\n              match destruct ca with\n              | Sum.inl a => Bind.g (destruct (f a))\n              | Sum.inr ca' => Sum.inr (Sum.inl ca')\n            | Sum.inr cb => Bind.g (destruct cb))\n          (Sum.inr s')\n  | x, x_1 => False\n[PROOFSTEP]\nsimp [Bind.g]\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\na : α\nf : α → Computation β\n⊢ bind (pure a) f = bind (pure a) f ∧ f a = f a ∨ bind (pure a) f = corec (Bind.f f) (Sum.inr (f a))\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\nf : α → Computation β\n⊢ destruct (bind (think c) f) = Sum.inr (bind c f)\n[PROOFSTEP]\nsimp [bind, Bind.f]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ bind s (pure ∘ f) = map f s\n[PROOFSTEP]\napply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\n[PROOFSTEP]\nintro c₁ c₂ h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct c₁) (destruct c₂)\n[PROOFSTEP]\nexact\n  match c₁, c₂, h with\n  | _, c₂, Or.inl (Eq.refl _) => by cases' destruct c₂ with b cb <;> simp\n  | _, _, Or.inr ⟨s, rfl, rfl⟩ => by\n    apply recOn s <;> intro s <;> simp\n    exact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\nc₁ c₂✝ : Computation β\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂✝ = map f s\nc₂ : Computation β\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct c₂) (destruct c₂)\n[PROOFSTEP]\ncases' destruct c₂ with b cb\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\nc₁ c₂✝ : Computation β\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂✝ = map f s\nc₂ : Computation β\nb : β\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (Sum.inl b) (Sum.inl b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\nc₁ c₂✝ : Computation β\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂✝ = map f s\nc₂ cb : Computation β\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (Sum.inr cb) (Sum.inr cb)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind s (pure ∘ f)))\n    (destruct (map f s))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns : Computation α\n⊢ ∀ (a : α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind (pure a) (pure ∘ f)))\n      (destruct (map f (pure a)))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns : Computation α\n⊢ ∀ (s : Computation α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind (think s) (pure ∘ f)))\n      (destruct (map f (think s)))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝¹ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns✝ : Computation α\ns : α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind (pure s) (pure ∘ f)))\n    (destruct (map f (pure s)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝¹ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns✝ s : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s) (destruct (bind (think s) (pure ∘ f)))\n    (destruct (map f (think s)))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns✝¹ : Computation α\nc₁ c₂ : Computation β\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure ∘ f) ∧ c₂ = map f s\ns✝ s : Computation α\n⊢ bind s (pure ∘ f) = map f s ∨ ∃ s_1, bind s (pure ∘ f) = bind s_1 (pure ∘ f) ∧ map f s = map f s_1\n[PROOFSTEP]\nexact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\n⊢ bind s (pure ∘ f) = map f s ∨ ∃ s_1, bind s (pure ∘ f) = bind s_1 (pure ∘ f) ∧ map f s = map f s_1\n[PROOFSTEP]\nexact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\n⊢ bind s pure = s\n[PROOFSTEP]\napply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s (pure) ∧ c₂ = s\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\n⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\n[PROOFSTEP]\nintro c₁ c₂ h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct c₁) (destruct c₂)\n[PROOFSTEP]\nexact\n  match c₁, c₂, h with\n  | _, c₂, Or.inl (Eq.refl _) => by cases' destruct c₂ with b cb <;> simp\n  | _, _, Or.inr ⟨s, rfl, rfl⟩ => by apply recOn s <;> intro s <;> simp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns c₁ c₂✝ : Computation α\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s pure ∧ c₂✝ = s\nc₂ : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct c₂) (destruct c₂)\n[PROOFSTEP]\ncases' destruct c₂ with b cb\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns c₁ c₂✝ : Computation α\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s pure ∧ c₂✝ = s\nc₂ : Computation α\nb : α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (Sum.inl b) (Sum.inl b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\ns c₁ c₂✝ : Computation α\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind s pure ∧ c₂✝ = s\nc₂ cb : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (Sum.inr cb) (Sum.inr cb)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct (bind s pure)) (destruct s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\ns : Computation α\n⊢ ∀ (a : α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct (bind (pure a) pure)) (destruct (pure a))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\ns : Computation α\n⊢ ∀ (s : Computation α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct (bind (think s) pure)) (destruct (think s))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\ns✝ : Computation α\ns : α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct (bind (pure s) pure)) (destruct (pure s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ c₁ c₂ : Computation α\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s\ns✝ s : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s) (destruct (bind (think s) pure)) (destruct (think s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\n⊢ bind s pure = s ∨ ∃ s_1, bind s pure = bind s_1 pure ∧ s = s_1\n[PROOFSTEP]\nexact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\n⊢ bind (bind s f) g = bind s fun x => bind (f x) g\n[PROOFSTEP]\napply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x : α => bind (f x) g\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\n⊢ IsBisimulation fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\n[PROOFSTEP]\nintro c₁ c₂ h\n[GOAL]\ncase bisim\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g) (destruct c₁)\n    (destruct c₂)\n[PROOFSTEP]\nexact\n  match c₁, c₂, h with\n  | _, c₂, Or.inl (Eq.refl _) => by cases' destruct c₂ with b cb <;> simp\n  | _, _, Or.inr ⟨s, rfl, rfl⟩ => by\n    apply recOn s <;> intro s <;> simp\n    · generalize f s = fs\n      apply recOn fs <;> intro t <;> simp\n      · cases' destruct (g t) with b cb <;> simp\n    · exact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂✝ : Computation γ\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂✝ = bind s fun x => bind (f x) g\nc₂ : Computation γ\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g) (destruct c₂)\n    (destruct c₂)\n[PROOFSTEP]\ncases' destruct c₂ with b cb\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂✝ : Computation γ\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂✝ = bind s fun x => bind (f x) g\nc₂ : Computation γ\nb : γ\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g) (Sum.inl b)\n    (Sum.inl b)\n[PROOFSTEP]\nsimp\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂✝ : Computation γ\nh : c₁ = c₂✝ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂✝ = bind s fun x => bind (f x) g\nc₂ cb : Computation γ\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g) (Sum.inr cb)\n    (Sum.inr cb)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g)\n    (destruct (bind (bind s f) g)) (destruct (bind s fun x => bind (f x) g))\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns : Computation α\n⊢ ∀ (a : α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g)\n      (destruct (bind (bind (pure a) f) g)) (destruct (bind (pure a) fun x => bind (f x) g))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns : Computation α\n⊢ ∀ (s : Computation α),\n    BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g)\n      (destruct (bind (bind (think s) f) g)) (destruct (bind (think s) fun x => bind (f x) g))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g)\n    (destruct (bind (bind (pure s) f) g)) (destruct (bind (pure s) fun x => bind (f x) g))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ s : Computation α\n⊢ BisimO (fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g)\n    (destruct (bind (bind (think s) f) g)) (destruct (bind (think s) fun x => bind (f x) g))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\n⊢ match destruct (bind (f s) g), destruct (bind (f s) g) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\ngeneralize f s = fs\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\n⊢ match destruct (bind fs g), destruct (bind fs g) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\napply recOn fs\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\n⊢ ∀ (a : β),\n    match destruct (bind (pure a) g), destruct (bind (pure a) g) with\n    | Sum.inl a, Sum.inl a' => a = a'\n    | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n    | x, x_1 => False\n[PROOFSTEP]\nintro t\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\n⊢ ∀ (s : Computation β),\n    match destruct (bind (think s) g), destruct (bind (think s) g) with\n    | Sum.inl a, Sum.inl a' => a = a'\n    | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n    | x, x_1 => False\n[PROOFSTEP]\nintro t\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\nt : β\n⊢ match destruct (bind (pure t) g), destruct (bind (pure t) g) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs t : Computation β\n⊢ match destruct (bind (think t) g), destruct (bind (think t) g) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\nt : β\n⊢ match destruct (g t), destruct (g t) with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\ncases' destruct (g t) with b cb\n[GOAL]\ncase h1.h1.inl\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\nt : β\nb : γ\n⊢ match Sum.inl b, Sum.inl b with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h1.h1.inr\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ : Computation α\ns : α\nfs : Computation β\nt : β\ncb : Computation γ\n⊢ match Sum.inr cb, Sum.inr cb with\n  | Sum.inl a, Sum.inl a' => a = a'\n  | Sum.inr s, Sum.inr s' => s = s' ∨ ∃ s_1, s = bind (bind s_1 f) g ∧ s' = bind s_1 fun x => bind (f x) g\n  | x, x_1 => False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\ns✝¹ : Computation α\nf : α → Computation β\ng : β → Computation γ\nc₁ c₂ : Computation γ\nh : c₁ = c₂ ∨ ∃ s, c₁ = bind (bind s f) g ∧ c₂ = bind s fun x => bind (f x) g\ns✝ s : Computation α\n⊢ (bind (bind s f) g = bind s fun x => bind (f x) g) ∨\n    ∃ s_1, bind (bind s f) g = bind (bind s_1 f) g ∧ (bind s fun x => bind (f x) g) = bind s_1 fun x => bind (f x) g\n[PROOFSTEP]\nexact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\ncase r\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\ng : β → Computation γ\n⊢ (bind (bind s f) g = bind s fun x => bind (f x) g) ∨\n    ∃ s_1, bind (bind s f) g = bind (bind s_1 f) g ∧ (bind s fun x => bind (f x) g) = bind s_1 fun x => bind (f x) g\n[PROOFSTEP]\nexact Or.inr ⟨s, rfl, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nm n : ℕ\nh1 : Results s a m\nh2 : Results (f a) b n\n⊢ Results (bind s f) b (n + m)\n[PROOFSTEP]\nhave := h1.mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nm n : ℕ\nh1 : Results s a m\nh2 : Results (f a) b n\nthis : a ∈ s\n⊢ Results (bind s f) b (n + m)\n[PROOFSTEP]\nrevert m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\n⊢ ∀ {m : ℕ}, Results s a m → Results (bind s f) b (n + m)\n[PROOFSTEP]\napply memRecOn this _ fun s IH => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\n⊢ ∀ {m : ℕ}, Results (pure a) a m → Results (bind (pure a) f) b (n + m)\n[PROOFSTEP]\nintro _ h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\nm✝ : ℕ\nh1 : Results (pure a) a m✝\n⊢ Results (bind (pure a) f) b (n + m✝)\n[PROOFSTEP]\nrw [ret_bind]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\nm✝ : ℕ\nh1 : Results (pure a) a m✝\n⊢ Results (f a) b (n + m✝)\n[PROOFSTEP]\nrw [h1.len_unique (results_pure _)]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\nm✝ : ℕ\nh1 : Results (pure a) a m✝\n⊢ Results (f a) b (n + 0)\n[PROOFSTEP]\nexact h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\n⊢ ∀ (s : Computation α),\n    (∀ {m : ℕ}, Results s a m → Results (bind s f) b (n + m)) →\n      ∀ {m : ℕ}, Results (think s) a m → Results (bind (think s) f) b (n + m)\n[PROOFSTEP]\nintro _ h3 _ h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\ns✝ : Computation α\nh3 : ∀ {m : ℕ}, Results s✝ a m → Results (bind s✝ f) b (n + m)\nm✝ : ℕ\nh1 : Results (think s✝) a m✝\n⊢ Results (bind (think s✝) f) b (n + m✝)\n[PROOFSTEP]\nrw [think_bind]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\ns✝ : Computation α\nh3 : ∀ {m : ℕ}, Results s✝ a m → Results (bind s✝ f) b (n + m)\nm✝ : ℕ\nh1 : Results (think s✝) a m✝\n⊢ Results (think (bind s✝ f)) b (n + m✝)\n[PROOFSTEP]\ncases' of_results_think h1 with m' h\n[GOAL]\ncase intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\ns✝ : Computation α\nh3 : ∀ {m : ℕ}, Results s✝ a m → Results (bind s✝ f) b (n + m)\nm✝ : ℕ\nh1 : Results (think s✝) a m✝\nm' : ℕ\nh : Results s✝ a m' ∧ m✝ = m' + 1\n⊢ Results (think (bind s✝ f)) b (n + m✝)\n[PROOFSTEP]\ncases' h with h1 e\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\ns✝ : Computation α\nh3 : ∀ {m : ℕ}, Results s✝ a m → Results (bind s✝ f) b (n + m)\nm✝ : ℕ\nh1✝ : Results (think s✝) a m✝\nm' : ℕ\nh1 : Results s✝ a m'\ne : m✝ = m' + 1\n⊢ Results (think (bind s✝ f)) b (n + m✝)\n[PROOFSTEP]\nrw [e]\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nn : ℕ\nh2 : Results (f a) b n\nthis : a ∈ s\ns✝ : Computation α\nh3 : ∀ {m : ℕ}, Results s✝ a m → Results (bind s✝ f) b (n + m)\nm✝ : ℕ\nh1✝ : Results (think s✝) a m✝\nm' : ℕ\nh1 : Results s✝ a m'\ne : m✝ = m' + 1\n⊢ Results (think (bind s✝ f)) b (n + (m' + 1))\n[PROOFSTEP]\nexact results_think (h3 h1)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\nb : β\nk : ℕ\n⊢ Results (bind s f) b k → ∃ a m n, Results s a m ∧ Results (f a) b n ∧ k = n + m\n[PROOFSTEP]\ninduction' k with n IH generalizing s\n[GOAL]\ncase zero\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns : Computation α\n⊢ Results (bind s f) b Nat.zero → ∃ a m n, Results s a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\napply recOn s (fun a => _) fun s' => _\n[GOAL]\ncase succ\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns : Computation α\n⊢ Results (bind s f) b (Nat.succ n) → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\napply recOn s (fun a => _) fun s' => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns : Computation α\n⊢ ∀ (a : α),\n    Results (bind (pure a) f) b Nat.zero → ∃ a_2 m n, Results (pure a) a_2 m ∧ Results (f a_2) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\nintro e h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns : Computation α\n⊢ ∀ (s' : Computation α),\n    Results (bind (think s') f) b Nat.zero → ∃ a m n, Results (think s') a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\nintro e h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns : Computation α\n⊢ ∀ (a : α),\n    Results (bind (pure a) f) b (Nat.succ n) →\n      ∃ a_2 m n_1, Results (pure a) a_2 m ∧ Results (f a_2) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nintro e h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns : Computation α\n⊢ ∀ (s' : Computation α),\n    Results (bind (think s') f) b (Nat.succ n) →\n      ∃ a m n_1, Results (think s') a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nintro e h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns : Computation α\ne : α\nh : Results (bind (pure e) f) b Nat.zero\n⊢ ∃ a m n, Results (pure e) a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\nsimp [thinkN] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns : Computation α\ne : α\nh : Results (f e) b 0\n⊢ ∃ a m n, Results (pure e) a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\nrefine' ⟨e, _, _, results_pure _, h, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns e : Computation α\nh : Results (bind (think e) f) b Nat.zero\n⊢ ∃ a m n, Results (think e) a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\nhave := congr_arg head (eq_thinkN h)\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\ns e : Computation α\nh : Results (bind (think e) f) b Nat.zero\nthis : head (bind (think e) f) = head (thinkN (pure b) Nat.zero)\n⊢ ∃ a m n, Results (think e) a m ∧ Results (f a) b n ∧ Nat.zero = n + m\n[PROOFSTEP]\ncontradiction\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns : Computation α\ne : α\nh : Results (bind (pure e) f) b (Nat.succ n)\n⊢ ∃ a m n_1, Results (pure e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns : Computation α\ne : α\nh : Results (f e) b (Nat.succ n)\n⊢ ∃ a m n_1, Results (pure e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nrefine' ⟨e, _, n + 1, results_pure _, h, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns e : Computation α\nh : Results (bind (think e) f) b (Nat.succ n)\n⊢ ∃ a m n_1, Results (think e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns e : Computation α\nh : Results (bind e f) b n\n⊢ ∃ a m n_1, Results (think e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nexact by\n  let ⟨a, m, n', h1, h2, e'⟩ := IH h\n  rw [e']; exact ⟨a, m.succ, n', results_think h1, h2, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns e : Computation α\nh : Results (bind e f) b n\n⊢ ∃ a m n_1, Results (think e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nlet ⟨a, m, n', h1, h2, e'⟩ := IH h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns e : Computation α\nh : Results (bind e f) b n\na : α\nm n' : ℕ\nh1 : Results e a m\nh2 : Results (f a) b n'\ne' : n = n' + m\n⊢ ∃ a m n_1, Results (think e) a m ∧ Results (f a) b n_1 ∧ Nat.succ n = n_1 + m\n[PROOFSTEP]\nrw [e']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns✝ : Computation α\nf : α → Computation β\nb : β\nn : ℕ\nIH : ∀ {s : Computation α}, Results (bind s f) b n → ∃ a m n_1, Results s a m ∧ Results (f a) b n_1 ∧ n = n_1 + m\ns e : Computation α\nh : Results (bind e f) b n\na : α\nm n' : ℕ\nh1 : Results e a m\nh2 : Results (f a) b n'\ne' : n = n' + m\n⊢ ∃ a m_1 n, Results (think e) a m_1 ∧ Results (f a) b n ∧ Nat.succ (n' + m) = n + m_1\n[PROOFSTEP]\nexact ⟨a, m.succ, n', results_think h1, h2, rfl⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nh1 : s ~> a\nh2 : f a ~> b\nb' : β\nbB : b' ∈ bind s f\n⊢ b = b'\n[PROOFSTEP]\nrcases exists_of_mem_bind bB with ⟨a', a's, ba'⟩\n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nh1 : s ~> a\nh2 : f a ~> b\nb' : β\nbB : b' ∈ bind s f\na' : α\na's : a' ∈ s\nba' : b' ∈ f a'\n⊢ b = b'\n[PROOFSTEP]\nrw [← h1 a's] at ba' \n[GOAL]\ncase intro.intro\nα : Type u\nβ : Type v\nγ : Type w\ns : Computation α\nf : α → Computation β\na : α\nb : β\nh1 : s ~> a\nh2 : f a ~> b\nb' : β\nbB : b' ∈ bind s f\na' : α\na's : a' ∈ s\nba' : b' ∈ f a\n⊢ b = b'\n[PROOFSTEP]\nexact h2 ba'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Computation α\nm : a ∈ s\n⊢ f a ∈ map f s\n[PROOFSTEP]\nrw [← bind_pure]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Computation α\nm : a ∈ s\n⊢ f a ∈ bind s (pure ∘ f)\n[PROOFSTEP]\napply mem_bind m\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\na : α\ns : Computation α\nm : a ∈ s\n⊢ f a ∈ (pure ∘ f) a\n[PROOFSTEP]\napply ret_mem\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Computation α\nh : b ∈ map f s\n⊢ ∃ a, a ∈ s ∧ f a = b\n[PROOFSTEP]\nrw [← bind_pure] at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\nb : β\ns : Computation α\nh : b ∈ bind s (pure ∘ f)\n⊢ ∃ a, a ∈ s ∧ f a = b\n[PROOFSTEP]\nexact\n  let ⟨a, as, fb⟩ := exists_of_mem_bind h\n  ⟨a, as, mem_unique (ret_mem _) fb⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\ninst✝ : Terminates s\n⊢ Terminates (map f s)\n[PROOFSTEP]\nrw [← bind_pure]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nf : α → β\ns : Computation α\ninst✝ : Terminates s\n⊢ Terminates (bind s (pure ∘ f))\n[PROOFSTEP]\nexact terminates_of_mem (mem_bind (get_mem s) (get_mem (f (get s))))\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nc₂ : Computation α\n⊢ destruct (HOrElse.hOrElse (pure a) fun x => c₂) = Sum.inl a\n[PROOFSTEP]\nunfold HOrElse.hOrElse instHOrElse\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nc₂ : Computation α\n⊢ destruct ({ hOrElse := fun a b => OrElse.orElse a b }.1 (pure a) fun x => c₂) = Sum.inl a\n[PROOFSTEP]\nunfold OrElse.orElse instOrElse Alternative.orElse instAlternativeComputation\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\na : α\nc₂ : Computation α\n⊢ destruct\n      ({\n            hOrElse := fun a b =>\n              {\n                    orElse :=\n                      (let src := monad;\n                        Alternative.mk empty @orElse).3 }.1\n                a b }.1\n        (pure a) fun x => c₂) =\n    Sum.inl a\n[PROOFSTEP]\nsimp [orElse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ : Computation α\na : α\n⊢ destruct (HOrElse.hOrElse (think c₁) fun x => pure a) = Sum.inl a\n[PROOFSTEP]\nunfold HOrElse.hOrElse instHOrElse\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ : Computation α\na : α\n⊢ destruct ({ hOrElse := fun a b => OrElse.orElse a b }.1 (think c₁) fun x => pure a) = Sum.inl a\n[PROOFSTEP]\nunfold OrElse.orElse instOrElse Alternative.orElse instAlternativeComputation\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ : Computation α\na : α\n⊢ destruct\n      ({\n            hOrElse := fun a b =>\n              {\n                    orElse :=\n                      (let src := monad;\n                        Alternative.mk empty @orElse).3 }.1\n                a b }.1\n        (think c₁) fun x => pure a) =\n    Sum.inl a\n[PROOFSTEP]\nsimp [orElse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\n⊢ destruct (HOrElse.hOrElse (think c₁) fun x => think c₂) = Sum.inr (HOrElse.hOrElse c₁ fun x => c₂)\n[PROOFSTEP]\nunfold HOrElse.hOrElse instHOrElse\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\n⊢ destruct ({ hOrElse := fun a b => OrElse.orElse a b }.1 (think c₁) fun x => think c₂) =\n    Sum.inr ({ hOrElse := fun a b => OrElse.orElse a b }.1 c₁ fun x => c₂)\n[PROOFSTEP]\nunfold OrElse.orElse instOrElse Alternative.orElse instAlternativeComputation\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\n⊢ destruct\n      ({\n            hOrElse := fun a b =>\n              {\n                    orElse :=\n                      (let src := monad;\n                        Alternative.mk empty @orElse).3 }.1\n                a b }.1\n        (think c₁) fun x => think c₂) =\n    Sum.inr\n      ({\n            hOrElse := fun a b =>\n              {\n                    orElse :=\n                      (let src := monad;\n                        Alternative.mk empty @orElse).3 }.1\n                a b }.1\n        c₁ fun x => c₂)\n[PROOFSTEP]\nsimp [orElse]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\n⊢ (HOrElse.hOrElse (empty α) fun x => c) = c\n[PROOFSTEP]\napply eq_of_bisim (fun c₁ c₂ => (empty α <|> c₂) = c₁) _ rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\n⊢ IsBisimulation fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁\n[PROOFSTEP]\nintro s' s h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s) = s'\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁) (destruct s') (destruct s)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s) = s'\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁) (destruct (HOrElse.hOrElse (empty α) fun x => s))\n    (destruct s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s) = s'\n⊢ ∀ (a : α),\n    BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁)\n      (destruct (HOrElse.hOrElse (empty α) fun x => pure a)) (destruct (pure a))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s) = s'\n⊢ ∀ (s : Computation α),\n    BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁)\n      (destruct (HOrElse.hOrElse (empty α) fun x => think s)) (destruct (think s))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s✝) = s'\ns : α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁)\n    (destruct (HOrElse.hOrElse (empty α) fun x => pure s)) (destruct (pure s))\n[PROOFSTEP]\nrw [think_empty]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s✝) = s'\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (empty α) fun x => c₂) = c₁)\n    (destruct (HOrElse.hOrElse (empty α) fun x => think s)) (destruct (think s))\n[PROOFSTEP]\nrw [think_empty]\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s✝) = s'\ns : α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (think (empty α)) fun x => c₂) = c₁)\n    (destruct (HOrElse.hOrElse (think (empty α)) fun x => pure s)) (destruct (pure s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s✝) = s'\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse (think (empty α)) fun x => c₂) = c₁)\n    (destruct (HOrElse.hOrElse (think (empty α)) fun x => think s)) (destruct (think s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse (empty α) fun x => s✝) = s'\ns : Computation α\n⊢ (HOrElse.hOrElse (think (empty α)) fun x => s) = HOrElse.hOrElse (empty α) fun x => s\n[PROOFSTEP]\nrw [← think_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\n⊢ (HOrElse.hOrElse c fun x => empty α) = c\n[PROOFSTEP]\napply eq_of_bisim (fun c₁ c₂ => (c₂ <|> empty α) = c₁) _ rfl\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc : Computation α\n⊢ IsBisimulation fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁\n[PROOFSTEP]\nintro s' s h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse s fun x => empty α) = s'\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁) (destruct s') (destruct s)\n[PROOFSTEP]\nrw [← h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse s fun x => empty α) = s'\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁) (destruct (HOrElse.hOrElse s fun x => empty α))\n    (destruct s)\n[PROOFSTEP]\napply recOn s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse s fun x => empty α) = s'\n⊢ ∀ (a : α),\n    BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁)\n      (destruct (HOrElse.hOrElse (pure a) fun x => empty α)) (destruct (pure a))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s : Computation α\nh : (HOrElse.hOrElse s fun x => empty α) = s'\n⊢ ∀ (s : Computation α),\n    BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁)\n      (destruct (HOrElse.hOrElse (think s) fun x => empty α)) (destruct (think s))\n[PROOFSTEP]\nintro s\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse s✝ fun x => empty α) = s'\ns : α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁)\n    (destruct (HOrElse.hOrElse (pure s) fun x => empty α)) (destruct (pure s))\n[PROOFSTEP]\nrw [think_empty]\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse s✝ fun x => empty α) = s'\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => empty α) = c₁)\n    (destruct (HOrElse.hOrElse (think s) fun x => empty α)) (destruct (think s))\n[PROOFSTEP]\nrw [think_empty]\n[GOAL]\ncase h1\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse s✝ fun x => empty α) = s'\ns : α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => think (empty α)) = c₁)\n    (destruct (HOrElse.hOrElse (pure s) fun x => think (empty α))) (destruct (pure s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse s✝ fun x => empty α) = s'\ns : Computation α\n⊢ BisimO (fun c₁ c₂ => (HOrElse.hOrElse c₂ fun x => think (empty α)) = c₁)\n    (destruct (HOrElse.hOrElse (think s) fun x => think (empty α))) (destruct (think s))\n[PROOFSTEP]\nsimp\n[GOAL]\ncase h2\nα : Type u\nβ : Type v\nγ : Type w\nc s' s✝ : Computation α\nh : (HOrElse.hOrElse s✝ fun x => empty α) = s'\ns : Computation α\n⊢ (HOrElse.hOrElse s fun x => think (empty α)) = HOrElse.hOrElse s fun x => empty α\n[PROOFSTEP]\nrw [← think_empty]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : Computation α\na : α\nh1 : a ∈ s\nh2 : a ∈ t\na' : α\nma : a' ∈ s\n⊢ a' ∈ t\n[PROOFSTEP]\nrw [mem_unique ma h1]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : Computation α\na : α\nh1 : a ∈ s\nh2 : a ∈ t\na' : α\nma : a' ∈ s\n⊢ a ∈ t\n[PROOFSTEP]\nexact h2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : Computation α\na : α\nh1 : a ∈ s\nh2 : a ∈ t\na' : α\nma : a' ∈ t\n⊢ a' ∈ s\n[PROOFSTEP]\nrw [mem_unique ma h2]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns t : Computation α\na : α\nh1 : a ∈ s\nh2 : a ∈ t\na' : α\nma : a' ∈ t\n⊢ a ∈ s\n[PROOFSTEP]\nexact h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\nh : c₁ ~ c₂\n⊢ Terminates c₁ ↔ Terminates c₂\n[PROOFSTEP]\nsimp only [terminates_iff, exists_congr h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\nx✝ : LiftRel (fun x x_1 => x = x_1) c₁ c₂\na : α\nh1 : ∀ {a : α}, a ∈ c₁ → ∃ b, b ∈ c₂ ∧ (fun x x_1 => x = x_1) a b\nh2 : ∀ {b : α}, b ∈ c₂ → ∃ a, a ∈ c₁ ∧ (fun x x_1 => x = x_1) a b\na1 : a ∈ c₁\n⊢ a ∈ c₂\n[PROOFSTEP]\nlet ⟨b, b2, ab⟩ := h1 a1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\nx✝ : LiftRel (fun x x_1 => x = x_1) c₁ c₂\na : α\nh1 : ∀ {a : α}, a ∈ c₁ → ∃ b, b ∈ c₂ ∧ (fun x x_1 => x = x_1) a b\nh2 : ∀ {b : α}, b ∈ c₂ → ∃ a, a ∈ c₁ ∧ (fun x x_1 => x = x_1) a b\na1 : a ∈ c₁\nb : α\nb2 : b ∈ c₂\nab : (fun x x_1 => x = x_1) a b\n⊢ a ∈ c₂\n[PROOFSTEP]\nrwa [ab]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\nx✝ : LiftRel (fun x x_1 => x = x_1) c₁ c₂\na : α\nh1 : ∀ {a : α}, a ∈ c₁ → ∃ b, b ∈ c₂ ∧ (fun x x_1 => x = x_1) a b\nh2 : ∀ {b : α}, b ∈ c₂ → ∃ a, a ∈ c₁ ∧ (fun x x_1 => x = x_1) a b\na2 : a ∈ c₂\n⊢ a ∈ c₁\n[PROOFSTEP]\nlet ⟨b, b1, ab⟩ := h2 a2\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nc₁ c₂ : Computation α\nx✝ : LiftRel (fun x x_1 => x = x_1) c₁ c₂\na : α\nh1 : ∀ {a : α}, a ∈ c₁ → ∃ b, b ∈ c₂ ∧ (fun x x_1 => x = x_1) a b\nh2 : ∀ {b : α}, b ∈ c₂ → ∃ a, a ∈ c₁ ∧ (fun x x_1 => x = x_1) a b\na2 : a ∈ c₂\nb : α\nb1 : b ∈ c₁\nab : (fun x x_1 => x = x_1) b a\n⊢ a ∈ c₁\n[PROOFSTEP]\nrwa [← ab]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nrefl : ∀ (x : α), R x x\nsymm : ∀ {x y : α}, R x y → R y x\ntrans : ∀ {x y z : α}, R x y → R y z → R x z\n⊢ ∀ {x y : Computation α}, LiftRel R x y → LiftRel R y x\n[PROOFSTEP]\napply LiftRel.symm\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nrefl : ∀ (x : α), R x x\nsymm : ∀ {x y : α}, R x y → R y x\ntrans : ∀ {x y z : α}, R x y → R y z → R x z\n⊢ Symmetric R\n[PROOFSTEP]\napply symm\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nrefl : ∀ (x : α), R x x\nsymm : ∀ {x y : α}, R x y → R y x\ntrans : ∀ {x y z : α}, R x y → R y z → R x z\n⊢ ∀ {x y z : Computation α}, LiftRel R x y → LiftRel R y z → LiftRel R x z\n[PROOFSTEP]\napply LiftRel.trans\n[GOAL]\ncase H\nα : Type u\nβ : Type v\nγ : Type w\nR : α → α → Prop\nrefl : ∀ (x : α), R x x\nsymm : ∀ {x y : α}, R x y → R y x\ntrans : ∀ {x y z : α}, R x y → R y z → R x z\n⊢ Transitive R\n[PROOFSTEP]\napply trans\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\nl : ∀ {a : α}, a ∈ ca → ∃ b, b ∈ cb ∧ R a b\nright✝ : ∀ {b : β}, b ∈ cb → ∃ a, a ∈ ca ∧ R a b\na : α\nb : β\nma : a ∈ ca\nmb : b ∈ cb\n⊢ R a b\n[PROOFSTEP]\nlet ⟨b', mb', ab'⟩ := l ma\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\nl : ∀ {a : α}, a ∈ ca → ∃ b, b ∈ cb ∧ R a b\nright✝ : ∀ {b : β}, b ∈ cb → ∃ a, a ∈ ca ∧ R a b\na : α\nb : β\nma : a ∈ ca\nmb : b ∈ cb\nb' : β\nmb' : b' ∈ cb\nab' : R a b'\n⊢ R a b\n[PROOFSTEP]\nrw [mem_unique mb mb']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\nl : ∀ {a : α}, a ∈ ca → ∃ b, b ∈ cb ∧ R a b\nright✝ : ∀ {b : β}, b ∈ cb → ∃ a, a ∈ ca ∧ R a b\na : α\nb : β\nma : a ∈ ca\nmb : b ∈ cb\nb' : β\nmb' : b' ∈ cb\nab' : R a b'\n⊢ R a b'\n[PROOFSTEP]\nexact ab'\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\nca : Computation α\ncb : Computation β\nma : a ∈ ca\nmb : b ∈ cb\nab : R a b\na' : α\nma' : a' ∈ ca\n⊢ ∃ b, b ∈ cb ∧ R a' b\n[PROOFSTEP]\nrw [mem_unique ma' ma]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\nca : Computation α\ncb : Computation β\nma : a ∈ ca\nmb : b ∈ cb\nab : R a b\na' : α\nma' : a' ∈ ca\n⊢ ∃ b, b ∈ cb ∧ R a b\n[PROOFSTEP]\nexact ⟨b, mb, ab⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\nca : Computation α\ncb : Computation β\nma : a ∈ ca\nmb : b ∈ cb\nab : R a b\nb' : β\nmb' : b' ∈ cb\n⊢ ∃ a, a ∈ ca ∧ R a b'\n[PROOFSTEP]\nrw [mem_unique mb' mb]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\nca : Computation α\ncb : Computation β\nma : a ∈ ca\nmb : b ∈ cb\nab : R a b\nb' : β\nmb' : b' ∈ cb\n⊢ ∃ a, a ∈ ca ∧ R a b\n[PROOFSTEP]\nexact ⟨a, ma, ab⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\nh : LiftRel R ca cb\na : α\nb : β\nma : a ∈ ca\nmb : b ∈ cb\n⊢ R a b\n[PROOFSTEP]\nlet ⟨b', mb', ab⟩ := h.left ma\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\nh : LiftRel R ca cb\na : α\nb : β\nma : a ∈ ca\nmb : b ∈ cb\nb' : β\nmb' : b' ∈ cb\nab : R a b'\n⊢ R a b\n[PROOFSTEP]\nrwa [mem_unique mb mb']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\ncb : Computation β\nx✝ : ∃ b, b ∈ cb ∧ R a b\nb : β\nmb : b ∈ cb\nab : R a b\na' : α\nma' : a' ∈ pure a\n⊢ ∃ b, b ∈ cb ∧ R a' b\n[PROOFSTEP]\nrw [eq_of_pure_mem ma']\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\ncb : Computation β\nx✝ : ∃ b, b ∈ cb ∧ R a b\nb : β\nmb : b ∈ cb\nab : R a b\na' : α\nma' : a' ∈ pure a\n⊢ ∃ b, b ∈ cb ∧ R a b\n[PROOFSTEP]\nexact ⟨b, mb, ab⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\ncb : Computation β\nx✝ : ∃ b, b ∈ cb ∧ R a b\nb : β\nmb : b ∈ cb\nab : R a b\nb' : β\nmb' : b' ∈ cb\n⊢ R a b'\n[PROOFSTEP]\nrw [mem_unique mb' mb]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\ncb : Computation β\nx✝ : ∃ b, b ∈ cb ∧ R a b\nb : β\nmb : b ∈ cb\nab : R a b\nb' : β\nmb' : b' ∈ cb\n⊢ R a b\n[PROOFSTEP]\nexact ab\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\nb : β\n⊢ LiftRel R ca (pure b) ↔ ∃ a, a ∈ ca ∧ R a b\n[PROOFSTEP]\nrw [LiftRel.swap, liftRel_pure_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\n⊢ LiftRel R (pure a) (pure b) ↔ R a b\n[PROOFSTEP]\nrw [liftRel_pure_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\n⊢ (∃ b_1, b_1 ∈ pure b ∧ R a b_1) ↔ R a b\n[PROOFSTEP]\nexact ⟨fun ⟨b', mb', ab'⟩ => by rwa [eq_of_pure_mem mb'] at ab' , fun ab => ⟨_, ret_mem _, ab⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\na : α\nb : β\nx✝ : ∃ b_1, b_1 ∈ pure b ∧ R a b_1\nb' : β\nmb' : b' ∈ pure b\nab' : R a b'\n⊢ R a b\n[PROOFSTEP]\nrwa [eq_of_pure_mem mb'] at ab' \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\n⊢ LiftRel R ca (think cb) ↔ LiftRel R ca cb\n[PROOFSTEP]\nrw [← LiftRel.swap R, ← LiftRel.swap R]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nca : Computation α\ncb : Computation β\n⊢ LiftRel (swap R) (think cb) ca ↔ LiftRel (swap R) cb ca\n[PROOFSTEP]\napply liftRel_think_left\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nR : α → β → Prop\nS : γ → δ → Prop\ns1 : Computation α\ns2 : Computation β\nf1 : α → γ\nf2 : β → δ\nh1 : LiftRel R s1 s2\nh2 : ∀ {a : α} {b : β}, R a b → S (f1 a) (f2 b)\n⊢ LiftRel S (map f1 s1) (map f2 s2)\n[PROOFSTEP]\nrw [← bind_pure, ← bind_pure]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nR : α → β → Prop\nS : γ → δ → Prop\ns1 : Computation α\ns2 : Computation β\nf1 : α → γ\nf2 : β → δ\nh1 : LiftRel R s1 s2\nh2 : ∀ {a : α} {b : β}, R a b → S (f1 a) (f2 b)\n⊢ LiftRel S (bind s1 (pure ∘ f1)) (bind s2 (pure ∘ f2))\n[PROOFSTEP]\napply liftRel_bind _ _ h1\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nR : α → β → Prop\nS : γ → δ → Prop\ns1 : Computation α\ns2 : Computation β\nf1 : α → γ\nf2 : β → δ\nh1 : LiftRel R s1 s2\nh2 : ∀ {a : α} {b : β}, R a b → S (f1 a) (f2 b)\n⊢ ∀ {a : α} {b : β}, R a b → LiftRel S ((pure ∘ f1) a) ((pure ∘ f2) b)\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nR : α → β → Prop\nS : γ → δ → Prop\ns1 : Computation α\ns2 : Computation β\nf1 : α → γ\nf2 : β → δ\nh1 : LiftRel R s1 s2\nh2 : ∀ {a : α} {b : β}, R a b → S (f1 a) (f2 b)\n⊢ ∀ {a : α} {b : β}, R a b → ∃ a_2, a_2 ∈ pure (f1 a) ∧ S a_2 (f2 b)\n[PROOFSTEP]\nintros a b h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nδ : Type u_1\nR : α → β → Prop\nS : γ → δ → Prop\ns1 : Computation α\ns2 : Computation β\nf1 : α → γ\nf2 : β → δ\nh1 : LiftRel R s1 s2\nh2 : ∀ {a : α} {b : β}, R a b → S (f1 a) (f2 b)\na : α\nb : β\nh : R a b\n⊢ ∃ a_1, a_1 ∈ pure (f1 a) ∧ S a_1 (f2 b)\n[PROOFSTEP]\nexact ⟨f1 a, ⟨ret_mem _, @h2 a b h⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns1 s2 : Computation α\nf : α → β\nh1 : s1 ~ s2\n⊢ map f s1 ~ map f s2\n[PROOFSTEP]\nrw [← lift_eq_iff_equiv]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\ns1 s2 : Computation α\nf : α → β\nh1 : s1 ~ s2\n⊢ LiftRel (fun x x_1 => x = x_1) (map f s1) (map f s2)\n[PROOFSTEP]\nexact liftRel_map Eq _ ((lift_eq_iff_equiv _ _).2 h1) fun {a} b => congr_arg _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\n⊢ LiftRelAux R C (Sum.inl a) (destruct cb) ↔ ∃ b, b ∈ cb ∧ R a b\n[PROOFSTEP]\napply cb.recOn (fun b => _) fun cb => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\n⊢ ∀ (b : β), LiftRelAux R C (Sum.inl a) (destruct (pure b)) ↔ ∃ b_1, b_1 ∈ pure b ∧ R a b_1\n[PROOFSTEP]\nintro b\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\nb : β\n⊢ LiftRelAux R C (Sum.inl a) (destruct (pure b)) ↔ ∃ b_1, b_1 ∈ pure b ∧ R a b_1\n[PROOFSTEP]\nexact ⟨fun h => ⟨_, ret_mem _, h⟩, fun ⟨b', mb, h⟩ => by rw [mem_unique (ret_mem _) mb]; exact h⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\nb : β\nx✝ : ∃ b_1, b_1 ∈ pure b ∧ R a b_1\nb' : β\nmb : b' ∈ pure b\nh : R a b'\n⊢ LiftRelAux R C (Sum.inl a) (destruct (pure b))\n[PROOFSTEP]\nrw [mem_unique (ret_mem _) mb]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\nb : β\nx✝ : ∃ b_1, b_1 ∈ pure b ∧ R a b_1\nb' : β\nmb : b' ∈ pure b\nh : R a b'\n⊢ LiftRelAux R C (Sum.inl a) (destruct (pure b'))\n[PROOFSTEP]\nexact h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\n⊢ ∀ (cb : Computation β), LiftRelAux R C (Sum.inl a) (destruct (think cb)) ↔ ∃ b, b ∈ think cb ∧ R a b\n[PROOFSTEP]\nintro\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb cb✝ : Computation β\n⊢ LiftRelAux R C (Sum.inl a) (destruct (think cb✝)) ↔ ∃ b, b ∈ think cb✝ ∧ R a b\n[PROOFSTEP]\nrw [destruct_think]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb cb✝ : Computation β\n⊢ LiftRelAux R C (Sum.inl a) (Sum.inr cb✝) ↔ ∃ b, b ∈ think cb✝ ∧ R a b\n[PROOFSTEP]\nexact ⟨fun ⟨b, h, r⟩ => ⟨b, think_mem h, r⟩, fun ⟨b, h, r⟩ => ⟨b, of_think_mem h, r⟩⟩\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α ⊕ Computation α\nb : β ⊕ Computation β\n⊢ LiftRelAux (Function.swap R) (Function.swap C) b a = LiftRelAux R C a b\n[PROOFSTEP]\ncases' a with a ca\n[GOAL]\ncase inl\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nb : β ⊕ Computation β\na : α\n⊢ LiftRelAux (Function.swap R) (Function.swap C) b (Sum.inl a) = LiftRelAux R C (Sum.inl a) b\n[PROOFSTEP]\ncases' b with b cb\n[GOAL]\ncase inr\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nb : β ⊕ Computation β\nca : Computation α\n⊢ LiftRelAux (Function.swap R) (Function.swap C) b (Sum.inr ca) = LiftRelAux R C (Sum.inr ca) b\n[PROOFSTEP]\ncases' b with b cb\n[GOAL]\ncase inl.inl\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\nb : β\n⊢ LiftRelAux (Function.swap R) (Function.swap C) (Sum.inl b) (Sum.inl a) = LiftRelAux R C (Sum.inl a) (Sum.inl b)\n[PROOFSTEP]\nsimp only [LiftRelAux]\n[GOAL]\ncase inl.inr\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\na : α\ncb : Computation β\n⊢ LiftRelAux (Function.swap R) (Function.swap C) (Sum.inr cb) (Sum.inl a) = LiftRelAux R C (Sum.inl a) (Sum.inr cb)\n[PROOFSTEP]\nsimp only [LiftRelAux]\n[GOAL]\ncase inr.inl\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nca : Computation α\nb : β\n⊢ LiftRelAux (Function.swap R) (Function.swap C) (Sum.inl b) (Sum.inr ca) = LiftRelAux R C (Sum.inr ca) (Sum.inl b)\n[PROOFSTEP]\nsimp only [LiftRelAux]\n[GOAL]\ncase inr.inr\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nca : Computation α\ncb : Computation β\n⊢ LiftRelAux (Function.swap R) (Function.swap C) (Sum.inr cb) (Sum.inr ca) = LiftRelAux R C (Sum.inr ca) (Sum.inr cb)\n[PROOFSTEP]\nsimp only [LiftRelAux]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nb : β\nca : Computation α\n⊢ LiftRelAux R C (destruct ca) (Sum.inl b) ↔ ∃ a, a ∈ ca ∧ R a b\n[PROOFSTEP]\nrw [← LiftRelAux.swap, LiftRelAux.ret_left]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\ncb : Computation β\nHc : C ca cb\na : α\nha : a ∈ ca\n⊢ LiftRel R ca cb\n[PROOFSTEP]\nrevert cb\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\n⊢ ∀ (cb : Computation β), C ca cb → LiftRel R ca cb\n[PROOFSTEP]\nrefine' memRecOn (C := (λ ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb)) ha _ (fun ca' IH => _)\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\n⊢ (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) (pure a)\n[PROOFSTEP]\nintro cb Hc\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\n⊢ (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) (think ca')\n[PROOFSTEP]\nintro cb Hc\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\ncb : Computation β\nHc : C (pure a) cb\n⊢ LiftRel R (pure a) cb\n[PROOFSTEP]\nhave h := H Hc\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\n⊢ LiftRel R (think ca') cb\n[PROOFSTEP]\nhave h := H Hc\n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\ncb : Computation β\nHc : C (pure a) cb\nh : LiftRelAux R C (destruct (pure a)) (destruct cb)\n⊢ LiftRel R (pure a) cb\n[PROOFSTEP]\nsimp at h \n[GOAL]\ncase refine'_1\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\ncb : Computation β\nHc : C (pure a) cb\nh : ∃ b, b ∈ cb ∧ R a b\n⊢ LiftRel R (pure a) cb\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\nh : LiftRelAux R C (destruct (think ca')) (destruct cb)\n⊢ LiftRel R (think ca') cb\n[PROOFSTEP]\nsimp\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\nh : LiftRelAux R C (destruct (think ca')) (destruct cb)\n⊢ LiftRel R ca' cb\n[PROOFSTEP]\nrevert h\n[GOAL]\ncase refine'_2\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\n⊢ LiftRelAux R C (destruct (think ca')) (destruct cb) → LiftRel R ca' cb\n[PROOFSTEP]\napply cb.recOn (fun b => _) fun cb' => _\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\n⊢ ∀ (b : β), LiftRelAux R C (destruct (think ca')) (destruct (pure b)) → LiftRel R ca' (pure b)\n[PROOFSTEP]\nintros _ h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\n⊢ ∀ (cb' : Computation β), LiftRelAux R C (destruct (think ca')) (destruct (think cb')) → LiftRel R ca' (think cb')\n[PROOFSTEP]\nintros _ h\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\nb✝ : β\nh : LiftRelAux R C (destruct (think ca')) (destruct (pure b✝))\n⊢ LiftRel R ca' (pure b✝)\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\ncb'✝ : Computation β\nh : LiftRelAux R C (destruct (think ca')) (destruct (think cb'✝))\n⊢ LiftRel R ca' (think cb'✝)\n[PROOFSTEP]\nsimp at h \n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\nb✝ : β\nh : ∃ a, a ∈ ca' ∧ R a b✝\n⊢ LiftRel R ca' (pure b✝)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\ncb'✝ : Computation β\nh : C ca' cb'✝\n⊢ LiftRel R ca' (think cb'✝)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\nα : Type u\nβ : Type v\nγ : Type w\nR : α → β → Prop\nC : Computation α → Computation β → Prop\nH : ∀ {ca : Computation α} {cb : Computation β}, C ca cb → LiftRelAux R C (destruct ca) (destruct cb)\nca : Computation α\na : α\nha : a ∈ ca\nca' : Computation α\nIH : (fun ca => ∀ (cb : Computation β), C ca cb → LiftRel R ca cb) ca'\ncb : Computation β\nHc : C (think ca') cb\ncb'✝ : Computation β\nh : C ca' cb'✝\n⊢ LiftRel R ca' cb'✝\n[PROOFSTEP]\nexact IH _ h\n", "meta": {"mathlib_filename": "Mathlib.Data.Seq.Computation", "llama_tokens": 62856, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5813030761371503, "lm_q2_score": 0.4339814648038985, "lm_q1q2_score": 0.2522747604770126}}
{"text": "[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n⊢ (F ⊗⋙ H).ε ≫ NatTrans.app (NatTrans.mk src✝.app) (𝟙_ C) = (G ⊗⋙ K).ε\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n⊢ (H.ε ≫ H.map F.ε) ≫ NatTrans.app β.toNatTrans (F.obj (𝟙_ C)) ≫ K.map (NatTrans.app α.toNatTrans (𝟙_ C)) =\n    K.ε ≫ K.map G.ε\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n⊢ K.ε ≫ K.map F.ε ≫ K.map (NatTrans.app α.toNatTrans (𝟙_ C)) = K.ε ≫ K.map G.ε\n[PROOFSTEP]\nconv_lhs => rw [← K.toFunctor.map_comp, α.unit]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n| K.ε ≫ K.map F.ε ≫ K.map (NatTrans.app α.toNatTrans (𝟙_ C))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.unit]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n| K.ε ≫ K.map F.ε ≫ K.map (NatTrans.app α.toNatTrans (𝟙_ C))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.unit]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\n| K.ε ≫ K.map F.ε ≫ K.map (NatTrans.app α.toNatTrans (𝟙_ C))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.unit]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n⊢ LaxMonoidalFunctor.μ (F ⊗⋙ H) X Y ≫ NatTrans.app (NatTrans.mk src✝.app) (X ⊗ Y) =\n    (NatTrans.app (NatTrans.mk src✝.app) X ⊗ NatTrans.app (NatTrans.mk src✝.app) Y) ≫ LaxMonoidalFunctor.μ (G ⊗⋙ K) X Y\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n⊢ (LaxMonoidalFunctor.μ H (F.obj X) (F.obj Y) ≫ H.map (LaxMonoidalFunctor.μ F X Y)) ≫\n      NatTrans.app β.toNatTrans (F.obj (X ⊗ Y)) ≫ K.map (NatTrans.app α.toNatTrans (X ⊗ Y)) =\n    (NatTrans.app β.toNatTrans (F.obj X) ≫ K.map (NatTrans.app α.toNatTrans X) ⊗\n        NatTrans.app β.toNatTrans (F.obj Y) ≫ K.map (NatTrans.app α.toNatTrans Y)) ≫\n      LaxMonoidalFunctor.μ K (G.obj X) (G.obj Y) ≫ K.map (LaxMonoidalFunctor.μ G X Y)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n⊢ (NatTrans.app β.toNatTrans (F.obj X) ⊗ NatTrans.app β.toNatTrans (F.obj Y)) ≫\n      LaxMonoidalFunctor.μ K (F.obj X) (F.obj Y) ≫\n        K.map (LaxMonoidalFunctor.μ F X Y) ≫ K.map (NatTrans.app α.toNatTrans (X ⊗ Y)) =\n    (NatTrans.app β.toNatTrans (F.obj X) ⊗ NatTrans.app β.toNatTrans (F.obj Y)) ≫\n      LaxMonoidalFunctor.μ K (F.obj X) (F.obj Y) ≫\n        K.map (NatTrans.app α.toNatTrans X ⊗ NatTrans.app α.toNatTrans Y) ≫ K.map (LaxMonoidalFunctor.μ G X Y)\n[PROOFSTEP]\nconv_lhs => rw [← K.toFunctor.map_comp, α.tensor, K.toFunctor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n| (NatTrans.app β.toNatTrans (F.obj X) ⊗ NatTrans.app β.toNatTrans (F.obj Y)) ≫\n    LaxMonoidalFunctor.μ K (F.obj X) (F.obj Y) ≫\n      K.map (LaxMonoidalFunctor.μ F X Y) ≫ K.map (NatTrans.app α.toNatTrans (X ⊗ Y))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.tensor, K.toFunctor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n| (NatTrans.app β.toNatTrans (F.obj X) ⊗ NatTrans.app β.toNatTrans (F.obj Y)) ≫\n    LaxMonoidalFunctor.μ K (F.obj X) (F.obj Y) ≫\n      K.map (LaxMonoidalFunctor.μ F X Y) ≫ K.map (NatTrans.app α.toNatTrans (X ⊗ Y))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.tensor, K.toFunctor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁵ : Category.{v₁, u₁} C\ninst✝⁴ : MonoidalCategory C\nD : Type u₂\ninst✝³ : Category.{v₂, u₂} D\ninst✝² : MonoidalCategory D\nE : Type u₃\ninst✝¹ : Category.{v₃, u₃} E\ninst✝ : MonoidalCategory E\nF G : LaxMonoidalFunctor C D\nH K : LaxMonoidalFunctor D E\nα : MonoidalNatTrans F G\nβ : MonoidalNatTrans H K\nsrc✝ : F.toFunctor ⋙ H.toFunctor ⟶ G.toFunctor ⋙ K.toFunctor := α.toNatTrans ◫ β.toNatTrans\nX Y : C\n| (NatTrans.app β.toNatTrans (F.obj X) ⊗ NatTrans.app β.toNatTrans (F.obj Y)) ≫\n    LaxMonoidalFunctor.μ K (F.obj X) (F.obj Y) ≫\n      K.map (LaxMonoidalFunctor.μ F X Y) ≫ K.map (NatTrans.app α.toNatTrans (X ⊗ Y))\n[PROOFSTEP]\nrw [← K.toFunctor.map_comp, α.tensor, K.toFunctor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF G : LaxMonoidalFunctor C D\napp : (X : C) → F.obj X ≅ G.obj X\nnaturality' : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f\nunit' : F.ε ≫ (app (𝟙_ C)).hom = G.ε\ntensor' :\n  ∀ (X Y : C), LaxMonoidalFunctor.μ F X Y ≫ (app (X ⊗ Y)).hom = ((app X).hom ⊗ (app Y).hom) ≫ LaxMonoidalFunctor.μ G X Y\nsrc✝ : G.toFunctor ⟶ F.toFunctor := (NatIso.ofComponents app).inv\n⊢ G.ε ≫ NatTrans.app (NatTrans.mk fun X => (app X).inv) (𝟙_ C) = F.ε\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF G : LaxMonoidalFunctor C D\napp : (X : C) → F.obj X ≅ G.obj X\nnaturality' : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f\nunit' : F.ε ≫ (app (𝟙_ C)).hom = G.ε\ntensor' :\n  ∀ (X Y : C), LaxMonoidalFunctor.μ F X Y ≫ (app (X ⊗ Y)).hom = ((app X).hom ⊗ (app Y).hom) ≫ LaxMonoidalFunctor.μ G X Y\nsrc✝ : G.toFunctor ⟶ F.toFunctor := (NatIso.ofComponents app).inv\n⊢ G.ε ≫ (app (𝟙_ C)).inv = F.ε\n[PROOFSTEP]\nrw [← unit', assoc, Iso.hom_inv_id, comp_id]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF G : LaxMonoidalFunctor C D\napp : (X : C) → F.obj X ≅ G.obj X\nnaturality' : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f\nunit' : F.ε ≫ (app (𝟙_ C)).hom = G.ε\ntensor' :\n  ∀ (X Y : C), LaxMonoidalFunctor.μ F X Y ≫ (app (X ⊗ Y)).hom = ((app X).hom ⊗ (app Y).hom) ≫ LaxMonoidalFunctor.μ G X Y\nsrc✝ : G.toFunctor ⟶ F.toFunctor := (NatIso.ofComponents app).inv\nX Y : C\n⊢ LaxMonoidalFunctor.μ G X Y ≫ NatTrans.app (NatTrans.mk fun X => (app X).inv) (X ⊗ Y) =\n    (NatTrans.app (NatTrans.mk fun X => (app X).inv) X ⊗ NatTrans.app (NatTrans.mk fun X => (app X).inv) Y) ≫\n      LaxMonoidalFunctor.μ F X Y\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF G : LaxMonoidalFunctor C D\napp : (X : C) → F.obj X ≅ G.obj X\nnaturality' : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f\nunit' : F.ε ≫ (app (𝟙_ C)).hom = G.ε\ntensor' :\n  ∀ (X Y : C), LaxMonoidalFunctor.μ F X Y ≫ (app (X ⊗ Y)).hom = ((app X).hom ⊗ (app Y).hom) ≫ LaxMonoidalFunctor.μ G X Y\nsrc✝ : G.toFunctor ⟶ F.toFunctor := (NatIso.ofComponents app).inv\nX Y : C\n⊢ LaxMonoidalFunctor.μ G X Y ≫ (app (X ⊗ Y)).inv = ((app X).inv ⊗ (app Y).inv) ≫ LaxMonoidalFunctor.μ F X Y\n[PROOFSTEP]\nrw [Iso.comp_inv_eq, assoc, tensor', ← tensor_comp_assoc, Iso.inv_hom_id, Iso.inv_hom_id, tensor_id, id_comp]\n[GOAL]\nC : Type u₁\ninst✝³ : Category.{v₁, u₁} C\ninst✝² : MonoidalCategory C\nD : Type u₂\ninst✝¹ : Category.{v₂, u₂} D\ninst✝ : MonoidalCategory D\nF G : LaxMonoidalFunctor C D\napp : (X : C) → F.obj X ≅ G.obj X\nnaturality : ∀ {X Y : C} (f : X ⟶ Y), F.map f ≫ (app Y).hom = (app X).hom ≫ G.map f\nunit : F.ε ≫ (app (𝟙_ C)).hom = G.ε\ntensor :\n  ∀ (X Y : C), LaxMonoidalFunctor.μ F X Y ≫ (app (X ⊗ Y)).hom = ((app X).hom ⊗ (app Y).hom) ≫ LaxMonoidalFunctor.μ G X Y\nX : C\n⊢ NatTrans.app (ofComponents app naturality unit tensor).inv.toNatTrans X = (app X).inv\n[PROOFSTEP]\nsimp [ofComponents]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ LaxMonoidalFunctor.μ (LaxMonoidalFunctor.id C) X Y ≫ NatTrans.app (Equivalence.unit e) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit e) X ⊗ NatTrans.app (Equivalence.unit e) Y) ≫\n      LaxMonoidalFunctor.μ (F.toLaxMonoidalFunctor ⊗⋙ (monoidalInverse F).toLaxMonoidalFunctor) X Y\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ 𝟙 (X ⊗ Y) ≫ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      ↑(Adjunction.homEquiv (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1))\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n                (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y))\n              (F.obj X ⊗ F.obj Y))\n          (inv\n              (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X))\n                ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y))) ≫\n            (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj X) ⊗\n              NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj Y))) ≫\n        (Functor.inv F.toLaxMonoidalFunctor.1).map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y)\n[PROOFSTEP]\nsimp only [Adjunction.homEquiv_unit, Adjunction.homEquiv_naturality_right, id_comp, assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n          ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n            (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n        (Functor.inv F.toLaxMonoidalFunctor.1).map\n            (inv\n                (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X))\n                  ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y))) ≫\n              (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj X) ⊗\n                NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj Y))) ≫\n          (Functor.inv F.toLaxMonoidalFunctor.1).map (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y)\n[PROOFSTEP]\nsimp only [← Functor.map_comp, assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n          ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n            (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n        (Functor.inv F.toLaxMonoidalFunctor.1).map\n          (inv\n              (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X))\n                ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y))) ≫\n            (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj X) ⊗\n                NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit (F.obj Y)) ≫\n              LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor X Y)\n[PROOFSTEP]\nerw [e.counit_app_functor, e.counit_app_functor, F.toLaxMonoidalFunctor.μ_natural, IsIso.inv_hom_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n          ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n            (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n        (Functor.inv F.toLaxMonoidalFunctor.1).map\n          (F.map (NatTrans.app (Equivalence.unitInv e) X ⊗ NatTrans.app (Equivalence.unitInv e) Y))\n[PROOFSTEP]\nsimp only [CategoryTheory.IsEquivalence.inv_fun_map]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n          ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n            (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n        NatTrans.app (Equivalence.unitInv (asEquivalence F.toLaxMonoidalFunctor.1))\n            (((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj X ⊗\n              ((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj Y) ≫\n          (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n              NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y) ≫\n            NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) ((𝟭 C).obj X ⊗ (𝟭 C).obj Y)\n[PROOFSTEP]\nslice_rhs 2 3 => erw [Iso.hom_inv_id_app]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n      ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toLaxMonoidalFunctor.1))\n      (((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj X ⊗\n        ((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj Y)\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y\ncase a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) ((𝟭 C).obj X ⊗ (𝟭 C).obj Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [Iso.hom_inv_id_app]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n      ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toLaxMonoidalFunctor.1))\n      (((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj X ⊗\n        ((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj Y)\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y\ncase a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) ((𝟭 C).obj X ⊗ (𝟭 C).obj Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [Iso.hom_inv_id_app]\n[GOAL]\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n      ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toLaxMonoidalFunctor.1))\n      (((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj X ⊗\n        ((asEquivalence F.toFunctor).functor ⋙ (asEquivalence F.toFunctor).inverse).obj Y)\ncase a.a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y\ncase a.a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) ((𝟭 C).obj X ⊗ (𝟭 C).obj Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n    NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [Iso.hom_inv_id_app]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      (𝟙\n            ((𝟭 C).obj\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗\n                (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y))) ≫\n          (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n            NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y)) ≫\n        NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) ((𝟭 C).obj X ⊗ (𝟭 C).obj Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      (𝟙 ((Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj X) ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj (F.obj Y)) ≫\n          (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n            NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y)) ≫\n        NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\nsimp only [CategoryTheory.Category.id_comp]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n      (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n          NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y) ≫\n        NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\nslice_rhs 1 2 =>\n  rw [← tensor_comp, Iso.hom_inv_id_app, Iso.hom_inv_id_app]\n  dsimp\n  rw [tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n    (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\n  rw [← tensor_comp, Iso.hom_inv_id_app, Iso.hom_inv_id_app]\n  dsimp\n  rw [tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n    (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\n  rw [← tensor_comp, Iso.hom_inv_id_app, Iso.hom_inv_id_app]\n  dsimp\n  rw [tensor_id]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) Y) ≫\n    (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor)) Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\nrw [← tensor_comp, Iso.hom_inv_id_app, Iso.hom_inv_id_app]\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| 𝟙 ((𝟭 C).obj X) ⊗ 𝟙 ((𝟭 C).obj Y)\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| 𝟙 X ⊗ 𝟙 Y\ncase a\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n| NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\nrw [tensor_id]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : C\n⊢ NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    𝟙 (X ⊗ Y) ≫ NatTrans.app (Equivalence.unit (asEquivalence F.toLaxMonoidalFunctor.1)) (X ⊗ Y)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ ∀ (X : C), IsIso (NatTrans.app (monoidalUnit F).toNatTrans X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ ∀ (X : C), IsIso (NatTrans.app (Equivalence.unit (asEquivalence F.toFunctor)) X)\n[PROOFSTEP]\ninfer_instance\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\n⊢ ((monoidalInverse F).toLaxMonoidalFunctor ⊗⋙ F.toLaxMonoidalFunctor).ε ≫ NatTrans.app (Equivalence.counit e) (𝟙_ D) =\n    (LaxMonoidalFunctor.id D).ε\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\n⊢ (F.ε ≫\n        F.map\n          (↑(Adjunction.homEquiv (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)) (𝟙_ C) (𝟙_ D))\n            (inv F.ε))) ≫\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D) =\n    𝟙 (𝟙_ D)\n[PROOFSTEP]\nsimp only [comp_id, assoc, Functor.map_inv, Functor.map_comp, NatIso.inv_inv_app, IsIso.inv_comp,\n  IsEquivalence.fun_inv_map, Adjunction.homEquiv_unit]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\n⊢ F.ε ≫\n      F.map (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit (𝟙_ C)) ≫\n        NatTrans.app (asEquivalence F.toFunctor).counitIso.hom (F.obj (𝟙_ C)) ≫\n          inv F.ε ≫\n            inv (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D)) ≫\n              NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D) =\n    𝟙 (𝟙_ D)\n[PROOFSTEP]\nerw [e.counit_app_functor, ← e.functor.map_comp_assoc, Iso.hom_inv_id_app]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\n⊢ F.ε ≫\n      e.functor.map (𝟙 ((𝟭 C).obj (𝟙_ C))) ≫\n        inv F.ε ≫\n          inv (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D) =\n    𝟙 (𝟙_ D)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\n⊢ F.ε ≫\n      F.map (𝟙 (𝟙_ C)) ≫\n        inv F.ε ≫\n          inv (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (𝟙_ D) =\n    𝟙 (𝟙_ D)\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ ((monoidalInverse F).toLaxMonoidalFunctor ⊗⋙ F.toLaxMonoidalFunctor) X Y ≫\n      NatTrans.app (Equivalence.counit e) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.counit e) X ⊗ NatTrans.app (Equivalence.counit e) Y) ≫\n      LaxMonoidalFunctor.μ (LaxMonoidalFunctor.id D) X Y\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n          ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n        F.map\n          (↑(Adjunction.homEquiv (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1))\n                ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y) (X ⊗ Y))\n            (inv\n                (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n                  ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y)))) ≫\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n        NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y) ≫\n      𝟙 (X ⊗ Y)\n[PROOFSTEP]\nsimp only [Adjunction.homEquiv_unit, Adjunction.homEquiv_naturality_right, assoc, comp_id, Functor.map_comp]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      F.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n            ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        F.map\n            ((Functor.inv F.toLaxMonoidalFunctor.1).map\n              (inv\n                (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n                  ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)))) ≫\n          F.map\n              ((Functor.inv F.toLaxMonoidalFunctor.1).map\n                (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                  NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nsimp only [IsEquivalence.fun_inv_map]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      F.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n            ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor))\n              (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n            inv\n                (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n                  ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y))) ≫\n          (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                  NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n                NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor)) (X ⊗ Y)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [e.counit_app_functor]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      F.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n            ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        (e.functor.map\n              (NatTrans.app (Equivalence.unitInv e)\n                ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n            inv\n                (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n                  ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y))) ≫\n          (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                  NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n                NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor)) (X ⊗ Y)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nsimp only [assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      F.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n            ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        (asEquivalence F.toFunctor).functor.map\n            (NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor))\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n          inv\n              (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n                ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n            NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor))\n                  (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                    F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n                (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                    NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n                  NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor)) (X ⊗ Y) ≫\n                    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [← e.functor.map_comp_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      e.functor.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n            NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor))\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        inv\n            (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n          NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor))\n              (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n            NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor))\n                (F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj X) ⊗\n                  F.obj ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n              (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n                  NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n                NatTrans.app (Equivalence.counitInv (asEquivalence F.toFunctor)) (X ⊗ Y) ≫\n                  NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) (X ⊗ Y) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nsimp only [CategoryTheory.Iso.inv_hom_id_app, CategoryTheory.Iso.inv_hom_id_app_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      (asEquivalence F.toFunctor).functor.map\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).unit\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n            NatTrans.app (Equivalence.unitInv (asEquivalence F.toFunctor))\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        inv\n            (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n              NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n            𝟙 ((𝟭 D).obj (X ⊗ Y)) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [Iso.hom_inv_id_app, CategoryTheory.Functor.map_id]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n        ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y) ≫\n      𝟙\n          ((asEquivalence F.toFunctor).functor.obj\n            ((Functor.inv F.toLaxMonoidalFunctor.1).obj X ⊗ (Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n        inv\n            (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor ((Functor.inv F.toLaxMonoidalFunctor.1).obj X)\n              ((Functor.inv F.toLaxMonoidalFunctor.1).obj Y)) ≫\n          (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n              NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n            𝟙 ((𝟭 D).obj (X ⊗ Y)) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nsimp only [id_comp, CategoryTheory.Iso.inv_hom_id_app, CategoryTheory.IsIso.hom_inv_id_assoc]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ (NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n        NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y) ≫\n      𝟙 ((𝟭 D).obj (X ⊗ Y)) =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nerw [comp_id]\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\ne : C ≌ D := asEquivalence F.toFunctor\nX Y : D\n⊢ NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit X ⊗\n      NatTrans.app (Equivalence.toAdjunction (asEquivalence F.toLaxMonoidalFunctor.1)).counit Y =\n    NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X ⊗\n      NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) Y\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ ∀ (X : D), IsIso (NatTrans.app (monoidalCounit F).toNatTrans X)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u₁\ninst✝⁴ : Category.{v₁, u₁} C\ninst✝³ : MonoidalCategory C\nD : Type u₂\ninst✝² : Category.{v₂, u₂} D\ninst✝¹ : MonoidalCategory D\nF : MonoidalFunctor C D\ninst✝ : IsEquivalence F.toFunctor\n⊢ ∀ (X : D), IsIso (NatTrans.app (Equivalence.counit (asEquivalence F.toFunctor)) X)\n[PROOFSTEP]\ninfer_instance\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.NaturalTransformation", "llama_tokens": 23044, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5660185205547239, "lm_q2_score": 0.4455295350395727, "lm_q1q2_score": 0.252177968286533}}
{"text": "[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | hs)\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\nf' : E → E →L[ℝ] F\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      ∅ ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (∅ ∩ t n) (r (A n))) ∧\n          (Set.Nonempty ∅ → ∀ (n : ℕ), ∃ y, y ∈ ∅ ∧ A n = f' y)\n[PROOFSTEP]\nrefine' ⟨fun _ => ∅, fun _ => 0, _, _, _, _⟩\n[GOAL]\ncase inl.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\nf' : E → E →L[ℝ] F\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\n⊢ ∀ (n : ℕ), IsClosed ((fun x => ∅) n)\n[PROOFSTEP]\nsimp\n  -- we will use countably many linear maps. Select these from all the derivatives since the\n    -- space of linear maps is second-countable\n[GOAL]\ncase inl.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\nf' : E → E →L[ℝ] F\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\n⊢ ∅ ⊆ ⋃ (n : ℕ), (fun x => ∅) n\n[PROOFSTEP]\nsimp\n  -- we will use countably many linear maps. Select these from all the derivatives since the\n    -- space of linear maps is second-countable\n[GOAL]\ncase inl.refine'_3\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\nf' : E → E →L[ℝ] F\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\n⊢ ∀ (n : ℕ), ApproximatesLinearOn f ((fun x => 0) n) (∅ ∩ (fun x => ∅) n) (r ((fun x => 0) n))\n[PROOFSTEP]\nsimp\n  -- we will use countably many linear maps. Select these from all the derivatives since the\n    -- space of linear maps is second-countable\n[GOAL]\ncase inl.refine'_4\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\nf' : E → E →L[ℝ] F\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\n⊢ Set.Nonempty ∅ → ∀ (n : ℕ), ∃ y, y ∈ ∅ ∧ (fun x => 0) n = f' y\n[PROOFSTEP]\nsimp\n  -- we will use countably many linear maps. Select these from all the derivatives since the\n    -- space of linear maps is second-countable\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nobtain ⟨T, T_count, hT⟩ :\n  ∃ T : Set s, T.Countable ∧ ⋃ x ∈ T, ball (f' (x : E)) (r (f' x)) = ⋃ x : s, ball (f' x) (r (f' x)) :=\n  TopologicalSpace.isOpen_iUnion_countable _ fun x => isOpen_ball\n[GOAL]\ncase inr.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nobtain ⟨u, _, u_pos, u_lim⟩ : ∃ u : ℕ → ℝ, StrictAnti u ∧ (∀ n : ℕ, 0 < u n) ∧ Tendsto u atTop (𝓝 0) :=\n  exists_seq_strictAnti_tendsto\n    (0 : ℝ)\n      -- `M n z` is the set of points `x` such that `f y - f x` is close to `f' z (y - x)` for `y`\n        -- in the ball of radius `u n` around `x`.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nlet M : ℕ → T → Set E := fun n z =>\n  {x | x ∈ s ∧ ∀ y ∈ s ∩ ball x (u n), ‖f y - f x - f' z (y - x)‖ ≤ r (f' z) * ‖y - x‖}\n    -- As `f` is differentiable everywhere on `s`, the sets `M n z` cover `s` by design.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nhave s_subset : ∀ x ∈ s, ∃ (n : ℕ) (z : T), x ∈ M n z :=\n  by\n  intro x xs\n  obtain ⟨z, zT, hz⟩ : ∃ z ∈ T, f' x ∈ ball (f' (z : E)) (r (f' z)) :=\n    by\n    have : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) :=\n      by\n      rw [hT]\n      refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩\n      simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt\n    rwa [mem_iUnion₂, bex_def] at this \n  obtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ ‖f' x - f' z‖ + ε ≤ r (f' z) :=\n    by\n    refine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩\n    simpa only [sub_pos] using mem_ball_iff_norm.mp hz\n  obtain ⟨δ, δpos, hδ⟩ : ∃ (δ : ℝ), 0 < δ ∧ ball x δ ∩ s ⊆ {y | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=\n    Metric.mem_nhdsWithin_iff.1 (IsLittleO.def (hf' x xs) εpos)\n  obtain ⟨n, hn⟩ : ∃ n, u n < δ := ((tendsto_order.1 u_lim).2 _ δpos).exists\n  refine' ⟨n, ⟨z, zT⟩, ⟨xs, _⟩⟩\n  intro y hy\n  calc\n    ‖f y - f x - (f' z) (y - x)‖ = ‖f y - f x - (f' x) (y - x) + (f' x - f' z) (y - x)‖ :=\n      by\n      congr 1\n      simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]\n      abel\n    _ ≤ ‖f y - f x - (f' x) (y - x)‖ + ‖(f' x - f' z) (y - x)‖ := (norm_add_le _ _)\n    _ ≤ ε * ‖y - x‖ + ‖f' x - f' z‖ * ‖y - x‖ :=\n      by\n      refine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)\n      rw [inter_comm]\n      exact inter_subset_inter_right _ (ball_subset_ball hn.le) hy\n    _ ≤ r (f' z) * ‖y - x‖ := by\n      rw [← add_mul, add_comm]\n      exact\n        mul_le_mul_of_nonneg_right hε\n          (norm_nonneg _)\n            -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly\n              -- closed\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\n⊢ ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\n[PROOFSTEP]\nintro x xs\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\n⊢ ∃ n z, x ∈ M n z\n[PROOFSTEP]\nobtain ⟨z, zT, hz⟩ : ∃ z ∈ T, f' x ∈ ball (f' (z : E)) (r (f' z)) :=\n  by\n  have : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) := by\n    rw [hT]\n    refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩\n    simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt\n  rwa [mem_iUnion₂, bex_def] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\n⊢ ∃ z, z ∈ T ∧ f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n[PROOFSTEP]\nhave : f' x ∈ ⋃ z ∈ T, ball (f' (z : E)) (r (f' z)) := by\n  rw [hT]\n  refine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩\n  simpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\n⊢ f' x ∈ ⋃ (z : ↑s) (_ : z ∈ T), ball (f' ↑z) ↑(r (f' ↑z))\n[PROOFSTEP]\nrw [hT]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\n⊢ f' x ∈ ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\n[PROOFSTEP]\nrefine' mem_iUnion.2 ⟨⟨x, xs⟩, _⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\n⊢ f' x ∈ ball (f' ↑{ val := x, property := xs }) ↑(r (f' ↑{ val := x, property := xs }))\n[PROOFSTEP]\nsimpa only [mem_ball, Subtype.coe_mk, dist_self] using (rpos (f' x)).bot_lt\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nthis : f' x ∈ ⋃ (z : ↑s) (_ : z ∈ T), ball (f' ↑z) ↑(r (f' ↑z))\n⊢ ∃ z, z ∈ T ∧ f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n[PROOFSTEP]\nrwa [mem_iUnion₂, bex_def] at this \n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n⊢ ∃ n z, x ∈ M n z\n[PROOFSTEP]\nobtain ⟨ε, εpos, hε⟩ : ∃ ε : ℝ, 0 < ε ∧ ‖f' x - f' z‖ + ε ≤ r (f' z) :=\n  by\n  refine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩\n  simpa only [sub_pos] using mem_ball_iff_norm.mp hz\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n⊢ ∃ ε, 0 < ε ∧ ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\n[PROOFSTEP]\nrefine' ⟨r (f' z) - ‖f' x - f' z‖, _, le_of_eq (by abel)⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n⊢ ‖f' x - f' ↑z‖ + (↑(r (f' ↑z)) - ‖f' x - f' ↑z‖) = ↑(r (f' ↑z))\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n⊢ ‖f' x - f' ↑z‖ + (↑(r (f' ↑z)) - ‖f' x - f' ↑z‖) = ↑(r (f' ↑z))\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\n⊢ 0 < ↑(r (f' ↑z)) - ‖f' x - f' ↑z‖\n[PROOFSTEP]\nsimpa only [sub_pos] using mem_ball_iff_norm.mp hz\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\n⊢ ∃ n z, x ∈ M n z\n[PROOFSTEP]\nobtain ⟨δ, δpos, hδ⟩ : ∃ (δ : ℝ), 0 < δ ∧ ball x δ ∩ s ⊆ {y | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=\n  Metric.mem_nhdsWithin_iff.1 (IsLittleO.def (hf' x xs) εpos)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\n⊢ ∃ n z, x ∈ M n z\n[PROOFSTEP]\nobtain ⟨n, hn⟩ : ∃ n, u n < δ := ((tendsto_order.1 u_lim).2 _ δpos).exists\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\n⊢ ∃ n z, x ∈ M n z\n[PROOFSTEP]\nrefine' ⟨n, ⟨z, zT⟩, ⟨xs, _⟩⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\n⊢ ∀ (y : E),\n    y ∈ s ∩ ball x (u n) →\n      ‖f y - f x - ↑(f' ↑↑{ val := z, property := zT }) (y - x)‖ ≤ ↑(r (f' ↑↑{ val := z, property := zT })) * ‖y - x‖\n[PROOFSTEP]\nintro y hy\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ ‖f y - f x - ↑(f' ↑↑{ val := z, property := zT }) (y - x)‖ ≤ ↑(r (f' ↑↑{ val := z, property := zT })) * ‖y - x‖\n[PROOFSTEP]\ncalc\n  ‖f y - f x - (f' z) (y - x)‖ = ‖f y - f x - (f' x) (y - x) + (f' x - f' z) (y - x)‖ :=\n    by\n    congr 1\n    simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]\n    abel\n  _ ≤ ‖f y - f x - (f' x) (y - x)‖ + ‖(f' x - f' z) (y - x)‖ := (norm_add_le _ _)\n  _ ≤ ε * ‖y - x‖ + ‖f' x - f' z‖ * ‖y - x‖ :=\n    by\n    refine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)\n    rw [inter_comm]\n    exact inter_subset_inter_right _ (ball_subset_ball hn.le) hy\n  _ ≤ r (f' z) * ‖y - x‖ := by\n    rw [← add_mul, add_comm]\n    exact\n      mul_le_mul_of_nonneg_right hε\n        (norm_nonneg _)\n          -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly\n            -- closed\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ ‖f y - f x - ↑(f' ↑z) (y - x)‖ = ‖f y - f x - ↑(f' x) (y - x) + ↑(f' x - f' ↑z) (y - x)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ f y - f x - ↑(f' ↑z) (y - x) = f y - f x - ↑(f' x) (y - x) + ↑(f' x - f' ↑z) (y - x)\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ f y - f x - (↑(f' ↑z) y - ↑(f' ↑z) x) =\n    f y - f x - (↑(f' x) y - ↑(f' x) x) + (↑(f' x) y - ↑(f' ↑z) y - (↑(f' x) x - ↑(f' ↑z) x))\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ f y - f x - (↑(f' ↑z) y - ↑(f' ↑z) x) =\n    f y - f x - (↑(f' x) y - ↑(f' x) x) + (↑(f' x) y - ↑(f' ↑z) y - (↑(f' x) x - ↑(f' ↑z) x))\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ ‖f y - f x - ↑(f' x) (y - x)‖ + ‖↑(f' x - f' ↑z) (y - x)‖ ≤ ε * ‖y - x‖ + ‖f' x - f' ↑z‖ * ‖y - x‖\n[PROOFSTEP]\nrefine' add_le_add (hδ _) (ContinuousLinearMap.le_op_norm _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ y ∈ ball x δ ∩ s\n[PROOFSTEP]\nrw [inter_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ y ∈ s ∩ ball x δ\n[PROOFSTEP]\nexact inter_subset_inter_right _ (ball_subset_ball hn.le) hy\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ ε * ‖y - x‖ + ‖f' x - f' ↑z‖ * ‖y - x‖ ≤ ↑(r (f' ↑z)) * ‖y - x‖\n[PROOFSTEP]\nrw [← add_mul, add_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\nx : E\nxs : x ∈ s\nz : ↑s\nzT : z ∈ T\nhz : f' x ∈ ball (f' ↑z) ↑(r (f' ↑z))\nε : ℝ\nεpos : 0 < ε\nhε : ‖f' x - f' ↑z‖ + ε ≤ ↑(r (f' ↑z))\nδ : ℝ\nδpos : 0 < δ\nhδ : ball x δ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nn : ℕ\nhn : u n < δ\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ (‖f' x - f' ↑z‖ + ε) * ‖y - x‖ ≤ ↑(r (f' ↑z)) * ‖y - x‖\n[PROOFSTEP]\nexact\n  mul_le_mul_of_nonneg_right hε\n    (norm_nonneg _)\n      -- the sets `M n z` are relatively closed in `s`, as all the conditions defining it are clearly\n        -- closed\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nhave closure_M_subset : ∀ n z, s ∩ closure (M n z) ⊆ M n z :=\n  by\n  rintro n z x ⟨xs, hx⟩\n  refine' ⟨xs, fun y hy => _⟩\n  obtain ⟨a, aM, a_lim⟩ : ∃ a : ℕ → E, (∀ k, a k ∈ M n z) ∧ Tendsto a atTop (𝓝 x) := mem_closure_iff_seq_limit.1 hx\n  have L1 : Tendsto (fun k : ℕ => ‖f y - f (a k) - (f' z) (y - a k)‖) atTop (𝓝 ‖f y - f x - (f' z) (y - x)‖) :=\n    by\n    apply Tendsto.norm\n    have L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=\n      by\n      apply (hf' x xs).continuousWithinAt.tendsto.comp\n      apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim\n      exact eventually_of_forall fun k => (aM k).1\n    apply Tendsto.sub (tendsto_const_nhds.sub L)\n    exact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)\n  have L2 : Tendsto (fun k : ℕ => (r (f' z) : ℝ) * ‖y - a k‖) atTop (𝓝 (r (f' z) * ‖y - x‖)) :=\n    (tendsto_const_nhds.sub a_lim).norm.const_mul _\n  have I : ∀ᶠ k in atTop, ‖f y - f (a k) - (f' z) (y - a k)‖ ≤ r (f' z) * ‖y - a k‖ :=\n    by\n    have L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim\n    filter_upwards [(tendsto_order.1 L).2 _ hy.2]\n    intro k hk\n    exact (aM k).2 y ⟨hy.1, hk⟩\n  exact le_of_tendsto_of_tendsto L1 L2 I\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\n⊢ ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\n[PROOFSTEP]\nrintro n z x ⟨xs, hx⟩\n[GOAL]\ncase intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\n⊢ x ∈ M n z\n[PROOFSTEP]\nrefine' ⟨xs, fun y hy => _⟩\n[GOAL]\ncase intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\n⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖\n[PROOFSTEP]\nobtain ⟨a, aM, a_lim⟩ : ∃ a : ℕ → E, (∀ k, a k ∈ M n z) ∧ Tendsto a atTop (𝓝 x) := mem_closure_iff_seq_limit.1 hx\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖\n[PROOFSTEP]\nhave L1 : Tendsto (fun k : ℕ => ‖f y - f (a k) - (f' z) (y - a k)‖) atTop (𝓝 ‖f y - f x - (f' z) (y - x)‖) :=\n  by\n  apply Tendsto.norm\n  have L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=\n    by\n    apply (hf' x xs).continuousWithinAt.tendsto.comp\n    apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim\n    exact eventually_of_forall fun k => (aM k).1\n  apply Tendsto.sub (tendsto_const_nhds.sub L)\n  exact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\n[PROOFSTEP]\napply Tendsto.norm\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ Tendsto (fun x => f y - f (a x) - ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (f y - f x - ↑(f' ↑↑z) (y - x)))\n[PROOFSTEP]\nhave L : Tendsto (fun k => f (a k)) atTop (𝓝 (f x)) :=\n  by\n  apply (hf' x xs).continuousWithinAt.tendsto.comp\n  apply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim\n  exact eventually_of_forall fun k => (aM k).1\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ Tendsto (fun k => f (a k)) atTop (𝓝 (f x))\n[PROOFSTEP]\napply (hf' x xs).continuousWithinAt.tendsto.comp\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ Tendsto (fun k => a k) atTop (𝓝[s] x)\n[PROOFSTEP]\napply tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _ a_lim\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\n⊢ ∀ᶠ (x : ℕ) in atTop, a x ∈ s\n[PROOFSTEP]\nexact eventually_of_forall fun k => (aM k).1\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL : Tendsto (fun k => f (a k)) atTop (𝓝 (f x))\n⊢ Tendsto (fun x => f y - f (a x) - ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (f y - f x - ↑(f' ↑↑z) (y - x)))\n[PROOFSTEP]\napply Tendsto.sub (tendsto_const_nhds.sub L)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL : Tendsto (fun k => f (a k)) atTop (𝓝 (f x))\n⊢ Tendsto (fun x => ↑(f' ↑↑z) (y - a x)) atTop (𝓝 (↑(f' ↑↑z) (y - x)))\n[PROOFSTEP]\nexact ((f' z).continuous.tendsto _).comp (tendsto_const_nhds.sub a_lim)\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\n⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖\n[PROOFSTEP]\nhave L2 : Tendsto (fun k : ℕ => (r (f' z) : ℝ) * ‖y - a k‖) atTop (𝓝 (r (f' z) * ‖y - x‖)) :=\n  (tendsto_const_nhds.sub a_lim).norm.const_mul _\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\n⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖\n[PROOFSTEP]\nhave I : ∀ᶠ k in atTop, ‖f y - f (a k) - (f' z) (y - a k)‖ ≤ r (f' z) * ‖y - a k‖ :=\n  by\n  have L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim\n  filter_upwards [(tendsto_order.1 L).2 _ hy.2]\n  intro k hk\n  exact (aM k).2 y ⟨hy.1, hk⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\n⊢ ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖\n[PROOFSTEP]\nhave L : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x)) := tendsto_const_nhds.dist a_lim\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\nL : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))\n⊢ ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖\n[PROOFSTEP]\nfilter_upwards [(tendsto_order.1 L).2 _ hy.2]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\nL : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))\n⊢ ∀ (a_1 : ℕ), dist y (a a_1) < u n → ‖f y - f (a a_1) - ↑(f' ↑↑z) (y - a a_1)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a a_1‖\n[PROOFSTEP]\nintro k hk\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\nL : Tendsto (fun k => dist y (a k)) atTop (𝓝 (dist y x))\nk : ℕ\nhk : dist y (a k) < u n\n⊢ ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖\n[PROOFSTEP]\nexact (aM k).2 y ⟨hy.1, hk⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nn : ℕ\nz : ↑T\nx : E\nxs : x ∈ s\nhx : x ∈ closure (M n z)\ny : E\nhy : y ∈ s ∩ ball x (u n)\na : ℕ → E\naM : ∀ (k : ℕ), a k ∈ M n z\na_lim : Tendsto a atTop (𝓝 x)\nL1 : Tendsto (fun k => ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖) atTop (𝓝 ‖f y - f x - ↑(f' ↑↑z) (y - x)‖)\nL2 : Tendsto (fun k => ↑(r (f' ↑↑z)) * ‖y - a k‖) atTop (𝓝 (↑(r (f' ↑↑z)) * ‖y - x‖))\nI : ∀ᶠ (k : ℕ) in atTop, ‖f y - f (a k) - ↑(f' ↑↑z) (y - a k)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - a k‖\n⊢ ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖\n[PROOFSTEP]\nexact le_of_tendsto_of_tendsto L1 L2 I\n[GOAL]\ncase inr.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nrcases TopologicalSpace.exists_dense_seq E with\n  ⟨d, hd⟩\n    -- split `M n z` into subsets `K n z p` of small diameters by intersecting with the ball\n      -- `closedBall (d p) (u n / 3)`.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nlet K : ℕ → T → ℕ → Set E := fun n z p =>\n  closure (M n z) ∩\n    closedBall (d p)\n      (u n / 3)\n        -- on the sets `K n z p`, the map `f` is well approximated by `f' z` by design.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nhave K_approx : ∀ (n) (z : T) (p), ApproximatesLinearOn f (f' z) (s ∩ K n z p) (r (f' z)) :=\n  by\n  intro n z p x hx y hy\n  have yM : y ∈ M n z := closure_M_subset _ _ ⟨hy.1, hy.2.1⟩\n  refine' yM.2 _ ⟨hx.1, _⟩\n  calc\n    dist x y ≤ dist x (d p) + dist y (d p) := dist_triangle_right _ _ _\n    _ ≤ u n / 3 + u n / 3 := (add_le_add hx.2.2 hy.2.2)\n    _ < u n := by\n      linarith [u_pos n]\n        -- the sets `K n z p` are also closed, again by design.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\n⊢ ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\n[PROOFSTEP]\nintro n z p x hx y hy\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nn : ℕ\nz : ↑T\np : ℕ\nx : E\nhx : x ∈ s ∩ K n z p\ny : E\nhy : y ∈ s ∩ K n z p\n⊢ ‖f x - f y - ↑(f' ↑↑z) (x - y)‖ ≤ ↑(r (f' ↑↑z)) * ‖x - y‖\n[PROOFSTEP]\nhave yM : y ∈ M n z := closure_M_subset _ _ ⟨hy.1, hy.2.1⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nn : ℕ\nz : ↑T\np : ℕ\nx : E\nhx : x ∈ s ∩ K n z p\ny : E\nhy : y ∈ s ∩ K n z p\nyM : y ∈ M n z\n⊢ ‖f x - f y - ↑(f' ↑↑z) (x - y)‖ ≤ ↑(r (f' ↑↑z)) * ‖x - y‖\n[PROOFSTEP]\nrefine' yM.2 _ ⟨hx.1, _⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nn : ℕ\nz : ↑T\np : ℕ\nx : E\nhx : x ∈ s ∩ K n z p\ny : E\nhy : y ∈ s ∩ K n z p\nyM : y ∈ M n z\n⊢ x ∈ ball y (u n)\n[PROOFSTEP]\ncalc\n  dist x y ≤ dist x (d p) + dist y (d p) := dist_triangle_right _ _ _\n  _ ≤ u n / 3 + u n / 3 := (add_le_add hx.2.2 hy.2.2)\n  _ < u n := by\n    linarith [u_pos n]\n      -- the sets `K n z p` are also closed, again by design.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nn : ℕ\nz : ↑T\np : ℕ\nx : E\nhx : x ∈ s ∩ K n z p\ny : E\nhy : y ∈ s ∩ K n z p\nyM : y ∈ M n z\n⊢ u n / 3 + u n / 3 < u n\n[PROOFSTEP]\nlinarith [u_pos n]\n  -- the sets `K n z p` are also closed, again by design.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nhave K_closed : ∀ (n) (z : T) (p), IsClosed (K n z p) := fun n z p => isClosed_closure.inter isClosed_ball\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nobtain ⟨F, hF⟩ : ∃ F : ℕ → ℕ × T × ℕ, Function.Surjective F :=\n  by\n  haveI : Encodable T := T_count.toEncodable\n  have : Nonempty T := by\n    rcases eq_empty_or_nonempty T with (rfl | hT)\n    · rcases hs with ⟨x, xs⟩\n      rcases s_subset x xs with ⟨n, z, _⟩\n      exact False.elim z.2\n    · exact hT.coe_sort\n  inhabit ↥T\n  exact\n    ⟨_, Encodable.surjective_decode_iget (ℕ × T × ℕ)⟩\n      -- these sets `t q = K n z p` will do\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\n⊢ ∃ F, Function.Surjective F\n[PROOFSTEP]\nhaveI : Encodable T := T_count.toEncodable\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑T\n⊢ ∃ F, Function.Surjective F\n[PROOFSTEP]\nhave : Nonempty T := by\n  rcases eq_empty_or_nonempty T with (rfl | hT)\n  · rcases hs with ⟨x, xs⟩\n    rcases s_subset x xs with ⟨n, z, _⟩\n    exact False.elim z.2\n  · exact hT.coe_sort\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑T\n⊢ Nonempty ↑T\n[PROOFSTEP]\nrcases eq_empty_or_nonempty T with (rfl | hT)\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nd : ℕ → E\nhd : DenseRange d\nT_count : Set.Countable ∅\nhT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nM : ℕ → ↑∅ → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z\nK : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑∅\n⊢ Nonempty ↑∅\n[PROOFSTEP]\nrcases hs with ⟨x, xs⟩\n[GOAL]\ncase inl.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nd : ℕ → E\nhd : DenseRange d\nT_count : Set.Countable ∅\nhT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nM : ℕ → ↑∅ → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z\nK : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑∅\nx : E\nxs : x ∈ s\n⊢ Nonempty ↑∅\n[PROOFSTEP]\nrcases s_subset x xs with ⟨n, z, _⟩\n[GOAL]\ncase inl.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nd : ℕ → E\nhd : DenseRange d\nT_count : Set.Countable ∅\nhT : ⋃ (x : ↑s) (_ : x ∈ ∅), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nM : ℕ → ↑∅ → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑∅), s ∩ closure (M n z) ⊆ M n z\nK : ℕ → ↑∅ → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑∅) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑∅\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑∅\nh✝ : x ∈ M n z\n⊢ Nonempty ↑∅\n[PROOFSTEP]\nexact False.elim z.2\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT✝ : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nthis : Encodable ↑T\nhT : Set.Nonempty T\n⊢ Nonempty ↑T\n[PROOFSTEP]\nexact hT.coe_sort\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nthis✝ : Encodable ↑T\nthis : Nonempty ↑T\n⊢ ∃ F, Function.Surjective F\n[PROOFSTEP]\ninhabit ↥T\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F\ninst✝¹ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nthis✝ : Encodable ↑T\nthis : Nonempty ↑T\ninhabited_h : Inhabited ↑T\n⊢ ∃ F, Function.Surjective F\n[PROOFSTEP]\nexact\n  ⟨_, Encodable.surjective_decode_iget (ℕ × T × ℕ)⟩\n    -- these sets `t q = K n z p` will do\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\n⊢ ∃ t A,\n    (∀ (n : ℕ), IsClosed (t n)) ∧\n      s ⊆ ⋃ (n : ℕ), t n ∧\n        (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n          (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nrefine'\n  ⟨fun q => K (F q).1 (F q).2.1 (F q).2.2, fun q => f' (F q).2.1, fun n => K_closed _ _ _, fun x xs => _, fun q =>\n    K_approx _ _ _, fun _ q => ⟨(F q).2.1, (F q).2.1.1.2, rfl⟩⟩\n    -- the only fact that needs further checking is that they cover `s`.\n      -- we already know that any point `x ∈ s` belongs to a set `M n z`.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\n⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n\n[PROOFSTEP]\nobtain ⟨n, z, hnz⟩ : ∃ (n : ℕ) (z : T), x ∈ M n z := s_subset x xs\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\n⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n\n[PROOFSTEP]\nobtain ⟨p, hp⟩ : ∃ p : ℕ, x ∈ closedBall (d p) (u n / 3) :=\n  by\n  have : Set.Nonempty (ball x (u n / 3)) := by simp only [nonempty_ball]; linarith [u_pos n]\n  obtain ⟨p, hp⟩ : ∃ p : ℕ, d p ∈ ball x (u n / 3) := hd.exists_mem_open isOpen_ball this\n  exact\n    ⟨p, (mem_ball'.1 hp).le⟩\n      -- choose `q` for which `t q = K n z p`.\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\n⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)\n[PROOFSTEP]\nhave : Set.Nonempty (ball x (u n / 3)) := by simp only [nonempty_ball]; linarith [u_pos n]\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\n⊢ Set.Nonempty (ball x (u n / 3))\n[PROOFSTEP]\nsimp only [nonempty_ball]\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\n⊢ 0 < u n / 3\n[PROOFSTEP]\nlinarith [u_pos n]\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\nthis : Set.Nonempty (ball x (u n / 3))\n⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)\n[PROOFSTEP]\nobtain ⟨p, hp⟩ : ∃ p : ℕ, d p ∈ ball x (u n / 3) := hd.exists_mem_open isOpen_ball this\n[GOAL]\ncase intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\nthis : Set.Nonempty (ball x (u n / 3))\np : ℕ\nhp : d p ∈ ball x (u n / 3)\n⊢ ∃ p, x ∈ closedBall (d p) (u n / 3)\n[PROOFSTEP]\nexact\n  ⟨p, (mem_ball'.1 hp).le⟩\n    -- choose `q` for which `t q = K n z p`.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\np : ℕ\nhp : x ∈ closedBall (d p) (u n / 3)\n⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n\n[PROOFSTEP]\nobtain ⟨q, hq⟩ : ∃ q, F q = (n, z, p) :=\n  hF\n    _\n      -- then `x` belongs to `t q`.\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\np : ℕ\nhp : x ∈ closedBall (d p) (u n / 3)\nq : ℕ\nhq : F q = (n, z, p)\n⊢ x ∈ ⋃ (n : ℕ), (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) n\n[PROOFSTEP]\napply mem_iUnion.2 ⟨q, _⟩\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁵ : NormedAddCommGroup E\ninst✝⁴ : NormedSpace ℝ E\ninst✝³ : FiniteDimensional ℝ E\ninst✝² : NormedAddCommGroup F✝\ninst✝¹ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝ : SecondCountableTopology F✝\nf : E → F✝\ns : Set E\nf' : E → E →L[ℝ] F✝\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F✝) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F✝), r A ≠ 0\nhs : Set.Nonempty s\nT : Set ↑s\nT_count : Set.Countable T\nhT : ⋃ (x : ↑s) (_ : x ∈ T), ball (f' ↑x) ↑(r (f' ↑x)) = ⋃ (x : ↑s), ball (f' ↑x) ↑(r (f' ↑x))\nu : ℕ → ℝ\nleft✝ : StrictAnti u\nu_pos : ∀ (n : ℕ), 0 < u n\nu_lim : Tendsto u atTop (𝓝 0)\nM : ℕ → ↑T → Set E :=\n  fun n z => {x | x ∈ s ∧ ∀ (y : E), y ∈ s ∩ ball x (u n) → ‖f y - f x - ↑(f' ↑↑z) (y - x)‖ ≤ ↑(r (f' ↑↑z)) * ‖y - x‖}\ns_subset : ∀ (x : E), x ∈ s → ∃ n z, x ∈ M n z\nclosure_M_subset : ∀ (n : ℕ) (z : ↑T), s ∩ closure (M n z) ⊆ M n z\nd : ℕ → E\nhd : DenseRange d\nK : ℕ → ↑T → ℕ → Set E := fun n z p => closure (M n z) ∩ closedBall (d p) (u n / 3)\nK_approx : ∀ (n : ℕ) (z : ↑T) (p : ℕ), ApproximatesLinearOn f (f' ↑↑z) (s ∩ K n z p) (r (f' ↑↑z))\nK_closed : ∀ (n : ℕ) (z : ↑T) (p : ℕ), IsClosed (K n z p)\nF : ℕ → ℕ × ↑T × ℕ\nhF : Function.Surjective F\nx : E\nxs : x ∈ s\nn : ℕ\nz : ↑T\nhnz : x ∈ M n z\np : ℕ\nhp : x ∈ closedBall (d p) (u n / 3)\nq : ℕ\nhq : F q = (n, z, p)\n⊢ x ∈ (fun q => K (F q).fst (F q).snd.fst (F q).snd.snd) q\n[PROOFSTEP]\nsimp (config := { zeta := false }) only [hq, subset_closure hnz, hp, mem_inter_iff, and_true, hnz]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\n⊢ ∃ t A,\n    Pairwise (Disjoint on t) ∧\n      (∀ (n : ℕ), MeasurableSet (t n)) ∧\n        s ⊆ ⋃ (n : ℕ), t n ∧\n          (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n            (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nrcases exists_closed_cover_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' r rpos with\n  ⟨t, A, t_closed, st, t_approx, ht⟩\n[GOAL]\ncase intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] F\nt_closed : ∀ (n : ℕ), IsClosed (t n)\nst : s ⊆ ⋃ (n : ℕ), t n\nt_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))\nht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∃ t A,\n    Pairwise (Disjoint on t) ∧\n      (∀ (n : ℕ), MeasurableSet (t n)) ∧\n        s ⊆ ⋃ (n : ℕ), t n ∧\n          (∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))) ∧\n            (Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y)\n[PROOFSTEP]\nrefine' ⟨disjointed t, A, disjoint_disjointed _, MeasurableSet.disjointed fun n => (t_closed n).measurableSet, _, _, ht⟩\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] F\nt_closed : ∀ (n : ℕ), IsClosed (t n)\nst : s ⊆ ⋃ (n : ℕ), t n\nt_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))\nht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ s ⊆ ⋃ (n : ℕ), disjointed t n\n[PROOFSTEP]\nrw [iUnion_disjointed]\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] F\nt_closed : ∀ (n : ℕ), IsClosed (t n)\nst : s ⊆ ⋃ (n : ℕ), t n\nt_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))\nht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ s ⊆ ⋃ (n : ℕ), t n\n[PROOFSTEP]\nexact st\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] F\nt_closed : ∀ (n : ℕ), IsClosed (t n)\nst : s ⊆ ⋃ (n : ℕ), t n\nt_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))\nht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ disjointed t n) (r (A n))\n[PROOFSTEP]\nintro n\n[GOAL]\ncase intro.intro.intro.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : SecondCountableTopology F\nf : E → F\ns : Set E\nf' : E → E →L[ℝ] F\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nr : (E →L[ℝ] F) → ℝ≥0\nrpos : ∀ (A : E →L[ℝ] F), r A ≠ 0\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] F\nt_closed : ∀ (n : ℕ), IsClosed (t n)\nst : s ⊆ ⋃ (n : ℕ), t n\nt_approx : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (r (A n))\nht : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ ApproximatesLinearOn f (A n) (s ∩ disjointed t n) (r (A n))\n[PROOFSTEP]\nexact (t_approx n).mono_set (inter_subset_inter_right _ (disjointed_subset _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0, ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\napply nhdsWithin_le_nhds\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0\n[PROOFSTEP]\nlet d :=\n  ENNReal.ofReal\n    |A.det|\n      -- construct a small neighborhood of `A '' (closedBall 0 1)` with measure comparable to\n        -- the determinant of `A`.\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0\n[PROOFSTEP]\nobtain ⟨ε, hε, εpos⟩ : ∃ ε : ℝ, μ (closedBall 0 ε + A '' closedBall 0 1) < m * μ (closedBall 0 1) ∧ 0 < ε :=\n  by\n  have HC : IsCompact (A '' closedBall 0 1) := (ProperSpace.isCompact_closedBall _ _).image A.continuous\n  have L0 : Tendsto (fun ε => μ (cthickening ε (A '' closedBall 0 1))) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=\n    by\n    apply Tendsto.mono_left _ nhdsWithin_le_nhds\n    exact tendsto_measure_cthickening_of_isCompact HC\n  have L1 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=\n    by\n    apply L0.congr' _\n    filter_upwards [self_mem_nhdsWithin] with r hr\n    rw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]\n  have L2 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (d * μ (closedBall 0 1))) :=\n    by\n    convert L1\n    exact (addHaar_image_continuousLinearMap _ _ _).symm\n  have I : d * μ (closedBall 0 1) < m * μ (closedBall 0 1) :=\n    (ENNReal.mul_lt_mul_right (measure_closedBall_pos μ _ zero_lt_one).ne' measure_closedBall_lt_top.ne).2 hm\n  have H : ∀ᶠ b : ℝ in 𝓝[>] 0, μ (closedBall 0 b + A '' closedBall 0 1) < m * μ (closedBall 0 1) :=\n    (tendsto_order.1 L2).2 _ I\n  exact (H.and self_mem_nhdsWithin).exists\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave HC : IsCompact (A '' closedBall 0 1) := (ProperSpace.isCompact_closedBall _ _).image A.continuous\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave L0 : Tendsto (fun ε => μ (cthickening ε (A '' closedBall 0 1))) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  exact tendsto_measure_cthickening_of_isCompact HC\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\n⊢ Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\n⊢ Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n[PROOFSTEP]\nexact tendsto_measure_cthickening_of_isCompact HC\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave L1 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (μ (A '' closedBall 0 1))) :=\n  by\n  apply L0.congr' _\n  filter_upwards [self_mem_nhdsWithin] with r hr\n  rw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n[PROOFSTEP]\napply L0.congr' _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) =ᶠ[𝓝[Ioi 0] 0] fun ε =>\n    ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with r hr\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nr : ℝ\nhr : r ∈ Ioi 0\n⊢ ↑↑μ (cthickening r (↑A '' closedBall 0 1)) = ↑↑μ (closedBall 0 r + ↑A '' closedBall 0 1)\n[PROOFSTEP]\nrw [← HC.add_closedBall_zero (le_of_lt hr), add_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave L2 : Tendsto (fun ε => μ (closedBall 0 ε + A '' closedBall 0 1)) (𝓝[>] 0) (𝓝 (d * μ (closedBall 0 1))) :=\n  by\n  convert L1\n  exact (addHaar_image_continuousLinearMap _ _ _).symm\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))\n[PROOFSTEP]\nconvert L1\n[GOAL]\ncase h.e'_5.h.e'_3\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\n⊢ d * ↑↑μ (closedBall 0 1) = ↑↑μ (↑A '' closedBall 0 1)\n[PROOFSTEP]\nexact (addHaar_image_continuousLinearMap _ _ _).symm\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave I : d * μ (closedBall 0 1) < m * μ (closedBall 0 1) :=\n  (ENNReal.mul_lt_mul_right (measure_closedBall_pos μ _ zero_lt_one).ne' measure_closedBall_lt_top.ne).2 hm\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))\nI : d * ↑↑μ (closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nhave H : ∀ᶠ b : ℝ in 𝓝[>] 0, μ (closedBall 0 b + A '' closedBall 0 1) < m * μ (closedBall 0 1) :=\n  (tendsto_order.1 L2).2 _ I\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nHC : IsCompact (↑A '' closedBall 0 1)\nL0 : Tendsto (fun ε => ↑↑μ (cthickening ε (↑A '' closedBall 0 1))) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL1 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (↑A '' closedBall 0 1)))\nL2 : Tendsto (fun ε => ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1)) (𝓝[Ioi 0] 0) (𝓝 (d * ↑↑μ (closedBall 0 1)))\nI : d * ↑↑μ (closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nH : ∀ᶠ (b : ℝ) in 𝓝[Ioi 0] 0, ↑↑μ (closedBall 0 b + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\n⊢ ∃ ε, ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1) ∧ 0 < ε\n[PROOFSTEP]\nexact (H.and self_mem_nhdsWithin).exists\n[GOAL]\ncase a.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0\n[PROOFSTEP]\nhave : Iio (⟨ε, εpos.le⟩ : ℝ≥0) ∈ 𝓝 (0 : ℝ≥0) := by apply Iio_mem_nhds; exact εpos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\n⊢ Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\n[PROOFSTEP]\napply Iio_mem_nhds\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\n⊢ 0 < { val := ε, property := (_ : 0 ≤ ε) }\n[PROOFSTEP]\nexact εpos\n[GOAL]\ncase a.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s) x} ∈ 𝓝 0\n[PROOFSTEP]\nfilter_upwards [this]\n  -- fix a function `f` which is close enough to `A`.\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\n⊢ ∀ (a : ℝ≥0),\n    a ∈ Iio { val := ε, property := (_ : 0 ≤ ε) } →\n      ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s a → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nintro δ hδ s f hf\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\n⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nhave I : ∀ x r, x ∈ s → 0 ≤ r → μ (f '' (s ∩ closedBall x r)) ≤ m * μ (closedBall x r) :=\n  by\n  intro x r xs r0\n  have K : f '' (s ∩ closedBall x r) ⊆ A '' closedBall 0 r + closedBall (f x) (ε * r) :=\n    by\n    rintro y ⟨z, ⟨zs, zr⟩, rfl⟩\n    apply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩\n    · apply mem_image_of_mem\n      simpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr\n    · rw [mem_closedBall_iff_norm, add_sub_cancel]\n      calc\n        ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs\n        _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le\n    · simp only [map_sub, Pi.sub_apply]\n      abel\n  have : A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (A '' closedBall 0 1 + closedBall 0 ε) := by\n    rw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,\n      singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero,\n      Real.norm_eq_abs, abs_of_nonneg r0, mul_one, mul_comm]\n  rw [this] at K \n  calc\n    μ (f '' (s ∩ closedBall x r)) ≤ μ ({f x} + r • (A '' closedBall 0 1 + closedBall 0 ε)) := measure_mono K\n    _ = ENNReal.ofReal (r ^ finrank ℝ E) * μ (A '' closedBall 0 1 + closedBall 0 ε) := by\n      simp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]\n    _ ≤ ENNReal.ofReal (r ^ finrank ℝ E) * (m * μ (closedBall 0 1)) := by rw [add_comm]; exact mul_le_mul_left' hε.le _\n    _ = m * μ (closedBall x r) := by simp only [addHaar_closedBall' μ _ r0];\n      ring\n        -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the\n          -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\n⊢ ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nintro x r xs r0\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\n⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nhave K : f '' (s ∩ closedBall x r) ⊆ A '' closedBall 0 r + closedBall (f x) (ε * r) :=\n  by\n  rintro y ⟨z, ⟨zs, zr⟩, rfl⟩\n  apply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩\n  · apply mem_image_of_mem\n    simpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr\n  · rw [mem_closedBall_iff_norm, add_sub_cancel]\n    calc\n      ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs\n      _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le\n  · simp only [map_sub, Pi.sub_apply]\n    abel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\n⊢ f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)\n[PROOFSTEP]\nrintro y ⟨z, ⟨zs, zr⟩, rfl⟩\n[GOAL]\ncase intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ f z ∈ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)\n[PROOFSTEP]\napply Set.mem_add.2 ⟨A (z - x), f z - f x - A (z - x) + f x, _, _, _⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ ↑A (z - x) ∈ ↑A '' closedBall 0 r\n[PROOFSTEP]\napply mem_image_of_mem\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ z - x ∈ closedBall 0 r\n[PROOFSTEP]\nsimpa only [dist_eq_norm, mem_closedBall, mem_closedBall_zero_iff, sub_zero] using zr\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ f z - f x - ↑A (z - x) + f x ∈ closedBall (f x) (ε * r)\n[PROOFSTEP]\nrw [mem_closedBall_iff_norm, add_sub_cancel]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ ‖f z - f x - ↑A (z - x)‖ ≤ ε * r\n[PROOFSTEP]\ncalc\n  ‖f z - f x - A (z - x)‖ ≤ δ * ‖z - x‖ := hf _ zs _ xs\n  _ ≤ ε * r := mul_le_mul (le_of_lt hδ) (mem_closedBall_iff_norm.1 zr) (norm_nonneg _) εpos.le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ ↑A (z - x) + (f z - f x - ↑A (z - x) + f x) = f z\n[PROOFSTEP]\nsimp only [map_sub, Pi.sub_apply]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ ↑A z - ↑A x + (f z - f x - (↑A z - ↑A x) + f x) = f z\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nz : E\nzs : z ∈ s\nzr : z ∈ closedBall x r\n⊢ ↑A z - ↑A x + (f z - f x - (↑A z - ↑A x) + f x) = f z\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)\n⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nhave : A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (A '' closedBall 0 1 + closedBall 0 ε) := by\n  rw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,\n    singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero,\n    Real.norm_eq_abs, abs_of_nonneg r0, mul_one, mul_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)\n⊢ ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n[PROOFSTEP]\nrw [smul_add, ← add_assoc, add_comm {f x}, add_assoc, smul_closedBall _ _ εpos.le, smul_zero,\n  singleton_add_closedBall_zero, ← image_smul_set ℝ E E A, smul_closedBall _ _ zero_le_one, smul_zero, Real.norm_eq_abs,\n  abs_of_nonneg r0, mul_one, mul_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ ↑A '' closedBall 0 r + closedBall (f x) (ε * r)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nrw [this] at K \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\ncalc\n  μ (f '' (s ∩ closedBall x r)) ≤ μ ({f x} + r • (A '' closedBall 0 1 + closedBall 0 ε)) := measure_mono K\n  _ = ENNReal.ofReal (r ^ finrank ℝ E) * μ (A '' closedBall 0 1 + closedBall 0 ε) := by\n    simp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]\n  _ ≤ ENNReal.ofReal (r ^ finrank ℝ E) * (m * μ (closedBall 0 1)) := by rw [add_comm]; exact mul_le_mul_left' hε.le _\n  _ = m * μ (closedBall x r) := by simp only [addHaar_closedBall' μ _ r0];\n    ring\n      -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the\n        -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ↑↑μ ({f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)) =\n    ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (↑A '' closedBall 0 1 + closedBall 0 ε)\n[PROOFSTEP]\nsimp only [abs_of_nonneg r0, addHaar_smul, image_add_left, abs_pow, singleton_add, measure_preimage_add]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (↑A '' closedBall 0 1 + closedBall 0 ε) ≤\n    ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1))\n[PROOFSTEP]\nrw [add_comm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) ≤\n    ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1))\n[PROOFSTEP]\nexact mul_le_mul_left' hε.le _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1)) = ↑m * ↑↑μ (closedBall x r)\n[PROOFSTEP]\nsimp only [addHaar_closedBall' μ _ r0]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nx : E\nr : ℝ\nxs : x ∈ s\nr0 : 0 ≤ r\nK : f '' (s ∩ closedBall x r) ⊆ {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\nthis : ↑A '' closedBall 0 r + closedBall (f x) (ε * r) = {f x} + r • (↑A '' closedBall 0 1 + closedBall 0 ε)\n⊢ ENNReal.ofReal (r ^ finrank ℝ E) * (↑m * ↑↑μ (closedBall 0 1)) =\n    ↑m * (ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 1))\n[PROOFSTEP]\nring\n  -- covering `s` by closed balls with total measure very close to `μ s`, one deduces that the\n    -- measure of `f '' s` is at most `m * (μ s + a)` for any positive `a`.\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nhave J : ∀ᶠ a in 𝓝[>] (0 : ℝ≥0∞), μ (f '' s) ≤ m * (μ s + a) :=\n  by\n  filter_upwards [self_mem_nhdsWithin] with a ha\n  change 0 < a at ha \n  obtain ⟨t, r, t_count, ts, rpos, st, μt⟩ :\n    ∃ (t : Set E) (r : E → ℝ),\n      t.Countable ∧\n        t ⊆ s ∧\n          (∀ x : E, x ∈ t → 0 < r x) ∧\n            (s ⊆ ⋃ x ∈ t, closedBall x (r x)) ∧ (∑' x : ↥t, μ (closedBall (↑x) (r ↑x))) ≤ μ s + a :=\n    Besicovitch.exists_closedBall_covering_tsum_measure_le μ ha.ne' (fun _ => Ioi 0) s fun x _ δ δpos =>\n      ⟨δ / 2, by simp [half_pos δpos, δpos]⟩\n  haveI : Encodable t := t_count.toEncodable\n  calc\n    μ (f '' s) ≤ μ (⋃ x : t, f '' (s ∩ closedBall x (r x))) :=\n      by\n      rw [biUnion_eq_iUnion] at st \n      apply measure_mono\n      rw [← image_iUnion, ← inter_iUnion]\n      exact image_subset _ (subset_inter (Subset.refl _) st)\n    _ ≤ ∑' x : t, μ (f '' (s ∩ closedBall x (r x))) := (measure_iUnion_le _)\n    _ ≤ ∑' x : t, m * μ (closedBall x (r x)) := (ENNReal.tsum_le_tsum fun x => I x (r x) (ts x.2) (rpos x x.2).le)\n    _ ≤ m * (μ s + a) := by rw [ENNReal.tsum_mul_left];\n      exact\n        mul_le_mul_left' μt\n          _\n            -- taking the limit in `a`, one obtains the conclusion\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\n⊢ ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin] with a ha\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : a ∈ Ioi 0\n⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nchange 0 < a at ha \n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\n⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nobtain ⟨t, r, t_count, ts, rpos, st, μt⟩ :\n  ∃ (t : Set E) (r : E → ℝ),\n    t.Countable ∧\n      t ⊆ s ∧\n        (∀ x : E, x ∈ t → 0 < r x) ∧\n          (s ⊆ ⋃ x ∈ t, closedBall x (r x)) ∧ (∑' x : ↥t, μ (closedBall (↑x) (r ↑x))) ≤ μ s + a :=\n  Besicovitch.exists_closedBall_covering_tsum_measure_le μ ha.ne' (fun _ => Ioi 0) s fun x _ δ δpos =>\n    ⟨δ / 2, by simp [half_pos δpos, δpos]⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ✝ : ℝ≥0\nhδ : δ✝ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ✝\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nx : E\nx✝ : x ∈ s\nδ : ℝ\nδpos : δ > 0\n⊢ δ / 2 ∈ (fun x => Ioi 0) x ∩ Ioo 0 δ\n[PROOFSTEP]\nsimp [half_pos δpos, δpos]\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\n⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nhaveI : Encodable t := t_count.toEncodable\n[GOAL]\ncase h.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\ncalc\n  μ (f '' s) ≤ μ (⋃ x : t, f '' (s ∩ closedBall x (r x))) :=\n    by\n    rw [biUnion_eq_iUnion] at st \n    apply measure_mono\n    rw [← image_iUnion, ← inter_iUnion]\n    exact image_subset _ (subset_inter (Subset.refl _) st)\n  _ ≤ ∑' x : t, μ (f '' (s ∩ closedBall x (r x))) := (measure_iUnion_le _)\n  _ ≤ ∑' x : t, m * μ (closedBall x (r x)) := (ENNReal.tsum_le_tsum fun x => I x (r x) (ts x.2) (rpos x x.2).le)\n  _ ≤ m * (μ s + a) := by rw [ENNReal.tsum_mul_left];\n    exact\n      mul_le_mul_left' μt\n        _\n          -- taking the limit in `a`, one obtains the conclusion\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x)))\n[PROOFSTEP]\nrw [biUnion_eq_iUnion] at st \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x)))\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ f '' s ⊆ ⋃ (x : ↑t), f '' (s ∩ closedBall (↑x) (r ↑x))\n[PROOFSTEP]\nrw [← image_iUnion, ← inter_iUnion]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : ↑t), closedBall (↑x) (r ↑x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ↑t), closedBall (↑i) (r ↑i))\n[PROOFSTEP]\nexact image_subset _ (subset_inter (Subset.refl _) st)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ ∑' (x : ↑t), ↑m * ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nrw [ENNReal.tsum_mul_left]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis✝ : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\na : ℝ≥0∞\nha : 0 < a\nt : Set E\nr : E → ℝ\nt_count : Set.Countable t\nts : t ⊆ s\nrpos : ∀ (x : E), x ∈ t → 0 < r x\nst : s ⊆ ⋃ (x : E) (_ : x ∈ t), closedBall x (r x)\nμt : ∑' (x : ↑t), ↑↑μ (closedBall (↑x) (r ↑x)) ≤ ↑↑μ s + a\nthis : Encodable ↑t\n⊢ ↑m * ∑' (i : ↑t), ↑↑μ (closedBall (↑i) (r ↑i)) ≤ ↑m * (↑↑μ s + a)\n[PROOFSTEP]\nexact\n  mul_le_mul_left' μt\n    _\n      -- taking the limit in `a`, one obtains the conclusion\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nhave L : Tendsto (fun a => (m : ℝ≥0∞) * (μ s + a)) (𝓝[>] 0) (𝓝 (m * (μ s + 0))) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  apply ENNReal.Tendsto.const_mul (tendsto_const_nhds.add tendsto_id)\n  simp only [ENNReal.coe_ne_top, Ne.def, or_true_iff, not_false_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n⊢ Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * (↑↑μ s + 0)))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n⊢ Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝 0) (𝓝 (↑m * (↑↑μ s + 0)))\n[PROOFSTEP]\napply ENNReal.Tendsto.const_mul (tendsto_const_nhds.add tendsto_id)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\n⊢ ↑↑μ s + 0 ≠ 0 ∨ ↑m ≠ ⊤\n[PROOFSTEP]\nsimp only [ENNReal.coe_ne_top, Ne.def, or_true_iff, not_false_iff]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\nL : Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * (↑↑μ s + 0)))\n⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nrw [add_zero] at L \n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nd : ℝ≥0∞ := ENNReal.ofReal |ContinuousLinearMap.det A|\nε : ℝ\nhε : ↑↑μ (closedBall 0 ε + ↑A '' closedBall 0 1) < ↑m * ↑↑μ (closedBall 0 1)\nεpos : 0 < ε\nthis : Iio { val := ε, property := (_ : 0 ≤ ε) } ∈ 𝓝 0\nδ : ℝ≥0\nhδ : δ ∈ Iio { val := ε, property := (_ : 0 ≤ ε) }\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nI : ∀ (x : E) (r : ℝ), x ∈ s → 0 ≤ r → ↑↑μ (f '' (s ∩ closedBall x r)) ≤ ↑m * ↑↑μ (closedBall x r)\nJ : ∀ᶠ (a : ℝ≥0∞) in 𝓝[Ioi 0] 0, ↑↑μ (f '' s) ≤ ↑m * (↑↑μ s + a)\nL : Tendsto (fun a => ↑m * (↑↑μ s + a)) (𝓝[Ioi 0] 0) (𝓝 (↑m * ↑↑μ s))\n⊢ ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\n[PROOFSTEP]\nexact ge_of_tendsto L J\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0, ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\napply nhdsWithin_le_nhds\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nrcases eq_or_lt_of_le (zero_le m) with (rfl | mpos)\n[GOAL]\ncase a.inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nhm : ↑0 < ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑0 * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\napply eventually_of_forall\n[GOAL]\ncase a.inl.hp\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nhm : ↑0 < ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ ∀ (x : ℝ≥0) (s : Set E) (f : E → E), ApproximatesLinearOn f A s x → ↑0 * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nsimp only [forall_const, zero_mul, imp_true_iff, zero_le, ENNReal.coe_zero]\n[GOAL]\ncase a.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nhave hA : A.det ≠ 0 := by intro h; simp only [h, ENNReal.not_lt_zero, ENNReal.ofReal_zero, abs_zero] at hm \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\n⊢ ContinuousLinearMap.det A ≠ 0\n[PROOFSTEP]\nintro h\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nh : ContinuousLinearMap.det A = 0\n⊢ False\n[PROOFSTEP]\nsimp only [h, ENNReal.not_lt_zero, ENNReal.ofReal_zero, abs_zero] at hm \n[GOAL]\ncase a.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nlet B := A.toContinuousLinearEquivOfDetNeZero hA\n[GOAL]\ncase a.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nhave I : ENNReal.ofReal |(B.symm : E →L[ℝ] E).det| < (m⁻¹ : ℝ≥0) :=\n  by\n  simp only [ENNReal.ofReal, abs_inv, Real.toNNReal_inv, ContinuousLinearEquiv.det_coe_symm,\n    ContinuousLinearMap.coe_toContinuousLinearEquivOfDetNeZero, ENNReal.coe_lt_coe] at hm ⊢\n  exact NNReal.inv_lt_inv mpos.ne' hm\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\n⊢ ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, abs_inv, Real.toNNReal_inv, ContinuousLinearEquiv.det_coe_symm,\n  ContinuousLinearMap.coe_toContinuousLinearEquivOfDetNeZero, ENNReal.coe_lt_coe] at hm ⊢\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nhm : m < Real.toNNReal |ContinuousLinearMap.det A|\n⊢ (Real.toNNReal |ContinuousLinearMap.det A|)⁻¹ < m⁻¹\n[PROOFSTEP]\nexact NNReal.inv_lt_inv mpos.ne' hm\n[GOAL]\ncase a.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nobtain ⟨δ₀, δ₀pos, hδ₀⟩ :\n  ∃ δ : ℝ≥0,\n    0 < δ ∧ ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=\n  by\n  have :\n    ∀ᶠ δ : ℝ≥0 in 𝓝[>] 0,\n      ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=\n    addHaar_image_le_mul_of_det_lt μ B.symm I\n  rcases(this.and self_mem_nhdsWithin).exists with ⟨δ₀, h, h'⟩\n  exact\n    ⟨δ₀, h', h⟩\n      -- record smallness conditions for `δ` that will be needed to apply `hδ₀` below.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E) (g : E → E),\n        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n[PROOFSTEP]\nhave :\n  ∀ᶠ δ : ℝ≥0 in 𝓝[>] 0,\n    ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (B.symm : E →L[ℝ] E) t δ → μ (g '' t) ≤ ↑m⁻¹ * μ t :=\n  addHaar_image_le_mul_of_det_lt μ B.symm I\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nthis :\n  ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0,\n    ∀ (t : Set E) (g : E → E),\n      ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E) (g : E → E),\n        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n[PROOFSTEP]\nrcases(this.and self_mem_nhdsWithin).exists with ⟨δ₀, h, h'⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nthis :\n  ∀ᶠ (δ : ℝ≥0) in 𝓝[Ioi 0] 0,\n    ∀ (t : Set E) (g : E → E),\n      ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nδ₀ : ℝ≥0\nh :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nh' : 0 < δ₀\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E) (g : E → E),\n        ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n[PROOFSTEP]\nexact\n  ⟨δ₀, h', h⟩\n    -- record smallness conditions for `δ` that will be needed to apply `hδ₀` below.\n[GOAL]\ncase a.inr.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nhave L1 : ∀ᶠ δ in 𝓝 (0 : ℝ≥0), Subsingleton E ∨ δ < ‖(B.symm : E →L[ℝ] E)‖₊⁻¹ :=\n  by\n  by_cases Subsingleton E\n  · simp only [h, true_or_iff, eventually_const]\n  simp only [h, false_or_iff]\n  apply Iio_mem_nhds\n  simpa only [h, false_or_iff, inv_pos] using B.subsingleton_or_nnnorm_symm_pos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n[PROOFSTEP]\nby_cases Subsingleton E\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n[PROOFSTEP]\nby_cases Subsingleton E\n[GOAL]\ncase pos\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nh : Subsingleton E\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n[PROOFSTEP]\nsimp only [h, true_or_iff, eventually_const]\n[GOAL]\ncase neg\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nh : ¬Subsingleton E\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n[PROOFSTEP]\nsimp only [h, false_or_iff]\n[GOAL]\ncase neg\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nh : ¬Subsingleton E\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0,\n    δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\n[PROOFSTEP]\napply Iio_mem_nhds\n[GOAL]\ncase neg.h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nh : ¬Subsingleton E\n⊢ 0 < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\n[PROOFSTEP]\nsimpa only [h, false_or_iff, inv_pos] using B.subsingleton_or_nnnorm_symm_pos\n[GOAL]\ncase a.inr.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nhave L2 : ∀ᶠ δ in 𝓝 (0 : ℝ≥0), ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ < δ₀ :=\n  by\n  have :\n    Tendsto (fun δ => ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n      (𝓝 (‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - 0)⁻¹ * 0)) :=\n    by\n    rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)\n    · simpa only [H, zero_mul] using tendsto_const_nhds\n    refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id\n    refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _\n    simpa only [tsub_zero, inv_eq_zero, Ne.def] using H\n  simp only [mul_zero] at this \n  exact (tendsto_order.1 this).2 δ₀ δ₀pos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\n[PROOFSTEP]\nhave :\n  Tendsto (fun δ => ‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n    (𝓝 (‖(B.symm : E →L[ℝ] E)‖₊ * (‖(B.symm : E →L[ℝ] E)‖₊⁻¹ - 0)⁻¹ * 0)) :=\n  by\n  rcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)\n  · simpa only [H, zero_mul] using tendsto_const_nhds\n  refine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id\n  refine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _\n  simpa only [tsub_zero, inv_eq_zero, Ne.def] using H\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\n⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))\n[PROOFSTEP]\nrcases eq_or_ne ‖(B.symm : E →L[ℝ] E)‖₊ 0 with (H | H)\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nH : ‖↑(ContinuousLinearEquiv.symm B)‖₊ = 0\n⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))\n[PROOFSTEP]\nsimpa only [H, zero_mul] using tendsto_const_nhds\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nH : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0\n⊢ Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))\n[PROOFSTEP]\nrefine' Tendsto.mul (tendsto_const_nhds.mul _) tendsto_id\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nH : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0\n⊢ Tendsto (fun δ => (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹) (𝓝 0) (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹)\n[PROOFSTEP]\nrefine' (Tendsto.sub tendsto_const_nhds tendsto_id).inv₀ _\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nH : ‖↑(ContinuousLinearEquiv.symm B)‖₊ ≠ 0\n⊢ ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0 ≠ 0\n[PROOFSTEP]\nsimpa only [tsub_zero, inv_eq_zero, Ne.def] using H\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nthis :\n  Tendsto (fun δ => ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ) (𝓝 0)\n    (𝓝 (‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - 0)⁻¹ * 0))\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\n[PROOFSTEP]\nsimp only [mul_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nthis :\n  Tendsto\n    (fun δ =>\n      ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n          (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n        δ)\n    (𝓝 0) (𝓝 0)\n⊢ ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\n[PROOFSTEP]\nexact (tendsto_order.1 this).2 δ₀ δ₀pos\n[GOAL]\ncase a.inr.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\n⊢ {x | (fun δ => ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)) x} ∈ 𝓝 0\n[PROOFSTEP]\nfilter_upwards [L1, L2]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\n⊢ ∀ (a : ℝ≥0),\n    Subsingleton E ∨\n        a < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ →\n      ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n              (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - a)⁻¹ *\n            a <\n          δ₀ →\n        ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s a → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nintro δ h1δ h2δ s f hf\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\n⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nhave hf' : ApproximatesLinearOn f (B : E →L[ℝ] E) s δ := by convert hf\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\n⊢ ApproximatesLinearOn f (↑B) s δ\n[PROOFSTEP]\nconvert hf\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\n⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nlet F := hf'.toLocalEquiv h1δ\n[GOAL]\ncase h\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\n⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nsuffices H : μ (F.symm '' F.target) ≤ (m⁻¹ : ℝ≥0) * μ F.target\n[GOAL]\ncase h\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\nH : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n⊢ ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nchange (m : ℝ≥0∞) * μ F.source ≤ μ F.target\n[GOAL]\ncase h\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\nH : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n⊢ ↑m * ↑↑μ F.source ≤ ↑↑μ F.target\n[PROOFSTEP]\nrwa [← F.symm_image_target_eq_source, mul_comm, ← ENNReal.le_div_iff_mul_le, div_eq_mul_inv, mul_comm, ←\n  ENNReal.coe_inv mpos.ne']\n[GOAL]\ncase h.h0\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\nH : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n⊢ ↑m ≠ 0 ∨ ↑↑μ F.target ≠ 0\n[PROOFSTEP]\napply Or.inl\n[GOAL]\ncase h.h0.h\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\nH : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n⊢ ↑m ≠ 0\n[PROOFSTEP]\nsimpa only [ENNReal.coe_eq_zero, Ne.def] using mpos.ne'\n[GOAL]\ncase h.ht\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\nH : ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n⊢ ↑m ≠ ⊤ ∨ ↑↑μ F.target ≠ ⊤\n[PROOFSTEP]\nsimp only [ENNReal.coe_ne_top, true_or_iff, Ne.def, not_false_iff]\n  -- as `f⁻¹` is well approximated by `B⁻¹`, the conclusion follows from `hδ₀`\n    -- and our choice of `δ`.\n[GOAL]\ncase H\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns✝ : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nm : ℝ≥0\nhm : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nmpos : 0 < m\nhA : ContinuousLinearMap.det A ≠ 0\nB : E ≃L[ℝ] E := ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA\nI : ENNReal.ofReal |ContinuousLinearMap.det ↑(ContinuousLinearEquiv.symm B)| < ↑m⁻¹\nδ₀ : ℝ≥0\nδ₀pos : 0 < δ₀\nhδ₀ :\n  ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g (↑(ContinuousLinearEquiv.symm B)) t δ₀ → ↑↑μ (g '' t) ≤ ↑m⁻¹ * ↑↑μ t\nL1 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹\nL2 : ∀ᶠ (δ : ℝ≥0) in 𝓝 0, ‖↑(ContinuousLinearEquiv.symm B)‖₊ * (‖↑(ContinuousLinearEquiv.symm B)‖₊⁻¹ - δ)⁻¹ * δ < δ₀\nδ : ℝ≥0\nh1δ :\n  Subsingleton E ∨ δ < ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹\nh2δ :\n  ‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊ *\n        (‖↑(ContinuousLinearEquiv.symm (ContinuousLinearMap.toContinuousLinearEquivOfDetNeZero A hA))‖₊⁻¹ - δ)⁻¹ *\n      δ <\n    δ₀\ns : Set E\nf : E → E\nhf : ApproximatesLinearOn f A s δ\nhf' : ApproximatesLinearOn f (↑B) s δ\nF : LocalEquiv E E := ApproximatesLinearOn.toLocalEquiv hf' h1δ\n⊢ ↑↑μ (↑(LocalEquiv.symm F) '' F.target) ≤ ↑m⁻¹ * ↑↑μ F.target\n[PROOFSTEP]\nexact hδ₀ _ _ ((hf'.to_inv h1δ).mono_num h2δ.le)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, ‖f' x - A‖₊ ≤ δ\n[PROOFSTEP]\nfilter_upwards [Besicovitch.ae_tendsto_measure_inter_div μ s, ae_restrict_mem hs]\n  -- start from a Lebesgue density point `x`, belonging to `s`.\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ ∀ (a : E),\n    Tendsto (fun r => ↑↑μ (s ∩ closedBall a r) / ↑↑μ (closedBall a r)) (𝓝[Ioi 0] 0) (𝓝 1) → a ∈ s → ‖f' a - A‖₊ ≤ δ\n[PROOFSTEP]\nintro x hx xs\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\n⊢ ‖f' x - A‖₊ ≤ δ\n[PROOFSTEP]\napply\n  ContinuousLinearMap.op_norm_le_bound _ δ.2 fun z =>\n    ?_\n      -- to show that `‖(f' x - A) z‖ ≤ δ ‖z‖`, it suffices to do it up to some error that vanishes\n        -- asymptotically in terms of `ε > 0`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\n⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖\n[PROOFSTEP]\nsuffices H : ∀ ε, 0 < ε → ‖(f' x - A) z‖ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖\n[PROOFSTEP]\nhave :\n  Tendsto (fun ε : ℝ => ((δ : ℝ) + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[>] 0)\n    (𝓝 ((δ + 0) * (‖z‖ + 0) + ‖f' x - A‖ * 0)) :=\n  Tendsto.mono_left (Continuous.tendsto (by continuity) 0) nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n⊢ Continuous fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\ncontinuity\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\nthis : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 ((↑δ + 0) * (‖z‖ + 0) + ‖f' x - A‖ * 0))\n⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖\n[PROOFSTEP]\nsimp only [add_zero, mul_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\nthis : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))\n⊢ ‖↑(f' x - A) z‖ ≤ ↑δ * ‖z‖\n[PROOFSTEP]\napply le_of_tendsto_of_tendsto tendsto_const_nhds this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\nthis : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))\n⊢ (fun x_1 => ‖↑(f' x - A) z‖) ≤ᶠ[𝓝[Ioi 0] 0] fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nH : ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\nthis : Tendsto (fun ε => (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε) (𝓝[Ioi 0] 0) (𝓝 (↑δ * ‖z‖))\n⊢ ∀ (a : ℝ), a ∈ Ioi 0 → ‖↑(f' x - A) z‖ ≤ (↑δ + a) * (‖z‖ + a) + ‖f' x - A‖ * a\n[PROOFSTEP]\nexact H\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\n⊢ ∀ (ε : ℝ), 0 < ε → ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nintro ε εpos\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nhave B₁ : ∀ᶠ r in 𝓝[>] (0 : ℝ), (s ∩ ({ x } + r • closedBall z ε)).Nonempty :=\n  eventually_nonempty_inter_smul_of_density_one μ s x hx _ measurableSet_closedBall\n    (measure_closedBall_pos μ z εpos).ne'\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nobtain ⟨ρ, ρpos, hρ⟩ : ∃ ρ > 0, ball x ρ ∩ s ⊆ {y : E | ‖f y - f x - (f' x) (y - x)‖ ≤ ε * ‖y - x‖} :=\n  mem_nhdsWithin_iff.1\n    (IsLittleO.def (hf' x xs) εpos)\n      -- for small enough `r`, the rescaled ball `r • closedBall z ε` is included in the set where\n        -- `f y - f x` is well approximated by `f' x (y - x)`.\n[GOAL]\ncase H.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nhave B₂ : ∀ᶠ r in 𝓝[>] (0 : ℝ), { x } + r • closedBall z ε ⊆ ball x ρ :=\n  by\n  apply nhdsWithin_le_nhds\n  exact\n    eventually_singleton_add_smul_subset bounded_closedBall\n      (ball_mem_nhds x ρpos)\n        -- fix a small positive `r` satisfying the above properties, as well as a corresponding `y`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\n⊢ ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\n[PROOFSTEP]\napply nhdsWithin_le_nhds\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\n⊢ {x_1 | (fun r => {x} + r • closedBall z ε ⊆ ball x ρ) x_1} ∈ 𝓝 0\n[PROOFSTEP]\nexact\n  eventually_singleton_add_smul_subset bounded_closedBall\n    (ball_mem_nhds x ρpos)\n      -- fix a small positive `r` satisfying the above properties, as well as a corresponding `y`.\n[GOAL]\ncase H.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nobtain ⟨r, ⟨y, ⟨ys, hy⟩⟩, rρ, rpos⟩ :\n  ∃ r : ℝ, (s ∩ ({ x } + r • closedBall z ε)).Nonempty ∧ { x } + r • closedBall z ε ⊆ ball x ρ ∧ 0 < r :=\n  (B₁.and (B₂.and self_mem_nhdsWithin)).exists\n[GOAL]\ncase H.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nobtain ⟨a, az, ya⟩ : ∃ a, a ∈ closedBall z ε ∧ y = x + r • a :=\n  by\n  simp only [mem_smul_set, image_add_left, mem_preimage, singleton_add] at hy \n  rcases hy with ⟨a, az, ha⟩\n  exact ⟨a, az, by simp only [ha, add_neg_cancel_left]⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\n⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a\n[PROOFSTEP]\nsimp only [mem_smul_set, image_add_left, mem_preimage, singleton_add] at hy \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\nhy : ∃ y_1, y_1 ∈ closedBall z ε ∧ r • y_1 = -x + y\n⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a\n[PROOFSTEP]\nrcases hy with ⟨a, az, ha⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nha : r • a = -x + y\n⊢ ∃ a, a ∈ closedBall z ε ∧ y = x + r • a\n[PROOFSTEP]\nexact ⟨a, az, by simp only [ha, add_neg_cancel_left]⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nha : r • a = -x + y\n⊢ y = x + r • a\n[PROOFSTEP]\nsimp only [ha, add_neg_cancel_left]\n[GOAL]\ncase H.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nhave norm_a : ‖a‖ ≤ ‖z‖ + ε :=\n  calc\n    ‖a‖ = ‖z + (a - z)‖ := by simp only [add_sub_cancel'_right]\n    _ ≤ ‖z‖ + ‖a - z‖ := (norm_add_le _ _)\n    _ ≤ ‖z‖ + ε :=\n      add_le_add_left (mem_closedBall_iff_norm.1 az)\n        _\n          -- use the approximation properties to control `(f' x - A) a`, and then `(f' x - A) z` as `z` is\n            -- close to `a`.\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\n⊢ ‖a‖ = ‖z + (a - z)‖\n[PROOFSTEP]\nsimp only [add_sub_cancel'_right]\n[GOAL]\ncase H.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nhave I : r * ‖(f' x - A) a‖ ≤ r * (δ + ε) * (‖z‖ + ε) :=\n  calc\n    r * ‖(f' x - A) a‖ = ‖(f' x - A) (r • a)‖ := by\n      simp only [ContinuousLinearMap.map_smul, norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]\n    _ = ‖f y - f x - A (y - x) - (f y - f x - (f' x) (y - x))‖ :=\n      by\n      congr 1\n      simp only [ya, add_sub_cancel', sub_sub_sub_cancel_left, ContinuousLinearMap.coe_sub', eq_self_iff_true,\n        sub_left_inj, Pi.sub_apply, ContinuousLinearMap.map_smul, smul_sub]\n    _ ≤ ‖f y - f x - A (y - x)‖ + ‖f y - f x - (f' x) (y - x)‖ := (norm_sub_le _ _)\n    _ ≤ δ * ‖y - x‖ + ε * ‖y - x‖ := (add_le_add (hf _ ys _ xs) (hρ ⟨rρ hy, ys⟩))\n    _ = r * (δ + ε) * ‖a‖ :=\n      by\n      simp only [ya, add_sub_cancel', norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]\n      ring\n    _ ≤ r * (δ + ε) * (‖z‖ + ε) := mul_le_mul_of_nonneg_left norm_a (mul_nonneg rpos.le (add_nonneg δ.2 εpos.le))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ r * ‖↑(f' x - A) a‖ = ‖↑(f' x - A) (r • a)‖\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.map_smul, norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ ‖↑(f' x - A) (r • a)‖ = ‖f y - f x - ↑A (y - x) - (f y - f x - ↑(f' x) (y - x))‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ ↑(f' x - A) (r • a) = f y - f x - ↑A (y - x) - (f y - f x - ↑(f' x) (y - x))\n[PROOFSTEP]\nsimp only [ya, add_sub_cancel', sub_sub_sub_cancel_left, ContinuousLinearMap.coe_sub', eq_self_iff_true, sub_left_inj,\n  Pi.sub_apply, ContinuousLinearMap.map_smul, smul_sub]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ ↑δ * ‖y - x‖ + ε * ‖y - x‖ = r * (↑δ + ε) * ‖a‖\n[PROOFSTEP]\nsimp only [ya, add_sub_cancel', norm_smul, Real.norm_eq_abs, abs_of_nonneg rpos.le]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\n⊢ ↑δ * (r * ‖a‖) + ε * (r * ‖a‖) = r * (↑δ + ε) * ‖a‖\n[PROOFSTEP]\nring\n[GOAL]\ncase H.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nshow ‖(f' x - A) z‖ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[GOAL]\ncase H.intro.intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) z‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε\n[PROOFSTEP]\nexact\n  calc\n    ‖(f' x - A) z‖ = ‖(f' x - A) a + (f' x - A) (z - a)‖ :=\n      by\n      congr 1\n      simp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]\n      abel\n    _ ≤ ‖(f' x - A) a‖ + ‖(f' x - A) (z - a)‖ := (norm_add_le _ _)\n    _ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ‖z - a‖ :=\n      by\n      apply add_le_add\n      · rw [mul_assoc] at I ; exact (mul_le_mul_left rpos).1 I\n      · apply ContinuousLinearMap.le_op_norm\n    _ ≤ (δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ε :=\n      add_le_add le_rfl (mul_le_mul_of_nonneg_left (mem_closedBall_iff_norm'.1 az) (norm_nonneg _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) z‖ = ‖↑(f' x - A) a + ↑(f' x - A) (z - a)‖\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ↑(f' x - A) z = ↑(f' x - A) a + ↑(f' x - A) (z - a)\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.coe_sub', map_sub, Pi.sub_apply]\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ↑(f' x) z - ↑A z = ↑(f' x) a - ↑A a + (↑(f' x) z - ↑A z - (↑(f' x) a - ↑A a))\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ↑(f' x) z - ↑A z = ↑(f' x) a - ↑A a + (↑(f' x) z - ↑A z - (↑(f' x) a - ↑A a))\n[PROOFSTEP]\nabel\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) a‖ + ‖↑(f' x - A) (z - a)‖ ≤ (↑δ + ε) * (‖z‖ + ε) + ‖f' x - A‖ * ‖z - a‖\n[PROOFSTEP]\napply add_le_add\n[GOAL]\ncase h₁\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) a‖ ≤ (↑δ + ε) * (‖z‖ + ε)\n[PROOFSTEP]\nrw [mul_assoc] at I \n[GOAL]\ncase h₁\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * ((↑δ + ε) * (‖z‖ + ε))\n⊢ ‖↑(f' x - A) a‖ ≤ (↑δ + ε) * (‖z‖ + ε)\n[PROOFSTEP]\nexact (mul_le_mul_left rpos).1 I\n[GOAL]\ncase h₂\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nA : E →L[ℝ] E\nδ : ℝ≥0\nhf : ApproximatesLinearOn f A s δ\nhs : MeasurableSet s\nf' : E → E →L[ℝ] E\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nx : E\nhx : Tendsto (fun r => ↑↑μ (s ∩ closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 1)\nxs : x ∈ s\nz : E\nε : ℝ\nεpos : 0 < ε\nB₁ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, Set.Nonempty (s ∩ ({x} + r • closedBall z ε))\nρ : ℝ\nρpos : ρ > 0\nhρ : ball x ρ ∩ s ⊆ {y | ‖f y - f x - ↑(f' x) (y - x)‖ ≤ ε * ‖y - x‖}\nB₂ : ∀ᶠ (r : ℝ) in 𝓝[Ioi 0] 0, {x} + r • closedBall z ε ⊆ ball x ρ\nr : ℝ\ny : E\nys : y ∈ s\nhy : y ∈ {x} + r • closedBall z ε\nrρ : {x} + r • closedBall z ε ⊆ ball x ρ\nrpos : 0 < r\na : E\naz : a ∈ closedBall z ε\nya : y = x + r • a\nnorm_a : ‖a‖ ≤ ‖z‖ + ε\nI : r * ‖↑(f' x - A) a‖ ≤ r * (↑δ + ε) * (‖z‖ + ε)\n⊢ ‖↑(f' x - A) (z - a)‖ ≤ ‖f' x - A‖ * ‖z - a‖\n[PROOFSTEP]\napply ContinuousLinearMap.le_op_norm\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\n⊢ ↑↑μ (f '' s) = 0\n[PROOFSTEP]\nrefine' le_antisymm _ (zero_le _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\n⊢ ↑↑μ (f '' s) ≤ 0\n[PROOFSTEP]\nhave :\n  ∀ A : E →L[ℝ] E,\n    ∃ δ : ℝ≥0,\n      0 < δ ∧ ∀ (t : Set E), ApproximatesLinearOn f A t δ → μ (f '' t) ≤ (Real.toNNReal |A.det| + 1 : ℝ≥0) * μ t :=\n  by\n  intro A\n  let m : ℝ≥0 := Real.toNNReal |A.det| + 1\n  have I : ENNReal.ofReal |A.det| < m := by\n    simp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]\n  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩\n  exact ⟨δ, h', fun t ht => h t f ht⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\n⊢ ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        ∀ (t : Set E),\n          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n[PROOFSTEP]\nintro A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nA : E →L[ℝ] E\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n[PROOFSTEP]\nlet m : ℝ≥0 := Real.toNNReal |A.det| + 1\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n[PROOFSTEP]\nhave I : ENNReal.ofReal |A.det| < m := by\n  simp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, lt_add_iff_pos_right, zero_lt_one, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n[PROOFSTEP]\nrcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + 1\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nh' : 0 < δ\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n[PROOFSTEP]\nexact ⟨δ, h', fun t ht => h t f ht⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nthis :\n  ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        ∀ (t : Set E),\n          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ 0\n[PROOFSTEP]\nchoose δ hδ using this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ 0\n[PROOFSTEP]\nobtain ⟨t, A, _, _, t_cover, ht, -⟩ :\n  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),\n    Pairwise (Disjoint on t) ∧\n      (∀ n : ℕ, MeasurableSet (t n)) ∧\n        (s ⊆ ⋃ n : ℕ, t n) ∧\n          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧\n            (s.Nonempty → ∀ n, ∃ y ∈ s, A n = fderivWithin ℝ f s y) :=\n  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s (fderivWithin ℝ f s)\n    (fun x xs => (hf x xs).hasFDerivWithinAt) δ fun A => (hδ A).1.ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ↑↑μ (f '' s) ≤ 0\n[PROOFSTEP]\ncalc\n  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by\n    apply measure_mono\n    rw [← image_iUnion, ← inter_iUnion]\n    exact image_subset f (subset_inter Subset.rfl t_cover)\n  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)\n  _ ≤ ∑' n, (Real.toNNReal |(A n).det| + 1 : ℝ≥0) * μ (s ∩ t n) :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply (hδ (A n)).2\n    exact ht n\n  _ ≤ ∑' n, ((Real.toNNReal |(A n).det| + 1 : ℝ≥0) : ℝ≥0∞) * 0 :=\n    by\n    refine' ENNReal.tsum_le_tsum fun n => mul_le_mul_left' _ _\n    exact le_trans (measure_mono (inter_subset_left _ _)) (le_of_eq hs)\n  _ = 0 := by simp only [tsum_zero, mul_zero]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)\n[PROOFSTEP]\nrw [← image_iUnion, ← inter_iUnion]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)\n[PROOFSTEP]\nexact image_subset f (subset_inter Subset.rfl t_cover)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ↑↑μ (f '' (s ∩ t n)) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply (hδ (A n)).2\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n[PROOFSTEP]\nexact ht n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * ↑↑μ (s ∩ t n) ≤\n    ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * 0\n[PROOFSTEP]\nrefine' ENNReal.tsum_le_tsum fun n => mul_le_mul_left' _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ↑↑μ (s ∩ t n) ≤ 0\n[PROOFSTEP]\nexact le_trans (measure_mono (inter_subset_left _ _)) (le_of_eq hs)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf : DifferentiableOn ℝ f s\nhs : ↑↑μ s = 0\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + 1) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nleft✝¹ : Pairwise (Disjoint on t)\nleft✝ : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + 1) * 0 = 0\n[PROOFSTEP]\nsimp only [tsum_zero, mul_zero]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\n⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nrcases eq_empty_or_nonempty s with (rfl | h's)\n[GOAL]\ncase inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nR : ℝ\nε : ℝ≥0\nεpos : 0 < ε\nhf' : ∀ (x : E), x ∈ ∅ → HasFDerivWithinAt f (f' x) ∅ x\nhs : ∅ ⊆ closedBall 0 R\nh'f' : ∀ (x : E), x ∈ ∅ → ContinuousLinearMap.det (f' x) = 0\n⊢ ↑↑μ (f '' ∅) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nsimp only [measure_empty, zero_le, image_empty]\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\n⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nhave :\n  ∀ A : E →L[ℝ] E,\n    ∃ δ : ℝ≥0,\n      0 < δ ∧ ∀ (t : Set E), ApproximatesLinearOn f A t δ → μ (f '' t) ≤ (Real.toNNReal |A.det| + ε : ℝ≥0) * μ t :=\n  by\n  intro A\n  let m : ℝ≥0 := Real.toNNReal |A.det| + ε\n  have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩\n  exact ⟨δ, h', fun t ht => h t f ht⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\n⊢ ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        ∀ (t : Set E),\n          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n[PROOFSTEP]\nintro A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nA : E →L[ℝ] E\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n[PROOFSTEP]\nlet m : ℝ≥0 := Real.toNNReal |A.det| + ε\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n[PROOFSTEP]\nhave I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n[PROOFSTEP]\nrcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, h'⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nh' : 0 < δ\n⊢ ∃ δ,\n    0 < δ ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n[PROOFSTEP]\nexact ⟨δ, h', fun t ht => h t f ht⟩\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nthis :\n  ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        ∀ (t : Set E),\n          ApproximatesLinearOn f A t δ → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nchoose δ hδ using this\n[GOAL]\ncase inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nobtain ⟨t, A, t_disj, t_meas, t_cover, ht, Af'⟩ :\n  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),\n    Pairwise (Disjoint on t) ∧\n      (∀ n : ℕ, MeasurableSet (t n)) ∧\n        (s ⊆ ⋃ n : ℕ, t n) ∧\n          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=\n  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'\n[GOAL]\ncase inr.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑↑μ (f '' s) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\ncalc\n  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by\n    apply measure_mono\n    rw [← image_iUnion, ← inter_iUnion]\n    exact image_subset f (subset_inter Subset.rfl t_cover)\n  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)\n  _ ≤ ∑' n, (Real.toNNReal |(A n).det| + ε : ℝ≥0) * μ (s ∩ t n) :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply (hδ (A n)).2\n    exact ht n\n  _ = ∑' n, ε * μ (s ∩ t n) := by\n    congr with n\n    rcases Af' h's n with ⟨y, ys, hy⟩\n    simp only [hy, h'f' y ys, Real.toNNReal_zero, abs_zero, zero_add]\n  _ ≤ ε * ∑' n, μ (closedBall 0 R ∩ t n) := by\n    rw [ENNReal.tsum_mul_left]\n    refine' mul_le_mul_left' (ENNReal.tsum_le_tsum fun n => measure_mono _) _\n    exact inter_subset_inter_left _ hs\n  _ = ε * μ (⋃ n, closedBall 0 R ∩ t n) := by\n    rw [measure_iUnion]\n    · exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n    · intro n\n      exact measurableSet_closedBall.inter (t_meas n)\n  _ ≤ ε * μ (closedBall 0 R) := by\n    rw [← inter_iUnion]\n    exact mul_le_mul_left' (measure_mono (inter_subset_left _ _)) _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)\n[PROOFSTEP]\nrw [← image_iUnion, ← inter_iUnion]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)\n[PROOFSTEP]\nexact image_subset f (subset_inter Subset.rfl t_cover)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ ↑↑μ (f '' (s ∩ t n)) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply (hδ (A n)).2\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n[PROOFSTEP]\nexact ht n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∑' (n : ℕ), ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ∑' (n : ℕ), ↑ε * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\ncongr with n\n[GOAL]\ncase e_f.h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ↑ε * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\nrcases Af' h's n with ⟨y, ys, hy⟩\n[GOAL]\ncase e_f.h.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\ny : E\nys : y ∈ s\nhy : A n = f' y\n⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (A n)| + ε) * ↑↑μ (s ∩ t n) = ↑ε * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\nsimp only [hy, h'f' y ys, Real.toNNReal_zero, abs_zero, zero_add]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∑' (n : ℕ), ↑ε * ↑↑μ (s ∩ t n) ≤ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n)\n[PROOFSTEP]\nrw [ENNReal.tsum_mul_left]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i) ≤ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n)\n[PROOFSTEP]\nrefine' mul_le_mul_left' (ENNReal.tsum_le_tsum fun n => measure_mono _) _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ s ∩ t n ⊆ closedBall 0 R ∩ t n\n[PROOFSTEP]\nexact inter_subset_inter_left _ hs\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑ε * ∑' (n : ℕ), ↑↑μ (closedBall 0 R ∩ t n) = ↑ε * ↑↑μ (⋃ (n : ℕ), closedBall 0 R ∩ t n)\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ Pairwise (Disjoint on fun n => closedBall 0 R ∩ t n)\n[PROOFSTEP]\nexact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∀ (i : ℕ), MeasurableSet (closedBall 0 R ∩ t i)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\nn : ℕ\n⊢ MeasurableSet (closedBall 0 R ∩ t n)\n[PROOFSTEP]\nexact measurableSet_closedBall.inter (t_meas n)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑ε * ↑↑μ (⋃ (n : ℕ), closedBall 0 R ∩ t n) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nrw [← inter_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nR : ℝ\nhs : s ⊆ closedBall 0 R\nε : ℝ≥0\nεpos : 0 < ε\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nh's : Set.Nonempty s\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      ∀ (t : Set E),\n        ApproximatesLinearOn f A t (δ A) → ↑↑μ (f '' t) ≤ ↑(Real.toNNReal |ContinuousLinearMap.det A| + ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nAf' : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ↑ε * ↑↑μ (closedBall 0 R ∩ ⋃ (i : ℕ), t i) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nexact mul_le_mul_left' (measure_mono (inter_subset_left _ _)) _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\n⊢ ↑↑μ (f '' s) = 0\n[PROOFSTEP]\nsuffices H : ∀ R, μ (f '' (s ∩ closedBall 0 R)) = 0\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ↑↑μ (f '' s) = 0\n[PROOFSTEP]\napply le_antisymm _ (zero_le _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ↑↑μ (f '' s) ≤ 0\n[PROOFSTEP]\nrw [← iUnion_inter_closedBall_nat s 0]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ↑↑μ (f '' ⋃ (n : ℕ), s ∩ closedBall 0 ↑n) ≤ 0\n[PROOFSTEP]\ncalc\n  μ (f '' ⋃ n : ℕ, s ∩ closedBall 0 n) ≤ ∑' n : ℕ, μ (f '' (s ∩ closedBall 0 n)) := by rw [image_iUnion];\n    exact measure_iUnion_le _\n  _ ≤ 0 := by simp only [H, tsum_zero, nonpos_iff_eq_zero]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ↑↑μ (f '' ⋃ (n : ℕ), s ∩ closedBall 0 ↑n) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n))\n[PROOFSTEP]\nrw [image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ↑↑μ (⋃ (i : ℕ), f '' (s ∩ closedBall 0 ↑i)) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n))\n[PROOFSTEP]\nexact measure_iUnion_le _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nH : ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ closedBall 0 ↑n)) ≤ 0\n[PROOFSTEP]\nsimp only [H, tsum_zero, nonpos_iff_eq_zero]\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\n⊢ ∀ (R : ℝ), ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n[PROOFSTEP]\nintro R\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\n⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n[PROOFSTEP]\nhave A : ∀ (ε : ℝ≥0), 0 < ε → μ (f '' (s ∩ closedBall 0 R)) ≤ ε * μ (closedBall 0 R) := fun ε εpos =>\n  addHaar_image_eq_zero_of_det_fderivWithin_eq_zero_aux μ (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) R\n    (inter_subset_right _ _) ε εpos fun x hx => h'f' x hx.1\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n[PROOFSTEP]\nhave B : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝[>] 0) (𝓝 0) :=\n  by\n  have : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝 0) (𝓝 (((0 : ℝ≥0) : ℝ≥0∞) * μ (closedBall 0 R))) :=\n    ENNReal.Tendsto.mul_const (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr measure_closedBall_lt_top.ne)\n  simp only [zero_mul, ENNReal.coe_zero] at this \n  exact Tendsto.mono_left this nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\n⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nhave : Tendsto (fun ε : ℝ≥0 => (ε : ℝ≥0∞) * μ (closedBall 0 R)) (𝓝 0) (𝓝 (((0 : ℝ≥0) : ℝ≥0∞) * μ (closedBall 0 R))) :=\n  ENNReal.Tendsto.mul_const (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr measure_closedBall_lt_top.ne)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nthis : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝 0) (𝓝 (↑0 * ↑↑μ (closedBall 0 R)))\n⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nsimp only [zero_mul, ENNReal.coe_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nthis : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝 0) (𝓝 0)\n⊢ Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n[PROOFSTEP]\nexact Tendsto.mono_left this nhdsWithin_le_nhds\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nB : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) = 0\n[PROOFSTEP]\napply le_antisymm _ (zero_le _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nB : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ 0\n[PROOFSTEP]\napply ge_of_tendsto B\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nB : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0, ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑c * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nh'f' : ∀ (x : E), x ∈ s → ContinuousLinearMap.det (f' x) = 0\nR : ℝ\nA : ∀ (ε : ℝ≥0), 0 < ε → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑ε * ↑↑μ (closedBall 0 R)\nB : Tendsto (fun ε => ↑ε * ↑↑μ (closedBall 0 R)) (𝓝[Ioi 0] 0) (𝓝 0)\n⊢ ∀ (a : ℝ≥0), a ∈ Ioi 0 → ↑↑μ (f '' (s ∩ closedBall 0 R)) ≤ ↑a * ↑↑μ (closedBall 0 R)\n[PROOFSTEP]\nexact A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable f'\n[PROOFSTEP]\nrefine' aemeasurable_of_unif_approx fun ε εpos => _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\n⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε\n[PROOFSTEP]\nlet δ : ℝ≥0 := ⟨ε, le_of_lt εpos⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\n⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε\n[PROOFSTEP]\nhave δpos : 0 < δ := εpos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\n⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε\n[PROOFSTEP]\nobtain ⟨t, A, t_disj, t_meas, t_cover, ht, _⟩ :\n  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),\n    Pairwise (Disjoint on t) ∧\n      (∀ n : ℕ, MeasurableSet (t n)) ∧\n        (s ⊆ ⋃ n : ℕ, t n) ∧\n          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) δ) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=\n  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' (fun _ => δ) fun _ => δpos.ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\n⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε\n[PROOFSTEP]\nobtain ⟨g, g_meas, hg⟩ : ∃ g : E → E →L[ℝ] E, Measurable g ∧ ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n :=\n  exists_measurable_piecewise t t_meas (fun n _ => A n) (fun n => measurable_const) <|\n    t_disj.mono fun i j h => by simp only [h.inter_eq, eqOn_empty]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ni j : ℕ\nh : (Disjoint on t) i j\n⊢ EqOn ((fun n x => A n) i) ((fun n x => A n) j) (t i ∩ t j)\n[PROOFSTEP]\nsimp only [h.inter_eq, eqOn_empty]\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\n⊢ ∃ f, AEMeasurable f ∧ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (f x) (f' x) ≤ ε\n[PROOFSTEP]\nrefine'\n  ⟨g, g_meas.aemeasurable, _⟩\n    -- reduce to checking that `f'` and `g` are close on almost all of `s ∩ t n`, for all `n`.\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nsuffices H : ∀ᵐ x : E ∂sum fun n => μ.restrict (s ∩ t n), dist (g x) (f' x) ≤ ε\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nhave : μ.restrict s ≤ sum fun n => μ.restrict (s ∩ t n) :=\n  by\n  have : s = ⋃ n, s ∩ t n := by\n    rw [← inter_iUnion]\n    exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n  conv_lhs => rw [this]\n  exact restrict_iUnion_le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n⊢ Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)\n[PROOFSTEP]\nhave : s = ⋃ n, s ∩ t n := by\n  rw [← inter_iUnion]\n  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n⊢ s = ⋃ (n : ℕ), s ∩ t n\n[PROOFSTEP]\nrw [← inter_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n⊢ s = s ∩ ⋃ (i : ℕ), t i\n[PROOFSTEP]\nexact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)\n[PROOFSTEP]\nconv_lhs => rw [this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : s = ⋃ (n : ℕ), s ∩ t n\n| Measure.restrict μ s\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : s = ⋃ (n : ℕ), s ∩ t n\n| Measure.restrict μ s\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : s = ⋃ (n : ℕ), s ∩ t n\n| Measure.restrict μ s\n[PROOFSTEP]\nrw [this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Measure.restrict μ (⋃ (n : ℕ), s ∩ t n) ≤ sum fun n => Measure.restrict μ (s ∩ t n)\n[PROOFSTEP]\nexact restrict_iUnion_le\n[GOAL]\ncase intro.intro.intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nH : ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\nthis : Measure.restrict μ s ≤ sum fun n => Measure.restrict μ (s ∩ t n)\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nexact ae_mono this H\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\n⊢ ∀ᵐ (x : E) ∂sum fun n => Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nrefine'\n  ae_sum_iff.2 fun n =>\n    _\n      -- on almost all `s ∩ t n`, `f' x` is close to `A n` thanks to\n        -- `ApproximatesLinearOn.norm_fderiv_sub_le`.\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nhave E₁ : ∀ᵐ x : E ∂μ.restrict (s ∩ t n), ‖f' x - A n‖₊ ≤ δ :=\n  (ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>\n    (hf' x hx.1).mono\n      (inter_subset_left _ _)\n        -- moreover, `g x` is equal to `A n` there.\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nhave E₂ : ∀ᵐ x : E ∂μ.restrict (s ∩ t n), g x = A n :=\n  by\n  suffices H : ∀ᵐ x : E ∂μ.restrict (t n), g x = A n\n  exact ae_mono (restrict_mono (inter_subset_right _ _) le_rfl) H\n  filter_upwards [ae_restrict_mem (t_meas n)]\n  exact hg n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\n[PROOFSTEP]\nsuffices H : ∀ᵐ x : E ∂μ.restrict (t n), g x = A n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\nH : ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n\n[PROOFSTEP]\nexact ae_mono (restrict_mono (inter_subset_right _ _) le_rfl) H\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (t n), g x = A n\n[PROOFSTEP]\nfilter_upwards [ae_restrict_mem (t_meas n)]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\n⊢ ∀ (a : E), a ∈ t n → g a = A n\n[PROOFSTEP]\nexact hg n\n[GOAL]\ncase H\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\nE₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nfilter_upwards [E₁, E₂] with x hx1 hx2\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\nE₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\nx : E\nhx1 : ‖f' x - A n‖₊ ≤ { val := ε, property := (_ : 0 ≤ ε) }\nhx2 : g x = A n\n⊢ dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nrw [← nndist_eq_nnnorm] at hx1 \n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\nE₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\nx : E\nhx1 : nndist (f' x) (A n) ≤ { val := ε, property := (_ : 0 ≤ ε) }\nhx2 : g x = A n\n⊢ dist (g x) (f' x) ≤ ε\n[PROOFSTEP]\nrw [hx2, dist_comm]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ\nεpos : ε > 0\nδ : ℝ≥0 := { val := ε, property := (_ : 0 ≤ ε) }\nδpos : 0 < δ\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) δ\nright✝ : Set.Nonempty s → ∀ (n : ℕ), ∃ y, y ∈ s ∧ A n = f' y\ng : E → E →L[ℝ] E\ng_meas : Measurable g\nhg : ∀ (n : ℕ) (x : E), x ∈ t n → g x = A n\nn : ℕ\nE₁ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), ‖f' x - A n‖₊ ≤ δ\nE₂ : ∀ᵐ (x : E) ∂Measure.restrict μ (s ∩ t n), g x = A n\nx : E\nhx1 : nndist (f' x) (A n) ≤ { val := ε, property := (_ : 0 ≤ ε) }\nhx2 : g x = A n\n⊢ dist (f' x) (A n) ≤ ε\n[PROOFSTEP]\nexact hx1\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\napply ENNReal.measurable_ofReal.comp_aemeasurable\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\nrefine' continuous_abs.measurable.comp_aemeasurable _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => ContinuousLinearMap.det (f' x)\n[PROOFSTEP]\nrefine' ContinuousLinearMap.continuous_det.measurable.comp_aemeasurable _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => f' x\n[PROOFSTEP]\nexact aemeasurable_fderivWithin μ hs hf'\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => Real.toNNReal |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\napply measurable_real_toNNReal.comp_aemeasurable\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\nrefine' continuous_abs.measurable.comp_aemeasurable _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => ContinuousLinearMap.det (f' x)\n[PROOFSTEP]\nrefine' ContinuousLinearMap.continuous_det.measurable.comp_aemeasurable _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ AEMeasurable fun x => f' x\n[PROOFSTEP]\nexact aemeasurable_fderivWithin μ hs hf'\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nhave :\n  ∀ A : E →L[ℝ] E,\n    ∃ δ : ℝ≥0,\n      0 < δ ∧\n        (∀ B : E →L[ℝ] E, ‖B - A‖ ≤ δ → |B.det - A.det| ≤ ε) ∧\n          ∀ (t : Set E) (g : E → E), ApproximatesLinearOn g A t δ → μ (g '' t) ≤ (ENNReal.ofReal |A.det| + ε) * μ t :=\n  by\n  intro A\n  let m : ℝ≥0 := Real.toNNReal |A.det| + ε\n  have I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n  rcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩\n  obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=\n    continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos\n  let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩\n  refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩\n  · intro B hB\n    rw [← Real.dist_eq]\n    apply (hδ' B _).le\n    rw [dist_eq_norm]\n    calc\n      ‖B - A‖ ≤ (min δ δ'' : ℝ≥0) := hB\n      _ ≤ δ'' := by simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]\n      _ < δ' := half_lt_self δ'pos\n  · intro t g htg\n    exact h t g (htg.mono_num (min_le_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n          ∀ (t : Set E) (g : E → E),\n            ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nintro A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nlet m : ℝ≥0 := Real.toNNReal |A.det| + ε\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nhave I : ENNReal.ofReal |A.det| < m := by simp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, lt_add_iff_pos_right, εpos, ENNReal.coe_lt_coe]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nrcases((addHaar_image_le_mul_of_det_lt μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nobtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=\n  continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nlet δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩\n[GOAL]\ncase intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nrefine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\n⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(min δ δ'') → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\nintro B hB\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\nrw [← Real.dist_eq]\n[GOAL]\ncase intro.intro.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) ≤ ↑ε\n[PROOFSTEP]\napply (hδ' B _).le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ dist B A < δ'\n[PROOFSTEP]\nrw [dist_eq_norm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ ‖B - A‖ < δ'\n[PROOFSTEP]\ncalc\n  ‖B - A‖ ≤ (min δ δ'' : ℝ≥0) := hB\n  _ ≤ δ'' := by simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]\n  _ < δ' := half_lt_self δ'pos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ ↑(min δ δ'') ≤ ↑δ''\n[PROOFSTEP]\nsimp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\n⊢ ∀ (t : Set E) (g : E → E),\n    ApproximatesLinearOn g A t (min δ δ'') → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nintro t g htg\n[GOAL]\ncase intro.intro.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| + ε\nI : ENNReal.ofReal |ContinuousLinearMap.det A| < ↑m\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑↑μ (f '' s) ≤ ↑m * ↑↑μ s\nδpos : 0 < δ\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\n⊢ ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n[PROOFSTEP]\nexact h t g (htg.mono_num (min_le_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nthis :\n  ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n          ∀ (t : Set E) (g : E → E),\n            ApproximatesLinearOn g A t δ → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nchoose δ hδ using this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nobtain ⟨t, A, t_disj, t_meas, t_cover, ht, -⟩ :\n  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),\n    Pairwise (Disjoint on t) ∧\n      (∀ n : ℕ, MeasurableSet (t n)) ∧\n        (s ⊆ ⋃ n : ℕ, t n) ∧\n          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=\n  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\ncalc\n  μ (f '' s) ≤ μ (⋃ n, f '' (s ∩ t n)) := by\n    apply measure_mono\n    rw [← image_iUnion, ← inter_iUnion]\n    exact image_subset f (subset_inter Subset.rfl t_cover)\n  _ ≤ ∑' n, μ (f '' (s ∩ t n)) := (measure_iUnion_le _)\n  _ ≤ ∑' n, (ENNReal.ofReal |(A n).det| + ε) * μ (s ∩ t n) :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply (hδ (A n)).2.2\n    exact ht n\n  _ = ∑' n, ∫⁻ _ in s ∩ t n, ENNReal.ofReal |(A n).det| + ε ∂μ := by\n    simp only [lintegral_const, MeasurableSet.univ, Measure.restrict_apply, univ_inter]\n  _ ≤ ∑' n, ∫⁻ x in s ∩ t n, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply lintegral_mono_ae\n    filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>\n        (hf' x hx.1).mono (inter_subset_left _ _)]\n    intro x hx\n    have I : |(A n).det| ≤ |(f' x).det| + ε :=\n      calc\n        |(A n).det| = |(f' x).det - ((f' x).det - (A n).det)| := by congr 1; abel\n        _ ≤ |(f' x).det| + |(f' x).det - (A n).det| := (abs_sub _ _)\n        _ ≤ |(f' x).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)\n    calc\n      ENNReal.ofReal |(A n).det| + ε ≤ ENNReal.ofReal (|(f' x).det| + ε) + ε :=\n        add_le_add (ENNReal.ofReal_le_ofReal I) le_rfl\n      _ = ENNReal.ofReal |(f' x).det| + 2 * ε := by\n        simp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n  _ = ∫⁻ x in ⋃ n, s ∩ t n, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=\n    by\n    have M : ∀ n : ℕ, MeasurableSet (s ∩ t n) := fun n => hs.inter (t_meas n)\n    rw [lintegral_iUnion M]\n    exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n  _ = ∫⁻ x in s, ENNReal.ofReal |(f' x).det| + 2 * ε ∂μ :=\n    by\n    have : s = ⋃ n, s ∩ t n := by\n      rw [← inter_iUnion]\n      exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n    rw [← this]\n  _ = (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * ε * μ s := by\n    simp only [lintegral_add_right' _ aemeasurable_const, set_lintegral_const]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ↑↑μ (f '' s) ≤ ↑↑μ (⋃ (n : ℕ), f '' (s ∩ t n))\n[PROOFSTEP]\napply measure_mono\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ f '' s ⊆ ⋃ (n : ℕ), f '' (s ∩ t n)\n[PROOFSTEP]\nrw [← image_iUnion, ← inter_iUnion]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ f '' s ⊆ f '' (s ∩ ⋃ (i : ℕ), t i)\n[PROOFSTEP]\nexact image_subset f (subset_inter Subset.rfl t_cover)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ t n)) ≤ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ↑↑μ (f '' (s ∩ t n)) ≤ (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\napply (hδ (A n)).2.2\n[GOAL]\ncase a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n[PROOFSTEP]\nexact ht n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε) * ↑↑μ (s ∩ t n) =\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ\n[PROOFSTEP]\nsimp only [lintegral_const, MeasurableSet.univ, Measure.restrict_apply, univ_inter]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ ≤\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ ≤\n    ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\napply lintegral_mono_ae\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ∀ᵐ (a : E) ∂Measure.restrict μ (s ∩ t n),\n    ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' a)| + 2 * ↑ε\n[PROOFSTEP]\nfilter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>\n    (hf' x hx.1).mono (inter_subset_left _ _)]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\n⊢ ∀ (a : E),\n    ‖f' a - A n‖₊ ≤ δ (A n) →\n      ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' a)| + 2 * ↑ε\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε\n[PROOFSTEP]\nhave I : |(A n).det| ≤ |(f' x).det| + ε :=\n  calc\n    |(A n).det| = |(f' x).det - ((f' x).det - (A n).det)| := by congr 1; abel\n    _ ≤ |(f' x).det| + |(f' x).det - (A n).det| := (abs_sub _ _)\n    _ ≤ |(f' x).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ |ContinuousLinearMap.det (A n)| =\n    |ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))|\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ContinuousLinearMap.det (A n) =\n    ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ContinuousLinearMap.det (A n) =\n    ContinuousLinearMap.det (f' x) - (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\nI : |ContinuousLinearMap.det (A n)| ≤ |ContinuousLinearMap.det (f' x)| + ↑ε\n⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ≤ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε\n[PROOFSTEP]\ncalc\n  ENNReal.ofReal |(A n).det| + ε ≤ ENNReal.ofReal (|(f' x).det| + ε) + ε :=\n    add_le_add (ENNReal.ofReal_le_ofReal I) le_rfl\n  _ = ENNReal.ofReal |(f' x).det| + 2 * ε := by\n    simp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\nI : |ContinuousLinearMap.det (A n)| ≤ |ContinuousLinearMap.det (f' x)| + ↑ε\n⊢ ENNReal.ofReal (|ContinuousLinearMap.det (f' x)| + ↑ε) + ↑ε = ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_add, abs_nonneg, two_mul, add_assoc, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =\n    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\nhave M : ∀ n : ℕ, MeasurableSet (s ∩ t n) := fun n => hs.inter (t_meas n)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nM : ∀ (n : ℕ), MeasurableSet (s ∩ t n)\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =\n    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\nrw [lintegral_iUnion M]\n[GOAL]\ncase hd\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nM : ∀ (n : ℕ), MeasurableSet (s ∩ t n)\n⊢ Pairwise (Disjoint on fun i => s ∩ t i)\n[PROOFSTEP]\nexact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\nhave : s = ⋃ n, s ∩ t n := by\n  rw [← inter_iUnion]\n  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ s = ⋃ (n : ℕ), s ∩ t n\n[PROOFSTEP]\nrw [← inter_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ s = s ∩ ⋃ (i : ℕ), t i\n[PROOFSTEP]\nexact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\nthis : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) → ↑↑μ (g '' t) ≤ (ENNReal.ofReal |ContinuousLinearMap.det A| + ↑ε) * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| + 2 * ↑ε ∂μ =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nsimp only [lintegral_add_right' _ aemeasurable_const, set_lintegral_const]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nhave :\n  Tendsto (fun ε : ℝ≥0 => (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * ε * μ s) (𝓝[>] 0)\n    (𝓝 ((∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) + 2 * (0 : ℝ≥0) * μ s)) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  refine' tendsto_const_nhds.add _\n  refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)\n  exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.add _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ Tendsto (fun ε => 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\nrefine' ENNReal.Tendsto.mul_const _ (Or.inr h's)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ Tendsto (fun ε => 2 * ↑ε) (𝓝 0) (𝓝 (2 * ↑0))\n[PROOFSTEP]\nexact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nthis :\n  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑0 * ↑↑μ s))\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nsimp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nthis :\n  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\napply ge_of_tendsto this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nthis :\n  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))\n⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0,\n    ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑c * ↑↑μ s\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nthis :\n  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))\n⊢ ∀ (a : ℝ≥0),\n    a ∈ Ioi 0 → ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑a * ↑↑μ s\n[PROOFSTEP]\nrintro ε (εpos : 0 < ε)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nthis :\n  Tendsto (fun ε => ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0)\n    (𝓝 (∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ))\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nexact addHaar_image_le_lintegral_abs_det_fderiv_aux1 μ hs hf' εpos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nlet u n := disjointed (spanningSets μ) n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nhave u_meas : ∀ n, MeasurableSet (u n) := by\n  intro n\n  apply MeasurableSet.disjointed fun i => ?_\n  exact measurable_spanningSets μ i\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\n⊢ ∀ (n : ℕ), MeasurableSet (u n)\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nn : ℕ\n⊢ MeasurableSet (u n)\n[PROOFSTEP]\napply MeasurableSet.disjointed fun i => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nn i : ℕ\n⊢ MeasurableSet (spanningSets μ i)\n[PROOFSTEP]\nexact measurable_spanningSets μ i\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nhave A : s = ⋃ n, s ∩ u n := by rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\n⊢ s = ⋃ (n : ℕ), s ∩ u n\n[PROOFSTEP]\nrw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ↑↑μ (f '' s) ≤ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\ncalc\n  μ (f '' s) ≤ ∑' n, μ (f '' (s ∩ u n)) := by\n    conv_lhs => rw [A, image_iUnion]\n    exact measure_iUnion_le _\n  _ ≤ ∑' n, ∫⁻ x in s ∩ u n, ENNReal.ofReal |(f' x).det| ∂μ :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply\n      addHaar_image_le_lintegral_abs_det_fderiv_aux2 μ (hs.inter (u_meas n)) _ fun x hx =>\n        (hf' x hx.1).mono (inter_subset_left _ _)\n    have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)\n    exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)\n  _ = ∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ := by\n    conv_rhs => rw [A]\n    rw [lintegral_iUnion]\n    · intro n; exact hs.inter (u_meas n)\n    · exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ↑↑μ (f '' s) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))\n[PROOFSTEP]\nconv_lhs => rw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ↑↑μ (⋃ (i : ℕ), f '' (s ∩ u i)) ≤ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))\n[PROOFSTEP]\nexact measure_iUnion_le _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) ≤\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ ↑↑μ (f '' (s ∩ u n)) ≤ ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\napply\n  addHaar_image_le_lintegral_abs_det_fderiv_aux2 μ (hs.inter (u_meas n)) _ fun x hx =>\n    (hf' x hx.1).mono (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ ↑↑μ (s ∩ u n) ≠ ⊤\n[PROOFSTEP]\nhave : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\nthis : ↑↑μ (u n) < ⊤\n⊢ ↑↑μ (s ∩ u n) ≠ ⊤\n[PROOFSTEP]\nexact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nconv_rhs => rw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [lintegral_iUnion]\n[GOAL]\ncase hm\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∀ (i : ℕ), MeasurableSet (s ∩ u i)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase hm\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ MeasurableSet (s ∩ u n)\n[PROOFSTEP]\nexact hs.inter (u_meas n)\n[GOAL]\ncase hd\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ Pairwise (Disjoint on fun n => s ∩ u n)\n[PROOFSTEP]\nexact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nhave :\n  ∀ A : E →L[ℝ] E,\n    ∃ δ : ℝ≥0,\n      0 < δ ∧\n        (∀ B : E →L[ℝ] E, ‖B - A‖ ≤ δ → |B.det - A.det| ≤ ε) ∧\n          ∀ (t : Set E) (g : E → E),\n            ApproximatesLinearOn g A t δ → ENNReal.ofReal |A.det| * μ t ≤ μ (g '' t) + ε * μ t :=\n  by\n  intro A\n  obtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=\n    continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos\n  let δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩\n  have I'' : ∀ B : E →L[ℝ] E, ‖B - A‖ ≤ ↑δ'' → |B.det - A.det| ≤ ↑ε :=\n    by\n    intro B hB\n    rw [← Real.dist_eq]\n    apply (hδ' B _).le\n    rw [dist_eq_norm]\n    exact hB.trans_lt (half_lt_self δ'pos)\n  rcases eq_or_ne A.det 0 with (hA | hA)\n  · refine' ⟨δ'', half_pos δ'pos, I'', _⟩\n    simp only [hA, forall_const, zero_mul, ENNReal.ofReal_zero, imp_true_iff, zero_le, abs_zero]\n  let m : ℝ≥0 := Real.toNNReal |A.det| - ε\n  have I : (m : ℝ≥0∞) < ENNReal.ofReal |A.det| :=\n    by\n    simp only [ENNReal.ofReal, ENNReal.coe_sub]\n    apply ENNReal.sub_lt_self ENNReal.coe_ne_top\n    · simpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA\n    · simp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]\n  rcases((mul_le_addHaar_image_of_lt_det μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩\n  refine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩\n  · intro B hB\n    apply I'' _ (hB.trans _)\n    simp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]\n  · intro t g htg\n    rcases eq_or_ne (μ t) ∞ with (ht | ht)\n    · simp only [ht, εpos.ne', ENNReal.mul_top, ENNReal.coe_eq_zero, le_top, Ne.def, not_false_iff, _root_.add_top]\n    have := h t g (htg.mono_num (min_le_left _ _))\n    rwa [ENNReal.coe_sub, ENNReal.sub_mul, tsub_le_iff_right] at this \n    simp only [ht, imp_true_iff, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n          ∀ (t : Set E) (g : E → E),\n            ApproximatesLinearOn g A t δ →\n              ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nintro A\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nobtain ⟨δ', δ'pos, hδ'⟩ : ∃ (δ' : ℝ), 0 < δ' ∧ ∀ B, dist B A < δ' → dist B.det A.det < ↑ε :=\n  continuousAt_iff.1 ContinuousLinearMap.continuous_det.continuousAt ε εpos\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nlet δ'' : ℝ≥0 := ⟨δ' / 2, (half_pos δ'pos).le⟩\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nhave I'' : ∀ B : E →L[ℝ] E, ‖B - A‖ ≤ ↑δ'' → |B.det - A.det| ≤ ↑ε :=\n  by\n  intro B hB\n  rw [← Real.dist_eq]\n  apply (hδ' B _).le\n  rw [dist_eq_norm]\n  exact hB.trans_lt (half_lt_self δ'pos)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\n⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\nintro B hB\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑δ''\n⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\nrw [← Real.dist_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑δ''\n⊢ dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) ≤ ↑ε\n[PROOFSTEP]\napply (hδ' B _).le\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑δ''\n⊢ dist B A < δ'\n[PROOFSTEP]\nrw [dist_eq_norm]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑δ''\n⊢ ‖B - A‖ < δ'\n[PROOFSTEP]\nexact hB.trans_lt (half_lt_self δ'pos)\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrcases eq_or_ne A.det 0 with (hA | hA)\n[GOAL]\ncase intro.intro.inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A = 0\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrefine' ⟨δ'', half_pos δ'pos, I'', _⟩\n[GOAL]\ncase intro.intro.inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A = 0\n⊢ ∀ (t : Set E) (g : E → E),\n    ApproximatesLinearOn g A t δ'' → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nsimp only [hA, forall_const, zero_mul, ENNReal.ofReal_zero, imp_true_iff, zero_le, abs_zero]\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nlet m : ℝ≥0 := Real.toNNReal |A.det| - ε\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nhave I : (m : ℝ≥0∞) < ENNReal.ofReal |A.det| :=\n  by\n  simp only [ENNReal.ofReal, ENNReal.coe_sub]\n  apply ENNReal.sub_lt_self ENNReal.coe_ne_top\n  · simpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA\n  · simp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\n⊢ ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\n[PROOFSTEP]\nsimp only [ENNReal.ofReal, ENNReal.coe_sub]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\n⊢ ↑(Real.toNNReal |ContinuousLinearMap.det A|) - ↑ε < ↑(Real.toNNReal |ContinuousLinearMap.det A|)\n[PROOFSTEP]\napply ENNReal.sub_lt_self ENNReal.coe_ne_top\n[GOAL]\ncase ha₀\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\n⊢ ↑(Real.toNNReal |ContinuousLinearMap.det A|) ≠ 0\n[PROOFSTEP]\nsimpa only [abs_nonpos_iff, Real.toNNReal_eq_zero, ENNReal.coe_eq_zero, Ne.def] using hA\n[GOAL]\ncase hb\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\n⊢ ↑ε ≠ 0\n[PROOFSTEP]\nsimp only [εpos.ne', ENNReal.coe_eq_zero, Ne.def, not_false_iff]\n[GOAL]\ncase intro.intro.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrcases((mul_le_addHaar_image_of_lt_det μ A I).and self_mem_nhdsWithin).exists with ⟨δ, h, δpos⟩\n[GOAL]\ncase intro.intro.inr.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\n⊢ ∃ δ,\n    0 < δ ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t δ → ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrefine' ⟨min δ δ'', lt_min δpos (half_pos δ'pos), _, _⟩\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\n⊢ ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(min δ δ'') → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\nintro B hB\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_1\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\n[PROOFSTEP]\napply I'' _ (hB.trans _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nB : E →L[ℝ] E\nhB : ‖B - A‖ ≤ ↑(min δ δ'')\n⊢ ↑(min δ δ'') ≤ ↑δ''\n[PROOFSTEP]\nsimp only [le_refl, NNReal.coe_min, min_le_iff, or_true_iff]\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\n⊢ ∀ (t : Set E) (g : E → E),\n    ApproximatesLinearOn g A t (min δ δ'') →\n      ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nintro t g htg\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrcases eq_or_ne (μ t) ∞ with (ht | ht)\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2.inl\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\nht : ↑↑μ t = ⊤\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nsimp only [ht, εpos.ne', ENNReal.mul_top, ENNReal.coe_eq_zero, le_top, Ne.def, not_false_iff, _root_.add_top]\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\nht : ↑↑μ t ≠ ⊤\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nhave := h t g (htg.mono_num (min_le_left _ _))\n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\nht : ↑↑μ t ≠ ⊤\nthis : ↑m * ↑↑μ t ≤ ↑↑μ (g '' t)\n⊢ ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n[PROOFSTEP]\nrwa [ENNReal.coe_sub, ENNReal.sub_mul, tsub_le_iff_right] at this \n[GOAL]\ncase intro.intro.inr.intro.intro.refine'_2.inr\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nA : E →L[ℝ] E\nδ' : ℝ\nδ'pos : 0 < δ'\nhδ' : ∀ (B : E →L[ℝ] E), dist B A < δ' → dist (ContinuousLinearMap.det B) (ContinuousLinearMap.det A) < ↑ε\nδ'' : ℝ≥0 := { val := δ' / 2, property := (_ : 0 ≤ δ' / 2) }\nI'' : ∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ'' → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε\nhA : ContinuousLinearMap.det A ≠ 0\nm : ℝ≥0 := Real.toNNReal |ContinuousLinearMap.det A| - ε\nI : ↑m < ENNReal.ofReal |ContinuousLinearMap.det A|\nδ : ℝ≥0\nh : ∀ (s : Set E) (f : E → E), ApproximatesLinearOn f A s δ → ↑m * ↑↑μ s ≤ ↑↑μ (f '' s)\nδpos : 0 < δ\nt : Set E\ng : E → E\nhtg : ApproximatesLinearOn g A t (min δ δ'')\nht : ↑↑μ t ≠ ⊤\nthis : (↑(Real.toNNReal |ContinuousLinearMap.det A|) - ↑ε) * ↑↑μ t ≤ ↑↑μ (g '' t)\n⊢ 0 < ↑ε → ↑ε < ↑(Real.toNNReal |ContinuousLinearMap.det A|) → ↑↑μ t ≠ ⊤\n[PROOFSTEP]\nsimp only [ht, imp_true_iff, Ne.def, not_false_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nthis :\n  ∀ (A : E →L[ℝ] E),\n    ∃ δ,\n      0 < δ ∧\n        (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑δ → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n          ∀ (t : Set E) (g : E → E),\n            ApproximatesLinearOn g A t δ →\n              ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nchoose δ hδ using this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nobtain ⟨t, A, t_disj, t_meas, t_cover, ht, -⟩ :\n  ∃ (t : ℕ → Set E) (A : ℕ → E →L[ℝ] E),\n    Pairwise (Disjoint on t) ∧\n      (∀ n : ℕ, MeasurableSet (t n)) ∧\n        (s ⊆ ⋃ n : ℕ, t n) ∧\n          (∀ n : ℕ, ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))) ∧ (s.Nonempty → ∀ n, ∃ y ∈ s, A n = f' y) :=\n  exists_partition_approximatesLinearOn_of_hasFDerivWithinAt f s f' hf' δ fun A => (hδ A).1.ne'\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nhave s_eq : s = ⋃ n, s ∩ t n := by\n  rw [← inter_iUnion]\n  exact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ s = ⋃ (n : ℕ), s ∩ t n\n[PROOFSTEP]\nrw [← inter_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\n⊢ s = s ∩ ⋃ (i : ℕ), t i\n[PROOFSTEP]\nexact Subset.antisymm (subset_inter Subset.rfl t_cover) (inter_subset_left _ _)\n[GOAL]\ncase intro.intro.intro.intro.intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\ncalc\n  (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) = ∑' n, ∫⁻ x in s ∩ t n, ENNReal.ofReal |(f' x).det| ∂μ :=\n    by\n    conv_lhs => rw [s_eq]\n    rw [lintegral_iUnion]\n    · exact fun n => hs.inter (t_meas n)\n    · exact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n  _ ≤ ∑' n, ∫⁻ _ in s ∩ t n, ENNReal.ofReal |(A n).det| + ε ∂μ :=\n    by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply lintegral_mono_ae\n    filter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>\n        (hf' x hx.1).mono (inter_subset_left _ _)]\n    intro x hx\n    have I : |(f' x).det| ≤ |(A n).det| + ε :=\n      calc\n        |(f' x).det| = |(A n).det + ((f' x).det - (A n).det)| := by congr 1; abel\n        _ ≤ |(A n).det| + |(f' x).det - (A n).det| := (abs_add _ _)\n        _ ≤ |(A n).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)\n    calc\n      ENNReal.ofReal |(f' x).det| ≤ ENNReal.ofReal (|(A n).det| + ε) := ENNReal.ofReal_le_ofReal I\n      _ = ENNReal.ofReal |(A n).det| + ε := by\n        simp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n  _ = ∑' n, (ENNReal.ofReal |(A n).det| * μ (s ∩ t n) + ε * μ (s ∩ t n)) := by\n    simp only [set_lintegral_const, lintegral_add_right _ measurable_const]\n  _ ≤ ∑' n, (μ (f '' (s ∩ t n)) + ε * μ (s ∩ t n) + ε * μ (s ∩ t n)) :=\n    by\n    refine' ENNReal.tsum_le_tsum fun n => add_le_add_right _ _\n    exact (hδ (A n)).2.2 _ _ (ht n)\n  _ = μ (f '' s) + 2 * ε * μ s := by\n    conv_rhs => rw [s_eq]\n    rw [image_iUnion, measure_iUnion]; rotate_left\n    · intro i j hij\n      apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)\n      exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (t_disj hij)\n    · intro i\n      exact\n        measurable_image_of_fderivWithin (hs.inter (t_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))\n          (hf.mono (inter_subset_left _ _))\n    rw [measure_iUnion]; rotate_left\n    · exact pairwise_disjoint_mono t_disj fun i => inter_subset_right _ _\n    · exact fun i => hs.inter (t_meas i)\n    rw [← ENNReal.tsum_mul_left, ← ENNReal.tsum_add]\n    congr 1\n    ext1 i\n    rw [mul_assoc, two_mul, add_assoc]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nconv_lhs => rw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [lintegral_iUnion]\n[GOAL]\ncase hm\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)\n[PROOFSTEP]\nexact fun n => hs.inter (t_meas n)\n[GOAL]\ncase hd\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Pairwise (Disjoint on fun n => s ∩ t n)\n[PROOFSTEP]\nexact pairwise_disjoint_mono t_disj fun n => inter_subset_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\n⊢ ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤\n    ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ\n[PROOFSTEP]\napply lintegral_mono_ae\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\n⊢ ∀ᵐ (a : E) ∂Measure.restrict μ (s ∩ t n),\n    ENNReal.ofReal |ContinuousLinearMap.det (f' a)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε\n[PROOFSTEP]\nfilter_upwards [(ht n).norm_fderiv_sub_le μ (hs.inter (t_meas n)) f' fun x hx =>\n    (hf' x hx.1).mono (inter_subset_left _ _)]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\n⊢ ∀ (a : E),\n    ‖f' a - A n‖₊ ≤ δ (A n) →\n      ENNReal.ofReal |ContinuousLinearMap.det (f' a)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε\n[PROOFSTEP]\nintro x hx\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε\n[PROOFSTEP]\nhave I : |(f' x).det| ≤ |(A n).det| + ε :=\n  calc\n    |(f' x).det| = |(A n).det + ((f' x).det - (A n).det)| := by congr 1; abel\n    _ ≤ |(A n).det| + |(f' x).det - (A n).det| := (abs_add _ _)\n    _ ≤ |(A n).det| + ε := add_le_add le_rfl ((hδ (A n)).2.1 _ hx)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ |ContinuousLinearMap.det (f' x)| =\n    |ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))|\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ContinuousLinearMap.det (f' x) =\n    ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))\n[PROOFSTEP]\nabel\n[GOAL]\ncase e_a\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\n⊢ ContinuousLinearMap.det (f' x) =\n    ContinuousLinearMap.det (A n) + (ContinuousLinearMap.det (f' x) - ContinuousLinearMap.det (A n))\n[PROOFSTEP]\nabel\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\nI : |ContinuousLinearMap.det (f' x)| ≤ |ContinuousLinearMap.det (A n)| + ↑ε\n⊢ ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ≤ ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε\n[PROOFSTEP]\ncalc\n  ENNReal.ofReal |(f' x).det| ≤ ENNReal.ofReal (|(A n).det| + ε) := ENNReal.ofReal_le_ofReal I\n  _ = ENNReal.ofReal |(A n).det| + ε := by\n    simp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\nx : E\nhx : ‖f' x - A n‖₊ ≤ δ (A n)\nI : |ContinuousLinearMap.det (f' x)| ≤ |ContinuousLinearMap.det (A n)| + ↑ε\n⊢ ENNReal.ofReal (|ContinuousLinearMap.det (A n)| + ↑ε) = ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε\n[PROOFSTEP]\nsimp only [ENNReal.ofReal_add, abs_nonneg, NNReal.zero_le_coe, ENNReal.ofReal_coe_nnreal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ t n, ENNReal.ofReal |ContinuousLinearMap.det (A n)| + ↑ε ∂μ =\n    ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n))\n[PROOFSTEP]\nsimp only [set_lintegral_const, lintegral_add_right _ measurable_const]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) ≤\n    ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n))\n[PROOFSTEP]\nrefine' ENNReal.tsum_le_tsum fun n => add_le_add_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\nn : ℕ\n⊢ ENNReal.ofReal |ContinuousLinearMap.det (A n)| * ↑↑μ (s ∩ t n) ≤ ↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n)\n[PROOFSTEP]\nexact (hδ (A n)).2.2 _ _ (ht n)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) = ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nconv_rhs => rw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n| ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nrw [s_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ↑↑μ (f '' ⋃ (n : ℕ), s ∩ t n) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)\n[PROOFSTEP]\nrw [image_iUnion, measure_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Pairwise (Disjoint on fun i => f '' (s ∩ t i))\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ t i))\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Pairwise (Disjoint on fun i => f '' (s ∩ t i))\n[PROOFSTEP]\nintro i j hij\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\ni j : ℕ\nhij : i ≠ j\n⊢ (Disjoint on fun i => f '' (s ∩ t i)) i j\n[PROOFSTEP]\napply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\ni j : ℕ\nhij : i ≠ j\n⊢ Disjoint (s ∩ t i) (s ∩ t j)\n[PROOFSTEP]\nexact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (t_disj hij)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ t i))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\ni : ℕ\n⊢ MeasurableSet (f '' (s ∩ t i))\n[PROOFSTEP]\nexact\n  measurable_image_of_fderivWithin (hs.inter (t_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))\n    (hf.mono (inter_subset_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (⋃ (n : ℕ), s ∩ t n)\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i)\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Pairwise (Disjoint on fun n => s ∩ t n)\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)\n[PROOFSTEP]\nrotate_left\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ Pairwise (Disjoint on fun n => s ∩ t n)\n[PROOFSTEP]\nexact pairwise_disjoint_mono t_disj fun i => inter_subset_right _ _\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∀ (i : ℕ), MeasurableSet (s ∩ t i)\n[PROOFSTEP]\nexact fun i => hs.inter (t_meas i)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ∑' (i : ℕ), ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ∑' (i : ℕ), ↑↑μ (s ∩ t i)\n[PROOFSTEP]\nrw [← ENNReal.tsum_mul_left, ← ENNReal.tsum_add]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ ∑' (n : ℕ), (↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) =\n    ∑' (a : ℕ), (↑↑μ (f '' (s ∩ t a)) + 2 * ↑ε * ↑↑μ (s ∩ t a))\n[PROOFSTEP]\ncongr 1\n[GOAL]\ncase e_f\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\n⊢ (fun n => ↑↑μ (f '' (s ∩ t n)) + ↑ε * ↑↑μ (s ∩ t n) + ↑ε * ↑↑μ (s ∩ t n)) = fun a =>\n    ↑↑μ (f '' (s ∩ t a)) + 2 * ↑ε * ↑↑μ (s ∩ t a)\n[PROOFSTEP]\next1 i\n[GOAL]\ncase e_f.h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nε : ℝ≥0\nεpos : 0 < ε\nδ : (E →L[ℝ] E) → ℝ≥0\nhδ :\n  ∀ (A : E →L[ℝ] E),\n    0 < δ A ∧\n      (∀ (B : E →L[ℝ] E), ‖B - A‖ ≤ ↑(δ A) → |ContinuousLinearMap.det B - ContinuousLinearMap.det A| ≤ ↑ε) ∧\n        ∀ (t : Set E) (g : E → E),\n          ApproximatesLinearOn g A t (δ A) →\n            ENNReal.ofReal |ContinuousLinearMap.det A| * ↑↑μ t ≤ ↑↑μ (g '' t) + ↑ε * ↑↑μ t\nt : ℕ → Set E\nA : ℕ → E →L[ℝ] E\nt_disj : Pairwise (Disjoint on t)\nt_meas : ∀ (n : ℕ), MeasurableSet (t n)\nt_cover : s ⊆ ⋃ (n : ℕ), t n\nht : ∀ (n : ℕ), ApproximatesLinearOn f (A n) (s ∩ t n) (δ (A n))\ns_eq : s = ⋃ (n : ℕ), s ∩ t n\ni : ℕ\n⊢ ↑↑μ (f '' (s ∩ t i)) + ↑ε * ↑↑μ (s ∩ t i) + ↑ε * ↑↑μ (s ∩ t i) = ↑↑μ (f '' (s ∩ t i)) + 2 * ↑ε * ↑↑μ (s ∩ t i)\n[PROOFSTEP]\nrw [mul_assoc, two_mul, add_assoc]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nhave : Tendsto (fun ε : ℝ≥0 => μ (f '' s) + 2 * ε * μ s) (𝓝[>] 0) (𝓝 (μ (f '' s) + 2 * (0 : ℝ≥0) * μ s)) :=\n  by\n  apply Tendsto.mono_left _ nhdsWithin_le_nhds\n  refine' tendsto_const_nhds.add _\n  refine' ENNReal.Tendsto.mul_const _ (Or.inr h's)\n  exact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\napply Tendsto.mono_left _ nhdsWithin_le_nhds\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\nrefine' tendsto_const_nhds.add _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Tendsto (fun ε => 2 * ↑ε * ↑↑μ s) (𝓝 0) (𝓝 (2 * ↑0 * ↑↑μ s))\n[PROOFSTEP]\nrefine' ENNReal.Tendsto.mul_const _ (Or.inr h's)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Tendsto (fun ε => 2 * ↑ε) (𝓝 0) (𝓝 (2 * ↑0))\n[PROOFSTEP]\nexact ENNReal.Tendsto.const_mul (ENNReal.tendsto_coe.2 tendsto_id) (Or.inr ENNReal.coe_ne_top)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s) + 2 * ↑0 * ↑↑μ s))\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nsimp only [add_zero, zero_mul, mul_zero, ENNReal.coe_zero] at this \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\napply ge_of_tendsto this\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))\n⊢ ∀ᶠ (c : ℝ≥0) in 𝓝[Ioi 0] 0,\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑c * ↑↑μ s\n[PROOFSTEP]\nfilter_upwards [self_mem_nhdsWithin]\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))\n⊢ ∀ (a : ℝ≥0),\n    a ∈ Ioi 0 → ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑a * ↑↑μ s\n[PROOFSTEP]\nrintro ε (εpos : 0 < ε)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nh's : ↑↑μ s ≠ ⊤\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : Tendsto (fun ε => ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s) (𝓝[Ioi 0] 0) (𝓝 (↑↑μ (f '' s)))\nε : ℝ≥0\nεpos : 0 < ε\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s) + 2 * ↑ε * ↑↑μ s\n[PROOFSTEP]\nexact lintegral_abs_det_fderiv_le_addHaar_image_aux1 μ hs hf' hf εpos\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nlet u n := disjointed (spanningSets μ) n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nhave u_meas : ∀ n, MeasurableSet (u n) := by\n  intro n\n  apply MeasurableSet.disjointed fun i => ?_\n  exact measurable_spanningSets μ i\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\n⊢ ∀ (n : ℕ), MeasurableSet (u n)\n[PROOFSTEP]\nintro n\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nn : ℕ\n⊢ MeasurableSet (u n)\n[PROOFSTEP]\napply MeasurableSet.disjointed fun i => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nn i : ℕ\n⊢ MeasurableSet (spanningSets μ i)\n[PROOFSTEP]\nexact measurable_spanningSets μ i\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\nhave A : s = ⋃ n, s ∩ u n := by rw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\n⊢ s = ⋃ (n : ℕ), s ∩ u n\n[PROOFSTEP]\nrw [← inter_iUnion, iUnion_disjointed, iUnion_spanningSets, inter_univ]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' s)\n[PROOFSTEP]\ncalc\n  (∫⁻ x in s, ENNReal.ofReal |(f' x).det| ∂μ) = ∑' n, ∫⁻ x in s ∩ u n, ENNReal.ofReal |(f' x).det| ∂μ :=\n    by\n    conv_lhs => rw [A]\n    rw [lintegral_iUnion]\n    · intro n; exact hs.inter (u_meas n)\n    · exact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _\n  _ ≤ ∑' n, μ (f '' (s ∩ u n)) := by\n    apply ENNReal.tsum_le_tsum fun n => ?_\n    apply\n      lintegral_abs_det_fderiv_le_addHaar_image_aux2 μ (hs.inter (u_meas n)) _\n        (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) (hf.mono (inter_subset_left _ _))\n    have : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)\n    exact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)\n  _ = μ (f '' s) := by\n    conv_rhs => rw [A, image_iUnion]\n    rw [measure_iUnion]\n    · intro i j hij\n      apply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)\n      exact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (disjoint_disjointed _ hij)\n    · intro i\n      exact\n        measurable_image_of_fderivWithin (hs.inter (u_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))\n          (hf.mono (inter_subset_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nconv_lhs => rw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [A]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∫⁻ (x : E) in ⋃ (n : ℕ), s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ =\n    ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ\n[PROOFSTEP]\nrw [lintegral_iUnion]\n[GOAL]\ncase hm\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∀ (i : ℕ), MeasurableSet (s ∩ u i)\n[PROOFSTEP]\nintro n\n[GOAL]\ncase hm\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ MeasurableSet (s ∩ u n)\n[PROOFSTEP]\nexact hs.inter (u_meas n)\n[GOAL]\ncase hd\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ Pairwise (Disjoint on fun n => s ∩ u n)\n[PROOFSTEP]\nexact pairwise_disjoint_mono (disjoint_disjointed _) fun n => inter_subset_right _ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤\n    ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n))\n[PROOFSTEP]\napply ENNReal.tsum_le_tsum fun n => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ ∫⁻ (x : E) in s ∩ u n, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| ∂μ ≤ ↑↑μ (f '' (s ∩ u n))\n[PROOFSTEP]\napply\n  lintegral_abs_det_fderiv_le_addHaar_image_aux2 μ (hs.inter (u_meas n)) _\n    (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _)) (hf.mono (inter_subset_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\n⊢ ↑↑μ (s ∩ u n) ≠ ⊤\n[PROOFSTEP]\nhave : μ (u n) < ∞ := lt_of_le_of_lt (measure_mono (disjointed_subset _ _)) (measure_spanningSets_lt_top μ n)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\nn : ℕ\nthis : ↑↑μ (u n) < ⊤\n⊢ ↑↑μ (s ∩ u n) ≠ ⊤\n[PROOFSTEP]\nexact ne_of_lt (lt_of_le_of_lt (measure_mono (inter_subset_right _ _)) this)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) = ↑↑μ (f '' s)\n[PROOFSTEP]\nconv_rhs => rw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n| ↑↑μ (f '' s)\n[PROOFSTEP]\nrw [A, image_iUnion]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∑' (n : ℕ), ↑↑μ (f '' (s ∩ u n)) = ↑↑μ (⋃ (i : ℕ), f '' (s ∩ u i))\n[PROOFSTEP]\nrw [measure_iUnion]\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ Pairwise (Disjoint on fun i => f '' (s ∩ u i))\n[PROOFSTEP]\nintro i j hij\n[GOAL]\ncase hn\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\ni j : ℕ\nhij : i ≠ j\n⊢ (Disjoint on fun i => f '' (s ∩ u i)) i j\n[PROOFSTEP]\napply Disjoint.image _ hf (inter_subset_left _ _) (inter_subset_left _ _)\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\ni j : ℕ\nhij : i ≠ j\n⊢ Disjoint (s ∩ u i) (s ∩ u j)\n[PROOFSTEP]\nexact Disjoint.mono (inter_subset_right _ _) (inter_subset_right _ _) (disjoint_disjointed _ hij)\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\n⊢ ∀ (i : ℕ), MeasurableSet (f '' (s ∩ u i))\n[PROOFSTEP]\nintro i\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : ℕ → Set E := fun n => disjointed (spanningSets μ) n\nu_meas : ∀ (n : ℕ), MeasurableSet (u n)\nA : s = ⋃ (n : ℕ), s ∩ u n\ni : ℕ\n⊢ MeasurableSet (f '' (s ∩ u i))\n[PROOFSTEP]\nexact\n  measurable_image_of_fderivWithin (hs.inter (u_meas i)) (fun x hx => (hf' x hx.1).mono (inter_subset_left _ _))\n    (hf.mono (inter_subset_left _ _))\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nh'f : Measurable f\n⊢ Measure.map f (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\napply Measure.ext fun t ht => ?_\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nh'f : Measurable f\nt : Set E\nht : MeasurableSet t\n⊢ ↑↑(Measure.map f (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) t =\n    ↑↑(Measure.restrict μ (f '' s)) t\n[PROOFSTEP]\nrw [map_apply h'f ht, withDensity_apply _ (h'f ht), Measure.restrict_apply ht, restrict_restrict (h'f ht),\n  lintegral_abs_det_fderiv_eq_addHaar_image μ ((h'f ht).inter hs)\n    (fun x hx => (hf' x hx.2).mono (inter_subset_right _ _)) (hf.mono (inter_subset_right _ _)),\n  image_preimage_inter]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nobtain ⟨u, u_meas, uf⟩ : ∃ u, Measurable u ∧ EqOn u f s := by\n  classical\n  refine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩\n  refine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs\n  have : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt\n  exact this.continuousOn\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ ∃ u, Measurable u ∧ EqOn u f s\n[PROOFSTEP]\nclassical\nrefine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩\nrefine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs\nhave : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt\nexact this.continuousOn\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ ∃ u, Measurable u ∧ EqOn u f s\n[PROOFSTEP]\nrefine' ⟨piecewise s f 0, _, piecewise_eqOn _ _ _⟩\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ Measurable (piecewise s f 0)\n[PROOFSTEP]\nrefine' ContinuousOn.measurable_piecewise _ continuous_zero.continuousOn hs\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\n⊢ ContinuousOn f s\n[PROOFSTEP]\nhave : DifferentiableOn ℝ f s := fun x hx => (hf' x hx).differentiableWithinAt\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nthis : DifferentiableOn ℝ f s\n⊢ ContinuousOn f s\n[PROOFSTEP]\nexact this.continuousOn\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nhave u' : ∀ x ∈ s, HasFDerivWithinAt u (f' x) s x := fun x hx => (hf' x hx).congr (fun y hy => uf hy) (uf hx)\n[GOAL]\ncase intro.intro\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nset F : s → E := u ∘ (↑) with hF\n[GOAL]\ncase intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nhave A : Measure.map F (comap (↑) (μ.withDensity fun x => ENNReal.ofReal |(f' x).det|)) = μ.restrict (u '' s) :=\n  by\n  rw [hF, ← Measure.map_map u_meas measurable_subtype_coe, map_comap_subtype_coe hs, restrict_withDensity hs]\n  exact map_withDensity_abs_det_fderiv_eq_addHaar μ hs u' (hf.congr uf.symm) u_meas\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\n⊢ Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (u '' s)\n[PROOFSTEP]\nrw [hF, ← Measure.map_map u_meas measurable_subtype_coe, map_comap_subtype_coe hs, restrict_withDensity hs]\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\n⊢ Measure.map u (withDensity (Measure.restrict μ s) fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    Measure.restrict μ (u '' s)\n[PROOFSTEP]\nexact map_withDensity_abs_det_fderiv_eq_addHaar μ hs u' (hf.congr uf.symm) u_meas\n[GOAL]\ncase intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\nA :\n  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (u '' s)\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nrw [uf.image_eq] at A \n[GOAL]\ncase intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\nA :\n  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nhave : F = s.restrict f := by\n  ext x\n  exact uf x.2\n[GOAL]\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\nA :\n  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n⊢ F = Set.restrict s f\n[PROOFSTEP]\next x\n[GOAL]\ncase h\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\nA :\n  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\nx : ↑s\n⊢ F x = Set.restrict s f x\n[PROOFSTEP]\nexact uf x.2\n[GOAL]\ncase intro.intro\nE : Type u_1\nF✝ : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F✝\ninst✝³ : NormedSpace ℝ F✝\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\nu : E → E\nu_meas : Measurable u\nuf : EqOn u f s\nu' : ∀ (x : E), x ∈ s → HasFDerivWithinAt u (f' x) s x\nF : ↑s → E := u ∘ Subtype.val\nhF : F = u ∘ Subtype.val\nA :\n  Measure.map F (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\nthis : F = Set.restrict s f\n⊢ Measure.map (Set.restrict s f)\n      (Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|)) =\n    Measure.restrict μ (f '' s)\n[PROOFSTEP]\nrwa [this] at A \n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\n⊢ ∫⁻ (x : E) in f '' s, g x ∂μ = ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ\n[PROOFSTEP]\nrw [← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,\n  (measurableEmbedding_of_fderivWithin hs hf' hf).lintegral_map]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\n⊢ ∫⁻ (a : ↑s),\n      g\n        (Set.restrict s f\n          a) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ\n[PROOFSTEP]\nhave : ∀ x : s, g (s.restrict f x) = (g ∘ f) x := fun x => rfl\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫⁻ (a : ↑s),\n      g\n        (Set.restrict s f\n          a) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ\n[PROOFSTEP]\nsimp only [this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫⁻ (a : ↑s),\n      (g ∘ f) ↑a ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ\n[PROOFSTEP]\nrw [← (MeasurableEmbedding.subtype_coe hs).lintegral_map, map_comap_subtype_coe hs,\n  set_lintegral_withDensity_eq_set_lintegral_mul_non_measurable₀ _ _ _ hs]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫⁻ (a : E) in s, ((fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) * fun a => (g ∘ f) a) a ∂μ =\n    ∫⁻ (x : E) in s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| * g (f x) ∂μ\n[PROOFSTEP]\nrfl\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∀ᵐ (x : E) ∂Measure.restrict μ s, ENNReal.ofReal |ContinuousLinearMap.det (f' x)| < ⊤\n[PROOFSTEP]\nsimp only [eventually_true, ENNReal.ofReal_lt_top]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → ℝ≥0∞\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ AEMeasurable fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\nexact aemeasurable_ofReal_abs_det_fderivWithin μ hs hf'\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ IntegrableOn g (f '' s) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s\n[PROOFSTEP]\nrw [IntegrableOn, ← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,\n  (measurableEmbedding_of_fderivWithin hs hf' hf).integrable_map_iff]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ Integrable (g ∘ Set.restrict s f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s\n[PROOFSTEP]\nchange Integrable ((g ∘ f) ∘ ((↑) : s → E)) _ ↔ _\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ Integrable ((g ∘ f) ∘ Subtype.val) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s\n[PROOFSTEP]\nrw [← (MeasurableEmbedding.subtype_coe hs).integrable_map_iff, map_comap_subtype_coe hs]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ Integrable (g ∘ f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s\n[PROOFSTEP]\nsimp only [ENNReal.ofReal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ Integrable (g ∘ f) ↔ IntegrableOn (fun x => |ContinuousLinearMap.det (f' x)| • g (f x)) s\n[PROOFSTEP]\nrw [restrict_withDensity hs, integrable_withDensity_iff_integrable_coe_smul₀, IntegrableOn]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ (Integrable fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x) ↔\n    Integrable fun x => |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrw [iff_iff_eq]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ (Integrable fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x) =\n    Integrable fun x => |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\ncongr 2 with x\n[GOAL]\ncase e_f.h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nx : E\n⊢ ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|) • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrw [Real.coe_toNNReal _ (abs_nonneg _)]\n[GOAL]\ncase e_f.h\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nx : E\n⊢ |ContinuousLinearMap.det (f' x)| • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase hf\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ AEMeasurable fun x => Real.toNNReal |ContinuousLinearMap.det (f' x)|\n[PROOFSTEP]\nexact aemeasurable_toNNReal_abs_det_fderivWithin μ hs hf'\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ ∫ (x : E) in f '' s, g x ∂μ = ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ\n[PROOFSTEP]\nrw [← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,\n  (measurableEmbedding_of_fderivWithin hs hf' hf).integral_map]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\n⊢ ∫ (x : ↑s),\n      g\n        (Set.restrict s f\n          x) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ\n[PROOFSTEP]\nhave : ∀ x : s, g (s.restrict f x) = (g ∘ f) x := fun x => rfl\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫ (x : ↑s),\n      g\n        (Set.restrict s f\n          x) ∂Measure.comap Subtype.val (withDensity μ fun x => ENNReal.ofReal |ContinuousLinearMap.det (f' x)|) =\n    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ\n[PROOFSTEP]\nsimp only [this, ENNReal.ofReal]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫ (x : ↑s),\n      (g ∘ f) ↑x ∂Measure.comap Subtype.val (withDensity μ fun x => ↑(Real.toNNReal |ContinuousLinearMap.det (f' x)|)) =\n    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ\n[PROOFSTEP]\nrw [← (MeasurableEmbedding.subtype_coe hs).integral_map, map_comap_subtype_coe hs,\n  set_integral_withDensity_eq_set_integral_smul₀ (aemeasurable_toNNReal_abs_det_fderivWithin μ hs hf') _ hs]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\n⊢ ∫ (a : E) in s, Real.toNNReal |ContinuousLinearMap.det (f' a)| • (g ∘ f) a ∂μ =\n    ∫ (x : E) in s, |ContinuousLinearMap.det (f' x)| • g (f x) ∂μ\n[PROOFSTEP]\ncongr with x\n[GOAL]\ncase e_f.h\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\nx : E\n⊢ Real.toNNReal |ContinuousLinearMap.det (f' x)| • (g ∘ f) x = |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nconv_rhs => rw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\nx : E\n| |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\nx : E\n| |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : E), x ∈ s → HasFDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : E → F\nthis : ∀ (x : ↑s), g (Set.restrict s f x) = (g ∘ f) ↑x\nx : E\n| |ContinuousLinearMap.det (f' x)| • g (f x)\n[PROOFSTEP]\nrw [← Real.coe_toNNReal _ (abs_nonneg (f' x).det)]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\n⊢ ContinuousLinearMap.det (ContinuousLinearMap.smulRight 1 v) = v\n[PROOFSTEP]\nhave : (1 : 𝕜 →L[𝕜] 𝕜).smulRight v = v • (1 : 𝕜 →L[𝕜] 𝕜) :=\n  by\n  ext1\n  simp only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, Algebra.id.smul_eq_mul, one_mul,\n    ContinuousLinearMap.coe_smul', Pi.smul_apply, mul_one]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\n⊢ ContinuousLinearMap.smulRight 1 v = v • 1\n[PROOFSTEP]\next1\n[GOAL]\ncase h\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\n⊢ ↑(ContinuousLinearMap.smulRight 1 v) 1 = ↑(v • 1) 1\n[PROOFSTEP]\nsimp only [ContinuousLinearMap.smulRight_apply, ContinuousLinearMap.one_apply, Algebra.id.smul_eq_mul, one_mul,\n  ContinuousLinearMap.coe_smul', Pi.smul_apply, mul_one]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\nthis : ContinuousLinearMap.smulRight 1 v = v • 1\n⊢ ContinuousLinearMap.det (ContinuousLinearMap.smulRight 1 v) = v\n[PROOFSTEP]\nrw [this, ContinuousLinearMap.det, ContinuousLinearMap.coe_smul]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\nthis : ContinuousLinearMap.smulRight 1 v = v • 1\n⊢ ↑LinearMap.det (v • ↑1) = v\n[PROOFSTEP]\nrw [show ((1 : 𝕜 →L[𝕜] 𝕜) : 𝕜 →ₗ[𝕜] 𝕜) = LinearMap.id from rfl]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\n𝕜 : Type u_3\ninst✝ : NormedField 𝕜\nv : 𝕜\nthis : ContinuousLinearMap.smulRight 1 v = v • 1\n⊢ ↑LinearMap.det (v • LinearMap.id) = v\n[PROOFSTEP]\nrw [LinearMap.det_smul, FiniteDimensional.finrank_self, LinearMap.det_id, pow_one, mul_one]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁷ : NormedAddCommGroup E\ninst✝⁶ : NormedSpace ℝ E\ninst✝⁵ : FiniteDimensional ℝ E\ninst✝⁴ : NormedAddCommGroup F\ninst✝³ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝² : MeasurableSpace E\ninst✝¹ : BorelSpace E\nμ : Measure E\ninst✝ : IsAddHaarMeasure μ\ns : Set ℝ\nf f' : ℝ → ℝ\nhs : MeasurableSet s\nhf' : ∀ (x : ℝ), x ∈ s → HasDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : ℝ → F\n⊢ IntegrableOn g (f '' s) ↔ IntegrableOn (fun x => |f' x| • g (f x)) s\n[PROOFSTEP]\nsimpa only [det_one_smulRight] using\n  integrableOn_image_iff_integrableOn_abs_det_fderiv_smul volume hs (fun x hx => (hf' x hx).hasFDerivWithinAt) hf g\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns✝ : Set E\nf✝ : E → E\nf'✝ : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ns : Set ℝ\nf f' : ℝ → ℝ\ninst✝ : CompleteSpace F\nhs : MeasurableSet s\nhf' : ∀ (x : ℝ), x ∈ s → HasDerivWithinAt f (f' x) s x\nhf : InjOn f s\ng : ℝ → F\n⊢ ∫ (x : ℝ) in f '' s, g x = ∫ (x : ℝ) in s, |f' x| • g (f x)\n[PROOFSTEP]\nsimpa only [det_one_smulRight] using\n  integral_image_eq_integral_abs_det_fderiv_smul volume hs (fun x hx => (hf' x hx).hasFDerivWithinAt) hf g\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nf : LocalHomeomorph E E\nhf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x\ng : E → F\n⊢ ∫ (x : E) in f.target, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ\n[PROOFSTEP]\nhave : f '' f.source = f.target := LocalEquiv.image_source_eq_target f.toLocalEquiv\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nf : LocalHomeomorph E E\nhf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x\ng : E → F\nthis : ↑f '' f.source = f.target\n⊢ ∫ (x : E) in f.target, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ\n[PROOFSTEP]\nrw [← this]\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nf : LocalHomeomorph E E\nhf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x\ng : E → F\nthis : ↑f '' f.source = f.target\n⊢ ∫ (x : E) in ↑f '' f.source, g x ∂μ = ∫ (x : E) in f.source, |ContinuousLinearMap.det (f' x)| • g (↑f x) ∂μ\n[PROOFSTEP]\napply integral_image_eq_integral_abs_det_fderiv_smul μ f.open_source.measurableSet _ f.injOn\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nf : LocalHomeomorph E E\nhf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x\ng : E → F\nthis : ↑f '' f.source = f.target\n⊢ ∀ (x : E), x ∈ f.source → HasFDerivWithinAt (↑f) (f' x) f.source x\n[PROOFSTEP]\nintro x hx\n[GOAL]\nE : Type u_1\nF : Type u_2\ninst✝⁸ : NormedAddCommGroup E\ninst✝⁷ : NormedSpace ℝ E\ninst✝⁶ : FiniteDimensional ℝ E\ninst✝⁵ : NormedAddCommGroup F\ninst✝⁴ : NormedSpace ℝ F\ns : Set E\nf✝ : E → E\nf' : E → E →L[ℝ] E\ninst✝³ : MeasurableSpace E\ninst✝² : BorelSpace E\nμ : Measure E\ninst✝¹ : IsAddHaarMeasure μ\ninst✝ : CompleteSpace F\nf : LocalHomeomorph E E\nhf' : ∀ (x : E), x ∈ f.source → HasFDerivAt (↑f) (f' x) x\ng : E → F\nthis : ↑f '' f.source = f.target\nx : E\nhx : x ∈ f.source\n⊢ HasFDerivWithinAt (↑f) (f' x) f.source x\n[PROOFSTEP]\nexact (hf' x hx).hasFDerivWithinAt\n", "meta": {"mathlib_filename": "Mathlib.MeasureTheory.Function.Jacobian", "llama_tokens": 315556, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.6187804337438501, "lm_q2_score": 0.4073334000459302, "lm_q1q2_score": 0.2520499379587779}}
{"text": "[GOAL]\nC : Type u\nX Y Z : F C\n⊢ Discrete.functor (normalizeObj (tensor (tensor X Y) Z)) ⟶ Discrete.functor (normalizeObj (tensor X (tensor Y Z)))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nX Y Z : F C\n⊢ (Discrete.functor fun x => normalizeObj Z (normalizeObj Y (normalizeObj X x).as).as) ⟶\n    Discrete.functor fun x => normalizeObj Z (normalizeObj Y (normalizeObj X x).as).as\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\nX✝ Y✝ Z✝ : F C\n⊢ Discrete.functor (normalizeObj (tensor X✝ (tensor Y✝ Z✝))) ⟶\n    Discrete.functor (normalizeObj (tensor (tensor X✝ Y✝) Z✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nX✝ Y✝ Z✝ : F C\n⊢ (Discrete.functor fun x => normalizeObj Z✝ (normalizeObj Y✝ (normalizeObj X✝ x).as).as) ⟶\n    Discrete.functor fun x => normalizeObj Z✝ (normalizeObj Y✝ (normalizeObj X✝ x).as).as\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj (tensor Unit a✝)) ⟶ Discrete.functor (normalizeObj a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\na✝ : F C\n⊢ (Discrete.functor fun x => normalizeObj a✝ x) ⟶ Discrete.functor (normalizeObj a✝)\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj a✝) ⟶ Discrete.functor (normalizeObj (tensor Unit a✝))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj a✝) ⟶ Discrete.functor fun x => normalizeObj a✝ x\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj (tensor a✝ Unit)) ⟶ Discrete.functor (normalizeObj a✝)\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\na✝ : F C\n⊢ (Discrete.functor fun x => { as := (normalizeObj a✝ x).as }) ⟶ Discrete.functor (normalizeObj a✝)\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj a✝) ⟶ Discrete.functor (normalizeObj (tensor a✝ Unit))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\na✝ : F C\n⊢ Discrete.functor (normalizeObj a✝) ⟶ Discrete.functor fun x => { as := (normalizeObj a✝ x).as }\n[PROOFSTEP]\nexact Discrete.natTrans (fun _ => 𝟙 _)\n[GOAL]\nC : Type u\nT X✝ Y✝ W : F C\nf : T ⟶ᵐ Y✝\ng : X✝ ⟶ᵐ W\n⊢ Discrete.functor (normalizeObj (tensor T X✝)) ⟶ Discrete.functor (normalizeObj (tensor Y✝ W))\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nT X✝ Y✝ W : F C\nf : T ⟶ᵐ Y✝\ng : X✝ ⟶ᵐ W\n⊢ (Discrete.functor fun x => normalizeObj X✝ (normalizeObj T x).as) ⟶\n    Discrete.functor fun x => normalizeObj W (normalizeObj Y✝ x).as\n[PROOFSTEP]\nexact\n  Discrete.natTrans\n    (fun ⟨X⟩ =>\n      (normalizeMapAux g).app (normalizeObj T X) ≫\n        (Discrete.functor (normalizeObj W) : _ ⥤ N C).map ((normalizeMapAux f).app ⟨X⟩))\n[GOAL]\nC : Type u\nX Y : F C\n⊢ ∀ (a b : X ⟶ᵐ Y), a ≈ b → normalizeMapAux a = normalizeMapAux b\n[PROOFSTEP]\naesop_cat\n[GOAL]\nC : Type u\nZ : F C\nn n' : (Discrete ∘ NormalMonoidalObject) C\nf : n ⟶ n'\n⊢ ((tensorFunc C).obj Z).map f = inclusion.map f ⊗ 𝟙 Z\n[PROOFSTEP]\ncases n\n[GOAL]\ncase mk\nC : Type u\nZ : F C\nn' : (Discrete ∘ NormalMonoidalObject) C\nas✝ : NormalMonoidalObject C\nf : { as := as✝ } ⟶ n'\n⊢ ((tensorFunc C).obj Z).map f = inclusion.map f ⊗ 𝟙 Z\n[PROOFSTEP]\ncases n'\n[GOAL]\ncase mk.mk\nC : Type u\nZ : F C\nas✝¹ as✝ : NormalMonoidalObject C\nf : { as := as✝¹ } ⟶ { as := as✝ }\n⊢ ((tensorFunc C).obj Z).map f = inclusion.map f ⊗ 𝟙 Z\n[PROOFSTEP]\nrcases f with ⟨⟨h⟩⟩\n[GOAL]\ncase mk.mk.up.up\nC : Type u\nZ : F C\nas✝¹ as✝ : NormalMonoidalObject C\nh : { as := as✝¹ }.as = { as := as✝ }.as\n⊢ ((tensorFunc C).obj Z).map { down := { down := h } } = inclusion.map { down := { down := h } } ⊗ 𝟙 Z\n[PROOFSTEP]\ndsimp at h \n[GOAL]\ncase mk.mk.up.up\nC : Type u\nZ : F C\nas✝¹ as✝ : NormalMonoidalObject C\nh : as✝¹ = as✝\n⊢ ((tensorFunc C).obj Z).map { down := { down := h } } = inclusion.map { down := { down := h } } ⊗ 𝟙 Z\n[PROOFSTEP]\nsubst h\n[GOAL]\ncase mk.mk.up.up\nC : Type u\nZ : F C\nas✝ : NormalMonoidalObject C\n⊢ ((tensorFunc C).obj Z).map { down := { down := (_ : as✝ = as✝) } } =\n    inclusion.map { down := { down := (_ : as✝ = as✝) } } ⊗ 𝟙 Z\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\nX : F C\n⊢ ∀ {X_1 Y : (Discrete ∘ NormalMonoidalObject) C} (f : X_1 ⟶ Y),\n    ((tensorFunc C).obj X).map f ≫ (normalizeIsoApp C X Y).hom =\n      (normalizeIsoApp C X X_1).hom ≫ ((normalize' C).obj X).map f\n[PROOFSTEP]\nrintro ⟨X⟩ ⟨Y⟩ ⟨⟨f⟩⟩\n[GOAL]\ncase mk.mk.up.up\nC : Type u\nX✝ : F C\nX Y : NormalMonoidalObject C\nf : { as := X }.as = { as := Y }.as\n⊢ ((tensorFunc C).obj X✝).map { down := { down := f } } ≫ (normalizeIsoApp C X✝ { as := Y }).hom =\n    (normalizeIsoApp C X✝ { as := X }).hom ≫ ((normalize' C).obj X✝).map { down := { down := f } }\n[PROOFSTEP]\ndsimp at f \n[GOAL]\ncase mk.mk.up.up\nC : Type u\nX✝ : F C\nX Y : NormalMonoidalObject C\nf : X = Y\n⊢ ((tensorFunc C).obj X✝).map { down := { down := f } } ≫ (normalizeIsoApp C X✝ { as := Y }).hom =\n    (normalizeIsoApp C X✝ { as := X }).hom ≫ ((normalize' C).obj X✝).map { down := { down := f } }\n[PROOFSTEP]\nsubst f\n[GOAL]\ncase mk.mk.up.up\nC : Type u\nX✝ : F C\nX : NormalMonoidalObject C\n⊢ ((tensorFunc C).obj X✝).map { down := { down := (_ : X = X) } } ≫ (normalizeIsoApp C X✝ { as := X }).hom =\n    (normalizeIsoApp C X✝ { as := X }).hom ≫ ((normalize' C).obj X✝).map { down := { down := (_ : X = X) } }\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase mk.mk.up.up\nC : Type u\nX✝ : F C\nX : NormalMonoidalObject C\n⊢ (Discrete.functor fun n => inclusionObj n ⊗ X✝).map { down := { down := (_ : X = X) } } ≫\n      (normalizeIsoApp C X✝ { as := X }).hom =\n    (normalizeIsoApp C X✝ { as := X }).hom ≫\n      (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n                (Discrete.functor inclusionObj)).obj\n            (Discrete.functor (normalizeObj X✝))).map\n        { down := { down := (_ : X = X) } }\n[PROOFSTEP]\nsimp\n[GOAL]\nC : Type u\n⊢ ∀ {X Y : F C} (f : X ⟶ Y),\n    (tensorFunc C).map f ≫ (normalizeIsoAux C Y).hom = (normalizeIsoAux C X).hom ≫ (normalize' C).map f\n[PROOFSTEP]\nrintro X Y f\n[GOAL]\nC : Type u\nX Y : F C\nf : X ⟶ Y\n⊢ (tensorFunc C).map f ≫ (normalizeIsoAux C Y).hom = (normalizeIsoAux C X).hom ≫ (normalize' C).map f\n[PROOFSTEP]\ninduction' f using Quotient.recOn with f\n[GOAL]\ncase f\nC : Type u\nX Y : F C\nf : X ⟶ᵐ Y\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X Y) f) ≫ (normalizeIsoAux C Y).hom =\n    (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) f)\ncase h\nC : Type u\nX Y : F C\nf : X ⟶ Y\na✝ b✝ : X ⟶ᵐ Y\np✝ : a✝ ≈ b✝\n⊢ (_ :\n      (tensorFunc C).map (Quotient.mk (setoidHom X Y) b✝) ≫ (normalizeIsoAux C Y).hom =\n        (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) b✝)) =\n    (_ :\n      (tensorFunc C).map (Quotient.mk (setoidHom X Y) b✝) ≫ (normalizeIsoAux C Y).hom =\n        (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) b✝))\n[PROOFSTEP]\nswap\n[GOAL]\ncase h\nC : Type u\nX Y : F C\nf : X ⟶ Y\na✝ b✝ : X ⟶ᵐ Y\np✝ : a✝ ≈ b✝\n⊢ (_ :\n      (tensorFunc C).map (Quotient.mk (setoidHom X Y) b✝) ≫ (normalizeIsoAux C Y).hom =\n        (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) b✝)) =\n    (_ :\n      (tensorFunc C).map (Quotient.mk (setoidHom X Y) b✝) ≫ (normalizeIsoAux C Y).hom =\n        (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) b✝))\ncase f\nC : Type u\nX Y : F C\nf : X ⟶ᵐ Y\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X Y) f) ≫ (normalizeIsoAux C Y).hom =\n    (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) f)\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f\nC : Type u\nX Y : F C\nf : X ⟶ᵐ Y\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X Y) f) ≫ (normalizeIsoAux C Y).hom =\n    (normalizeIsoAux C X).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X Y) f)\n[PROOFSTEP]\ninduction' f with _ X₁ X₂ X₃ _ _ _ _ _ _ _ _ _ _ _ _ h₁ h₂ X₁ X₂ Y₁ Y₂ f g h₁ h₂\n[GOAL]\ncase f.id\nC : Type u\nX Y X✝ : F C\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X✝ X✝) (Hom.id X✝)) ≫ (normalizeIsoAux C X✝).hom =\n    (normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ X✝) (Hom.id X✝))\n[PROOFSTEP]\nsimp only [mk_id, Functor.map_id, Category.comp_id, Category.id_comp]\n[GOAL]\ncase f.α_hom\nC : Type u\nX Y X₁ X₂ X₃ : F C\n⊢ (tensorFunc C).map\n        (Quotient.mk (setoidHom (tensor (tensor X₁ X₂) X₃) (tensor X₁ (tensor X₂ X₃))) (Hom.α_hom X₁ X₂ X₃)) ≫\n      (normalizeIsoAux C (tensor X₁ (tensor X₂ X₃))).hom =\n    (normalizeIsoAux C (tensor (tensor X₁ X₂) X₃)).hom ≫\n      (normalize' C).map\n        (Quotient.mk (setoidHom (tensor (tensor X₁ X₂) X₃) (tensor X₁ (tensor X₂ X₃))) (Hom.α_hom X₁ X₂ X₃))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map\n          (Quotient.mk (setoidHom (tensor (tensor X₁ X₂) X₃) (tensor X₁ (tensor X₂ X₃))) (Hom.α_hom X₁ X₂ X₃)) ≫\n        (normalizeIsoAux C (tensor X₁ (tensor X₂ X₃))).hom)\n      n =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor (tensor X₁ X₂) X₃)).hom ≫\n        (normalize' C).map\n          (Quotient.mk (setoidHom (tensor (tensor X₁ X₂) X₃) (tensor X₁ (tensor X₂ X₃))) (Hom.α_hom X₁ X₂ X₃)))\n      n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n =>\n          𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom ((X₁ ⊗ X₂) ⊗ X₃) (X₁ ⊗ X₂ ⊗ X₃)) (Hom.α_hom X₁ X₂ X₃)) ≫\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X₁ (X₂ ⊗ X₃)).symm ≪≫\n              (normalizeIsoApp C X₁ x ⊗ Iso.refl (X₂ ⊗ X₃)) ≪≫\n                (α_ (inclusionObj (normalizeObj X₁ x.as).as) X₂ X₃).symm ≪≫\n                  (normalizeIsoApp C X₂ (normalizeObj X₁ x.as) ⊗ Iso.refl X₃) ≪≫\n                    normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ x.as).as)).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (X₁ ⊗ X₂) X₃).symm ≪≫\n              ((α_ (inclusionObj x.as) X₁ X₂).symm ≪≫\n                    (normalizeIsoApp C X₁ x ⊗ Iso.refl X₂) ≪≫ normalizeIsoApp C X₂ (normalizeObj X₁ x.as) ⊗\n                  Iso.refl X₃) ≪≫\n                normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ x.as).as)).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x =>\n            𝟙 ((Discrete.functor fun x => normalizeObj X₃ (normalizeObj X₂ (normalizeObj X₁ x).as).as).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_α_hom, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).hom) n ≫\n      NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X₁ (X₂ ⊗ X₃)).symm ≪≫\n              (normalizeIsoApp C X₁ x ⊗ Iso.refl (X₂ ⊗ X₃)) ≪≫\n                (α_ (inclusionObj (normalizeObj X₁ x.as).as) X₂ X₃).symm ≪≫\n                  (normalizeIsoApp C X₂ (normalizeObj X₁ x.as) ⊗ Iso.refl X₃) ≪≫\n                    normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ x.as).as)).hom\n        n =\n    NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (X₁ ⊗ X₂) X₃).symm ≪≫\n              ((α_ (inclusionObj x.as) X₁ X₂).symm ≪≫\n                    (normalizeIsoApp C X₁ x ⊗ Iso.refl X₂) ≪≫ normalizeIsoApp C X₂ (normalizeObj X₁ x.as) ⊗\n                  Iso.refl X₃) ≪≫\n                normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ x.as).as)).hom\n        n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x =>\n            𝟙 ((Discrete.functor fun x => normalizeObj X₃ (normalizeObj X₂ (normalizeObj X₁ x).as).as).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).hom) ≫\n      (α_ (inclusionObj n.as) X₁ (X₂ ⊗ X₃)).inv ≫\n        ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 (X₂ ⊗ X₃)) ≫\n          (α_ (inclusionObj (normalizeObj X₁ n.as).as) X₂ X₃).inv ≫\n            ((normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗ 𝟙 X₃) ≫\n              (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom =\n    ((α_ (inclusionObj n.as) (X₁ ⊗ X₂) X₃).inv ≫\n        ((α_ (inclusionObj n.as) X₁ X₂).inv ≫\n              ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 X₂) ≫ (normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗\n            𝟙 X₃) ≫\n          (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom) ≫\n      𝟙\n        (inclusionObj\n          ((Discrete.functor fun x => normalizeObj X₃ (normalizeObj X₂ (normalizeObj X₁ x).as).as).obj n).as)\n[PROOFSTEP]\nsimp only [comp_tensor_id, associator_conjugation, tensor_id, Category.comp_id]\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).hom) ≫\n      (α_ (inclusionObj n.as) X₁ (X₂ ⊗ X₃)).inv ≫\n        ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 (X₂ ⊗ X₃)) ≫\n          (α_ (inclusionObj (normalizeObj X₁ n.as).as) X₂ X₃).inv ≫\n            ((normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗ 𝟙 X₃) ≫\n              (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom =\n    (α_ (inclusionObj n.as) (X₁ ⊗ X₂) X₃).inv ≫\n      (((α_ (inclusionObj n.as) X₁ X₂).inv ⊗ 𝟙 X₃) ≫\n          ((α_ (inclusionObj n.as ⊗ X₁) X₂ X₃).hom ≫\n              ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 (X₂ ⊗ X₃)) ≫\n                (α_ (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj n).as) X₂ X₃).inv) ≫\n            ((normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗ 𝟙 X₃)) ≫\n        (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom\n[PROOFSTEP]\nsimp only [← Category.assoc]\n[GOAL]\ncase f.α_hom.w.h\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (((((𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).hom) ≫ (α_ (inclusionObj n.as) X₁ (X₂ ⊗ X₃)).inv) ≫\n            ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 (X₂ ⊗ X₃))) ≫\n          (α_ (inclusionObj (normalizeObj X₁ n.as).as) X₂ X₃).inv) ≫\n        ((normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗ 𝟙 X₃)) ≫\n      (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom =\n    ((((((α_ (inclusionObj n.as) (X₁ ⊗ X₂) X₃).inv ≫ ((α_ (inclusionObj n.as) X₁ X₂).inv ⊗ 𝟙 X₃)) ≫\n              (α_ (inclusionObj n.as ⊗ X₁) X₂ X₃).hom) ≫\n            ((normalizeIsoApp C X₁ n).hom ⊗ 𝟙 (X₂ ⊗ X₃))) ≫\n          (α_ (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj n).as) X₂ X₃).inv) ≫\n        ((normalizeIsoApp C X₂ (normalizeObj X₁ n.as)).hom ⊗ 𝟙 X₃)) ≫\n      (normalizeIsoApp C X₃ (normalizeObj X₂ (normalizeObj X₁ n.as).as)).hom\n[PROOFSTEP]\ncongr 4\n[GOAL]\ncase f.α_hom.w.h.e_a.e_a.e_a.e_a\nC : Type u\nX Y X₁ X₂ X₃ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).hom) ≫ (α_ (inclusionObj n.as) X₁ (X₂ ⊗ X₃)).inv =\n    ((α_ (inclusionObj n.as) (X₁ ⊗ X₂) X₃).inv ≫ ((α_ (inclusionObj n.as) X₁ X₂).inv ⊗ 𝟙 X₃)) ≫\n      (α_ (inclusionObj n.as ⊗ X₁) X₂ X₃).hom\n[PROOFSTEP]\nsimp only [Category.assoc, ← cancel_epi (𝟙 (inclusionObj n.as) ⊗ (α_ X₁ X₂ X₃).inv),\n  pentagon_inv_assoc (inclusionObj n.as) X₁ X₂ X₃, tensor_inv_hom_id_assoc, tensor_id, Category.id_comp, Iso.inv_hom_id,\n  Category.comp_id]\n[GOAL]\ncase f.α_inv\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\n⊢ (tensorFunc C).map\n        (Quotient.mk (setoidHom (tensor X✝ (tensor Y✝ Z✝)) (tensor (tensor X✝ Y✝) Z✝)) (Hom.α_inv X✝ Y✝ Z✝)) ≫\n      (normalizeIsoAux C (tensor (tensor X✝ Y✝) Z✝)).hom =\n    (normalizeIsoAux C (tensor X✝ (tensor Y✝ Z✝))).hom ≫\n      (normalize' C).map\n        (Quotient.mk (setoidHom (tensor X✝ (tensor Y✝ Z✝)) (tensor (tensor X✝ Y✝) Z✝)) (Hom.α_inv X✝ Y✝ Z✝))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.α_inv.w.h\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map\n          (Quotient.mk (setoidHom (tensor X✝ (tensor Y✝ Z✝)) (tensor (tensor X✝ Y✝) Z✝)) (Hom.α_inv X✝ Y✝ Z✝)) ≫\n        (normalizeIsoAux C (tensor (tensor X✝ Y✝) Z✝)).hom)\n      n =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X✝ (tensor Y✝ Z✝))).hom ≫\n        (normalize' C).map\n          (Quotient.mk (setoidHom (tensor X✝ (tensor Y✝ Z✝)) (tensor (tensor X✝ Y✝) Z✝)) (Hom.α_inv X✝ Y✝ Z✝)))\n      n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f.α_inv.w.h\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n =>\n          𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom (X✝ ⊗ Y✝ ⊗ Z✝) ((X✝ ⊗ Y✝) ⊗ Z✝)) (Hom.α_inv X✝ Y✝ Z✝)) ≫\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (X✝ ⊗ Y✝) Z✝).symm ≪≫\n              ((α_ (inclusionObj x.as) X✝ Y✝).symm ≪≫\n                    (normalizeIsoApp C X✝ x ⊗ Iso.refl Y✝) ≪≫ normalizeIsoApp C Y✝ (normalizeObj X✝ x.as) ⊗\n                  Iso.refl Z✝) ≪≫\n                normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ x.as).as)).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (Y✝ ⊗ Z✝)).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (Y✝ ⊗ Z✝)) ≪≫\n                (α_ (inclusionObj (normalizeObj X✝ x.as).as) Y✝ Z✝).symm ≪≫\n                  (normalizeIsoApp C Y✝ (normalizeObj X✝ x.as) ⊗ Iso.refl Z✝) ≪≫\n                    normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ x.as).as)).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x =>\n            𝟙 ((Discrete.functor fun x => normalizeObj Z✝ (normalizeObj Y✝ (normalizeObj X✝ x).as).as).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_α_inv, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.α_inv.w.h\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (α_ X✝ Y✝ Z✝).inv) n ≫\n      NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (X✝ ⊗ Y✝) Z✝).symm ≪≫\n              ((α_ (inclusionObj x.as) X✝ Y✝).symm ≪≫\n                    (normalizeIsoApp C X✝ x ⊗ Iso.refl Y✝) ≪≫ normalizeIsoApp C Y✝ (normalizeObj X✝ x.as) ⊗\n                  Iso.refl Z✝) ≪≫\n                normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ x.as).as)).hom\n        n =\n    NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (Y✝ ⊗ Z✝)).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (Y✝ ⊗ Z✝)) ≪≫\n                (α_ (inclusionObj (normalizeObj X✝ x.as).as) Y✝ Z✝).symm ≪≫\n                  (normalizeIsoApp C Y✝ (normalizeObj X✝ x.as) ⊗ Iso.refl Z✝) ≪≫\n                    normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ x.as).as)).hom\n        n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x =>\n            𝟙 ((Discrete.functor fun x => normalizeObj Z✝ (normalizeObj Y✝ (normalizeObj X✝ x).as).as).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.α_inv.w.h\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (α_ X✝ Y✝ Z✝).inv) ≫\n      (α_ (inclusionObj n.as) (X✝ ⊗ Y✝) Z✝).inv ≫\n        ((α_ (inclusionObj n.as) X✝ Y✝).inv ≫\n              ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 Y✝) ≫ (normalizeIsoApp C Y✝ (normalizeObj X✝ n.as)).hom ⊗\n            𝟙 Z✝) ≫\n          (normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ n.as).as)).hom =\n    ((α_ (inclusionObj n.as) X✝ (Y✝ ⊗ Z✝)).inv ≫\n        ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (Y✝ ⊗ Z✝)) ≫\n          (α_ (inclusionObj (normalizeObj X✝ n.as).as) Y✝ Z✝).inv ≫\n            ((normalizeIsoApp C Y✝ (normalizeObj X✝ n.as)).hom ⊗ 𝟙 Z✝) ≫\n              (normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ n.as).as)).hom) ≫\n      𝟙\n        (inclusionObj\n          ((Discrete.functor fun x => normalizeObj Z✝ (normalizeObj Y✝ (normalizeObj X✝ x).as).as).obj n).as)\n[PROOFSTEP]\nsimp only [Category.assoc, comp_tensor_id, tensor_id, Category.comp_id, pentagon_inv_assoc, ←\n  associator_inv_naturality_assoc]\n[GOAL]\ncase f.α_inv.w.h\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (α_ (inclusionObj n.as) X✝ (Y✝ ⊗ Z✝)).inv ≫\n      ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (Y✝ ⊗ Z✝)) ≫\n        (α_ (inclusionObj ((Discrete.functor (normalizeObj X✝)).obj n).as) Y✝ Z✝).inv ≫\n          ((normalizeIsoApp C Y✝ (normalizeObj X✝ n.as)).hom ⊗ 𝟙 Z✝) ≫\n            (normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ n.as).as)).hom =\n    (α_ (inclusionObj n.as) X✝ (Y✝ ⊗ Z✝)).inv ≫\n      ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (Y✝ ⊗ Z✝)) ≫\n        (α_ (inclusionObj (normalizeObj X✝ n.as).as) Y✝ Z✝).inv ≫\n          ((normalizeIsoApp C Y✝ (normalizeObj X✝ n.as)).hom ⊗ 𝟙 Z✝) ≫\n            (normalizeIsoApp C Z✝ (normalizeObj Y✝ (normalizeObj X✝ n.as).as)).hom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.l_hom\nC : Type u\nX Y X✝ : F C\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom (tensor Unit X✝) X✝) (Hom.l_hom X✝)) ≫ (normalizeIsoAux C X✝).hom =\n    (normalizeIsoAux C (tensor Unit X✝)).hom ≫\n      (normalize' C).map (Quotient.mk (setoidHom (tensor Unit X✝) X✝) (Hom.l_hom X✝))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.l_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor Unit X✝) X✝) (Hom.l_hom X✝)) ≫ (normalizeIsoAux C X✝).hom) n =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor Unit X✝)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor Unit X✝) X✝) (Hom.l_hom X✝)))\n      n\n[PROOFSTEP]\ndsimp [Functor.comp]\n[GOAL]\ncase f.l_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom (𝟙_ (F C) ⊗ X✝) X✝) (Hom.l_hom X✝)) ≫\n        (NatIso.ofComponents (normalizeIsoApp C X✝)).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (𝟙_ (F C)) X✝).symm ≪≫\n              (ρ_ (inclusionObj x.as) ⊗ Iso.refl X✝) ≪≫ normalizeIsoApp C X✝ { as := x.as }).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor fun x => normalizeObj X✝ x).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_l_hom, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.l_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).hom) n ≫\n      NatTrans.app (NatIso.ofComponents (normalizeIsoApp C X✝)).hom n =\n    NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (𝟙_ (F C)) X✝).symm ≪≫\n              (ρ_ (inclusionObj x.as) ⊗ Iso.refl X✝) ≪≫ normalizeIsoApp C X✝ { as := x.as }).hom\n        n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor fun x => normalizeObj X✝ x).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.l_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).hom) ≫ (normalizeIsoApp C X✝ n).hom =\n    ((α_ (inclusionObj n.as) (𝟙_ (F C)) X✝).inv ≫\n        ((ρ_ (inclusionObj n.as)).hom ⊗ 𝟙 X✝) ≫ (normalizeIsoApp C X✝ { as := n.as }).hom) ≫\n      𝟙 (inclusionObj ((Discrete.functor fun x => normalizeObj X✝ x).obj n).as)\n[PROOFSTEP]\nsimp only [triangle_assoc_comp_right_assoc, Category.assoc, Category.comp_id]\n[GOAL]\ncase f.l_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).hom) ≫ (normalizeIsoApp C X✝ n).hom =\n    (𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).hom) ≫ (normalizeIsoApp C X✝ { as := n.as }).hom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.l_inv\nC : Type u\nX Y X✝ : F C\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X✝ (tensor Unit X✝)) (Hom.l_inv X✝)) ≫\n      (normalizeIsoAux C (tensor Unit X✝)).hom =\n    (normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ (tensor Unit X✝)) (Hom.l_inv X✝))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.l_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom X✝ (tensor Unit X✝)) (Hom.l_inv X✝)) ≫\n        (normalizeIsoAux C (tensor Unit X✝)).hom)\n      n =\n    NatTrans.app\n      ((normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ (tensor Unit X✝)) (Hom.l_inv X✝))) n\n[PROOFSTEP]\ndsimp [Functor.comp]\n[GOAL]\ncase f.l_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom X✝ (𝟙_ (F C) ⊗ X✝)) (Hom.l_inv X✝)) ≫\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (𝟙_ (F C)) X✝).symm ≪≫\n              (ρ_ (inclusionObj x.as) ⊗ Iso.refl X✝) ≪≫ normalizeIsoApp C X✝ { as := x.as }).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents (normalizeIsoApp C X✝)).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor (normalizeObj X✝)).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_l_inv, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.l_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).inv) n ≫\n      NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) (𝟙_ (F C)) X✝).symm ≪≫\n              (ρ_ (inclusionObj x.as) ⊗ Iso.refl X✝) ≪≫ normalizeIsoApp C X✝ { as := x.as }).hom\n        n =\n    NatTrans.app (NatIso.ofComponents (normalizeIsoApp C X✝)).hom n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor (normalizeObj X✝)).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.l_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (λ_ X✝).inv) ≫\n      (α_ (inclusionObj n.as) (𝟙_ (F C)) X✝).inv ≫\n        ((ρ_ (inclusionObj n.as)).hom ⊗ 𝟙 X✝) ≫ (normalizeIsoApp C X✝ { as := n.as }).hom =\n    (normalizeIsoApp C X✝ n).hom ≫ 𝟙 (inclusionObj ((Discrete.functor (normalizeObj X✝)).obj n).as)\n[PROOFSTEP]\nsimp only [triangle_assoc_comp_left_inv_assoc, inv_hom_id_tensor_assoc, tensor_id, Category.id_comp, Category.comp_id]\n[GOAL]\ncase f.l_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (normalizeIsoApp C X✝ { as := n.as }).hom = (normalizeIsoApp C X✝ n).hom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.ρ_hom\nC : Type u\nX Y X✝ : F C\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom (tensor X✝ Unit) X✝) (Hom.ρ_hom X✝)) ≫ (normalizeIsoAux C X✝).hom =\n    (normalizeIsoAux C (tensor X✝ Unit)).hom ≫\n      (normalize' C).map (Quotient.mk (setoidHom (tensor X✝ Unit) X✝) (Hom.ρ_hom X✝))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.ρ_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X✝ Unit) X✝) (Hom.ρ_hom X✝)) ≫ (normalizeIsoAux C X✝).hom) n =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X✝ Unit)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X✝ Unit) X✝) (Hom.ρ_hom X✝)))\n      n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f.ρ_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom (X✝ ⊗ 𝟙_ (F C)) X✝) (Hom.ρ_hom X✝)) ≫\n        (NatIso.ofComponents (normalizeIsoApp C X✝)).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (𝟙_ (F C))).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (𝟙_ (F C))) ≪≫ ρ_ (inclusionObj (normalizeObj X✝ x.as).as)).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor fun x => { as := (normalizeObj X✝ x).as }).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_ρ_hom, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.ρ_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (ρ_ X✝).hom) n ≫\n      NatTrans.app (NatIso.ofComponents (normalizeIsoApp C X✝)).hom n =\n    NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (𝟙_ (F C))).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (𝟙_ (F C))) ≪≫ ρ_ (inclusionObj (normalizeObj X✝ x.as).as)).hom\n        n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor fun x => { as := (normalizeObj X✝ x).as }).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.ρ_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (ρ_ X✝).hom) ≫ (normalizeIsoApp C X✝ n).hom =\n    ((α_ (inclusionObj n.as) X✝ (𝟙_ (F C))).inv ≫\n        ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (𝟙_ (F C))) ≫ (ρ_ (inclusionObj (normalizeObj X✝ n.as).as)).hom) ≫\n      𝟙 (inclusionObj ((Discrete.functor fun x => { as := (normalizeObj X✝ x).as }).obj n).as)\n[PROOFSTEP]\nsimp only [← (Iso.inv_comp_eq _).2 (rightUnitor_tensor _ _), Category.assoc, ← rightUnitor_naturality, Category.comp_id]\n[GOAL]\ncase f.ρ_hom.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (α_ (inclusionObj n.as) X✝ (𝟙_ (F C))).inv ≫\n      ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 tensorUnit') ≫\n        (ρ_ (inclusionObj ((Discrete.functor (normalizeObj X✝)).obj n).as)).hom =\n    (α_ (inclusionObj n.as) X✝ (𝟙_ (F C))).inv ≫\n      ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (𝟙_ (F C))) ≫ (ρ_ (inclusionObj (normalizeObj X✝ n.as).as)).hom\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.ρ_inv\nC : Type u\nX Y X✝ : F C\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X✝ (tensor X✝ Unit)) (Hom.ρ_inv X✝)) ≫\n      (normalizeIsoAux C (tensor X✝ Unit)).hom =\n    (normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ (tensor X✝ Unit)) (Hom.ρ_inv X✝))\n[PROOFSTEP]\next n\n[GOAL]\ncase f.ρ_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom X✝ (tensor X✝ Unit)) (Hom.ρ_inv X✝)) ≫\n        (normalizeIsoAux C (tensor X✝ Unit)).hom)\n      n =\n    NatTrans.app\n      ((normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ (tensor X✝ Unit)) (Hom.ρ_inv X✝))) n\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase f.ρ_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app\n      ((Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ Quotient.mk (setoidHom X✝ (X✝ ⊗ 𝟙_ (F C))) (Hom.ρ_inv X✝)) ≫\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (𝟙_ (F C))).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (𝟙_ (F C))) ≪≫ ρ_ (inclusionObj (normalizeObj X✝ x.as).as)).hom)\n      n =\n    NatTrans.app\n      ((NatIso.ofComponents (normalizeIsoApp C X✝)).hom ≫\n        ((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor (normalizeObj X✝)).obj x)))\n      n\n[PROOFSTEP]\nrw [mk_ρ_inv, NatTrans.comp_app, NatTrans.comp_app]\n[GOAL]\ncase f.ρ_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ NatTrans.app (Discrete.natTrans fun n => 𝟙 (inclusionObj n.as) ⊗ (ρ_ X✝).inv) n ≫\n      NatTrans.app\n        (NatIso.ofComponents fun x =>\n            (α_ (inclusionObj x.as) X✝ (𝟙_ (F C))).symm ≪≫\n              (normalizeIsoApp C X✝ x ⊗ Iso.refl (𝟙_ (F C))) ≪≫ ρ_ (inclusionObj (normalizeObj X✝ x.as).as)).hom\n        n =\n    NatTrans.app (NatIso.ofComponents (normalizeIsoApp C X✝)).hom n ≫\n      NatTrans.app\n        (((whiskeringRight (Discrete (NormalMonoidalObject C)) (Discrete (NormalMonoidalObject C)) (F C)).obj\n              (Discrete.functor inclusionObj)).map\n          (Discrete.natTrans fun x => 𝟙 ((Discrete.functor (normalizeObj X✝)).obj x)))\n        n\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp]\n[GOAL]\ncase f.ρ_inv.w.h\nC : Type u\nX Y X✝ : F C\nn : (Discrete ∘ NormalMonoidalObject) C\n⊢ (𝟙 (inclusionObj n.as) ⊗ (ρ_ X✝).inv) ≫\n      (α_ (inclusionObj n.as) X✝ (𝟙_ (F C))).inv ≫\n        ((normalizeIsoApp C X✝ n).hom ⊗ 𝟙 (𝟙_ (F C))) ≫ (ρ_ (inclusionObj (normalizeObj X✝ n.as).as)).hom =\n    (normalizeIsoApp C X✝ n).hom ≫ 𝟙 (inclusionObj ((Discrete.functor (normalizeObj X✝)).obj n).as)\n[PROOFSTEP]\nsimp only [← (Iso.eq_comp_inv _).1 (rightUnitor_tensor_inv _ _), rightUnitor_conjugation, Category.assoc,\n  Iso.hom_inv_id_assoc, Iso.inv_hom_id_assoc, Iso.inv_hom_id, Discrete.functor, Category.comp_id, Function.comp]\n[GOAL]\ncase f.comp\nC : Type u\nX Y X✝ Y✝ Z✝ : F C\nf✝ : X✝ ⟶ᵐ Y✝\ng✝ : Y✝ ⟶ᵐ Z✝\nh₁ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X✝ Y✝) f✝) ≫ (normalizeIsoAux C Y✝).hom =\n    (normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ Y✝) f✝)\nh₂ :\n  (tensorFunc C).map (Quotient.mk (setoidHom Y✝ Z✝) g✝) ≫ (normalizeIsoAux C Z✝).hom =\n    (normalizeIsoAux C Y✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom Y✝ Z✝) g✝)\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom X✝ Z✝) (Hom.comp f✝ g✝)) ≫ (normalizeIsoAux C Z✝).hom =\n    (normalizeIsoAux C X✝).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X✝ Z✝) (Hom.comp f✝ g✝))\n[PROOFSTEP]\nrw [mk_comp, Functor.map_comp, Functor.map_comp, Category.assoc, h₂, reassoc_of% h₁]\n[GOAL]\ncase f.tensor\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nh₁ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom =\n    (normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)\nh₂ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom =\n    (normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g)\n⊢ (tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n      (normalizeIsoAux C (tensor Y₁ Y₂)).hom =\n    (normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n      (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g))\n[PROOFSTEP]\next ⟨n⟩\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nh₁ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom =\n    (normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)\nh₂ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom =\n    (normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g)\nn : NormalMonoidalObject C\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n        (normalizeIsoAux C (tensor Y₁ Y₂)).hom)\n      { as := n } =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n      { as := n }\n[PROOFSTEP]\nreplace h₁ := NatTrans.congr_app h₁ ⟨n⟩\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nh₂ :\n  (tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom =\n    (normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g)\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n        (normalizeIsoAux C (tensor Y₁ Y₂)).hom)\n      { as := n } =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n      { as := n }\n[PROOFSTEP]\nreplace h₂ := NatTrans.congr_app h₂ ((Discrete.functor (normalizeObj X₁)).obj ⟨n⟩)\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n        (normalizeIsoAux C (tensor Y₁ Y₂)).hom)\n      { as := n } =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n      { as := n }\n[PROOFSTEP]\nhave h₃ := (normalizeIsoAux _ Y₂).hom.naturality ((normalizeMapAux f).app ⟨n⟩)\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n        (normalizeIsoAux C (tensor Y₁ Y₂)).hom)\n      { as := n } =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n      { as := n }\n[PROOFSTEP]\nhave h₄ :\n  ∀ (X₃ Y₃ : N C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n ↦ inclusionObj n ⊗ Y₂).map φ :=\n  by\n  rintro ⟨X₃⟩ ⟨Y₃⟩ φ\n  obtain rfl : X₃ = Y₃ := φ.1.1\n  simp only [discrete_functor_map_eq_id, tensor_id]\n  rfl\n[GOAL]\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\n⊢ ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n[PROOFSTEP]\nrintro ⟨X₃⟩ ⟨Y₃⟩ φ\n[GOAL]\ncase mk.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\nX₃ Y₃ : NormalMonoidalObject C\nφ : { as := X₃ } ⟶ { as := Y₃ }\n⊢ (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n[PROOFSTEP]\nobtain rfl : X₃ = Y₃ := φ.1.1\n[GOAL]\ncase mk.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\nX₃ : NormalMonoidalObject C\nφ : { as := X₃ } ⟶ { as := X₃ }\n⊢ (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n[PROOFSTEP]\nsimp only [discrete_functor_map_eq_id, tensor_id]\n[GOAL]\ncase mk.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\nX₃ : NormalMonoidalObject C\nφ : { as := X₃ } ⟶ { as := X₃ }\n⊢ 𝟙 ((Discrete.functor inclusionObj).obj { as := X₃ } ⊗ Y₂) =\n    𝟙 ((Discrete.functor fun n => inclusionObj n ⊗ Y₂).obj { as := X₃ })\n[PROOFSTEP]\nrfl\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoAux C Y₁).hom) { as := n } =\n    NatTrans.app ((normalizeIsoAux C X₁).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g) ≫ (normalizeIsoAux C Y₂).hom)\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app ((normalizeIsoAux C X₂).hom ≫ (normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n      ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ NatTrans.app\n      ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)) ≫\n        (normalizeIsoAux C (tensor Y₁ Y₂)).hom)\n      { as := n } =\n    NatTrans.app\n      ((normalizeIsoAux C (tensor X₁ X₂)).hom ≫\n        (normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n      { as := n }\n[PROOFSTEP]\nrw [NatTrans.comp_app, NatTrans.comp_app] at h₁ h₂ ⊢\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n } ≫\n      NatTrans.app (normalizeIsoAux C Y₁).hom { as := n } =\n    NatTrans.app (normalizeIsoAux C X₁).hom { as := n } ≫\n      NatTrans.app ((normalize' C).map (Quotient.mk (setoidHom X₁ Y₁) f)) { as := n }\nh₂ :\n  NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n        ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C X₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      NatTrans.app ((normalize' C).map (Quotient.mk (setoidHom X₂ Y₂) g))\n        ((Discrete.functor (normalizeObj X₁)).obj { as := n })\nh₃ :\n  ((tensorFunc C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj Y₁)).obj { as := n }) =\n    NatTrans.app (normalizeIsoAux C Y₂).hom ((Discrete.functor (normalizeObj X₁)).obj { as := n }) ≫\n      ((normalize' C).obj Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ NatTrans.app ((tensorFunc C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n        { as := n } ≫\n      NatTrans.app (normalizeIsoAux C (tensor Y₁ Y₂)).hom { as := n } =\n    NatTrans.app (normalizeIsoAux C (tensor X₁ X₂)).hom { as := n } ≫\n      NatTrans.app ((normalize' C).map (Quotient.mk (setoidHom (tensor X₁ X₂) (tensor Y₁ Y₂)) (Hom.tensor f g)))\n        { as := n }\n[PROOFSTEP]\ndsimp [NatIso.ofComponents, normalizeMapAux, whiskeringRight, whiskerRight, Functor.comp, Discrete.natTrans] at h₁ h₂ h₃\n  ⊢\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoApp C Y₁ { as := n }).hom =\n    (normalizeIsoApp C X₁ { as := n }).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₂ :\n  (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom =\n    (normalizeIsoApp C X₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) ((Discrete.functor (normalizeObj X₁)).obj { as := n }))\nh₃ :\n  (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom =\n    (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom (X₁ ⊗ X₂) (Y₁ ⊗ Y₂)) (Hom.tensor f g)) ≫\n      (α_ (inclusionObj n) Y₁ Y₂).inv ≫\n        ((normalizeIsoApp C Y₁ { as := n }).hom ⊗ 𝟙 Y₂) ≫ (normalizeIsoApp C Y₂ (normalizeObj Y₁ n)).hom =\n    ((α_ (inclusionObj n) X₁ X₂).inv ≫\n        ((normalizeIsoApp C X₁ { as := n }).hom ⊗ 𝟙 X₂) ≫ (normalizeIsoApp C X₂ (normalizeObj X₁ n)).hom) ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) (normalizeObj X₁ n) ≫\n          (Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\n[PROOFSTEP]\nrw [mk_tensor, associator_inv_naturality_assoc, ← tensor_comp_assoc, h₁, Category.assoc, Category.comp_id, ←\n  @Category.id_comp (F C) _ _ _ (@Quotient.mk _ _ g), tensor_comp, Category.assoc, Category.assoc, Functor.map_comp]\n[GOAL]\ncase f.tensor.w.h.mk\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoApp C Y₁ { as := n }).hom =\n    (normalizeIsoApp C X₁ { as := n }).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₂ :\n  (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom =\n    (normalizeIsoApp C X₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) ((Discrete.functor (normalizeObj X₁)).obj { as := n }))\nh₃ :\n  (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom =\n    (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ (α_ (inclusionObj n) X₁ X₂).inv ≫\n      ((normalizeIsoApp C X₁ { as := n }).hom ⊗ 𝟙 X₂) ≫\n        ((Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n }) ⊗\n            Quotient.mk (setoidHom X₂ Y₂) g) ≫\n          (normalizeIsoApp C Y₂ (normalizeObj Y₁ n)).hom =\n    (α_ (inclusionObj n) X₁ X₂).inv ≫\n      ((normalizeIsoApp C X₁ { as := n }).hom ⊗ 𝟙 X₂) ≫\n        (normalizeIsoApp C X₂ (normalizeObj X₁ n)).hom ≫\n          (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux g) (normalizeObj X₁ n)) ≫\n            (Discrete.functor inclusionObj).map\n              ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\n[PROOFSTEP]\ncongr 2\n[GOAL]\ncase f.tensor.w.h.mk.e_a.e_a\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoApp C Y₁ { as := n }).hom =\n    (normalizeIsoApp C X₁ { as := n }).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₂ :\n  (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom =\n    (normalizeIsoApp C X₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) ((Discrete.functor (normalizeObj X₁)).obj { as := n }))\nh₃ :\n  (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom =\n    (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ ((Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n }) ⊗\n        Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ (normalizeObj Y₁ n)).hom =\n    (normalizeIsoApp C X₂ (normalizeObj X₁ n)).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux g) (normalizeObj X₁ n)) ≫\n        (Discrete.functor inclusionObj).map\n          ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\n[PROOFSTEP]\nerw [← reassoc_of% h₂]\n[GOAL]\ncase f.tensor.w.h.mk.e_a.e_a\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoApp C Y₁ { as := n }).hom =\n    (normalizeIsoApp C X₁ { as := n }).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₂ :\n  (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom =\n    (normalizeIsoApp C X₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) ((Discrete.functor (normalizeObj X₁)).obj { as := n }))\nh₃ :\n  (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom =\n    (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ ((Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n }) ⊗\n        Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ (normalizeObj Y₁ n)).hom =\n    (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n        (Discrete.functor inclusionObj).map\n          ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\n[PROOFSTEP]\nrw [← h₃, ← Category.assoc, ← id_tensor_comp_tensor_id, h₄]\n[GOAL]\ncase f.tensor.w.h.mk.e_a.e_a\nC : Type u\nX Y X₁ X₂ Y₁ Y₂ : F C\nf : X₁ ⟶ᵐ Y₁\ng : X₂ ⟶ᵐ Y₂\nn : NormalMonoidalObject C\nh₁ :\n  (𝟙 (inclusionObj n) ⊗ Quotient.mk (setoidHom X₁ Y₁) f) ≫ (normalizeIsoApp C Y₁ { as := n }).hom =\n    (normalizeIsoApp C X₁ { as := n }).hom ≫\n      (Discrete.functor inclusionObj).map (NatTrans.app (normalizeMapAux f) { as := n })\nh₂ :\n  (𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom =\n    (normalizeIsoApp C X₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        (NatTrans.app (normalizeMapAux g) ((Discrete.functor (normalizeObj X₁)).obj { as := n }))\nh₃ :\n  (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n }) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom =\n    (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj X₁)).obj { as := n })).hom ≫\n      (Discrete.functor inclusionObj).map\n        ((Discrete.functor (normalizeObj Y₂)).map (NatTrans.app (normalizeMapAux f) { as := n }))\nh₄ :\n  ∀ (X₃ Y₃ : (Discrete ∘ NormalMonoidalObject) C) (φ : X₃ ⟶ Y₃),\n    (Discrete.functor inclusionObj).map φ ⊗ 𝟙 Y₂ = (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map φ\n⊢ ((𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n        (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })) ≫\n      (normalizeIsoApp C Y₂ (normalizeObj Y₁ n)).hom =\n    ((𝟙 (inclusionObj ((Discrete.functor (normalizeObj X₁)).obj { as := n }).as) ⊗ Quotient.mk (setoidHom X₂ Y₂) g) ≫\n        (Discrete.functor fun n => inclusionObj n ⊗ Y₂).map (NatTrans.app (normalizeMapAux f) { as := n })) ≫\n      (normalizeIsoApp C Y₂ ((Discrete.functor (normalizeObj Y₁)).obj { as := n })).hom\n[PROOFSTEP]\nrfl\n[GOAL]\nC : Type u\n⊢ ∀ {X Y : F C} (f : X ⟶ Y),\n    (𝟭 (F C)).map f ≫\n        ((fun X => (λ_ X).symm ≪≫ ((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }) Y).hom =\n      ((fun X => (λ_ X).symm ≪≫ ((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }) X).hom ≫\n        (fullNormalize C ⋙ inclusion).map f\n[PROOFSTEP]\nintro X Y f\n[GOAL]\nC : Type u\nX Y : F C\nf : X ⟶ Y\n⊢ (𝟭 (F C)).map f ≫ ((fun X => (λ_ X).symm ≪≫ ((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }) Y).hom =\n    ((fun X => (λ_ X).symm ≪≫ ((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }) X).hom ≫\n      (fullNormalize C ⋙ inclusion).map f\n[PROOFSTEP]\ndsimp\n[GOAL]\nC : Type u\nX Y : F C\nf : X ⟶ Y\n⊢ f ≫ (λ_ Y).inv ≫ (((normalizeIso C).app Y).app { as := NormalMonoidalObject.Unit }).hom =\n    ((λ_ X).inv ≫ (((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }).hom) ≫\n      (fullNormalize C ⋙ Discrete.functor inclusionObj).map f\n[PROOFSTEP]\nrw [leftUnitor_inv_naturality_assoc, Category.assoc, Iso.cancel_iso_inv_left]\n[GOAL]\nC : Type u\nX Y : F C\nf : X ⟶ Y\n⊢ (𝟙 tensorUnit' ⊗ f) ≫ (((normalizeIso C).app Y).app { as := NormalMonoidalObject.Unit }).hom =\n    (((normalizeIso C).app X).app { as := NormalMonoidalObject.Unit }).hom ≫\n      (fullNormalize C ⋙ Discrete.functor inclusionObj).map f\n[PROOFSTEP]\nexact\n  congr_arg (fun f => NatTrans.app f (Discrete.mk NormalMonoidalObject.Unit)) ((normalizeIso.{u} C).hom.naturality f)\n[GOAL]\nC : Type u\nX Y : F C\nf g : X ⟶ Y\n⊢ f = g\n[PROOFSTEP]\nhave hfg : (fullNormalize C).map f = (fullNormalize C).map g := Subsingleton.elim _ _\n[GOAL]\nC : Type u\nX Y : F C\nf g : X ⟶ Y\nhfg : (fullNormalize C).map f = (fullNormalize C).map g\n⊢ f = g\n[PROOFSTEP]\nhave hf := NatIso.naturality_2 (fullNormalizeIso.{u} C) f\n[GOAL]\nC : Type u\nX Y : F C\nf g : X ⟶ Y\nhfg : (fullNormalize C).map f = (fullNormalize C).map g\nhf :\n  NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map f ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    (𝟭 (F C)).map f\n⊢ f = g\n[PROOFSTEP]\nhave hg := NatIso.naturality_2 (fullNormalizeIso.{u} C) g\n[GOAL]\nC : Type u\nX Y : F C\nf g : X ⟶ Y\nhfg : (fullNormalize C).map f = (fullNormalize C).map g\nhf :\n  NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map f ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    (𝟭 (F C)).map f\nhg :\n  NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map g ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    (𝟭 (F C)).map g\n⊢ f = g\n[PROOFSTEP]\nexact hf.symm.trans (Eq.trans (by simp only [Functor.comp_map, hfg]) hg)\n[GOAL]\nC : Type u\nX Y : F C\nf g : X ⟶ Y\nhfg : (fullNormalize C).map f = (fullNormalize C).map g\nhf :\n  NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map f ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    (𝟭 (F C)).map f\nhg :\n  NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map g ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    (𝟭 (F C)).map g\n⊢ NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map f ≫ NatTrans.app (fullNormalizeIso C).inv Y =\n    NatTrans.app (fullNormalizeIso C).hom X ≫\n      (fullNormalize C ⋙ inclusion).map g ≫ NatTrans.app (fullNormalizeIso C).inv Y\n[PROOFSTEP]\nsimp only [Functor.comp_map, hfg]\n[GOAL]\nC : Type u\nsrc✝ : Category.{u, u} (F C) := inferInstance\nX✝ Y✝ : F C\n⊢ ∀ (a b : X✝ ⟶ᵐ Y✝),\n    a ≈ b →\n      (fun f => Quotient.mk (setoidHom Y✝ X✝) (inverseAux f)) a =\n        (fun f => Quotient.mk (setoidHom Y✝ X✝) (inverseAux f)) b\n[PROOFSTEP]\naesop_cat\n", "meta": {"mathlib_filename": "Mathlib.CategoryTheory.Monoidal.Free.Coherence", "llama_tokens": 28460, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.523420348936324, "lm_q2_score": 0.48047867804790706, "lm_q1q2_score": 0.2514923173202992}}
{"text": "[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\n⊢ foldl (argAux r) o [] = none ↔ [] = [] ∧ o = none\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd : α\n⊢ (foldl (argAux r) o tl = none ↔ tl = [] ∧ o = none) →\n    (foldl (argAux r) o (tl ++ [hd]) = none ↔ tl ++ [hd] = [] ∧ o = none)\n[PROOFSTEP]\nsimp [argAux]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd : α\n⊢ (foldl (fun a b => Option.rec (some b) (fun val => if r b val then some b else some val) a) o tl = none ↔\n      tl = [] ∧ o = none) →\n    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val)\n          (foldl (fun a b => Option.rec (some b) (fun val => if r b val then some b else some val) a) o tl) =\n        none\n[PROOFSTEP]\ncases foldl (argAux r) o tl\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd : α\n⊢ (none = none ↔ tl = [] ∧ o = none) →\n    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) none = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd val✝ : α\n⊢ (some val✝ = none ↔ tl = [] ∧ o = none) →\n    ¬Option.rec (some hd) (fun val => if r hd val then some hd else some val) (some val✝) = none\n[PROOFSTEP]\nsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd val✝ : α\n⊢ (tl = [] → ¬o = none) → ¬(if r hd val✝ then some hd else some val✝) = none\n[PROOFSTEP]\ntry split_ifs <;> simp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd val✝ : α\n⊢ (tl = [] → ¬o = none) → ¬(if r hd val✝ then some hd else some val✝) = none\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd val✝ : α\nh✝ : r hd val✝\n⊢ (tl = [] → ¬o = none) → ¬False\n[PROOFSTEP]\nsimp\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\ntl : List α\nhd val✝ : α\nh✝ : ¬r hd val✝\n⊢ (tl = [] → ¬o = none) → ¬False\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na m : α\nl : List α\n⊢ ∀ (a m : α), m ∈ foldl (argAux r) (some a) [] → m ∈ [a]\n[PROOFSTEP]\nsimp [eq_comm]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na m : α\nl : List α\n⊢ ∀ (l : List α) (a : α),\n    (∀ (a m : α), m ∈ foldl (argAux r) (some a) l → m ∈ a :: l) →\n      ∀ (a_2 m : α), m ∈ foldl (argAux r) (some a_2) (l ++ [a]) → m ∈ a_2 :: (l ++ [a])\n[PROOFSTEP]\nintro tl hd ih a m\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m : α\n⊢ m ∈ foldl (argAux r) (some a) (tl ++ [hd]) → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsimp only [foldl_append, foldl_cons, foldl_nil, argAux]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m : α\n⊢ m ∈\n      Option.rec (some hd) (fun val => if r hd val then some hd else some val)\n        (foldl (fun a b => Option.rec (some b) (fun val => if r b val then some b else some val) a) (some a) tl) →\n    m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\ncases hf : foldl (argAux r) (some a) tl\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m : α\nhf : foldl (argAux r) (some a) tl = none\n⊢ m ∈ Option.rec (some hd) (fun val => if r hd val then some hd else some val) none → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\n⊢ m ∈ Option.rec (some hd) (fun val => if r hd val then some hd else some val) (some val✝) → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\ndsimp only\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\n⊢ (m ∈ if r hd val✝ then some hd else some val✝) → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\nh✝ : r hd val✝\n⊢ m ∈ some hd → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsimp (config := { contextual := true })\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd : α\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m ∈ a :: tl\na m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\nh✝ : ¬r hd val✝\n⊢ m ∈ some val✝ → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsimp only [List.mem_cons] at ih \n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd a m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\nh✝ : ¬r hd val✝\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m = a ∨ m ∈ tl\n⊢ m ∈ some val✝ → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nrcases ih _ _ hf with rfl | H\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na m✝ : α\nl tl : List α\nhd m val✝ : α\nh✝ : ¬r hd val✝\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m = a ∨ m ∈ tl\nhf : foldl (argAux r) (some val✝) tl = some val✝\n⊢ m ∈ some val✝ → m ∈ val✝ :: (tl ++ [hd])\n[PROOFSTEP]\nsimp (config := { contextual := true }) only [Option.mem_def, Option.some.injEq, find?, eq_comm, mem_cons, mem_append,\n  mem_singleton, true_or, implies_true]\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl✝ : List α\no : Option α\na✝ m✝ : α\nl tl : List α\nhd a m val✝ : α\nhf : foldl (argAux r) (some a) tl = some val✝\nh✝ : ¬r hd val✝\nih : ∀ (a m : α), m ∈ foldl (argAux r) (some a) tl → m = a ∨ m ∈ tl\nH : val✝ ∈ tl\n⊢ m ∈ some val✝ → m ∈ a :: (tl ++ [hd])\n[PROOFSTEP]\nsimp (config := { contextual := true }) [@eq_comm _ _ m, H]\n[GOAL]\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\n⊢ ∀ {a m : α} {o : Option α}, a ∈ l → m ∈ foldl (argAux r) o l → ¬r a m\n[PROOFSTEP]\ninduction' l using List.reverseRecOn with tl a ih\n[GOAL]\ncase H0\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\n⊢ ∀ {a m : α} {o : Option α}, a ∈ [] → m ∈ foldl (argAux r) o [] → ¬r a m\n[PROOFSTEP]\nsimp\n[GOAL]\ncase H1\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no : Option α\na✝ m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\n⊢ ∀ {a_1 m : α} {o : Option α}, a_1 ∈ tl ++ [a] → m ∈ foldl (argAux r) o (tl ++ [a]) → ¬r a_1 m\n[PROOFSTEP]\nintro b m o hb ho\n[GOAL]\ncase H1\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ foldl (argAux r) o (tl ++ [a])\n⊢ ¬r b m\n[PROOFSTEP]\nrw [foldl_append, foldl_cons, foldl_nil, argAux] at ho \n[GOAL]\ncase H1\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ Option.casesOn (foldl (argAux r) o tl) (some a) fun c => if r a c then some a else some c\n⊢ ¬r b m\n[PROOFSTEP]\ncases' hf : foldl (argAux r) o tl with c\n[GOAL]\ncase H1.none\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ Option.casesOn (foldl (argAux r) o tl) (some a) fun c => if r a c then some a else some c\nhf : foldl (argAux r) o tl = none\n⊢ ¬r b m\n[PROOFSTEP]\nrw [hf] at ho \n[GOAL]\ncase H1.none\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ Option.casesOn none (some a) fun c => if r a c then some a else some c\nhf : foldl (argAux r) o tl = none\n⊢ ¬r b m\n[PROOFSTEP]\nrw [foldl_argAux_eq_none] at hf \n[GOAL]\ncase H1.none\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ Option.casesOn none (some a) fun c => if r a c then some a else some c\nhf : tl = [] ∧ o = none\n⊢ ¬r b m\n[PROOFSTEP]\nsimp_all [hf.1, hf.2, hr₀ _]\n[GOAL]\ncase H1.some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nho : m ∈ Option.casesOn (foldl (argAux r) o tl) (some a) fun c => if r a c then some a else some c\nc : α\nhf : foldl (argAux r) o tl = some c\n⊢ ¬r b m\n[PROOFSTEP]\nrw [hf, Option.mem_def] at ho \n[GOAL]\ncase H1.some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nho : (Option.casesOn (some c) (some a) fun c => if r a c then some a else some c) = some m\nhf : foldl (argAux r) o tl = some c\n⊢ ¬r b m\n[PROOFSTEP]\ndsimp only at ho \n[GOAL]\ncase H1.some\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nho : (if r a c then some a else some c) = some m\nhf : foldl (argAux r) o tl = some c\n⊢ ¬r b m\n[PROOFSTEP]\nsplit_ifs at ho  with hac\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nho : some a = some m\n⊢ ¬r b m\n[PROOFSTEP]\ncases' mem_append.1 hb with h h\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nho : some c = some m\n⊢ ¬r b m\n[PROOFSTEP]\ncases' mem_append.1 hb with h h\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nho : some a = some m\nh : b ∈ tl\n⊢ ¬r b m\n[PROOFSTEP]\ninjection ho with ho\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nho : some a = some m\nh : b ∈ [a]\n⊢ ¬r b m\n[PROOFSTEP]\ninjection ho with ho\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nho : some c = some m\nh : b ∈ tl\n⊢ ¬r b m\n[PROOFSTEP]\ninjection ho with ho\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nho : some c = some m\nh : b ∈ [a]\n⊢ ¬r b m\n[PROOFSTEP]\ninjection ho with ho\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nh : b ∈ tl\nho : a = m\n⊢ ¬r b m\n[PROOFSTEP]\nsubst ho\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nh : b ∈ [a]\nho : a = m\n⊢ ¬r b m\n[PROOFSTEP]\nsubst ho\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nh : b ∈ tl\nho : c = m\n⊢ ¬r b m\n[PROOFSTEP]\nsubst ho\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m✝ : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb m : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nh : b ∈ [a]\nho : c = m\n⊢ ¬r b m\n[PROOFSTEP]\nsubst ho\n[GOAL]\ncase pos.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nh : b ∈ tl\n⊢ ¬r b a\n[PROOFSTEP]\nexact fun hba => ih h hf (hr₁ hba hac)\n[GOAL]\ncase pos.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : r a c\nh : b ∈ [a]\n⊢ ¬r b a\n[PROOFSTEP]\nsimp_all [hr₀ _]\n[GOAL]\ncase neg.inl\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nh : b ∈ tl\n⊢ ¬r b c\n[PROOFSTEP]\nexact ih h hf\n[GOAL]\ncase neg.inr\nα : Type u_1\nβ : Type u_2\nr : α → α → Prop\ninst✝ : DecidableRel r\nl : List α\no✝ : Option α\na✝ m : α\nhr₀ : Irreflexive r\nhr₁ : Transitive r\ntl : List α\na : α\nih : ∀ {a m : α} {o : Option α}, a ∈ tl → m ∈ foldl (argAux r) o tl → ¬r a m\nb : α\no : Option α\nhb : b ∈ tl ++ [a]\nc : α\nhf : foldl (argAux r) o tl = some c\nhac : ¬r a c\nh : b ∈ [a]\n⊢ ¬r b c\n[PROOFSTEP]\nsimp_all\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder β\ninst✝ : DecidableRel fun x x_1 => x < x_1\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m : α\nf : α → β\na : α\nl : List α\n⊢ argmax f (l ++ [a]) = Option.casesOn (argmax f l) (some a) fun c => if f c < f a then some a else some c\n[PROOFSTEP]\nrw [argmax, argmax]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder β\ninst✝ : DecidableRel fun x x_1 => x < x_1\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m : α\nf : α → β\na : α\nl : List α\n⊢ foldl (argAux fun b c => f c < f b) none (l ++ [a]) =\n    Option.casesOn (foldl (argAux fun b c => f c < f b) none l) (some a) fun c => if f c < f a then some a else some c\n[PROOFSTEP]\nsimp [argAux]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder β\ninst✝ : DecidableRel fun x x_1 => x < x_1\nf : α → β\nl : List α\no : Option α\na m✝ m : α\n⊢ m ∈ argmax f [] → m ∈ []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder β\ninst✝ : DecidableRel fun x x_1 => x < x_1\nf : α → β\nl : List α\no : Option α\na m✝ hd : α\ntl : List α\nm : α\n⊢ m ∈ argmax f (hd :: tl) → m ∈ hd :: tl\n[PROOFSTEP]\nsimpa [argmax, argAux] using foldl_argAux_mem _ tl hd m\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder β\ninst✝ : DecidableRel fun x x_1 => x < x_1\nf : α → β\nl : List α\no : Option α\na m : α\n⊢ argmax f l = none ↔ l = []\n[PROOFSTEP]\nsimp [argmax]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\n⊢ argmax f (a :: (hd ++ [tl])) =\n    Option.casesOn (argmax f (hd ++ [tl])) (some a) fun c => if f a < f c then some c else some a\n[PROOFSTEP]\nrw [← cons_append, argmax_concat, ih, argmax_concat]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\n⊢ (Option.casesOn (Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a) (some tl)\n      fun c => if f c < f tl then some tl else some c) =\n    Option.casesOn (Option.casesOn (argmax f hd) (some tl) fun c => if f c < f tl then some tl else some c) (some a)\n      fun c => if f a < f c then some c else some a\n[PROOFSTEP]\ncases' h : argmax f hd with m\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nh : argmax f hd = none\n⊢ (Option.casesOn (Option.casesOn none (some a) fun c => if f a < f c then some c else some a) (some tl) fun c =>\n      if f c < f tl then some tl else some c) =\n    Option.casesOn (Option.casesOn none (some tl) fun c => if f c < f tl then some tl else some c) (some a) fun c =>\n      if f a < f c then some c else some a\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\n⊢ (Option.casesOn (Option.casesOn (some m) (some a) fun c => if f a < f c then some c else some a) (some tl) fun c =>\n      if f c < f tl then some tl else some c) =\n    Option.casesOn (Option.casesOn (some m) (some tl) fun c => if f c < f tl then some tl else some c) (some a) fun c =>\n      if f a < f c then some c else some a\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\n⊢ Option.rec (some tl) (fun val => if f val < f tl then some tl else some val) (if f a < f m then some m else some a) =\n    Option.rec (some a) (fun val => if f a < f val then some val else some a) (if f m < f tl then some tl else some m)\n[PROOFSTEP]\nrw [← apply_ite, ← apply_ite]\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\n⊢ Option.rec (some tl) (fun val => if f val < f tl then some tl else some val) (some (if f a < f m then m else a)) =\n    Option.rec (some a) (fun val => if f a < f val then some val else some a) (some (if f m < f tl then tl else m))\n[PROOFSTEP]\ndsimp\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\n⊢ (if f (if f a < f m then m else a) < f tl then some tl else some (if f a < f m then m else a)) =\n    if f a < f (if f m < f tl then tl else m) then some (if f m < f tl then tl else m) else some a\n[PROOFSTEP]\nsplit_ifs\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : f a < f m\nh✝¹ : f m < f tl\nh✝ : f a < f tl\n⊢ some tl = some tl\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : f a < f m\nh✝¹ : f m < f tl\nh✝ : f a < f tl\n⊢ some tl = some tl\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : f a < f m\nh✝¹ : f m < f tl\nh✝ : ¬f a < f tl\n⊢ some tl = some a\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : f a < f m\nh✝¹ : f m < f tl\nh✝ : ¬f a < f tl\n⊢ some tl = some a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝¹ : f a < f m\nh✝ : ¬f m < f tl\n⊢ some m = some m\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝¹ : f a < f m\nh✝ : ¬f m < f tl\n⊢ some m = some m\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : f a < f tl\nh✝ : f m < f tl\n⊢ some tl = some tl\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : f a < f tl\nh✝ : f m < f tl\n⊢ some tl = some tl\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : f a < f tl\nh✝ : ¬f m < f tl\n⊢ some tl = some a\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : f a < f tl\nh✝ : ¬f m < f tl\n⊢ some tl = some a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : ¬f a < f tl\nh✝ : f m < f tl\n⊢ some a = some a\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : ¬f a < f tl\nh✝ : f m < f tl\n⊢ some a = some a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : ¬f a < f tl\nh✝ : ¬f m < f tl\n⊢ some a = some a\n[PROOFSTEP]\ntry rfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : ¬f a < f tl\nh✝ : ¬f m < f tl\n⊢ some a = some a\n[PROOFSTEP]\nrfl\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : f a < f m\nh✝¹ : f m < f tl\nh✝ : ¬f a < f tl\n⊢ some tl = some a\n[PROOFSTEP]\nexact absurd (lt_trans ‹f a < f m› ‹_›) ‹_›\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder β\nf✝ : α → β\nl✝ : List α\no : Option α\na✝ m✝ : α\nf : α → β\na : α\nl hd : List α\ntl : α\nih : argmax f (a :: hd) = Option.casesOn (argmax f hd) (some a) fun c => if f a < f c then some c else some a\nm : α\nh : argmax f hd = some m\nh✝² : ¬f a < f m\nh✝¹ : f a < f tl\nh✝ : ¬f m < f tl\n⊢ some tl = some a\n[PROOFSTEP]\ncases (‹f a < f tl›.lt_or_lt _).elim ‹_› ‹_›\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nm : α\nx✝³ : m ∈ argmax f []\nx✝² : α\nx✝¹ : x✝² ∈ []\nx✝ : f m ≤ f x✝²\n⊢ indexOf m [] ≤ indexOf x✝² []\n[PROOFSTEP]\nsimp\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm : α\nhm : m ∈ argmax f (hd :: tl)\na : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\n⊢ indexOf m (hd :: tl) ≤ indexOf a (hd :: tl)\n[PROOFSTEP]\nsimp only [indexOf_cons, argmax_cons, Option.mem_def] at hm ⊢\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nhm : Option.rec (some hd) (fun val => if f hd < f val then some val else some hd) (argmax f tl) = some m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\ncases h : argmax f tl\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nhm : Option.rec (some hd) (fun val => if f hd < f val then some val else some hd) (argmax f tl) = some m\nh : argmax f tl = none\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nrw [h] at hm \n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nhm : Option.rec (some hd) (fun val => if f hd < f val then some val else some hd) none = some m\nh : argmax f tl = none\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nhm : Option.rec (some hd) (fun val => if f hd < f val then some val else some hd) (argmax f tl) = some m\nval✝ : α\nh : argmax f tl = some val✝\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nrw [h] at hm \n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nval✝ : α\nhm : Option.rec (some hd) (fun val => if f hd < f val then some val else some hd) (some val✝) = some m\nh : argmax f tl = some val✝\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\ndsimp only at hm \n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nha : a ∈ hd :: tl\nham : f m ≤ f a\nval✝ : α\nhm : (if f hd < f val✝ then some val✝ else some hd) = some m\nh : argmax f tl = some val✝\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nobtain ha | ha := ha\n[GOAL]\ncase some.head\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm val✝ : α\nhm : (if f hd < f val✝ then some val✝ else some hd) = some m\nh : argmax f tl = some val✝\nham : f m ≤ f hd\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\nsplit_ifs at hm \n[GOAL]\ncase some.tail\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nham : f m ≤ f a\nval✝ : α\nhm : (if f hd < f val✝ then some val✝ else some hd) = some m\nh : argmax f tl = some val✝\na✝ : Mem a tl\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nsplit_ifs at hm \n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm val✝ : α\nh : argmax f tl = some val✝\nham : f m ≤ f hd\nh✝ : f hd < f val✝\nhm : some val✝ = some m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\ninjection hm with hm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm val✝ : α\nh : argmax f tl = some val✝\nham : f m ≤ f hd\nh✝ : ¬f hd < f val✝\nhm : some hd = some m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\ninjection hm with hm\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nham : f m ≤ f a\nval✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nhm : some val✝ = some m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\ninjection hm with hm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nham : f m ≤ f a\nval✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : ¬f hd < f val✝\nhm : some hd = some m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\ninjection hm with hm\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm val✝ : α\nh : argmax f tl = some val✝\nham : f m ≤ f hd\nh✝ : f hd < f val✝\nhm : val✝ = m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\nsubst hm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm val✝ : α\nh : argmax f tl = some val✝\nham : f m ≤ f hd\nh✝ : ¬f hd < f val✝\nhm : hd = m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\nsubst hm\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nham : f m ≤ f a\nval✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nhm : val✝ = m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nsubst hm\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m✝ : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nm a : α\nham : f m ≤ f a\nval✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : ¬f hd < f val✝\nhm : hd = m\n⊢ (if m = hd then 0 else Nat.succ (indexOf m tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nsubst hm\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nval✝ : α\nh : argmax f tl = some val✝\nh✝ : f hd < f val✝\nham : f val✝ ≤ f hd\n⊢ (if val✝ = hd then 0 else Nat.succ (indexOf val✝ tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\ncases not_le_of_lt ‹_› ‹_›\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\nval✝ : α\nh : argmax f tl = some val✝\nh✝ : ¬f hd < f val✝\nham : f hd ≤ f hd\n⊢ (if hd = hd then 0 else Nat.succ (indexOf hd tl)) ≤ if hd = hd then 0 else Nat.succ (indexOf hd tl)\n[PROOFSTEP]\nrw [if_pos rfl]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ (if val✝ = hd then 0 else Nat.succ (indexOf val✝ tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nrw [if_neg, if_neg]\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ Nat.succ (indexOf val✝ tl) ≤ Nat.succ (indexOf a tl)\ncase pos.hnc\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ ¬a = hd\ncase pos.hnc\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ ¬val✝ = hd\n[PROOFSTEP]\nexact Nat.succ_le_succ (index_of_argmax h (by assumption) ham)\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ a ∈ tl\n[PROOFSTEP]\nassumption\n[GOAL]\ncase pos.hnc\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ ¬a = hd\n[PROOFSTEP]\nexact ne_of_apply_ne f (lt_of_lt_of_le ‹_› ‹_›).ne'\n[GOAL]\ncase pos.hnc\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : f hd < f val✝\nham : f val✝ ≤ f a\n⊢ ¬val✝ = hd\n[PROOFSTEP]\nexact ne_of_apply_ne _ ‹f hd < f _›.ne'\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : ¬f hd < f val✝\nham : f hd ≤ f a\n⊢ (if hd = hd then 0 else Nat.succ (indexOf hd tl)) ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nrw [if_pos rfl]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na✝¹ m : α\ninst✝ : DecidableEq α\nhd : α\ntl : List α\na val✝ : α\nh : argmax f tl = some val✝\na✝ : Mem a tl\nh✝ : ¬f hd < f val✝\nham : f hd ≤ f a\n⊢ 0 ≤ if a = hd then 0 else Nat.succ (indexOf a tl)\n[PROOFSTEP]\nexact Nat.zero_le _\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\n⊢ (m ∈ l ∧ (∀ (a : α), a ∈ l → f a ≤ f m) ∧ ∀ (a : α), a ∈ l → f m ≤ f a → indexOf m l ≤ indexOf a l) → m ∈ argmax f l\n[PROOFSTEP]\nrintro ⟨hml, ham, hma⟩\n[GOAL]\ncase intro.intro\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhml : m ∈ l\nham : ∀ (a : α), a ∈ l → f a ≤ f m\nhma : ∀ (a : α), a ∈ l → f m ≤ f a → indexOf m l ≤ indexOf a l\n⊢ m ∈ argmax f l\n[PROOFSTEP]\ncases' harg : argmax f l with n\n[GOAL]\ncase intro.intro.none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhml : m ∈ l\nham : ∀ (a : α), a ∈ l → f a ≤ f m\nhma : ∀ (a : α), a ∈ l → f m ≤ f a → indexOf m l ≤ indexOf a l\nharg : argmax f l = none\n⊢ m ∈ none\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase intro.intro.some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhml : m ∈ l\nham : ∀ (a : α), a ∈ l → f a ≤ f m\nhma : ∀ (a : α), a ∈ l → f m ≤ f a → indexOf m l ≤ indexOf a l\nn : α\nharg : argmax f l = some n\n⊢ m ∈ some n\n[PROOFSTEP]\nhave :=\n  _root_.le_antisymm (hma n (argmax_mem harg) (le_of_mem_argmax hml harg))\n    (index_of_argmax harg hml (ham _ (argmax_mem harg)))\n[GOAL]\ncase intro.intro.some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder β\nf : α → β\nl : List α\no : Option α\na m : α\ninst✝ : DecidableEq α\nhml : m ∈ l\nham : ∀ (a : α), a ∈ l → f a ≤ f m\nhma : ∀ (a : α), a ∈ l → f m ≤ f a → indexOf m l ≤ indexOf a l\nn : α\nharg : argmax f l = some n\nthis : indexOf m l = indexOf n l\n⊢ m ∈ some n\n[PROOFSTEP]\nrw [(indexOf_inj hml (argmax_mem harg)).1 this, Option.mem_def]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x < x_1\nl : List α\na m : α\nha : a ∈ l\n⊢ ¬maximum l < ↑a\n[PROOFSTEP]\ncases h : l.maximum\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x < x_1\nl : List α\na m : α\nha : a ∈ l\nh : maximum l = none\n⊢ ¬none < ↑a\n[PROOFSTEP]\nsimp_all\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝¹ : Preorder α\ninst✝ : DecidableRel fun x x_1 => x < x_1\nl : List α\na m : α\nha : a ∈ l\nval✝ : α\nh : maximum l = some val✝\n⊢ ¬some val✝ < ↑a\n[PROOFSTEP]\nsimp [WithBot.some_eq_coe, WithBot.coe_lt_coe, not_lt_maximum_of_mem ha h, not_false_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl : List α\n⊢ maximum (l ++ [a]) = max (maximum l) ↑a\n[PROOFSTEP]\nsimp only [maximum, argmax_concat, id]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl : List α\n⊢ Option.rec (some a) (fun val => if val < a then some a else some val) (argmax (fun a => a) l) =\n    max (argmax (fun a => a) l) ↑a\n[PROOFSTEP]\ncases h : argmax id l\n[GOAL]\ncase none\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl : List α\nh : argmax id l = none\n⊢ Option.rec (some a) (fun val => if val < a then some a else some val) none = max none ↑a\n[PROOFSTEP]\nexact (max_eq_right bot_le).symm\n[GOAL]\ncase some\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl : List α\nval✝ : α\nh : argmax id l = some val✝\n⊢ Option.rec (some a) (fun val => if val < a then some a else some val) (some val✝) = max (some val✝) ↑a\n[PROOFSTEP]\nsimp [WithBot.some_eq_coe, max_def_lt, WithBot.coe_lt_coe]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl : List α\n⊢ maximum [a] = max (↑a) (maximum [])\n[PROOFSTEP]\nsimp [@max_eq_left (WithBot α) _ _ _ bot_le]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl✝ : List α\na✝ m a : α\nl tl : List α\nhd : α\nih : maximum (a :: tl) = max (↑a) (maximum tl)\n⊢ maximum (a :: (tl ++ [hd])) = max (↑a) (maximum (tl ++ [hd]))\n[PROOFSTEP]\nrw [← cons_append, maximum_concat, ih, maximum_concat, max_assoc]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ maximum l = ↑m ↔ m ∈ l ∧ ∀ (a : α), a ∈ l → a ≤ m\n[PROOFSTEP]\nrw [maximum, ← WithBot.some_eq_coe, argmax_eq_some_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ (m ∈ l ∧ (∀ (a : α), a ∈ l → id a ≤ id m) ∧ ∀ (a : α), a ∈ l → id m ≤ id a → indexOf m l ≤ indexOf a l) ↔\n    m ∈ l ∧ ∀ (a : α), a ∈ l → a ≤ m\n[PROOFSTEP]\nsimp only [id_eq, and_congr_right_iff, and_iff_left_iff_imp]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ m ∈ l → (∀ (a : α), a ∈ l → a ≤ m) → ∀ (a : α), a ∈ l → m ≤ a → indexOf m l ≤ indexOf a l\n[PROOFSTEP]\nintro _ h a hal hma\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na✝¹ m : α\na✝ : m ∈ l\nh : ∀ (a : α), a ∈ l → a ≤ m\na : α\nhal : a ∈ l\nhma : m ≤ a\n⊢ indexOf m l ≤ indexOf a l\n[PROOFSTEP]\nrw [_root_.le_antisymm hma (h a hal)]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ ↑a ≤ maximum l ↔ ∃ b, b ∈ l ∧ a ≤ b\n[PROOFSTEP]\ninduction l with\n| nil => simp\n| cons h t ih => simp [maximum_cons, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ ↑a ≤ maximum l ↔ ∃ b, b ∈ l ∧ a ≤ b\n[PROOFSTEP]\ninduction l with\n| nil => simp\n| cons h t ih => simp [maximum_cons, ih]\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ ↑a ≤ maximum [] ↔ ∃ b, b ∈ [] ∧ a ≤ b\n[PROOFSTEP]\n\n| nil => simp\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\n⊢ ↑a ≤ maximum [] ↔ ∃ b, b ∈ [] ∧ a ≤ b\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m h : α\nt : List α\nih : ↑a ≤ maximum t ↔ ∃ b, b ∈ t ∧ a ≤ b\n⊢ ↑a ≤ maximum (h :: t) ↔ ∃ b, b ∈ h :: t ∧ a ≤ b\n[PROOFSTEP]\n\n| cons h t ih => simp [maximum_cons, ih]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m h : α\nt : List α\nih : ↑a ≤ maximum t ↔ ∃ b, b ∈ t ∧ a ≤ b\n⊢ ↑a ≤ maximum (h :: t) ↔ ∃ b, b ∈ h :: t ∧ a ≤ b\n[PROOFSTEP]\nsimp [maximum_cons, ih]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\nh : l ≠ []\nhead✝ : α\ntail✝ : List α\nx✝ : head✝ :: tail✝ ≠ []\n⊢ maximum (head✝ :: tail✝) ≠ ⊥\n[PROOFSTEP]\nsimp [maximum_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\nh : 0 < length l\nhead✝ : α\ntail✝ : List α\nx✝ : 0 < length (head✝ :: tail✝)\n⊢ maximum (head✝ :: tail✝) ≠ ⊥\n[PROOFSTEP]\nsimp [maximum_cons]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\nh : a ∈ l\nw : 0 < length l\n⊢ a ≤ maximum_of_length_pos w\n[PROOFSTEP]\nsimp [le_maximum_of_length_pos_iff]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\nh : a ∈ l\nw : 0 < length l\n⊢ ↑a ≤ maximum l\n[PROOFSTEP]\nexact le_maximum_of_mem' h\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\ni : ℕ\nw : i < length l\nh : optParam (0 < length l) (_ : 0 < length l)\n⊢ l[i] ≤ maximum_of_length_pos h\n[PROOFSTEP]\napply le_maximum_of_length_pos_of_mem\n[GOAL]\ncase h\nα : Type u_1\nβ : Type u_2\ninst✝ : LinearOrder α\nl : List α\na m : α\ni : ℕ\nw : i < length l\nh : optParam (0 < length l) (_ : 0 < length l)\n⊢ l[i] ∈ l\n[PROOFSTEP]\nexact get_mem l i w\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh : l ≠ []\n⊢ ↑(foldr max ⊥ l) = maximum l\n[PROOFSTEP]\ninduction' l with hd tl IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh✝ : l ≠ []\nh : [] ≠ []\n⊢ ↑(foldr max ⊥ []) = maximum []\n[PROOFSTEP]\ncontradiction\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh✝ : l ≠ []\nhd : α\ntl : List α\nIH : tl ≠ [] → ↑(foldr max ⊥ tl) = maximum tl\nh : hd :: tl ≠ []\n⊢ ↑(foldr max ⊥ (hd :: tl)) = maximum (hd :: tl)\n[PROOFSTEP]\nrw [maximum_cons, foldr, WithBot.coe_max]\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh✝ : l ≠ []\nhd : α\ntl : List α\nIH : tl ≠ [] → ↑(foldr max ⊥ tl) = maximum tl\nh : hd :: tl ≠ []\n⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) (maximum tl)\n[PROOFSTEP]\nby_cases h : tl = []\n[GOAL]\ncase pos\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh✝¹ : l ≠ []\nhd : α\ntl : List α\nIH : tl ≠ [] → ↑(foldr max ⊥ tl) = maximum tl\nh✝ : hd :: tl ≠ []\nh : tl = []\n⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) (maximum tl)\n[PROOFSTEP]\nsimp [h]\n[GOAL]\ncase neg\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl : List α\nh✝¹ : l ≠ []\nhd : α\ntl : List α\nIH : tl ≠ [] → ↑(foldr max ⊥ tl) = maximum tl\nh✝ : hd :: tl ≠ []\nh : ¬tl = []\n⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) (maximum tl)\n[PROOFSTEP]\nsimp [IH h]\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝ l : List α\na : α\nh : ∀ (x : α), x ∈ l → x ≤ a\n⊢ foldr max ⊥ l ≤ a\n[PROOFSTEP]\ninduction' l with y l IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝ l : List α\na : α\nh✝ : ∀ (x : α), x ∈ l → x ≤ a\nh : ∀ (x : α), x ∈ [] → x ≤ a\n⊢ foldr max ⊥ [] ≤ a\n[PROOFSTEP]\nsimp\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na : α\nh✝ : ∀ (x : α), x ∈ l✝ → x ≤ a\ny : α\nl : List α\nIH : (∀ (x : α), x ∈ l → x ≤ a) → foldr max ⊥ l ≤ a\nh : ∀ (x : α), x ∈ y :: l → x ≤ a\n⊢ foldr max ⊥ (y :: l) ≤ a\n[PROOFSTEP]\nsimpa [h y (mem_cons_self _ _)] using IH fun x hx => h x <| mem_cons_of_mem _ hx\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝ l : List α\na x : α\nhx : x ∈ l\nh : a ≤ x\n⊢ a ≤ foldr max ⊥ l\n[PROOFSTEP]\ninduction' l with y l IH\n[GOAL]\ncase nil\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝ l : List α\na x : α\nhx✝ : x ∈ l\nh : a ≤ x\nhx : x ∈ []\n⊢ a ≤ foldr max ⊥ []\n[PROOFSTEP]\nexact absurd hx (not_mem_nil _)\n[GOAL]\ncase cons\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx✝ : x ∈ l✝\nh : a ≤ x\ny : α\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\nhx : x ∈ y :: l\n⊢ a ≤ foldr max ⊥ (y :: l)\n[PROOFSTEP]\nobtain hl | hl := hx\n[GOAL]\ncase cons.head\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx : x ∈ l✝\nh : a ≤ x\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\n⊢ a ≤ foldr max ⊥ (x :: l)\ncase cons.tail\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx : x ∈ l✝\nh : a ≤ x\ny : α\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\na✝ : Mem x l\n⊢ a ≤ foldr max ⊥ (y :: l)\n[PROOFSTEP]\nsimp only [foldr, foldr_cons]\n[GOAL]\ncase cons.head\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx : x ∈ l✝\nh : a ≤ x\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\n⊢ a ≤ max x (foldr max ⊥ l)\n[PROOFSTEP]\nexact le_max_of_le_left h\n[GOAL]\ncase cons.tail\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx : x ∈ l✝\nh : a ≤ x\ny : α\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\na✝ : Mem x l\n⊢ a ≤ foldr max ⊥ (y :: l)\n[PROOFSTEP]\nexact le_max_of_le_right (IH (by assumption))\n[GOAL]\nα : Type u_1\nβ : Type u_2\ninst✝¹ : LinearOrder α\ninst✝ : OrderBot α\nl✝¹ l✝ : List α\na x : α\nhx : x ∈ l✝\nh : a ≤ x\ny : α\nl : List α\nIH : x ∈ l → a ≤ foldr max ⊥ l\na✝ : Mem x l\n⊢ x ∈ l\n[PROOFSTEP]\nassumption\n", "meta": {"mathlib_filename": "Mathlib.Data.List.MinMax", "llama_tokens": 26135, "lm_name": "Qwen/Qwen-72B", "lm_label": "1. YES\n2. NO", "lm_q1_score": 0.5312093733737563, "lm_q2_score": 0.47268347662043286, "lm_q1q2_score": 0.2510938934196687}}
